Initial OpenECOMP MSO commit 47/5447/3
authorChrisC <cc697w@intl.att.com>
Tue, 31 Jan 2017 10:40:03 +0000 (11:40 +0100)
committerChrisC <cc697w@intl.att.com>
Tue, 31 Jan 2017 11:59:33 +0000 (12:59 +0100)
Change-Id: Ia6a7574859480717402cc2f22534d9973a78fa6d
Signed-off-by: ChrisC <cc697w@intl.att.com>
1279 files changed:
.gitignore [new file with mode: 0644]
.gitreview [new file with mode: 0644]
LICENSE.txt [new file with mode: 0644]
adapters/mso-adapter-utils/README [new file with mode: 0644]
adapters/mso-adapter-utils/pom.xml [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigFactory.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudSite.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Pool.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoAdapterException.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFound.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoExceptionCategory.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoIOException.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExists.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFound.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExists.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFound.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExists.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFound.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/CloudConfigInitializer.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoCommonUtils.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameter.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResource.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtilsFactory.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoCommonUtilsTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudIdentityESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudIdentityTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudSiteESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudSiteESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/PoolESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/PoolESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/SubnetESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/SubnetESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoExceptionESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoExceptionESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntryESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/resources/cloud_config.json [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/resources/logback-test.xml [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/resources/mso.properties [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/resources/mso2.properties [new file with mode: 0644]
adapters/mso-adapters-rest-interface/pom.xml [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/ContrailNetwork.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkRequestCommon.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkResponseCommon.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkTechnology.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetwork.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/QueryNetworkError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandler.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/QueryTenantError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantError.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRequestCommon.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRollback.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollback.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommon.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponse.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollback.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ContrailNetworkESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ContrailNetworkESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetworkESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetworkESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandlerESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandlerESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantErrorESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantErrorESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantRollbackESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantRollbackESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequestESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollbackESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollbackESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommonESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommonESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponseESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollbackESTest.java [new file with mode: 0644]
adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollbackESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/README.md [new file with mode: 0644]
adapters/mso-network-adapter-async-client/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
adapters/mso-network-adapter-async-client/pom.xml [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/main/resources/NetworkAdapterNotify.wsdl [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTest.java [new file with mode: 0644]
adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTestscaffolding.java [new file with mode: 0644]
adapters/mso-network-adapter/README [new file with mode: 0644]
adapters/mso-network-adapter/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
adapters/mso-network-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector [new file with mode: 0644]
adapters/mso-network-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
adapters/mso-network-adapter/WebContent/WEB-INF/jboss-web.xml [new file with mode: 0644]
adapters/mso-network-adapter/WebContent/WEB-INF/web.xml [new file with mode: 0644]
adapters/mso-network-adapter/WebContent/check.html [new file with mode: 0644]
adapters/mso-network-adapter/pom.xml [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailPolicyRef.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailPolicyRefSeq.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnet.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetIp.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetPool.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/HealthCheckHandler.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapter.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsync.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsyncImpl.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/NetworkAdapterRest.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/exceptions/NetworkException.java [new file with mode: 0644]
adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/exceptions/NetworkExceptionBean.java [new file with mode: 0644]
adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/NetworkAdapterTest.java [new file with mode: 0644]
adapters/mso-network-adapter/src/test/resources/logback-test.xml [new file with mode: 0644]
adapters/mso-requests-db-adapter/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
adapters/mso-requests-db-adapter/WebContent/WEB-INF/beans.xml [new file with mode: 0644]
adapters/mso-requests-db-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
adapters/mso-requests-db-adapter/WebContent/WEB-INF/jboss-web.xml [new file with mode: 0644]
adapters/mso-requests-db-adapter/WebContent/WEB-INF/web.xml [new file with mode: 0644]
adapters/mso-requests-db-adapter/WebContent/index.xhtml [new file with mode: 0644]
adapters/mso-requests-db-adapter/pom.xml [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/HealthCheckHandler.java [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/RequestStatusType.java [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/ResponseStatus.java [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/Status.java [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbException.java [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbExceptionBean.java [new file with mode: 0644]
adapters/mso-requests-db-adapter/src/main/java/resources/application.properties [new file with mode: 0644]
adapters/mso-sdnc-adapter/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
adapters/mso-sdnc-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
adapters/mso-sdnc-adapter/WebContent/WEB-INF/jboss-web.xml [new file with mode: 0644]
adapters/mso-sdnc-adapter/WebContent/WEB-INF/web.xml [new file with mode: 0644]
adapters/mso-sdnc-adapter/WebContent/check.html [new file with mode: 0644]
adapters/mso-sdnc-adapter/null/mso-config/uuid/uuid_null [new file with mode: 0644]
adapters/mso-sdnc-adapter/pom.xml [new file with mode: 0644]
adapters/mso-sdnc-adapter/readme [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/ObjectFactory.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/RequestHeader.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterPortType.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterRequest.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterResponse.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterService.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeader.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/ObjectFactory.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCAdapterCallbackRequest.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCCallbackAdapterPortType.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCCallbackAdapterService.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/package-info.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/Constants.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunables.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterRestImpl.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCResponse.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/Utils.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/notify/SDNCNotifyResource.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/package-info.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/util/SDNCRequestIdUtil.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/resources/SDNCAdapter.wsdl [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/resources/SDNCAdapterSchema.xsd [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/main/resources/SDNCCallbackAdapter.wsdl [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/ObjectFactoryTest.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunablesTest.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/util/SDNCRequestIdUtilTest.java [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/test/resources/logback-test.xml [new file with mode: 0644]
adapters/mso-sdnc-adapter/src/test/resources/mso.properties [new file with mode: 0644]
adapters/mso-tenant-adapter/README.md [new file with mode: 0644]
adapters/mso-tenant-adapter/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
adapters/mso-tenant-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector [new file with mode: 0644]
adapters/mso-tenant-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
adapters/mso-tenant-adapter/WebContent/WEB-INF/jboss-web.xml [new file with mode: 0644]
adapters/mso-tenant-adapter/WebContent/WEB-INF/web.xml [new file with mode: 0644]
adapters/mso-tenant-adapter/WebContent/check.html [new file with mode: 0644]
adapters/mso-tenant-adapter/pom.xml [new file with mode: 0644]
adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/HealthCheckHandler.java [new file with mode: 0644]
adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapter.java [new file with mode: 0644]
adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapterImpl.java [new file with mode: 0644]
adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/TenantAdapterRest.java [new file with mode: 0644]
adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantAlreadyExists.java [new file with mode: 0644]
adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantException.java [new file with mode: 0644]
adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantExceptionBean.java [new file with mode: 0644]
adapters/mso-tenant-adapter/src/test/java/org/openecomp/mso/adapters/tenant/test/TenantTest.java [new file with mode: 0644]
adapters/mso-tenant-adapter/src/test/resources/logback-test.xml [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/README.md [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/pom.xml [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/main/resources/VnfAdapterNotify.wsdl [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoExceptionCategoryESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoExceptionCategoryESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoRequestESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoRequestESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTestscaffolding.java [new file with mode: 0644]
adapters/mso-vnf-adapter/README.md [new file with mode: 0644]
adapters/mso-vnf-adapter/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
adapters/mso-vnf-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector [new file with mode: 0644]
adapters/mso-vnf-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
adapters/mso-vnf-adapter/WebContent/WEB-INF/jboss-web.xml [new file with mode: 0644]
adapters/mso-vnf-adapter/WebContent/WEB-INF/web.xml [new file with mode: 0644]
adapters/mso-vnf-adapter/WebContent/check.html [new file with mode: 0644]
adapters/mso-vnf-adapter/pom.xml [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/HealthCheckHandler.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapter.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsync.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImpl.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VfRollback.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VnfAdapterRest.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VolumeAdapterRest.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfAlreadyExists.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfException.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfExceptionBean.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfNotFound.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfCreateTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfDeleteTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfQueryTest.java [new file with mode: 0644]
adapters/mso-vnf-adapter/src/test/resources/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector [new file with mode: 0644]
adapters/mso-vnf-adapter/src/test/resources/logback-test.xml [new file with mode: 0644]
adapters/pom.xml [new file with mode: 0644]
asdc-controller/README [new file with mode: 0644]
asdc-controller/WebContent/WEB-INF/ejb-jar.xml [new file with mode: 0644]
asdc-controller/WebContent/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
asdc-controller/WebContent/WEB-INF/jboss-web.xml [new file with mode: 0644]
asdc-controller/WebContent/WEB-INF/web.xml [new file with mode: 0644]
asdc-controller/notif.txt [new file with mode: 0644]
asdc-controller/pom.xml [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/ASDCControllerSingleton.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCConfiguration.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCController.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCControllerStatus.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCGlobalController.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/DistributionStatusMessage.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerException.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadException.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersException.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerException.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/healthcheck/HealthCheckHandler.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ASDCElementInfo.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/BigDecimalVersion.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/IArtifactOrchestrator.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/IVfResourceInstaller.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfModuleArtifact.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfModuleStructure.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfResourceStructure.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ToLog.java [new file with mode: 0644]
asdc-controller/src/main/java/org/openecomp/mso/asdc/util/YamlEditor.java [new file with mode: 0644]
asdc-controller/src/main/resources/config-key.properties [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/ASDCControllerSingletonESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/ASDCControllerSingletonESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCConfigurationTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCControllerTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCElementInfoTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCGlobalControllerTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/BigDecimalVersionTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/YamlTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/ASDCElementInfoESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/ASDCElementInfoESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfResourceStructureESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfResourceStructureESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/util/YamlEditorESTest.java [new file with mode: 0644]
asdc-controller/src/test/java/org/openecomp/mso/asdc/util/YamlEditorESTestscaffolding.java [new file with mode: 0644]
asdc-controller/src/test/resources/logback-test.xml [new file with mode: 0644]
asdc-controller/src/test/resources/mso-bad.json [new file with mode: 0644]
asdc-controller/src/test/resources/mso-two-configs.json [new file with mode: 0644]
asdc-controller/src/test/resources/mso-two-configs2.json [new file with mode: 0644]
asdc-controller/src/test/resources/mso-with-NULL.json [new file with mode: 0644]
asdc-controller/src/test/resources/mso.json [new file with mode: 0644]
asdc-controller/src/test/resources/mso2.json [new file with mode: 0644]
asdc-controller/src/test/resources/mso3.json [new file with mode: 0644]
asdc-controller/src/test/resources/mso4-with-TLS.json [new file with mode: 0644]
asdc-controller/src/test/resources/resource-examples/autoscaling.yaml [new file with mode: 0644]
asdc-controller/src/test/resources/resource-examples/mixed.yaml [new file with mode: 0644]
asdc-controller/src/test/resources/resource-examples/network.yaml [new file with mode: 0644]
asdc-controller/src/test/resources/resource-examples/simpleTest.yaml [new file with mode: 0644]
asdc-controller/src/test/resources/resource-examples/simpleTestWithoutParam.yaml [new file with mode: 0644]
asdc-controller/src/test/resources/resource-examples/vnf.yaml [new file with mode: 0644]
bpmn/MSOCockpit/pom.xml [new file with mode: 0644]
bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml [new file with mode: 0644]
bpmn/MSOCockpit/src/main/resources/WEB-INF/applicationContext.xml [new file with mode: 0644]
bpmn/MSOCockpit/src/main/resources/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
bpmn/MSOCockpit/src/main/resources/WEB-INF/web.xml [new file with mode: 0644]
bpmn/MSOCoreBPMN/pom.xml [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BPMNLogger.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BadInjectedFieldException.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/LogTask.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldException.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadConfigTask.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadFileTask.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ResponseBuilder.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/URNMappingsTask.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/CamundaDBSetup.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/PropertyConfigurationSetup.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/resources/customMyBatisConfiguration.xml [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/resources/normalize-namespaces.xsl [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTest.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/resources/logback-test.xml [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.properties [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.urn.properties [new file with mode: 0644]
bpmn/MSOCoreBPMN/src/test/resources/request.json [new file with mode: 0644]
bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF [new file with mode: 0644]
bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
bpmn/MSOGammaBPMN/pom.xml [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AaiUtil.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AbstractServiceTaskProcessor.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateNetworkInstanceInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateServiceInstanceInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteNetworkInstanceInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteServiceInstanceInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoDeleteVfModule.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoUpdateVfModule.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/logback.xml [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateServiceInstanceInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVnfInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteNetworkInstanceInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteServiceInstanceInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/urn.properties [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-web.xml [new file with mode: 0644]
bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml [new file with mode: 0644]
bpmn/MSORESTClient/pom.xml [new file with mode: 0644]
bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java [new file with mode: 0644]
bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HostNameVerifier.java [new file with mode: 0644]
bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java [new file with mode: 0644]
bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java [new file with mode: 0644]
bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTConfig.java [new file with mode: 0644]
bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTException.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java [new file with mode: 0644]
bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOURN-plugin/build.properties [new file with mode: 0644]
bpmn/MSOURN-plugin/build.xml [new file with mode: 0644]
bpmn/MSOURN-plugin/pom.xml [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/resources/mappings.xml [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/dashboard.html [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/plugin.js [new file with mode: 0644]
bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/info.txt [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java [new file with mode: 0644]
bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java [new file with mode: 0644]
bpmn/pom.xml [new file with mode: 0644]
common/pom.xml [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/entity/MsoRequest.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/entity/package-info.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/logger/LogFilter.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/logger/MessageEnum.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/logger/MsoAlarmLogger.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/logger/MsoLogInitializer.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/logger/MsoLogger.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/properties/AbstractMsoProperties.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/properties/MsoJavaProperties.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/properties/MsoPropertiesException.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/properties/MsoPropertiesFactory.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/properties/MsoPropertiesParameters.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/properties/MsoPropertyInitializer.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/utils/CheckResults.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java [new file with mode: 0644]
common/src/main/java/org/openecomp/mso/utils/UUIDChecker.java [new file with mode: 0644]
common/src/main/resources/ASDC.properties [new file with mode: 0644]
common/src/main/resources/ApiHandler.properties [new file with mode: 0644]
common/src/main/resources/BPMN.properties [new file with mode: 0644]
common/src/main/resources/GenericMessages.properties [new file with mode: 0644]
common/src/main/resources/ResourceAdapter.properties [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoAlarmLoggerTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoLoggerTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryConcurrencyTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertyInitializerTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/entity/MsoRequestESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/entity/MsoRequestESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/logger/LogFilterESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/logger/LogFilterESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/logger/MsoAlarmLoggerESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoJsonPropertiesESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoPropertiesFactoryESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/utils/CheckResultsTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java [new file with mode: 0644]
common/src/test/resources/logback-test.xml [new file with mode: 0644]
common/src/test/resources/mso-bad.json [new file with mode: 0644]
common/src/test/resources/mso.json [new file with mode: 0644]
common/src/test/resources/mso.nrdp-alarms.properties [new file with mode: 0644]
common/src/test/resources/mso.properties [new file with mode: 0644]
common/src/test/resources/mso2.json [new file with mode: 0644]
common/src/test/resources/mso2.properties [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/pom.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBooleanInput.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaIntegerInput.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaResponse.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/Track.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ErrorNumbers.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/LSInputImpl.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/PathResourceResolver.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClientFactory.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ValidationException.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/package-info.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/BPELRestClientTest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaRequestTest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaResponseTest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/ResponseHandlerTest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-common/src/test/resources/logback-test.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/WebContent/META-INF/MANIFEST.MF [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/beans.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/jboss-deployment-structure.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/jboss-web.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/web.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/WebContent/check.html [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/WebContent/index.xhtml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/pom.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Action.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Constants.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/HealthcheckHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/InfraUtils.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ModelType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoException.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoPropertiesUtils.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkMsoInfraRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestActionMap.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Status.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfMsoInfraRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeMsoInfraRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/ActionType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkInputs.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkOutputs.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkRequests.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkTypes.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/ObjectFactory.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/RequestInfo.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/RequestStatusType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/package-info.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/package-info.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/CloudConfiguration.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ExceptionType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/GetOrchestrationListResponse.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/GetOrchestrationResponse.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/InstanceReferences.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ModelInfo.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/PolicyException.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RelatedInstance.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RelatedInstanceList.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/Request.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestDetails.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestError.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestList.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestParameters.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestReferences.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestStatus.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceException.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceInstancesRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceInstancesResponse.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/SubscriberInfo.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/ActionType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/ObjectFactory.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/RequestInfo.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/RequestStatusType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VfModuleModelName.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VfModuleModelNames.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfInputs.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfOutputs.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfRequests.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfTypes.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/package-info.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/ActionType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/ObjectFactory.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/RequestInfo.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/RequestStatusType.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeInputs.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeOutputs.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeRequest.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeRequests.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/package-info.java [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/java/resources/application.properties [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/adv-feature-request.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/adv-service-request.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/feature-request.xml [new file with mode: 0644]
mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/service-request.xml [new file with mode: 0644]
mso-api-handlers/mso-requests-db/hibernate.properties [new file with mode: 0644]
mso-api-handlers/mso-requests-db/hibernate.reveng.xml [new file with mode: 0644]
mso-api-handlers/mso-requests-db/pom.xml [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/hibernate.reveng.xml [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/META-INF/MANIFEST.MF [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/HibernateUtil.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/InfraActiveRequests.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/InfraRequests.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/RequestsDatabase.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/SiteStatus.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapter.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/adapter/package-info.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/resources/InfraActiveRequests.hbm.xml [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/resources/SiteStatus.hbm.xml [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/resources/hibernate-mysql.cfg.xml [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/main/resources/hibernate-requests-ajsc.cfg.xml [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/HibernateUtilESTest.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/HibernateUtilESTestscaffolding.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraActiveRequestsESTest.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraActiveRequestsESTestscaffolding.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraRequestsESTest.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraRequestsESTestscaffolding.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/RequestsDatabaseESTest.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/RequestsDatabaseESTestscaffolding.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/SiteStatusESTest.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/SiteStatusESTestscaffolding.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapterESTest.java [new file with mode: 0644]
mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapterESTestscaffolding.java [new file with mode: 0644]
mso-api-handlers/pom.xml [new file with mode: 0644]
mso-catalog-db/README [new file with mode: 0644]
mso-catalog-db/pom.xml [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponent.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparator.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/package-info.java [new file with mode: 0644]
mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/NetworkResource.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/Service.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/VfModule.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/VnfComponent.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/VnfResource.hbm.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/hibernate-catalog-ajsc.cfg.xml [new file with mode: 0644]
mso-catalog-db/src/main/resources/hibernate-catalog-mysql.cfg.xml [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogTestDatabase.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/MavenVersioningTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTest.java [new file with mode: 0644]
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTestscaffolding.java [new file with mode: 0644]
mso-catalog-db/src/test/resources/logback-test.xml [new file with mode: 0644]
packages/arquillian-unit-tests/pom.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/filesearching/LogFileSearching.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/IntegrationTestsSuite.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/ASDCITCase.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/DistributionClientEmulator.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfoDeserializer.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonNotificationData.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfo.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfoDeserializer.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonVfModuleMetaData.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/soapui/SoapUiITCase.java [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/JMeter/MSO-Perf.jmx [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/SoapUI/Healthcheck-soapui-project.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/SoapUI/Local-API-Handler-soapui-project.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOConfig-soapui-project.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/SoapUI/MSONetworkAdapter-soapui-project.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOTenantAdapter-soapui-project.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOVnfAdapter-soapui-project.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/SoapUI/MsoRequestDB-soapui-project.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/SoapUI/soapui-settings.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/arquillian.xml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf1/mariadb1.cnf [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf2/mariadb2.cnf [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf3/mariadb3.cnf [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/docker/mso/mso-docker.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/base_vlb.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/base_vlb.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/dnsscaling.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/dnsscaling.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/vnf-module-artifact.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/notif-structure.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/base_vfw.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/base_vfw.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/vnf-module-artifact.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/notif-structure.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/cloud-nimbus.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/hot-nimbus-oam_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/hot-nimbus-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/nested-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/notif-structure.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/cloud-nimbus.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-ppd_v1.1.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pps_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-psm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-swift-container_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-swift-container_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/mount_iso_script.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/vnf-module-artifact.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/notif-structure.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/cloud-nimbus.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-ppd_v1.1.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pps_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-psm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-swift-container_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-swift-container_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/mount_iso_script.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/vnf-module-artifact.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/notif-structure.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/cloud-nimbus.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-ppd_v1.1.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pps_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-psm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-swift-container_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-swift-container_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/mount_iso_script.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/vnf-module-artifact.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/notif-structure.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/cloud-nimbus.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-ppd_v1.1.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pps_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-psm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-swift-container_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-swift-container_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/mount_iso_script.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/vnf-module-artifact.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/notif-structure.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/att_nimbus_vsaegw_ht_base_v13_0728v1.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/cloud-nimbus.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm-volumes_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-ppd_v1.1.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pps_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-psm_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-swift-container_v1.0.env [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-swift-container_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/mount_iso_script.sh [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-oam_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-pcm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-ppd_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-pps_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-psm_v1.0.yaml [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/vnf-module-artifact.json [new file with mode: 0644]
packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/notif-structure.json [new file with mode: 0644]
packages/deliveries/pom.xml [new file with mode: 0644]
packages/deliveries/src/main/assembly/mso-config/mso-db.xml [new file with mode: 0644]
packages/deliveries/src/main/assembly/war-pack/mso-wars.xml [new file with mode: 0644]
packages/docker/pom.xml [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/Dockerfile.jacoco [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/Dockerfile.mso-arquillian [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/Dockerfile.mso-build [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/Dockerfile.mso-chef-final [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/Dockerfile.ubuntu-16.04-update [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/Dockerfile.wildfly-10 [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/chef-configs/solo.rb [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/jboss-configs/configuration/application-roles.properties [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/jboss-configs/configuration/application-users.properties [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/jboss-configs/configuration/mgmt-groups.properties [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/jboss-configs/configuration/mgmt-users.properties [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/jboss-configs/configuration/standalone-full-ha.xml [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/jboss-configs/modules/mariadb/main/module.xml [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/scripts/build-and-start.sh [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/scripts/init-chef.sh [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/scripts/start-jboss-server.sh [new file with mode: 0644]
packages/docker/src/main/docker/docker-files/settings.xml [new file with mode: 0644]
packages/pom.xml [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/automated-tests/create_mso_db-tests.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/default/create_mso_db-default.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/demo-dns/create_mso_db-demo-dns.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/demo-vfw/create_mso_db-demo-vfw.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_create_camunda_admin.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_engine_7.3.0.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_identity_7.3.0.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_updates_7.3.0.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql [new file with mode: 0644]
packages/root-pack-extras/config-resources/mariadb/load-sql-files-tests-automation.sh [new file with mode: 0644]
pom.xml [new file with mode: 0644]
project-configs/code-tools/findbugs_include_filter.xml [new file with mode: 0644]
project-configs/code-tools/oap_checkstyle_1.0.xml [new file with mode: 0644]
project-configs/code-tools/oap_codetemplates_1.0.xml [new file with mode: 0644]
project-configs/code-tools/oap_formatter_1.0.xml [new file with mode: 0644]
project-configs/maven/conf/settings.xml [new file with mode: 0644]
readme.md [new file with mode: 0644]
status-control/pom.xml [new file with mode: 0644]
status-control/src/main/java/org/openecomp/mso/HealthCheckUtils.java [new file with mode: 0644]
status-control/src/main/java/org/openecomp/mso/MsoStatusHandler.java [new file with mode: 0644]
status-control/src/main/java/org/openecomp/mso/MsoStatusUtil.java [new file with mode: 0644]
status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsESTest.java [new file with mode: 0644]
status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsESTestscaffolding.java [new file with mode: 0644]
status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsTest.java [new file with mode: 0644]
status-control/src/test/java/org/openecomp/mso/MsoStatusUtilESTest.java [new file with mode: 0644]
status-control/src/test/java/org/openecomp/mso/MsoStatusUtilESTestscaffolding.java [new file with mode: 0644]
version.properties [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a2314ca
--- /dev/null
@@ -0,0 +1,12 @@
+target
+.settings
+.classpath
+.project
+.buildpath
+.idea
+*.iml
+**/logs/
+**/.evosuite/
+**/debug-logs/
+*.log
+*.tmp
diff --git a/.gitreview b/.gitreview
new file mode 100644 (file)
index 0000000..875ccf8
--- /dev/null
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.openecomp.org
+port=29418
+project=mso.git
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644 (file)
index 0000000..cf1d4b6
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START==========================================
+ * ===================================================================
+ * Copyright © 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============================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ *
+ */
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/README b/adapters/mso-adapter-utils/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/adapters/mso-adapter-utils/pom.xml b/adapters/mso-adapter-utils/pom.xml
new file mode 100644 (file)
index 0000000..2464175
--- /dev/null
@@ -0,0 +1,137 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-adapter-utils</artifactId>
+       <name>mso-adapter-utils</name>
+       <description>Common MSO utilities, including Openstack client wrappers.</description>
+
+       <build>
+               <finalName>${project.artifactId}</finalName>
+               <sourceDirectory>src/main/java</sourceDirectory>
+               <plugins>
+               
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-resources-plugin</artifactId>
+                               <version>2.6</version>
+                               <executions>
+                                       <execution>
+                                               <id>copy-resources</id>
+                                               <phase>validate</phase>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>./src/main/resources/META-INF</directory>
+                                                                       <filtering>false</filtering>
+                                                               </resource>
+                                                       </resources>
+                                                       <outputDirectory>${project.build.directory}/${project.build.finalName}/META-INF/</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.3</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.openecomp.mso.libs.openstack-java-sdk</groupId>
+                       <artifactId>keystone-client</artifactId>
+                       <version>3.2.4</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.libs.openstack-java-sdk</groupId>
+                       <artifactId>heat-client</artifactId>
+                       <version>3.2.4</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.libs.openstack-java-sdk</groupId>
+                       <artifactId>quantum-client</artifactId>
+                       <version>3.2.4</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.libs.openstack-java-sdk.client-connectors</groupId>
+                       <artifactId>http-connector</artifactId>
+                       <version>3.2.4</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>common</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-catalog-db</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>javax.servlet</groupId>
+                       <artifactId>javax.servlet-api</artifactId>
+                       <version>3.1.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.resteasy</groupId>
+                       <artifactId>resteasy-jaxrs</artifactId>
+                       <version>3.0.19.Final</version>
+                       <scope>provided</scope>
+                       <exclusions>
+                       <exclusion>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-api</artifactId>
+                       </exclusion>
+                       <exclusion>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-simple</artifactId>
+                       </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.httpcomponents</groupId>
+                                       <artifactId>httpclient</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency> 
+                       <groupId>org.mockito</groupId> 
+                       <artifactId>mockito-all</artifactId> 
+                       <version>1.10.19</version> 
+                       <scope>test</scope>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.jboss.spec.javax.ejb</groupId>
+                       <artifactId>jboss-ejb-api_3.2_spec</artifactId>
+                       <version>1.0.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.ejb3</groupId>
+                       <artifactId>jboss-ejb3-ext-api</artifactId>
+                       <version>2.2.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+                               <dependency>
+                       <groupId>org.yaml</groupId>
+                       <artifactId>snakeyaml</artifactId>
+                       <version>1.15</version>
+               </dependency>
+               
+       </dependencies>
+</project>
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java
new file mode 100644 (file)
index 0000000..abcea2d
--- /dev/null
@@ -0,0 +1,262 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.cloud;
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.DeserializationConfig;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * JavaBean JSON class for a CloudConfig. This bean maps a JSON-format cloud
+ * configuration file to Java. The CloudConfig contains information about
+ * Openstack cloud configurations (in particular for the NVP/AIC cloud).
+ * It includes:
+ * - CloudIdentity objects, representing DCP nodes (Openstack Identity Service)
+ * - CloudSite objects, representing LCP nodes (Openstack Compute & other services)
+ *
+ * Note that this is only used to access Cloud Configurations loaded from a
+ * JSON config file, so there are no explicit property setters.
+ *
+ * This class also contains methods to query cloud sites and/or identity
+ * services by ID.
+ *
+ */
+
+@JsonRootName("cloud_config")
+public class CloudConfig {
+
+    @JsonProperty("identity_services")
+    private Map <String, CloudIdentity> identityServices = new HashMap <String, CloudIdentity> ();
+    @JsonProperty("cloud_sites")
+    private Map <String, CloudSite> cloudSites = new HashMap <String, CloudSite> ();
+
+    private static ObjectMapper mapper = new ObjectMapper ();
+
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+    protected String configFilePath;
+
+    protected int refreshTimerInMinutes;
+
+    public CloudConfig () {
+        mapper.enable (DeserializationConfig.Feature.UNWRAP_ROOT_VALUE);
+         mapper.enable (DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+    }
+
+       /**
+        * Get a Map of all IdentityServices that have been loaded.
+        * @return the Map
+        */
+    public synchronized Map <String, CloudIdentity> getIdentityServices () {
+        return identityServices;
+    }
+
+       /**
+        * Get a Map of all CloudSites that have been loaded.
+        * @return the Map
+        */
+       public synchronized Map <String, CloudSite> getCloudSites () {
+               return cloudSites;
+       }
+
+       /**
+        * Get a specific CloudSites, based on an ID.  The ID is first checked against
+        * the regions, and if no match is found there, then against individual entries
+        * to try and find one with a CLLI that matches the ID and an AIC version of 2.5.
+        * @param id the ID to match
+        * @return a CloudSite, or null of no match found
+        */
+       public synchronized CloudSite getCloudSite (String id) {
+               if (id != null) {
+                       if (cloudSites.containsKey (id)) {
+                               return cloudSites.get (id);
+                       }
+                       // check for id == CLLI now as well
+                       return getCloudSiteWithClli(id, "2.5");
+               }
+               return null;
+       }
+
+       /**
+        * Get a specific CloudSites, based on a CLLI and (optional) version, which will be matched
+        * against the aic_version field of the CloudSite.
+        * @param clli the CLLI to match
+        * @param version the version to match; may be null in which case any version matches
+        * @return a CloudSite, or null of no match found
+        */
+       public synchronized CloudSite getCloudSiteWithClli(String clli, String version) {
+               if (clli != null) {
+               // New with 1610 - find cloud site called "DEFAULT" - return that object, 
+               // with the name modified to match what they asked for. We're looping thru
+                       // the cloud sites anyway - so save off the default one in case we need it.
+                       CloudSite defaultCloudSite = null;
+               for (CloudSite cs : cloudSites.values()) {
+                       if (cs.getClli() != null && clli.equals(cs.getClli())) {
+                               if (version == null || version.equals(cs.getAic_version())) {
+                               return cs;
+                               }
+                       } else if (cs.getId().equalsIgnoreCase("default")) {
+                               // save it off in case we need it
+                               defaultCloudSite = cs.clone();
+                       }
+               }
+               // If we get here - we didn't find a match - so return the default cloud site
+            if (defaultCloudSite != null) {
+                defaultCloudSite.setRegionId(clli);
+                defaultCloudSite.setId(clli);
+            }
+               return defaultCloudSite;
+               }
+        return null;
+       }
+
+       /**
+        * Get a specific CloudIdentity, based on an ID.
+        * @param id the ID to match
+        * @return a CloudIdentity, or null of no match found
+        */
+       public synchronized CloudIdentity getIdentityService (String id) {
+               if (identityServices.containsKey (id)) {
+                       return identityServices.get (id);
+               }
+               return null;
+       }
+
+    protected synchronized void reloadPropertiesFile() throws JsonParseException, JsonMappingException, IOException  {
+               this.loadCloudConfig(this.configFilePath, this.refreshTimerInMinutes);
+       }
+
+    protected synchronized void loadCloudConfig (String configFile, int refreshTimer) throws JsonParseException, JsonMappingException, IOException {
+       FileReader reader=null;
+       configFilePath=configFile;
+       this.refreshTimerInMinutes = refreshTimer;
+       CloudConfig cloudConfig = null;
+       try {
+               reader = new FileReader (configFile);
+               // Parse the JSON input into a CloudConfig
+
+               cloudConfig = mapper.readValue (reader, CloudConfig.class);
+
+               this.cloudSites = cloudConfig.cloudSites;
+               this.identityServices = cloudConfig.identityServices;
+
+               // Copy Cloud Identity IDs to CloudIdentity objects
+               for (Entry <String, CloudIdentity> entry : cloudConfig.getIdentityServices ().entrySet ()) {
+                   entry.getValue ().setId (entry.getKey ());
+               }
+
+               // Copy Cloud Site IDs to CloudSite objects, and set up internal
+               // pointers to their corresponding identity service.
+               for (Entry <String, CloudSite> entry : cloudConfig.getCloudSites ().entrySet ()) {
+                   CloudSite s = entry.getValue ();
+                   s.setId (entry.getKey ());
+                   s.setIdentityService (cloudConfig.getIdentityService (s.getIdentityServiceId ()));
+               }
+       } finally {
+               try {
+                               if (reader != null) {
+                                       reader.close();
+                               }
+                       } catch (IOException e) {
+                               LOGGER.debug("Exception while closing reader for file:" + configFilePath, e);
+                       }
+       }
+    }
+
+       public String getConfigFilePath() {
+               return configFilePath;
+       }
+
+       @Override
+       public synchronized CloudConfig clone() {
+               CloudConfig ccCopy = new CloudConfig();
+               for (Entry<String,CloudIdentity> e:identityServices.entrySet()) {
+
+                       ccCopy.identityServices.put(e.getKey(), e.getValue().clone());
+               }
+
+               for (Entry<String,CloudSite> e:cloudSites.entrySet()) {
+
+                       ccCopy.cloudSites.put(e.getKey(), e.getValue().clone());
+               }
+
+               ccCopy.configFilePath = this.configFilePath;
+
+               ccCopy.refreshTimerInMinutes = this.refreshTimerInMinutes;
+
+               return ccCopy;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((cloudSites == null) ? 0 : cloudSites.hashCode());
+               result = prime * result + ((configFilePath == null) ? 0 : configFilePath.hashCode());
+               result = prime * result + ((identityServices == null) ? 0 : identityServices.hashCode());
+               result = prime * result + refreshTimerInMinutes;
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               CloudConfig other = (CloudConfig) obj;
+               if (cloudSites == null) {
+                       if (other.cloudSites != null)
+                               return false;
+               } else if (!cloudSites.equals(other.cloudSites))
+                       return false;
+               if (configFilePath == null) {
+                       if (other.configFilePath != null)
+                               return false;
+               } else if (!configFilePath.equals(other.configFilePath))
+                       return false;
+               if (identityServices == null) {
+                       if (other.identityServices != null)
+                               return false;
+               } else if (!identityServices.equals(other.identityServices))
+                       return false;
+               if (refreshTimerInMinutes != other.refreshTimerInMinutes)
+                       return false;
+               return true;
+       }
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigFactory.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfigFactory.java
new file mode 100644 (file)
index 0000000..6ee6721
--- /dev/null
@@ -0,0 +1,226 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.cloud;
+
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import javax.ejb.ConcurrencyManagement;
+import javax.ejb.ConcurrencyManagementType;
+import javax.ejb.LocalBean;
+import javax.ejb.Schedule;
+import javax.ejb.Singleton;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.utils.MsoHeatUtils;
+import org.openecomp.mso.openstack.utils.MsoKeystoneUtils;
+import org.openecomp.mso.openstack.utils.MsoNeutronUtils;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.logger.MessageEnum;
+
+/**
+ * This class returns a cloud Config instances
+ *
+ *
+ */
+
+@Singleton(name = "CloudConfigFactory")
+@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
+@LocalBean
+@Path("/cloud")
+public class CloudConfigFactory implements Serializable {
+
+    private static final long serialVersionUID = 2956662716453261085L;
+
+    private static CloudConfig cloudConfigCache = new CloudConfig ();
+
+    protected static String prefixMsoPropertiesPath = System.getProperty ("mso.config.path");
+
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+    private static int refreshTimer;
+
+    private static final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock ();
+
+    static {
+        if (prefixMsoPropertiesPath == null) {
+            prefixMsoPropertiesPath = "";
+        }
+    }
+
+    public void initializeCloudConfig (String filePath, int refreshTimer) {
+
+        rwl.writeLock ().lock ();
+        try {
+            cloudConfigCache.loadCloudConfig (prefixMsoPropertiesPath + filePath, refreshTimer);
+            LOGGER.info (MessageEnum.RA_CONFIG_LOAD, prefixMsoPropertiesPath + filePath, "", "");
+        } catch (JsonParseException e) {
+            LOGGER.error (MessageEnum.RA_CONFIG_EXC, "Error parsing cloud config file " + filePath, "", "", MsoLogger.ErrorCode.DataError, "Exception - JsonParseException", e);
+        } catch (JsonMappingException e) {
+            LOGGER.error (MessageEnum.RA_CONFIG_EXC, "Error parsing cloud config file " + filePath, "", "", MsoLogger.ErrorCode.DataError, "Exception - JsonMappingException", e);
+        } catch (IOException e) {
+            LOGGER.error (MessageEnum.RA_CONFIG_NOT_FOUND, filePath, "", "", MsoLogger.ErrorCode.DataError, "Exception - config not found", e);
+        } finally {
+            rwl.writeLock ().unlock ();
+        }
+    }
+
+    public void changeMsoPropertiesFilePath (String newMsoPropPath) throws MsoPropertiesException {
+        rwl.writeLock ().lock ();
+        try {
+            CloudConfigFactory.cloudConfigCache.configFilePath = prefixMsoPropertiesPath + newMsoPropPath;
+        } finally {
+            rwl.writeLock ().unlock ();
+        }
+    }
+
+    public CloudConfigFactory () {
+    }
+
+    public CloudConfig getCloudConfig () {
+        rwl.readLock ().lock ();
+        try {
+            return cloudConfigCache.clone ();
+        } finally {
+            rwl.readLock ().unlock ();
+        }
+    }
+
+    /**
+     * This method is not intended to be called, it's used to refresh the config
+     * automatically
+     *
+     * @return true if Properties have been reloaded, false otherwise
+     */
+    @Schedule(minute = "*/1", hour = "*", persistent = false)
+    public void reloadCloudConfig () {
+
+        try {
+            if (!rwl.writeLock ().tryLock () && !rwl.writeLock ().tryLock (30L, TimeUnit.SECONDS)) {
+                LOGGER.debug ("Busy write lock on mso cloud config factory, skipping the reloading");
+                return;
+            }
+        } catch (InterruptedException e1) {
+            LOGGER.debug ("Interrupted while trying to acquire write lock on cloud config factory, skipping the reloading");
+            Thread.currentThread ().interrupt ();
+            return;
+        }
+        try {
+            //LOGGER.debug ("Processing a reload of the mso properties file entries");
+            try {
+
+                if (refreshTimer <= 1) {
+                       CloudConfig oldCloudConfig = cloudConfigCache.clone();
+                    cloudConfigCache.reloadPropertiesFile ();
+                    refreshTimer = cloudConfigCache.refreshTimerInMinutes;
+                    if (!cloudConfigCache.equals(oldCloudConfig)) {
+                       LOGGER.info (MessageEnum.RA_CONFIG_LOAD, prefixMsoPropertiesPath + cloudConfigCache.configFilePath, "", "");
+                    }
+
+                } else {
+                    --refreshTimer;
+                }
+
+            } catch (JsonParseException e) {
+                LOGGER.error (MessageEnum.RA_CONFIG_EXC,
+                              "Error parsing cloud config file " + cloudConfigCache.configFilePath, "", "", MsoLogger.ErrorCode.DataError, "Exception - JsonParseException",
+                              e);
+            } catch (JsonMappingException e) {
+                LOGGER.error (MessageEnum.RA_CONFIG_EXC,
+                              "Error parsing cloud config file " + cloudConfigCache.configFilePath, "", "", MsoLogger.ErrorCode.DataError, "Exception - JsonMappingException",
+                              e);
+            } catch (IOException e) {
+                LOGGER.error (MessageEnum.RA_CONFIG_NOT_FOUND, cloudConfigCache.configFilePath, "", "", MsoLogger.ErrorCode.DataError, "Exception - config not found", e);
+            }
+        } catch (Exception e) {
+            LOGGER.error (MessageEnum.LOAD_PROPERTIES_FAIL, "Unknown. Global issue while reloading", "", "", MsoLogger.ErrorCode.DataError, "Exception - Global issue while reloading\"", e);
+        } finally {
+            rwl.writeLock ().unlock ();
+        }
+    }
+
+    @GET
+    @Path("/showConfig")
+    @Produces("text/plain")
+    public Response showCloudConfig () {
+        CloudConfig cloudConfig = this.getCloudConfig ();
+
+        StringBuffer response = new StringBuffer ();
+        response.append ("Cloud Sites:\n");
+        for (CloudSite site : cloudConfig.getCloudSites ().values ()) {
+            response.append (site.toString () + "\n");
+        }
+
+        response.append ("\n\nCloud Identity Services:\n");
+        for (CloudIdentity identity : cloudConfig.getIdentityServices ().values ()) {
+            response.append (identity.toString () + "\n");
+        }
+
+        return Response.status (200).entity (response).build ();
+    }
+
+    @GET
+    @Path("/resetClientCaches")
+    @Produces("text/plain")
+    public Response resetClientCaches () {
+        // Reset all cached clients/credentials
+        MsoKeystoneUtils.adminCacheReset ();
+        MsoHeatUtils.heatCacheReset ();
+        MsoNeutronUtils.neutronCacheReset ();
+
+        String response = "Client caches reset.  All entries removed.";
+        return Response.status (200).entity (response).build ();
+    }
+
+    @GET
+    @Path("/cleanupClientCaches")
+    @Produces("text/plain")
+    public Response cleanupClientCaches () {
+        // Reset all cached clients/credentials
+        MsoKeystoneUtils.adminCacheCleanup ();
+        MsoHeatUtils.heatCacheCleanup ();
+        MsoNeutronUtils.neutronCacheCleanup ();
+
+        String response = "Client caches cleaned up.  All expired entries removed";
+        return Response.status (200).entity (response).build ();
+    }
+
+    @GET
+    @Path("/encryptPassword/{pwd}")
+    @Produces("text/plain")
+    public Response encryptPassword (@PathParam("pwd") String pwd) {
+        String encryptedPassword = CloudIdentity.encryptPassword (pwd);
+
+        String response = "Encrypted Password = " + encryptedPassword;
+        return Response.status (200).entity (response).build ();
+    }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java
new file mode 100644 (file)
index 0000000..a777e41
--- /dev/null
@@ -0,0 +1,316 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.cloud;
+
+import java.security.GeneralSecurityException;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import com.woorea.openstack.keystone.model.authentication.RackspaceAuthentication;
+import com.woorea.openstack.keystone.model.authentication.UsernamePassword;
+import org.openecomp.mso.utils.CryptoUtils;
+import com.woorea.openstack.keystone.model.Authentication;
+
+/**
+ * JavaBean JSON class for a CloudIdentity. This bean represents a cloud identity
+ * service instance (i.e. a DCP node) in the NVP/AIC cloud. It will be loaded via
+ * CloudConfig object, of which it is a component (a CloudConfig JSON configuration
+ * file may contain multiple CloudIdentity definitions).
+ *
+ * Note that this is only used to access Cloud Configurations loaded from a
+ * JSON config file, so there are no explicit setters.
+ *
+ */
+public class CloudIdentity {
+
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+    
+    public enum IdentityServerType {KEYSTONE};
+
+    public enum IdentityAuthenticationType { USERNAME_PASSWORD, RACKSPACE_APIKEY };
+    
+    @JsonProperty
+    private String id;
+    @JsonProperty("identity_url")
+    private String identityUrl;
+    @JsonProperty("mso_id")
+    private String msoId;
+    @JsonProperty("mso_pass")
+    private String msoPass;
+    @JsonProperty("admin_tenant")
+    private String adminTenant;
+    @JsonProperty("member_role")
+    private String memberRole;
+    @JsonProperty("tenant_metadata")
+    private Boolean tenantMetadata;
+    @JsonProperty("identity_server_type")
+    private IdentityServerType identityServerType;
+    @JsonProperty("identity_authentication_type")
+    private IdentityAuthenticationType identityAuthenticationType;
+    
+    private static String cloudKey = "aa3871669d893c7fb8abbcda31b88b4f";
+
+    public CloudIdentity () {
+    }
+
+    public String getId () {
+        return id;
+    }
+
+    public void setId (String id) {
+        this.id = id;
+    }
+
+    //DEPRECATED
+    public String getKeystoneUrl () throws MsoException {
+       if (this.identityServerType.equals(IdentityServerType.KEYSTONE))
+               return this.identityUrl;
+       else
+               return null;
+    }
+    
+    public String getKeystoneUrl (String regionId, String msoPropID) throws MsoException {
+       if (IdentityServerType.KEYSTONE.equals(this.identityServerType)) {
+               return this.identityUrl;
+       }
+       else {
+               return null;
+       }
+    }
+    
+    public Authentication getAuthentication () throws MsoException {
+       if (IdentityAuthenticationType.RACKSPACE_APIKEY.equals(this.identityAuthenticationType)) {
+               return new RackspaceAuthentication (this.getMsoId (),this.getMsoPass ());
+       }
+       else {
+               // Use default case
+               return new UsernamePassword (this.getMsoId (),this.getMsoPass ());
+       }
+               
+    }
+
+    public void setKeystoneUrl (String url) {
+       if (IdentityServerType.KEYSTONE.equals(this.identityServerType)) {
+               this.identityUrl = url; 
+       }
+    }
+    
+    public String getIdentityUrl() {
+       return this.identityUrl;
+    }
+    public void setIdentityUrl(String url) {
+       this.identityUrl = url;
+    }
+
+    public String getMsoId () {
+        return msoId;
+    }
+
+    public void setMsoId (String id) {
+        this.msoId = id;
+    }
+
+    public String getMsoPass () {
+        try {
+            return CryptoUtils.decrypt (msoPass, cloudKey);
+        } catch (GeneralSecurityException e) {
+            LOGGER.error (MessageEnum.RA_GENERAL_EXCEPTION, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in getMsoPass", e);
+            return null;
+        }
+    }
+
+    public void setMsoPass (String pwd) {
+        this.msoPass = pwd;
+    }
+
+    public String getAdminTenant () {
+        return adminTenant;
+    }
+
+    public void setAdminTenant (String tenant) {
+        this.adminTenant = tenant;
+    }
+
+    public String getMemberRole () {
+        return memberRole;
+    }
+
+    public void setMemberRole (String role) {
+        this.memberRole = role;
+    }
+
+    public boolean hasTenantMetadata () {
+        return tenantMetadata;
+    }
+
+    public void setTenantMetadata (boolean meta) {
+        this.tenantMetadata = meta;
+    }
+    
+    public IdentityServerType getIdentityServerType() {
+       return this.identityServerType;
+    }
+    public void setIdentityServerType(IdentityServerType ist) {
+       this.identityServerType = ist;
+    }
+    public String getIdentityServerTypeAsString() {
+       return this.identityServerType.toString();
+    }
+    /**
+        * @return the identityAuthenticationType
+        */
+       public IdentityAuthenticationType getIdentityAuthenticationType() {
+               return identityAuthenticationType;
+       }
+
+       /**
+        * @param identityAuthenticationType the identityAuthenticationType to set
+        */
+       public void setIdentityAuthenticationType(IdentityAuthenticationType identityAuthenticationType) {
+               this.identityAuthenticationType = identityAuthenticationType;
+       }
+       
+       @Override
+    public String toString () {
+        StringBuilder stringBuilder = new StringBuilder ();
+        stringBuilder.append ("Cloud Identity Service: id=")
+                     .append (id)
+                     .append (", identityUrl=")
+                     .append (this.identityUrl)
+                     .append (", msoId=")
+                     .append (msoId)
+                     .append (", adminTenant=")
+                     .append (adminTenant)
+                     .append (", memberRole=")
+                     .append (memberRole)
+                     .append (", tenantMetadata=")
+                     .append (tenantMetadata)
+                     .append (", identityServerType=")
+                     .append (identityServerType.toString())
+                     .append (", identityAuthenticationType=")
+                     .append (identityAuthenticationType.toString());
+        
+        return stringBuilder.toString ();
+    }
+
+    public static String encryptPassword (String msoPass) {
+        try {
+            return CryptoUtils.encrypt (msoPass, cloudKey);
+        } catch (GeneralSecurityException e) {
+            LOGGER.error (MessageEnum.RA_GENERAL_EXCEPTION, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in encryptPassword", e);
+            return null;
+        }
+    }
+
+
+       @Override
+       public CloudIdentity clone() {
+               CloudIdentity cloudIdentityCopy = new CloudIdentity();
+
+               cloudIdentityCopy.id = this.id;
+               cloudIdentityCopy.identityUrl = this.identityUrl;
+               cloudIdentityCopy.msoId = this.msoId;
+               cloudIdentityCopy.msoPass = this.msoPass;
+               cloudIdentityCopy.adminTenant = this.adminTenant;
+               cloudIdentityCopy.memberRole = this.memberRole;
+               cloudIdentityCopy.tenantMetadata = this.tenantMetadata;
+               cloudIdentityCopy.identityServerType = this.identityServerType;
+               cloudIdentityCopy.identityAuthenticationType = this.identityAuthenticationType;
+
+               return cloudIdentityCopy;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((adminTenant == null) ? 0 : adminTenant.hashCode());
+               result = prime * result + ((id == null) ? 0 : id.hashCode());
+               result = prime * result + ((identityUrl == null) ? 0 : identityUrl.hashCode());
+               result = prime * result + ((memberRole == null) ? 0 : memberRole.hashCode());
+               result = prime * result + ((msoId == null) ? 0 : msoId.hashCode());
+               result = prime * result + ((msoPass == null) ? 0 : msoPass.hashCode());
+               result = prime * result + ((tenantMetadata == null) ? 0 : tenantMetadata.hashCode());
+               result = prime * result + ((identityServerType == null) ? 0 : identityServerType.hashCode());
+               result = prime * result + ((identityAuthenticationType == null) ? 0 : identityAuthenticationType.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               CloudIdentity other = (CloudIdentity) obj;
+               if (adminTenant == null) {
+                       if (other.adminTenant != null)
+                               return false;
+               } else if (!adminTenant.equals(other.adminTenant))
+                       return false;
+               if (id == null) {
+                       if (other.id != null)
+                               return false;
+               } else if (!id.equals(other.id))
+                       return false;
+               if (identityUrl == null) {
+                       if (other.identityUrl != null)
+                               return false;
+               } else if (!identityUrl.equals(other.identityUrl))
+                       return false;
+               if (memberRole == null) {
+                       if (other.memberRole != null)
+                               return false;
+               } else if (!memberRole.equals(other.memberRole))
+                       return false;
+               if (msoId == null) {
+                       if (other.msoId != null)
+                               return false;
+               } else if (!msoId.equals(other.msoId))
+                       return false;
+               if (msoPass == null) {
+                       if (other.msoPass != null)
+                               return false;
+               } else if (!msoPass.equals(other.msoPass))
+                       return false;
+               if (tenantMetadata == null) {
+                       if (other.tenantMetadata != null)
+                               return false;
+               } else if (!tenantMetadata.equals(other.tenantMetadata))
+                       return false;
+               if (identityServerType == null) {
+                       if (other.getIdentityServerType() != null)
+                               return false;
+               } else if (!identityServerType.equals(other.getIdentityServerType()))
+                       return false;
+               if (identityAuthenticationType == null) {
+                       if (other.getIdentityAuthenticationType() != null)
+                               return false;
+               } else if (!identityAuthenticationType.equals(other.getIdentityAuthenticationType()))
+                       return false;
+               
+               return true;
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudSite.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudSite.java
new file mode 100644 (file)
index 0000000..16963de
--- /dev/null
@@ -0,0 +1,160 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.cloud;
+
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+/**
+ * JavaBean JSON class for a CloudSite.  This bean represents a cloud location
+ * (i.e. and LCP node) in the NVP/AIC cloud.  It will be loaded via CloudConfig
+ * object, of which it is a component (a CloudConfig JSON configuration file
+ * will contain multiple CloudSite definitions).
+ *
+ * Note that this is only used to access Cloud Configurations loaded from a
+ * JSON config file, so there are no explicit setters.
+ *
+ */
+public class CloudSite {
+       @JsonProperty
+       private String id;
+       @JsonProperty("region_id")
+       private String regionId;
+       @JsonProperty("identity_service_id")
+       private String identityServiceId;
+       @JsonProperty("aic_version")
+       private String aic_version;
+       @JsonProperty("clli")
+       private String clli;
+
+       // Derived property (set by CloudConfig loader based on identityServiceId)
+       private CloudIdentity identityService;
+
+       public CloudSite() {}
+       
+       public String getId() {
+               return id;
+       }
+       public void setId(String id) {
+               this.id = id;
+       }
+       
+       public String getRegionId() {
+               return regionId;
+       }
+       
+       public void setRegionId(String regionId) {
+               this.regionId = regionId;
+       }
+
+       public String getIdentityServiceId() {
+               return identityServiceId;
+       }
+
+       public CloudIdentity getIdentityService () {
+               return identityService;
+       }
+
+       public void setIdentityService (CloudIdentity identity) {
+               this.identityService = identity;
+       }
+       
+       public String getAic_version() {
+               return aic_version;
+       }
+
+       public void setAic_version(String aic_version) {
+               this.aic_version = aic_version;
+       }
+
+       public String getClli() {
+               return clli;
+       }
+
+       public void setClli(String clli) {
+               this.clli = clli;
+       }
+
+       @Override
+       public String toString() {
+               return "CloudSite: id=" + id +
+                       ", regionId=" + regionId +
+                       ", identityServiceId=" + identityServiceId +
+                       ", aic_version=" + aic_version +
+                       ", clli=" + clli;
+       }
+
+       @Override
+       public CloudSite clone() {
+               CloudSite cloudSiteCopy = new CloudSite();
+               cloudSiteCopy.id = this.id;
+               cloudSiteCopy.regionId = this.regionId;
+               cloudSiteCopy.identityServiceId = this.identityServiceId;
+               cloudSiteCopy.aic_version = this.aic_version;
+               cloudSiteCopy.clli = this.clli;
+               cloudSiteCopy.identityService = this.identityService.clone();
+               return cloudSiteCopy;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((id == null) ? 0 : id.hashCode());
+               result = prime * result + ((identityService == null) ? 0 : identityService.hashCode());
+               result = prime * result + ((identityServiceId == null) ? 0 : identityServiceId.hashCode());
+               result = prime * result + ((regionId == null) ? 0 : regionId.hashCode());
+               result = prime * result + ((aic_version == null) ? 0 : aic_version.hashCode());
+               result = prime * result + ((clli == null) ? 0 : clli.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               CloudSite other = (CloudSite) obj;
+               if (!cmp(id, other.id))
+                       return false;
+               if (!cmp(regionId, other.regionId))
+                       return false;
+               if (!cmp(identityServiceId, other.identityServiceId))
+                       return false;
+               if (!cmp(aic_version, other.aic_version))
+                       return false;
+               if (!cmp(clli, other.clli))
+                       return false;
+               if (!cmp(identityService, other.identityService))
+                       return false;
+               return true;
+       }
+       private boolean cmp(Object a, Object b) {
+               if (a == null) {
+                       return (b == null);
+               } else {
+                       return a.equals(b);
+               }
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java
new file mode 100644 (file)
index 0000000..8c51c74
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+/*
+ * Enum status values to mirror the Openstack Heat stack status values
+ */
+public enum HeatStatus {
+       INIT, CREATED, NOTFOUND, FAILED, BUILDING, DELETING, UNKNOWN, UPDATING, UPDATED
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java
new file mode 100644 (file)
index 0000000..95a58f3
--- /dev/null
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+
+import java.util.Map;
+
+/**
+ * This bean class represents the Openstack tenant properties that are
+ * needed by MSO.
+ * 
+ *
+ */
+public class MsoTenant {
+       private String tenantId;
+       private String tenantName;
+       private Map<String,String> metadata;
+       
+       public MsoTenant() {}
+       
+       public MsoTenant (String id, String name, Map<String,String> metadata) {
+               this.tenantId = id;
+               this.tenantName = name;
+               this.metadata = metadata;
+       }
+       
+       public String getTenantId() {
+               return tenantId;
+       }
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+       
+       public String getTenantName() {
+               return tenantName;
+       }
+       public void setTenantName(String tenantName) {
+               this.tenantName = tenantName;
+       }
+       
+       public Map<String, String> getMetadata() {
+               return metadata;
+       }
+       public void setMetadata(Map<String, String> metadata) {
+               this.metadata = metadata;
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
new file mode 100644 (file)
index 0000000..11bf63b
--- /dev/null
@@ -0,0 +1,177 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import com.woorea.openstack.quantum.model.Network;
+import com.woorea.openstack.quantum.model.Segment;
+
+/*
+ * This Java bean class relays Network details (including status) to ActiveVOS processes.
+ *
+ * This bean is returned by all Network-specific adapter operations (create, query, delete)
+ */
+
+public class NetworkInfo {
+       // Set defaults for everything
+       private String name = "";
+       private String id = "";
+       private NetworkStatus status = NetworkStatus.UNKNOWN;
+       private String provider = "";
+       private List<Integer> vlans = new ArrayList<Integer>();
+       private List<String> subnets = new ArrayList<String>();
+       private String shared = "";
+
+       static Map<String,NetworkStatus> NetworkStatusMap;
+       static {
+               NetworkStatusMap = new HashMap<String,NetworkStatus>();
+               NetworkStatusMap.put("ACTIVE", NetworkStatus.ACTIVE);
+               NetworkStatusMap.put("DOWN", NetworkStatus.DOWN);
+               NetworkStatusMap.put("BUILD", NetworkStatus.BUILD);
+               NetworkStatusMap.put("ERROR", NetworkStatus.ERROR);
+       }
+
+       public NetworkInfo () {
+       }
+
+       public NetworkInfo (String name, NetworkStatus status) {
+               this.name = name;
+               this.id = name; // Don't have an ID, so just use name
+               this.status = status;
+       }
+
+       /**
+        * Capture the data from a Neutron Network object.
+        *
+        * For MSO, there are assumptions regarding all networks.
+        * - Everything will be a provider network
+        * - All provider networks are VLANs
+        * - Multiple VLANs are supported, and indicated by multi-provider segments.
+        *   Each will have the same physical network & network type "vlan".
+        *
+        * @param network
+        */
+       public NetworkInfo (Network network)
+       {
+               if (network == null) {
+                       this.status = NetworkStatus.NOTFOUND;
+                       return;
+               }
+
+               this.name = network.getName();
+               this.id = network.getId();
+
+               if (network.getStatus() == null) {
+                       // Can this happen on a newly created network?
+                       this.status = NetworkStatus.UNKNOWN;
+               } else if (NetworkStatusMap.containsKey(network.getStatus())) {
+                       this.status = NetworkStatusMap.get(network.getStatus());
+               } else {
+                       this.status = NetworkStatus.UNKNOWN;
+               }
+
+               if (network.getProviderPhysicalNetwork() != null) {
+                       this.provider = network.getProviderPhysicalNetwork();
+                       if (network.getProviderNetworkType().equals("vlan")) {
+                this.vlans.add(network.getProviderSegmentationId());
+            }
+               }
+               else if (network.getSegments() != null && network.getSegments().size() > 0) {
+                       Segment s = network.getSegments().get(0);
+                       this.provider = s.getProviderPhysicalNetwork();
+                       if (s.getProviderNetworkType().equals("vlan")) {
+                for (Segment s1 : network.getSegments()) {
+                                       this.vlans.add(s1.getProviderSegmentationId());
+                               }
+            }
+               }
+               this.subnets = network.getSubnets();
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName (String name) {
+               this.name = name;
+       }
+
+       public String getId() {
+               return id;
+       }
+
+       public void setId (String id) {
+               this.id = id;
+       }
+
+       public NetworkStatus getStatus() {
+               return status;
+       }
+
+       public void setStatus (NetworkStatus status) {
+               this.status = status;
+       }
+
+       public String getProvider() {
+               return provider;
+       }
+
+       public void setProvider (String provider) {
+               this.provider = provider;
+       }
+
+       public List<Integer> getVlans () {
+               return vlans;
+       }
+
+       public void setVlans (List<Integer> vlans) {
+               this.vlans = vlans;
+       }
+
+       public List<String> getSubnets () {
+               return subnets;
+       }
+
+       public void setSubnets (List<String> subnets) {
+               this.subnets = subnets;
+       }
+
+       public String getShared() {
+               return shared;
+       }
+
+       public void setShared(String shared) {
+               this.shared = shared;
+       }
+
+       @Override
+    public String toString () {
+               return "Network: name=" + name + ",id=" + id + ",status=" + status +
+                               ",provider=" + provider + ",vlans=" + vlans + ",subnets=" + subnets + ",shared=" + shared;
+       }
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java
new file mode 100644 (file)
index 0000000..11a74d4
--- /dev/null
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+import java.util.List;
+
+import org.openecomp.mso.entity.MsoRequest;
+
+/**
+ * Javabean representing the rollback criteria following a "Create Network"
+ * or "Update Network" operation.  This structure can be passed back to the
+ * "Rollback Network" operation to undo the effects of the create/update.
+ *
+ * Once a network is created, the only possible update through MSO is to
+ * the set of VLANs supported by the network.  The vlans attribute of the
+ * rollback object contains the previous VLANs before update.
+ *
+ *
+ */
+public class NetworkRollback {
+       private String networkId;
+       private String neutronNetworkId;
+       private String networkStackId;
+       private String tenantId;
+       private String cloudId;
+       private String networkType;
+       private boolean networkCreated = false;
+       // Previous values for updates
+       private String networkName = null;
+       private String physicalNetwork = null;
+       private List<Integer> vlans = null;
+       private MsoRequest msoRequest;
+
+       public String getNetworkId() {
+               return networkId;
+       }
+       public void setNetworkId(String networkId) {
+               this.networkId = networkId;
+       }
+
+       public String getNeutronNetworkId() {
+               return neutronNetworkId;
+       }
+       public void setNeutronNetworkId(String neutronNetworkId) {
+               this.neutronNetworkId = neutronNetworkId;
+       }
+       
+       public String getNetworkStackId() {
+               return networkStackId;
+       }
+       public void setNetworkStackId(String networkStackId) {
+               this.networkStackId = networkStackId;
+       }
+       public String getTenantId() {
+               return tenantId;
+       }
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getCloudId() {
+               return cloudId;
+       }
+       public void setCloudId(String cloudId) {
+               this.cloudId = cloudId;
+       }
+
+       public String getNetworkType() {
+               return networkType;
+       }
+       public void setNetworkType(String networkType) {
+               this.networkType = networkType;
+       }
+
+       public boolean getNetworkCreated() {
+               return networkCreated;
+       }
+       public void setNetworkCreated(boolean networkCreated) {
+               this.networkCreated = networkCreated;
+       }
+
+       public String getNetworkName() {
+               return networkName;
+       }
+       public void setNetworkName(String networkName) {
+               this.networkName = networkName;
+       }
+
+       public String getPhysicalNetwork() {
+               return physicalNetwork;
+       }
+       public void setPhysicalNetwork(String physicalNetwork) {
+               this.physicalNetwork = physicalNetwork;
+       }
+
+       public List<Integer> getVlans () {
+               return vlans;
+       }
+       public void setVlans (List<Integer> vlans) {
+               this.vlans = vlans;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+       public void setMsoRequest (MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+       
+       @Override
+       public String toString() {
+               return "NetworkRollback [networkId=" + networkId
+                               + ", neutronNetworkId=" + neutronNetworkId + ", networkStackId="
+                               + networkStackId + ", tenantId=" + tenantId + ", cloudId="
+                               + cloudId + ", networkType=" + networkType
+                               + ", networkCreated=" + networkCreated + ", networkName=" + networkName
+                               + ", physicalNetwork=" + physicalNetwork + "]";
+       }
+    
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java
new file mode 100644 (file)
index 0000000..f1a5dad
--- /dev/null
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+/**
+ * Enum status values to mirror the Openstack Neutron
+ * network status values
+ */
+public enum NetworkStatus {
+       NOTFOUND, ACTIVE, DOWN, BUILD, ERROR, UNKNOWN
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Pool.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Pool.java
new file mode 100644 (file)
index 0000000..ae179c4
--- /dev/null
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "start",
+    "end"
+})
+public class Pool {
+
+       private String start;
+       private String end;
+
+       /**
+        * @return the start
+        */
+       public String getStart() {
+               return start;
+       }
+       /**
+        * @param start the start to set
+        */
+       public void setStart(String start) {
+               this.start = start;
+       }
+       /**
+        * @return the end
+        */
+       public String getEnd() {
+               return end;
+       }
+       /**
+        * @param end the end to set
+        */
+       public void setEnd(String end) {
+               this.end = end;
+       }
+
+       @Override
+       public String toString() {
+               return "Allocation_pool [start=" + start + ", end=" + end + "]";
+       }
+
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java
new file mode 100644 (file)
index 0000000..cdf4b2c
--- /dev/null
@@ -0,0 +1,155 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+import java.util.Map;
+import java.util.HashMap;
+
+import com.woorea.openstack.heat.model.Stack;
+
+/*
+ * This Java bean class relays Heat stack status information to ActiveVOS processes.
+ * 
+ * This bean is returned by all Heat-specific adapter operations (create, query, delete)
+ */
+
+public class StackInfo {
+       // Set defaults for everything
+       private String name = "";
+       private String canonicalName = "";
+       private HeatStatus status = HeatStatus.UNKNOWN;
+       private String statusMessage = "";
+       private Map<String,Object> outputs = new HashMap<String,Object>();
+       private Map<String,Object> parameters = new HashMap<String,Object>();
+       
+       static Map<String,HeatStatus> HeatStatusMap;
+       static {
+               HeatStatusMap = new HashMap<String,HeatStatus>();
+               HeatStatusMap.put("CREATE_IN_PROGRESS", HeatStatus.BUILDING);
+               HeatStatusMap.put("CREATE_COMPLETE", HeatStatus.CREATED);
+               HeatStatusMap.put("CREATE_FAILED", HeatStatus.FAILED);
+               HeatStatusMap.put("DELETE_IN_PROGRESS", HeatStatus.DELETING);
+               HeatStatusMap.put("DELETE_COMPLETE", HeatStatus.NOTFOUND);
+               HeatStatusMap.put("DELETE_FAILED", HeatStatus.FAILED);
+               HeatStatusMap.put("UPDATE_IN_PROGRESS", HeatStatus.UPDATING);
+               HeatStatusMap.put("UPDATE_FAILED", HeatStatus.FAILED);
+               HeatStatusMap.put("UPDATE_COMPLETE", HeatStatus.UPDATED);
+       }
+
+       public StackInfo () {
+       }
+       
+       public StackInfo (String name, HeatStatus status, String statusMessage, Map<String,Object> outputs) {
+               this.name = name;
+               this.canonicalName = name;      // Don't have an ID, so just use name
+
+               this.status = status;
+               if (statusMessage != null)  this.statusMessage = statusMessage;
+               if (outputs != null)  this.outputs = outputs;
+       }
+       
+       public StackInfo (String name, HeatStatus status) {
+               this.name = name;
+               this.canonicalName = name;      // Don't have an ID, so just use name
+               this.status = status;
+       }
+       
+       public StackInfo (Stack stack)
+       {
+               if (stack == null) {
+                       this.status = HeatStatus.NOTFOUND;
+                       return;
+               }
+       
+               this.name = stack.getStackName();
+               this.canonicalName = stack.getStackName() + "/" + stack.getId();
+
+               if (stack.getStackStatus() == null) {
+                       this.status = HeatStatus.INIT;
+               } else if (HeatStatusMap.containsKey(stack.getStackStatus())) {
+                       this.status = HeatStatusMap.get(stack.getStackStatus());
+               } else {
+                       this.status = HeatStatus.UNKNOWN;
+               }
+               
+               this.statusMessage = stack.getStackStatusReason();
+               
+               if (stack.getOutputs() != null) {
+                       this.outputs = new HashMap<String,Object>();
+                       for (Stack.Output output : stack.getOutputs()) {
+                               this.outputs.put(output.getOutputKey(), output.getOutputValue());
+                       }
+               }
+               
+               this.parameters = stack.getParameters();
+       }
+       
+       public String getName() {
+               return name;
+       }
+       
+       public void setName (String name) {
+               this.name = name;
+       }
+       
+       public String getCanonicalName() {
+               return canonicalName;
+       }
+       
+       public void setCanonicalName (String name) {
+               this.canonicalName = name;
+       }
+       
+       public HeatStatus getStatus() {
+               return status;
+       }
+       
+       public void setStatus (HeatStatus status) {
+               this.status = status;
+       }
+       
+       public String getStatusMessage() {
+               return statusMessage;
+       }
+       
+       public void setStatusMessage (String statusMessage) {
+               this.statusMessage = statusMessage;
+       }
+       
+       public Map<String,Object> getOutputs () {
+               return outputs;
+       }
+       
+       public void setOutputs (Map<String,Object> outputs) {
+               this.outputs = outputs;
+       }
+       
+       public Map<String,Object> getParameters () {
+               return parameters;
+       }
+       
+       public void setParameters (Map<String,Object> parameters) {
+               this.parameters = parameters;
+       }
+       
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java
new file mode 100644 (file)
index 0000000..eb514cd
--- /dev/null
@@ -0,0 +1,200 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlTransient;
+
+public class Subnet {
+
+       private String subnetName; 
+       
+       private String neutronId;
+
+       private String subnetId; // value from aai
+
+    private String cidr; //Only field required
+
+    private String gatewayIp="";
+
+    private String ipVersion="4";
+
+    private Boolean enableDHCP=false;
+
+    private List<String> hostRoutes;
+
+    private List<Pool> allocationPools;
+
+    private List<String> dnsNameServers;
+
+    public Subnet () {
+    }
+
+       public String getSubnetName() {
+               return subnetName;
+       }
+
+       public void setSubnetName(String subnetName) {
+               this.subnetName = subnetName;
+       }
+
+       public List<Pool> getAllocationPools() {
+               return allocationPools;
+       }
+
+       /**
+     * @return the cidr
+     */
+    public String getCidr() {
+        return cidr;
+    }
+
+    /**
+     * @return the dnsNames
+     */
+    public List<String> getDnsNameServers() {
+        return dnsNameServers;
+    }
+
+
+    public Boolean getEnableDHCP() {
+        return enableDHCP;
+    }
+
+    /**
+     * @return the gw
+     */
+    public String getGatewayIp() {
+        return gatewayIp;
+    }
+
+    /**
+     * @return the hostRoutes
+     */
+    public List<String> getHostRoutes() {
+        return hostRoutes;
+    }
+
+    /**
+     * @return the NeutronId
+     */
+    @XmlTransient
+    public String getNeutronId() {
+        return neutronId;
+    }
+
+    /**
+     * @return the ipversion
+     */
+    public String getIpVersion() {
+        return ipVersion;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getSubnetId() {
+        return subnetId;
+    }
+
+    public void setAllocationPools(List<Pool> allocationPools) {
+               this.allocationPools = allocationPools;
+       }
+
+    /**
+     * @param cidr
+     *            the cidr to set
+     */
+    public void setCidr(String cidr) {
+        this.cidr = cidr;
+    }
+
+    /**
+     * @param dnsNames
+     *            the dnsNames to set
+     */
+    public void setDnsNameServers(List<String> dnsNameServers) {
+        this.dnsNameServers = dnsNameServers;
+    }
+
+    /**
+     * @param enableDHCP
+     *            the enableDHCP to set
+     */
+    public void setEnableDHCP(Boolean enableDHCP) {
+        this.enableDHCP = enableDHCP;
+    }
+
+    /**
+     * @param gw
+     *            the gw to set
+     */
+    public void setGatewayIp(String gatewayIp) {
+        this.gatewayIp = gatewayIp;
+    }
+
+    /**
+     * @param hostRoutes
+     *            the hostRoutes to set
+     */
+    public void setHostRoutes(List<String> hostRoutes) {
+        this.hostRoutes = hostRoutes;
+    }
+
+    /**
+     * @param neutronId
+     *            the id to set
+     */
+    public void setNeutronId(String neutronId) {
+        this.neutronId = neutronId;
+    }
+
+    /**
+     * @param ipversion
+     *            the ipversion to set
+     */
+    public void setIpVersion(String ipVersion) {
+        this.ipVersion = ipVersion;
+    }
+
+    /**
+     * @param name
+     *            the name to set
+     */
+    public void setSubnetId(String subnetId) {
+        this.subnetId = subnetId;
+    }
+
+       @Override
+       public String toString() {
+               return "Subnet [subnetName=" + subnetName + ", neutronId=" + neutronId
+                               + ", subnetId=" + subnetId + ", cidr=" + cidr + ", gatewayIp="
+                               + gatewayIp + ", ipVersion=" + ipVersion + ", enableDHCP="
+                               + enableDHCP + ", hostRoutes=" + hostRoutes
+                               + ", allocationPools=" + allocationPools + ", dnsNameServers="
+                               + dnsNameServers + "]";
+       }
+
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java
new file mode 100644 (file)
index 0000000..b6e4a6e
--- /dev/null
@@ -0,0 +1,152 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.openecomp.mso.entity.MsoRequest;
+/**
+ * Javabean representing the rollback criteria following a "Create VNF"
+ * operation.  This structure can be passed back to the "Rollback VNF"
+ * operation to undo the effects of the create.
+ *
+ *
+ */
+public class VnfRollback {
+       private String vnfId;
+       private String tenantId;
+       private String cloudSiteId;
+       private boolean tenantCreated = false;
+       private boolean vnfCreated = false;
+       private MsoRequest msoRequest;
+       private String volumeGroupName;
+       private String volumeGroupId;
+       private String requestType;
+       private String volumeGroupHeatStackId;
+       private String baseGroupHeatStackId;
+       private boolean isBase = false;
+       private String vfModuleStackId;
+
+       public VnfRollback() {}
+       
+       public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
+                       boolean tenantCreated, boolean vnfCreated,
+                       MsoRequest msoRequest,
+                       String volumeGroupName, String volumeGroupId, String requestType) {
+               super();
+               this.vnfId = vnfId;
+               this.tenantId = tenantId;
+               this.cloudSiteId = cloudSiteId;
+               this.tenantCreated = tenantCreated;
+               this.vnfCreated = vnfCreated;
+               this.msoRequest = msoRequest;
+               this.volumeGroupName = volumeGroupName;
+               this.volumeGroupId = volumeGroupId;
+               this.requestType = requestType;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+       public void setCloudSiteId(String cloudId) {
+               this.cloudSiteId = cloudId;
+       }
+       public boolean getTenantCreated() {
+               return tenantCreated;
+       }
+       public void setTenantCreated(boolean tenantCreated) {
+               this.tenantCreated = tenantCreated;
+       }
+       public boolean getVnfCreated() {
+               return vnfCreated;
+       }
+       public void setVnfCreated(boolean vnfCreated) {
+               this.vnfCreated = vnfCreated;
+       }
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+       public void setMsoRequest (MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+       public String getVolumeGroupName() {
+               return this.volumeGroupName;
+       }
+       public void setVolumeGroupName(String volumeGroupName) {
+               this.volumeGroupName = volumeGroupName;
+       }
+       public String getVolumeGroupId() {
+               return this.volumeGroupId;
+       }
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+       public String getRequestType() {
+               return this.requestType;
+       }
+       public void setRequestType(String requestType) {
+               this.requestType = requestType;
+       }
+       public String getVolumeGroupHeatStackId() {
+               return this.volumeGroupHeatStackId;
+       }
+       public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
+               this.volumeGroupHeatStackId = volumeGroupHeatStackId;
+       }
+       
+       public String getBaseGroupHeatStackId() {
+               return this.baseGroupHeatStackId;
+       }
+       public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
+               this.baseGroupHeatStackId = baseGroupHeatStackId;
+       }
+       
+       public boolean isBase() {
+               return this.isBase;
+       }
+       public void setIsBase(boolean isBase) {
+               this.isBase = isBase;
+       }
+       public String getVfModuleStackId() {
+               return this.vfModuleStackId;
+       }
+       public void setVfModuleStackId(String vfModuleStackId) {
+               this.vfModuleStackId = vfModuleStackId;
+       }
+
+       @Override
+    public String toString() {
+               return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
+                               ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
+                               ", vnfCreated=" + vnfCreated + ", requestType = " + requestType;
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java
new file mode 100644 (file)
index 0000000..40f4671
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+/*
+ * Enum status values to mirror the Openstack Heat stack status values
+ */
+public enum VnfStatus {
+       ACTIVE, FAILED, NOTFOUND, UNKNOWN
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoAdapterException.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoAdapterException.java
new file mode 100644 (file)
index 0000000..d7198ae
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+
+/**
+ * General MSO Exception class for any non-specific errors.
+ * 
+ *
+ */
+public class MsoAdapterException extends MsoException
+{
+       private static final long serialVersionUID = 1L;
+       
+       // Constructor to create a new MsoException instance
+       public MsoAdapterException (String message) {
+               super(message);
+               super.category = MsoExceptionCategory.INTERNAL;
+       }
+
+       // Constructor to wrap a nested exception
+       public MsoAdapterException (String message, Throwable t) {
+               super(message, t);
+               super.category = MsoExceptionCategory.INTERNAL;
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFound.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFound.java
new file mode 100644 (file)
index 0000000..4392ee0
--- /dev/null
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+/**
+ * Cloud site not found exception.
+ */
+public class MsoCloudSiteNotFound extends MsoException {
+
+    /**
+     * Serialization id.
+     */
+    private static final long serialVersionUID = 2583769056266415664L;
+
+    /**
+     * Default constructor (needed for BPEL/JAXB)
+     */
+    public MsoCloudSiteNotFound () {
+        super("Cloud site not found");
+        super.category=MsoExceptionCategory.USERDATA;
+    }
+
+    /**
+     * Constructor to create a new MsoOpenstackException instance
+     * @param cloudSite the cloud site
+     */
+    public MsoCloudSiteNotFound (String cloudSite) {
+        // Set the detailed error as the Exception 'message'
+        super("Cloud Site [" + cloudSite + "] not found");
+        super.category=MsoExceptionCategory.USERDATA;
+    }
+
+    @Override
+    public String toString () {
+        return getMessage();
+    }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java
new file mode 100644 (file)
index 0000000..538a60d
--- /dev/null
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+
+public abstract class MsoException extends Exception
+{
+       private static final long serialVersionUID = 1L;
+
+       protected MsoExceptionCategory category = MsoExceptionCategory.INTERNAL;
+       protected String context = null;
+       
+       protected MsoException (String message) {
+               super(message);
+       }
+       
+       protected MsoException (String message, Throwable t) {
+               super(message,t);
+       }
+       
+       public MsoExceptionCategory getCategory() {
+               return category;
+       }
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+       
+       public String getContext () {
+               return context;
+       }
+       public void setContext (String context) {
+               this.context = context;
+       }
+       public void addContext (String ctx) {
+               if (this.context != null)
+                       this.context = ctx + ":" + this.context;
+               else
+                       this.context = ctx;
+       }
+       
+       public String getContextMessage () {
+               if (this.context == null)
+                       return getMessage();
+               else
+                       return ("[" + context + "] " + getMessage());
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoExceptionCategory.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoExceptionCategory.java
new file mode 100644 (file)
index 0000000..4cc6b41
--- /dev/null
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+
+public enum MsoExceptionCategory {
+       OPENSTACK, IO, INTERNAL, USERDATA
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoIOException.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoIOException.java
new file mode 100644 (file)
index 0000000..eafb033
--- /dev/null
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+/**
+ * I/O exception
+ */
+public class MsoIOException extends MsoException
+{
+
+       /**
+     * Serialization id.
+     */
+    private static final long serialVersionUID = 6752445132721635760L;
+
+    /**
+     * Basic constructor with message
+     * @param message the error message
+     */
+       public MsoIOException (String message) {
+               super(message);
+               super.category = MsoExceptionCategory.IO;
+       }
+       
+       /**
+        * Constructor to wrap a nested exception
+        * @param message the error message
+        * @param t the cause
+        */
+       public MsoIOException (String message, Throwable t) {
+               super (message, t);
+               super.category = MsoExceptionCategory.IO;
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExists.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExists.java
new file mode 100644 (file)
index 0000000..d234bbf
--- /dev/null
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+
+public class MsoNetworkAlreadyExists extends MsoOpenstackException {
+
+       private static final long serialVersionUID = 1L;
+
+       // Constructor to create a new MsoOpenstackException instance
+       public MsoNetworkAlreadyExists (String stack, String tenant, String cloud) {
+               // Set the detailed error as the Exception 'message'
+               super(409, "Conflict", "Stack " + stack + " already exists in Tenant + " + tenant + " in Cloud " + cloud);
+       }
+               
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFound.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFound.java
new file mode 100644 (file)
index 0000000..8aa7115
--- /dev/null
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+
+public class MsoNetworkNotFound extends MsoOpenstackException {
+
+       private static final long serialVersionUID = 1L;
+
+       // Constructor to create a new MsoOpenstackException instance
+       public MsoNetworkNotFound (String networkId, String tenant, String cloud) {
+               // Set the detailed error as the Exception 'message'
+               super(404, "Not Found", "Network " + networkId + " does not exist in Cloud/Tenant " + cloud + "/" + tenant);
+       }
+               
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java
new file mode 100644 (file)
index 0000000..2ad0f5b
--- /dev/null
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+/**
+ * OpenStack exception.
+ */
+public class MsoOpenstackException extends MsoException
+{
+       
+       /**
+     * Serialization id.
+     */
+    private static final long serialVersionUID = 3313636124141766495L;
+    
+    private int statusCode;
+       private String statusMessage;
+       private String errorDetail;
+
+       /**
+        * Constructor to create a new MsoOpenstackException instance
+        * @param code the error code
+        * @param message the error message
+        * @param detail error details
+        */
+       public MsoOpenstackException (int code, String message, String detail) {
+               // Set the detailed error as the Exception 'message'
+               super(detail);
+               super.category = MsoExceptionCategory.OPENSTACK;
+               
+               this.statusCode = code;
+               this.statusMessage = message;
+               this.errorDetail = detail;
+       }
+       
+       /**
+        * Constructor to propagate the caught exception (mostly for stack trace)
+     * @param code the error code
+     * @param message the error message
+     * @param detail error details
+        * @param e the cause
+        */
+       public MsoOpenstackException (int code, String message, String detail, Exception e) {
+               // Set the detailed error as the Exception 'message'
+               super(detail, e);
+               super.category = MsoExceptionCategory.OPENSTACK;
+               
+               this.statusCode = code;
+               this.statusMessage = message;
+               this.errorDetail = detail;
+       }
+       
+       @Override
+       public String toString () {
+               String error = "" + statusCode + " " + statusMessage + ": " + errorDetail;
+               return error;
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExists.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExists.java
new file mode 100644 (file)
index 0000000..2aba5b9
--- /dev/null
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+
+public class MsoStackAlreadyExists extends MsoOpenstackException {
+
+       private static final long serialVersionUID = 1L;
+
+       // Constructor to create a new MsoOpenstackException instance
+       public MsoStackAlreadyExists (String stack, String tenant, String cloud) {
+               // Set the detailed error as the Exception 'message'
+               super(409, "Conflict", "Stack " + stack + " already exists in Tenant + " + tenant + " in Cloud " + cloud);
+       }
+               
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFound.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFound.java
new file mode 100644 (file)
index 0000000..583d976
--- /dev/null
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+/**
+ * Thrown when HEAT stack is not found or deleted.
+ */
+public class MsoStackNotFound extends MsoOpenstackException {
+
+       /**
+     * Serialization id.
+     */
+    private static final long serialVersionUID = 7354069716354359246L;
+
+    /**
+        * Constructor to create a new MsoOpenstackException instance.
+        * @param stack the stack name
+        * @param tenant the tenant name
+        * @param cloud the cloud name
+        */
+       public MsoStackNotFound (String stack, String tenant, String cloud) {
+               // Set the detailed error as the Exception 'message'
+               super(404, "Not Found", "Stack " + stack + " does not exist in Cloud/Tenant " + cloud + "/" + tenant);
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExists.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExists.java
new file mode 100644 (file)
index 0000000..9edfdea
--- /dev/null
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+
+public class MsoTenantAlreadyExists extends MsoOpenstackException {
+
+       private static final long serialVersionUID = 1L;
+
+       // Constructor to create a new MsoOpenstackException instance
+       public MsoTenantAlreadyExists (String tenant, String cloud) {
+               // Set the detailed error as the Exception 'message'
+               super(409, "Conflict", "Tenant " + tenant + " already exists in Cloud " + cloud);
+       }
+               
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFound.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFound.java
new file mode 100644 (file)
index 0000000..bd09938
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+
+/**
+ * Tenant not found exception.
+ */
+public class MsoTenantNotFound extends MsoOpenstackException {
+
+    /**
+     * Serialization id.
+     */
+    private static final long serialVersionUID = 5640069939645577063L;
+
+    /**
+        * Constructor to create the exception
+        * @param tenant the tenant id
+        * @param cloud the cloud id
+        */
+       public MsoTenantNotFound (String tenant, String cloud) {
+               // Set the detailed error as the Exception 'message'
+               super(404, "Not Found", "Tenant " + tenant + " does not exist in Cloud " + cloud);
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/CloudConfigInitializer.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/CloudConfigInitializer.java
new file mode 100644 (file)
index 0000000..3d9c23c
--- /dev/null
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+import javax.ejb.EJB;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.annotation.WebListener;
+
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * This class will attempt to initialize Cloud Config when part of a web application.
+ * 
+ *
+ *
+ */
+@WebListener
+public class CloudConfigInitializer implements ServletContextListener
+{
+
+       private CloudConfigFactory cloudConfigFactory=new CloudConfigFactory();
+
+       public CloudConfigInitializer () {
+       }
+
+       @Override
+       public void contextDestroyed(ServletContextEvent event) {
+               // Nothing to do...
+       }
+
+
+       @Override
+       public void contextInitialized(ServletContextEvent event)
+       {
+
+               // Note - this logger may be before or after MSO Logging configuration applied
+               MsoLogger initLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+               try {
+                       // Look first in the init-parameters
+                       String msoPropConfigParam = event.getServletContext().getInitParameter("mso.cloud_config.configuration");
+
+                       String[] configFileSplit = msoPropConfigParam.split(",");
+                       for (String msoPropConfig:configFileSplit) {
+                               String[] msoPropDecoded = msoPropConfig.split("=");
+
+                               try {
+                                       cloudConfigFactory.initializeCloudConfig(msoPropDecoded[0], Integer.valueOf(msoPropDecoded[1]));
+                                       initLogger.info(MessageEnum.RA_CONFIG_LOAD, msoPropDecoded[0], "", "");
+                                       initLogger.debug("Mso properties successfully loaded:"+msoPropDecoded[0]+"(Timer(mins):"+Integer.valueOf(msoPropDecoded[1]));
+                               } catch (NumberFormatException ne) {
+                                       initLogger.error(MessageEnum.RA_CONFIG_EXC, msoPropDecoded[0] + ". MSO Properties failed due to conversion error (in web.xml file)", "", "", MsoLogger.ErrorCode.DataError, "MSO Properties failed due to conversion error (in web.xml file)", ne);
+                               }
+                       }
+               }
+               catch (Exception e) {
+                       initLogger.error(MessageEnum.RA_CONFIG_EXC,  "Unknown. MSO Properties failed to initialize completely", "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception - MSO Properties failed to initialize completely", e);
+               }
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoCommonUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoCommonUtils.java
new file mode 100644 (file)
index 0000000..6787e72
--- /dev/null
@@ -0,0 +1,315 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+import java.lang.StackTraceElement;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.openecomp.mso.openstack.exceptions.MsoIOException;
+import org.openecomp.mso.openstack.exceptions.MsoOpenstackException;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import com.woorea.openstack.base.client.OpenStackBaseException;
+import com.woorea.openstack.base.client.OpenStackConnectException;
+import com.woorea.openstack.base.client.OpenStackRequest;
+import com.woorea.openstack.base.client.OpenStackResponseException;
+import com.woorea.openstack.heat.model.Explanation;
+import com.woorea.openstack.keystone.model.Error;
+import com.woorea.openstack.quantum.model.NeutronError;
+
+public class MsoCommonUtils {
+
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+       protected static MsoAlarmLogger alarmLogger = new MsoAlarmLogger();
+       
+       protected static String retryDelayProp = "ecomp.mso.adapters.po.retryDelay";
+    protected static String retryCountProp = "ecomp.mso.adapters.po.retryCount";
+    protected static String retryCodesProp = "ecomp.mso.adapters.po.retryCodes";
+       
+       protected static int retryDelayDefault = 5;
+    protected static int retryCountDefault = 3;
+    protected static String retryCodesDefault = "504";
+  
+    /*
+     * Method to execute an Openstack command and track its execution time.
+     * For the metrics log, a category of "Openstack" is used along with a
+     * sub-category that identifies the specific call (using the real
+     * openstack-java-sdk classname of the OpenStackRequest<T> parameter).
+     */
+    
+    protected static <T> T executeAndRecordOpenstackRequest (OpenStackRequest <T> request)
+    {
+       return executeAndRecordOpenstackRequest (request, null);
+    }
+    protected static <T> T executeAndRecordOpenstackRequest (OpenStackRequest <T> request, MsoJavaProperties msoProps) {
+       
+       int limit;
+        // Get the name and method name of the parent class, which triggered this method
+        StackTraceElement[] classArr = new Exception ().getStackTrace ();
+        if (classArr.length >=2) {
+               limit = 3;
+        } else {
+               limit = classArr.length;
+        }
+       String parentServiceMethodName = classArr[0].getClassName () + "." + classArr[0].getMethodName ();
+       for (int i = 1; i < limit; i++) {
+            String className = classArr[i].getClassName ();
+            if (!className.equals (MsoCommonUtils.class.getName ())) {
+               parentServiceMethodName = className + "." + classArr[i].getMethodName ();
+               break;
+            }
+        }
+
+        long start = System.currentTimeMillis ();
+       String requestType;
+        if (request.getClass ().getEnclosingClass () != null) {
+            requestType = request.getClass ().getEnclosingClass ().getSimpleName () + "."
+                          + request.getClass ().getSimpleName ();
+        } else {
+            requestType = request.getClass ().getSimpleName ();
+        }
+        
+        int retryDelay = retryDelayDefault;
+        int retryCount = retryCountDefault;
+        String retryCodes  = retryCodesDefault;
+        if (msoProps != null) //extra check to avoid NPE
+        {
+               retryDelay = msoProps.getIntProperty (retryDelayProp, retryDelayDefault);
+               retryCount = msoProps.getIntProperty (retryCountProp, retryCountDefault);
+               retryCodes = msoProps.getProperty (retryCodesProp, retryCodesDefault);
+        }
+       
+        // Run the actual command. All exceptions will be propagated
+        while (true)
+        {
+               try {
+                return request.execute ();
+               } 
+               catch (OpenStackResponseException e) {
+                       boolean retry = false;
+                       if (retryCodes != null ) {
+                               int code = e.getStatus();
+                               LOGGER.debug ("Config values RetryDelay:" + retryDelay + " RetryCount:" + retryCount + " RetryCodes:" + retryCodes + " ResponseCode:" + code);
+                               for (String rCode : retryCodes.split (",")) {
+                                       try {
+                                               if (retryCount > 0 && code == Integer.parseInt (rCode))
+                                               {
+                                                       retryCount--;
+                                                       retry = true;
+                                                       LOGGER.debug ("OpenStackResponseException ResponseCode:" + code +  " at:" + parentServiceMethodName + " request:" + requestType +  " Retry indicated. Attempts remaining:" + retryCount);
+                                                       break;
+                                               }
+                                       } catch (NumberFormatException e1) {
+                                               LOGGER.error (MessageEnum.RA_CONFIG_EXC, "No retries. Exception in parsing retry code in config:" + rCode, "", "", MsoLogger.ErrorCode.SchemaError, "Exception in parsing retry code in config");
+                                               throw e;
+                                       }
+                               }
+                       }
+                       if (retry)
+                       {
+                               try {
+                                       Thread.sleep (retryDelay * 1000L);
+                               } catch (InterruptedException e1) {
+                                       LOGGER.debug ("Thread interrupted while sleeping", e1);
+                               }
+                       }
+                       else
+                               throw e; // exceeded retryCount or code is not retryable
+               }
+               catch (OpenStackConnectException e) {
+                       // Connection to Openstack failed
+                       if (retryCount > 0)
+                       {
+                               retryCount--;
+                               LOGGER.debug ("OpenstackConnectException at:" + parentServiceMethodName + " request:" + requestType + " Retry indicated. Attempts remaining:" + retryCount);
+                               try {
+                                       Thread.sleep (retryDelay * 1000L);
+                               } catch (InterruptedException e1) {
+                                       LOGGER.debug ("Thread interrupted while sleeping", e1);
+                               }
+                       }
+                       else
+                               throw e;
+                               
+               }
+        }
+    }
+  
+    /*
+     * Convert an Openstack Exception on a Keystone call to an MsoException.
+     * This method supports both OpenstackResponseException and OpenStackConnectException.
+     */
+    protected static MsoException keystoneErrorToMsoException (OpenStackBaseException e, String context) {
+        MsoException me = null;
+
+        if (e instanceof OpenStackResponseException) {
+            OpenStackResponseException re = (OpenStackResponseException) e;
+
+            try {
+                // Failed Keystone calls return an Error entity body.
+                Error error = re.getResponse ().getErrorEntity (Error.class);
+                LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "Openstack Keystone Error on " + context + ": " + error, "Openstack", "", MsoLogger.ErrorCode.DataError, "Openstack Keystone Error on " + context);
+                               me = new MsoOpenstackException (error.getCode (), error.getTitle (), error.getMessage ());
+            } catch (Exception e2) {
+                // Can't parse the body as an "Error". Report the HTTP error
+               LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "HTTP Error on " + context + ": " + re.getStatus() + "," + re.getMessage(), "Openstack", "", MsoLogger.ErrorCode.DataError, "HTTP Error on " + context, e2);
+                               me = new MsoOpenstackException (re.getStatus (), re.getMessage (), "");
+            }
+
+            // Add the context of the error
+            me.addContext (context);
+
+            // Generate an alarm for 5XX and higher errors.
+            if (re.getStatus () >= 500) {
+                alarmLogger.sendAlarm ("KeystoneError", MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+            }
+        } else if (e instanceof OpenStackConnectException) {
+            OpenStackConnectException ce = (OpenStackConnectException) e;
+
+            me = new MsoIOException (ce.getMessage ());
+            me.addContext (context);
+
+            // Generate an alarm for all connection errors.
+            LOGGER.error(MessageEnum.RA_GENERAL_EXCEPTION_ARG, "Openstack Keystone connection error on " + context + ": " + e, "Openstack", "", MsoLogger.ErrorCode.DataError, "Openstack Keystone connection error on " + context);
+                       alarmLogger.sendAlarm ("KeystoneIOError", MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+        }
+
+        return me;
+    }
+
+    /*
+     * Convert an Openstack Exception on a Heat call to an MsoOpenstackException.
+     * This method supports both OpenstackResponseException and OpenStackConnectException.
+     */
+    protected MsoException heatExceptionToMsoException (OpenStackBaseException e, String context) {
+        MsoException me = null;
+
+        if (e instanceof OpenStackResponseException) {
+            OpenStackResponseException re = (OpenStackResponseException) e;
+
+            try {
+                // Failed Heat calls return an Explanation entity body.
+                Explanation explanation = re.getResponse ().getErrorEntity (Explanation.class);
+                LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "Openstack Error on " + context + ": " + explanation.toString(), "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception - Openstack Error on " + context);
+                String fullError = explanation.getExplanation() + ", error.type=" + explanation.getError().getType() + ", error.message=" + explanation.getError().getMessage();
+                LOGGER.debug(fullError);
+                               me = new MsoOpenstackException (explanation.getCode (),
+                                                explanation.getTitle (),
+                                                //explanation.getExplanation ());
+                                                fullError);
+            } catch (Exception e2) {
+                // Couldn't parse the body as an "Explanation". Report the original HTTP error.
+               LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "HTTP Error on " + context + ": " + re.getStatus() + "," + e.getMessage(), "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception - HTTP Error on " + context, e2);
+                               me = new MsoOpenstackException (re.getStatus (), re.getMessage (), "");
+            }
+
+            // Add the context of the error
+            me.addContext (context);
+
+            // Generate an alarm for 5XX and higher errors.
+            if (re.getStatus () >= 500) {
+                alarmLogger.sendAlarm ("HeatError", MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+            }
+        } else if (e instanceof OpenStackConnectException) {
+            OpenStackConnectException ce = (OpenStackConnectException) e;
+
+            me = new MsoIOException (ce.getMessage ());
+            me.addContext (context);
+
+            // Generate an alarm for all connection errors.
+            alarmLogger.sendAlarm ("HeatIOError", MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+            LOGGER.error(MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "Openstack Heat connection error on " + context + ": " + e, "Openstack", "", MsoLogger.ErrorCode.DataError, "Openstack Heat connection error on " + context);
+       }
+
+        return me;
+    }
+
+    /*
+     * Convert an Openstack Exception on a Neutron call to an MsoOpenstackException.
+     * This method supports both OpenstackResponseException and OpenStackConnectException.
+     */
+    protected MsoException neutronExceptionToMsoException (OpenStackBaseException e, String context) {
+        MsoException me = null;
+
+        if (e instanceof OpenStackResponseException) {
+            OpenStackResponseException re = (OpenStackResponseException) e;
+
+            try {
+                // Failed Neutron calls return an NeutronError entity body
+                NeutronError error = re.getResponse ().getErrorEntity (NeutronError.class);
+                LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "Openstack Neutron Error on " + context + ": " + error, "Openstack", "", MsoLogger.ErrorCode.DataError, "Openstack Neutron Error on " + context);
+                               me = new MsoOpenstackException (re.getStatus (), error.getType (), error.getMessage ());
+            } catch (Exception e2) {
+                // Couldn't parse body as a NeutronError. Report the HTTP error.
+               LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "HTTP Error on " + context + ": " + re.getStatus() + "," + e.getMessage(), "Openstack", "", MsoLogger.ErrorCode.DataError, "Openstack HTTP Error on " + context, e2);
+                               me = new MsoOpenstackException (re.getStatus (), re.getMessage (), null);
+            }
+
+            // Add the context of the error
+            me.addContext (context);
+
+            // Generate an alarm for 5XX and higher errors.
+            if (re.getStatus () >= 500) {
+                alarmLogger.sendAlarm ("NeutronError", MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+            }
+        } else if (e instanceof OpenStackConnectException) {
+            OpenStackConnectException ce = (OpenStackConnectException) e;
+
+            me = new MsoIOException (ce.getMessage ());
+            me.addContext (context);
+
+            // Generate an alarm for all connection errors.
+            alarmLogger.sendAlarm ("NeutronIOError", MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+            LOGGER.error(MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "Openstack Neutron Connection error on "+ context + ": " + e, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Openstack Neutron Connection error on "+ context);
+       }
+
+        return me;
+    }
+
+    /*
+     * Convert a Java Runtime Exception to an MsoException.
+     * All Runtime exceptions will be translated into an MsoAdapterException,
+     * which captures internal errors.
+     * Alarms will be generated on all such exceptions.
+     */
+    protected MsoException runtimeExceptionToMsoException (RuntimeException e, String context) {
+        MsoAdapterException me = new MsoAdapterException (e.getMessage (), e);
+        me.addContext (context);
+        me.setCategory (MsoExceptionCategory.INTERNAL);
+
+        // Always generate an alarm for internal exceptions
+        LOGGER.error(MessageEnum.RA_GENERAL_EXCEPTION_ARG, "An exception occured on  "+ context + ": " + e, "OpenStack", "", MsoLogger.ErrorCode.DataError, "An exception occured on  "+ context);
+               alarmLogger.sendAlarm ("AdapterInternalError", MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+
+        return me;
+    }
+
+    public static boolean isNullOrEmpty (String s) {
+        return s == null || s.isEmpty();
+    }
+    
+    
+
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java
new file mode 100644 (file)
index 0000000..13ea433
--- /dev/null
@@ -0,0 +1,227 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+
+import java.util.HashSet;
+import java.util.ArrayList;
+import java.util.Set;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+
+public class MsoHeatEnvironmentEntry {
+
+       private Set<MsoHeatEnvironmentParameter> parameters = null;
+       private Set<MsoHeatEnvironmentResource> resources = null;
+       private StringBuilder rawEntry = null;
+       private boolean valid = true;
+       private String errorString = null;
+       private StringBuilder resourceRegistryEntryRaw = null;
+       
+       public MsoHeatEnvironmentEntry() {
+               super();
+       }
+       
+       public MsoHeatEnvironmentEntry(StringBuilder sb) {
+               this();
+               this.rawEntry = sb;
+               this.processRawEntry();
+       }
+       
+       private void processRawEntry() {
+               try {
+                       if (this.rawEntry == null || this.rawEntry.equals(""))
+                               return;
+                       byte[] b = this.rawEntry.toString().getBytes();
+                       MsoYamlEditorWithEnvt yaml = new MsoYamlEditorWithEnvt(b);
+                       this.parameters = yaml.getParameterListFromEnvt();
+                       //this.resources = yaml.getResourceListFromEnvt();
+                       StringBuilder sb = this.getResourceRegistryRawEntry();
+                       if (sb == null) {
+                               this.resourceRegistryEntryRaw = new StringBuilder("");
+                       } else {
+                               this.resourceRegistryEntryRaw = sb;
+                       }
+               } catch (Exception e) {
+                       this.valid = false;
+                       this.errorString = e.getMessage();
+                       //e.printStackTrace();
+               }
+       }
+       
+       public boolean isValid() {
+               return this.valid;
+       }
+       public String getErrorString() {
+               return this.errorString;
+       }
+       
+       public Set<MsoHeatEnvironmentParameter> getParameters() {
+               return this.parameters;
+       }
+       public Set<MsoHeatEnvironmentResource> getResources() {
+               return this.resources;
+       }
+       public void setParameters(Set<MsoHeatEnvironmentParameter> paramSet) {
+               if (paramSet == null) {
+                       this.parameters = null;
+               } else {
+                       this.parameters = paramSet;
+               }
+       }
+       public void setResources(Set<MsoHeatEnvironmentResource> resourceSet) {
+               if (resourceSet == null) {
+                       this.resources = null;
+               } else {
+                       this.resources = resourceSet;
+               }
+       }
+       
+       public void addParameter(MsoHeatEnvironmentParameter hep) {
+               if (this.parameters == null) {
+                       this.parameters = new HashSet<MsoHeatEnvironmentParameter>();
+               }
+               this.parameters.add(hep);
+       }
+       public void addResource(MsoHeatEnvironmentResource her) {
+               if (this.resources == null) {
+                       this.resources = new HashSet<MsoHeatEnvironmentResource>();
+               }
+               this.resources.add(her);
+       }
+       
+       public int getNumberOfParameters() {
+               return this.parameters.size();
+       }
+       public int getNumberOfResources() {
+               return this.resources.size();
+       }
+       
+       public boolean hasResources() {
+               if (this.resources != null && this.resources.size() > 0) {
+                       return true;
+               } 
+               return false;
+       }
+       public boolean hasParameters() {
+               if (this.parameters != null && this.parameters.size() > 0) {
+                       return true;
+               }
+               return false;
+       }
+       
+       public boolean containsParameter(String paramName) {
+               boolean contains = false;
+               if (this.parameters == null || this.parameters.size() < 1) {
+                       return false;
+               }
+               if (this.parameters.contains(new MsoHeatEnvironmentParameter(paramName))) {
+                       contains = true;
+               }
+               return contains;
+       }
+       
+       public boolean containsParameter(String paramName, String paramAlias) {
+               if (this.containsParameter(paramName)) {
+                       return true;
+               }
+               if (this.containsParameter(paramAlias)) {
+                       return true;
+               }
+               return false;
+       }
+       
+       public StringBuilder toFullStringExcludeNonParams(Set<HeatTemplateParam> params) {
+               // Basically give back the envt - but exclude the params that aren't in the HeatTemplate 
+               
+               StringBuilder sb = new StringBuilder();
+               ArrayList<String> paramNameList = new ArrayList<String>(params.size());
+               for (HeatTemplateParam htp : params) {
+                       paramNameList.add(htp.getParamName());
+               }
+               
+               if (this.hasParameters()) {
+                       sb.append("parameters:\n");
+                       for (MsoHeatEnvironmentParameter hep : this.parameters) {
+                               String paramName = hep.getName();
+                               if (paramNameList.contains(paramName)) {
+                                       // This parameter *is* in the Heat Template - so include it:
+                                       sb.append("  " + hep.getName() + ": " + hep.getValue() + "\n");
+                                       // New - 1607 - if any of the params mapped badly - JUST RETURN THE ORIGINAL ENVT!
+                                       if (hep.getValue().startsWith("_BAD")) {
+                                               return this.rawEntry;
+                                       }
+                               } 
+                       }
+                       sb.append("\n");
+               }
+//             if (this.hasResources()) {
+//                     sb.append("resource_registry:\n");
+//                     for (MsoHeatEnvironmentResource her : this.resources) {
+//                             sb.append("   \"" + her.getName() + "\": " + her.getValue() + "\n");
+//                     }
+//             }
+               sb.append("\n");
+               sb.append(this.resourceRegistryEntryRaw);                               
+               return sb;
+       }
+       
+       public StringBuilder toFullString() {
+               StringBuilder sb = new StringBuilder();
+               
+               if (this.hasParameters()) {
+                       sb.append("parameters:\n");
+                       for (MsoHeatEnvironmentParameter hep : this.parameters) {
+                               sb.append("   " + hep.getName() + ":  " + hep.getValue() + "\n");
+                       }
+                       sb.append("\n");
+               }
+//             if (this.hasResources()) {
+//                     sb.append("resource_registry:\n");
+//                     for (MsoHeatEnvironmentResource her : this.resources) {
+//                             sb.append("   \"" + her.getName() + "\": " + her.getValue() + "\n");
+//                     }
+//             }
+               sb.append("\n");
+               sb.append(this.resourceRegistryEntryRaw);                       
+               return sb;
+       }
+
+       public StringBuilder getRawEntry() {
+               return this.rawEntry;
+       }
+       
+       private StringBuilder getResourceRegistryRawEntry() {
+               
+               if (this.rawEntry == null) {
+                       return null;
+               }
+               
+               StringBuilder sb = new StringBuilder();
+               int indexOf = this.rawEntry.indexOf("resource_registry:");
+               if (indexOf < 0) { // no resource_registry:
+                       return null;
+               }
+               sb.append(this.rawEntry.substring(indexOf));
+               return sb;
+       }
+       
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameter.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameter.java
new file mode 100644 (file)
index 0000000..4cf9023
--- /dev/null
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+
+public class MsoHeatEnvironmentParameter {
+
+       private String name;
+       private String value;
+       
+       public MsoHeatEnvironmentParameter(String name, String value) {
+               super();
+               this.name = name;
+               this.value = value;
+       }
+       public MsoHeatEnvironmentParameter(String name) {
+               // Allow to initialize with a null value
+               this(name, null);
+       }
+       public MsoHeatEnvironmentParameter() {
+               this(null, null);
+       }
+       
+       public String getName() {
+               return this.name;
+       }
+       public void setName(String name) {
+               this.name = name;
+       }
+       
+       public String getValue() {
+               return this.value;
+       }
+       public void setValue(String value) {
+               this.value = value;
+       }
+       public String toString() {
+               return this.name + ": " + this.value;
+       }
+       
+       public boolean equals(Object o) {       
+               if (!(o instanceof MsoHeatEnvironmentParameter)) {
+                       return false;
+               }
+               if (this == o) {
+                       return true;
+               }
+               MsoHeatEnvironmentParameter hep = (MsoHeatEnvironmentParameter) o;      
+               // If the name of the parameter is the same, then they're equal
+               if (hep.getName().equals(this.getName())) {
+                       return true;
+               }
+               return false;
+       }
+       
+       public int hashCode() {
+               int result = 0;
+               try {
+                       result = this.name.hashCode();
+               } catch (Exception e) {
+                       // in case it's null - return zero
+               }
+               return result;
+       }
+
+
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResource.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResource.java
new file mode 100644 (file)
index 0000000..202a084
--- /dev/null
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+
+public class MsoHeatEnvironmentResource {
+
+       private String name;
+       private String value;
+       
+       public MsoHeatEnvironmentResource(String name, String value) {
+               super();
+               this.name = name;
+               this.value = value;
+       }
+       public MsoHeatEnvironmentResource(String name) {
+               // Allow to initialize with a null value
+               this(name, null);
+       }
+       public MsoHeatEnvironmentResource() {
+               this(null, null);
+       }
+       
+       public String getName() {
+               return this.name;
+       }
+       public void setName(String name) {
+               this.name = name;
+       }
+       
+       public String getValue() {
+               return this.value;
+       }
+       public void setValue(String value) {
+               this.value = value;
+       }
+       public String toString() {
+               return "\"" + this.name + "\": " + this.value;
+       }
+       
+       public boolean equals(Object o) {       
+               if (!(o instanceof MsoHeatEnvironmentResource)) {
+                       return false;
+               }
+               if (this == o) {
+                       return true;
+               }
+               MsoHeatEnvironmentResource her = (MsoHeatEnvironmentResource) o;        
+               // If the name of the parameter is the same, then they're equal
+               if (her.getName().equals(this.getName())) {
+                       return true;
+               }
+               return false;
+       }
+       
+       public int hashCode() {
+               int result = 0;
+               try {
+                       result = this.name.hashCode();
+               } catch (Exception e) {
+                       // in case it's null - return zero
+               }
+               return result;
+       }
+
+
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
new file mode 100644 (file)
index 0000000..8d66505
--- /dev/null
@@ -0,0 +1,1229 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParseException;
+
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudIdentity;
+import org.openecomp.mso.cloud.CloudSite;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.HeatStatus;
+import org.openecomp.mso.openstack.beans.StackInfo;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoIOException;
+import org.openecomp.mso.openstack.exceptions.MsoOpenstackException;
+import org.openecomp.mso.openstack.exceptions.MsoStackAlreadyExists;
+import org.openecomp.mso.openstack.exceptions.MsoTenantNotFound;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import com.woorea.openstack.base.client.OpenStackConnectException;
+import com.woorea.openstack.base.client.OpenStackRequest;
+import com.woorea.openstack.base.client.OpenStackResponseException;
+import com.woorea.openstack.heat.Heat;
+import com.woorea.openstack.heat.model.CreateStackParam;
+import com.woorea.openstack.heat.model.Stack;
+import com.woorea.openstack.heat.model.Stacks;
+import com.woorea.openstack.keystone.Keystone;
+import com.woorea.openstack.keystone.model.Access;
+import com.woorea.openstack.keystone.model.Authentication;
+import com.woorea.openstack.keystone.utils.KeystoneUtils;
+
+public class MsoHeatUtils extends MsoCommonUtils {
+
+       private MsoPropertiesFactory msoPropertiesFactory;
+
+       private CloudConfigFactory cloudConfigFactory;
+       
+    private static final String TOKEN_AUTH = "TokenAuth";
+
+    private static final String QUERY_ALL_STACKS = "QueryAllStacks";
+
+    private static final String DELETE_STACK = "DeleteStack";
+
+    private static final String HEAT_ERROR = "HeatError";
+
+    private static final String CREATE_STACK = "CreateStack";
+
+    // Cache Heat Clients statically. Since there is just one MSO user, there is no
+    // benefit to re-authentication on every request (or across different flows). The
+    // token will be used until it expires.
+    //
+    // The cache key is "tenantId:cloudId"
+    private static Map <String, HeatCacheEntry> heatClientCache = new HashMap <String, HeatCacheEntry> ();
+
+    // Fetch cloud configuration each time (may be cached in CloudConfig class)
+    protected CloudConfig cloudConfig;
+
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+    protected MsoJavaProperties msoProps = null;
+
+    // Properties names and variables (with default values)
+    protected String createPollIntervalProp = "ecomp.mso.adapters.heat.create.pollInterval";
+    private String deletePollIntervalProp = "ecomp.mso.adapters.heat.delete.pollInterval";
+    private String deletePollTimeoutProp = "ecomp.mso.adapters.heat.delete.pollTimeout";
+
+    protected int createPollIntervalDefault = 15;
+    private int deletePollIntervalDefault = 15;
+    private int deletePollTimeoutDefault = 300;
+    private String msoPropID;
+    
+    private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
+
+    /**
+     * This constructor MUST be used ONLY in the JUNIT tests, not for real code.
+     * The MsoPropertiesFactory will be added by EJB injection.
+     *
+     * @param msoPropID ID of the mso pro config as defined in web.xml
+     * @param msoPropFactory The mso properties factory instanciated by EJB injection
+     * @param cloudConfFactory the Cloud Config instantiated by EJB injection
+     */
+    public MsoHeatUtils (String msoPropID, MsoPropertiesFactory msoPropFactory, CloudConfigFactory cloudConfFactory) {
+       msoPropertiesFactory = msoPropFactory;
+       cloudConfigFactory = cloudConfFactory;
+       this.msoPropID = msoPropID;
+       // Dynamically get properties each time (in case reloaded).
+
+       try {
+                       msoProps = msoPropertiesFactory.getMsoJavaProperties (msoPropID);
+               } catch (MsoPropertiesException e) {
+                       LOGGER.error (MessageEnum.LOAD_PROPERTIES_FAIL, "Unknown. Mso Properties ID not found in cache: " + msoPropID, "", "", MsoLogger.ErrorCode.DataError, "Exception - Mso Properties ID not found in cache", e);
+               }
+        cloudConfig = cloudConfigFactory.getCloudConfig ();
+        LOGGER.debug("MsoHeatUtils:" + msoPropID);
+        
+    }
+
+
+    /**
+     * keep this old method signature here to maintain backwards compatibility. keep others as well.
+     * this method does not include environment, files, or heatFiles
+     */
+    public StackInfo createStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, ? extends Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes) throws MsoException {
+        // Just call the new method with the environment & files variable set to null
+        return this.createStack (cloudSiteId,
+                                 tenantId,
+                                 stackName,
+                                 heatTemplate,
+                                 stackInputs,
+                                 pollForCompletion,
+                                 timeoutMinutes,
+                                 null,
+                                 null,
+                                 null,
+                                 true);
+    }
+
+    // This method has environment, but not files or heatFiles
+    public StackInfo createStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, ? extends Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes,
+                                  String environment) throws MsoException {
+        // Just call the new method with the files/heatFiles variables set to null
+        return this.createStack (cloudSiteId,
+                                 tenantId,
+                                 stackName,
+                                 heatTemplate,
+                                 stackInputs,
+                                 pollForCompletion,
+                                 timeoutMinutes,
+                                 environment,
+                                 null,
+                                 null,
+                                 true);
+    }
+
+    // This method has environment and files, but not heatFiles.
+    public StackInfo createStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, ? extends Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes,
+                                  String environment,
+                                  Map <String, Object> files) throws MsoException {
+        return this.createStack (cloudSiteId,
+                                 tenantId,
+                                 stackName,
+                                 heatTemplate,
+                                 stackInputs,
+                                 pollForCompletion,
+                                 timeoutMinutes,
+                                 environment,
+                                 files,
+                                 null,
+                                 true);
+    }
+    
+    // This method has environment, files, heatfiles
+    public StackInfo createStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, ? extends Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes,
+                                  String environment,
+                                  Map <String, Object> files,
+                                  Map <String, Object> heatFiles) throws MsoException {
+        return this.createStack (cloudSiteId,
+                                 tenantId,
+                                 stackName,
+                                 heatTemplate,
+                                 stackInputs,
+                                 pollForCompletion,
+                                 timeoutMinutes,
+                                 environment,
+                                 files,
+                                 heatFiles,
+                                 true);
+    }
+
+    /**
+     * Create a new Stack in the specified cloud location and tenant. The Heat template
+     * and parameter map are passed in as arguments, along with the cloud access credentials.
+     * It is expected that parameters have been validated and contain at minimum the required
+     * parameters for the given template with no extra (undefined) parameters..
+     *
+     * The Stack name supplied by the caller must be unique in the scope of this tenant.
+     * However, it should also be globally unique, as it will be the identifier for the
+     * resource going forward in Inventory. This latter is managed by the higher levels
+     * invoking this function.
+     *
+     * The caller may choose to let this function poll Openstack for completion of the
+     * stack creation, or may handle polling itself via separate calls to query the status.
+     * In either case, a StackInfo object will be returned containing the current status.
+     * When polling is enabled, a status of CREATED is expected. When not polling, a
+     * status of BUILDING is expected.
+     *
+     * An error will be thrown if the requested Stack already exists in the specified
+     * Tenant and Cloud.
+     *
+     * For 1510 - add "environment", "files" (nested templates), and "heatFiles" (get_files) as
+     * parameters for createStack. If environment is non-null, it will be added to the stack.
+     * The nested templates and get_file entries both end up being added to the "files" on the
+     * stack. We must combine them before we add them to the stack if they're both non-null.
+     *
+     * @param cloudSiteId The cloud (may be a region) in which to create the stack.
+     * @param tenantId The Openstack ID of the tenant in which to create the Stack
+     * @param stackName The name of the stack to create
+     * @param stackTemplate The Heat template
+     * @param stackInputs A map of key/value inputs
+     * @param pollForCompletion Indicator that polling should be handled in Java vs. in the client
+     * @param environment An optional yaml-format string to specify environmental parameters
+     * @param files a Map<String, Object> that lists the child template IDs (file is the string, object is an int of
+     *        Template id)
+     * @param heatFiles a Map<String, Object> that lists the get_file entries (fileName, fileBody)
+     * @param backout Donot delete stack on create Failure - defaulted to True
+     * @return A StackInfo object
+     * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception.
+     */
+
+    @SuppressWarnings("unchecked")
+    public StackInfo createStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, ? extends Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes,
+                                  String environment,
+                                  Map <String, Object> files,
+                                  Map <String, Object> heatFiles,
+                                  boolean backout) throws MsoException {
+        // Create local variables checking to see if we have an environment, nested, get_files
+        // Could later add some checks to see if it's valid.
+        boolean haveEnvtVariable = true;
+        if (environment == null || "".equalsIgnoreCase (environment.trim ())) {
+            haveEnvtVariable = false;
+            LOGGER.debug ("createStack called with no environment variable");
+        } else {
+            LOGGER.debug ("createStack called with an environment variable: " + environment);
+        }
+
+        boolean haveFiles = true;
+        if (files == null || files.isEmpty ()) {
+            haveFiles = false;
+            LOGGER.debug ("createStack called with no files / child template ids");
+        } else {
+            LOGGER.debug ("createStack called with " + files.size () + " files / child template ids");
+        }
+
+        boolean haveHeatFiles = true;
+        if (heatFiles == null || heatFiles.isEmpty ()) {
+            haveHeatFiles = false;
+            LOGGER.debug ("createStack called with no heatFiles");
+        } else {
+            LOGGER.debug ("createStack called with " + heatFiles.size () + " heatFiles");
+        }
+
+        // Obtain the cloud site information where we will create the stack
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+        // Get a Heat client. They are cached between calls (keyed by tenantId:cloudId)
+        // This could throw MsoTenantNotFound or MsoOpenstackException (both propagated)
+        Heat heatClient = getHeatClient (cloudSite, tenantId);
+
+        LOGGER.debug ("Ready to Create Stack (" + heatTemplate + ") with input params: " + stackInputs);
+
+        // Build up the stack to create
+        // Disable auto-rollback, because error reason is lost. Always rollback in the code.
+        CreateStackParam stack = new CreateStackParam ();
+        stack.setStackName (stackName);
+        stack.setTimeoutMinutes (timeoutMinutes);
+        stack.setParameters ((Map <String, Object>) stackInputs);
+        stack.setTemplate (heatTemplate);
+        stack.setDisableRollback (true);
+        // TJM New for PO Adapter - add envt variable
+        if (haveEnvtVariable) {
+            LOGGER.debug ("Found an environment variable - value: " + environment);
+            stack.setEnvironment (environment);
+        }
+        // Now handle nested templates or get_files - have to combine if we have both
+        // as they're both treated as "files:" on the stack.
+        if (haveFiles && haveHeatFiles) {
+            // Let's do this here - not in the bean
+            LOGGER.debug ("Found files AND heatFiles - combine and add!");
+            Map <String, Object> combinedFiles = new HashMap <String, Object> ();
+            for (String keyString : files.keySet ()) {
+                combinedFiles.put (keyString, files.get (keyString));
+            }
+            for (String keyString : heatFiles.keySet ()) {
+                combinedFiles.put (keyString, heatFiles.get (keyString));
+            }
+            stack.setFiles (combinedFiles);
+        } else {
+            // Handle if we only have one or neither:
+            if (haveFiles) {
+                LOGGER.debug ("Found files - adding to stack");
+                stack.setFiles (files);
+            }
+            if (haveHeatFiles) {
+                LOGGER.debug ("Found heatFiles - adding to stack");
+                // the setFiles was modified to handle adding the entries
+                stack.setFiles (heatFiles);
+            }
+        }
+
+        Stack heatStack = null;
+        try {
+            // Execute the actual Openstack command to create the Heat stack
+            OpenStackRequest <Stack> request = heatClient.getStacks ().create (stack);
+            // Begin X-Auth-User
+            // Obtain an MSO token for the tenant
+            CloudIdentity cloudIdentity = cloudSite.getIdentityService ();
+            // cloudIdentity.getMsoId(), cloudIdentity.getMsoPass()
+            //req
+            request.header ("X-Auth-User", cloudIdentity.getMsoId ());
+            request.header ("X-Auth-Key", cloudIdentity.getMsoPass ());
+            LOGGER.debug ("headers added, about to executeAndRecordOpenstackRequest");
+            LOGGER.debug(this.requestToStringBuilder(stack).toString());
+            // END - try to fix X-Auth-User
+            heatStack = executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackResponseException e) {
+            // Since this came on the 'Create Stack' command, nothing was changed
+            // in the cloud. Return the error as an exception.
+            if (e.getStatus () == 409) {
+                // Stack already exists. Return a specific error for this case
+                MsoStackAlreadyExists me = new MsoStackAlreadyExists (stackName, tenantId, cloudSiteId);
+                me.addContext (CREATE_STACK);
+                throw me;
+            } else {
+                // Convert the OpenStackResponseException to an MsoOpenstackException
+               LOGGER.debug("ERROR STATUS = " + e.getStatus() + ",\n" + e.getMessage() + "\n" + e.getLocalizedMessage());
+                throw heatExceptionToMsoException (e, CREATE_STACK);
+            }
+        } catch (OpenStackConnectException e) {
+            // Error connecting to Openstack instance. Convert to an MsoException
+            throw heatExceptionToMsoException (e, CREATE_STACK);
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, CREATE_STACK);
+        }
+
+        // Subsequent access by the canonical name "<stack name>/<stack-id>".
+        // Otherwise, simple query by name returns a 302 redirect.
+        // NOTE: This is specific to the v1 Orchestration API.
+        String canonicalName = stackName + "/" + heatStack.getId ();
+
+        // If client has requested a final response, poll for stack completion
+        if (pollForCompletion) {
+            // Set a time limit on overall polling.
+            // Use the resource (template) timeout for Openstack (expressed in minutes)
+            // and add one poll interval to give Openstack a chance to fail on its own.
+            int createPollInterval = msoProps.getIntProperty (createPollIntervalProp, createPollIntervalDefault);
+            int pollTimeout = (timeoutMinutes * 60) + createPollInterval;
+            // New 1610 - poll on delete if we rollback - use same values for now
+            int deletePollInterval = createPollInterval;
+            int deletePollTimeout = pollTimeout;
+            boolean createTimedOut = false;
+            StringBuilder stackErrorStatusReason = new StringBuilder("");
+            LOGGER.debug("createPollInterval=" + createPollInterval + ", pollTimeout=" + pollTimeout);
+
+            while (true) {
+                try {
+                    heatStack = queryHeatStack (heatClient, canonicalName);
+                    LOGGER.debug (heatStack.getStackStatus () + " (" + canonicalName + ")");
+
+                    if ("CREATE_IN_PROGRESS".equals (heatStack.getStackStatus ())) {
+                        // Stack creation is still running.
+                        // Sleep and try again unless timeout has been reached
+                        if (pollTimeout <= 0) {
+                            // Note that this should not occur, since there is a timeout specified
+                            // in the Openstack call.
+                            LOGGER.error (MessageEnum.RA_CREATE_STACK_TIMEOUT, cloudSiteId, tenantId, stackName, heatStack.getStackStatus (), "", "", MsoLogger.ErrorCode.AvailabilityError, "Create stack timeout");
+                            createTimedOut = true;
+                            break;
+                        }
+                        try {
+                            Thread.sleep (createPollInterval * 1000L);
+                        } catch (InterruptedException e) {
+                            LOGGER.debug ("Thread interrupted while sleeping", e);
+                        }
+
+                        pollTimeout -= createPollInterval;
+                               LOGGER.debug("pollTimeout remaining: " + pollTimeout);
+                    } else {
+                       //save off the status & reason msg before we attempt delete
+                       stackErrorStatusReason.append("Stack error (" + heatStack.getStackStatus() + "): " + heatStack.getStackStatusReason());
+                        break;
+                    }
+                } catch (MsoException me) {
+                       // Cannot query the stack status. Something is wrong.
+                       // Try to roll back the stack
+                       if (!backout)
+                       {
+                               LOGGER.warn(MessageEnum.RA_CREATE_STACK_ERR, "Create Stack errored, stack deletion suppressed", "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in Create Stack, stack deletion suppressed");
+                       }       
+                       else
+                       {
+                               try {
+                                       LOGGER.debug("Create Stack error - unable to query for stack status - attempting to delete stack: " + canonicalName + " - This will likely fail and/or we won't be able to query to see if delete worked");
+                                       OpenStackRequest <Void> request = heatClient.getStacks ().deleteByName (canonicalName);
+                                       executeAndRecordOpenstackRequest (request, msoProps);
+                                       // this may be a waste of time - if we just got an exception trying to query the stack - we'll just
+                                       // get another one, n'est-ce pas? 
+                                       boolean deleted = false;
+                                       while (!deleted) {
+                                               try {
+                                                       heatStack = queryHeatStack(heatClient, canonicalName);
+                                                       if (heatStack != null) {
+                                                       LOGGER.debug(heatStack.getStackStatus());
+                                                       if ("DELETE_IN_PROGRESS".equals(heatStack.getStackStatus())) {
+                                                               if (deletePollTimeout <= 0) {
+                                                                       LOGGER.error (MessageEnum.RA_CREATE_STACK_TIMEOUT, cloudSiteId, tenantId, stackName, 
+                                                                                       heatStack.getStackStatus (), "", "", MsoLogger.ErrorCode.AvailabilityError, 
+                                                                                       "Rollback: DELETE stack timeout");
+                                                                       break;
+                                                               } else {
+                                                                       try {
+                                                                               Thread.sleep(deletePollInterval * 1000L);
+                                                                       } catch (InterruptedException ie) {
+                                                                               LOGGER.debug("Thread interrupted while sleeping", ie);
+                                                                       }
+                                                                       deletePollTimeout -= deletePollInterval;
+                                                               }
+                                                       } else if ("DELETE_COMPLETE".equals(heatStack.getStackStatus())){
+                                                               LOGGER.debug("DELETE_COMPLETE for " + canonicalName);
+                                                               deleted = true;
+                                                               continue;
+                                                       } else {
+                                                               //got a status other than DELETE_IN_PROGRESS or DELETE_COMPLETE - so break and evaluate
+                                                               break;
+                                                       }
+                                               } else {
+                                                       // assume if we can't find it - it's deleted
+                                                       LOGGER.debug("heatStack returned null - assume the stack " + canonicalName + " has been deleted");
+                                                       deleted = true;
+                                                       continue;
+                                                       }
+                                                       
+                                               } catch (Exception e3) {
+                                                       // Just log this one. We will report the original exception.
+                                                       LOGGER.error (MessageEnum.RA_CREATE_STACK_ERR, "Create Stack: Nested exception rolling back stack: " + e3, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Create Stack: Nested exception rolling back stack on error on query");
+                                                       
+                                               }
+                                       }
+                               } catch (Exception e2) {
+                                       // Just log this one. We will report the original exception.
+                                       LOGGER.error (MessageEnum.RA_CREATE_STACK_ERR, "Create Stack: Nested exception rolling back stack: " + e2, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Create Stack: Nested exception rolling back stack");
+                               }
+                       }
+
+                    // Propagate the original exception from Stack Query.
+                    me.addContext (CREATE_STACK);
+                    throw me;
+                }
+            }
+
+            if (!"CREATE_COMPLETE".equals (heatStack.getStackStatus ())) {
+                LOGGER.error (MessageEnum.RA_CREATE_STACK_ERR, "Create Stack error:  Polling complete with non-success status: "
+                              + heatStack.getStackStatus () + ", " + heatStack.getStackStatusReason (), "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Create Stack error");
+
+                // Rollback the stack creation, since it is in an indeterminate state.
+                if (!backout)
+                {
+                       LOGGER.warn(MessageEnum.RA_CREATE_STACK_ERR, "Create Stack errored, stack deletion suppressed", "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Create Stack error, stack deletion suppressed");
+                }
+                else
+                {
+                       try {
+                               LOGGER.debug("Create Stack errored - attempting to DELETE stack: " + canonicalName);
+                               LOGGER.debug("deletePollInterval=" + deletePollInterval + ", deletePollTimeout=" + deletePollTimeout);
+                               OpenStackRequest <Void> request = heatClient.getStacks ().deleteByName (canonicalName);
+                               executeAndRecordOpenstackRequest (request, msoProps);
+                               boolean deleted = false;
+                               while (!deleted) {
+                                       try {
+                                               heatStack = queryHeatStack(heatClient, canonicalName);
+                                               if (heatStack != null) {
+                                                       LOGGER.debug(heatStack.getStackStatus() + " (" + canonicalName + ")");
+                                                       if ("DELETE_IN_PROGRESS".equals(heatStack.getStackStatus())) {
+                                                               if (deletePollTimeout <= 0) {
+                                                                       LOGGER.error (MessageEnum.RA_CREATE_STACK_TIMEOUT, cloudSiteId, tenantId, stackName, 
+                                                                                       heatStack.getStackStatus (), "", "", MsoLogger.ErrorCode.AvailabilityError, 
+                                                                                       "Rollback: DELETE stack timeout");
+                                                                       break;
+                                                               } else {
+                                                                       try {
+                                                                               Thread.sleep(deletePollInterval * 1000L);
+                                                                       } catch (InterruptedException ie) {
+                                                                               LOGGER.debug("Thread interrupted while sleeping", ie);
+                                                                       }
+                                                                       deletePollTimeout -= deletePollInterval;
+                                                                       LOGGER.debug("deletePollTimeout remaining: " + deletePollTimeout);
+                                                               }
+                                                       } else if ("DELETE_COMPLETE".equals(heatStack.getStackStatus())){
+                                                               LOGGER.debug("DELETE_COMPLETE for " + canonicalName);
+                                                               deleted = true;
+                                                               continue;
+                                                       } else if ("DELETE_FAILED".equals(heatStack.getStackStatus())) {
+                                                               // Warn about this (?) - but still throw the original exception
+                                                               LOGGER.warn(MessageEnum.RA_CREATE_STACK_ERR, "Create Stack errored, stack deletion FAILED", "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Create Stack error, stack deletion FAILED");
+                                                               LOGGER.debug("Stack deletion FAILED on a rollback of a create - " + canonicalName + ", status=" + heatStack.getStackStatus() + ", reason=" + heatStack.getStackStatusReason());
+                                                               break;
+                                                       } else {
+                                                               //got a status other than DELETE_IN_PROGRESS or DELETE_COMPLETE - so break and evaluate
+                                                               break;
+                                                       }
+                                               } else {
+                                                       // assume if we can't find it - it's deleted
+                                                       LOGGER.debug("heatStack returned null - assume the stack " + canonicalName + " has been deleted");
+                                                       deleted = true;
+                                                       continue;
+                                               }
+                                               
+                                       } catch (MsoException me2) {
+                                               // We got an exception on the delete - don't throw this exception - throw the original - just log.
+                                               LOGGER.debug("Exception thrown trying to delete " + canonicalName + " on a create->rollback: " + me2.getContextMessage());
+                                               LOGGER.warn(MessageEnum.RA_CREATE_STACK_ERR, "Create Stack errored, then stack deletion FAILED - exception thrown", "", "", MsoLogger.ErrorCode.BusinessProcesssError, me2.getContextMessage());
+                                       }
+                                       
+                               } // end while !deleted
+                               StringBuilder errorContextMessage = null;
+                               if (createTimedOut) {
+                                       errorContextMessage = new StringBuilder("Stack Creation Timeout");
+                               } else {
+                                       errorContextMessage  = stackErrorStatusReason;
+                               }
+                               if (deleted) {
+                                       errorContextMessage.append(" - stack successfully deleted");
+                               } else {
+                                       errorContextMessage.append(" - encountered an error trying to delete the stack");
+                               }
+//                             MsoOpenstackException me = new MsoOpenstackException(0, "", stackErrorStatusReason.toString());
+ //                            me.addContext(CREATE_STACK);
+  //                           alarmLogger.sendAlarm(HEAT_ERROR, MsoAlarmLogger.CRITICAL, me.getContextMessage());
+   //                          throw me;
+                       } catch (Exception e2) {
+                               // shouldn't happen - but handle
+                               LOGGER.error (MessageEnum.RA_CREATE_STACK_ERR, "Create Stack: Nested exception rolling back stack: " + e2, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in Create Stack: rolling back stack");
+                       }
+                } 
+                MsoOpenstackException me = new MsoOpenstackException(0, "", stackErrorStatusReason.toString());
+                me.addContext(CREATE_STACK);
+                alarmLogger.sendAlarm(HEAT_ERROR, MsoAlarmLogger.CRITICAL, me.getContextMessage());
+                throw me;
+            }
+
+        } else {
+            // Get initial status, since it will have been null after the create.
+            heatStack = queryHeatStack (heatClient, canonicalName);
+            LOGGER.debug (heatStack.getStackStatus ());
+        }
+
+        return new StackInfo (heatStack);
+    }
+
+    /**
+     * Query for a single stack (by Name) in a tenant. This call will always return a
+     * StackInfo object. If the stack does not exist, an "empty" StackInfo will be
+     * returned - containing only the stack name and a status of NOTFOUND.
+     *
+     * @param tenantId The Openstack ID of the tenant in which to query
+     * @param cloudSiteId The cloud identifier (may be a region) in which to query
+     * @param stackName The name of the stack to query (may be simple or canonical)
+     * @return A StackInfo object
+     * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception.
+     */
+    public StackInfo queryStack (String cloudSiteId, String tenantId, String stackName) throws MsoException {
+        LOGGER.debug ("Query HEAT stack: " + stackName + " in tenant " + tenantId);
+
+        // Obtain the cloud site information where we will create the stack
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+
+        // Get a Heat client. They are cached between calls (keyed by tenantId:cloudId)
+        Heat heatClient = null;
+        try {
+            heatClient = getHeatClient (cloudSite, tenantId);
+        } catch (MsoTenantNotFound e) {
+            // Tenant doesn't exist, so stack doesn't either
+            LOGGER.debug ("Tenant with id " + tenantId + "not found.", e);
+            return new StackInfo (stackName, HeatStatus.NOTFOUND, null, null);
+        } catch (MsoException me) {
+            // Got an Openstack error. Propagate it
+            LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "Openstack Exception on Token request: " + me, "Openstack", "", MsoLogger.ErrorCode.AvailabilityError, "Connection Exception");
+            me.addContext ("QueryStack");
+            throw me;
+        }
+
+        // Query the Stack.
+        // An MsoException will propagate transparently to the caller.
+        Stack heatStack = queryHeatStack (heatClient, stackName);
+
+        if (heatStack == null) {
+            // Stack does not exist. Return a StackInfo with status NOTFOUND
+            StackInfo stackInfo = new StackInfo (stackName, HeatStatus.NOTFOUND, null, null);
+            return stackInfo;
+        }
+
+        return new StackInfo (heatStack);
+    }
+
+    /**
+     * Delete a stack (by Name/ID) in a tenant. If the stack is not found, it will be
+     * considered a successful deletion. The return value is a StackInfo object which
+     * contains the current stack status.
+     *
+     * The client may choose to let the adapter poll Openstack for completion of the
+     * stack deletion, or may handle polling itself via separate query calls. In either
+     * case, a StackInfo object will be returned. When polling is enabled, a final
+     * status of NOTFOUND is expected. When not polling, a status of DELETING is expected.
+     *
+     * There is no rollback from a successful stack deletion. A deletion failure will
+     * also result in an undefined stack state - the components may or may not have been
+     * all or partially deleted, so the resulting stack must be considered invalid.
+     *
+     * @param tenantId The Openstack ID of the tenant in which to perform the delete
+     * @param cloudSiteId The cloud identifier (may be a region) from which to delete the stack.
+     * @param stackName The name/id of the stack to delete. May be simple or canonical
+     * @param pollForCompletion Indicator that polling should be handled in Java vs. in the client
+     * @return A StackInfo object
+     * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception.
+     * @throws MsoCloudSiteNotFound
+     */
+    public StackInfo deleteStack (String tenantId,
+                                  String cloudSiteId,
+                                  String stackName,
+                                  boolean pollForCompletion) throws MsoException {
+        // Obtain the cloud site information where we will create the stack
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+
+        // Get a Heat client. They are cached between calls (keyed by tenantId:cloudId)
+        Heat heatClient = null;
+        try {
+            heatClient = getHeatClient (cloudSite, tenantId);
+        } catch (MsoTenantNotFound e) {
+            // Tenant doesn't exist, so stack doesn't either
+            LOGGER.debug ("Tenant with id " + tenantId + "not found.", e);
+            return new StackInfo (stackName, HeatStatus.NOTFOUND, null, null);
+        } catch (MsoException me) {
+            // Got an Openstack error. Propagate it
+            LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "Openstack", "Openstack Exception on Token request: " + me, "Openstack", "", MsoLogger.ErrorCode.AvailabilityError, "Connection Exception");
+            me.addContext (DELETE_STACK);
+            throw me;
+        }
+
+        // OK if stack not found, perform a query first
+        Stack heatStack = queryHeatStack (heatClient, stackName);
+        if (heatStack == null || "DELETE_COMPLETE".equals (heatStack.getStackStatus ())) {
+            // Not found. Return a StackInfo with status NOTFOUND
+            return new StackInfo (stackName, HeatStatus.NOTFOUND, null, null);
+        }
+
+        // Delete the stack.
+
+        // Use canonical name "<stack name>/<stack-id>" to delete.
+        // Otherwise, deletion by name returns a 302 redirect.
+        // NOTE: This is specific to the v1 Orchestration API.
+        String canonicalName = heatStack.getStackName () + "/" + heatStack.getId ();
+
+        try {
+            OpenStackRequest <Void> request = heatClient.getStacks ().deleteByName (canonicalName);
+            executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 404) {
+                // Not found. We are OK with this. Return a StackInfo with status NOTFOUND
+                return new StackInfo (stackName, HeatStatus.NOTFOUND, null, null);
+            } else {
+                // Convert the OpenStackResponseException to an MsoOpenstackException
+                throw heatExceptionToMsoException (e, DELETE_STACK);
+            }
+        } catch (OpenStackConnectException e) {
+            // Error connecting to Openstack instance. Convert to an MsoException
+            throw heatExceptionToMsoException (e, DELETE_STACK);
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, DELETE_STACK);
+        }
+
+        // Requery the stack for current status.
+        // It will probably still exist with "DELETE_IN_PROGRESS" status.
+        heatStack = queryHeatStack (heatClient, canonicalName);
+
+        if (pollForCompletion) {
+            // Set a timeout on polling
+            int pollInterval = msoProps.getIntProperty (deletePollIntervalProp, deletePollIntervalDefault);
+            int pollTimeout = msoProps.getIntProperty (deletePollTimeoutProp, deletePollTimeoutDefault);
+
+            // When querying by canonical name, Openstack returns DELETE_COMPLETE status
+            // instead of "404" (which would result from query by stack name).
+            while (heatStack != null && !"DELETE_COMPLETE".equals (heatStack.getStackStatus ())) {
+                LOGGER.debug ("Stack status: " + heatStack.getStackStatus ());
+
+                if ("DELETE_FAILED".equals (heatStack.getStackStatus ())) {
+                    // Throw a 'special case' of MsoOpenstackException to report the Heat status
+                    String error = "Stack delete error (" + heatStack.getStackStatus ()
+                                   + "): "
+                                   + heatStack.getStackStatusReason ();
+                    MsoOpenstackException me = new MsoOpenstackException (0, "", error);
+                    me.addContext (DELETE_STACK);
+
+                    // Alarm this condition, stack deletion failed
+                    alarmLogger.sendAlarm (HEAT_ERROR, MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+
+                    throw me;
+                }
+
+                if (pollTimeout <= 0) {
+                    LOGGER.error (MessageEnum.RA_DELETE_STACK_TIMEOUT, cloudSiteId, tenantId, stackName, heatStack.getStackStatus (), "", "", MsoLogger.ErrorCode.AvailabilityError, "Delete Stack Timeout");
+
+                    // Throw a 'special case' of MsoOpenstackException to report the Heat status
+                    MsoOpenstackException me = new MsoOpenstackException (0, "", "Stack Deletion Timeout");
+                    me.addContext (DELETE_STACK);
+
+                    // Alarm this condition, stack deletion failed
+                    alarmLogger.sendAlarm (HEAT_ERROR, MsoAlarmLogger.CRITICAL, me.getContextMessage ());
+
+                    throw me;
+                }
+
+                try {
+                    Thread.sleep (pollInterval * 1000L);
+                } catch (InterruptedException e) {
+                    LOGGER.debug ("Thread interrupted while sleeping", e);
+                }
+
+                pollTimeout -= pollInterval;
+
+                heatStack = queryHeatStack (heatClient, canonicalName);
+            }
+
+            // The stack is gone when this point is reached
+            return new StackInfo (stackName, HeatStatus.NOTFOUND, null, null);
+        }
+
+        // Return the current status (if not polling, the delete may still be in progress)
+        StackInfo stackInfo = new StackInfo (heatStack);
+        stackInfo.setName (stackName);
+
+        return stackInfo;
+    }
+
+    /**
+     * Query for all stacks in a tenant site. This call will return a List of StackInfo
+     * objects, one for each deployed stack.
+     *
+     * Note that this is limited to a single site. To ensure that a tenant is truly
+     * empty would require looping across all tenant endpoints.
+     *
+     * @param tenantId The Openstack ID of the tenant to query
+     * @param cloudSiteId The cloud identifier (may be a region) in which to query.
+     * @return A List of StackInfo objects
+     * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception.
+     * @throws MsoCloudSiteNotFound
+     */
+    public List <StackInfo> queryAllStacks (String tenantId, String cloudSiteId) throws MsoException {
+        // Obtain the cloud site information where we will create the stack
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+
+        // Get a Heat client. They are cached between calls (keyed by tenantId:cloudId)
+        Heat heatClient = getHeatClient (cloudSite, tenantId);
+
+        try {
+            OpenStackRequest <Stacks> request = heatClient.getStacks ().list ();
+            Stacks stacks = executeAndRecordOpenstackRequest (request, msoProps);
+
+            List <StackInfo> stackList = new ArrayList <StackInfo> ();
+
+            // Not sure if returns an empty list or null if no stacks exist
+            if (stacks != null) {
+                for (Stack stack : stacks) {
+                    stackList.add (new StackInfo (stack));
+                }
+            }
+
+            return stackList;
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 404) {
+                // Not sure if this can happen, but return an empty list
+                LOGGER.debug ("queryAllStacks - stack not found: ");
+                return new ArrayList <StackInfo> ();
+            } else {
+                // Convert the OpenStackResponseException to an MsoOpenstackException
+                throw heatExceptionToMsoException (e, QUERY_ALL_STACKS);
+            }
+        } catch (OpenStackConnectException e) {
+            // Error connecting to Openstack instance. Convert to an MsoException
+            throw heatExceptionToMsoException (e, QUERY_ALL_STACKS);
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, QUERY_ALL_STACKS);
+        }
+    }
+
+    /**
+     * Validate parameters to be passed to Heat template. This method performs
+     * three functions:
+     * 1. Apply default values to parameters which have them defined
+     * 2. Report any required parameters that are missing. This will generate an
+     * exception in the caller, since stack create/update operations would fail.
+     * 3. Report and remove any extraneous parameters. This will allow clients to
+     * pass supersets of parameters and not get errors.
+     *
+     * These functions depend on the HeatTemplate definition from the MSO Catalog DB,
+     * along with the input parameter Map. The output is an updated parameter map.
+     * If the parameters are invalid for the template, an IllegalArgumentException
+     * is thrown.
+     */
+    public Map <String, Object> validateStackParams (Map <String, Object> inputParams,
+                                                     HeatTemplate heatTemplate) throws IllegalArgumentException {
+        // Check that required parameters have been supplied for this template type
+        String missingParams = null;
+        List <String> paramList = new ArrayList <String> ();
+
+        // TODO: Enhance DB to support defaults for Heat Template parameters
+
+        for (HeatTemplateParam parm : heatTemplate.getParameters ()) {
+            if (parm.isRequired () && !inputParams.containsKey (parm.getParamName ())) {
+                if (missingParams == null) {
+                    missingParams = parm.getParamName ();
+                } else {
+                    missingParams += "," + parm.getParamName ();
+                }
+            }
+            paramList.add (parm.getParamName ());
+        }
+        if (missingParams != null) {
+            // Problem - missing one or more required parameters
+            String error = "Missing Required inputs for HEAT Template: " + missingParams;
+            LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams + " for HEAT Template", "", "", MsoLogger.ErrorCode.SchemaError, "Missing Required inputs for HEAT Template: " + missingParams);
+            throw new IllegalArgumentException (error);
+        }
+
+        // Remove any extraneous parameters (don't throw an error)
+        Map <String, Object> updatedParams = new HashMap <String, Object> ();
+        List <String> extraParams = new ArrayList <String> ();
+        for (String key : inputParams.keySet ()) {
+            if (!paramList.contains (key)) {
+                // This is not a valid parameter for this template
+                extraParams.add (key);
+            } else {
+                updatedParams.put (key, inputParams.get (key));
+            }
+        }
+        if (!extraParams.isEmpty ()) {
+            LOGGER.warn (MessageEnum.RA_GENERAL_WARNING, "Heat Stack (" + heatTemplate.getTemplateName ()
+                         + ") extra input params received: "
+                         + extraParams, "", "", MsoLogger.ErrorCode.DataError, "Heat Stack (" + heatTemplate.getTemplateName () + ") extra input params received: "+ extraParams);
+        }
+
+        return updatedParams;
+    }
+
+    // ---------------------------------------------------------------
+    // PRIVATE FUNCTIONS FOR USE WITHIN THIS CLASS
+
+    /**
+     * Get a Heat client for the Openstack Identity service.
+     * This requires a 'member'-level userId + password, which will be retrieved from
+     * properties based on the specified cloud Id. The tenant in which to operate
+     * must also be provided.
+     * <p>
+     * On successful authentication, the Heat object will be cached for the
+     * tenantID + cloudId so that it can be reused without reauthenticating with
+     * Openstack every time.
+     *
+     * @param tenantName
+     * @param cloudId
+     * @return an authenticated Heat object
+     */
+    public Heat getHeatClient (CloudSite cloudSite, String tenantId) throws MsoException {
+        String cloudId = cloudSite.getId ();
+
+        // Check first in the cache of previously authorized clients
+        String cacheKey = cloudId + ":" + tenantId;
+        if (heatClientCache.containsKey (cacheKey)) {
+            if (!heatClientCache.get (cacheKey).isExpired ()) {
+                LOGGER.debug ("Using Cached HEAT Client for " + cacheKey);
+                return heatClientCache.get (cacheKey).getHeatClient ();
+            } else {
+                // Token is expired. Remove it from cache.
+                heatClientCache.remove (cacheKey);
+                LOGGER.debug ("Expired Cached HEAT Client for " + cacheKey);
+            }
+        }
+
+        // Obtain an MSO token for the tenant
+        CloudIdentity cloudIdentity = cloudSite.getIdentityService ();
+        String keystoneUrl = cloudIdentity.getKeystoneUrl (cloudId, msoPropID);
+        Keystone keystoneTenantClient = new Keystone (keystoneUrl);
+        Access access = null;
+        try {
+               Authentication credentials = cloudIdentity.getAuthentication ();
+                       
+               OpenStackRequest <Access> request = keystoneTenantClient.tokens ()
+                       .authenticate (credentials).withTenantId (tenantId);
+               
+            access = executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 401) {
+                // Authentication error.
+                String error = "Authentication Failure: tenant=" + tenantId + ",cloud=" + cloudIdentity.getId ();
+                alarmLogger.sendAlarm ("MsoAuthenticationError", MsoAlarmLogger.CRITICAL, error);
+                throw new MsoAdapterException (error);
+            } else {
+                throw keystoneErrorToMsoException (e, TOKEN_AUTH);
+            }
+        } catch (OpenStackConnectException e) {
+            // Connection to Openstack failed
+            MsoIOException me = new MsoIOException (e.getMessage (), e);
+            me.addContext (TOKEN_AUTH);
+            throw me;
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, TOKEN_AUTH);
+        }
+
+        // For DCP/LCP, the region should be the cloudId.
+        String region = cloudSite.getRegionId ();
+        String heatUrl = null;
+        try {
+            heatUrl = KeystoneUtils.findEndpointURL (access.getServiceCatalog (), "orchestration", region, "public");
+        } catch (RuntimeException e) {
+            // This comes back for not found (probably an incorrect region ID)
+            String error = "Orchestration service not found: region=" + region + ",cloud=" + cloudIdentity.getId ();
+            alarmLogger.sendAlarm ("MsoConfigurationError", MsoAlarmLogger.CRITICAL, error);
+            throw new MsoAdapterException (error, e);
+        }
+        // This is needed for testing in the MT cloud
+        if ("MT".equals (cloudId)) {
+            heatUrl = heatUrl.replace ("controller", "mtdnj02bh01wt.bvoip.labs.att.com");
+        }
+
+        Heat heatClient = new Heat (heatUrl);
+        heatClient.token (access.getToken ().getId ());
+
+        heatClientCache.put (cacheKey,
+                             new HeatCacheEntry (heatUrl,
+                                                 access.getToken ().getId (),
+                                                 access.getToken ().getExpires ()));
+        LOGGER.debug ("Caching HEAT Client for " + cacheKey);
+
+        return heatClient;
+    }
+
+    /**
+     * Forcibly expire a HEAT client from the cache. This call is for use by
+     * the KeystoneClient in case where a tenant is deleted. In that case,
+     * all cached credentials must be purged so that fresh authentication is
+     * done if a similarly named tenant is re-created.
+     * <p>
+     * Note: This is probably only applicable to dev/test environments where
+     * the same Tenant Name is repeatedly used for creation/deletion.
+     * <p>
+     *
+     * @param tenantName
+     * @param cloudId
+     */
+    public static void expireHeatClient (String tenantId, String cloudId) {
+        String cacheKey = cloudId + ":" + tenantId;
+        if (heatClientCache.containsKey (cacheKey)) {
+            heatClientCache.remove (cacheKey);
+            LOGGER.debug ("Deleted Cached HEAT Client for " + cacheKey);
+        }
+    }
+
+    /*
+     * Query for a Heat Stack. This function is needed in several places, so
+     * a common method is useful. This method takes an authenticated Heat Client
+     * (which internally identifies the cloud & tenant to search), and returns
+     * a Stack object if found, Null if not found, or an MsoOpenstackException
+     * if the Openstack API call fails.
+     *
+     * The stack name may be a simple name or a canonical name ("{name}/{id}").
+     * When simple name is used, Openstack always returns a 302 redirect which
+     * results in a 2nd request (to the canonical name). Note that query by
+     * canonical name for a deleted stack returns a Stack object with status
+     * "DELETE_COMPLETE" while query by simple name for a deleted stack returns
+     * HTTP 404.
+     *
+     * @param heatClient an authenticated Heat client
+     *
+     * @param stackName the stack name to query
+     *
+     * @return a Stack object that describes the current stack or null if the
+     * requested stack doesn't exist.
+     *
+     * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception
+     */
+    protected Stack queryHeatStack (Heat heatClient, String stackName) throws MsoException {
+        if (stackName == null) {
+            return null;
+        }
+        try {
+            OpenStackRequest <Stack> request = heatClient.getStacks ().byName (stackName);
+            return executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 404) {
+                LOGGER.debug ("queryHeatStack - stack not found: " + stackName);
+                return null;
+            } else {
+                // Convert the OpenStackResponseException to an MsoOpenstackException
+                throw heatExceptionToMsoException (e, "QueryStack");
+            }
+        } catch (OpenStackConnectException e) {
+            // Connection to Openstack failed
+            throw heatExceptionToMsoException (e, "QueryAllStack");
+        }
+    }
+
+    /*
+     * An entry in the Heat Client Cache. It saves the Heat client object
+     * along with the token expiration. After this interval, this cache
+     * item will no longer be used.
+     */
+    private static class HeatCacheEntry implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+
+        private String heatUrl;
+        private String token;
+        private Calendar expires;
+
+        public HeatCacheEntry (String heatUrl, String token, Calendar expires) {
+            this.heatUrl = heatUrl;
+            this.token = token;
+            this.expires = expires;
+        }
+
+        public Heat getHeatClient () {
+            Heat heatClient = new Heat (heatUrl);
+            heatClient.token (token);
+            return heatClient;
+        }
+
+        public boolean isExpired () {
+            if (expires == null) {
+                return true;
+            }
+
+            Calendar now = Calendar.getInstance ();
+            if (now.after (expires)) {
+                return true;
+            }
+
+            return false;
+        }
+    }
+
+    /**
+     * Clean up the Heat client cache to remove expired entries.
+     */
+    public static void heatCacheCleanup () {
+        for (String cacheKey : heatClientCache.keySet ()) {
+            if (heatClientCache.get (cacheKey).isExpired ()) {
+                heatClientCache.remove (cacheKey);
+                LOGGER.debug ("Cleaned Up Cached Heat Client for " + cacheKey);
+            }
+        }
+    }
+
+    /**
+     * Reset the Heat client cache.
+     * This may be useful if cached credentials get out of sync.
+     */
+    public static void heatCacheReset () {
+        heatClientCache = new HashMap <String, HeatCacheEntry> ();
+    }
+    
+       public Map<String, Object> queryStackForOutputs(String cloudSiteId,
+                       String tenantId, String stackName) throws MsoException {
+               LOGGER.debug("MsoHeatUtils.queryStackForOutputs)");
+               StackInfo heatStack = this.queryStack(cloudSiteId, tenantId, stackName);
+               if (heatStack == null || heatStack.getStatus() == HeatStatus.NOTFOUND) {
+                       return null;
+               }
+               Map<String, Object> outputs = heatStack.getOutputs();
+               return outputs;
+       }
+
+       public void queryAndCopyOutputsToInputs(String cloudSiteId,
+                       String tenantId, String stackName, Map<String, String> inputs,
+                       boolean overWrite) throws MsoException {
+               LOGGER.debug("MsoHeatUtils.queryAndCopyOutputsToInputs");
+               Map<String, Object> outputs = this.queryStackForOutputs(cloudSiteId,
+                               tenantId, stackName);
+               this.copyStringOutputsToInputs(inputs, outputs, overWrite);
+               return;
+       }
+
+       public void copyStringOutputsToInputs(Map<String, String> inputs,
+                       Map<String, Object> otherStackOutputs, boolean overWrite) {
+               if (inputs == null || otherStackOutputs == null)
+                       return;
+               for (String key : otherStackOutputs.keySet()) {
+                       if (!inputs.containsKey(key)) {
+                               Object obj = otherStackOutputs.get(key);
+                               if (obj instanceof String) {
+                                       inputs.put(key, (String) otherStackOutputs.get(key));
+                               } else if (obj instanceof JsonNode ){
+                                       // This is a bit of mess - but I think it's the least impacting
+                                       // let's convert it BACK to a string - then it will get converted back later
+                                       try {
+                                               String str = this.convertNode((JsonNode) obj);
+                                               inputs.put(key, str);
+                                       } catch (Exception e) {
+                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for "+ key);
+                                               //effect here is this value will not have been copied to the inputs - and therefore will error out downstream
+                                       }
+                               } else if (obj instanceof java.util.LinkedHashMap) {
+                                       LOGGER.debug("LinkedHashMap - this is showing up as a LinkedHashMap instead of JsonNode");
+                                       try {
+                                               String str = JSON_MAPPER.writeValueAsString(obj);
+                                               inputs.put(key, str);
+                                       } catch (Exception e) {
+                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for "+ key);
+                                       }
+                               } else {
+                                       // just try to cast it - could be an integer or some such
+                                       try {
+                                               String str = (String) obj;
+                                               inputs.put(key, str);
+                                       } catch (Exception e) {
+                                               LOGGER.debug("DANGER WILL ROBINSON: unable to convert value for "+ key);
+                                               //effect here is this value will not have been copied to the inputs - and therefore will error out downstream
+                                       }
+                               }
+                       }
+               }
+               return;
+       }
+       public StringBuilder requestToStringBuilder(CreateStackParam stack) {
+               StringBuilder sb = new StringBuilder();
+               sb.append("Stack:\n");
+               sb.append("\tStackName: " + stack.getStackName());
+               sb.append("\tTemplateUrl: " + stack.getTemplateUrl());
+               sb.append("\tTemplate: " + stack.getTemplate());
+               sb.append("\tEnvironment: " + stack.getEnvironment());
+               sb.append("\tTimeout: " + stack.getTimeoutMinutes());
+               sb.append("\tParameters:\n");
+               Map<String, Object> params = stack.getParameters();
+               if (params == null || params.size() < 1) {
+                       sb.append("\tNONE");
+               } else {
+                       for (String key : params.keySet()) {
+                               if (params.get(key) instanceof String) {
+                                       sb.append("\t" + key + "=" + (String) params.get(key));
+                               } else if (params.get(key) instanceof JsonNode) {
+                                       String jsonStringOut = this.convertNode((JsonNode)params.get(key));
+                                       sb.append("\t" + key + "=" + jsonStringOut);
+                               } else {
+                                       sb.append("\t" + key + "= [some non-string/non-json]");
+                               }
+                       }
+               }
+               return sb;
+       }
+       
+       private String convertNode(final JsonNode node) {
+               try {
+                       final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
+                       final String json = JSON_MAPPER.writeValueAsString(obj);
+                       return json;
+               } catch (JsonParseException jpe) {
+                       LOGGER.debug("Error converting json to string " + jpe.getMessage());
+               } catch (Exception e) {
+                       LOGGER.debug("Error converting json to string " + e.getMessage());
+               }
+               return "[Error converting json to string]";
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
new file mode 100644 (file)
index 0000000..04dfa12
--- /dev/null
@@ -0,0 +1,333 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudSite;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.StackInfo;
+import org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoOpenstackException;
+import org.openecomp.mso.openstack.exceptions.MsoStackNotFound;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import com.woorea.openstack.base.client.OpenStackBaseException;
+import com.woorea.openstack.base.client.OpenStackRequest;
+import com.woorea.openstack.heat.Heat;
+import com.woorea.openstack.heat.model.Stack;
+import com.woorea.openstack.heat.model.UpdateStackParam;
+
+public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
+
+    private static final String UPDATE_STACK = "UpdateStack";
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+    protected MsoJavaProperties msoProps = null;
+
+    public MsoHeatUtilsWithUpdate (String msoPropID, MsoPropertiesFactory msoPropertiesFactory, CloudConfigFactory cloudConfFactory) {
+        super (msoPropID,msoPropertiesFactory,cloudConfFactory);
+        
+       try {
+                       msoProps = msoPropertiesFactory.getMsoJavaProperties (msoPropID);
+               } catch (MsoPropertiesException e) {
+                       LOGGER.error (MessageEnum.LOAD_PROPERTIES_FAIL, "Unknown. Mso Properties ID not found in cache: " + msoPropID, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception Mso Properties ID not found in cache: " + msoPropID, e);
+               }
+    }
+    
+    /*
+     * Keep these methods around for backward compatibility
+     */
+
+    public StackInfo updateStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes) throws MsoException {
+        // Keeping this method to allow compatibility with no environment or files variable sent. In this case,
+        // simply return the new method with the environment variable set to null.
+        return this.updateStack (cloudSiteId,
+                                 tenantId,
+                                 stackName,
+                                 heatTemplate,
+                                 stackInputs,
+                                 pollForCompletion,
+                                 timeoutMinutes,
+                                 null,
+                                 null,
+                                 null);
+    }
+
+    public StackInfo updateStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes,
+                                  String environment) throws MsoException {
+        // Keeping this method to allow compatibility with no environment variable sent. In this case,
+        // simply return the new method with the files variable set to null.
+        return this.updateStack (cloudSiteId,
+                                 tenantId,
+                                 stackName,
+                                 heatTemplate,
+                                 stackInputs,
+                                 pollForCompletion,
+                                 timeoutMinutes,
+                                 environment,
+                                 null,
+                                 null);
+    }
+
+    public StackInfo updateStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes,
+                                  String environment,
+                                  Map <String, Object> files) throws MsoException {
+        return this.updateStack (cloudSiteId,
+                                 tenantId,
+                                 stackName,
+                                 heatTemplate,
+                                 stackInputs,
+                                 pollForCompletion,
+                                 timeoutMinutes,
+                                 environment,
+                                 files,
+                                 null);
+    }
+
+    /**
+     * Update a Stack in the specified cloud location and tenant. The Heat template
+     * and parameter map are passed in as arguments, along with the cloud access credentials.
+     * It is expected that parameters have been validated and contain at minimum the required
+     * parameters for the given template with no extra (undefined) parameters..
+     *
+     * The Stack name supplied by the caller must be unique in the scope of this tenant.
+     * However, it should also be globally unique, as it will be the identifier for the
+     * resource going forward in Inventory. This latter is managed by the higher levels
+     * invoking this function.
+     *
+     * The caller may choose to let this function poll Openstack for completion of the
+     * stack creation, or may handle polling itself via separate calls to query the status.
+     * In either case, a StackInfo object will be returned containing the current status.
+     * When polling is enabled, a status of CREATED is expected. When not polling, a
+     * status of BUILDING is expected.
+     *
+     * An error will be thrown if the requested Stack already exists in the specified
+     * Tenant and Cloud.
+     *
+     * @param tenantId The Openstack ID of the tenant in which to create the Stack
+     * @param cloudSiteId The cloud identifier (may be a region) in which to create the tenant.
+     * @param stackName The name of the stack to update
+     * @param stackTemplate The Heat template
+     * @param stackInputs A map of key/value inputs
+     * @param pollForCompletion Indicator that polling should be handled in Java vs. in the client
+     * @param environment An optional yaml-format string to specify environmental parameters
+     * @param files a Map<String, Object> for listing child template IDs
+     * @param heatFiles a Map<String, Object> for listing get_file entries (fileName, fileBody)
+     * @return A StackInfo object
+     * @throws MsoException Thrown if the Openstack API call returns an exception.
+     */
+
+    public StackInfo updateStack (String cloudSiteId,
+                                  String tenantId,
+                                  String stackName,
+                                  String heatTemplate,
+                                  Map <String, Object> stackInputs,
+                                  boolean pollForCompletion,
+                                  int timeoutMinutes,
+                                  String environment,
+                                  Map <String, Object> files,
+                                  Map <String, Object> heatFiles) throws MsoException {
+        boolean heatEnvtVariable = true;
+        if (environment == null || "".equalsIgnoreCase (environment.trim ())) {
+            heatEnvtVariable = false;
+        }
+        boolean haveFiles = true;
+        if (files == null || files.isEmpty ()) {
+            haveFiles = false;
+        }
+        boolean haveHeatFiles = true;
+        if (heatFiles == null || heatFiles.isEmpty ()) {
+            haveHeatFiles = false;
+        }
+
+        // Obtain the cloud site information where we will create the stack
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+        // Get a Heat client. They are cached between calls (keyed by tenantId:cloudId)
+        // This could throw MsoTenantNotFound or MsoOpenstackException (both propagated)
+        Heat heatClient = getHeatClient (cloudSite, tenantId);
+
+        // Perform a query first to get the current status
+        Stack heatStack = queryHeatStack (heatClient, stackName);
+        if (heatStack == null || "DELETE_COMPLETE".equals (heatStack.getStackStatus ())) {
+            // Not found. Return a StackInfo with status NOTFOUND
+            throw new MsoStackNotFound (stackName, tenantId, cloudSiteId);
+        }
+
+        // Use canonical name "<stack name>/<stack-id>" to update the stack.
+        // Otherwise, update by name returns a 302 redirect.
+        // NOTE: This is specific to the v1 Orchestration API.
+        String canonicalName = heatStack.getStackName () + "/" + heatStack.getId ();
+
+        LOGGER.debug ("Ready to Update Stack (" + canonicalName + ") with input params: " + stackInputs);
+
+        // Build up the stack update parameters
+        // Disable auto-rollback, because error reason is lost. Always rollback in the code.
+        UpdateStackParam stack = new UpdateStackParam ();
+        stack.setTimeoutMinutes (timeoutMinutes);
+        stack.setParameters (stackInputs);
+        stack.setTemplate (heatTemplate);
+        stack.setDisableRollback (true);
+        // TJM add envt to stack
+        if (heatEnvtVariable) {
+            stack.setEnvironment (environment);
+        }
+
+        // Handle nested templates & get_files here. if we have both - must combine
+        // and then add to stack (both are part of "files:" being added to stack)
+        if (haveFiles && haveHeatFiles) {
+            // Let's do this here - not in the bean
+            LOGGER.debug ("Found files AND heatFiles - combine and add!");
+            Map <String, Object> combinedFiles = new HashMap <String, Object> ();
+            for (String keyString : files.keySet ()) {
+                combinedFiles.put (keyString, files.get (keyString));
+            }
+            for (String keyString : heatFiles.keySet ()) {
+                combinedFiles.put (keyString, heatFiles.get (keyString));
+            }
+            stack.setFiles (combinedFiles);
+        } else {
+            // Handle case where we have one or neither
+            if (haveFiles) {
+                stack.setFiles (files);
+            }
+            if (haveHeatFiles) {
+                // setFiles method modified to handle adding a map.
+                stack.setFiles (heatFiles);
+            }
+        }
+
+        try {
+            // Execute the actual Openstack command to update the Heat stack
+            OpenStackRequest <Void> request = heatClient.getStacks ().update (canonicalName, stack);
+            executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackBaseException e) {
+            // Since this came on the 'Update Stack' command, nothing was changed
+            // in the cloud. Rethrow the error as an MSO exception.
+            throw heatExceptionToMsoException (e, UPDATE_STACK);
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, UPDATE_STACK);
+        }
+
+        // If client has requested a final response, poll for stack completion
+        Stack updateStack = null;
+        if (pollForCompletion) {
+            // Set a time limit on overall polling.
+            // Use the resource (template) timeout for Openstack (expressed in minutes)
+            // and add one poll interval to give Openstack a chance to fail on its own.
+            int createPollInterval = msoProps.getIntProperty (createPollIntervalProp, createPollIntervalDefault);
+            int pollTimeout = (timeoutMinutes * 60) + createPollInterval;
+
+            boolean loopAgain = true;
+            while (loopAgain) {
+                try {
+                    updateStack = queryHeatStack (heatClient, canonicalName);
+                    LOGGER.debug (updateStack.getStackStatus ());
+
+                    if ("UPDATE_IN_PROGRESS".equals (updateStack.getStackStatus ())) {
+                        // Stack update is still running.
+                        // Sleep and try again unless timeout has been reached
+                        if (pollTimeout <= 0) {
+                            // Note that this should not occur, since there is a timeout specified
+                            // in the Openstack call.
+                               LOGGER.error (MessageEnum.RA_UPDATE_STACK_TIMEOUT, cloudSiteId, tenantId, stackName, updateStack.getStackStatus(), "", "", MsoLogger.ErrorCode.AvailabilityError, "Update stack timeout");
+                            loopAgain = false;
+                        } else {
+                            try {
+                                Thread.sleep (createPollInterval * 1000L);
+                            } catch (InterruptedException e) {
+                                // If we are interrupted, we should stop ASAP.
+                                loopAgain = false;
+                                // Set again the interrupted flag
+                                Thread.currentThread().interrupt();
+                            }
+                        }
+                        pollTimeout -= createPollInterval;
+                    } else {
+                        loopAgain = false;
+                    }
+                } catch (MsoException e) {
+                    // Cannot query the stack. Something is wrong.
+
+                    // TODO: No way to roll back the stack at this point. What to do?
+                    e.addContext (UPDATE_STACK);
+                    throw e;
+                }
+            }
+
+            if (!"UPDATE_COMPLETE".equals (updateStack.getStackStatus ())) {
+               LOGGER.error (MessageEnum.RA_UPDATE_STACK_ERR, updateStack.getStackStatus(), updateStack.getStackStatusReason(), "", "", MsoLogger.ErrorCode.DataError, "Update Stack error");
+
+                // TODO: No way to roll back the stack at this point. What to do?
+                // Throw a 'special case' of MsoOpenstackException to report the Heat status
+                MsoOpenstackException me = null;
+                if ("UPDATE_IN_PROGRESS".equals (updateStack.getStackStatus ())) {
+                    me = new MsoOpenstackException (0, "", "Stack Update Timeout");
+                } else {
+                    String error = "Stack error (" + updateStack.getStackStatus ()
+                                   + "): "
+                                   + updateStack.getStackStatusReason ();
+                    me = new MsoOpenstackException (0, "", error);
+                }
+                me.addContext (UPDATE_STACK);
+                throw me;
+            }
+
+        } else {
+            // Return the current status.
+            updateStack = queryHeatStack (heatClient, canonicalName);
+            if (updateStack != null) {
+                LOGGER.debug ("UpdateStack, status = " + updateStack.getStackStatus ());
+            } else {
+                LOGGER.debug ("UpdateStack, stack not found");
+            }
+        }
+        return new StackInfo (updateStack);
+    }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
new file mode 100644 (file)
index 0000000..82203d0
--- /dev/null
@@ -0,0 +1,684 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+import java.io.Serializable;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudIdentity;
+import org.openecomp.mso.cloud.CloudSite;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.openstack.beans.MsoTenant;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoOpenstackException;
+import org.openecomp.mso.openstack.exceptions.MsoTenantAlreadyExists;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import com.woorea.openstack.base.client.OpenStackBaseException;
+import com.woorea.openstack.base.client.OpenStackConnectException;
+import com.woorea.openstack.base.client.OpenStackRequest;
+import com.woorea.openstack.base.client.OpenStackResponseException;
+import com.woorea.openstack.keystone.Keystone;
+import com.woorea.openstack.keystone.model.Access;
+import com.woorea.openstack.keystone.model.Metadata;
+import com.woorea.openstack.keystone.model.Role;
+import com.woorea.openstack.keystone.model.Roles;
+import com.woorea.openstack.keystone.model.Tenant;
+import com.woorea.openstack.keystone.model.User;
+import com.woorea.openstack.keystone.utils.KeystoneUtils;
+import com.woorea.openstack.keystone.model.Authentication;
+
+public class MsoKeystoneUtils extends MsoTenantUtils {
+
+    // Cache the Keystone Clients statically. Since there is just one MSO user, there is no
+    // benefit to re-authentication on every request (or across different flows). The
+    // token will be used until it expires.
+    //
+    // The cache key is "cloudId"
+    private static Map <String, KeystoneCacheEntry> adminClientCache = new HashMap <String, KeystoneCacheEntry> ();
+
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+       String msoPropID;
+       
+    public MsoKeystoneUtils (String msoPropID) {
+               super(msoPropID);
+               this.msoPropID = msoPropID;
+               LOGGER.debug("MsoKeyStoneUtils:" + msoPropID);
+       }
+
+    /**
+     * Create a tenant with the specified name in the given cloud. If the tenant already exists,
+     * an Exception will be thrown. The MSO User will also be added to the "member" list of
+     * the new tenant to perform subsequent Nova/Heat commands in the tenant. If the MSO User
+     * association fails, the entire transaction will be rolled back.
+     * <p>
+     * For the AIC Cloud (DCP/LCP): it is not clear that cloudId is needed, as all admin
+     * requests go to the centralized identity service in DCP. However, if some artifact
+     * must exist in each local LCP instance as well, then it will be needed to access the
+     * correct region.
+     * <p>
+     *
+     * @param tenantName The tenant name to create
+     * @param cloudId The cloud identifier (may be a region) in which to create the tenant.
+     * @return the tenant ID of the newly created tenant
+     * @throws MsoTenantAlreadyExists Thrown if the requested tenant already exists
+     * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception
+     */
+    public String createTenant (String tenantName,
+                                String cloudSiteId,
+                                Map <String, String> metadata,
+                                boolean backout) throws MsoException {
+        // Obtain the cloud site information where we will create the tenant
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+               LOGGER.error(MessageEnum.RA_CREATE_TENANT_ERR, "MSOCloudSite not found", "", "", MsoLogger.ErrorCode.DataError, "MSOCloudSite not found");
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+        Keystone keystoneAdminClient = getKeystoneAdminClient (cloudSite);
+
+        Tenant tenant = null;
+        try {
+            // Check if the tenant already exists
+            tenant = findTenantByName (keystoneAdminClient, tenantName);
+
+            if (tenant != null) {
+                // Tenant already exists. Throw an exception
+               LOGGER.error(MessageEnum.RA_TENANT_ALREADY_EXIST, tenantName, cloudSiteId, "", "", MsoLogger.ErrorCode.DataError, "Tenant already exists");
+                throw new MsoTenantAlreadyExists (tenantName, cloudSiteId);
+            }
+
+            // Does not exist, create a new one
+            tenant = new Tenant ();
+            tenant.setName (tenantName);
+            tenant.setDescription ("SDN Tenant (via MSO)");
+            tenant.setEnabled (true);
+
+            OpenStackRequest <Tenant> request = keystoneAdminClient.tenants ().create (tenant);
+            tenant = executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackBaseException e) {
+            // Convert Keystone OpenStackResponseException to MsoOpenstackException
+            throw keystoneErrorToMsoException (e, "CreateTenant");
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, "CreateTenant");
+        }
+
+        // Add MSO User to the tenant as a member and
+        // apply tenant metadata if supported by the cloud site
+        try {
+            CloudIdentity cloudIdentity = cloudSite.getIdentityService ();
+
+            User msoUser = findUserByNameOrId (keystoneAdminClient, cloudIdentity.getMsoId ());
+            Role memberRole = findRoleByNameOrId (keystoneAdminClient, cloudIdentity.getMemberRole ());
+
+            OpenStackRequest <Void> request = keystoneAdminClient.tenants ().addUser (tenant.getId (),
+                                                                                      msoUser.getId (),
+                                                                                      memberRole.getId ());
+            executeAndRecordOpenstackRequest (request, msoProps);
+
+            if (cloudIdentity.hasTenantMetadata () && metadata != null && !metadata.isEmpty ()) {
+                Metadata tenantMetadata = new Metadata ();
+                tenantMetadata.setMetadata (metadata);
+
+                OpenStackRequest <Metadata> metaRequest = keystoneAdminClient.tenants ()
+                                                                             .createOrUpdateMetadata (tenant.getId (),
+                                                                                                      tenantMetadata);
+                executeAndRecordOpenstackRequest (metaRequest, msoProps);
+            }
+        } catch (Exception e) {
+            // Failed to attach MSO User to the new tenant. Can't operate without access,
+            // so roll back the tenant.
+               if (!backout)
+               {
+                       LOGGER.warn(MessageEnum.RA_CREATE_TENANT_ERR, "Create Tenant errored, Tenant deletion suppressed", "Openstack", "", MsoLogger.ErrorCode.DataError, "Create Tenant error, Tenant deletion suppressed");
+               }
+               else
+               {
+                       try {
+                               OpenStackRequest <Void> request = keystoneAdminClient.tenants ().delete (tenant.getId ());
+                               executeAndRecordOpenstackRequest (request, msoProps);
+                       } catch (Exception e2) {
+                               // Just log this one. We will report the original exception.
+                               LOGGER.error (MessageEnum.RA_CREATE_TENANT_ERR, "Nested exception rolling back tenant", "Openstack", "", MsoLogger.ErrorCode.DataError, "Create Tenant error, Nested exception rolling back tenant", e2);
+                       }
+               }
+               
+
+            // Propagate the original exception on user/role/tenant mapping
+            if (e instanceof OpenStackBaseException) {
+                // Convert Keystone Exception to MsoOpenstackException
+                throw keystoneErrorToMsoException ((OpenStackBaseException) e, "CreateTenantUser");
+            } else {
+                MsoAdapterException me = new MsoAdapterException (e.getMessage (), e);
+                me.addContext ("CreateTenantUser");
+                throw me;
+            }
+        }
+        return tenant.getId ();
+    }
+
+    /**
+     * Query for a tenant by ID in the given cloud. If the tenant exists,
+     * return an MsoTenant object. If not, return null.
+     * <p>
+     * For the AIC Cloud (DCP/LCP): it is not clear that cloudId is needed, as all admin
+     * requests go to the centralized identity service in DCP. However, if some artifact
+     * must exist in each local LCP instance as well, then it will be needed to access the
+     * correct region.
+     * <p>
+     *
+     * @param tenantId The Openstack ID of the tenant to query
+     * @param cloudSiteId The cloud identifier (may be a region) in which to query the tenant.
+     * @return the tenant properties of the queried tenant, or null if not found
+     * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception
+     */
+    public MsoTenant queryTenant (String tenantId, String cloudSiteId) throws MsoException, MsoCloudSiteNotFound {
+        // Obtain the cloud site information where we will query the tenant
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+
+        Keystone keystoneAdminClient = getKeystoneAdminClient (cloudSite);
+
+        // Check if the tenant exists and return its Tenant Id
+        try {
+            Tenant tenant = findTenantById (keystoneAdminClient, tenantId);
+            if (tenant == null) {
+                return null;
+            }
+
+            Map <String, String> metadata = new HashMap <String, String> ();
+            if (cloudSite.getIdentityService ().hasTenantMetadata ()) {
+                OpenStackRequest <Metadata> request = keystoneAdminClient.tenants ().showMetadata (tenant.getId ());
+                Metadata tenantMetadata = executeAndRecordOpenstackRequest (request, msoProps);
+                if (tenantMetadata != null) {
+                    metadata = tenantMetadata.getMetadata ();
+                }
+            }
+            return new MsoTenant (tenant.getId (), tenant.getName (), metadata);
+        } catch (OpenStackBaseException e) {
+            // Convert Keystone OpenStackResponseException to MsoOpenstackException
+            throw keystoneErrorToMsoException (e, "QueryTenant");
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, "QueryTenant");
+        }
+    }
+
+    /**
+     * Query for a tenant with the specified name in the given cloud. If the tenant exists,
+     * return an MsoTenant object. If not, return null. This query is useful if the client
+     * knows it has the tenant name, skipping an initial lookup by ID that would always fail.
+     * <p>
+     * For the AIC Cloud (DCP/LCP): it is not clear that cloudId is needed, as all admin
+     * requests go to the centralized identity service in DCP. However, if some artifact
+     * must exist in each local LCP instance as well, then it will be needed to access the
+     * correct region.
+     * <p>
+     *
+     * @param tenantName The name of the tenant to query
+     * @param cloudSiteId The cloud identifier (may be a region) in which to query the tenant.
+     * @return the tenant properties of the queried tenant, or null if not found
+     * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception
+     */
+    public MsoTenant queryTenantByName (String tenantName, String cloudSiteId) throws MsoException {
+        // Obtain the cloud site information where we will query the tenant
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+        Keystone keystoneAdminClient = getKeystoneAdminClient (cloudSite);
+
+        try {
+            Tenant tenant = findTenantByName (keystoneAdminClient, tenantName);
+            if (tenant == null) {
+                return null;
+            }
+
+            Map <String, String> metadata = new HashMap <String, String> ();
+            if (cloudSite.getIdentityService ().hasTenantMetadata ()) {
+                OpenStackRequest <Metadata> request = keystoneAdminClient.tenants ().showMetadata (tenant.getId ());
+                Metadata tenantMetadata = executeAndRecordOpenstackRequest (request, msoProps);
+                if (tenantMetadata != null) {
+                    metadata = tenantMetadata.getMetadata ();
+                }
+            }
+            return new MsoTenant (tenant.getId (), tenant.getName (), metadata);
+        } catch (OpenStackBaseException e) {
+            // Convert Keystone OpenStackResponseException to MsoOpenstackException
+            throw keystoneErrorToMsoException (e, "QueryTenantName");
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, "QueryTenantName");
+        }
+    }
+
+    /**
+     * Delete the specified Tenant (by ID) in the given cloud. This method returns true or
+     * false, depending on whether the tenant existed and was successfully deleted, or if
+     * the tenant already did not exist. Both cases are treated as success (no Exceptions).
+     * <p>
+     * Note for the AIC Cloud (DCP/LCP): all admin requests go to the centralized identity
+     * service in DCP. So deleting a tenant from one cloudSiteId will remove it from all
+     * sites managed by that identity service.
+     * <p>
+     *
+     * @param tenantId The Openstack ID of the tenant to delete
+     * @param cloudSiteId The cloud identifier from which to delete the tenant.
+     * @return true if the tenant was deleted, false if the tenant did not exist.
+     * @throws MsoOpenstackException If the Openstack API call returns an exception.
+     */
+    public boolean deleteTenant (String tenantId, String cloudSiteId) throws MsoException {
+        // Obtain the cloud site information where we will query the tenant
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+        Keystone keystoneAdminClient = getKeystoneAdminClient (cloudSite);
+
+        try {
+            // Check that the tenant exists. Also, need the ID to delete
+            Tenant tenant = findTenantById (keystoneAdminClient, tenantId);
+            if (tenant == null) {
+               LOGGER.error(MessageEnum.RA_TENANT_NOT_FOUND, tenantId, cloudSiteId, "", "", MsoLogger.ErrorCode.DataError, "Tenant not found");
+                return false;
+            }
+
+            OpenStackRequest <Void> request = keystoneAdminClient.tenants ().delete (tenant.getId ());
+            executeAndRecordOpenstackRequest (request, msoProps);
+            LOGGER.debug ("Deleted Tenant " + tenant.getId () + " (" + tenant.getName () + ")");
+
+            // Clear any cached clients. Not really needed, ID will not be reused.
+            MsoHeatUtils.expireHeatClient (tenant.getId (), cloudSiteId);
+            MsoNeutronUtils.expireNeutronClient (tenant.getId (), cloudSiteId);
+        } catch (OpenStackBaseException e) {
+            // Convert Keystone OpenStackResponseException to MsoOpenstackException
+            throw keystoneErrorToMsoException (e, "Delete Tenant");
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, "DeleteTenant");
+        }
+
+        return true;
+    }
+
+    /**
+     * Delete the specified Tenant (by Name) in the given cloud. This method returns true or
+     * false, depending on whether the tenant existed and was successfully deleted, or if
+     * the tenant already did not exist. Both cases are treated as success (no Exceptions).
+     * <p>
+     * Note for the AIC Cloud (DCP/LCP): all admin requests go to the centralized identity
+     * service in DCP. So deleting a tenant from one cloudSiteId will remove it from all
+     * sites managed by that identity service.
+     * <p>
+     *
+     * @param tenantName The name of the tenant to delete
+     * @param cloudSiteId The cloud identifier from which to delete the tenant.
+     * @return true if the tenant was deleted, false if the tenant did not exist.
+     * @throws MsoOpenstackException If the Openstack API call returns an exception.
+     */
+    public boolean deleteTenantByName (String tenantName, String cloudSiteId) throws MsoException {
+        // Obtain the cloud site information where we will query the tenant
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+            throw new MsoCloudSiteNotFound (cloudSiteId);
+        }
+        Keystone keystoneAdminClient = getKeystoneAdminClient (cloudSite);
+
+        try {
+            // Need the Tenant ID to delete (can't directly delete by name)
+            Tenant tenant = findTenantByName (keystoneAdminClient, tenantName);
+            if (tenant == null) {
+                // OK if tenant already doesn't exist.
+               LOGGER.error(MessageEnum.RA_TENANT_NOT_FOUND, tenantName, cloudSiteId, "", "", MsoLogger.ErrorCode.DataError, "Tenant not found");
+                return false;
+            }
+
+            // Execute the Delete. It has no return value.
+            OpenStackRequest <Void> request = keystoneAdminClient.tenants ().delete (tenant.getId ());
+            executeAndRecordOpenstackRequest (request, msoProps);
+
+            LOGGER.debug ("Deleted Tenant " + tenant.getId () + " (" + tenant.getName () + ")");
+
+            // Clear any cached clients. Not really needed, ID will not be reused.
+            MsoHeatUtils.expireHeatClient (tenant.getId (), cloudSiteId);
+            MsoNeutronUtils.expireNeutronClient (tenant.getId (), cloudSiteId);
+        } catch (OpenStackBaseException e) {
+            // Note: It doesn't seem to matter if tenant doesn't exist, no exception is thrown.
+            // Convert Keystone OpenStackResponseException to MsoOpenstackException
+            throw keystoneErrorToMsoException (e, "DeleteTenant");
+        } catch (RuntimeException e) {
+            // Catch-all
+            throw runtimeExceptionToMsoException (e, "DeleteTenant");
+        }
+
+        return true;
+    }
+
+    // -------------------------------------------------------------------
+    // PRIVATE UTILITY FUNCTIONS FOR USE WITHIN THIS CLASS
+
+    /*
+     * Get a Keystone Admin client for the Openstack Identity service.
+     * This requires an 'admin'-level userId + password along with an 'admin' tenant
+     * in the target cloud. These values will be retrieved from properties based
+     * on the specified cloud ID.
+     * <p>
+     * On successful authentication, the Keystone object will be cached for the cloudId
+     * so that it can be reused without going back to Openstack every time.
+     *
+     * @param cloudId
+     *
+     * @return an authenticated Keystone object
+     */
+    public Keystone getKeystoneAdminClient (CloudSite cloudSite) throws MsoException {
+        CloudIdentity cloudIdentity = cloudSite.getIdentityService ();
+
+        String cloudId = cloudIdentity.getId ();
+        String adminTenantName = cloudIdentity.getAdminTenant ();
+        String region = cloudSite.getRegionId ();
+
+        // Check first in the cache of previously authorized clients
+        KeystoneCacheEntry entry = adminClientCache.get (cloudId);
+        if (entry != null) {
+            if (!entry.isExpired ()) {
+                return entry.getKeystoneClient ();
+            } else {
+                // Token is expired. Remove it from cache.
+                adminClientCache.remove (cloudId);
+            }
+        }
+
+        Keystone keystone = new Keystone (cloudIdentity.getKeystoneUrl (region, msoPropID));
+
+        // Must authenticate against the 'admin' tenant to get the services endpoints
+        Access access = null;
+        String token = null;
+        try {
+               Authentication credentials = cloudIdentity.getAuthentication ();
+            OpenStackRequest <Access> request = keystone.tokens ()
+                                                        .authenticate (credentials)
+                                                        .withTenantName (adminTenantName);
+            access = executeAndRecordOpenstackRequest (request, msoProps);
+            token = access.getToken ().getId ();
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 401) {
+                // Authentication error. Can't access admin tenant - something is mis-configured
+                String error = "MSO Authentication Failed for " + cloudIdentity.getId ();
+                alarmLogger.sendAlarm ("MsoAuthenticationError", MsoAlarmLogger.CRITICAL, error);
+                throw new MsoAdapterException (error);
+            } else {
+                throw keystoneErrorToMsoException (e, "TokenAuth");
+            }
+        } catch (OpenStackConnectException e) {
+            // Connection to Openstack failed
+            throw keystoneErrorToMsoException (e, "TokenAuth");
+        }
+
+        // Get the Identity service URL. Throws runtime exception if not found per region.
+        String adminUrl = null;
+        try {
+            adminUrl = KeystoneUtils.findEndpointURL (access.getServiceCatalog (), "identity", region, "admin");
+        } catch (RuntimeException e) {
+            String error = "Identity service not found: region=" + region + ",cloud=" + cloudIdentity.getId ();
+            alarmLogger.sendAlarm ("MsoConfigurationError", MsoAlarmLogger.CRITICAL, error);
+            LOGGER.error(MessageEnum.IDENTITY_SERVICE_NOT_FOUND, region, cloudIdentity.getId(), "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception in findEndpointURL");
+            throw new MsoAdapterException (error, e);
+        }
+        // The following is needed for the MT lab.
+        if ("MT".equals (cloudSite.getId ())) {
+            adminUrl = adminUrl.replace ("controller", "mtdnj02bh01wt.bvoip.labs.att.com");
+        }
+
+        // A new Keystone object is required for the new URL. Use the auth token from above.
+        // Note: this doesn't go back to Openstack, it's just a local object.
+        keystone = new Keystone (adminUrl);
+        keystone.token (token);
+
+        // Cache to avoid re-authentication for every call.
+        KeystoneCacheEntry cacheEntry = new KeystoneCacheEntry (adminUrl, token, access.getToken ().getExpires ());
+        adminClientCache.put (cloudId, cacheEntry);
+
+        return keystone;
+    }
+
+    /*
+     * Find a tenant (or query its existance) by its Name or Id. Check first against the
+     * ID. If that fails, then try by name.
+     *
+     * @param adminClient an authenticated Keystone object
+     *
+     * @param tenantName the tenant name or ID to query
+     *
+     * @return a Tenant object or null if not found
+     */
+    public Tenant findTenantByNameOrId (Keystone adminClient, String tenantNameOrId) {
+        if (tenantNameOrId == null) {
+            return null;
+        }
+
+        Tenant tenant = findTenantById (adminClient, tenantNameOrId);
+        if (tenant == null) {
+            tenant = findTenantByName (adminClient, tenantNameOrId);
+        }
+
+        return tenant;
+    }
+
+    /*
+     * Find a tenant (or query its existance) by its Id.
+     *
+     * @param adminClient an authenticated Keystone object
+     *
+     * @param tenantName the tenant ID to query
+     *
+     * @return a Tenant object or null if not found
+     */
+    private Tenant findTenantById (Keystone adminClient, String tenantId) {
+        if (tenantId == null) {
+            return null;
+        }
+
+        try {
+            OpenStackRequest <Tenant> request = adminClient.tenants ().show (tenantId);
+            return executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 404) {
+                return null;
+            } else {
+               LOGGER.error(MessageEnum.RA_CONNECTION_EXCEPTION, "Openstack Error, GET Tenant by Id (" + tenantId + "): " + e, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception in Openstack GET tenant by Id");
+                throw e;
+            }
+        }
+    }
+
+    /*
+     * Find a tenant (or query its existance) by its Name. This method avoids an
+     * initial lookup by ID when it's known that we have the tenant Name.
+     *
+     * @param adminClient an authenticated Keystone object
+     *
+     * @param tenantName the tenant name to query
+     *
+     * @return a Tenant object or null if not found
+     */
+    public Tenant findTenantByName (Keystone adminClient, String tenantName) {
+        if (tenantName == null) {
+            return null;
+        }
+
+        try {
+            OpenStackRequest <Tenant> request = adminClient.tenants ().show ("").queryParam ("name", tenantName);
+            return executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 404) {
+                return null;
+            } else {
+               LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "Openstack Error, GET Tenant By Name (" + tenantName + "): " + e, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception in Openstack GET Tenant By Name");
+                throw e;
+            }
+        }
+    }
+
+    /*
+     * Look up an Openstack User by Name or Openstack ID. Check the ID first, and if that
+     * fails, try the Name.
+     *
+     * @param adminClient an authenticated Keystone object
+     *
+     * @param userName the user name or ID to query
+     *
+     * @return a User object or null if not found
+     */
+    private User findUserByNameOrId (Keystone adminClient, String userNameOrId) {
+        if (userNameOrId == null) {
+            return null;
+        }
+
+        try {
+            OpenStackRequest <User> request = adminClient.users ().show (userNameOrId);
+            return executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 404) {
+                // Not found by ID. Search for name
+                return findUserByName (adminClient, userNameOrId);
+            } else {
+               LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "Openstack Error, GET User (" + userNameOrId + "): " + e, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception in Openstack GET User");
+                throw e;
+            }
+        }
+    }
+
+    /*
+     * Look up an Openstack User by Name. This avoids initial Openstack query by ID
+     * if we know we have the User Name.
+     *
+     * @param adminClient an authenticated Keystone object
+     *
+     * @param userName the user name to query
+     *
+     * @return a User object or null if not found
+     */
+    public User findUserByName (Keystone adminClient, String userName) {
+        if (userName == null) {
+            return null;
+        }
+
+        try {
+            OpenStackRequest <User> request = adminClient.users ().show ("").queryParam ("name", userName);
+            return executeAndRecordOpenstackRequest (request, msoProps);
+        } catch (OpenStackResponseException e) {
+            if (e.getStatus () == 404) {
+                return null;
+            } else {
+               LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "Openstack Error, GET User By Name (" + userName + "): " + e, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception in Openstack GET User By Name");
+                throw e;
+            }
+        }
+    }
+
+    /*
+     * Look up an Openstack Role by Name or Id. There is no direct query for Roles, so
+     * need to retrieve a full list from Openstack and look for a match. By default,
+     * Openstack should have a "_member_" role for normal VM-level privileges and an
+     * "admin" role for expanded privileges (e.g. administer tenants, users, and roles).
+     * <p>
+     *
+     * @param adminClient an authenticated Keystone object
+     *
+     * @param roleNameOrId the Role name or ID to look up
+     *
+     * @return a Role object
+     */
+    private  Role findRoleByNameOrId (Keystone adminClient, String roleNameOrId) {
+        if (roleNameOrId == null) {
+            return null;
+        }
+
+        // Search by name or ID. Must search in list
+        OpenStackRequest <Roles> request = adminClient.roles ().list ();
+        Roles roles = executeAndRecordOpenstackRequest (request, msoProps);
+
+        for (Role role : roles) {
+            if (roleNameOrId.equals (role.getName ()) || roleNameOrId.equals (role.getId ())) {
+                return role;
+            }
+        }
+
+        return null;
+    }
+
+    private static class KeystoneCacheEntry implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+
+        private String keystoneUrl;
+        private String token;
+        private Calendar expires;
+
+        public KeystoneCacheEntry (String url, String token, Calendar expires) {
+            this.keystoneUrl = url;
+            this.token = token;
+            this.expires = expires;
+        }
+
+        public Keystone getKeystoneClient () {
+            Keystone keystone = new Keystone (keystoneUrl);
+            keystone.token (token);
+            return keystone;
+        }
+
+        public boolean isExpired () {
+            return Calendar.getInstance ().after (expires);
+        }
+    }
+
+    /**
+     * Clean up the Admin client cache to remove expired entries.
+     */
+    public static void adminCacheCleanup () {
+        for (String cacheKey : adminClientCache.keySet ()) {
+            if (adminClientCache.get (cacheKey).isExpired ()) {
+                adminClientCache.remove (cacheKey);
+                LOGGER.debug ("Cleaned Up Cached Admin Client for " + cacheKey);
+            }
+        }
+    }
+
+    /**
+     * Reset the Admin client cache.
+     * This may be useful if cached credentials get out of sync.
+     */
+    public static void adminCacheReset () {
+        adminClientCache = new HashMap <String, KeystoneCacheEntry> ();
+    }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
new file mode 100644 (file)
index 0000000..7e388a5
--- /dev/null
@@ -0,0 +1,616 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudIdentity;
+import org.openecomp.mso.cloud.CloudSite;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.NetworkInfo;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoIOException;
+import org.openecomp.mso.openstack.exceptions.MsoNetworkAlreadyExists;
+import org.openecomp.mso.openstack.exceptions.MsoNetworkNotFound;
+import org.openecomp.mso.openstack.exceptions.MsoOpenstackException;
+import org.openecomp.mso.openstack.exceptions.MsoTenantNotFound;
+import com.woorea.openstack.base.client.OpenStackBaseException;
+import com.woorea.openstack.base.client.OpenStackConnectException;
+import com.woorea.openstack.base.client.OpenStackRequest;
+import com.woorea.openstack.base.client.OpenStackResponseException;
+import com.woorea.openstack.keystone.Keystone;
+import com.woorea.openstack.keystone.model.Access;
+import com.woorea.openstack.keystone.utils.KeystoneUtils;
+import com.woorea.openstack.quantum.Quantum;
+import com.woorea.openstack.quantum.model.Network;
+import com.woorea.openstack.quantum.model.Networks;
+import com.woorea.openstack.quantum.model.Segment;
+import com.woorea.openstack.keystone.model.Authentication;
+
+public class MsoNeutronUtils extends MsoCommonUtils
+{
+       // Cache Neutron Clients statically.  Since there is just one MSO user, there is no
+       // benefit to re-authentication on every request (or across different flows).  The
+       // token will be used until it expires.
+       //
+       // The cache key is "tenantId:cloudId"
+       private static Map<String,NeutronCacheEntry> neutronClientCache = new HashMap<String,NeutronCacheEntry>();
+
+       // Fetch cloud configuration each time (may be cached in CloudConfig class)
+       private CloudConfig cloudConfig;
+
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+       private String msoPropID;
+       
+       public enum NetworkType {
+               BASIC, PROVIDER, MULTI_PROVIDER
+       };
+
+       public MsoNeutronUtils(String msoPropID, CloudConfigFactory cloudConfigFactory) {
+               cloudConfig = cloudConfigFactory.getCloudConfig();
+               this.msoPropID = msoPropID;
+       }
+
+       /**
+        * Create a network with the specified parameters in the given cloud/tenant.
+        *
+        * If a network already exists with the same name, an exception will be thrown.  Note that
+        * this is an MSO-imposed restriction.  Openstack does not require uniqueness on network names.
+        * <p>
+        * @param cloudSiteId The cloud identifier (may be a region) in which to create the network.
+        * @param tenantId The tenant in which to create the network
+        * @param type The type of network to create (Basic, Provider, Multi-Provider)
+        * @param networkName The network name to create
+        * @param provider The provider network name (for Provider or Multi-Provider networks)
+        * @param vlans A list of VLAN segments for the network (for Provider or Multi-Provider networks)
+        * @return a NetworkInfo object which describes the newly created network
+        * @throws MsoNetworkAlreadyExists Thrown if a network with the same name already exists
+        * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception
+        * @throws MsoCloudSiteNotFound Thrown if the cloudSite is invalid or unknown
+        */
+       public NetworkInfo createNetwork (String cloudSiteId, String tenantId, NetworkType type, String networkName, String provider, List<Integer> vlans)
+               throws MsoException, MsoNetworkAlreadyExists, MsoCloudSiteNotFound
+       {
+               // Obtain the cloud site information where we will create the stack
+               CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId);
+               if (cloudSite == null) {
+                       throw new MsoCloudSiteNotFound(cloudSiteId);
+               }
+
+               Quantum neutronClient = getNeutronClient (cloudSite, tenantId);
+
+               // Check if a network already exists with this name
+               // Openstack will allow duplicate name, so require explicit check
+               Network network = findNetworkByName (neutronClient, networkName);
+
+               if (network != null) {
+                       // Network already exists.  Throw an exception
+                       LOGGER.error(MessageEnum.RA_NETWORK_ALREADY_EXIST, networkName, cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Network already exists");
+                       throw new MsoNetworkAlreadyExists (networkName, tenantId, cloudSiteId);
+               }
+
+               // Does not exist, create a new one
+               network = new Network();
+               network.setName(networkName);
+               network.setAdminStateUp(true);
+
+               if (type == NetworkType.PROVIDER) {
+                       if (provider != null && vlans != null && vlans.size() > 0) {
+                               network.setProviderPhysicalNetwork (provider);
+                               network.setProviderNetworkType("vlan");
+                               network.setProviderSegmentationId (vlans.get(0));
+                       }
+               } else if (type == NetworkType.MULTI_PROVIDER) {
+                       if (provider != null && vlans != null && vlans.size() > 0) {
+                               List<Segment> segments = new ArrayList<Segment>(vlans.size());
+                               for (int vlan : vlans) {
+                                       Segment segment = new Segment();
+                                       segment.setProviderPhysicalNetwork (provider);
+                                       segment.setProviderNetworkType("vlan");
+                                       segment.setProviderSegmentationId (vlan);
+
+                                       segments.add(segment);
+                               }
+                               network.setSegments(segments);
+                       }
+               }
+
+               try {
+                       OpenStackRequest<Network> request = neutronClient.networks().create(network);
+                       Network newNetwork = executeAndRecordOpenstackRequest(request);
+                       return new NetworkInfo(newNetwork);
+               }
+               catch (OpenStackBaseException e) {
+                       // Convert Neutron exception to an MsoOpenstackException
+                       MsoException me = neutronExceptionToMsoException (e, "CreateNetwork");
+                       throw me;
+               }
+               catch (RuntimeException e) {
+                       // Catch-all
+                       MsoException me = runtimeExceptionToMsoException(e, "CreateNetwork");
+                       throw me;
+               }
+       }
+
+
+       /**
+        * Query for a network with the specified name or ID in the given cloud.  If the network exists,
+        * return an NetworkInfo object.  If not, return null.
+        * <p>
+        * Whenever possible, the network ID should be used as it is much more efficient.  Query by
+        * name requires retrieval of all networks for the tenant and search for matching name.
+        * <p>
+        * @param networkNameOrId The network to query
+        * @param tenantId The Openstack tenant to look in for the network
+        * @param cloudSiteId The cloud identifier (may be a region) in which to query the network.
+        * @return a NetworkInfo object describing the queried network, or null if not found
+        * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception
+        * @throws MsoCloudSiteNotFound
+        */
+       public NetworkInfo queryNetwork (String networkNameOrId, String tenantId, String cloudSiteId)
+               throws MsoException, MsoCloudSiteNotFound
+       {
+               LOGGER.debug("In queryNetwork");
+
+               // Obtain the cloud site information
+               CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId);
+               if (cloudSite == null) {
+                       throw new MsoCloudSiteNotFound(cloudSiteId);
+               }
+
+               Quantum neutronClient = getNeutronClient (cloudSite, tenantId);
+
+               // Check if the network exists and return its info
+               try {
+                       Network network = findNetworkByNameOrId (neutronClient, networkNameOrId);
+                       if (network == null) {
+                               LOGGER.debug ("Query Network: " + networkNameOrId + " not found in tenant " + tenantId);
+                               return null;
+                       }
+                       return new NetworkInfo(network);
+               }
+               catch (OpenStackBaseException e) {
+                       // Convert Neutron exception to an MsoOpenstackException
+                       MsoException me = neutronExceptionToMsoException (e, "QueryNetwork");
+                       throw me;
+               }
+               catch (RuntimeException e) {
+                       // Catch-all
+                       MsoException me = runtimeExceptionToMsoException(e, "QueryNetwork");
+                       throw me;
+               }
+       }
+
+       /**
+        * Delete the specified Network (by ID) in the given cloud.
+        * If the network does not exist, success is returned.
+        * <p>
+        * @param networkNameOrId The name or Openstack ID of the network to delete
+        * @param cloudId The cloud identifier (may be a region) from which to delete the network.
+        * @return true if the network was deleted, false if the network did not exist
+        * @throws MsoOpenstackException If the Openstack API call returns an exception, this local
+        * exception will be thrown.
+        * @throws MsoCloudSiteNotFound
+        */
+       public boolean deleteNetwork (String networkId, String tenantId, String cloudSiteId)
+               throws MsoException, MsoCloudSiteNotFound
+       {
+               // Obtain the cloud site information where we will create the stack
+               CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId);
+               if (cloudSite == null) {
+                       throw new MsoCloudSiteNotFound(cloudSiteId);
+               }
+
+               Quantum neutronClient = getNeutronClient (cloudSite, tenantId);
+
+               try {
+                       // Check that the network exists.
+                       Network network = findNetworkById (neutronClient, networkId);
+                       if (network == null) {
+                               LOGGER.info(MessageEnum.RA_DELETE_NETWORK_EXC, networkId, cloudSiteId, tenantId, "Openstack", "");
+                               return false;
+                       }
+
+                       OpenStackRequest<Void> request = neutronClient.networks().delete(network.getId());
+                       executeAndRecordOpenstackRequest(request);
+
+                       LOGGER.debug ("Deleted Network " + network.getId() + " (" + network.getName() + ")");
+               }
+               catch (OpenStackBaseException e) {
+                       // Convert Neutron exception to an MsoOpenstackException
+                       MsoException me = neutronExceptionToMsoException (e, "Delete Network");
+                       throw me;
+               }
+               catch (RuntimeException e) {
+                       // Catch-all
+                       MsoException me = runtimeExceptionToMsoException(e, "DeleteNetwork");
+                       throw me;
+               }
+
+               return true;
+       }
+
+
+       /**
+        * Update a network with the specified parameters in the given cloud/tenant.
+        *
+        * Specifically, this call is intended to update the VLAN segments on a
+        * multi-provider network.  The provider segments will be replaced with the
+        * supplied list of VLANs.
+        * <p>
+        * Note that updating the 'segments' array is not normally supported by Neutron.
+        * This method relies on a Platform Orchestration extension (using SDN controller
+        * to manage the virtual networking).
+        *
+        * @param cloudSiteId The cloud site ID (may be a region) in which to update the network.
+        * @param the Openstack ID of the tenant in which to update the network
+        * @param networkId The unique Openstack ID of the network to be updated
+        * @param type The network type (Basic, Provider, Multi-Provider)
+        * @param provider The provider network name.  This should not change.
+        * @param vlans The list of VLAN segments to replace
+        * @return a NetworkInfo object which describes the updated network
+        * @throws MsoNetworkNotFound Thrown if the requested network does not exist
+        * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception
+        * @throws MsoCloudSiteNotFound
+        */
+       public NetworkInfo updateNetwork (String cloudSiteId, String tenantId, String networkId, NetworkType type, String provider, List<Integer> vlans)
+               throws MsoException, MsoNetworkNotFound, MsoCloudSiteNotFound
+       {
+               // Obtain the cloud site information where we will create the stack
+               CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId);
+               if (cloudSite == null) {
+                       throw new MsoCloudSiteNotFound(cloudSiteId);
+               }
+               Quantum neutronClient = getNeutronClient (cloudSite, tenantId);
+
+               // Check that the network exists
+               Network network = findNetworkById (neutronClient, networkId);
+
+               if (network == null) {
+                       // Network not found.  Throw an exception
+                       LOGGER.error(MessageEnum.RA_NETWORK_NOT_FOUND, networkId, cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Network not found");
+                       throw new MsoNetworkNotFound (networkId, tenantId, cloudSiteId);
+               }
+
+               // Overwrite the properties to be updated
+               if (type == NetworkType.PROVIDER) {
+                       if (provider != null && vlans != null && vlans.size() > 0) {
+                               network.setProviderPhysicalNetwork (provider);
+                               network.setProviderNetworkType("vlan");
+                               network.setProviderSegmentationId (vlans.get(0));
+                       }
+               } else if (type == NetworkType.MULTI_PROVIDER) {
+                       if (provider != null && vlans != null && vlans.size() > 0) {
+                               List<Segment> segments = new ArrayList<Segment>(vlans.size());
+                               for (int vlan : vlans) {
+                                       Segment segment = new Segment();
+                                       segment.setProviderPhysicalNetwork (provider);
+                                       segment.setProviderNetworkType("vlan");
+                                       segment.setProviderSegmentationId (vlan);
+
+                                       segments.add(segment);
+                               }
+                               network.setSegments(segments);
+                       }
+               }
+
+               try {
+                       OpenStackRequest<Network> request = neutronClient.networks().update(network);
+                       Network newNetwork = executeAndRecordOpenstackRequest(request);
+                       return new NetworkInfo(newNetwork);
+               }
+               catch (OpenStackBaseException e) {
+                       // Convert Neutron exception to an MsoOpenstackException
+                       MsoException me = neutronExceptionToMsoException (e, "UpdateNetwork");
+                       throw me;
+               }
+               catch (RuntimeException e) {
+                       // Catch-all
+                       MsoException me = runtimeExceptionToMsoException(e, "UpdateNetwork");
+                       throw me;
+               }
+       }
+
+
+       // -------------------------------------------------------------------
+       // PRIVATE UTILITY FUNCTIONS FOR USE WITHIN THIS CLASS
+
+       /**
+        * Get a Neutron (Quantum) client for the Openstack Network service.
+        * This requires a 'member'-level userId + password, which will be retrieved from
+        * properties based on the specified cloud Id.  The tenant in which to operate
+        * must also be provided.
+        * <p>
+        * On successful authentication, the Quantum object will be cached for the
+        * tenantID + cloudId so that it can be reused without reauthenticating with
+        *  Openstack every time.
+        *
+        * @param cloudSite - a cloud site definition
+        * @param tenantId - Openstack tenant ID
+        * @return an authenticated Quantum object
+        */
+       private Quantum getNeutronClient (CloudSite cloudSite, String tenantId)
+               throws MsoTenantNotFound, MsoException
+       {
+               String cloudId = cloudSite.getId();
+
+               // Check first in the cache of previously authorized clients
+               String cacheKey = cloudId + ":" + tenantId;
+               if (neutronClientCache.containsKey(cacheKey)) {
+                       if (! neutronClientCache.get(cacheKey).isExpired()) {
+                               LOGGER.debug ("Using Cached HEAT Client for " + cacheKey);
+                               Quantum neutronClient = neutronClientCache.get(cacheKey).getNeutronClient();
+                               return neutronClient;
+                       }
+                       else {
+                               // Token is expired.  Remove it from cache.
+                               neutronClientCache.remove(cacheKey);
+                               LOGGER.debug ("Expired Cached Neutron Client for " + cacheKey);
+                       }
+               }
+
+               // Obtain an MSO token for the tenant from the identity service
+               CloudIdentity cloudIdentity = cloudSite.getIdentityService();
+               Keystone keystoneTenantClient = new Keystone (cloudIdentity.getKeystoneUrl(cloudId, msoPropID));
+               Access access = null;
+               try {
+                       Authentication credentials = cloudIdentity.getAuthentication ();
+                       OpenStackRequest<Access> request = keystoneTenantClient.tokens().authenticate(credentials).withTenantId(tenantId);
+                       access = executeAndRecordOpenstackRequest(request);
+               }
+               catch (OpenStackResponseException e) {
+                       if (e.getStatus() == 401) {
+                               // Authentication error.
+                               String error = "Authentication Failure: tenant=" + tenantId + ",cloud=" + cloudIdentity.getId();
+                               alarmLogger .sendAlarm("MsoAuthenticationError", MsoAlarmLogger.CRITICAL, error);
+                               throw new MsoAdapterException(error);
+                       }
+                       else {
+                               MsoException me = keystoneErrorToMsoException(e, "TokenAuth");
+                               throw me;
+                       }
+               }
+               catch (OpenStackConnectException e) {
+                       // Connection to Openstack failed
+                       MsoIOException me = new MsoIOException (e.getMessage(), e);
+                       me.addContext("TokenAuth");
+                       throw me;
+               }
+               catch (RuntimeException e) {
+                       // Catch-all
+                       MsoException me = runtimeExceptionToMsoException(e, "TokenAuth");
+                       throw me;
+               }
+
+               String region = cloudSite.getRegionId();
+               String neutronUrl = null;
+               try {
+                       neutronUrl = KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "network", region, "public");
+                       if (! neutronUrl.endsWith("/")) {
+                neutronUrl += "/v2.0/";
+            }
+               } catch (RuntimeException e) {
+                       // This comes back for not found (probably an incorrect region ID)
+                       String error = "Network service not found: region=" + region + ",cloud=" + cloudIdentity.getId();
+                       alarmLogger.sendAlarm("MsoConfigurationError", MsoAlarmLogger.CRITICAL, error);
+                       throw new MsoAdapterException (error, e);
+               }
+               // This is needed for testing in the MT cloud
+               if (cloudId.equals("MT")) {
+            neutronUrl = neutronUrl.replace("controller", "mtdnj02bh01wt.bvoip.labs.att.com");
+        }
+
+               Quantum neutronClient = new Quantum(neutronUrl);
+               neutronClient.token(access.getToken().getId());
+
+               neutronClientCache.put(cacheKey, new NeutronCacheEntry(neutronUrl, access.getToken().getId(), access.getToken().getExpires()));
+               LOGGER.debug ("Caching Neutron Client for " + cacheKey);
+
+               return neutronClient;
+       }
+
+       /**
+        * Forcibly expire a Neutron client from the cache.  This call is for use by
+        * the KeystoneClient in case where a tenant is deleted.  In that case,
+        * all cached credentials must be purged so that fresh authentication is
+        * done on subsequent calls.
+        * <p>
+        * @param tenantName
+        * @param cloudId
+        */
+       public static void expireNeutronClient (String tenantId, String cloudId) {
+               String cacheKey = cloudId + ":" + tenantId;
+               if (neutronClientCache.containsKey(cacheKey)) {
+                       neutronClientCache.remove(cacheKey);
+                       LOGGER.debug ("Deleted Cached Neutron Client for " + cacheKey);
+               }
+       }
+
+
+       /*
+        * Find a tenant (or query its existence) by its Name or Id.  Check first against the
+        * ID.  If that fails, then try by name.
+        *
+        * @param adminClient an authenticated Keystone object
+        * @param tenantName the tenant name or ID to query
+        * @return a Tenant object or null if not found
+        */
+       public Network findNetworkByNameOrId (Quantum neutronClient, String networkNameOrId)
+       {
+               if (networkNameOrId == null) {
+            return null;
+        }
+
+               Network network = findNetworkById(neutronClient, networkNameOrId);
+
+               if (network == null) {
+            network = findNetworkByName(neutronClient, networkNameOrId);
+        }
+
+               return network;
+       }
+
+       /*
+        * Find a network (or query its existence) by its Id.
+        *
+        * @param neutronClient an authenticated Quantum object
+        * @param networkId the network ID to query
+        * @return a Network object or null if not found
+        */
+       private static Network findNetworkById (Quantum neutronClient, String networkId)
+       {
+               if (networkId == null) {
+            return null;
+        }
+
+               try {
+                       OpenStackRequest<Network> request = neutronClient.networks().show(networkId);
+                       Network network = executeAndRecordOpenstackRequest(request);
+                       return network;
+               }
+               catch (OpenStackResponseException e) {
+                       if (e.getStatus() == 404) {
+                               return null;
+                       } else {
+                               LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "Openstack Error, GET Network By ID (" + networkId + "): " + e, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception in Openstack");
+                               throw e;
+                       }
+               }
+       }
+
+       /*
+        * Find a network (or query its existence) by its Name.  This method avoids an
+        * initial lookup by ID when it's known that we have the network Name.
+        *
+        * Neutron does not support 'name=*' query parameter for Network query (show).
+        * The only way to query by name is to retrieve all networks and look for the
+        * match.  While inefficient, this capability will be provided as it is needed
+        * by MSO, but should be avoided in favor of ID whenever possible.
+        *
+        * TODO:
+        * Network names are not required to be unique, though MSO will attempt to enforce
+        * uniqueness.  This call probably needs to return an error (instead of returning
+        * the first match).
+        *
+        * @param neutronClient an authenticated Quantum object
+        * @param networkName the network name to query
+        * @return a Network object or null if not found
+        */
+       public Network findNetworkByName (Quantum neutronClient, String networkName)
+       {
+               if (networkName == null) {
+            return null;
+        }
+
+               try {
+                       OpenStackRequest<Networks> request = neutronClient.networks().list();
+                       Networks networks = executeAndRecordOpenstackRequest(request);
+                       for (Network network : networks.getList()) {
+                               if (network.getName().equals(networkName)) {
+                                       LOGGER.debug ("Found match on network name: " + networkName);
+                                       return network;
+                               }
+                       }
+                       LOGGER.debug ("findNetworkByName - no match found for " + networkName);
+                       return null;
+               }
+               catch (OpenStackResponseException e) {
+                       if (e.getStatus() == 404) {
+                               return null;
+                       } else {
+                               LOGGER.error (MessageEnum.RA_CONNECTION_EXCEPTION, "OpenStack", "Openstack Error, GET Network By Name (" + networkName + "): " + e, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception in OpenStack");
+                               throw e;
+                       }
+               }
+       }
+
+
+       /*
+        * An entry in the Neutron Client Cache.  It saves the Neutron client object
+        * along with the token expiration.  After this interval, this cache
+        * item will no longer be used.
+        */
+       private static class NeutronCacheEntry implements Serializable
+       {
+               private static final long serialVersionUID = 1L;
+
+               private String neutronUrl;
+               private String token;
+               private Calendar expires;
+
+               public NeutronCacheEntry (String neutronUrl, String token, Calendar expires) {
+                       this.neutronUrl = neutronUrl;
+                       this.token = token;
+                       this.expires = expires;
+               }
+
+               public Quantum getNeutronClient () {
+                       Quantum neutronClient = new Quantum(neutronUrl);
+                       neutronClient.token(token);
+                       return neutronClient;
+               }
+
+               public boolean isExpired() {
+                       if (expires == null) {
+                return true;
+            }
+
+                       Calendar now = Calendar.getInstance();
+                       if (now.after(expires)) {
+                return true;
+            }
+
+                       return false;
+               }
+       }
+
+       /**
+        * Clean up the Neutron client cache to remove expired entries.
+        */
+       public static void neutronCacheCleanup () {
+               for (String cacheKey : neutronClientCache.keySet()) {
+                       if (neutronClientCache.get(cacheKey).isExpired()) {
+                               neutronClientCache.remove(cacheKey);
+                               LOGGER.debug ("Cleaned Up Cached Neutron Client for " + cacheKey);
+                       }
+               }
+       }
+
+       /**
+        * Reset the Neutron client cache.
+        * This may be useful if cached credentials get out of sync.
+        */
+       public static void neutronCacheReset () {
+               neutronClientCache = new HashMap<String,NeutronCacheEntry>();
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java
new file mode 100644 (file)
index 0000000..4110470
--- /dev/null
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+import java.io.Serializable;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.openstack.beans.MsoTenant;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoOpenstackException;
+import org.openecomp.mso.openstack.exceptions.MsoTenantAlreadyExists;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import com.woorea.openstack.keystone.Keystone;
+
+public abstract class MsoTenantUtils extends MsoCommonUtils {
+
+    protected CloudConfigFactory cloudConfigFactory;
+       protected MsoPropertiesFactory msoPropFactory;
+       protected static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+       protected MsoJavaProperties msoProps;
+    protected CloudConfig cloudConfig;
+
+    public MsoTenantUtils (String msoPropID) {
+       cloudConfigFactory = new CloudConfigFactory();
+       msoPropFactory = new MsoPropertiesFactory();
+       cloudConfig = cloudConfigFactory.getCloudConfig ();
+
+       LOGGER.debug("msoTenantUtils:" + msoPropID);
+               
+       try {
+                       msoProps = msoPropFactory.getMsoJavaProperties (msoPropID);
+               } catch (MsoPropertiesException e) {
+                       LOGGER.error (MessageEnum.LOAD_PROPERTIES_FAIL, "Unknown. Mso Properties ID not found in cache: " + msoPropID, "", "", MsoLogger.ErrorCode.DataError, "Exception - Mso Properties ID not found in cache", e);
+               }
+    }
+
+    public abstract String createTenant (String tenantName, String cloudSiteId, Map <String, String> metadata, boolean backout) 
+               throws MsoException;
+       
+    public abstract MsoTenant queryTenant (String tenantId, String cloudSiteId) 
+               throws MsoException, MsoCloudSiteNotFound;
+    
+    public abstract MsoTenant queryTenantByName (String tenantName, String cloudSiteId) 
+               throws MsoException, MsoCloudSiteNotFound;
+
+    public abstract boolean deleteTenant (String tenantId, String cloudSiteId) 
+               throws MsoException;
+    
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtilsFactory.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtilsFactory.java
new file mode 100644 (file)
index 0000000..6fd7a63
--- /dev/null
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudIdentity;
+import org.openecomp.mso.cloud.CloudSite;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.openstack.utils.MsoKeystoneUtils;
+
+
+public class MsoTenantUtilsFactory {
+
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+       private CloudConfigFactory cloudConfigFactory= new CloudConfigFactory(); 
+       protected CloudConfig cloudConfig;
+       protected MsoJavaProperties msoProps = null;
+       private String msoPropID;
+
+       public MsoTenantUtilsFactory (String msoPropID) {
+               this.msoPropID = msoPropID;
+       }
+
+       //based on Cloud IdentityServerType returns ORM or KEYSTONE Utils
+       public MsoTenantUtils getTenantUtils(String cloudSiteId) {
+
+               // Obtain the cloud site information 
+               cloudConfig = cloudConfigFactory.getCloudConfig();
+               CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+
+               MsoTenantUtils tenantU = null;
+               if (cloudSite.getIdentityService().getIdentityServerType() == CloudIdentity.IdentityServerType.KEYSTONE)
+               {
+                       tenantU = new MsoKeystoneUtils (msoPropID);
+               }
+               return tenantU;
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoYamlEditorWithEnvt.java
new file mode 100644 (file)
index 0000000..d124658
--- /dev/null
@@ -0,0 +1,163 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+import org.codehaus.jackson.map.ObjectMapper;
+import java.util.LinkedHashMap;
+
+import org.yaml.snakeyaml.Yaml;
+
+
+public class MsoYamlEditorWithEnvt {
+
+    private Map <String, Object> yml;
+    private Yaml yaml = new Yaml ();
+    private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
+
+       public MsoYamlEditorWithEnvt() {
+               super();
+       }
+       public MsoYamlEditorWithEnvt(byte[] b) {
+               init(b);
+       }
+
+    @SuppressWarnings("unchecked")
+    private synchronized void init (byte[] body) {
+        InputStream input = new ByteArrayInputStream (body);
+        yml = (Map <String, Object>) yaml.load (input);
+    }  
+
+    @SuppressWarnings("unchecked")
+       public synchronized Set <MsoHeatEnvironmentParameter> getParameterListFromEnvt() {
+       // In an environment entry, the parameters section can only contain the name:value - 
+       // not other attributes.
+       Set <MsoHeatEnvironmentParameter> paramSet = new HashSet<MsoHeatEnvironmentParameter>();
+       Map<String, Object> resourceMap = null;
+       try {
+               resourceMap = (Map<String,Object>) yml.get("parameters");
+       } catch (Exception e) {
+               return paramSet;
+       }
+       if (resourceMap == null) {
+               return paramSet;
+       }
+       Iterator <Entry <String, Object>> it = resourceMap.entrySet().iterator();
+       
+       while (it.hasNext()) {
+               MsoHeatEnvironmentParameter hep = new MsoHeatEnvironmentParameter();
+               Map.Entry <String, Object> pair = it.next();
+               //Map<String, String> resourceEntry = (Map <String, String>) pair.getValue();
+               //String value = null;
+               String value = null;
+               Object obj = pair.getValue();
+               if (obj instanceof java.lang.String) {
+                       //value = (String) pair.getValue();
+                       // handle block scalar - literals and folded:
+                       value = yaml.dump(obj);
+                       // but this adds an extra '\n' at the end - which won't hurt - but we don't need it
+                       value = value.substring(0, value.length() - 1);
+               } else if (obj instanceof java.util.LinkedHashMap) {
+                       //Handle that it's json
+                       try {
+                               value = JSON_MAPPER.writeValueAsString(obj);
+                       } catch (Exception e) {
+                               value = "_BAD_JSON_MAPPING";
+                       }
+               } else {
+                       //this handles integers/longs/floats/etc.
+                       value = String.valueOf(obj);
+               }
+               hep.setName((String) pair.getKey());
+               hep.setValue(value);
+               paramSet.add(hep);
+       }
+       return paramSet;
+    }
+    public synchronized Set <MsoHeatEnvironmentResource> getResourceListFromEnvt() {
+       try {
+               Set<MsoHeatEnvironmentResource> resourceList = new HashSet<MsoHeatEnvironmentResource>();
+               @SuppressWarnings("unchecked")
+               Map<String, Object> resourceMap = (Map<String,Object>) yml.get("resource_registry");
+               Iterator<Entry <String,Object>> it = resourceMap.entrySet().iterator();
+       
+               while (it.hasNext()) {
+                       MsoHeatEnvironmentResource her = new MsoHeatEnvironmentResource();
+                       Map.Entry<String, Object> pair = it.next();
+                       her.setName((String) pair.getKey());
+                       her.setValue((String) pair.getValue());
+                       resourceList.add(her);
+               }
+               return resourceList;
+       } catch (Exception e) {
+               
+       }
+       return null;
+    }
+    public synchronized Set <HeatTemplateParam> getParameterList () {
+        Set <HeatTemplateParam> paramSet = new HashSet <HeatTemplateParam> ();
+        @SuppressWarnings("unchecked")
+        Map <String, Object> resourceMap = (Map <String, Object>) yml.get ("parameters");
+        Iterator <Entry <String, Object>> it = resourceMap.entrySet ().iterator ();
+
+        while (it.hasNext ()) {
+            HeatTemplateParam param = new HeatTemplateParam ();
+            Map.Entry <String, Object> pair = it.next ();
+            @SuppressWarnings("unchecked")
+            Map <String, String> resourceEntry = (Map <String, String>) pair.getValue ();
+            String value = null;
+            try {
+               value = resourceEntry.get ("default");
+            } catch (java.lang.ClassCastException cce) {
+               // This exception only - the value is an integer. For what we're doing
+               // here - we don't care - so set value to something - and it will 
+               // get marked as not being required - which is correct.
+               //System.out.println("cce exception!");
+               value = "300"; 
+               // okay
+            }
+            param.setParamName ((String) pair.getKey ());
+            if (value != null) {
+                param.setRequired (false);
+            } else {
+                param.setRequired (true);
+            }
+            value = resourceEntry.get ("type");
+            param.setParamType (value);
+
+            paramSet.add (param);
+
+        }
+        return paramSet;
+
+    }
+
+
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java
new file mode 100644 (file)
index 0000000..8632d02
--- /dev/null
@@ -0,0 +1,173 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import java.util.Map;
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudIdentity;
+import org.openecomp.mso.cloud.CloudSite;
+
+
+/**
+ * This class implements test methods of the CloudConfig features.
+ *
+ *
+ */
+public class CloudConfigTest {
+   
+       private static CloudConfig con;
+       private static CloudConfigFactory cloudConfigFactory= new CloudConfigFactory();
+       
+       public CloudConfigTest () {
+                  
+       }
+       
+       /**
+    * This method is called before any test occurs.
+    * It creates a fake tree from scratch
+    */
+   @BeforeClass
+   public static final void prepare () {
+          ClassLoader classLoader = CloudConfigTest.class.getClassLoader();
+          String config = classLoader.getResource("cloud_config.json").toString().substring(5);
+          
+          cloudConfigFactory.initializeCloudConfig(config,1);
+          con = cloudConfigFactory.getCloudConfig();
+   }
+   /**
+    * This method implements a test for the getCloudConfig method.
+    */
+   @Test
+   public final void testGetCloudConfig () {
+          assertNotNull(con);
+   }
+
+   /**
+    * This method implements a test for the getCloudSites method.
+    */
+   @Test
+   public final void testGetCloudSites () {
+          Map<String,CloudSite> siteMap = con.getCloudSites();
+          assertNotNull(siteMap);
+
+          CloudSite site1 = siteMap.get("MT");
+          CloudSite site2 = siteMap.get("DAN");
+          CloudSite site3 = siteMap.get("MTINJVCC101");
+          
+          assertEquals (site1.getRegionId(), "regionOne");
+          assertEquals (site1.getIdentityServiceId(), "MT_KEYSTONE");
+          assertEquals (site2.getRegionId(), "RegionOne");
+          assertEquals (site2.getIdentityServiceId(), "DAN_KEYSTONE");
+          assertEquals (site3.getRegionId(), "regionTwo");
+          assertEquals (site3.getIdentityServiceId(), "MTINJVCC101_DCP");
+        
+   }
+   
+   
+   /**
+    * This method implements a test for the getIdentityServices method.
+    */
+   @Test
+   public final void testGetIdentityServices () {
+          Map<String,CloudIdentity> identityMap = con.getIdentityServices ();
+          assertNotNull(identityMap);
+          
+          CloudIdentity identity1 = identityMap.get("MT_KEYSTONE");
+          CloudIdentity identity2 = identityMap.get("DAN_KEYSTONE");
+          CloudIdentity identity3 = identityMap.get("MTINJVCC101_DCP");
+          CloudIdentity identity4 = identityMap.get("MTSNJA3DCP1");
+          
+//        assertEquals (identity1.getKeystoneUrl(), "http://localhost:5000/v2.0");
+//        assertEquals (identity1.getIdentityUrl(), "http://localhost:5000/v2.0");
+          assertEquals (identity1.getMsoId(), "john");
+          assertEquals (identity1.getMsoPass(), "changeme");
+          assertEquals (identity1.getAdminTenant(), "admin");
+          assertEquals (identity1.getMemberRole(), "_member_");
+          assertEquals (identity1.hasTenantMetadata(), false);
+          
+//        assertEquals (identity2.getKeystoneUrl(), "http://localhost:5000/v2.0");
+//        assertEquals (identity2.getIdentityUrl(), "http://localhost:5000/v2.0");
+          assertEquals (identity2.getMsoId(), "mockId");
+          assertEquals (identity2.getMsoPass(), "stack123");
+          assertEquals (identity2.getAdminTenant(), "service");
+          assertEquals (identity2.getMemberRole(), "_member_");
+          assertEquals (identity2.hasTenantMetadata(), false);
+          
+//        assertEquals (identity3.getKeystoneUrl(), "http://localhost:5000/v2.0");
+//        assertEquals (identity3.getIdentityUrl(), "http://localhost:5000/v2.0");
+          assertEquals (identity3.getMsoId(), "mockIdToo");
+          assertEquals (identity3.getMsoPass(), "AICG@mm@@2015");
+          assertEquals (identity3.getAdminTenant(), "service");
+          assertEquals (identity3.getMemberRole(), "admin");
+          assertEquals (identity3.hasTenantMetadata(), true);
+          
+//        assertEquals (identity4.getKeystoneUrl(), "https://localhost:5000/v2.0");
+//        assertEquals (identity4.getIdentityUrl(), "https://localhost:5000/v2.0");
+          assertEquals (identity4.getMsoId(), "mockIdToo");
+          assertEquals (identity4.getMsoPass(), "2315QRS2015srq");
+          assertEquals (identity4.getAdminTenant(), "service");
+          assertEquals (identity4.getMemberRole(), "admin");
+          assertEquals (identity4.hasTenantMetadata(), true);
+
+   }
+   
+   /**
+    * This method implements a test for the getCloudSite method.
+    */
+   @Test
+   public final void testGetCloudSite () {
+          CloudSite site1  = con.getCloudSite("MT");
+          assertNotNull(site1);
+          assertEquals (site1.getRegionId(), "regionOne");
+          assertEquals (site1.getIdentityServiceId(), "MT_KEYSTONE");
+          
+        
+
+   }
+
+   /**
+    * This method implements a test for the getIdentityService method.
+    */
+   @Test
+   public final void testGetIdentityService () {
+          CloudIdentity identity1  = con.getIdentityService("MT_KEYSTONE");
+          assertNotNull(identity1);
+//        assertEquals (identity1.getKeystoneUrl(), "http://localhost:5000/v2.0");
+//        assertEquals (identity1.getIdentityUrl(), "http://localhost:5000/v2.0");
+          assertEquals (identity1.getMsoId(), "john");
+          assertEquals (identity1.getMsoPass(), "changeme");
+          assertEquals (identity1.getAdminTenant(), "admin");
+          assertEquals (identity1.getMemberRole(), "_member_");
+          assertEquals (identity1.hasTenantMetadata(), false);
+          
+          CloudIdentity identity2  = con.getIdentityService("Test");
+          assertNull(identity2);
+   }
+
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoCommonUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoCommonUtilsTest.java
new file mode 100644 (file)
index 0000000..9f17283
--- /dev/null
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.openecomp.mso.openstack.exceptions.MsoIOException;
+import org.openecomp.mso.openstack.exceptions.MsoOpenstackException;
+import org.openecomp.mso.openstack.utils.MsoCommonUtils;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import com.woorea.openstack.base.client.OpenStackBaseException;
+import com.woorea.openstack.base.client.OpenStackConnectException;
+import com.woorea.openstack.base.client.OpenStackRequest;
+import com.woorea.openstack.base.client.OpenStackResponseException;
+
+
+/**
+ * This class implements test methods of the MsoCommonUtils
+ *
+ *
+ */
+public class MsoCommonUtilsTest extends MsoCommonUtils {
+
+       public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       
+       @Test
+    public final void testExecuteAndRecordOpenstackRequest () {
+               OpenStackRequest openstackRequest = Mockito.mock(OpenStackRequest.class);
+               Mockito.when(openstackRequest.endpoint()).thenReturn("localhost");
+               Mockito.when(openstackRequest.path()).thenReturn("/test");
+               //TODO:Must try a real connection
+               assertNull(super.executeAndRecordOpenstackRequest (openstackRequest));
+
+       }
+
+       @Test
+    public final void testKeystoneErrorToMsoException () {
+               OpenStackBaseException openStackConnectException = new OpenStackConnectException("connect");
+
+               OpenStackBaseException openStackResponseException = new OpenStackResponseException("response",1);
+
+               MsoException me = super.keystoneErrorToMsoException (openStackConnectException,"ContextError");
+
+               assertTrue(me instanceof MsoIOException);
+               assertTrue("connect".equals(me.getMessage()));
+
+
+               MsoException me2 = super.keystoneErrorToMsoException (openStackResponseException,"ContextError");
+               assertTrue(me2 instanceof MsoOpenstackException);
+               assertTrue("ContextError".equals(me2.getContext()));
+               assertTrue(MsoExceptionCategory.OPENSTACK.equals(me2.getCategory()));
+
+       }
+
+       @Test
+       public final void testHeatExceptionToMsoException () {
+               OpenStackBaseException openStackConnectException = new OpenStackConnectException("connect");
+
+               OpenStackBaseException openStackResponseException = new OpenStackResponseException("response",1);
+
+               MsoException me = super.heatExceptionToMsoException (openStackConnectException,"ContextError");
+
+               assertTrue(me instanceof MsoIOException);
+               assertTrue("connect".equals(me.getMessage()));
+
+
+               MsoException me2 = super.heatExceptionToMsoException (openStackResponseException,"ContextError");
+               assertTrue(me2 instanceof MsoOpenstackException);
+               assertTrue("ContextError".equals(me2.getContext()));
+               assertTrue(MsoExceptionCategory.OPENSTACK.equals(me2.getCategory()));
+       }
+
+       @Test
+       public final void testNeutronExceptionToMsoException () {
+               OpenStackBaseException openStackConnectException = new OpenStackConnectException("connect");
+
+               OpenStackBaseException openStackResponseException = new OpenStackResponseException("response",1);
+
+               MsoException me = super.neutronExceptionToMsoException (openStackConnectException,"ContextError");
+
+               assertTrue(me instanceof MsoIOException);
+               assertTrue("connect".equals(me.getMessage()));
+
+               MsoException me2 = super.neutronExceptionToMsoException (openStackResponseException,"ContextError");
+               assertTrue(me2 instanceof MsoOpenstackException);
+               assertTrue("ContextError".equals(me2.getContext()));
+               assertTrue(MsoExceptionCategory.OPENSTACK.equals(me2.getCategory()));
+       }
+
+       @Test
+       public final void testRuntimeExceptionToMsoException () {
+           RuntimeException re = new RuntimeException ("runtime");
+           MsoException me = super.runtimeExceptionToMsoException (re, "ContextError");
+
+           assertTrue (me instanceof MsoAdapterException);
+           assertTrue("ContextError".equals(me.getContext()));
+        assertTrue(MsoExceptionCategory.INTERNAL.equals(me.getCategory()));
+       }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
new file mode 100644 (file)
index 0000000..6f8a6e9
--- /dev/null
@@ -0,0 +1,91 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+import java.util.HashMap;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoIOException;
+import org.openecomp.mso.openstack.exceptions.MsoStackAlreadyExists;
+import org.openecomp.mso.openstack.exceptions.MsoTenantNotFound;
+import org.openecomp.mso.openstack.utils.MsoCommonUtils;
+import org.openecomp.mso.openstack.utils.MsoHeatUtils;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+
+
+/**
+ * This class implements test methods of the MsoHeatUtils
+ *
+ *
+ */
+public class MsoHeatUtilsTest extends MsoCommonUtils {
+       public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       public static CloudConfigFactory cloudConfigFactory = new CloudConfigFactory();
+       public static MsoHeatUtils msoHeatUtils;
+       
+       @BeforeClass
+       public static final void loadClasses() {
+               ClassLoader classLoader = CloudConfigTest.class.getClassLoader();
+               String config = classLoader.getResource("cloud_config.json").toString().substring(5);
+               cloudConfigFactory.initializeCloudConfig(config, 1);
+               msoHeatUtils = new MsoHeatUtils("NO_PROP",msoPropertiesFactory,cloudConfigFactory); 
+       }
+       
+       @Test
+    public final void testCreateStackBadCloudConfig ()  {
+               try {
+                       msoHeatUtils.createStack ("DOESNOTEXIST", "test", "stackName", "test",  new HashMap<String,Object> (), Boolean.TRUE, 10);
+        } catch (MsoException e) {
+
+        }
+               
+       }
+       
+       @Test
+    public final void testCreateStackFailedConnectionHeatClient () throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
+               try {
+                       msoHeatUtils.createStack ("MT", "test", "stackName", "test",  new HashMap<String,Object> (), Boolean.TRUE, 10);
+               } catch (MsoIOException e) {
+                        
+               }
+               
+       }
+       
+       @Test
+    public final void testCreateStackFailedConnection () throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
+               try {
+                       msoHeatUtils.createStack ("MT", "test", "stackName", "test",  new HashMap<String,Object> (), Boolean.TRUE, 10);
+               } catch (MsoIOException e) {
+                        
+               }
+               
+       }
+       
+       
+       
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java
new file mode 100644 (file)
index 0000000..a5d46da
--- /dev/null
@@ -0,0 +1,132 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.when;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudIdentity;
+import org.openecomp.mso.cloud.CloudSite;
+import org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoIOException;
+import org.openecomp.mso.openstack.utils.MsoHeatUtilsWithUpdate;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import com.woorea.openstack.base.client.OpenStackConnectException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class MsoHeatUtilsWithUpdateTest {
+
+       public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       public static CloudConfigFactory cloudConfigFactory = new CloudConfigFactory();
+       
+    @Mock
+    CloudConfig cloudConfig;
+    @InjectMocks
+    MsoHeatUtilsWithUpdate util=new MsoHeatUtilsWithUpdate("NO_PROP",msoPropertiesFactory,cloudConfigFactory);
+
+    private CloudSite cloudSite;
+
+    @Before
+    public void init () {
+        cloudSite = new CloudSite ();
+        cloudSite.setId ("cloud");
+        CloudIdentity cloudIdentity = new CloudIdentity ();
+        cloudSite.setIdentityService (cloudIdentity);
+        cloudIdentity.setKeystoneUrl ("toto");
+        cloudIdentity.setMsoPass (CloudIdentity.encryptPassword ("mockId"));
+
+        when (cloudConfig.getCloudSite ("cloud")).thenReturn (cloudSite);
+        when (cloudConfig.getCloudSite ("none")).thenReturn (null);
+    }
+
+    @Test
+    public void testUpdateStack () {
+        // Heat heat = Mockito.mock (Heat.class);
+        Map <String, Object> stackInputs = new HashMap <> ();
+        try {
+            util.updateStack ("none", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1);
+        } catch (MsoException e) {
+            if (e instanceof MsoCloudSiteNotFound) {
+                // Ok
+            } else {
+                e.printStackTrace ();
+                fail ("Exception caught");
+            }
+        }
+        try {
+            util.updateStack ("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1);
+        } catch (MsoException e) {
+            if (e instanceof MsoIOException && e.getCause () != null
+                && e.getCause () instanceof OpenStackConnectException) {
+                // Ok, we were able to go up to the connection to OpenStack
+            } else {
+                e.printStackTrace ();
+                fail ("Exception caught");
+            }
+        }
+        try {
+            util.updateStack ("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment");
+        } catch (MsoException e) {
+            if (e instanceof MsoIOException && e.getCause () != null
+                && e.getCause () instanceof OpenStackConnectException) {
+                // Ok, we were able to go up to the connection to OpenStack
+            } else {
+                e.printStackTrace ();
+                fail ("Exception caught");
+            }
+        }
+        try {
+            util.updateStack ("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment", null);
+        } catch (MsoException e) {
+            if (e instanceof MsoIOException && e.getCause () != null
+                && e.getCause () instanceof OpenStackConnectException) {
+                // Ok, we were able to go up to the connection to OpenStack
+            } else {
+                e.printStackTrace ();
+                fail ("Exception caught");
+            }
+        }
+        try {
+            util.updateStack ("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment", null, null);
+        } catch (MsoException e) {
+            if (e instanceof MsoIOException && e.getCause () != null
+                && e.getCause () instanceof OpenStackConnectException) {
+                // Ok, we were able to go up to the connection to OpenStack
+            } else {
+                e.printStackTrace ();
+                fail ("Exception caught");
+            }
+        }
+    }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudIdentityESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudIdentityESTest.java
new file mode 100644 (file)
index 0000000..69fbb26
--- /dev/null
@@ -0,0 +1,400 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:37:20 GMT 2016
+ */
+
+package org.openecomp.mso.cloud;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class CloudIdentityESTest {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMsoId("ga-cj*/");
+      cloudIdentity0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setTenantMetadata(true);
+      boolean boolean0 = cloudIdentity0.hasTenantMetadata();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMsoPass("");
+      String string0 = cloudIdentity0.getMsoPass();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMsoId("hz4I\7fjQ&in.t^IC|");
+      String string0 = cloudIdentity0.getMsoId();
+      assertEquals("hz4I\7fjQ&in.t^IC|", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMemberRole("Exception in encryptPassword");
+      String string0 = cloudIdentity0.getMemberRole();
+      assertEquals("Exception in encryptPassword", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setIdentityUrl("ASDC_ARTIFACT_ALREADY_DEPLOYED");
+      String string0 = cloudIdentity0.getIdentityUrl();
+      assertEquals("ASDC_ARTIFACT_ALREADY_DEPLOYED", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      CloudIdentity.IdentityServerType cloudIdentity_IdentityServerType0 = CloudIdentity.IdentityServerType.KEYSTONE;
+      PrivateAccess.setVariable((Class<CloudIdentity>) CloudIdentity.class, cloudIdentity0, "identityServerType", (Object) cloudIdentity_IdentityServerType0);
+      String string0 = cloudIdentity0.getIdentityServerTypeAsString();
+      assertEquals("KEYSTONE", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setId("");
+      String string0 = cloudIdentity0.getId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setAdminTenant("0hh5nz?kd3N,FTKBX");
+      String string0 = cloudIdentity0.getAdminTenant();
+      assertEquals("0hh5nz?kd3N,FTKBX", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setTenantMetadata(true);
+      CloudIdentity cloudIdentity1 = cloudIdentity0.clone();
+      assertTrue(cloudIdentity1.equals((Object)cloudIdentity0));
+      assertTrue(cloudIdentity1.hasTenantMetadata());
+      assertNotSame(cloudIdentity1, cloudIdentity0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setTenantMetadata(false);
+      CloudIdentity cloudIdentity1 = cloudIdentity0.clone();
+      assertFalse(cloudIdentity1.hasTenantMetadata());
+      assertTrue(cloudIdentity1.equals((Object)cloudIdentity0));
+      assertNotSame(cloudIdentity1, cloudIdentity0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMsoPass("0LAxuQ0#K,Ma");
+      // Undeclared exception!
+      try {
+        cloudIdentity0.getMsoPass();
+        fail("Expecting exception: NumberFormatException");
+
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"0L\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      // Undeclared exception!
+      try {
+        cloudIdentity0.getKeystoneUrl();
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.cloud.CloudIdentity", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      // Undeclared exception!
+      try {
+        CloudIdentity.encryptPassword((String) null);
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.utils.CryptoUtils", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      CloudIdentity cloudIdentity1 = cloudIdentity0.clone();
+      assertTrue(cloudIdentity1.equals((Object)cloudIdentity0));
+
+      PrivateAccess.setVariable((Class<CloudIdentity>) CloudIdentity.class, cloudIdentity1, "msoPass", (Object) "0~=?Wm,~42b4:K");
+      boolean boolean0 = cloudIdentity0.equals(cloudIdentity1);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMemberRole("r");
+      CloudIdentity cloudIdentity1 = new CloudIdentity();
+      boolean boolean0 = cloudIdentity0.equals(cloudIdentity1);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      CloudIdentity cloudIdentity1 = cloudIdentity0.clone();
+      assertTrue(cloudIdentity1.equals((Object)cloudIdentity0));
+
+      cloudIdentity1.setMemberRole("RA_SET_CALLBACK_AUTH_EXC");
+      boolean boolean0 = cloudIdentity0.equals(cloudIdentity1);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMemberRole("r");
+      CloudIdentity cloudIdentity1 = cloudIdentity0.clone();
+      boolean boolean0 = cloudIdentity0.equals(cloudIdentity1);
+      assertNotSame(cloudIdentity1, cloudIdentity0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      Object object0 = new Object();
+      boolean boolean0 = cloudIdentity0.equals(object0);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      boolean boolean0 = cloudIdentity0.equals((Object) null);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      boolean boolean0 = cloudIdentity0.equals(cloudIdentity0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMsoPass("9Y#4-v1Fu27keLW");
+      cloudIdentity0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setMemberRole("ASDC_GENERAL_METRICS");
+      cloudIdentity0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setIdentityUrl("g9+j0@{H}S|");
+      cloudIdentity0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setId("FSmZDF:2*!OtMq!i");
+      cloudIdentity0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setKeystoneUrl("VdON&(o*x/W!");
+      assertNull(cloudIdentity0.getMemberRole());
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      String string0 = cloudIdentity0.getKeystoneUrl("A9Z Ol `I1^y\7f]F[EC0", "");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      String string0 = cloudIdentity0.getMemberRole();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      // Undeclared exception!
+      try {
+        cloudIdentity0.getIdentityServerTypeAsString();
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.cloud.CloudIdentity", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setIdentityUrl("com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES");
+      CloudIdentity cloudIdentity1 = new CloudIdentity();
+      boolean boolean0 = cloudIdentity0.equals(cloudIdentity1);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      String string0 = cloudIdentity0.getId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setTenantMetadata(false);
+      cloudIdentity0.hashCode();
+      assertFalse(cloudIdentity0.hasTenantMetadata());
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.setAdminTenant("0hh5nz?kd3N,FTKBX");
+      cloudIdentity0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      String string0 = cloudIdentity0.getAdminTenant();
+      assertNull(string0);
+
+  }
+
+  @Test(timeout = 4000)
+  public void test37()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      String string0 = cloudIdentity0.getMsoId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test38()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudIdentity0.getIdentityServerType();
+  }
+
+  @Test(timeout = 4000)
+  public void test39()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      // Undeclared exception!
+      try {
+        cloudIdentity0.getMsoPass();
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.utils.CryptoUtils", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test40()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      // Undeclared exception!
+      try {
+        cloudIdentity0.toString();
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.cloud.CloudIdentity", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test41()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      // Undeclared exception!
+      try {
+        cloudIdentity0.hasTenantMetadata();
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.cloud.CloudIdentity", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test42()  throws Throwable  {
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      String string0 = cloudIdentity0.getIdentityUrl();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test43()  throws Throwable  {
+      String string0 = CloudIdentity.encryptPassword("jaR\"aJmqpa>(&");
+      assertEquals("718A16EDF9EA61E9350A07703082D5B5", string0);
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudIdentityTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudIdentityTest.java
new file mode 100644 (file)
index 0000000..377a724
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.cloud;
+
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+
+public class CloudIdentityTest {
+
+    @Test
+    public final void testCloudIdentity () {
+        CloudIdentity id = new CloudIdentity ();
+        id.setAdminTenant ("AdminTenant");
+        id.setId ("id");
+//        id.setKeystoneUrl ("keystone");
+        id.setIdentityUrl ("keystone");
+        id.setMemberRole ("member");
+        id.setMsoId ("msoId");
+        id.setMsoPass (CloudIdentity.encryptPassword ("password"));
+        id.setTenantMetadata (true);
+
+        assertTrue (id.getAdminTenant ().equals ("AdminTenant"));
+        assertTrue (id.getId ().equals ("id"));
+//        assertTrue (id.getKeystoneUrl ().equals ("keystone"));
+        assertTrue (id.getMemberRole ().equals ("member"));
+        assertTrue (id.getMsoId ().equals ("msoId"));
+        assertTrue (id.getMsoPass ().equals ("password"));
+        assertTrue (id.hasTenantMetadata ());
+//        assertTrue (id.toString ().contains ("keystone"));
+    }
+
+    @Test
+    public final void testEncryption () {
+        String encrypted = CloudIdentity.encryptPassword ("password");
+        assertTrue (encrypted != null);
+        assertTrue (!encrypted.equals ("password"));
+    }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudSiteESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudSiteESTest.java
new file mode 100644 (file)
index 0000000..68bccfc
--- /dev/null
@@ -0,0 +1,315 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:42:36 GMT 2016
+ */
+
+package org.openecomp.mso.cloud;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CloudSiteESTest extends CloudSiteESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setAic_version("-t");
+      cloudSite0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setRegionId("CloudSite: id=");
+      String string0 = cloudSite0.getRegionId();
+      assertEquals("CloudSite: id=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setRegionId("");
+      String string0 = cloudSite0.getRegionId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      PrivateAccess.setVariable((Class<CloudSite>) CloudSite.class, cloudSite0, "identityServiceId", (Object) "PUBLIC");
+      String string0 = cloudSite0.getIdentityServiceId();
+      assertEquals("PUBLIC", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudSite0.setIdentityService(cloudIdentity0);
+      cloudIdentity0.setTenantMetadata(false);
+      CloudIdentity cloudIdentity1 = cloudSite0.getIdentityService();
+      assertNull(cloudIdentity1.getAdminTenant());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setId("");
+      String string0 = cloudSite0.getId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setClli("N;w7*-)9\"t|T\7f/jCa");
+      String string0 = cloudSite0.getClli();
+      assertEquals("N;w7*-)9\"t|T\7f/jCa", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setClli("");
+      String string0 = cloudSite0.getClli();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setAic_version("v&K[by0");
+      String string0 = cloudSite0.getAic_version();
+      assertEquals("v&K[by0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setAic_version("");
+      String string0 = cloudSite0.getAic_version();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      CloudIdentity cloudIdentity0 = mock(CloudIdentity.class, new ViolatedAssumptionAnswer());
+      doReturn((CloudIdentity) null).when(cloudIdentity0).clone();
+      cloudSite0.setIdentityService(cloudIdentity0);
+      CloudSite cloudSite1 = cloudSite0.clone();
+      boolean boolean0 = cloudSite0.equals(cloudSite1);
+      assertFalse(boolean0);
+      assertFalse(cloudSite1.equals((Object)cloudSite0));
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      CloudSite cloudSite1 = new CloudSite();
+      assertTrue(cloudSite1.equals((Object)cloudSite0));
+      
+      cloudSite1.setClli("CloudSite: id=null, regionId=null, identityServiceId=null, aic_version=null, clli=null");
+      boolean boolean0 = cloudSite0.equals(cloudSite1);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudSite0.setIdentityService(cloudIdentity0);
+      CloudSite cloudSite1 = cloudSite0.clone();
+      assertTrue(cloudSite1.equals((Object)cloudSite0));
+      
+      cloudSite1.setAic_version("");
+      boolean boolean0 = cloudSite0.equals(cloudSite1);
+      assertFalse(cloudSite1.equals((Object)cloudSite0));
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudSite0.setIdentityService(cloudIdentity0);
+      CloudSite cloudSite1 = cloudSite0.clone();
+      boolean boolean0 = cloudSite0.equals(cloudSite1);
+      assertNotSame(cloudSite1, cloudSite0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setRegionId("CloudSite: id=null, regionId=null, identityServiceId=null, aic_version=null, clli=null");
+      CloudSite cloudSite1 = new CloudSite();
+      boolean boolean0 = cloudSite0.equals(cloudSite1);
+      assertFalse(cloudSite1.equals((Object)cloudSite0));
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudSite0.setIdentityService(cloudIdentity0);
+      CloudSite cloudSite1 = cloudSite0.clone();
+      assertTrue(cloudSite1.equals((Object)cloudSite0));
+      
+      cloudSite1.setId("Tx;$hjj");
+      boolean boolean0 = cloudSite1.equals(cloudSite0);
+      assertFalse(boolean0);
+      assertFalse(cloudSite1.equals((Object)cloudSite0));
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      Object object0 = new Object();
+      boolean boolean0 = cloudSite0.equals(object0);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      boolean boolean0 = cloudSite0.equals((Object) null);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      boolean boolean0 = cloudSite0.equals(cloudSite0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      PrivateAccess.setVariable((Class<CloudSite>) CloudSite.class, cloudSite0, "identityServiceId", (Object) "");
+      CloudSite cloudSite1 = new CloudSite();
+      boolean boolean0 = cloudSite0.equals(cloudSite1);
+      assertFalse(boolean0);
+      assertFalse(cloudSite1.equals((Object)cloudSite0));
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      PrivateAccess.setVariable((Class<CloudSite>) CloudSite.class, cloudSite0, "clli", (Object) "AgBkO0S\"V'R'");
+      cloudSite0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      PrivateAccess.setVariable((Class<CloudSite>) CloudSite.class, cloudSite0, "regionId", (Object) "`V+.b\7f PU'3:EbS");
+      cloudSite0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      PrivateAccess.setVariable((Class<CloudSite>) CloudSite.class, cloudSite0, "identityServiceId", (Object) "PUBLIC");
+      cloudSite0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      PrivateAccess.setVariable((Class<CloudSite>) CloudSite.class, cloudSite0, "id", (Object) "PUBLIC");
+      cloudSite0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      String string0 = cloudSite0.getIdentityServiceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      String string0 = cloudSite0.toString();
+      assertEquals("CloudSite: id=null, regionId=null, identityServiceId=null, aic_version=null, clli=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      String string0 = cloudSite0.getAic_version();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      CloudIdentity cloudIdentity0 = new CloudIdentity();
+      cloudSite0.setIdentityService(cloudIdentity0);
+      cloudSite0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      String string0 = cloudSite0.getClli();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      String string0 = cloudSite0.getId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      String string0 = cloudSite0.getRegionId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      cloudSite0.setId("Tx;$hjj");
+      String string0 = cloudSite0.getId();
+      assertEquals("Tx;$hjj", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      CloudIdentity cloudIdentity0 = cloudSite0.getIdentityService();
+      assertNull(cloudIdentity0);
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      CloudSite cloudSite0 = new CloudSite();
+      // Undeclared exception!
+      try { 
+        cloudSite0.clone();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.cloud.CloudSite", e);
+      }
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudSiteESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/CloudSiteESTestscaffolding.java
new file mode 100644 (file)
index 0000000..48e800f
--- /dev/null
@@ -0,0 +1,150 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:42:36 GMT 2016
+ */
+
+package org.openecomp.mso.cloud;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CloudSiteESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.cloud.CloudSite"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CloudSiteESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.cloud.CloudSite",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.cloud.CloudIdentity$IdentityServerType",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.cloud.CloudIdentity"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CloudSiteESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
+      "org.apache.xerces.jaxp.SAXParserImpl",
+      "org.apache.xerces.parsers.XMLParser",
+      "org.apache.xerces.parsers.AbstractSAXParser",
+      "org.apache.xerces.parsers.SAXParser",
+      "org.apache.xerces.parsers.ObjectFactory",
+      "org.apache.xerces.util.ParserConfigurationSettings",
+      "org.apache.xerces.parsers.XML11Configuration",
+      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
+      "org.apache.xerces.util.SymbolTable",
+      "org.apache.xerces.impl.XMLEntityManager",
+      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
+      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
+      "org.apache.xerces.impl.XMLEntityScanner$1",
+      "org.apache.xerces.impl.XMLEntityScanner",
+      "org.apache.xerces.impl.XMLErrorReporter",
+      "org.apache.xerces.impl.XMLScanner",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
+      "org.apache.xerces.impl.XMLDocumentScannerImpl",
+      "org.apache.xerces.util.XMLStringBuffer",
+      "org.apache.xerces.util.XMLAttributesImpl",
+      "org.apache.xerces.impl.XMLDTDScannerImpl",
+      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
+      "org.apache.xerces.impl.dtd.XMLDTDValidator",
+      "org.apache.xerces.impl.validation.ValidationState",
+      "org.apache.xerces.impl.dtd.XMLElementDecl",
+      "org.apache.xerces.impl.dtd.XMLSimpleType",
+      "org.apache.xerces.impl.dv.DTDDVFactory",
+      "org.apache.xerces.impl.dv.ObjectFactory",
+      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
+      "org.apache.xerces.impl.XMLVersionDetector",
+      "org.apache.xerces.impl.msg.XMLMessageFormatter",
+      "org.apache.xerces.impl.io.UTF8Reader",
+      "org.apache.xerces.util.XMLSymbols",
+      "org.apache.xerces.xni.NamespaceContext",
+      "org.apache.xerces.util.XMLChar",
+      "org.apache.xerces.impl.Constants",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.cloud.CloudIdentity",
+      "org.openecomp.mso.utils.CryptoUtils",
+      "org.openecomp.mso.logger.MsoAlarmLogger",
+      "org.openecomp.mso.openstack.utils.MsoCommonUtils"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantESTest.java
new file mode 100644 (file)
index 0000000..241ca88
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:56:50 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoTenantESTest extends MsoTenantESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant("P<5j-:=G4zf", "P<5j-:=G4zf", (Map<String, String>) null);
+      String string0 = msoTenant0.getTenantName();
+      assertEquals("P<5j-:=G4zf", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant("", "", (Map<String, String>) null);
+      String string0 = msoTenant0.getTenantName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant();
+      String string0 = msoTenant0.getTenantName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant();
+      Map<String, String> map0 = msoTenant0.getMetadata();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant("", "SsK{%:", (Map<String, String>) null);
+      String string0 = msoTenant0.getTenantId();
+      assertEquals("", string0);
+      assertEquals("SsK{%:", msoTenant0.getTenantName());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant();
+      msoTenant0.setTenantId("9A");
+      String string0 = msoTenant0.getTenantId();
+      assertEquals("9A", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant();
+      msoTenant0.setMetadata((Map<String, String>) null);
+      assertNull(msoTenant0.getTenantName());
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant();
+      msoTenant0.setTenantName("9A");
+      assertNull(msoTenant0.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      MsoTenant msoTenant0 = new MsoTenant();
+      String string0 = msoTenant0.getTenantId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/MsoTenantESTestscaffolding.java
new file mode 100644 (file)
index 0000000..0ac4893
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:56:50 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoTenantESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.beans.MsoTenant"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoTenantESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.beans.MsoTenant"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoESTest.java
new file mode 100644 (file)
index 0000000..9c15725
--- /dev/null
@@ -0,0 +1,247 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:44:14 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+
+import com.woorea.openstack.quantum.model.Network;
+import com.woorea.openstack.quantum.model.Segment;
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkInfoESTest extends NetworkInfoESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      networkInfo0.setVlans((List<Integer>) null);
+      List<Integer> list0 = networkInfo0.getVlans();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      Network network0 = mock(Network.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(network0).getId();
+      doReturn((String) null).when(network0).getName();
+      doReturn((String) null).when(network0).getProviderPhysicalNetwork();
+      doReturn((List) null).when(network0).getSegments();
+      doReturn((String) null).when(network0).getStatus();
+      doReturn((List) null).when(network0).getSubnets();
+      NetworkInfo networkInfo0 = new NetworkInfo(network0);
+      List<String> list0 = networkInfo0.getSubnets();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      networkInfo0.setShared("Network [id=");
+      String string0 = networkInfo0.getShared();
+      assertEquals("Network [id=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      networkInfo0.setProvider((String) null);
+      String string0 = networkInfo0.getProvider();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      networkInfo0.setProvider("ERROR");
+      String string0 = networkInfo0.getProvider();
+      assertEquals("ERROR", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      networkInfo0.setId((String) null);
+      String string0 = networkInfo0.getId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.DOWN;
+      NetworkInfo networkInfo0 = new NetworkInfo("\7fIghhGdNW B*}", networkStatus0);
+      String string0 = networkInfo0.getId();
+      assertEquals("\7fIghhGdNW B*}", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      Network network0 = mock(Network.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(network0).getId();
+      doReturn((String) null).when(network0).getName();
+      doReturn((String) null).when(network0).getProviderPhysicalNetwork();
+      doReturn((List) null).when(network0).getSegments();
+      doReturn((String) null).when(network0).getStatus();
+      doReturn((List) null).when(network0).getSubnets();
+      NetworkInfo networkInfo0 = new NetworkInfo(network0);
+      List<String> list0 = networkInfo0.getSubnets();
+      Network network1 = mock(Network.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(network1).getId();
+      doReturn((String) null).when(network1).getName();
+      doReturn((String) null).when(network1).getProviderPhysicalNetwork();
+      doReturn((List<Segment>) null).when(network1).getSegments();
+      doReturn("uxR^({\"", (String) null).when(network1).getStatus();
+      doReturn(list0).when(network1).getSubnets();
+      NetworkInfo networkInfo1 = new NetworkInfo(network1);
+      assertNull(networkInfo1.getName());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      Network network0 = mock(Network.class, new ViolatedAssumptionAnswer());
+      doReturn(", segments: ").when(network0).getId();
+      doReturn("ACTIVE").when(network0).getName();
+      doReturn("l1~gC_#a'H,#*").when(network0).getProviderNetworkType();
+      doReturn("ACTIVE", "").when(network0).getProviderPhysicalNetwork();
+      doReturn("ERROR", "ERROR", "%<3T-").when(network0).getStatus();
+      doReturn((List) null).when(network0).getSubnets();
+      NetworkInfo networkInfo0 = new NetworkInfo(network0);
+      networkInfo0.getStatus();
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      Network network0 = mock(Network.class, new ViolatedAssumptionAnswer());
+      doReturn(", segments: ").when(network0).getId();
+      doReturn("ACTIVE").when(network0).getName();
+      doReturn((String) null).when(network0).getProviderNetworkType();
+      doReturn("ACTIVE", (String) null).when(network0).getProviderPhysicalNetwork();
+      doReturn("ERROR", (String) null).when(network0).getStatus();
+      NetworkInfo networkInfo0 = null;
+      try {
+        networkInfo0 = new NetworkInfo(network0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo((Network) null);
+      assertEquals("", networkInfo0.getId());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      String string0 = networkInfo0.toString();
+      assertEquals("Network: name=,id=,status=UNKNOWN,provider=,vlans=[],subnets=[],shared=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      NetworkStatus networkStatus0 = NetworkStatus.NOTFOUND;
+      networkInfo0.setStatus(networkStatus0);
+      assertEquals("", networkInfo0.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.UNKNOWN;
+      NetworkInfo networkInfo0 = new NetworkInfo((String) null, networkStatus0);
+      String string0 = networkInfo0.getName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      networkInfo0.setShared((String) null);
+      String string0 = networkInfo0.getShared();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      String string0 = networkInfo0.getShared();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      List<String> list0 = networkInfo0.getSubnets();
+      Network network0 = mock(Network.class, new ViolatedAssumptionAnswer());
+      doReturn("R65k@>rbu`lzb#").when(network0).getId();
+      doReturn("ERROR").when(network0).getName();
+      doReturn("DOWN").when(network0).getProviderNetworkType();
+      doReturn("u1Z(%z~k-ao5#y", "R65k@>rbu`lzb#").when(network0).getProviderPhysicalNetwork();
+      doReturn("R65k@>rbu`lzb#", "R65k@>rbu`lzb#").when(network0).getStatus();
+      doReturn(list0).when(network0).getSubnets();
+      NetworkInfo networkInfo1 = new NetworkInfo(network0);
+      networkInfo1.getName();
+      assertEquals("R65k@>rbu`lzb#", networkInfo1.getProvider());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      List<Integer> list0 = networkInfo0.getVlans();
+      networkInfo0.setVlans(list0);
+      assertEquals("", networkInfo0.getProvider());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      networkInfo0.setName("");
+      assertEquals(NetworkStatus.UNKNOWN, networkInfo0.getStatus());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      networkInfo0.setSubnets((List<String>) null);
+      assertEquals("", networkInfo0.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      NetworkStatus networkStatus0 = networkInfo0.getStatus();
+      assertEquals(NetworkStatus.UNKNOWN, networkStatus0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      String string0 = networkInfo0.getProvider();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      String string0 = networkInfo0.getId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      NetworkInfo networkInfo0 = new NetworkInfo();
+      String string0 = networkInfo0.getName();
+      assertEquals("", string0);
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkInfoESTestscaffolding.java
new file mode 100644 (file)
index 0000000..0c87ca9
--- /dev/null
@@ -0,0 +1,92 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:44:14 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class NetworkInfoESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.beans.NetworkInfo"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkInfoESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "com.woorea.openstack.quantum.model.Network",
+      "org.codehaus.jackson.annotate.JsonIgnoreProperties",
+      "com.woorea.openstack.quantum.model.Segment",
+      "org.openecomp.mso.openstack.beans.NetworkInfo",
+      "org.openecomp.mso.openstack.beans.NetworkStatus",
+      "com.woorea.openstack.quantum.model.Network$NetworkType",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(NetworkInfoESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.beans.NetworkStatus",
+      "org.openecomp.mso.openstack.beans.NetworkInfo",
+      "com.woorea.openstack.quantum.model.Network"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackESTest.java
new file mode 100644 (file)
index 0000000..bad2bde
--- /dev/null
@@ -0,0 +1,303 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:55:12 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+import org.openecomp.mso.entity.MsoRequest;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkRollbackESTest extends NetworkRollbackESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkStackId("H/r!m+_NT$?ed$IPcLD");
+      networkRollback0.setNeutronNetworkId("H/r!m+_NT$?ed$IPcLD");
+      MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null, (String) null, (String) null).when(msoRequest0).toString();
+      networkRollback0.setNetworkStackId("");
+      networkRollback0.setMsoRequest((MsoRequest) null);
+      networkRollback0.setMsoRequest(msoRequest0);
+      networkRollback0.toString();
+      networkRollback0.setNeutronNetworkId("NetworkRollback [networkId=null, neutronNetworkId=H/r!m+_NT$?ed$IPcLD, networkStackId=, tenantId=null, cloudId=null, networkType=null, networkCreated=false, networkName=null, physicalNetwork=null]");
+      networkRollback0.getVlans();
+      networkRollback0.setCloudId("NetworkRollback [networkId=null, neutronNetworkId=H/r!m+_NT$?ed$IPcLD, networkStackId=, tenantId=null, cloudId=null, networkType=null, networkCreated=false, networkName=null, physicalNetwork=null]");
+      networkRollback0.setNetworkType("NetworkRollback [networkId=null, neutronNetworkId=H/r!m+_NT$?ed$IPcLD, networkStackId=, tenantId=null, cloudId=null, networkType=null, networkCreated=false, networkName=null, physicalNetwork=null]");
+      networkRollback0.toString();
+      networkRollback0.setCloudId("NetworkRollback [networkId=null, neutronNetworkId=H/r!m+_NT$?ed$IPcLD, networkStackId=, tenantId=null, cloudId=null, networkType=null, networkCreated=false, networkName=null, physicalNetwork=null]");
+      networkRollback0.setTenantId("80\u0002<]~y|x(#fl");
+      networkRollback0.setCloudId("=:U\"]");
+      networkRollback0.toString();
+      networkRollback0.getVlans();
+      networkRollback0.toString();
+      networkRollback0.getVlans();
+      networkRollback0.getVlans();
+      networkRollback0.getVlans();
+      networkRollback0.setVlans((List<Integer>) null);
+      networkRollback0.toString();
+      networkRollback0.getMsoRequest();
+      networkRollback0.getVlans();
+      networkRollback0.toString();
+      networkRollback0.getMsoRequest();
+      networkRollback0.getVlans();
+      networkRollback0.getMsoRequest();
+      networkRollback0.getVlans();
+      List<Integer> list0 = networkRollback0.getVlans();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkType((String) null);
+      networkRollback0.getMsoRequest();
+      networkRollback0.setMsoRequest((MsoRequest) null);
+      networkRollback0.setNetworkId("");
+      networkRollback0.setTenantId("");
+      networkRollback0.getNetworkId();
+      networkRollback0.setNeutronNetworkId("");
+      networkRollback0.setCloudId("O;On");
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setCloudId("C5FS|V@CMBag");
+      networkRollback0.getVlans();
+      networkRollback0.setVlans((List<Integer>) null);
+      networkRollback0.getPhysicalNetwork();
+      networkRollback0.setVlans((List<Integer>) null);
+      networkRollback0.getNeutronNetworkId();
+      networkRollback0.setNetworkType("C5FS|V@CMBag");
+      networkRollback0.getNetworkType();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkId(", networkName=");
+      networkRollback0.setNetworkStackId("u)");
+      networkRollback0.setNetworkId("u)");
+      networkRollback0.setNetworkId(", networkName=");
+      networkRollback0.getNetworkStackId();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkType("V3$f~dKduUu0");
+      networkRollback0.setNetworkType("");
+      networkRollback0.setTenantId("");
+      networkRollback0.getPhysicalNetwork();
+      networkRollback0.getVlans();
+      networkRollback0.getNetworkType();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setTenantId("Lu#)!pt2p=<#T.");
+      networkRollback0.getTenantId();
+      networkRollback0.setNetworkStackId("Lu#)!pt2p=<#T.");
+      networkRollback0.getNeutronNetworkId();
+      networkRollback0.setTenantId("Lu#)!pt2p=<#T.");
+      networkRollback0.setNetworkStackId((String) null);
+      String string0 = networkRollback0.toString();
+      assertEquals("NetworkRollback [networkId=null, neutronNetworkId=null, networkStackId=null, tenantId=Lu#)!pt2p=<#T., cloudId=null, networkType=null, networkCreated=false, networkName=null, physicalNetwork=null]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.getMsoRequest();
+      networkRollback0.setMsoRequest((MsoRequest) null);
+      String string0 = networkRollback0.toString();
+      assertEquals("NetworkRollback [networkId=null, neutronNetworkId=null, networkStackId=null, tenantId=null, cloudId=null, networkType=null, networkCreated=false, networkName=null, physicalNetwork=null]", string0);
+      
+      networkRollback0.setNetworkName("");
+      networkRollback0.getNetworkName();
+      networkRollback0.setNetworkCreated(true);
+      networkRollback0.setNetworkName("");
+      networkRollback0.getPhysicalNetwork();
+      networkRollback0.setTenantId("");
+      networkRollback0.setNetworkId("");
+      assertTrue(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.getTenantId();
+      networkRollback0.setNetworkStackId((String) null);
+      networkRollback0.getVlans();
+      networkRollback0.setTenantId("");
+      networkRollback0.getTenantId();
+      networkRollback0.setVlans((List<Integer>) null);
+      String string0 = networkRollback0.toString();
+      assertEquals("NetworkRollback [networkId=null, neutronNetworkId=null, networkStackId=null, tenantId=, cloudId=null, networkType=null, networkCreated=false, networkName=null, physicalNetwork=null]", string0);
+      
+      NetworkRollback networkRollback1 = new NetworkRollback();
+      assertFalse(networkRollback1.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNeutronNetworkId("");
+      networkRollback0.setCloudId("");
+      networkRollback0.getTenantId();
+      networkRollback0.setTenantId("");
+      networkRollback0.setNetworkType("Y=x>wx'");
+      networkRollback0.getNeutronNetworkId();
+      networkRollback0.getVlans();
+      networkRollback0.setVlans((List<Integer>) null);
+      networkRollback0.setNetworkStackId("6P7@4aGo\7f &Kd>V");
+      networkRollback0.getCloudId();
+      NetworkRollback networkRollback1 = new NetworkRollback();
+      assertFalse(networkRollback1.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      assertFalse(networkRollback0.getNetworkCreated());
+      
+      networkRollback0.setNetworkCreated(true);
+      networkRollback0.toString();
+      networkRollback0.setNeutronNetworkId("NetworkRollback [networkId=null, neutronNetworkId=null, networkStackId=null, tenantId=null, cloudId=null, networkType=null, networkCreated=true, networkName=null, physicalNetwork=null]");
+      networkRollback0.getPhysicalNetwork();
+      boolean boolean0 = networkRollback0.getNetworkCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkId(", tenantId=");
+      networkRollback0.setNetworkId("");
+      networkRollback0.setTenantId(", tenantId=");
+      networkRollback0.setNetworkName("+*");
+      networkRollback0.getNetworkName();
+      networkRollback0.setNetworkStackId(", tenantId=");
+      networkRollback0.setCloudId("+*");
+      networkRollback0.getCloudId();
+      NetworkRollback networkRollback1 = new NetworkRollback();
+      assertFalse(networkRollback1.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setPhysicalNetwork("!(>41heY7e");
+      networkRollback0.setTenantId("j");
+      networkRollback0.setNeutronNetworkId("j");
+      networkRollback0.getPhysicalNetwork();
+      networkRollback0.getVlans();
+      NetworkRollback networkRollback1 = new NetworkRollback();
+      networkRollback1.getMsoRequest();
+      networkRollback0.setMsoRequest((MsoRequest) null);
+      networkRollback0.setNetworkCreated(false);
+      networkRollback0.setNeutronNetworkId("j");
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setPhysicalNetwork("");
+      networkRollback0.setNetworkStackId("");
+      networkRollback0.setNeutronNetworkId("");
+      networkRollback0.getNetworkStackId();
+      networkRollback0.getMsoRequest();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setCloudId("7u@lc[l##+g`2V");
+      networkRollback0.getVlans();
+      networkRollback0.setVlans((List<Integer>) null);
+      networkRollback0.setNetworkType("");
+      networkRollback0.setCloudId(", physicalNetwork=");
+      networkRollback0.setPhysicalNetwork("");
+      networkRollback0.setNeutronNetworkId(", physicalNetwork=");
+      networkRollback0.getPhysicalNetwork();
+      networkRollback0.getNeutronNetworkId();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.getNetworkId();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.getMsoRequest();
+      networkRollback0.setMsoRequest((MsoRequest) null);
+      networkRollback0.getNetworkCreated();
+      networkRollback0.setNetworkId(", networkName=");
+      networkRollback0.getNeutronNetworkId();
+      networkRollback0.setPhysicalNetwork((String) null);
+      networkRollback0.getNetworkId();
+      NetworkRollback networkRollback1 = new NetworkRollback();
+      String string0 = networkRollback1.toString();
+      assertEquals("NetworkRollback [networkId=null, neutronNetworkId=null, networkStackId=null, tenantId=null, cloudId=null, networkType=null, networkCreated=false, networkName=null, physicalNetwork=null]", string0);
+      
+      networkRollback1.getVlans();
+      networkRollback0.setVlans((List<Integer>) null);
+      networkRollback0.getNetworkId();
+      networkRollback1.getPhysicalNetwork();
+      networkRollback1.setNetworkCreated(false);
+      assertFalse(networkRollback1.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.getNetworkType();
+      networkRollback0.setTenantId((String) null);
+      networkRollback0.setNetworkName(" networkStacId=");
+      networkRollback0.getCloudId();
+      networkRollback0.getTenantId();
+      networkRollback0.setNetworkStackId(" networkStacId=");
+      networkRollback0.setNeutronNetworkId((String) null);
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.getNetworkName();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkType("uK+JCvyg\"J(C d.w[");
+      networkRollback0.setCloudId("uK+JCvyg\"J(C d.w[");
+      networkRollback0.getNetworkStackId();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/NetworkRollbackESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1665732
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:55:12 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class NetworkRollbackESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.beans.NetworkRollback"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkRollbackESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.openstack.beans.NetworkRollback"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/PoolESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/PoolESTest.java
new file mode 100644 (file)
index 0000000..0ec588d
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:49:52 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class PoolESTest extends PoolESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      Pool pool0 = new Pool();
+      pool0.setStart("Allocation_pool [start=null, end=null]");
+      String string0 = pool0.getStart();
+      assertEquals("Allocation_pool [start=null, end=null]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      Pool pool0 = new Pool();
+      pool0.setEnd("Allocation_pool [start=null, end=null]");
+      String string0 = pool0.getEnd();
+      assertEquals("Allocation_pool [start=null, end=null]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      Pool pool0 = new Pool();
+      String string0 = pool0.getEnd();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      Pool pool0 = new Pool();
+      pool0.setStart("");
+      String string0 = pool0.getStart();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      Pool pool0 = new Pool();
+      String string0 = pool0.toString();
+      assertEquals("Allocation_pool [start=null, end=null]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      Pool pool0 = new Pool();
+      pool0.setEnd("");
+      String string0 = pool0.getEnd();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      Pool pool0 = new Pool();
+      String string0 = pool0.getStart();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/PoolESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/PoolESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8ce9cb8
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:49:52 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class PoolESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.beans.Pool"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(PoolESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.beans.Pool"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/SubnetESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/SubnetESTest.java
new file mode 100644 (file)
index 0000000..7be8339
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:52:14 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class SubnetESTest extends SubnetESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setSubnetName("lu[c8x");
+      subnet0.getSubnetName();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setSubnetName("");
+      subnet0.getSubnetName();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setSubnetId("nL");
+      subnet0.getSubnetId();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setSubnetId("");
+      subnet0.getSubnetId();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setNeutronId("`jC)vXXeOG");
+      subnet0.getNeutronId();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setIpVersion("");
+      String string0 = subnet0.getIpVersion();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setGatewayIp((String) null);
+      subnet0.getGatewayIp();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setGatewayIp("Subnet [subnetName=null, neutronId=null, subnetId=null, cidr=null, gatewayIp=, ipVersion=4, enableDHCP=false, hostRoutes=null, allocationPools=null, dnsNameServers=null]");
+      subnet0.getGatewayIp();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setCidr("H3%q_*bOC2");
+      subnet0.getCidr();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setIpVersion((String) null);
+      String string0 = subnet0.getIpVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setAllocationPools((List<Pool>) null);
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.getNeutronId();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.getHostRoutes();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      String string0 = subnet0.toString();
+      assertEquals("Subnet [subnetName=null, neutronId=null, subnetId=null, cidr=null, gatewayIp=, ipVersion=4, enableDHCP=false, hostRoutes=null, allocationPools=null, dnsNameServers=null]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.getSubnetName();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setNeutronId("");
+      subnet0.getNeutronId();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setCidr("");
+      subnet0.getCidr();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.getDnsNameServers();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setHostRoutes((List<String>) null);
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      String string0 = subnet0.getIpVersion();
+      assertEquals("4", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.getSubnetId();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setEnableDHCP((Boolean) null);
+      subnet0.getEnableDHCP();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.getAllocationPools();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.getCidr();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.getGatewayIp();
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      subnet0.setDnsNameServers((List<String>) null);
+      assertEquals("4", subnet0.getIpVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      Subnet subnet0 = new Subnet();
+      Boolean boolean0 = subnet0.getEnableDHCP();
+      assertFalse(boolean0);
+      assertEquals("4", subnet0.getIpVersion());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/SubnetESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/SubnetESTestscaffolding.java
new file mode 100644 (file)
index 0000000..a9bf598
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:52:14 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class SubnetESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.beans.Subnet"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(SubnetESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.beans.Pool",
+      "org.openecomp.mso.openstack.beans.Subnet"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTest.java
new file mode 100644 (file)
index 0000000..e76ce41
--- /dev/null
@@ -0,0 +1,403 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:51:17 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VnfRollbackESTest extends VnfRollbackESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVolumeGroupName(", vnfCreated=");
+      vnfRollback0.getVolumeGroupName();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVolumeGroupId("}mvn2f6!r5FG1/_M~M");
+      vnfRollback0.getVolumeGroupId();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVolumeGroupId("");
+      vnfRollback0.getVolumeGroupId();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVolumeGroupHeatStackId("Z^t$4-eOKP9");
+      vnfRollback0.getVolumeGroupHeatStackId();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getVnfId();
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVnfId("");
+      vnfRollback0.getVnfId();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVfModuleStackId("8y*`!>A$@*l8#a>");
+      vnfRollback0.getVfModuleStackId();
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVfModuleStackId("");
+      vnfRollback0.getVfModuleStackId();
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback(", tenant=", ", tenant=", ", tenant=", false, false, (MsoRequest) null, ", tenant=", "f5`2h^e^.-x", ", tenant=");
+      String string0 = vnfRollback0.getTenantId();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertEquals(", tenant=", vnfRollback0.getCloudSiteId());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+      assertEquals(", tenant=", vnfRollback0.getRequestType());
+      assertEquals("f5`2h^e^.-x", vnfRollback0.getVolumeGroupId());
+      assertEquals(", tenant=", vnfRollback0.getVolumeGroupName());
+      assertEquals(", tenant=", vnfRollback0.getVnfId());
+      assertEquals(", tenant=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setTenantId("");
+      vnfRollback0.getTenantId();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      assertFalse(vnfRollback0.getTenantCreated());
+      
+      vnfRollback0.setTenantCreated(true);
+      boolean boolean0 = vnfRollback0.getTenantCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer());
+      VnfRollback vnfRollback0 = new VnfRollback("", ", vnf=", "Jvr", false, false, msoRequest0, "", "f'D", "VnfRollback: cloud=");
+      String string0 = vnfRollback0.getRequestType();
+      assertFalse(vnfRollback0.isBase());
+      assertEquals("Jvr", vnfRollback0.getCloudSiteId());
+      assertEquals("", vnfRollback0.getVnfId());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertEquals("f'D", vnfRollback0.getVolumeGroupId());
+      assertEquals(", vnf=", vnfRollback0.getTenantId());
+      assertEquals("VnfRollback: cloud=", string0);
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertEquals("", vnfRollback0.getVolumeGroupName());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setRequestType("");
+      vnfRollback0.getRequestType();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer());
+      doReturn("Jvr").when(msoRequest0).toString();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", vnf=", "Jvr", false, false, msoRequest0, "", "f'D", "VnfRollback: cloud=");
+      vnfRollback0.getMsoRequest();
+      assertEquals("Jvr", vnfRollback0.getCloudSiteId());
+      assertEquals("", vnfRollback0.getVnfId());
+      assertFalse(vnfRollback0.isBase());
+      assertEquals(", vnf=", vnfRollback0.getTenantId());
+      assertEquals("", vnfRollback0.getVolumeGroupName());
+      assertEquals("f'D", vnfRollback0.getVolumeGroupId());
+      assertEquals("VnfRollback: cloud=", vnfRollback0.getRequestType());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback(", tenant=", ", tenant=", ", tenant=", false, false, (MsoRequest) null, ", tenant=", "f5`2h^e^.-x", ", tenant=");
+      String string0 = vnfRollback0.getCloudSiteId();
+      assertFalse(vnfRollback0.isBase());
+      assertEquals(", tenant=", string0);
+      assertEquals("f5`2h^e^.-x", vnfRollback0.getVolumeGroupId());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertEquals(", tenant=", vnfRollback0.getVnfId());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertEquals(", tenant=", vnfRollback0.getVolumeGroupName());
+      assertEquals(", tenant=", vnfRollback0.getRequestType());
+      assertEquals(", tenant=", vnfRollback0.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setCloudSiteId("");
+      vnfRollback0.getCloudSiteId();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setBaseGroupHeatStackId("3(6Q^)Ic kf:zj");
+      vnfRollback0.getBaseGroupHeatStackId();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setBaseGroupHeatStackId("");
+      vnfRollback0.getBaseGroupHeatStackId();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      assertFalse(vnfRollback0.isBase());
+      
+      vnfRollback0.setIsBase(true);
+      boolean boolean0 = vnfRollback0.isBase();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getVfModuleStackId();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getVolumeGroupName();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVolumeGroupName("");
+      vnfRollback0.getVolumeGroupName();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      boolean boolean0 = vnfRollback0.getTenantCreated();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(boolean0);
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      boolean boolean0 = vnfRollback0.isBase();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      String string0 = vnfRollback0.toString();
+      assertFalse(vnfRollback0.isBase());
+      assertEquals("VnfRollback: cloud=null, tenant=null, vnf=null, tenantCreated=false, vnfCreated=false, requestType = null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      boolean boolean0 = vnfRollback0.getVnfCreated();
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(boolean0);
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getVolumeGroupHeatStackId();
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getBaseGroupHeatStackId();
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getCloudSiteId();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getTenantId();
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer());
+      vnfRollback0.setMsoRequest(msoRequest0);
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getMsoRequest();
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      assertFalse(vnfRollback0.getVnfCreated());
+      
+      vnfRollback0.setVnfCreated(true);
+      boolean boolean0 = vnfRollback0.getVnfCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getVolumeGroupId();
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.isBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.getRequestType();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVolumeGroupHeatStackId("");
+      vnfRollback0.getVolumeGroupHeatStackId();
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertFalse(vnfRollback0.getVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback(", tenant=", ", tenant=", ", tenant=", false, false, (MsoRequest) null, ", tenant=", "f5`2h^e^.-x", ", tenant=");
+      String string0 = vnfRollback0.getVnfId();
+      assertEquals(", tenant=", string0);
+      assertEquals(", tenant=", vnfRollback0.getTenantId());
+      assertFalse(vnfRollback0.getVnfCreated());
+      assertFalse(vnfRollback0.isBase());
+      assertFalse(vnfRollback0.getTenantCreated());
+      assertEquals(", tenant=", vnfRollback0.getCloudSiteId());
+      assertEquals(", tenant=", vnfRollback0.getVolumeGroupName());
+      assertEquals(", tenant=", vnfRollback0.getRequestType());
+      assertEquals("f5`2h^e^.-x", vnfRollback0.getVolumeGroupId());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/beans/VnfRollbackESTestscaffolding.java
new file mode 100644 (file)
index 0000000..e07b2cf
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:51:17 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VnfRollbackESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.beans.VnfRollback"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfRollbackESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.beans.VnfRollback",
+      "org.openecomp.mso.entity.MsoRequest"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionESTest.java
new file mode 100644 (file)
index 0000000..ccc5a94
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:51:02 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoAdapterExceptionESTest extends MsoAdapterExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoAdapterException msoAdapterException0 = new MsoAdapterException("");
+      MsoAdapterException msoAdapterException1 = new MsoAdapterException("", (Throwable) msoAdapterException0);
+      assertFalse(msoAdapterException1.equals((Object)msoAdapterException0));
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoAdapterExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..657b8b2
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:51:02 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoAdapterExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoAdapterException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoAdapterExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoAdapterException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoAdapterExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoAdapterException"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundESTest.java
new file mode 100644 (file)
index 0000000..f840c12
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:56:48 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoCloudSiteNotFoundESTest extends MsoCloudSiteNotFoundESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoCloudSiteNotFound msoCloudSiteNotFound0 = new MsoCloudSiteNotFound();
+      assertEquals(MsoExceptionCategory.USERDATA, msoCloudSiteNotFound0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoCloudSiteNotFound msoCloudSiteNotFound0 = new MsoCloudSiteNotFound("NQz5T^");
+      String string0 = msoCloudSiteNotFound0.toString();
+      assertEquals("Cloud Site [NQz5T^] not found", string0);
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFoundESTestscaffolding.java
new file mode 100644 (file)
index 0000000..ba28705
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:56:48 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoCloudSiteNotFoundESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoCloudSiteNotFoundESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoCloudSiteNotFoundESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoExceptionESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoExceptionESTest.java
new file mode 100644 (file)
index 0000000..2bd71fb
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:48:01 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoExceptionESTest extends MsoExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoTenantNotFound msoTenantNotFound0 = new MsoTenantNotFound("T&~q", "Cloud Site [");
+      MsoIOException msoIOException0 = new MsoIOException("", (Throwable) msoTenantNotFound0);
+      String string0 = msoIOException0.getContextMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoNetworkNotFound msoNetworkNotFound0 = new MsoNetworkNotFound("", "", "");
+      msoNetworkNotFound0.addContext("");
+      String string0 = msoNetworkNotFound0.getContext();
+      assertEquals("", string0);
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoAdapterException msoAdapterException0 = new MsoAdapterException(" ");
+      msoAdapterException0.setContext(" ");
+      String string0 = msoAdapterException0.getContextMessage();
+      assertEquals("[ ]  ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      MsoCloudSiteNotFound msoCloudSiteNotFound0 = new MsoCloudSiteNotFound();
+      MsoAdapterException msoAdapterException0 = new MsoAdapterException("", (Throwable) msoCloudSiteNotFound0);
+      msoAdapterException0.addContext("");
+      msoAdapterException0.addContext("");
+      String string0 = msoAdapterException0.getContext();
+      assertEquals(":", msoAdapterException0.getContext());
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      MsoCloudSiteNotFound msoCloudSiteNotFound0 = new MsoCloudSiteNotFound((String) null);
+      MsoExceptionCategory msoExceptionCategory0 = msoCloudSiteNotFound0.getCategory();
+      MsoAdapterException msoAdapterException0 = new MsoAdapterException((String) null, (Throwable) msoCloudSiteNotFound0);
+      msoAdapterException0.setCategory(msoExceptionCategory0);
+      assertNull(msoAdapterException0.getContext());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoNetworkNotFound msoNetworkNotFound0 = new MsoNetworkNotFound("", "", "");
+      String string0 = msoNetworkNotFound0.getContext();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      MsoCloudSiteNotFound msoCloudSiteNotFound0 = new MsoCloudSiteNotFound((String) null);
+      MsoAdapterException msoAdapterException0 = new MsoAdapterException((String) null, (Throwable) msoCloudSiteNotFound0);
+      String string0 = msoAdapterException0.getContextMessage();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoExceptionESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8ce85b7
--- /dev/null
@@ -0,0 +1,101 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:48:01 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoTenantNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoIOException",
+      "org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoNetworkNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoAdapterException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoCloudSiteNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoIOException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException",
+      "org.openecomp.mso.openstack.exceptions.MsoNetworkAlreadyExists",
+      "org.openecomp.mso.openstack.exceptions.MsoNetworkNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoStackAlreadyExists",
+      "org.openecomp.mso.openstack.exceptions.MsoStackNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoTenantNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoAdapterException",
+      "org.openecomp.mso.openstack.exceptions.MsoTenantAlreadyExists",
+      "org.openecomp.mso.openstack.exceptions.MsoException"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionESTest.java
new file mode 100644 (file)
index 0000000..ec2699c
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:50:20 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoIOExceptionESTest extends MsoIOExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoIOException msoIOException0 = new MsoIOException("");
+      MsoIOException msoIOException1 = new MsoIOException("", (Throwable) msoIOException0);
+      assertNull(msoIOException1.getContext());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoIOExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..e657718
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:50:20 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoIOExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoIOException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoIOExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoIOException",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoIOExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoIOException"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsESTest.java
new file mode 100644 (file)
index 0000000..2c423b7
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:52:37 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoNetworkAlreadyExistsESTest extends MsoNetworkAlreadyExistsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoNetworkAlreadyExists msoNetworkAlreadyExists0 = new MsoNetworkAlreadyExists((String) null, (String) null, (String) null);
+      assertNull(msoNetworkAlreadyExists0.getContext());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExistsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1c00ba9
--- /dev/null
@@ -0,0 +1,89 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:52:37 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoNetworkAlreadyExistsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoNetworkAlreadyExists"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoNetworkAlreadyExistsESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoNetworkAlreadyExists",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoNetworkAlreadyExistsESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException",
+      "org.openecomp.mso.openstack.exceptions.MsoNetworkAlreadyExists"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundESTest.java
new file mode 100644 (file)
index 0000000..4185450
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:54:45 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoNetworkNotFoundESTest extends MsoNetworkNotFoundESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoNetworkNotFound msoNetworkNotFound0 = new MsoNetworkNotFound("6", "6", "yX9(}I;;7<c%.4HYX");
+      assertNull(msoNetworkNotFound0.getContext());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFoundESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1506836
--- /dev/null
@@ -0,0 +1,89 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:54:45 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoNetworkNotFoundESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoNetworkNotFound"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoNetworkNotFoundESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoNetworkNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoNetworkNotFoundESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException",
+      "org.openecomp.mso.openstack.exceptions.MsoNetworkNotFound"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionESTest.java
new file mode 100644 (file)
index 0000000..00d7035
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:51:53 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoOpenstackExceptionESTest extends MsoOpenstackExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoOpenstackException msoOpenstackException0 = new MsoOpenstackException((-20), "zOT*@]B@O~zuv2", "zOT*@]B@O~zuv2");
+      MsoOpenstackException msoOpenstackException1 = new MsoOpenstackException((-20), "zOT*@]B@O~zuv2", "zOT*@]B@O~zuv2", (Exception) msoOpenstackException0);
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoOpenstackException1.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoOpenstackException msoOpenstackException0 = new MsoOpenstackException((-20), "zOT*@]B@O~zuv2", "zOT*@]B@O~zuv2");
+      String string0 = msoOpenstackException0.toString();
+      assertNotNull(string0);
+      assertEquals("-20 zOT*@]B@O~zuv2: zOT*@]B@O~zuv2", string0);
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..78a71cc
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:51:53 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoOpenstackExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoOpenstackExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoOpenstackExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsESTest.java
new file mode 100644 (file)
index 0000000..289b2a6
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:55:08 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoStackAlreadyExistsESTest extends MsoStackAlreadyExistsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoStackAlreadyExists msoStackAlreadyExists0 = new MsoStackAlreadyExists("", "", "");
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoStackAlreadyExists0.getCategory());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExistsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c7b8c85
--- /dev/null
@@ -0,0 +1,89 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:55:08 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoStackAlreadyExistsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoStackAlreadyExists"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoStackAlreadyExistsESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoStackAlreadyExists",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoStackAlreadyExistsESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException",
+      "org.openecomp.mso.openstack.exceptions.MsoStackAlreadyExists"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundESTest.java
new file mode 100644 (file)
index 0000000..e8b6e85
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:55:36 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoStackNotFoundESTest extends MsoStackNotFoundESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoStackNotFound msoStackNotFound0 = new MsoStackNotFound("", (String) null, (String) null);
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoStackNotFound0.getCategory());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFoundESTestscaffolding.java
new file mode 100644 (file)
index 0000000..3ce0916
--- /dev/null
@@ -0,0 +1,89 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:55:36 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoStackNotFoundESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoStackNotFound"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoStackNotFoundESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoStackNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoStackNotFoundESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException",
+      "org.openecomp.mso.openstack.exceptions.MsoStackNotFound"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsESTest.java
new file mode 100644 (file)
index 0000000..a47f778
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:56:00 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoTenantAlreadyExistsESTest extends MsoTenantAlreadyExistsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoTenantAlreadyExists msoTenantAlreadyExists0 = new MsoTenantAlreadyExists("Q]>\u00018.eW8", "Q]>\u00018.eW8");
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoTenantAlreadyExists0.getCategory());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExistsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..11700e6
--- /dev/null
@@ -0,0 +1,89 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:56:00 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoTenantAlreadyExistsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoTenantAlreadyExists"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoTenantAlreadyExistsESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoTenantAlreadyExists",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoTenantAlreadyExistsESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException",
+      "org.openecomp.mso.openstack.exceptions.MsoTenantAlreadyExists"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundESTest.java
new file mode 100644 (file)
index 0000000..b65bd1f
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:52:17 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoTenantNotFoundESTest extends MsoTenantNotFoundESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoTenantNotFound msoTenantNotFound0 = new MsoTenantNotFound("", "");
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoTenantNotFound0.getCategory());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFoundESTestscaffolding.java
new file mode 100644 (file)
index 0000000..bd45ba6
--- /dev/null
@@ -0,0 +1,89 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:52:17 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoTenantNotFoundESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.exceptions.MsoTenantNotFound"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoTenantNotFoundESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoTenantNotFound",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoTenantNotFoundESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.openstack.exceptions.MsoException",
+      "org.openecomp.mso.openstack.exceptions.MsoOpenstackException",
+      "org.openecomp.mso.openstack.exceptions.MsoTenantNotFound"
+    );
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntryESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntryESTest.java
new file mode 100644 (file)
index 0000000..6eaac45
--- /dev/null
@@ -0,0 +1,562 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:40:12 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class MsoHeatEnvironmentEntryESTest {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      Set<MsoHeatEnvironmentResource> set0 = (Set<MsoHeatEnvironmentResource>) mock(Set.class, new ViolatedAssumptionAnswer());
+      doReturn((-237540137)).when(set0).size();
+      msoHeatEnvironmentEntry0.setResources(set0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.hasResources();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      PrivateAccess.setVariable((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "valid", (Object) false);
+      boolean boolean0 = msoHeatEnvironmentEntry0.isValid();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentResource> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentResource>();
+      msoHeatEnvironmentEntry0.setResources(linkedHashSet0);
+      msoHeatEnvironmentEntry0.getResources();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("9>KEckx", "8&T!e[SABZ");
+      msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource0);
+      msoHeatEnvironmentEntry0.getResources();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      StringBuilder stringBuilder0 = msoHeatEnvironmentEntry0.toFullString();
+      PrivateAccess.setVariable((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "rawEntry", (Object) stringBuilder0);
+      StringBuilder stringBuilder1 = msoHeatEnvironmentEntry0.getRawEntry();
+      assertEquals("\nnull", stringBuilder1.toString());
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>();
+      msoHeatEnvironmentEntry0.setParameters(linkedHashSet0);
+      msoHeatEnvironmentEntry0.getParameters();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      msoHeatEnvironmentEntry0.getParameters();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentResource> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentResource>();
+      msoHeatEnvironmentEntry0.setResources(linkedHashSet0);
+      msoHeatEnvironmentEntry0.getNumberOfResources();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource0);
+      msoHeatEnvironmentEntry0.getNumberOfResources();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      Set<MsoHeatEnvironmentResource> set0 = (Set<MsoHeatEnvironmentResource>) mock(Set.class, new ViolatedAssumptionAnswer());
+      doReturn(0).when(set0).size();
+      msoHeatEnvironmentEntry0.setResources(set0);
+      msoHeatEnvironmentEntry0.getNumberOfResources();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>();
+      msoHeatEnvironmentEntry0.setParameters(linkedHashSet0);
+      msoHeatEnvironmentEntry0.getNumberOfParameters();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      msoHeatEnvironmentEntry0.getNumberOfParameters();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      PrivateAccess.setVariable((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "errorString", (Object) "Param=");
+      msoHeatEnvironmentEntry0.getErrorString();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
+      doReturn((-2945)).when(set0).size();
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(set0);
+        fail("Expecting exception: IllegalArgumentException");
+
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal Capacity: -2945
+         //
+         verifyException("java.util.ArrayList", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>();
+      linkedHashSet0.add((MsoHeatEnvironmentParameter) null);
+      msoHeatEnvironmentEntry0.setParameters(linkedHashSet0);
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.toFullString();
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentEntry", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.containsParameter((String) null, "");
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      linkedHashSet0.add(msoHeatEnvironmentParameter0);
+      msoHeatEnvironmentEntry0.setParameters(linkedHashSet0);
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.containsParameter((String) null);
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource0);
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource1 = new MsoHeatEnvironmentResource();
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource1);
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentResource", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter1 = new MsoHeatEnvironmentParameter();
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter1);
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("", "");
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("");
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.hasParameters();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      msoHeatEnvironmentEntry0.hasParameters();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>();
+      msoHeatEnvironmentEntry0.setParameters(linkedHashSet0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.hasParameters();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      PrivateAccess.callMethod((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "getResourceRegistryRawEntry");
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      msoHeatEnvironmentParameter0.setValue("_BAD");
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      linkedHashSet0.add(heatTemplateParam0);
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0);
+      assertTrue(msoHeatEnvironmentEntry0.hasParameters());
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      msoHeatEnvironmentParameter0.setValue("t'N`.KI:L9");
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      linkedHashSet0.add(heatTemplateParam0);
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0);
+      assertTrue(msoHeatEnvironmentEntry0.hasParameters());
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      linkedHashSet0.add(heatTemplateParam0);
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0);
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0);
+      assertTrue(msoHeatEnvironmentEntry0.hasParameters());
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      linkedHashSet0.add(heatTemplateParam0);
+      msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      assertFalse(msoHeatEnvironmentEntry0.hasParameters());
+
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      StringBuilder stringBuilder0 = msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0);
+      PrivateAccess.setVariable((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "rawEntry", (Object) stringBuilder0);
+      StringBuilder stringBuilder1 = (StringBuilder)PrivateAccess.callMethod((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "getResourceRegistryRawEntry");
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+      assertNull(stringBuilder1);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("9MTP2Qt0FH.^", "");
+      assertTrue(boolean0);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("dP:* hj", "dP:* hj");
+      assertFalse(boolean0);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("", "");
+      assertTrue(boolean0);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = mock(MsoHeatEnvironmentParameter.class, new ViolatedAssumptionAnswer());
+      linkedHashSet0.add(msoHeatEnvironmentParameter0);
+      msoHeatEnvironmentEntry0.setParameters(linkedHashSet0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("kz`LZx");
+      assertTrue(msoHeatEnvironmentEntry0.hasParameters());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>();
+      msoHeatEnvironmentEntry0.setParameters(linkedHashSet0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("kz`LZx");
+      assertFalse(boolean0);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter(",=?%4z");
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = mock(MsoHeatEnvironmentParameter.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(msoHeatEnvironmentParameter0).getName();
+      doReturn((String) null).when(msoHeatEnvironmentParameter0).getValue();
+      linkedHashSet0.add(msoHeatEnvironmentParameter0);
+      msoHeatEnvironmentEntry0.setParameters(linkedHashSet0);
+      msoHeatEnvironmentEntry0.toFullString();
+      assertTrue(msoHeatEnvironmentEntry0.hasParameters());
+  }
+
+  @Test(timeout = 4000)
+  public void test37()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("");
+      msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.hasResources();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test38()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      Set<MsoHeatEnvironmentResource> set0 = (Set<MsoHeatEnvironmentResource>) mock(Set.class, new ViolatedAssumptionAnswer());
+      doReturn(0).when(set0).size();
+      msoHeatEnvironmentEntry0.setResources(set0);
+      boolean boolean0 = msoHeatEnvironmentEntry0.hasResources();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test39()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      boolean boolean0 = msoHeatEnvironmentEntry0.hasResources();
+      assertFalse(boolean0);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test40()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      msoHeatEnvironmentEntry0.setResources((Set<MsoHeatEnvironmentResource>) null);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test41()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      msoHeatEnvironmentEntry0.setParameters((Set<MsoHeatEnvironmentParameter>) null);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+
+  @Test(timeout = 4000)
+  public void test43()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.getNumberOfResources();
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentEntry", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test44()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      boolean boolean0 = msoHeatEnvironmentEntry0.isValid();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test45()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry((StringBuilder) null);
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test46()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      // Undeclared exception!
+      try {
+        msoHeatEnvironmentEntry0.getNumberOfParameters();
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentEntry", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test47()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      msoHeatEnvironmentEntry0.getRawEntry();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test48()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      msoHeatEnvironmentEntry0.getParameters();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test49()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      msoHeatEnvironmentEntry0.getResources();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+
+  @Test(timeout = 4000)
+  public void test50()  throws Throwable  {
+      MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry();
+      msoHeatEnvironmentEntry0.getErrorString();
+      assertTrue(msoHeatEnvironmentEntry0.isValid());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTest.java
new file mode 100644 (file)
index 0000000..6ec389b
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:45:40 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoHeatEnvironmentParameterESTest extends MsoHeatEnvironmentParameterESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      msoHeatEnvironmentParameter0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      boolean boolean0 = msoHeatEnvironmentParameter0.equals(msoHeatEnvironmentParameter0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      msoHeatEnvironmentParameter0.setValue("");
+      String string0 = msoHeatEnvironmentParameter0.getValue();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      String string0 = msoHeatEnvironmentParameter0.getName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("<*+ogA@v;MO4'8{1");
+      String string0 = msoHeatEnvironmentParameter0.getName();
+      assertEquals("<*+ogA@v;MO4'8{1", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      String string0 = msoHeatEnvironmentParameter0.getName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("", "-3Y=_MqzpVL7|^$8");
+      String string0 = msoHeatEnvironmentParameter0.getValue();
+      assertEquals("-3Y=_MqzpVL7|^$8", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter1 = new MsoHeatEnvironmentParameter("{Ox?zu\"*");
+      boolean boolean0 = msoHeatEnvironmentParameter1.equals(msoHeatEnvironmentParameter0);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("?.@!au:}y7xGSg|}8");
+      boolean boolean0 = msoHeatEnvironmentParameter0.equals("?.@!au:}y7xGSg|}8");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      msoHeatEnvironmentParameter0.setName("");
+      assertEquals("", msoHeatEnvironmentParameter0.getName());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter1 = new MsoHeatEnvironmentParameter("");
+      boolean boolean0 = msoHeatEnvironmentParameter0.equals(msoHeatEnvironmentParameter1);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      String string0 = msoHeatEnvironmentParameter0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      msoHeatEnvironmentParameter0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter();
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter1 = new MsoHeatEnvironmentParameter();
+      // Undeclared exception!
+      try { 
+        msoHeatEnvironmentParameter0.equals(msoHeatEnvironmentParameter1);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("");
+      String string0 = msoHeatEnvironmentParameter0.toString();
+      assertEquals(": null", string0);
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTestscaffolding.java
new file mode 100644 (file)
index 0000000..f7e33bb
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:45:40 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoHeatEnvironmentParameterESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoHeatEnvironmentParameterESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTest.java
new file mode 100644 (file)
index 0000000..d3e7d29
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:45:54 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoHeatEnvironmentResourceESTest extends MsoHeatEnvironmentResourceESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("", "");
+      msoHeatEnvironmentResource0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("8{,8]8v", "8{,8]8v");
+      String string0 = msoHeatEnvironmentResource0.getValue();
+      assertEquals("8{,8]8v", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("", "");
+      String string0 = msoHeatEnvironmentResource0.getValue();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("\"(_{*)._$D2+w8wk");
+      String string0 = msoHeatEnvironmentResource0.getName();
+      assertEquals("\"(_{*)._$D2+w8wk", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource1 = new MsoHeatEnvironmentResource();
+      // Undeclared exception!
+      try { 
+        msoHeatEnvironmentResource0.equals(msoHeatEnvironmentResource1);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("", "");
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource1 = new MsoHeatEnvironmentResource("", "");
+      boolean boolean0 = msoHeatEnvironmentResource0.equals(msoHeatEnvironmentResource1);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("m");
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource1 = new MsoHeatEnvironmentResource("l", "l");
+      boolean boolean0 = msoHeatEnvironmentResource0.equals(msoHeatEnvironmentResource1);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      boolean boolean0 = msoHeatEnvironmentResource0.equals("1Z^#74OJV(OBf<=#r");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      boolean boolean0 = msoHeatEnvironmentResource0.equals(msoHeatEnvironmentResource0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      String string0 = msoHeatEnvironmentResource0.getName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      msoHeatEnvironmentResource0.setName("");
+      String string0 = msoHeatEnvironmentResource0.getName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("");
+      String string0 = msoHeatEnvironmentResource0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      msoHeatEnvironmentResource0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      String string0 = msoHeatEnvironmentResource0.toString();
+      assertEquals("\"null\": null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource();
+      msoHeatEnvironmentResource0.setValue("");
+      assertNull(msoHeatEnvironmentResource0.getName());
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTestscaffolding.java
new file mode 100644 (file)
index 0000000..3917b89
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:45:54 GMT 2016
+ */
+
+package org.openecomp.mso.openstack.utils;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoHeatEnvironmentResourceESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.openstack.utils.MsoHeatEnvironmentResource"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoHeatEnvironmentResourceESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.utils.MsoHeatEnvironmentResource"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapter-utils/src/test/resources/cloud_config.json b/adapters/mso-adapter-utils/src/test/resources/cloud_config.json
new file mode 100644 (file)
index 0000000..0230a7d
--- /dev/null
@@ -0,0 +1,80 @@
+{ "cloud_config": {
+       "identity_services":
+       {
+               "MT_KEYSTONE":
+               {
+                       "identity_url": "http://localhost:5000/v2.0",
+                       "mso_id": "john",
+                       "mso_pass": "FD205490A48D48475607C36B9AD902BF",
+                       "admin_tenant": "admin",
+                       "member_role": "_member_",
+                       "tenant_metadata": false,
+                       "identity_server_type": "KEYSTONE",
+                       "identity_authentication_type": "RACKSPACE_APIKEY"
+               },
+               "DAN_KEYSTONE":
+               {
+                       "identity_url": "http://localhost:5000/v2.0",
+                       "mso_id": "mockId",
+                       "mso_pass": "BC59F80E38208A42ABB81ECCDD4FB3E4",
+                       "admin_tenant": "service",
+                       "member_role": "_member_",
+                       "tenant_metadata": false,
+                       "identity_server_type": "KEYSTONE",
+                       "identity_authentication_type": "USERNAME_PASSWORD"
+               },
+               "MTINJVCC101_DCP":
+               {
+                       "identity_url": "http://localhost:5000/v2.0",
+                       "mso_id": "mockIdToo",
+                       "mso_pass": "95604B9EAAC4D77D74786FAE54177206",
+                       "admin_tenant": "service",
+                       "member_role": "admin",
+                       "tenant_metadata": true,
+                       "identity_server_type": "KEYSTONE",
+                       "identity_authentication_type": "USERNAME_PASSWORD"
+               },
+               "MTSNJA3DCP1":
+               {
+                       "identity_url": "https://localhost:5000/v2.0",
+                       "mso_id": "mockIdToo",
+                       "mso_pass": "1491DE07AC9D716A7966BB8C2848F031",
+                       "admin_tenant": "service",
+                       "member_role": "admin",
+                       "tenant_metadata": true,
+                       "identity_server_type": "KEYSTONE",
+                       "identity_authentication_type": "USERNAME_PASSWORD"
+               }
+               
+       },
+       "cloud_sites":
+       {
+               "MT":
+               {
+                       "region_id": "regionOne",
+                       "clli": "MT",
+                       "aic_version": "2.5",
+                       "identity_service_id": "MT_KEYSTONE"
+               },
+               "DAN":
+               {
+                       "region_id": "RegionOne",
+                       "clli": "DAN",
+                       "aic_version": "2.5",
+                       "identity_service_id": "DAN_KEYSTONE"
+               },
+               "MTINJVCC101":
+               {
+                       "region_id": "regionTwo",
+                       "clli": "MTINJVCC101",
+                       "aic_version": "2.5",
+                       "identity_service_id": "MTINJVCC101_DCP"
+               }
+               
+       }
+}
+}
+       
+
+
+               
diff --git a/adapters/mso-adapter-utils/src/test/resources/logback-test.xml b/adapters/mso-adapter-utils/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..d2c1719
--- /dev/null
@@ -0,0 +1,48 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+  
+  
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/adapters/mso-adapter-utils/src/test/resources/mso.properties b/adapters/mso-adapter-utils/src/test/resources/mso.properties
new file mode 100644 (file)
index 0000000..d58521f
--- /dev/null
@@ -0,0 +1,27 @@
+###
+# ============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=========================================================
+###
+
+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/adapters/mso-adapter-utils/src/test/resources/mso2.properties b/adapters/mso-adapter-utils/src/test/resources/mso2.properties
new file mode 100644 (file)
index 0000000..a47ce77
--- /dev/null
@@ -0,0 +1,21 @@
+###
+# ============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=========================================================
+###
+
+ecomp.mso.cloud.1.cloudId=MT2
diff --git a/adapters/mso-adapters-rest-interface/pom.xml b/adapters/mso-adapters-rest-interface/pom.xml
new file mode 100644 (file)
index 0000000..f485141
--- /dev/null
@@ -0,0 +1,52 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-adapters-rest-interface</artifactId>
+       <packaging>jar</packaging>
+       <name>mso-adapters-rest-interface</name>
+       <description>
+               Java Beans (Requests and Responses) for Network/Tenant/VNF REST Operations
+       </description>
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <version>2.6</version>
+                               <configuration>
+                                       <classesDirectory>target/classes</classesDirectory>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.jboss.resteasy</groupId>
+                       <artifactId>resteasy-jaxrs</artifactId>
+                       <version>3.0.19.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.resteasy</groupId>
+                       <artifactId>resteasy-jackson-provider</artifactId>
+                       <version>3.0.19.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.resteasy</groupId>
+                       <artifactId>resteasy-jettison-provider</artifactId>
+               <version>3.0.19.Final</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-adapter-utils</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/ContrailNetwork.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/ContrailNetwork.java
new file mode 100644 (file)
index 0000000..af44ce4
--- /dev/null
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+import java.util.List;
+
+public class ContrailNetwork {
+       private String shared   = "false";
+       private String external = "false";
+       private List<String> routeTargets;
+       private List<String> policyFqdns;
+       private List<String> routeTableFqdns;
+       
+       public ContrailNetwork() {
+               super();
+       }
+
+       public ContrailNetwork(String shared, String external, List<String> routeTargets, List<String> policyFqdns, List<String> routeTableFqdns) {
+               super();
+               this.shared = shared;
+               this.external = external;
+               this.routeTargets = routeTargets;
+               this.policyFqdns = policyFqdns;
+               this.routeTableFqdns = routeTableFqdns;
+       }
+
+       public String getShared() {
+               return shared;
+       }
+
+       public void setShared(String shared) {
+               this.shared = shared;
+       }
+
+       public String getExternal() {
+               return external;
+       }
+
+       public void setExternal(String external) {
+               this.external = external;
+       }
+
+       public List<String> getRouteTargets() {
+               return routeTargets;
+       }
+
+       public void setRouteTargets(List<String> routeTargets) {
+               this.routeTargets = routeTargets;
+       }
+
+       public List<String> getPolicyFqdns() {
+               return policyFqdns;
+       }
+
+       public void setPolicyFqdns(List<String> policyFqdns) {
+               this.policyFqdns = policyFqdns;
+       }
+       
+       public List<String> getRouteTableFqdns() {
+               return routeTableFqdns;
+       }
+
+       public void setRouteTableFqdns(List<String> routeTableFqdns) {
+               this.routeTableFqdns = routeTableFqdns;
+       }
+       
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkError.java
new file mode 100644 (file)
index 0000000..e756261
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "createNetworkError")
+@NoJackson
+public class CreateNetworkError extends NetworkExceptionResponse implements Serializable {
+       private static final long serialVersionUID = -4283402447149144456L;
+
+       public CreateNetworkError() {
+               super("");
+       }
+
+       public CreateNetworkError(String message) {
+               super(message);
+       }
+
+       public CreateNetworkError(String message, MsoExceptionCategory category, boolean rolledBack, String messageid) {
+               super(message, category, rolledBack, messageid);
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java
new file mode 100644 (file)
index 0000000..b8c70dd
--- /dev/null
@@ -0,0 +1,191 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import org.openecomp.mso.openstack.beans.Subnet;
+import org.openecomp.mso.entity.MsoRequest;
+
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+/* README
+* 1) Used JAXB/Jettison - see @NoJackson annotation on class to get RootElements REad by RestEasy
+* 2) due to 1) Maps need to use this format 
+
+"networkParams": {"entry": [
+                               {"key": "network_id",
+                               "value": "59ed7b41-2983-413f-ba93-e7d437433916"},
+                               {"key": "subnet_id",
+                               "value": "086c9298-5c57-49b7-bb2b-6fd5730c5d92"},
+                               {"key": "server_name_0",
+                               "value": "RaaNetwork1"}
+                               ]},
+ * 3) to output json see toJSonString method below which required the @JsonRootName annotation and the WRAP_ROOT feature enabled 
+ * 4) Tryong to work with RESTEASY JACKSON and JAXB/JETTISON to conform to Json input/output specs
+*/
+@JsonRootName("createNetworkRequest")
+@XmlRootElement(name = "createNetworkRequest")
+@NoJackson
+public class CreateNetworkRequest extends NetworkRequestCommon {
+       private String cloudSiteId;
+       private String tenantId;
+       private String networkId;
+       private String networkName;
+       private String networkType;
+       private String networkTypeVersion;
+       private NetworkTechnology networkTechnology = NetworkTechnology.NEUTRON;
+       private List<Subnet> subnets;
+       private ProviderVlanNetwork providerVlanNetwork;
+       private ContrailNetwork contrailNetwork;
+       private Boolean failIfExists = false;
+       private Boolean backout = true;
+       private Map<String,String> networkParams = new HashMap<String, String>();
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public CreateNetworkRequest() {
+               super();
+       }
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       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 getNetworkTypeVersion() {
+               return networkTypeVersion;
+       }
+
+       public void setNetworkTypeVersion(String networkTypeVersion) {
+               this.networkTypeVersion = networkTypeVersion;
+       }
+
+       public String getNetworkTechnology() {
+               return networkTechnology.toString();
+       }
+
+       public void setNetworkTechnology(String networkTechnology) {
+               this.networkTechnology = NetworkTechnology.valueOf(networkTechnology);
+       }
+
+       public List<Subnet> getSubnets() {
+               return subnets;
+       }
+
+       public void setSubnets(List<Subnet> subnets) {
+               this.subnets = subnets;
+       }
+
+       public ProviderVlanNetwork getProviderVlanNetwork() {
+               return providerVlanNetwork;
+       }
+
+       public void setProviderVlanNetwork(ProviderVlanNetwork providerVlanNetwork) {
+               this.providerVlanNetwork = providerVlanNetwork;
+       }
+
+       public ContrailNetwork getContrailNetwork() {
+               return contrailNetwork;
+       }
+
+       public void setContrailNetwork(ContrailNetwork contrailNetwork) {
+               this.contrailNetwork = contrailNetwork;
+       }
+
+       public Boolean getFailIfExists() {
+               return failIfExists;
+       }
+
+       public void setFailIfExists(Boolean failIfExists) {
+               this.failIfExists = failIfExists;
+       }
+
+       public Boolean getBackout() {
+               return backout;
+       }
+
+       public void setBackout(Boolean backout) {
+               this.backout = backout;
+       }
+
+       public Map<String, String> getNetworkParams() {
+               return networkParams;
+       }
+
+       public void setNetworkParams(Map<String, String> networkParams) {
+               this.networkParams = networkParams;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+
+       public boolean isContrailRequest() {
+               return (networkTechnology == NetworkTechnology.CONTRAIL) && (contrailNetwork != null);
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponse.java
new file mode 100644 (file)
index 0000000..f47272f
--- /dev/null
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("createNetworkResponse")
+@XmlRootElement(name = "createNetworkResponse")
+@NoJackson
+public class CreateNetworkResponse extends NetworkResponseCommon {
+       private String networkId;
+       private String neutronNetworkId;
+       private String networkStackId;
+       private String networkFqdn;
+       private Boolean networkCreated;
+       private Map<String, String> subnetMap;
+       private NetworkRollback rollback = new NetworkRollback();
+
+       public CreateNetworkResponse() {
+               super();
+       }
+
+       public CreateNetworkResponse(String networkId,
+                       String neutronNetworkId,
+                       String networkStackId,
+                       String networkFqdn,
+                       Boolean networkCreated,
+                       Map<String, String> subnetIdMap,
+                       NetworkRollback rollback,
+                       String messageId) {
+               super(messageId);
+               this.networkId = networkId;
+               this.neutronNetworkId = neutronNetworkId;
+               this.networkStackId = networkStackId;
+               this.networkFqdn = networkFqdn;
+               this.networkCreated = networkCreated;
+               this.subnetMap = subnetIdMap;
+               this.rollback = rollback;
+       }
+
+       public String getNetworkId() {
+               return networkId;
+       }
+
+       public void setNetworkId(String networkId) {
+               this.networkId = networkId;
+       }
+
+       public String getNeutronNetworkId() {
+               return neutronNetworkId;
+       }
+
+       public void setNeutronNetworkId(String neutronNetworkId) {
+               this.neutronNetworkId = neutronNetworkId;
+       }
+
+       public String getNetworkStackId() {
+               return networkStackId;
+       }
+
+       public void setNetworkStackId(String networkStackId) {
+               this.networkStackId = networkStackId;
+       }
+
+       public String getNetworkFqdn() {
+               return networkFqdn;
+       }
+
+       public void setNetworkFqdn(String networkFqdn) {
+               this.networkFqdn = networkFqdn;
+       }
+
+       public Boolean getNetworkCreated() {
+               return networkCreated;
+       }
+
+       public void setNetworkCreated(Boolean networkCreated) {
+               this.networkCreated = networkCreated;
+       }
+
+       public Map<String, String> getSubnetMap() {
+               return subnetMap;
+       }
+
+       public void setSubnetMap(Map<String, String> subnetMap) {
+               this.subnetMap = subnetMap;
+       }
+
+       public NetworkRollback getRollback() {
+               return rollback;
+       }
+
+       public void setRollback(NetworkRollback rollback) {
+               this.rollback = rollback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkError.java
new file mode 100644 (file)
index 0000000..22af7fe
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "deleteNetworkError")
+@NoJackson
+public class DeleteNetworkError extends NetworkExceptionResponse implements Serializable {
+       private static final long serialVersionUID = 2735474165790444180L;
+
+       public DeleteNetworkError() {
+               super("");
+       }
+
+       public DeleteNetworkError(String message) {
+               super(message);
+       }
+
+       public DeleteNetworkError(String message, MsoExceptionCategory category, boolean unused, String messageid) {
+               super(message, category, unused, messageid);
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequest.java
new file mode 100644 (file)
index 0000000..62c308d
--- /dev/null
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import org.openecomp.mso.entity.MsoRequest;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("deleteNetworkRequest")
+@XmlRootElement(name = "deleteNetworkRequest")
+@NoJackson
+public class DeleteNetworkRequest extends NetworkRequestCommon {
+
+       private String cloudSiteId;
+       private String tenantId;
+       private String networkId;
+       private String networkStackId;
+       private String networkType;
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public DeleteNetworkRequest() {}
+       
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getNetworkId() {
+               return networkId;
+       }
+
+       public void setNetworkId(String networkId) {
+               this.networkId = networkId;
+       }
+
+       public String getNetworkStackId() {
+               return networkStackId;
+       }
+
+       public void setNetworkStackId(String networkStackId) {
+               this.networkStackId = networkStackId;
+       }
+
+       public String getNetworkType() {
+               return networkType;
+       }
+
+       public void setNetworkType(String networkType) {
+               this.networkType = networkType;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponse.java
new file mode 100644 (file)
index 0000000..d6d295a
--- /dev/null
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("deleteNetworkResponse")
+@XmlRootElement(name = "deleteNetworkResponse")
+@NoJackson
+public class DeleteNetworkResponse extends NetworkResponseCommon {
+
+       private String networkId;
+       private Boolean networkDeleted;
+
+       public DeleteNetworkResponse() {
+               super();
+       }
+
+       public DeleteNetworkResponse(String networkId, Boolean networkDeleted, String messageId) {
+               super(messageId);
+               this.networkId = networkId;
+               this.networkDeleted = networkDeleted;
+       }
+       
+       public String getNetworkId() {
+               return networkId;
+       }
+
+       public void setNetworkId(String networkId) {
+               this.networkId = networkId;
+       }
+
+       public Boolean getNetworkDeleted() {
+               return networkDeleted;
+       }
+
+       public void setNetworkDeleted(Boolean networkDeleted) {
+               this.networkDeleted = networkDeleted;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponse.java
new file mode 100644 (file)
index 0000000..de37c3d
--- /dev/null
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+public class NetworkExceptionResponse extends NetworkResponseCommon {
+    private String message;
+       private MsoExceptionCategory category;
+       private Boolean rolledBack;
+
+       public NetworkExceptionResponse () {}
+
+       public NetworkExceptionResponse (String message) {
+               super();
+               this.message = message;
+       }
+
+       public NetworkExceptionResponse (String message, MsoExceptionCategory category, boolean rolledBack, String messageid) {
+               super(messageid);
+               this.message = message;
+               this.category = category;
+               this.rolledBack = rolledBack;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+
+       public Boolean getRolledBack() {
+               return rolledBack;
+       }
+
+       public void setRolledBack(Boolean rolledBack) {
+               this.rolledBack = rolledBack;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkRequestCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkRequestCommon.java
new file mode 100644 (file)
index 0000000..d04e960
--- /dev/null
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+
+/**
+ * Everything that is common between all Network Requests.
+ */
+public abstract class NetworkRequestCommon {
+       private Boolean skipAAI = false;
+       private String messageId;
+       private String notificationUrl;
+
+       public Boolean getSkipAAI() {
+               return skipAAI;
+       }
+
+       public void setSkipAAI(Boolean skipAAI) {
+               this.skipAAI = skipAAI;
+       }
+
+       public String getMessageId() {
+               return messageId;
+       }
+
+       public void setMessageId(String messageId) {
+               this.messageId = messageId;
+       }
+
+       public String getNotificationUrl() {
+               return notificationUrl;
+       }
+
+       public void setNotificationUrl(String notificationUrl) {
+               this.notificationUrl = notificationUrl;
+       }
+
+       public boolean isSynchronous() {
+               return notificationUrl == null || (notificationUrl != null && notificationUrl.isEmpty());
+       }
+
+       public String toJsonString() {
+               String jsonString = null;
+               try {
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
+                       jsonString = mapper.writeValueAsString(this);
+               } catch (Exception e) {
+                       // ignore
+               }
+               return jsonString;
+       }
+
+       public String toXmlString() {
+               try {
+                       ByteArrayOutputStream bs = new ByteArrayOutputStream();
+                       JAXBContext context = JAXBContext.newInstance(this.getClass());
+                       Marshaller marshaller = context.createMarshaller();
+                       marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); //pretty print XML
+                       marshaller.marshal(this, bs);
+                       return bs.toString();
+               } catch (Exception e) {
+                       // Shouldn't happen...
+                       e.printStackTrace();
+                       return "";
+               }
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkResponseCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkResponseCommon.java
new file mode 100644 (file)
index 0000000..e7cc9b9
--- /dev/null
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+
+/**
+ * Everything that is common between all Volume Group Responses, except for QueryVolumeGroupResponse.
+ */
+public abstract class NetworkResponseCommon {
+       private String messageId;
+
+       public NetworkResponseCommon() {
+               messageId = null;
+       }
+
+       public NetworkResponseCommon(String messageId) {
+               this.messageId = messageId;
+       }
+
+       public String getMessageId() {
+               return messageId;
+       }
+
+       public void setMessageId(String messageId) {
+               this.messageId = messageId;
+       }
+
+       public String toJsonString() {
+               String jsonString = null;
+               try {
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
+                       jsonString = mapper.writeValueAsString(this);
+               } catch (Exception e) {
+                       // ignore
+               }
+               return jsonString;
+       }
+
+       public String toXmlString() {
+               try {
+                       ByteArrayOutputStream bs = new ByteArrayOutputStream();
+                       JAXBContext context = JAXBContext.newInstance(this.getClass());
+                       Marshaller marshaller = context.createMarshaller();
+                       marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); //pretty print XML
+                       marshaller.marshal(this, bs);
+                       return bs.toString();
+               } catch (Exception e) {
+                       // Shouldn't happen...
+                       e.printStackTrace();
+                       return "";
+               }
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkTechnology.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkTechnology.java
new file mode 100644 (file)
index 0000000..62a821d
--- /dev/null
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+public enum NetworkTechnology {
+       NEUTRON, VMWARE, CONTRAIL
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetwork.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetwork.java
new file mode 100644 (file)
index 0000000..3956d3e
--- /dev/null
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import java.util.List;
+
+public class ProviderVlanNetwork {
+       private String physicalNetworkName;
+       private List<Integer> vlans;
+       
+       public ProviderVlanNetwork() {
+               super();
+       }
+       
+       public ProviderVlanNetwork(String physicalNetworkName, List<Integer> vlans) {
+               super();
+               this.physicalNetworkName = physicalNetworkName;
+               this.vlans = vlans;
+       }
+
+       public String getPhysicalNetworkName() {
+               return physicalNetworkName;
+       }
+
+       public void setPhysicalNetworkName(String physicalNetworkName) {
+               this.physicalNetworkName = physicalNetworkName;
+       }
+
+       public List<Integer> getVlans() {
+               return vlans;
+       }
+
+       public void setVlans(List<Integer> vlans) {
+               this.vlans = vlans;
+       }       
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/QueryNetworkError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/QueryNetworkError.java
new file mode 100644 (file)
index 0000000..2b602f6
--- /dev/null
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "queryNetworkError")
+@NoJackson
+public class QueryNetworkError extends NetworkExceptionResponse implements Serializable {
+       private static final long serialVersionUID = -6125469596399867146L;
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponse.java
new file mode 100644 (file)
index 0000000..e79b463
--- /dev/null
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import org.openecomp.mso.openstack.beans.NetworkStatus;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "queryNetworkResponse")
+@NoJackson
+public class QueryNetworkResponse {
+       private String networkId;
+       private String neutronNetworkId;
+       private String networkStackId;
+       private Boolean networkExists;
+       private NetworkStatus networkStatus;
+       private List<Integer> vlans;
+       private List<String> routeTargets;
+       private Map<String, String> subnetIdMap;
+       private Map<String, String> networkOutputs;
+       
+       public QueryNetworkResponse() {
+               super();
+       }
+
+       public QueryNetworkResponse(String networkId, String neutronNetworkId,
+                       String networkStackId, NetworkStatus networkStatus,
+                       Map<String, String> networkOutputs) {
+               super();
+               this.networkId = networkId;
+               this.neutronNetworkId = neutronNetworkId;
+               this.networkStackId = networkStackId;
+               this.networkStatus = networkStatus;
+               this.networkOutputs = networkOutputs;
+       }
+
+       public String getNetworkId() {
+               return networkId;
+       }
+
+       public void setNetworkId(String networkId) {
+               this.networkId = networkId;
+       }
+
+       public String getNeutronNetworkId() {
+               return neutronNetworkId;
+       }
+
+       public void setNeutronNetworkId(String neutronNetworkId) {
+               this.neutronNetworkId = neutronNetworkId;
+       }
+
+       public String getNetworkStackId() {
+               return networkStackId;
+       }
+
+       public void setNetworkStackId(String networkStackId) {
+               this.networkStackId = networkStackId;
+       }
+
+       public NetworkStatus getNetworkStatus() {
+               return networkStatus;
+       }
+
+       public void setNetworkStatus(NetworkStatus networkStatus) {
+               this.networkStatus = networkStatus;
+       }
+
+       public Boolean getNetworkExists() {
+               return networkExists;
+       }
+
+       public void setNetworkExists(Boolean networkExists) {
+               this.networkExists = networkExists;
+       }
+
+       public List<Integer> getVlans() {
+               return vlans;
+       }
+
+       public void setVlans(List<Integer> vlans) {
+               this.vlans = vlans;
+       }
+
+       public List<String> getRouteTargets() {
+               return routeTargets;
+       }
+
+       public void setRouteTargets(List<String> routeTargets) {
+               this.routeTargets = routeTargets;
+       }
+
+       public Map<String, String> getSubnetIdMap() {
+               return subnetIdMap;
+       }
+
+       public void setSubnetIdMap(Map<String, String> subnetIdMap) {
+               this.subnetIdMap = subnetIdMap;
+       }
+
+       public Map<String, String> getNetworkOutputs() {
+               return networkOutputs;
+       }
+
+       public void setNetworkOutputs(Map<String, String> networkOutputs) {
+               this.networkOutputs = networkOutputs;
+       }
+       
+       public String toJsonString() {
+               String jsonString = null;
+               try {
+                       ObjectMapper mapper = new ObjectMapper();
+                       jsonString = mapper.writeValueAsString(this);
+               }
+               catch (Exception e) {}
+               return jsonString;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkError.java
new file mode 100644 (file)
index 0000000..9e6a328
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "rollbackNetworkError")
+@NoJackson
+public class RollbackNetworkError extends NetworkExceptionResponse implements Serializable {
+       private static final long serialVersionUID = -3954464103037391980L;
+
+       public RollbackNetworkError() {
+               super("");
+       }
+
+       public RollbackNetworkError(String message) {
+               super(message);
+       }
+
+       public RollbackNetworkError(String message, MsoExceptionCategory category, boolean unused, String messageid) {
+               super(message, category, unused, messageid);
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequest.java
new file mode 100644 (file)
index 0000000..3775114
--- /dev/null
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("rollbackNetworkRequest")
+@XmlRootElement(name = "rollbackNetworkRequest")
+@NoJackson
+public class RollbackNetworkRequest extends NetworkRequestCommon {
+       private NetworkRollback networkRollback;
+
+       public RollbackNetworkRequest() {
+               super();
+       }
+
+       public NetworkRollback getNetworkRollback() {
+               return networkRollback;
+       }
+
+       public void setNetworkRollback(NetworkRollback networkRollback) {
+               this.networkRollback = networkRollback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponse.java
new file mode 100644 (file)
index 0000000..a7b3c16
--- /dev/null
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("rollbackNetworkResponse")
+@XmlRootElement(name = "rollbackNetworkResponse")
+@NoJackson
+public class RollbackNetworkResponse extends NetworkResponseCommon {
+
+       private Boolean networkRolledBack;
+
+       public RollbackNetworkResponse() {
+               super();
+       }
+       
+       public RollbackNetworkResponse(Boolean networkRolledBack, String messageId) {
+               super(messageId);
+               this.networkRolledBack = networkRolledBack;
+       }
+
+       public Boolean getNetworkRolledBack() {
+               return networkRolledBack;
+       }
+
+       public void setNetworkRolledBack(Boolean networkRolledBack) {
+               this.networkRolledBack = networkRolledBack;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkError.java
new file mode 100644 (file)
index 0000000..f7066da
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "updateNetworkError")
+@NoJackson
+public class UpdateNetworkError extends NetworkExceptionResponse implements Serializable {
+       private static final long serialVersionUID = 46820809807914392L;
+
+       public UpdateNetworkError() {
+               super("");
+       }
+
+       public UpdateNetworkError(String message) {
+               super(message);
+       }
+
+       public UpdateNetworkError(String message, MsoExceptionCategory category, boolean unused, String messageid) {
+               super(message, category, unused, messageid);
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequest.java
new file mode 100644 (file)
index 0000000..5ddc050
--- /dev/null
@@ -0,0 +1,178 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.Subnet;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("updateNetworkRequest")
+@XmlRootElement(name = "updateNetworkRequest")
+@NoJackson
+public class UpdateNetworkRequest extends NetworkRequestCommon {
+       private String cloudSiteId;
+       private String tenantId;
+       private String networkId;
+       private String networkStackId;
+       private String networkName;
+       private String networkType;
+       private String networkTypeVersion;
+       private NetworkTechnology networkTechnology = NetworkTechnology.NEUTRON;
+       private List<Subnet> subnets;
+       private ProviderVlanNetwork providerVlanNetwork;
+       private ContrailNetwork contrailNetwork;
+       private Boolean backout = true;
+       private Map<String,String> networkParams = new HashMap<String, String>();
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public UpdateNetworkRequest() {
+               super();
+       }
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getNetworkId() {
+               return networkId;
+       }
+
+       public void setNetworkId(String networkId) {
+               this.networkId = networkId;
+       }
+
+       public String getNetworkStackId() {
+               return networkStackId;
+       }
+
+       public void setNetworkStackId(String networkStackId) {
+               this.networkStackId = networkStackId;
+       }
+
+       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 getNetworkTypeVersion() {
+               return networkTypeVersion;
+       }
+
+       public void setNetworkTypeVersion(String networkTypeVersion) {
+               this.networkTypeVersion = networkTypeVersion;
+       }
+
+       public String getNetworkTechnology() {
+               return networkTechnology.toString();
+       }
+
+       public void setNetworkTechnology(String networkTechnology) {
+               try {
+                       this.networkTechnology = NetworkTechnology.valueOf(networkTechnology.toUpperCase());
+               } catch (IllegalArgumentException e) {
+                       // ignore
+               }
+       }
+
+       public List<Subnet> getSubnets() {
+               return subnets;
+       }
+
+       public void setSubnets(List<Subnet> subnets) {
+               this.subnets = subnets;
+       }
+
+       public ProviderVlanNetwork getProviderVlanNetwork() {
+               return providerVlanNetwork;
+       }
+
+       public void setProviderVlanNetwork(ProviderVlanNetwork providerVlanNetwork) {
+               this.providerVlanNetwork = providerVlanNetwork;
+       }
+
+       public ContrailNetwork getContrailNetwork() {
+               return contrailNetwork;
+       }
+
+       public void setContrailNetwork(ContrailNetwork contrailNetwork) {
+               this.contrailNetwork = contrailNetwork;
+       }
+
+       public Boolean getBackout() {
+               return backout;
+       }
+
+       public void setBackout(Boolean backout) {
+               this.backout = backout;
+       }
+
+       public Map<String, String> getNetworkParams() {
+               return networkParams;
+       }
+
+       public void setNetworkParams(Map<String, String> networkParams) {
+               this.networkParams = networkParams;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+
+       public boolean isContrailRequest() {
+               return (networkTechnology == NetworkTechnology.CONTRAIL) && (contrailNetwork != null);
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponse.java
new file mode 100644 (file)
index 0000000..d1531bf
--- /dev/null
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+
+
+import java.util.Map;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("updateNetworkResponse")
+@XmlRootElement(name = "updateNetworkResponse")
+@NoJackson
+public class UpdateNetworkResponse extends NetworkResponseCommon {
+       
+       private String networkId;
+       private String neutronNetworkId;
+       private Map<String, String> subnetMap;
+       
+       public UpdateNetworkResponse() {
+       }
+       
+       public UpdateNetworkResponse(String networkId, String neutronNetworkId,
+                       Map<String, String> subnetMap, String messageId) {
+               super(messageId);
+               this.networkId = networkId;
+               this.neutronNetworkId = neutronNetworkId;
+               this.subnetMap = subnetMap;
+       }
+
+       public String getNetworkId() {
+               return networkId;
+       }
+
+       public void setNetworkId(String networkId) {
+               this.networkId = networkId;
+       }
+
+       public String getNeutronNetworkId() {
+               return neutronNetworkId;
+       }
+
+       public void setNeutronNetworkId(String neutronNetworkId) {
+               this.neutronNetworkId = neutronNetworkId;
+       }
+
+       public Map<String, String> getSubnetMap() {
+               return subnetMap;
+       }
+
+       public void setSubnetMap(Map<String, String> subnetMap) {
+               this.subnetMap = subnetMap;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantError.java
new file mode 100644 (file)
index 0000000..2a624a8
--- /dev/null
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "createTenantError")
+@NoJackson
+public class CreateTenantError implements Serializable {
+       private static final long serialVersionUID = 7305288262646805568L;
+       private String message;
+       private MsoExceptionCategory category;
+       private Boolean rolledBack;
+
+       public CreateTenantError () {}
+
+       public CreateTenantError (String message) {
+               this.message = message;
+       }
+
+       public CreateTenantError (String message, MsoExceptionCategory category, boolean rolledBack) {
+               this.message = message;
+               this.category = category;
+               this.rolledBack = rolledBack;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+
+       public Boolean getRolledBack() {
+               return rolledBack;
+       }
+
+       public void setRolledBack(Boolean rolledBack) {
+               this.rolledBack = rolledBack;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequest.java
new file mode 100644 (file)
index 0000000..3bfaf05
--- /dev/null
@@ -0,0 +1,98 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import org.openecomp.mso.entity.MsoRequest;
+import java.util.Map;
+import java.util.HashMap;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "createTenantRequest")
+@NoJackson
+public class CreateTenantRequest extends TenantRequestCommon {
+       private String cloudSiteId;
+       private String tenantName;
+       private Boolean failIfExists;
+       private Boolean backout;
+       private Map<String,String> metadata = new HashMap<String, String>();
+       private MsoRequest msoRequest = new MsoRequest();
+       
+       public CreateTenantRequest() {}
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantName() {
+               return tenantName;
+       }
+
+       public void setTenantName(String tenantName) {
+               this.tenantName = tenantName;
+       }
+
+       public Boolean getFailIfExists() {
+               return failIfExists;
+       }
+
+       public void setFailIfExists(Boolean failIfExists) {
+               this.failIfExists = failIfExists;
+       }
+
+       public Boolean getBackout() {
+               return backout;
+       }
+
+       public void setBackout(Boolean backout) {
+               this.backout = backout;
+       }
+
+       public Map<String, String> getMetadata() {
+               return metadata;
+       }
+
+       public void setMetadata(Map<String, String> metadata) {
+               this.metadata = metadata;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+
+       @Override
+       public String toString() {
+               return "CreateTenantRequest [cloudSiteId=" + cloudSiteId
+                               + ", tenantName=" + tenantName + ", failIfExists="
+                               + failIfExists + ", backout=" + backout + ", metadata="
+                               + metadata + "]";
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponse.java
new file mode 100644 (file)
index 0000000..d25d2b4
--- /dev/null
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "createTenantResponse")
+@NoJackson
+public class CreateTenantResponse implements Serializable {
+       private static final long serialVersionUID = -456155026754759682L;
+       private String cloudSiteId;
+       private String tenantId;
+       private Boolean tenantCreated;
+       private TenantRollback tenantRollback = new TenantRollback();
+       
+       public CreateTenantResponse() {}
+
+       public CreateTenantResponse(String cloudSiteId, String tenantId,
+                       Boolean tenantCreated, TenantRollback tenantRollback) {
+               this.cloudSiteId = cloudSiteId;
+               this.tenantId = tenantId;
+               this.tenantCreated = tenantCreated;
+               this.tenantRollback = tenantRollback;
+       }
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public Boolean getTenantCreated() {
+               return tenantCreated;
+       }
+
+       public void setTenantCreated(Boolean tenantCreated) {
+               this.tenantCreated = tenantCreated;
+       }
+
+       public TenantRollback getTenantRollback() {
+               return tenantRollback;
+       }
+
+       public void setTenantRollback(TenantRollback tenantRollback) {
+               this.tenantRollback = tenantRollback;
+       }
+
+       @Override
+       public String toString() {
+               return "CreateTenantResponse [cloudSiteId=" + cloudSiteId
+                               + ", tenantId=" + tenantId + ", tenantCreated=" + tenantCreated
+                               + ", tenantRollback=" + tenantRollback.toString() +  "]";
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantError.java
new file mode 100644 (file)
index 0000000..e55e58f
--- /dev/null
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "deleteTenantError")
+@NoJackson
+public class DeleteTenantError implements Serializable {
+       private static final long serialVersionUID = -5778340182805870809L;
+       private String message;
+       private MsoExceptionCategory category;
+       private Boolean rolledBack;
+
+       public DeleteTenantError () {}
+
+       public DeleteTenantError (String message) {
+               this.message = message;
+       }
+
+       public DeleteTenantError (String message, MsoExceptionCategory category, boolean rolledBack) {
+               this.message = message;
+               this.category = category;
+               this.rolledBack = rolledBack;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+
+       public Boolean getRolledBack() {
+               return rolledBack;
+       }
+
+       public void setRolledBack(Boolean rolledBack) {
+               this.rolledBack = rolledBack;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequest.java
new file mode 100644 (file)
index 0000000..8efb10b
--- /dev/null
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import org.openecomp.mso.entity.MsoRequest;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "deleteTenantRequest")
+@NoJackson
+public class DeleteTenantRequest extends TenantRequestCommon {
+
+       private String cloudSiteId;
+       private String tenantId;
+
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public DeleteTenantRequest() {}
+       
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponse.java
new file mode 100644 (file)
index 0000000..f2a1d38
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "deleteTenantResponse")
+@NoJackson
+public class DeleteTenantResponse {
+
+       private Boolean tenantDeleted;
+
+       public DeleteTenantResponse() {}
+       
+       public Boolean getTenantDeleted() {
+               return tenantDeleted;
+       }
+
+       public void setTenantDeleted(Boolean tenantDeleted) {
+               this.tenantDeleted = tenantDeleted;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandler.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandler.java
new file mode 100644 (file)
index 0000000..531a683
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.HttpStatus;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+@Path("/")
+public class HealthCheckHandler {
+       
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+    private static final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
+    private static final Response HEALTH_CHECK_RESPONSE = Response.status (HttpStatus.SC_OK)
+                                                                  .entity (CHECK_HTML)
+                                                                  .build ();
+    @HEAD
+    @GET
+    @Path("/healthcheck")
+    @Produces("text/html")
+    public Response healthcheck () {
+       msoLogger.debug ("Health check call in Tenant Adapter");
+        return HEALTH_CHECK_RESPONSE;
+    }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/QueryTenantError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/QueryTenantError.java
new file mode 100644 (file)
index 0000000..100df47
--- /dev/null
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "queryTenantError")
+@NoJackson
+public class QueryTenantError implements Serializable {
+       private static final long serialVersionUID = 7358240830662453507L;
+       private String message;
+       private MsoExceptionCategory category;
+
+       public QueryTenantError () {}
+
+       public QueryTenantError (String message) {
+               this.message = message;
+       }
+
+       public QueryTenantError (String message, MsoExceptionCategory category) {
+               this.message = message;
+               this.category = category;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponse.java
new file mode 100644 (file)
index 0000000..5fb5db7
--- /dev/null
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import java.util.Map;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "queryTenantResponse")
+@NoJackson
+public class QueryTenantResponse extends TenantRequestCommon {
+       private String tenantId;
+       private String tenantName;
+       private Map<String,String> metadata;
+       
+       public QueryTenantResponse() {}
+       
+       public QueryTenantResponse (String id, String name, Map<String,String> metadata) {
+               this.tenantId = id;
+               this.tenantName = name;
+               this.metadata = metadata;
+       }
+       
+       public String getTenantId() {
+               return tenantId;
+       }
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+       
+       public String getTenantName() {
+               return tenantName;
+       }
+       public void setTenantName(String tenantName) {
+               this.tenantName = tenantName;
+       }
+       
+       public Map<String, String> getMetadata() {
+               return metadata;
+       }
+       public void setMetadata(Map<String, String> metadata) {
+               this.metadata = metadata;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantError.java
new file mode 100644 (file)
index 0000000..0327cef
--- /dev/null
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "rollbackTenantError")
+@NoJackson
+public class RollbackTenantError implements Serializable {
+       private static final long serialVersionUID = -5313713674529615223L;
+       private String message;
+       private MsoExceptionCategory category;
+       private Boolean rolledBack;
+
+       public RollbackTenantError () {}
+
+       public RollbackTenantError (String message) {
+               this.message = message;
+       }
+
+       public RollbackTenantError (String message, MsoExceptionCategory category, boolean rolledBack) {
+               this.message = message;
+               this.category = category;
+               this.rolledBack = rolledBack;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+
+       public Boolean getRolledBack() {
+               return rolledBack;
+       }
+
+       public void setRolledBack(Boolean rolledBack) {
+               this.rolledBack = rolledBack;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequest.java
new file mode 100644 (file)
index 0000000..a78da38
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "rollbackTenantRequest")
+@NoJackson
+public class RollbackTenantRequest extends TenantRequestCommon {
+
+       private TenantRollback tenantRollback;
+
+       public RollbackTenantRequest() {}
+
+       public TenantRollback getTenantRollback() {
+               return tenantRollback;
+       }
+
+       public void setTenantRollback(TenantRollback tenantRollback) {
+               this.tenantRollback = tenantRollback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponse.java
new file mode 100644 (file)
index 0000000..ec9632f
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "rollbackTenantResponse")
+@NoJackson
+public class RollbackTenantResponse {
+
+       private Boolean tenantRolledback;
+
+       public RollbackTenantResponse() {}
+       
+       public Boolean getTenantRolledback() {
+               return tenantRolledback;
+       }
+
+       public void setTenantRolledback(Boolean tenantRolledback) {
+               this.tenantRolledback = tenantRolledback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponse.java
new file mode 100644 (file)
index 0000000..5a79243
--- /dev/null
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@XmlRootElement(name = "createTenantResponse")
+@NoJackson
+public class TenantExceptionResponse implements Serializable {
+
+    private static final long serialVersionUID = -9062290006520066109L;
+
+    private String message;
+       private MsoExceptionCategory category;
+       private Boolean rolledBack;
+
+       public TenantExceptionResponse () {}
+
+       public TenantExceptionResponse (String message) {
+               this.message = message;
+       }
+
+       public TenantExceptionResponse (String message, MsoExceptionCategory category, boolean rolledBack) {
+               this.message = message;
+               this.category = category;
+               this.rolledBack = rolledBack;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+
+       public Boolean getRolledBack() {
+               return rolledBack;
+       }
+
+       public void setRolledBack(Boolean rolledBack) {
+               this.rolledBack = rolledBack;
+       }
+       
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRequestCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRequestCommon.java
new file mode 100644 (file)
index 0000000..972d5eb
--- /dev/null
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+
+public class TenantRequestCommon {
+       public String toJsonString() {
+               try {
+                       String jsonString = null;
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
+                       jsonString = mapper.writeValueAsString(this);
+                       return jsonString;
+               } catch (Exception e) {
+                       // Shouldn't happen...
+                       e.printStackTrace();
+                       return "";
+               }
+       }
+
+       public String toXmlString() {
+               try {
+                       ByteArrayOutputStream bs = new ByteArrayOutputStream();
+                       JAXBContext context = JAXBContext.newInstance(this.getClass());
+                       Marshaller marshaller = context.createMarshaller();
+                       marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); //pretty print XML
+                       marshaller.marshal(this, bs);
+                       return bs.toString();
+               } catch (Exception e) {
+                       // Shouldn't happen...
+                       e.printStackTrace();
+                       return "";
+               }
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRollback.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRollback.java
new file mode 100644 (file)
index 0000000..3d346af
--- /dev/null
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+/**
+ * Javabean representing the rollback criteria following a "Create Tenant"
+ * operation.  This structure can be passed back to the "Rollback Tenant"
+ * operation to undo the effects of the create.
+ *
+ *
+ */
+
+@XmlRootElement(name = "rollbackTenantRequest")
+@NoJackson
+public class TenantRollback extends TenantRequestCommon {
+       private String tenantId;
+       private String cloudId;
+       private boolean tenantCreated = false;
+       private MsoRequest msoRequest;
+
+       public TenantRollback() {}
+       
+       public String getTenantId() {
+               return tenantId;
+       }
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getCloudId() {
+               return cloudId;
+       }
+       public void setCloudId(String cloudId) {
+               this.cloudId = cloudId;
+       }
+
+       public boolean getTenantCreated() {
+               return tenantCreated;
+       }
+       public void setTenantCreated(boolean tenantCreated) {
+               this.tenantCreated = tenantCreated;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+       public void setMsoRequest (MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+
+       @Override
+    public String toString() {
+               return "VnfRollback: cloud=" + cloudId + ", tenant=" + tenantId +
+                               ", tenantCreated=" + tenantCreated;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java
new file mode 100644 (file)
index 0000000..f337c4c
--- /dev/null
@@ -0,0 +1,212 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import org.openecomp.mso.entity.MsoRequest;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+/* README
+* 1) Used JAXB/Jettison - see @NoJackson annotation on class to get RootElements REad by RestEasy
+* 2) due to 1) Maps need to use this format
+
+"vfModuleParams": {"entry": [
+                               {"key": "network_id",
+                               "value": "59ed7b41-2983-413f-ba93-e7d437433916"},
+                               {"key": "subnet_id",
+                               "value": "086c9298-5c57-49b7-bb2b-6fd5730c5d92"},
+                               {"key": "server_name_0",
+                               "value": "RaaVnf1"}
+                               ]},
+ * 3) to output json see toJSonString method below which required the @JsonRootName annotation and the WRAP_ROOT feature enabled
+ * 4) Tryong to work with RESTEASY JACKSON and JAXB/JETTISON to conform to Json input/output specs
+*/
+@JsonRootName("createVfModuleRequest")
+@XmlRootElement(name = "createVfModuleRequest")
+@NoJackson
+public class CreateVfModuleRequest extends VfRequestCommon {
+       private String cloudSiteId;
+       private String tenantId;
+
+       private String vnfId;
+       private String vnfType;
+       private String vnfVersion;
+
+       private String vfModuleId;
+       private String vfModuleName;
+       private String vfModuleType;
+
+       private String volumeGroupId;
+       private String volumeGroupStackId;
+       private String baseVfModuleId;
+       private String baseVfModuleStackId;
+
+       private String requestType;
+       private Boolean failIfExists;
+       private Boolean backout;
+
+       private Map<String,String> vfModuleParams = new HashMap<String, String>();
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+
+       public String getVfModuleName() {
+               return vfModuleName;
+       }
+
+       public void setVfModuleName(String vfModuleName) {
+               this.vfModuleName = vfModuleName;
+       }
+
+       public String getVnfType() {
+               return vnfType;
+       }
+
+       public void setVnfType(String vnfType) {
+               this.vnfType = vnfType;
+       }
+
+       public String getVnfVersion() {
+               return vnfVersion;
+       }
+
+       public void setVnfVersion(String vnfVersion) {
+               this.vnfVersion = vnfVersion;
+       }
+
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+
+       public String getVfModuleType() {
+               return vfModuleType;
+       }
+
+       public void setVfModuleType(String vfModuleType) {
+               this.vfModuleType = vfModuleType;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+
+       public String getVolumeGroupStackId() {
+               return volumeGroupStackId;
+       }
+
+       public void setVolumeGroupStackId(String volumeGroupStackId) {
+               this.volumeGroupStackId = volumeGroupStackId;
+       }
+
+       public String getBaseVfModuleId() {
+               return baseVfModuleId;
+       }
+
+       public void setBaseVfModuleId(String baseVfModuleId) {
+               this.baseVfModuleId = baseVfModuleId;
+       }
+
+       public String getBaseVfModuleStackId() {
+               return baseVfModuleStackId;
+       }
+
+       public void setBaseVfModuleStackId(String baseVfModuleStackId) {
+               this.baseVfModuleStackId = baseVfModuleStackId;
+       }
+
+       public String getRequestType() {
+               return requestType;
+       }
+
+       public void setRequestType(String requestType) {
+               this.requestType = requestType;
+       }
+
+       public Boolean getFailIfExists() {
+               return failIfExists;
+       }
+
+       public void setFailIfExists(Boolean failIfExists) {
+               this.failIfExists = failIfExists;
+       }
+
+       public Boolean getBackout() {
+               return backout;
+       }
+
+       public void setBackout(Boolean backout) {
+               this.backout = backout;
+       }
+
+       public Map<String, String> getVfModuleParams() {
+               return vfModuleParams;
+       }
+
+       public void setVfModuleParams(Map<String, String> vfModuleParams) {
+               this.vfModuleParams = vfModuleParams;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponse.java
new file mode 100644 (file)
index 0000000..566a136
--- /dev/null
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("createVfModuleResponse")
+@XmlRootElement(name = "createVfModuleResponse")
+@NoJackson
+public class CreateVfModuleResponse extends VfResponseCommon {
+       private String vnfId;
+       private String vfModuleId;
+       private String vfModuleStackId;
+       private Boolean vfModuleCreated;
+       private Map<String,String> vfModuleOutputs = new HashMap<String, String>();
+       private VfModuleRollback rollback = new VfModuleRollback();
+
+       public CreateVfModuleResponse() {
+               super();
+       }
+
+       public CreateVfModuleResponse(String vnfId, String vfModuleId,
+                       String vfModuleStackId, Boolean vfModuleCreated,
+                       Map<String, String> vfModuleOutputs, VfModuleRollback rollback,
+                       String messageId) {
+               super(messageId);
+               this.vnfId = vnfId;
+               this.vfModuleId = vfModuleId;
+               this.vfModuleStackId = vfModuleStackId;
+               this.vfModuleCreated = vfModuleCreated;
+               this.vfModuleOutputs = vfModuleOutputs;
+               this.rollback = rollback;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+
+       public String getVfModuleStackId() {
+               return vfModuleStackId;
+       }
+
+       public void setVfModuleStackId(String vfModuleStackId) {
+               this.vfModuleStackId = vfModuleStackId;
+       }
+
+       public Boolean getVfModuleCreated() {
+               return vfModuleCreated;
+       }
+
+       public void setVfModuleCreated(Boolean vfModuleCreated) {
+               this.vfModuleCreated = vfModuleCreated;
+       }
+
+       public Map<String, String> getVfModuleOutputs() {
+               return vfModuleOutputs;
+       }
+
+       public void setVfModuleOutputs(Map<String, String> vfModuleOutputs) {
+               this.vfModuleOutputs = vfModuleOutputs;
+       }
+
+       public VfModuleRollback getRollback() {
+               return rollback;
+       }
+
+       public void setRollback(VfModuleRollback rollback) {
+               this.rollback = rollback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequest.java
new file mode 100644 (file)
index 0000000..b93a260
--- /dev/null
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.entity.MsoRequest;
+
+@JsonRootName("createVolumeGroupRequest")
+@XmlRootElement(name = "createVolumeGroupRequest")
+@NoJackson
+public class CreateVolumeGroupRequest extends VfRequestCommon {
+       private String cloudSiteId;
+       private String tenantId;
+       private String volumeGroupName;
+       private String volumeGroupId;
+       private String vnfType;
+       private String vnfVersion;
+       private String vfModuleType;
+       private Map<String,String> volumeGroupParams = new HashMap<String, String>();
+       private Boolean failIfExists;
+       private Boolean suppressBackout;
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public CreateVolumeGroupRequest() {
+               super();
+       }
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getVnfType() {
+               return vnfType;
+       }
+
+       public void setVnfType(String vnfType) {
+               this.vnfType = vnfType;
+       }
+
+       public String getVnfVersion() {
+               return vnfVersion;
+       }
+
+       public void setVnfVersion(String vnfVersion) {
+               this.vnfVersion = vnfVersion;
+       }
+
+       public String getVfModuleType() {
+               return vfModuleType;
+       }
+
+       public void setVfModuleType(String vfModuleType) {
+               this.vfModuleType = vfModuleType;
+       }
+
+       public Map<String, String> getVolumeGroupParams() {
+               return volumeGroupParams;
+       }
+
+       public void setVolumeGroupParams(Map<String, String> volumeGroupParams) {
+               this.volumeGroupParams = volumeGroupParams;
+       }
+
+       public String getVolumeGroupName() {
+               return volumeGroupName;
+       }
+
+       public void setVolumeGroupName(String volumeGroupName) {
+               this.volumeGroupName = volumeGroupName;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+
+       public Boolean getFailIfExists() {
+               return failIfExists;
+       }
+
+       public void setFailIfExists(Boolean failIfExists) {
+               this.failIfExists = failIfExists;
+       }
+
+       public Boolean getSuppressBackout() {
+               return suppressBackout;
+       }
+
+       public void setSuppressBackout(Boolean suppressBackout) {
+               this.suppressBackout = suppressBackout;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponse.java
new file mode 100644 (file)
index 0000000..abf599b
--- /dev/null
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@JsonRootName("createVolumeGroupResponse")
+@XmlRootElement(name = "createVolumeGroupResponse")
+@NoJackson
+public class CreateVolumeGroupResponse extends VfResponseCommon {
+       private String volumeGroupId;
+       private String volumeGroupStackId;
+       private Boolean volumeGroupCreated;
+       private Map<String,String> volumeGroupOutputs = new HashMap<String, String>();
+       private VolumeGroupRollback volumeGroupRollback = new VolumeGroupRollback();
+
+       public CreateVolumeGroupResponse() {
+               super();
+       }
+
+       public CreateVolumeGroupResponse(
+                       String volumeGroupId,
+                       String volumeGroupStackId,
+                       Boolean volumeGroupCreated,
+                       Map<String, String> volumeGroupOutputs,
+                       VolumeGroupRollback volumeGroupRollback,
+                       String messageId)
+       {
+               super(messageId);
+               this.volumeGroupId = volumeGroupId;
+               this.volumeGroupStackId = volumeGroupStackId;
+               this.volumeGroupCreated = volumeGroupCreated;
+               this.volumeGroupOutputs = volumeGroupOutputs;
+               this.volumeGroupRollback = volumeGroupRollback;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+
+       public String getVolumeGroupStackId() {
+               return volumeGroupStackId;
+       }
+
+       public void setVolumeGroupStackId(String volumeGroupStackId) {
+               this.volumeGroupStackId = volumeGroupStackId;
+       }
+
+       public Boolean getVolumeGroupCreated() {
+               return volumeGroupCreated;
+       }
+
+       public void setVolumeGroupCreated(Boolean volumeGroupCreated) {
+               this.volumeGroupCreated = volumeGroupCreated;
+       }
+
+       public Map<String, String> getVolumeGroupOutputs() {
+               return volumeGroupOutputs;
+       }
+
+       public void setVolumeGroupOutputs(Map<String, String> volumeGroupOutputs) {
+               this.volumeGroupOutputs = volumeGroupOutputs;
+       }
+
+       public VolumeGroupRollback getVolumeGroupRollback() {
+               return volumeGroupRollback;
+       }
+
+       public void setVolumeGroupRollback(VolumeGroupRollback volumeGroupRollback) {
+               this.volumeGroupRollback = volumeGroupRollback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequest.java
new file mode 100644 (file)
index 0000000..14ecd5e
--- /dev/null
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import org.openecomp.mso.entity.MsoRequest;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("deleteVfModuleRequest")
+@XmlRootElement(name = "deleteVfModuleRequest")
+@NoJackson
+public class DeleteVfModuleRequest extends VfRequestCommon {
+       private String cloudSiteId;
+       private String tenantId;
+       private String vnfId;
+       private String vfModuleId;
+       private String vfModuleStackId;
+
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public DeleteVfModuleRequest() {
+               super();
+       }
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+
+       public String getVfModuleStackId() {
+               return vfModuleStackId;
+       }
+
+       public void setVfModuleStackId(String vfModuleStackId) {
+               this.vfModuleStackId = vfModuleStackId;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java
new file mode 100644 (file)
index 0000000..a3d00a9
--- /dev/null
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("deleteVfModuleResponse")
+@XmlRootElement(name = "deleteVfModuleResponse")
+@NoJackson
+public class DeleteVfModuleResponse extends VfResponseCommon {
+       private String vnfId;
+       private String vfModuleId;
+       private Boolean vfModuleDeleted;
+
+       public DeleteVfModuleResponse() {
+               super();
+       }
+
+       public DeleteVfModuleResponse(String vnfId, String vfModuleId, Boolean vfModuleDeleted, String messageId) {
+               super(messageId);
+               this.vnfId = vnfId;
+               this.vfModuleId = vfModuleId;
+               this.vfModuleDeleted = vfModuleDeleted;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+
+       public Boolean getVfModuleDeleted() {
+               return vfModuleDeleted;
+       }
+
+       public void setVfModuleDeleted(Boolean vfModuleDeleted) {
+               this.vfModuleDeleted = vfModuleDeleted;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequest.java
new file mode 100644 (file)
index 0000000..01dc8ff
--- /dev/null
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.entity.MsoRequest;
+
+@JsonRootName("deleteVolumeGroupRequest")
+@XmlRootElement(name = "deleteVolumeGroupRequest")
+@NoJackson
+public class DeleteVolumeGroupRequest extends VfRequestCommon {
+       private String cloudSiteId;
+       private String tenantId;
+       private String volumeGroupId;
+       private String volumeGroupStackId;
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public DeleteVolumeGroupRequest() {
+               super();
+       }
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+
+       public String getVolumeGroupStackId() {
+               return volumeGroupStackId;
+       }
+
+       public void setVolumeGroupStackId(String volumeGroupStackId) {
+               this.volumeGroupStackId = volumeGroupStackId;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponse.java
new file mode 100644 (file)
index 0000000..738abd6
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@JsonRootName("deleteVolumeGroupResponse")
+@XmlRootElement(name = "deleteVolumeGroupResponse")
+@NoJackson
+public class DeleteVolumeGroupResponse extends VfResponseCommon {
+       private Boolean volumeGroupDeleted;
+
+       public DeleteVolumeGroupResponse() {
+               super();
+       }
+
+       public DeleteVolumeGroupResponse(Boolean volumeGroupDeleted, String messageId) {
+               super(messageId);
+               this.volumeGroupDeleted = volumeGroupDeleted;
+       }
+
+       public Boolean getVolumeGroupDeleted() {
+               return volumeGroupDeleted;
+       }
+
+       public void setVolumeGroupDeleted(Boolean volumeGroupDeleted) {
+               this.volumeGroupDeleted = volumeGroupDeleted;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java
new file mode 100644 (file)
index 0000000..91da930
--- /dev/null
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.openstack.beans.VnfStatus;
+
+@XmlRootElement(name = "queryVfModuleResponse")
+@NoJackson
+public class QueryVfModuleResponse {
+       private String vnfId;
+       private String vfModuleId;
+       private String vfModuleStackId;
+       private VnfStatus vnfStatus;
+       private Map<String,String> vfModuleOutputs;
+
+       public QueryVfModuleResponse() {
+               super();
+       }
+
+       public QueryVfModuleResponse(String vnfId, String vfModuleId,
+                       String vfModuleStackId, VnfStatus vnfStatus,
+                       Map<String, String> vfModuleOutputs) {
+               super();
+               this.vnfId = vnfId;
+               this.vfModuleId = vfModuleId;
+               this.vfModuleStackId = vfModuleStackId;
+               this.vnfStatus = vnfStatus;
+               this.vfModuleOutputs = vfModuleOutputs;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+
+       public String getVfModuleStackId() {
+               return vfModuleStackId;
+       }
+
+       public void setVfModuleStackId(String vfModuleStackId) {
+               this.vfModuleStackId = vfModuleStackId;
+       }
+
+       public VnfStatus getVnfStatus() {
+               return vnfStatus;
+       }
+
+       public void setVnfStatus(VnfStatus vnfStatus) {
+               this.vnfStatus = vnfStatus;
+       }
+
+       public Map<String, String> getVfModuleOutputs() {
+               return vfModuleOutputs;
+       }
+
+       public void setVfModuleOutputs(Map<String, String> vfModuleOutputs) {
+               this.vfModuleOutputs = vfModuleOutputs;
+       }
+
+       public String toJsonString() {
+               String jsonString = null;
+               try {
+                       ObjectMapper mapper = new ObjectMapper();
+                       jsonString = mapper.writeValueAsString(this);
+               }
+               catch (Exception e) {}
+               return jsonString;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java
new file mode 100644 (file)
index 0000000..5e0d8bb
--- /dev/null
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.openstack.beans.VnfStatus;
+
+@XmlRootElement(name = "queryVolumeGroupResponse")
+@NoJackson
+public class QueryVolumeGroupResponse {
+       private String volumeGroupId;
+       private String volumeGroupStackId;
+       private VnfStatus volumeGroupStatus;
+       private Map<String,String> volumeGroupOutputs;
+
+       public QueryVolumeGroupResponse() {
+       }
+
+       public QueryVolumeGroupResponse(
+                       String volumeGroupId,
+                       String volumeGroupStackId,
+                       VnfStatus volumeGroupStatus,
+                       Map<String, String> volumeGroupOutputs)
+       {
+               super();
+               this.volumeGroupId = volumeGroupId;
+               this.volumeGroupStackId = volumeGroupStackId;
+               this.volumeGroupStatus = volumeGroupStatus;
+               this.volumeGroupOutputs = volumeGroupOutputs;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+
+       public String getVolumeGroupStackId() {
+               return volumeGroupStackId;
+       }
+
+       public void setVolumeGroupStackId(String volumeGroupStackId) {
+               this.volumeGroupStackId = volumeGroupStackId;
+       }
+
+       public VnfStatus getVolumeGroupStatus() {
+               return volumeGroupStatus;
+       }
+
+       public void setVolumeGroupStatus(VnfStatus volumeGroupStatus) {
+               this.volumeGroupStatus = volumeGroupStatus;
+       }
+
+       public Map<String, String> getVolumeGroupOutputs() {
+               return volumeGroupOutputs;
+       }
+
+       public void setVolumeGroupOutputs(Map<String, String> volumeGroupOutputs) {
+               this.volumeGroupOutputs = volumeGroupOutputs;
+       }
+
+       public String toJsonString() {
+               String jsonString = null;
+               try {
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
+                       jsonString = mapper.writeValueAsString(this);
+               }
+               catch (Exception e) {}
+               return jsonString;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequest.java
new file mode 100644 (file)
index 0000000..3365a05
--- /dev/null
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("rollbackVfModuleRequest")
+@XmlRootElement(name = "rollbackVfModuleRequest")
+@NoJackson
+public class RollbackVfModuleRequest extends VfRequestCommon {
+       private VfModuleRollback vfModuleRollback;
+
+       public RollbackVfModuleRequest() {
+               super();
+       }
+
+       public VfModuleRollback getVfModuleRollback() {
+               return vfModuleRollback;
+       }
+
+       public void setVfModuleRollback(VfModuleRollback vfModuleRollback) {
+               this.vfModuleRollback = vfModuleRollback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponse.java
new file mode 100644 (file)
index 0000000..d877d66
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("rollbackVfModuleResponse")
+@XmlRootElement(name = "rollbackVfModuleResponse")
+@NoJackson
+public class RollbackVfModuleResponse extends VfResponseCommon {
+       private Boolean vfModuleRolledback;
+
+       public RollbackVfModuleResponse() {
+               super();
+       }
+
+       public RollbackVfModuleResponse(Boolean vfModuleRolledback, String messageId) {
+               super(messageId);
+               this.vfModuleRolledback = vfModuleRolledback;
+       }
+
+       public Boolean getVfModuleRolledback() {
+               return vfModuleRolledback;
+       }
+
+       public void setVfModuleRolledback(Boolean vfModuleRolledback) {
+               this.vfModuleRolledback = vfModuleRolledback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequest.java
new file mode 100644 (file)
index 0000000..cb877bb
--- /dev/null
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@JsonRootName("rollbackVolumeGroupRequest")
+@XmlRootElement(name = "rollbackVolumeGroupRequest")
+@NoJackson
+public class RollbackVolumeGroupRequest extends VfRequestCommon {
+       private VolumeGroupRollback volumeGroupRollback;
+
+       public RollbackVolumeGroupRequest() {
+               super();
+       }
+
+       public VolumeGroupRollback getVolumeGroupRollback() {
+               return volumeGroupRollback;
+       }
+
+       public void setVolumeGroupRollback(VolumeGroupRollback volumeGroupRollback) {
+               this.volumeGroupRollback = volumeGroupRollback;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponse.java
new file mode 100644 (file)
index 0000000..603b758
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@JsonRootName("rollbackVolumeGroupResponse")
+@XmlRootElement(name = "rollbackVolumeGroupResponse")
+@NoJackson
+public class RollbackVolumeGroupResponse extends VfResponseCommon {
+       private Boolean volumeGroupRolledBack;
+
+       public RollbackVolumeGroupResponse() {
+               super();
+       }
+
+       public RollbackVolumeGroupResponse(Boolean volumeGroupRolledBack, String messageId) {
+               super(messageId);
+               this.volumeGroupRolledBack = volumeGroupRolledBack;
+       }
+
+       public Boolean getVolumeGroupRolledBack() {
+               return volumeGroupRolledBack;
+       }
+
+       public void setVolumeGroupRolledBack(Boolean volumeGroupRolledBack) {
+               this.volumeGroupRolledBack = volumeGroupRolledBack;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequest.java
new file mode 100644 (file)
index 0000000..a234e74
--- /dev/null
@@ -0,0 +1,205 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import org.openecomp.mso.entity.MsoRequest;
+
+import java.util.Map;
+import java.util.HashMap;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("updateVfModuleRequest")
+@XmlRootElement(name = "updateVfModuleRequest")
+@NoJackson
+public class UpdateVfModuleRequest extends VfRequestCommon {
+
+       private String cloudSiteId;
+       private String tenantId;
+
+       private String vnfId;
+       private String vnfType;
+       private String vnfVersion;
+
+       private String vfModuleName;
+       private String vfModuleType;
+       private String vfModuleId;
+       private String vfModuleStackId;
+
+       private String volumeGroupId;
+       private String volumeGroupStackId;
+
+       private String baseVfModuleId;
+       private String baseVfModuleStackId;
+
+       private String requestType;
+       private Boolean failIfExists;
+       private Boolean backout;
+
+       private Map<String,String> vfModuleParams = new HashMap<String, String>();
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+
+       public String getVfModuleName() {
+               return vfModuleName;
+       }
+
+       public void setVfModuleName(String vfModuleName) {
+               this.vfModuleName = vfModuleName;
+       }
+
+       public String getVnfType() {
+               return vnfType;
+       }
+
+       public void setVnfType(String vnfType) {
+               this.vnfType = vnfType;
+       }
+
+       public String getVnfVersion() {
+               return vnfVersion;
+       }
+
+       public void setVnfVersion(String vnfVersion) {
+               this.vnfVersion = vnfVersion;
+       }
+
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+
+       public String getVfModuleType() {
+               return vfModuleType;
+       }
+
+       public void setVfModuleType(String vfModuleType) {
+               this.vfModuleType = vfModuleType;
+       }
+
+       public String getVfModuleStackId() {
+               return vfModuleStackId;
+       }
+
+       public void setVfModuleStackId(String vfModuleStackId) {
+               this.vfModuleStackId = vfModuleStackId;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+
+       public String getVolumeGroupStackId() {
+               return volumeGroupStackId;
+       }
+
+       public void setVolumeGroupStackId(String volumeGroupStackId) {
+               this.volumeGroupStackId = volumeGroupStackId;
+       }
+
+       public String getBaseVfModuleId() {
+               return baseVfModuleId;
+       }
+
+       public void setBaseVfModuleId(String baseVfModuleId) {
+               this.baseVfModuleId = baseVfModuleId;
+       }
+
+       public String getBaseVfModuleStackId() {
+               return baseVfModuleStackId;
+       }
+
+       public void setBaseVfModuleStackId(String baseVfModuleStackId) {
+               this.baseVfModuleStackId = baseVfModuleStackId;
+       }
+
+       public String getRequestType() {
+               return requestType;
+       }
+
+       public void setRequestType(String requestType) {
+               this.requestType = requestType;
+       }
+
+       public Boolean getFailIfExists() {
+               return failIfExists;
+       }
+
+       public void setFailIfExists(Boolean failIfExists) {
+               this.failIfExists = failIfExists;
+       }
+
+       public Boolean getBackout() {
+               return backout;
+       }
+
+       public void setBackout(Boolean backout) {
+               this.backout = backout;
+       }
+
+       public Map<String, String> getVfModuleParams() {
+               return vfModuleParams;
+       }
+
+       public void setVfModuleParams(Map<String, String> vfModuleParams) {
+               this.vfModuleParams = vfModuleParams;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponse.java
new file mode 100644 (file)
index 0000000..af162b2
--- /dev/null
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("updateVfModuleResponse")
+@XmlRootElement(name = "updateVfModuleResponse")
+@NoJackson
+public class UpdateVfModuleResponse extends VfResponseCommon {
+       private String vnfId;
+       private String vfModuleId;
+       private String vfModuleStackId;
+       private Map<String,String> vfModuleOutputs = new HashMap<String, String>();
+
+       public UpdateVfModuleResponse() {
+               super();
+       }
+
+       public UpdateVfModuleResponse(String vnfId, String vfModuleId,
+                       String vfModuleStackId,
+                       Map<String, String> vfModuleOutputs,
+                       String messageId) {
+               super(messageId);
+               this.vnfId = vnfId;
+               this.vfModuleId = vfModuleId;
+               this.vfModuleStackId = vfModuleStackId;
+               this.vfModuleOutputs = vfModuleOutputs;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+
+       public String getVfModuleStackId() {
+               return vfModuleStackId;
+       }
+
+       public void setVfModuleStackId(String vfModuleStackId) {
+               this.vfModuleStackId = vfModuleStackId;
+       }
+
+       public Map<String, String> getVfModuleOutputs() {
+               return vfModuleOutputs;
+       }
+
+       public void setVfModuleOutputs(Map<String, String> vfModuleOutputs) {
+               this.vfModuleOutputs = vfModuleOutputs;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequest.java
new file mode 100644 (file)
index 0000000..50c60b3
--- /dev/null
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.entity.MsoRequest;
+
+@JsonRootName("updateVolumeGroupRequest")
+@XmlRootElement(name = "updateVolumeGroupRequest")
+@NoJackson
+public class UpdateVolumeGroupRequest extends VfRequestCommon {
+       private String cloudSiteId;
+       private String tenantId;
+       private String volumeGroupId;
+       private String volumeGroupStackId;
+       private String vnfType;
+       private String vnfVersion;
+       private String vfModuleType;
+       private Map<String,String> volumeGroupParams = new HashMap<String, String>();
+       private MsoRequest msoRequest = new MsoRequest();
+
+       public UpdateVolumeGroupRequest() {
+               super();
+       }
+
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+
+       public String getVolumeGroupStackId() {
+               return volumeGroupStackId;
+       }
+
+       public void setVolumeGroupStackId(String volumeGroupStackId) {
+               this.volumeGroupStackId = volumeGroupStackId;
+       }
+
+       public String getVnfType() {
+               return vnfType;
+       }
+
+       public void setVnfType(String vnfType) {
+               this.vnfType = vnfType;
+       }
+
+       public String getVnfVersion() {
+               return vnfVersion;
+       }
+
+       public void setVnfVersion(String vnfVersion) {
+               this.vnfVersion = vnfVersion;
+       }
+
+       public String getVfModuleType() {
+               return vfModuleType;
+       }
+
+       public void setVfModuleType(String vfModuleType) {
+               this.vfModuleType = vfModuleType;
+       }
+
+       public Map<String, String> getVolumeGroupParams() {
+               return volumeGroupParams;
+       }
+
+       public void setVolumeGroupParams(Map<String, String> volumeGroupParams) {
+               this.volumeGroupParams = volumeGroupParams;
+       }
+
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponse.java
new file mode 100644 (file)
index 0000000..2bd210f
--- /dev/null
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+@JsonRootName("updateVolumeGroupResponse")
+@XmlRootElement(name = "updateVolumeGroupResponse")
+@NoJackson
+public class UpdateVolumeGroupResponse extends VfResponseCommon {
+       private String volumeGroupId;
+       private String volumeGroupStackId;
+       private Map<String,String> volumeGroupOutputs;
+
+       public UpdateVolumeGroupResponse() {
+               super();
+               this.volumeGroupOutputs = new HashMap<String, String>();
+       }
+
+       public UpdateVolumeGroupResponse(
+                       String volumeGroupId,
+                       String volumeGroupStackId,
+                       Map<String, String> volumeGroupOutputs,
+                       String messageId)
+       {
+               super(messageId);
+               this.volumeGroupId = volumeGroupId;
+               this.volumeGroupStackId = volumeGroupStackId;
+               this.volumeGroupOutputs = volumeGroupOutputs;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+
+       public String getVolumeGroupStackId() {
+               return volumeGroupStackId;
+       }
+
+       public void setVolumeGroupStackId(String volumeGroupStackId) {
+               this.volumeGroupStackId = volumeGroupStackId;
+       }
+
+       public Map<String, String> getVolumeGroupOutputs() {
+               return volumeGroupOutputs;
+       }
+
+       public void setVolumeGroupOutputs(Map<String, String> volumeGroupOutputs) {
+               this.volumeGroupOutputs = volumeGroupOutputs;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponse.java
new file mode 100644 (file)
index 0000000..419d1df
--- /dev/null
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "vfModuleException")
+@NoJackson
+public class VfModuleExceptionResponse extends VfResponseCommon implements Serializable {
+    private static final long serialVersionUID = -9062290006520066109L;
+
+    private String message;
+       private MsoExceptionCategory category;
+       private Boolean rolledBack;
+
+       public VfModuleExceptionResponse () {}
+
+       public VfModuleExceptionResponse (String message) {
+               this.message = message;
+       }
+
+       public VfModuleExceptionResponse (String message, MsoExceptionCategory category, boolean rolledBack, String messageid) {
+               super(messageid);
+               this.message = message;
+               this.category = category;
+               this.rolledBack = rolledBack;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+
+       public Boolean getRolledBack() {
+               return rolledBack;
+       }
+
+       public void setRolledBack(Boolean rolledBack) {
+               this.rolledBack = rolledBack;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollback.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollback.java
new file mode 100644 (file)
index 0000000..84ef714
--- /dev/null
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("VfModuleRollback")
+@XmlRootElement(name = "VfModuleRollback")
+@NoJackson
+public class VfModuleRollback {
+       private String vnfId;
+       private String vfModuleId;
+       private String vfModuleStackId;
+       private boolean vfModuleCreated = false;
+       private String tenantId;
+       private String cloudSiteId;
+       private MsoRequest msoRequest;
+       private String messageId;
+
+       public VfModuleRollback() {
+       }
+
+       public VfModuleRollback(VnfRollback vrb, String vfModuleId, String vfModuleStackId, String messageId)
+       {
+               this.vnfId = vrb.getVnfId();
+               this.vfModuleId = vfModuleId;
+               this.vfModuleStackId = vfModuleStackId;
+               this.vfModuleCreated = vrb.getVnfCreated();
+               this.tenantId = vrb.getTenantId();
+               this.cloudSiteId = vrb.getCloudSiteId();
+               this.msoRequest = vrb.getMsoRequest();
+               this.messageId = messageId;
+       }
+
+       public VfModuleRollback(String vnfId, String vfModuleId,
+                       String vfModuleStackId, boolean vfModuleCreated, String tenantId,
+                       String cloudSiteId,
+                       MsoRequest msoRequest,
+                       String messageId) {
+               super();
+               this.vnfId = vnfId;
+               this.vfModuleId = vfModuleId;
+               this.vfModuleStackId = vfModuleStackId;
+               this.vfModuleCreated = vfModuleCreated;
+               this.tenantId = tenantId;
+               this.cloudSiteId = cloudSiteId;
+               this.msoRequest = msoRequest;
+               this.messageId = messageId;
+       }
+
+       public String getVnfId() {
+               return vnfId;
+       }
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+       public String getVfModuleStackId() {
+               return vfModuleStackId;
+       }
+       public void setVfModuleStackId(String vfModuleStackId) {
+               this.vfModuleStackId = vfModuleStackId;
+       }
+       public boolean isVfModuleCreated() {
+               return vfModuleCreated;
+       }
+       public void setVfModuleCreated(boolean vfModuleCreated) {
+               this.vfModuleCreated = vfModuleCreated;
+       }
+       public String getTenantId() {
+               return tenantId;
+       }
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+       public String getMessageId() {
+               return messageId;
+       }
+       public void setMessageId(String messageId) {
+               this.messageId = messageId;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommon.java
new file mode 100644 (file)
index 0000000..e315444
--- /dev/null
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+/**
+ * Everything that is common between all VfModule and VolumeGroup Requests.
+ */
+public abstract class VfRequestCommon extends VfResponseCommon {
+       private Boolean skipAAI;
+       private String notificationUrl;
+
+       public Boolean getSkipAAI() {
+               return skipAAI;
+       }
+
+       public void setSkipAAI(Boolean skipAAI) {
+               this.skipAAI = skipAAI;
+       }
+
+       public String getNotificationUrl() {
+               return notificationUrl;
+       }
+
+       public void setNotificationUrl(String notificationUrl) {
+               this.notificationUrl = notificationUrl;
+       }
+
+       public boolean isSynchronous() {
+               return notificationUrl == null || (notificationUrl != null && notificationUrl.isEmpty());
+       }
+
+       // getMessageId, setMessageId, toJsonString, toJsonString are all defined in VfResponseCommon.
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java
new file mode 100644 (file)
index 0000000..96a83e4
--- /dev/null
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+
+/**
+ * Everything that is common between all VfModule and VolumeGroup Responses,
+ * except for QueryVfModuleResponse and QueryVolumeGroupResponse.
+ */
+public abstract class VfResponseCommon {
+       private String messageId;
+
+       public VfResponseCommon() {
+               messageId = null;
+       }
+
+       public VfResponseCommon(String messageId) {
+               this.messageId = messageId;
+       }
+
+       public String getMessageId() {
+               return messageId;
+       }
+
+       public void setMessageId(String messageId) {
+               this.messageId = messageId;
+       }
+
+       public String toJsonString() {
+               try {
+                       String jsonString = null;
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
+                       jsonString = mapper.writeValueAsString(this);
+                       return jsonString;
+               } catch (Exception e) {
+                       // Shouldn't happen...
+                       e.printStackTrace();
+                       return "";
+               }
+       }
+
+       public String toXmlString() {
+               try {
+                       ByteArrayOutputStream bs = new ByteArrayOutputStream();
+                       JAXBContext context = JAXBContext.newInstance(this.getClass());
+                       Marshaller marshaller = context.createMarshaller();
+                       marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); //pretty print XML
+                       marshaller.marshal(this, bs);
+                       return bs.toString();
+               } catch (Exception e) {
+                       // Shouldn't happen...
+                       e.printStackTrace();
+                       return "";
+               }
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponse.java
new file mode 100644 (file)
index 0000000..bc4e54b
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+@XmlRootElement(name = "volumeGroupException")
+@NoJackson
+public class VolumeGroupExceptionResponse extends VfModuleExceptionResponse {
+       // Exactly the same as a VfModuleExceptionResponse
+
+       private static final long serialVersionUID = 1168681288205898800L;
+
+       public VolumeGroupExceptionResponse() {
+               super();
+       }
+
+       public VolumeGroupExceptionResponse(String message) {
+               super(message);
+       }
+
+       public VolumeGroupExceptionResponse(String message, MsoExceptionCategory category, boolean rolledBack, String messageid) {
+               super(message, category, rolledBack, messageid);
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollback.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollback.java
new file mode 100644 (file)
index 0000000..bda2221
--- /dev/null
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.jboss.resteasy.annotations.providers.NoJackson;
+
+import org.openecomp.mso.entity.MsoRequest;
+
+@JsonRootName("VolumeGroupRollback")
+@XmlRootElement(name = "VolumeGroupRollback")
+@NoJackson
+public class VolumeGroupRollback {
+//     “volumeGroupRollback”: {
+//     “volumeGroupId”: “<A&AI_ VOLUME_GROUP_ID>”,
+//     “volumeGroupStackId”: “<VOLUME_GROUP _STACK_ID>”,
+//      “tenantId”: “<TENANT_ID>”,
+//     “cloudSiteId”: “<CLOUD_CLLI>”,
+//     “volumeGroupCreated”: TRUE|FALSE,
+//     “msoRequest”: {
+//             “requestId”: “<REQUEST_ID>”,
+//             “serviceInstanceId”: “<SERVICE_INSTANCE_ID>”
+//     }
+//},
+
+       private String volumeGroupId;
+       private String volumeGroupStackId;
+       private String tenantId;
+       private String cloudSiteId;
+       private boolean volumeGroupCreated = false;
+       private MsoRequest msoRequest;
+       private String messageId;
+
+       public VolumeGroupRollback() {
+       }
+
+       public VolumeGroupRollback(VolumeGroupRollback vrb, String volumeGroupStackId, String messageId)
+       {
+               this.volumeGroupId      = vrb.getVolumeGroupId();
+               this.volumeGroupStackId = volumeGroupStackId;
+               this.tenantId           = vrb.getTenantId();
+               this.cloudSiteId        = vrb.getCloudSiteId();
+               this.volumeGroupCreated = vrb.isVolumeGroupCreated();
+               this.msoRequest         = vrb.getMsoRequest();
+               this.messageId          = messageId;
+       }
+
+       public VolumeGroupRollback(
+                       String volumeGroupId,
+                       String volumeGroupStackId,
+                       boolean volumeGroupCreated,
+                       String tenantId,
+                       String cloudSiteId,
+                       MsoRequest msoRequest,
+                       String messageId)
+       {
+               super();
+               this.volumeGroupId = volumeGroupId;
+               this.volumeGroupStackId = volumeGroupStackId;
+               this.volumeGroupCreated = volumeGroupCreated;
+               this.tenantId = tenantId;
+               this.cloudSiteId = cloudSiteId;
+               this.msoRequest = msoRequest;
+               this.messageId = messageId;
+       }
+
+       public String getVolumeGroupId() {
+               return volumeGroupId;
+       }
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+       public String getVolumeGroupStackId() {
+               return volumeGroupStackId;
+       }
+       public void setVolumeGroupStackId(String volumeGroupStackId) {
+               this.volumeGroupStackId = volumeGroupStackId;
+       }
+       public String getTenantId() {
+               return tenantId;
+       }
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+       public void setCloudSiteId(String cloudSiteId) {
+               this.cloudSiteId = cloudSiteId;
+       }
+       public boolean isVolumeGroupCreated() {
+               return volumeGroupCreated;
+       }
+       public void setVolumeGroupCreated(boolean volumeGroupCreated) {
+               this.volumeGroupCreated = volumeGroupCreated;
+       }
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+       public void setMsoRequest(MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+       public String getMessageId() {
+               return messageId;
+       }
+       public void setMessageId(String messageId) {
+               this.messageId = messageId;
+       }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ContrailNetworkESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ContrailNetworkESTest.java
new file mode 100644 (file)
index 0000000..50992bf
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:28:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ContrailNetworkESTest extends ContrailNetworkESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork((String) null, (String) null, (List<String>) null, (List<String>) null, (List<String>) null);
+      String string0 = contrailNetwork0.getShared();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork((String) null, "!1.", (List<String>) linkedList0, (List<String>) linkedList0, (List<String>) linkedList0);
+      List<String> list0 = contrailNetwork0.getRouteTargets();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      linkedList0.offer("Q");
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork("Q", "|", (List<String>) linkedList0, (List<String>) linkedList0, (List<String>) linkedList0);
+      contrailNetwork0.getRouteTargets();
+      assertEquals("Q", contrailNetwork0.getShared());
+      assertEquals("|", contrailNetwork0.getExternal());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork("", "RIEp7.g7I,Oi", (List<String>) linkedList0, (List<String>) linkedList0, (List<String>) linkedList0);
+      contrailNetwork0.getRouteTableFqdns();
+      assertEquals("RIEp7.g7I,Oi", contrailNetwork0.getExternal());
+      assertEquals("", contrailNetwork0.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      linkedList0.offer("Q");
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork("Q", "|", (List<String>) linkedList0, (List<String>) linkedList0, (List<String>) linkedList0);
+      contrailNetwork0.getRouteTableFqdns();
+      assertEquals("Q", contrailNetwork0.getShared());
+      assertEquals("|", contrailNetwork0.getExternal());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork("", "", (List<String>) linkedList0, (List<String>) linkedList0, (List<String>) linkedList0);
+      List<String> list0 = contrailNetwork0.getPolicyFqdns();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      linkedList0.add((String) null);
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork("false", "52", (List<String>) linkedList0, (List<String>) linkedList0, (List<String>) linkedList0);
+      contrailNetwork0.getPolicyFqdns();
+      assertEquals("52", contrailNetwork0.getExternal());
+      assertEquals("false", contrailNetwork0.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork("", "", (List<String>) null, (List<String>) null, (List<String>) null);
+      String string0 = contrailNetwork0.getExternal();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      contrailNetwork0.getPolicyFqdns();
+      assertEquals("false", contrailNetwork0.getExternal());
+      assertEquals("false", contrailNetwork0.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      contrailNetwork0.getRouteTableFqdns();
+      assertEquals("false", contrailNetwork0.getExternal());
+      assertEquals("false", contrailNetwork0.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      contrailNetwork0.getRouteTargets();
+      assertEquals("false", contrailNetwork0.getShared());
+      assertEquals("false", contrailNetwork0.getExternal());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork((String) null, (String) null, (List<String>) null, (List<String>) null, (List<String>) null);
+      String string0 = contrailNetwork0.getExternal();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      contrailNetwork0.setRouteTableFqdns((List<String>) null);
+      assertEquals("false", contrailNetwork0.getShared());
+      assertEquals("false", contrailNetwork0.getExternal());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      contrailNetwork0.setPolicyFqdns((List<String>) null);
+      assertEquals("false", contrailNetwork0.getShared());
+      assertEquals("false", contrailNetwork0.getExternal());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      contrailNetwork0.setRouteTargets((List<String>) null);
+      assertEquals("false", contrailNetwork0.getShared());
+      assertEquals("false", contrailNetwork0.getExternal());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      assertEquals("false", contrailNetwork0.getShared());
+      
+      contrailNetwork0.setShared("");
+      contrailNetwork0.getShared();
+      assertEquals("false", contrailNetwork0.getExternal());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      assertEquals("false", contrailNetwork0.getExternal());
+      
+      contrailNetwork0.setExternal("fhtl}[");
+      assertEquals("false", contrailNetwork0.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      String string0 = contrailNetwork0.getShared();
+      assertEquals("false", contrailNetwork0.getExternal());
+      assertEquals("false", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      String string0 = contrailNetwork0.getExternal();
+      assertEquals("false", string0);
+      assertEquals("false", contrailNetwork0.getShared());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ContrailNetworkESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ContrailNetworkESTestscaffolding.java
new file mode 100644 (file)
index 0000000..125b3f4
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:28:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ContrailNetworkESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.ContrailNetwork"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ContrailNetworkESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.ContrailNetwork"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkErrorESTest.java
new file mode 100644 (file)
index 0000000..0f7b511
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:21:05 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateNetworkErrorESTest extends CreateNetworkErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      CreateNetworkError createNetworkError0 = new CreateNetworkError();
+      assertNull(createNetworkError0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL;
+      CreateNetworkError createNetworkError0 = new CreateNetworkError(".iOuG[TmaW", msoExceptionCategory0, false, "&j1e*8kgmi]:2n?(");
+      assertEquals("&j1e*8kgmi]:2n?(", createNetworkError0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      CreateNetworkError createNetworkError0 = new CreateNetworkError("");
+      assertNull(createNetworkError0.getCategory());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..50422e6
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:21:05 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateNetworkErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.CreateNetworkError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateNetworkErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.CreateNetworkError",
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.NetworkExceptionResponse",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateNetworkErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.nwrest.CreateNetworkError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequestESTest.java
new file mode 100644 (file)
index 0000000..eb99054
--- /dev/null
@@ -0,0 +1,356 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:05:55 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.Subnet;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateNetworkRequestESTest extends CreateNetworkRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setTenantId("gTN<#W#q}?BdTz");
+      String string0 = createNetworkRequest0.getTenantId();
+      assertEquals("gTN<#W#q}?BdTz", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      LinkedList<Subnet> linkedList0 = new LinkedList<Subnet>();
+      Subnet subnet0 = new Subnet();
+      linkedList0.add(0, subnet0);
+      createNetworkRequest0.setSubnets(linkedList0);
+      List<Subnet> list0 = createNetworkRequest0.getSubnets();
+      assertFalse(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork("", (List<Integer>) null);
+      createNetworkRequest0.setProviderVlanNetwork(providerVlanNetwork0);
+      ProviderVlanNetwork providerVlanNetwork1 = createNetworkRequest0.getProviderVlanNetwork();
+      assertSame(providerVlanNetwork1, providerVlanNetwork0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkTypeVersion("Zt;$+0,06");
+      String string0 = createNetworkRequest0.getNetworkTypeVersion();
+      assertEquals("Zt;$+0,06", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkTypeVersion("");
+      String string0 = createNetworkRequest0.getNetworkTypeVersion();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkType("+34spiczRb5|Z");
+      String string0 = createNetworkRequest0.getNetworkType();
+      assertEquals("+34spiczRb5|Z", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkType("");
+      String string0 = createNetworkRequest0.getNetworkType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkParams((Map<String, String>) null);
+      Map<String, String> map0 = createNetworkRequest0.getNetworkParams();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      createNetworkRequest0.setNetworkParams(hashMap0);
+      hashMap0.put("B]gM^ `p!", "Subnet [subnetName=");
+      Map<String, String> map0 = createNetworkRequest0.getNetworkParams();
+      assertEquals(1, map0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkName("5rW0L[ye %khIOB;(P");
+      String string0 = createNetworkRequest0.getNetworkName();
+      assertEquals("5rW0L[ye %khIOB;(P", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkName("");
+      String string0 = createNetworkRequest0.getNetworkName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkId("");
+      String string0 = createNetworkRequest0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setFailIfExists((Boolean) null);
+      Boolean boolean0 = createNetworkRequest0.getFailIfExists();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork((String) null, (String) null, (List<String>) null, (List<String>) null, (List<String>) null);
+      createNetworkRequest0.setContrailNetwork(contrailNetwork0);
+      ContrailNetwork contrailNetwork1 = createNetworkRequest0.getContrailNetwork();
+      assertNull(contrailNetwork1.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setCloudSiteId("5ISVyjyr^WpJF");
+      String string0 = createNetworkRequest0.getCloudSiteId();
+      assertEquals("5ISVyjyr^WpJF", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setCloudSiteId("");
+      String string0 = createNetworkRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setBackout((Boolean) null);
+      Boolean boolean0 = createNetworkRequest0.getBackout();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      Boolean boolean0 = createNetworkRequest0.getSkipAAI();
+      createNetworkRequest0.setBackout(boolean0);
+      Boolean boolean1 = createNetworkRequest0.getBackout();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      // Undeclared exception!
+      try { 
+        createNetworkRequest0.setNetworkTechnology("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.nwrest.NetworkTechnology.
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      String string0 = createNetworkRequest0.getNetworkType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      String string0 = createNetworkRequest0.getNetworkTechnology();
+      assertEquals("NEUTRON", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      Boolean boolean0 = createNetworkRequest0.getFailIfExists();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      ProviderVlanNetwork providerVlanNetwork0 = createNetworkRequest0.getProviderVlanNetwork();
+      assertNull(providerVlanNetwork0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      MsoRequest msoRequest0 = createNetworkRequest0.getMsoRequest();
+      assertNull(msoRequest0.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      String string0 = createNetworkRequest0.getNetworkName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      String string0 = createNetworkRequest0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      List<Subnet> list0 = createNetworkRequest0.getSubnets();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      String string0 = createNetworkRequest0.getNetworkTypeVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      boolean boolean0 = createNetworkRequest0.isContrailRequest();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      Map<String, String> map0 = createNetworkRequest0.getNetworkParams();
+      createNetworkRequest0.setNetworkParams(map0);
+      assertNull(createNetworkRequest0.getNetworkName());
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setTenantId("");
+      String string0 = createNetworkRequest0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      LinkedList<Subnet> linkedList0 = new LinkedList<Subnet>();
+      createNetworkRequest0.setSubnets(linkedList0);
+      List<Subnet> list0 = createNetworkRequest0.getSubnets();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      ContrailNetwork contrailNetwork0 = createNetworkRequest0.getContrailNetwork();
+      assertNull(contrailNetwork0);
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      Boolean boolean0 = Boolean.valueOf(true);
+      createNetworkRequest0.setFailIfExists(boolean0);
+      Boolean boolean1 = createNetworkRequest0.getFailIfExists();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      String string0 = createNetworkRequest0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      String string0 = createNetworkRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setNetworkId(", allocationPools=");
+      String string0 = createNetworkRequest0.getNetworkId();
+      assertEquals(", allocationPools=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test37()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      // Undeclared exception!
+      try { 
+        createNetworkRequest0.setNetworkTechnology((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test38()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      createNetworkRequest0.setMsoRequest((MsoRequest) null);
+      MsoRequest msoRequest0 = createNetworkRequest0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test39()  throws Throwable  {
+      CreateNetworkRequest createNetworkRequest0 = new CreateNetworkRequest();
+      Boolean boolean0 = createNetworkRequest0.getBackout();
+      assertTrue(boolean0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..d588344
--- /dev/null
@@ -0,0 +1,246 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:05:55 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateNetworkRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.CreateNetworkRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateNetworkRequestESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.map.JsonSerializableWithType",
+      "org.codehaus.jackson.map.HandlerInstantiator",
+      "org.codehaus.jackson.map.deser.StdDeserializerProvider",
+      "org.codehaus.jackson.map.SerializerFactory",
+      "org.codehaus.jackson.map.SerializerProvider",
+      "org.codehaus.jackson.map.type.TypeBindings",
+      "org.codehaus.jackson.map.SerializationConfig",
+      "org.codehaus.jackson.map.introspect.AnnotationMap",
+      "org.codehaus.jackson.JsonProcessingException",
+      "org.codehaus.jackson.map.introspect.Annotated",
+      "org.codehaus.jackson.io.InputDecorator",
+      "org.codehaus.jackson.map.Module",
+      "org.codehaus.jackson.map.util.Annotations",
+      "org.codehaus.jackson.map.type.TypeModifier",
+      "org.codehaus.jackson.sym.NameN",
+      "org.codehaus.jackson.JsonGenerator",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$1",
+      "org.codehaus.jackson.map.JsonSerializable",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.node.BaseJsonNode",
+      "org.codehaus.jackson.map.ObjectReader",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.map.DeserializerProvider",
+      "org.codehaus.jackson.node.ValueNode",
+      "org.codehaus.jackson.map.ser.BeanSerializerFactory",
+      "org.codehaus.jackson.map.JsonSerializer",
+      "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
+      "org.codehaus.jackson.map.AnnotationIntrospector",
+      "org.codehaus.jackson.map.MappingJsonFactory",
+      "org.codehaus.jackson.map.MapperConfig$Impl",
+      "org.codehaus.jackson.sym.Name1",
+      "org.codehaus.jackson.sym.Name2",
+      "org.openecomp.mso.openstack.beans.Subnet",
+      "org.codehaus.jackson.sym.Name3",
+      "org.codehaus.jackson.map.introspect.MethodFilter",
+      "org.codehaus.jackson.map.ser.StdSerializerProvider",
+      "org.codehaus.jackson.map.deser.StdDeserializationContext",
+      "org.codehaus.jackson.type.TypeReference",
+      "org.codehaus.jackson.map.ClassIntrospector",
+      "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
+      "org.codehaus.jackson.map.PropertyNamingStrategy$LowerCaseWithUnderscoresStrategy",
+      "org.codehaus.jackson.map.MapperConfig$ConfigFeature",
+      "org.codehaus.jackson.map.SerializationConfig$Feature",
+      "org.codehaus.jackson.Versioned",
+      "org.codehaus.jackson.io.IOContext",
+      "org.codehaus.jackson.map.type.TypeBase",
+      "org.codehaus.jackson.map.ser.BasicSerializerFactory",
+      "org.codehaus.jackson.map.PropertyNamingStrategy",
+      "org.codehaus.jackson.node.ContainerNode",
+      "org.codehaus.jackson.map.jsontype.NamedType",
+      "org.codehaus.jackson.map.ser.FilterProvider",
+      "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
+      "org.codehaus.jackson.map.DeserializationConfig",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.openecomp.mso.adapters.nwrest.NetworkRequestCommon",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.codehaus.jackson.impl.ReaderBasedParser",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
+      "org.codehaus.jackson.JsonEncoding",
+      "org.codehaus.jackson.map.type.MapLikeType",
+      "org.codehaus.jackson.map.JsonDeserializer",
+      "org.codehaus.jackson.map.PropertyNamingStrategy$PropertyNamingStrategyBase",
+      "org.codehaus.jackson.node.ObjectNode",
+      "org.codehaus.jackson.map.ser.std.SerializerBase",
+      "org.codehaus.jackson.map.type.CollectionLikeType",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
+      "org.codehaus.jackson.map.DeserializationConfig$Feature",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethodMap",
+      "org.codehaus.jackson.impl.JsonParserMinimalBase",
+      "org.codehaus.jackson.map.type.TypeParser",
+      "org.codehaus.jackson.map.introspect.POJOPropertiesCollector",
+      "org.codehaus.jackson.JsonParseException",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker",
+      "org.codehaus.jackson.map.introspect.AnnotatedField",
+      "org.codehaus.jackson.impl.JsonGeneratorBase",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.util.ByteArrayBuilder",
+      "org.codehaus.jackson.map.ser.impl.FailingSerializer",
+      "org.codehaus.jackson.PrettyPrinter",
+      "org.codehaus.jackson.JsonToken",
+      "org.codehaus.jackson.map.jsontype.SubtypeResolver",
+      "org.codehaus.jackson.map.type.SimpleType",
+      "org.codehaus.jackson.impl.Utf8Generator",
+      "org.codehaus.jackson.node.NumericNode",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
+      "org.codehaus.jackson.JsonNode",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.codehaus.jackson.map.ObjectWriter",
+      "org.codehaus.jackson.schema.SchemaAware",
+      "org.codehaus.jackson.io.OutputDecorator",
+      "org.openecomp.mso.adapters.nwrest.CreateNetworkRequest",
+      "org.codehaus.jackson.FormatSchema",
+      "org.codehaus.jackson.format.MatchStrength",
+      "org.codehaus.jackson.ObjectCodec",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethod",
+      "org.codehaus.jackson.JsonGenerationException",
+      "org.codehaus.jackson.format.InputAccessor",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.node.ArrayNode",
+      "org.codehaus.jackson.util.BufferRecycler",
+      "org.codehaus.jackson.io.SegmentedStringWriter",
+      "org.openecomp.mso.adapters.nwrest.NetworkTechnology",
+      "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
+      "org.codehaus.jackson.map.type.HierarchicType",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.map.BeanDescription",
+      "org.codehaus.jackson.JsonParser$1",
+      "org.codehaus.jackson.impl.WriterBasedGenerator",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.sym.Name",
+      "org.codehaus.jackson.Version",
+      "org.codehaus.jackson.io.CharacterEscapes",
+      "org.codehaus.jackson.map.introspect.BasicBeanDescription",
+      "org.codehaus.jackson.schema.JsonSchema",
+      "org.codehaus.jackson.util.TokenBuffer",
+      "org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion",
+      "org.codehaus.jackson.map.MappingIterator",
+      "org.codehaus.jackson.map.DeserializationContext",
+      "org.codehaus.jackson.map.ObjectMapper$DefaultTyping",
+      "org.codehaus.jackson.impl.JsonParserBase",
+      "org.codehaus.jackson.map.JsonMappingException",
+      "org.codehaus.jackson.map.introspect.AnnotatedMember",
+      "org.codehaus.jackson.node.JsonNodeFactory",
+      "org.codehaus.jackson.type.JavaType",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.annotate.JsonTypeInfo$As",
+      "org.codehaus.jackson.map.annotate.JsonRootName",
+      "org.codehaus.jackson.JsonParser",
+      "org.codehaus.jackson.node.NullNode",
+      "org.codehaus.jackson.map.InjectableValues",
+      "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.codehaus.jackson.node.TreeTraversingParser",
+      "org.codehaus.jackson.map.type.CollectionType",
+      "org.codehaus.jackson.map.MapperConfig",
+      "org.codehaus.jackson.map.Module$SetupContext",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$1",
+      "org.codehaus.jackson.io.UTF8Writer",
+      "org.openecomp.mso.adapters.nwrest.ContrailNetwork",
+      "org.codehaus.jackson.map.type.MapType",
+      "org.openecomp.mso.adapters.nwrest.ProviderVlanNetwork",
+      "org.codehaus.jackson.annotate.JsonAutoDetect",
+      "org.codehaus.jackson.map.type.ArrayType",
+      "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateNetworkRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.nwrest.NetworkTechnology",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponseESTest.java
new file mode 100644 (file)
index 0000000..f946c1e
--- /dev/null
@@ -0,0 +1,241 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:26:16 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateNetworkResponseESTest extends CreateNetworkResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      createNetworkResponse0.setSubnetMap(hashMap0);
+      Map<String, String> map0 = createNetworkResponse0.getSubnetMap();
+      assertTrue(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("", (String) null);
+      createNetworkResponse0.setSubnetMap(hashMap0);
+      Map<String, String> map0 = createNetworkResponse0.getSubnetMap();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      createNetworkResponse0.setRollback((NetworkRollback) null);
+      NetworkRollback networkRollback0 = createNetworkResponse0.getRollback();
+      assertNull(networkRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkCreated(true);
+      createNetworkResponse0.setRollback(networkRollback0);
+      NetworkRollback networkRollback1 = createNetworkResponse0.getRollback();
+      assertNull(networkRollback1.getNetworkName());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse("RmsrRU", "D=<", "D=<", "RmsrRU", boolean0, (Map<String, String>) null, networkRollback0, "0V");
+      String string0 = createNetworkResponse0.getNeutronNetworkId();
+      assertEquals("RmsrRU", createNetworkResponse0.getNetworkFqdn());
+      assertEquals("D=<", createNetworkResponse0.getNetworkStackId());
+      assertEquals("RmsrRU", createNetworkResponse0.getNetworkId());
+      assertEquals("D=<", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse("", "", "SouUi*E=\"K.O", "", boolean0, (Map<String, String>) null, networkRollback0, "");
+      String string0 = createNetworkResponse0.getNeutronNetworkId();
+      assertEquals("", createNetworkResponse0.getNetworkFqdn());
+      assertEquals("", string0);
+      assertEquals("", createNetworkResponse0.getNetworkId());
+      assertEquals("SouUi*E=\"K.O", createNetworkResponse0.getNetworkStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf(true);
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse("", "", "", "NetworkRollback [networkId=", boolean0, (Map<String, String>) null, (NetworkRollback) null, (String) null);
+      String string0 = createNetworkResponse0.getNetworkStackId();
+      assertEquals("", createNetworkResponse0.getNeutronNetworkId());
+      assertEquals("", createNetworkResponse0.getNetworkId());
+      assertNotNull(string0);
+      assertEquals("NetworkRollback [networkId=", createNetworkResponse0.getNetworkFqdn());
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf(", tenantId=");
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse(", tenantId=", "L", "L", ", tenantId=", boolean0, (Map<String, String>) hashMap0, networkRollback0, "o+oNP;9q:Yc_JWzxM");
+      String string0 = createNetworkResponse0.getNetworkId();
+      assertEquals("L", createNetworkResponse0.getNetworkStackId());
+      assertEquals(", tenantId=", string0);
+      assertEquals("L", createNetworkResponse0.getNeutronNetworkId());
+      assertEquals(", tenantId=", createNetworkResponse0.getNetworkFqdn());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf(true);
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse("", "", "", "NetworkRollback [networkId=", boolean0, (Map<String, String>) null, (NetworkRollback) null, (String) null);
+      String string0 = createNetworkResponse0.getNetworkId();
+      assertEquals("", createNetworkResponse0.getNetworkStackId());
+      assertNotNull(string0);
+      assertEquals("NetworkRollback [networkId=", createNetworkResponse0.getNetworkFqdn());
+      assertEquals("", string0);
+      assertEquals("", createNetworkResponse0.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      createNetworkResponse0.setNetworkFqdn(",E4f.8o)&~");
+      String string0 = createNetworkResponse0.getNetworkFqdn();
+      assertEquals(",E4f.8o)&~", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      createNetworkResponse0.setNetworkFqdn("");
+      String string0 = createNetworkResponse0.getNetworkFqdn();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      Boolean boolean0 = createNetworkResponse0.getNetworkCreated();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse("", "", "SouUi*E=\"K.O", "", boolean0, (Map<String, String>) null, networkRollback0, "");
+      createNetworkResponse0.getNetworkCreated();
+      assertEquals("", createNetworkResponse0.getNetworkFqdn());
+      assertEquals("", createNetworkResponse0.getNeutronNetworkId());
+      assertEquals("SouUi*E=\"K.O", createNetworkResponse0.getNetworkStackId());
+      assertEquals("", createNetworkResponse0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      String string0 = createNetworkResponse0.getNetworkStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      String string0 = createNetworkResponse0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      String string0 = createNetworkResponse0.getNetworkFqdn();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      createNetworkResponse0.setNetworkStackId("]xrJb:cD,G(|6B0(");
+      String string0 = createNetworkResponse0.getNetworkStackId();
+      assertEquals("]xrJb:cD,G(|6B0(", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      String string0 = createNetworkResponse0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf(true);
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse("", "", "", "NetworkRollback [networkId=", boolean0, (Map<String, String>) null, (NetworkRollback) null, (String) null);
+      createNetworkResponse0.getNetworkCreated();
+      assertEquals("NetworkRollback [networkId=", createNetworkResponse0.getNetworkFqdn());
+      assertEquals("", createNetworkResponse0.getNetworkStackId());
+      assertEquals("", createNetworkResponse0.getNetworkId());
+      assertEquals("", createNetworkResponse0.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      Map<String, String> map0 = createNetworkResponse0.getSubnetMap();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      NetworkRollback networkRollback0 = createNetworkResponse0.getRollback();
+      assertFalse(networkRollback0.getNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      createNetworkResponse0.setNetworkId("]xrJb:cD,G(|6B0(");
+      assertNull(createNetworkResponse0.getNetworkStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf(", tenantId=");
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse(", tenantId=", "L", "L", ", tenantId=", boolean0, (Map<String, String>) hashMap0, networkRollback0, "o+oNP;9q:Yc_JWzxM");
+      assertEquals("L", createNetworkResponse0.getNeutronNetworkId());
+      
+      createNetworkResponse0.setNeutronNetworkId(", tenantId=");
+      assertEquals(", tenantId=", createNetworkResponse0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CreateNetworkResponse createNetworkResponse0 = new CreateNetworkResponse();
+      Boolean boolean0 = Boolean.TRUE;
+      createNetworkResponse0.setNetworkCreated(boolean0);
+      assertNull(createNetworkResponse0.getNetworkStackId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..be0fbf8
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:26:16 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateNetworkResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.CreateNetworkResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateNetworkResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.openstack.beans.NetworkRollback",
+      "org.openecomp.mso.adapters.nwrest.CreateNetworkResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateNetworkResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkErrorESTest.java
new file mode 100644 (file)
index 0000000..ad5a65b
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:20:47 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteNetworkErrorESTest extends DeleteNetworkErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      DeleteNetworkError deleteNetworkError0 = new DeleteNetworkError("9X", msoExceptionCategory0, false, "ew9AjW>{Sk.");
+      assertEquals("9X", deleteNetworkError0.getMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      DeleteNetworkError deleteNetworkError0 = new DeleteNetworkError();
+      assertNull(deleteNetworkError0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      DeleteNetworkError deleteNetworkError0 = new DeleteNetworkError("9X");
+      assertNull(deleteNetworkError0.getCategory());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..5678816
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:20:47 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteNetworkErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.DeleteNetworkError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteNetworkErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.NetworkExceptionResponse",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.nwrest.DeleteNetworkError",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteNetworkErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.nwrest.DeleteNetworkError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequestESTest.java
new file mode 100644 (file)
index 0000000..67867b4
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:26:39 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteNetworkRequestESTest extends DeleteNetworkRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setTenantId("jaxb.formatted.output");
+      String string0 = deleteNetworkRequest0.getTenantId();
+      assertEquals("jaxb.formatted.output", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setNetworkType("v6GIJ");
+      String string0 = deleteNetworkRequest0.getNetworkType();
+      assertEquals("v6GIJ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setNetworkType("");
+      String string0 = deleteNetworkRequest0.getNetworkType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setNetworkStackId(":E:r|{0%c~Z5LYz0S8");
+      String string0 = deleteNetworkRequest0.getNetworkStackId();
+      assertEquals(":E:r|{0%c~Z5LYz0S8", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setNetworkStackId("");
+      String string0 = deleteNetworkRequest0.getNetworkStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setNetworkId("jaxb.formatted.output");
+      String string0 = deleteNetworkRequest0.getNetworkId();
+      assertEquals("jaxb.formatted.output", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setMsoRequest((MsoRequest) null);
+      MsoRequest msoRequest0 = deleteNetworkRequest0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setCloudSiteId("");
+      String string0 = deleteNetworkRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      String string0 = deleteNetworkRequest0.getNetworkStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      String string0 = deleteNetworkRequest0.getNetworkType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setNetworkId("");
+      String string0 = deleteNetworkRequest0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      String string0 = deleteNetworkRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setTenantId("");
+      String string0 = deleteNetworkRequest0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      String string0 = deleteNetworkRequest0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      String string0 = deleteNetworkRequest0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      deleteNetworkRequest0.setCloudSiteId("'+#+m");
+      String string0 = deleteNetworkRequest0.getCloudSiteId();
+      assertEquals("'+#+m", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      DeleteNetworkRequest deleteNetworkRequest0 = new DeleteNetworkRequest();
+      MsoRequest msoRequest0 = deleteNetworkRequest0.getMsoRequest();
+      deleteNetworkRequest0.setMsoRequest(msoRequest0);
+      assertTrue(deleteNetworkRequest0.isSynchronous());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..0dc2789
--- /dev/null
@@ -0,0 +1,99 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:26:39 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteNetworkRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.DeleteNetworkRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteNetworkRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.NetworkRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.nwrest.DeleteNetworkRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteNetworkRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponseESTest.java
new file mode 100644 (file)
index 0000000..ef93be5
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Thu Nov 10 15:50:13 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteNetworkResponseESTest extends DeleteNetworkResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      DeleteNetworkResponse deleteNetworkResponse0 = new DeleteNetworkResponse();
+      String string0 = deleteNetworkResponse0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf("!$j-,Qjk_");
+      DeleteNetworkResponse deleteNetworkResponse0 = new DeleteNetworkResponse("!$j-,Qjk_", boolean0, "!$j-,Qjk_");
+      String string0 = deleteNetworkResponse0.getNetworkId();
+      assertEquals("!$j-,Qjk_", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf("!$j-,Qjk_");
+      DeleteNetworkResponse deleteNetworkResponse0 = new DeleteNetworkResponse("!$j-,Qjk_", boolean0, "!$j-,Qjk_");
+      Boolean boolean1 = Boolean.TRUE;
+      deleteNetworkResponse0.setNetworkDeleted(boolean1);
+      Boolean boolean2 = deleteNetworkResponse0.getNetworkDeleted();
+      assertFalse(boolean2.equals((Object)boolean0));
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      DeleteNetworkResponse deleteNetworkResponse0 = new DeleteNetworkResponse("", boolean0, "");
+      String string0 = deleteNetworkResponse0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      DeleteNetworkResponse deleteNetworkResponse0 = new DeleteNetworkResponse("", boolean0, "");
+      Boolean boolean1 = deleteNetworkResponse0.getNetworkDeleted();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      DeleteNetworkResponse deleteNetworkResponse0 = new DeleteNetworkResponse("", boolean0, "");
+      deleteNetworkResponse0.setNetworkId("");
+      assertEquals("", deleteNetworkResponse0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      DeleteNetworkResponse deleteNetworkResponse0 = new DeleteNetworkResponse();
+      Boolean boolean0 = deleteNetworkResponse0.getNetworkDeleted();
+      assertNull(boolean0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..7c89224
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Thu Nov 10 15:50:13 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteNetworkResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.DeleteNetworkResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteNetworkResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.DeleteNetworkResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteNetworkResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponseESTest.java
new file mode 100644 (file)
index 0000000..3f23287
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:19:39 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkExceptionResponseESTest extends NetworkExceptionResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse("('zix", msoExceptionCategory0, true, "3)w4.");
+      Boolean boolean0 = networkExceptionResponse0.getRolledBack();
+      assertEquals("('zix", networkExceptionResponse0.getMessage());
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL;
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse("9L(TNeou", msoExceptionCategory0, false, "9L(TNeou");
+      Boolean boolean0 = networkExceptionResponse0.getRolledBack();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse("");
+      String string0 = networkExceptionResponse0.getMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      networkExceptionResponse0.setCategory(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = networkExceptionResponse0.getCategory();
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse();
+      Boolean boolean0 = networkExceptionResponse0.getRolledBack();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse("");
+      networkExceptionResponse0.getCategory();
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse();
+      networkExceptionResponse0.setMessage("USERDATA");
+      String string0 = networkExceptionResponse0.getMessage();
+      assertEquals("USERDATA", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse();
+      networkExceptionResponse0.setRolledBack((Boolean) null);
+      assertNull(networkExceptionResponse0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      NetworkExceptionResponse networkExceptionResponse0 = new NetworkExceptionResponse();
+      String string0 = networkExceptionResponse0.getMessage();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8cc1364
--- /dev/null
@@ -0,0 +1,96 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:19:39 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class NetworkExceptionResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.NetworkExceptionResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkExceptionResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.NetworkExceptionResponse",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(NetworkExceptionResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetworkESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetworkESTest.java
new file mode 100644 (file)
index 0000000..871683a
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:29:16 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ProviderVlanNetworkESTest extends ProviderVlanNetworkESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork();
+      List<Integer> list0 = providerVlanNetwork0.getVlans();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      Integer integer0 = new Integer((-1244));
+      linkedList0.add(integer0);
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork("PF?v'FLs", (List<Integer>) linkedList0);
+      List<Integer> list0 = providerVlanNetwork0.getVlans();
+      assertEquals(1, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork();
+      String string0 = providerVlanNetwork0.getPhysicalNetworkName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork("I;{", (List<Integer>) null);
+      String string0 = providerVlanNetwork0.getPhysicalNetworkName();
+      assertEquals("I;{", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork("I;{", (List<Integer>) null);
+      providerVlanNetwork0.setPhysicalNetworkName("h8H");
+      assertEquals("h8H", providerVlanNetwork0.getPhysicalNetworkName());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork("", (List<Integer>) linkedList0);
+      String string0 = providerVlanNetwork0.getPhysicalNetworkName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork();
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      providerVlanNetwork0.setVlans(linkedList0);
+      assertEquals(0, linkedList0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork("3UmMF;h", (List<Integer>) linkedList0);
+      List<Integer> list0 = providerVlanNetwork0.getVlans();
+      assertTrue(list0.isEmpty());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetworkESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetworkESTestscaffolding.java
new file mode 100644 (file)
index 0000000..93149f6
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:29:16 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ProviderVlanNetworkESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.ProviderVlanNetwork"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ProviderVlanNetworkESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.ProviderVlanNetwork"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkErrorESTest.java
new file mode 100644 (file)
index 0000000..645d506
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:17:33 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryNetworkErrorESTest extends QueryNetworkErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      QueryNetworkError queryNetworkError0 = new QueryNetworkError();
+      assertNull(queryNetworkError0.getMessage());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..700d2aa
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:17:33 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class QueryNetworkErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.QueryNetworkError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryNetworkErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.NetworkExceptionResponse",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.openecomp.mso.adapters.nwrest.QueryNetworkError"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryNetworkErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.nwrest.QueryNetworkError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponseESTest.java
new file mode 100644 (file)
index 0000000..be18fcc
--- /dev/null
@@ -0,0 +1,296 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:16:38 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.openstack.beans.NetworkStatus;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryNetworkResponseESTest extends QueryNetworkResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.DOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse("'Y=Kq<f!!gJ{1Q6v", "", "", networkStatus0, (Map<String, String>) hashMap0);
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      queryNetworkResponse0.setVlans(linkedList0);
+      queryNetworkResponse0.getVlans();
+      assertEquals("", queryNetworkResponse0.getNetworkStackId());
+      assertEquals("'Y=Kq<f!!gJ{1Q6v", queryNetworkResponse0.getNetworkId());
+      assertEquals("", queryNetworkResponse0.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      Integer integer0 = new Integer(1256);
+      linkedList0.add(integer0);
+      queryNetworkResponse0.setVlans(linkedList0);
+      List<Integer> list0 = queryNetworkResponse0.getVlans();
+      assertFalse(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.UNKNOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse(" v7FX_$8q *", "\7f~MSM=Lj 78BbfMF4", " v7FX_$8q *", networkStatus0, (Map<String, String>) hashMap0);
+      queryNetworkResponse0.setSubnetIdMap(hashMap0);
+      queryNetworkResponse0.getSubnetIdMap();
+      assertEquals(" v7FX_$8q *", queryNetworkResponse0.getNetworkId());
+      assertEquals("\7f~MSM=Lj 78BbfMF4", queryNetworkResponse0.getNeutronNetworkId());
+      assertEquals(" v7FX_$8q *", queryNetworkResponse0.getNetworkStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.UNKNOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse("6+6JBO^tv]?e;D6`Hh", "+QU\"j=Jt>;9w<w[9~c.", "6+6JBO^tv]?e;D6`Hh", networkStatus0, (Map<String, String>) hashMap0);
+      queryNetworkResponse0.setSubnetIdMap(hashMap0);
+      hashMap0.put((String) null, (String) null);
+      queryNetworkResponse0.getSubnetIdMap();
+      assertEquals("6+6JBO^tv]?e;D6`Hh", queryNetworkResponse0.getNetworkId());
+      assertEquals("6+6JBO^tv]?e;D6`Hh", queryNetworkResponse0.getNetworkStackId());
+      assertEquals("+QU\"j=Jt>;9w<w[9~c.", queryNetworkResponse0.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      linkedList0.push("s<z*H=#g");
+      queryNetworkResponse0.setRouteTargets(linkedList0);
+      List<String> list0 = queryNetworkResponse0.getRouteTargets();
+      assertFalse(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.UNKNOWN;
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse("", "ACTIVE", "ACTIVE", networkStatus0, (Map<String, String>) null);
+      String string0 = queryNetworkResponse0.getNeutronNetworkId();
+      assertEquals("", queryNetworkResponse0.getNetworkId());
+      assertEquals("ACTIVE", queryNetworkResponse0.getNetworkStackId());
+      assertEquals("ACTIVE", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.DOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse("'Y=Kq<f!!gJ{1Q6v", "", "", networkStatus0, (Map<String, String>) hashMap0);
+      String string0 = queryNetworkResponse0.getNeutronNetworkId();
+      assertEquals("", string0);
+      assertEquals("", queryNetworkResponse0.getNetworkStackId());
+      assertEquals("'Y=Kq<f!!gJ{1Q6v", queryNetworkResponse0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.UNKNOWN;
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse("ZLW;0Nz", "ZLW;0Nz", "ZLW;0Nz", networkStatus0, (Map<String, String>) null);
+      String string0 = queryNetworkResponse0.getNetworkStackId();
+      assertEquals("ZLW;0Nz", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.DOWN;
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse("", "", "", networkStatus0, (Map<String, String>) null);
+      String string0 = queryNetworkResponse0.getNetworkStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.UNKNOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse(" v7FX_$8q *", "\7f~MSM=Lj 78BbfMF4", " v7FX_$8q *", networkStatus0, (Map<String, String>) hashMap0);
+      queryNetworkResponse0.getNetworkOutputs();
+      assertEquals("\7f~MSM=Lj 78BbfMF4", queryNetworkResponse0.getNeutronNetworkId());
+      assertEquals(" v7FX_$8q *", queryNetworkResponse0.getNetworkStackId());
+      assertEquals(" v7FX_$8q *", queryNetworkResponse0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.UNKNOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse("6+6JBO^tv]?e;D6`Hh", "+QU\"j=Jt>;9w<w[9~c.", "6+6JBO^tv]?e;D6`Hh", networkStatus0, (Map<String, String>) hashMap0);
+      hashMap0.put((String) null, (String) null);
+      queryNetworkResponse0.getNetworkOutputs();
+      assertEquals("6+6JBO^tv]?e;D6`Hh", queryNetworkResponse0.getNetworkId());
+      assertEquals("+QU\"j=Jt>;9w<w[9~c.", queryNetworkResponse0.getNeutronNetworkId());
+      assertEquals("6+6JBO^tv]?e;D6`Hh", queryNetworkResponse0.getNetworkStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      queryNetworkResponse0.setNetworkId("");
+      String string0 = queryNetworkResponse0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      Boolean boolean0 = new Boolean(false);
+      queryNetworkResponse0.setNetworkExists(boolean0);
+      Boolean boolean1 = queryNetworkResponse0.getNetworkExists();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      queryNetworkResponse0.setNeutronNetworkId("org.openecomp.mso.openstack.beans.NetworkStatus");
+      assertNull(queryNetworkResponse0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      String string0 = queryNetworkResponse0.getNetworkStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      Boolean boolean0 = queryNetworkResponse0.getNetworkExists();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      Map<String, String> map0 = queryNetworkResponse0.getSubnetIdMap();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      // Undeclared exception!
+      try { 
+        queryNetworkResponse0.toJsonString();
+        fail("Expecting exception: VerifyError");
+      
+      } catch(VerifyError e) {
+         //
+         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
+         //
+         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      Map<String, String> map0 = queryNetworkResponse0.getNetworkOutputs();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      List<Integer> list0 = queryNetworkResponse0.getVlans();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      NetworkStatus networkStatus0 = NetworkStatus.DOWN;
+      queryNetworkResponse0.setNetworkStatus(networkStatus0);
+      NetworkStatus networkStatus1 = queryNetworkResponse0.getNetworkStatus();
+      assertEquals(NetworkStatus.DOWN, networkStatus1);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      List<String> list0 = queryNetworkResponse0.getRouteTargets();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      String string0 = queryNetworkResponse0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      Boolean boolean0 = Boolean.TRUE;
+      queryNetworkResponse0.setNetworkExists(boolean0);
+      Boolean boolean1 = queryNetworkResponse0.getNetworkExists();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      queryNetworkResponse0.setNetworkStackId((String) null);
+      assertNull(queryNetworkResponse0.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      String string0 = queryNetworkResponse0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      queryNetworkResponse0.setNetworkOutputs((Map<String, String>) null);
+      assertNull(queryNetworkResponse0.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      queryNetworkResponse0.getNetworkStatus();
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse();
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      queryNetworkResponse0.setRouteTargets(linkedList0);
+      List<String> list0 = queryNetworkResponse0.getRouteTargets();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.ERROR;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryNetworkResponse queryNetworkResponse0 = new QueryNetworkResponse("Cm6LuDyY", "Cm6LuDyY", "O5]9 [Se?X,q", networkStatus0, (Map<String, String>) hashMap0);
+      String string0 = queryNetworkResponse0.getNetworkId();
+      assertEquals("Cm6LuDyY", string0);
+      assertEquals("O5]9 [Se?X,q", queryNetworkResponse0.getNetworkStackId());
+      assertEquals("Cm6LuDyY", queryNetworkResponse0.getNeutronNetworkId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..9f554d3
--- /dev/null
@@ -0,0 +1,194 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:16:38 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class QueryNetworkResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.QueryNetworkResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryNetworkResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.map.JsonSerializableWithType",
+      "org.codehaus.jackson.map.deser.StdDeserializerProvider",
+      "org.codehaus.jackson.map.SerializerFactory",
+      "org.codehaus.jackson.map.SerializerProvider",
+      "org.codehaus.jackson.map.SerializationConfig",
+      "org.codehaus.jackson.JsonProcessingException",
+      "org.codehaus.jackson.map.introspect.AnnotationMap",
+      "org.codehaus.jackson.map.introspect.Annotated",
+      "org.codehaus.jackson.map.util.Annotations",
+      "org.codehaus.jackson.sym.NameN",
+      "org.codehaus.jackson.JsonGenerator",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
+      "org.openecomp.mso.adapters.nwrest.QueryNetworkResponse",
+      "org.codehaus.jackson.map.JsonSerializable",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.node.BaseJsonNode",
+      "org.codehaus.jackson.map.DeserializerProvider",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.node.ValueNode",
+      "org.codehaus.jackson.map.ser.BeanSerializerFactory",
+      "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
+      "org.codehaus.jackson.map.AnnotationIntrospector",
+      "org.codehaus.jackson.map.MappingJsonFactory",
+      "org.codehaus.jackson.map.MapperConfig$Impl",
+      "org.codehaus.jackson.sym.Name1",
+      "org.codehaus.jackson.sym.Name2",
+      "org.codehaus.jackson.sym.Name3",
+      "org.codehaus.jackson.map.introspect.MethodFilter",
+      "org.codehaus.jackson.map.ser.StdSerializerProvider",
+      "org.codehaus.jackson.map.deser.StdDeserializationContext",
+      "org.codehaus.jackson.map.ClassIntrospector",
+      "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
+      "org.codehaus.jackson.Versioned",
+      "org.codehaus.jackson.map.type.TypeBase",
+      "org.codehaus.jackson.map.ser.BasicSerializerFactory",
+      "org.codehaus.jackson.node.ContainerNode",
+      "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
+      "org.codehaus.jackson.map.DeserializationConfig",
+      "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.codehaus.jackson.impl.ReaderBasedParser",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
+      "org.codehaus.jackson.map.type.MapLikeType",
+      "org.codehaus.jackson.node.ObjectNode",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
+      "org.codehaus.jackson.map.type.CollectionLikeType",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
+      "org.codehaus.jackson.impl.JsonParserMinimalBase",
+      "org.codehaus.jackson.map.type.TypeParser",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker",
+      "org.codehaus.jackson.map.introspect.AnnotatedField",
+      "org.codehaus.jackson.impl.JsonGeneratorBase",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.util.ByteArrayBuilder",
+      "org.codehaus.jackson.PrettyPrinter",
+      "org.codehaus.jackson.map.jsontype.SubtypeResolver",
+      "org.codehaus.jackson.map.type.SimpleType",
+      "org.openecomp.mso.openstack.beans.NetworkStatus",
+      "org.codehaus.jackson.map.util.StdDateFormat",
+      "org.codehaus.jackson.impl.Utf8Generator",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
+      "org.codehaus.jackson.JsonNode",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.codehaus.jackson.ObjectCodec",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethod",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.node.ArrayNode",
+      "org.codehaus.jackson.io.SegmentedStringWriter",
+      "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.map.BeanDescription",
+      "org.codehaus.jackson.impl.WriterBasedGenerator",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.sym.Name",
+      "org.codehaus.jackson.map.introspect.BasicBeanDescription",
+      "org.codehaus.jackson.util.TokenBuffer",
+      "org.codehaus.jackson.map.DeserializationContext",
+      "org.codehaus.jackson.impl.JsonParserBase",
+      "org.codehaus.jackson.map.JsonMappingException",
+      "org.codehaus.jackson.map.introspect.AnnotatedMember",
+      "org.codehaus.jackson.type.JavaType",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.JsonParser",
+      "org.codehaus.jackson.node.NullNode",
+      "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
+      "org.codehaus.jackson.node.TreeTraversingParser",
+      "org.codehaus.jackson.map.type.CollectionType",
+      "org.codehaus.jackson.map.MapperConfig",
+      "org.codehaus.jackson.map.Module$SetupContext",
+      "org.codehaus.jackson.io.UTF8Writer",
+      "org.codehaus.jackson.map.type.MapType",
+      "org.codehaus.jackson.annotate.JsonAutoDetect",
+      "org.codehaus.jackson.map.type.ArrayType",
+      "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryNetworkResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkErrorESTest.java
new file mode 100644 (file)
index 0000000..5880bdb
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:27:07 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackNetworkErrorESTest extends RollbackNetworkErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.USERDATA;
+      RollbackNetworkError rollbackNetworkError0 = new RollbackNetworkError("$/e2Fa;", msoExceptionCategory0, false, "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory");
+      assertEquals("$/e2Fa;", rollbackNetworkError0.getMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RollbackNetworkError rollbackNetworkError0 = new RollbackNetworkError();
+      assertNull(rollbackNetworkError0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackNetworkError rollbackNetworkError0 = new RollbackNetworkError("6.4B5l)6k@i\7fZM");
+      assertNull(rollbackNetworkError0.getCategory());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..647a917
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:27:07 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackNetworkErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.RollbackNetworkError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackNetworkErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.RollbackNetworkError",
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.NetworkExceptionResponse",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackNetworkErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.nwrest.RollbackNetworkError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequestESTest.java
new file mode 100644 (file)
index 0000000..255a18e
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:15:37 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackNetworkRequestESTest extends RollbackNetworkRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackNetworkRequest rollbackNetworkRequest0 = new RollbackNetworkRequest();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      rollbackNetworkRequest0.setNetworkRollback(networkRollback0);
+      networkRollback0.setNetworkCreated(true);
+      NetworkRollback networkRollback1 = rollbackNetworkRequest0.getNetworkRollback();
+      assertNull(networkRollback1.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RollbackNetworkRequest rollbackNetworkRequest0 = new RollbackNetworkRequest();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      rollbackNetworkRequest0.setNetworkRollback(networkRollback0);
+      NetworkRollback networkRollback1 = rollbackNetworkRequest0.getNetworkRollback();
+      assertNull(networkRollback1.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackNetworkRequest rollbackNetworkRequest0 = new RollbackNetworkRequest();
+      NetworkRollback networkRollback0 = rollbackNetworkRequest0.getNetworkRollback();
+      assertNull(networkRollback0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..3290c92
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:15:37 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackNetworkRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.RollbackNetworkRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackNetworkRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.NetworkRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.nwrest.RollbackNetworkRequest",
+      "org.openecomp.mso.openstack.beans.NetworkRollback",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackNetworkRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponseESTest.java
new file mode 100644 (file)
index 0000000..ba571a1
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:20:37 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackNetworkResponseESTest extends RollbackNetworkResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      Boolean boolean0 = Boolean.TRUE;
+      RollbackNetworkResponse rollbackNetworkResponse0 = new RollbackNetworkResponse(boolean0, "");
+      Boolean boolean1 = rollbackNetworkResponse0.getNetworkRolledBack();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      Boolean boolean0 = Boolean.TRUE;
+      RollbackNetworkResponse rollbackNetworkResponse0 = new RollbackNetworkResponse(boolean0, "");
+      Boolean boolean1 = new Boolean("");
+      rollbackNetworkResponse0.setNetworkRolledBack(boolean1);
+      Boolean boolean2 = rollbackNetworkResponse0.getNetworkRolledBack();
+      assertFalse(boolean2);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackNetworkResponse rollbackNetworkResponse0 = new RollbackNetworkResponse();
+      Boolean boolean0 = rollbackNetworkResponse0.getNetworkRolledBack();
+      assertNull(boolean0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..7efb29e
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:20:37 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackNetworkResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.RollbackNetworkResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackNetworkResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.RollbackNetworkResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackNetworkResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkErrorESTest.java
new file mode 100644 (file)
index 0000000..4f24306
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:22:12 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateNetworkErrorESTest extends UpdateNetworkErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      UpdateNetworkError updateNetworkError0 = new UpdateNetworkError();
+      assertNull(updateNetworkError0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      UpdateNetworkError updateNetworkError0 = new UpdateNetworkError("");
+      assertNull(updateNetworkError0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      UpdateNetworkError updateNetworkError0 = new UpdateNetworkError("", msoExceptionCategory0, false, "");
+      assertEquals("", updateNetworkError0.getMessage());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..91bae26
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:22:12 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateNetworkErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.UpdateNetworkError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateNetworkErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.nwrest.UpdateNetworkError",
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.NetworkExceptionResponse",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UpdateNetworkErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.nwrest.UpdateNetworkError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTest.java
new file mode 100644 (file)
index 0000000..f7703d5
--- /dev/null
@@ -0,0 +1,353 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:13:39 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.Subnet;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateNetworkRequestESTest extends UpdateNetworkRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkTechnology("NEUTRON");
+      assertNull(updateNetworkRequest0.getNetworkStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setTenantId("");
+      String string0 = updateNetworkRequest0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      LinkedList<Subnet> linkedList0 = new LinkedList<Subnet>();
+      Subnet subnet0 = new Subnet();
+      linkedList0.addLast(subnet0);
+      updateNetworkRequest0.setSubnets(linkedList0);
+      List<Subnet> list0 = updateNetworkRequest0.getSubnets();
+      assertEquals(1, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork("NEUTRON", (List<Integer>) linkedList0);
+      updateNetworkRequest0.setProviderVlanNetwork(providerVlanNetwork0);
+      ProviderVlanNetwork providerVlanNetwork1 = updateNetworkRequest0.getProviderVlanNetwork();
+      assertSame(providerVlanNetwork1, providerVlanNetwork0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkTypeVersion("$7/{y&^~o(,9x11)BHX");
+      String string0 = updateNetworkRequest0.getNetworkTypeVersion();
+      assertEquals("$7/{y&^~o(,9x11)BHX", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkTypeVersion("");
+      String string0 = updateNetworkRequest0.getNetworkTypeVersion();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkType("IW4N;?_XL%q;");
+      String string0 = updateNetworkRequest0.getNetworkType();
+      assertEquals("IW4N;?_XL%q;", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkStackId("Allocation_pool [start=");
+      String string0 = updateNetworkRequest0.getNetworkStackId();
+      assertEquals("Allocation_pool [start=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkStackId("");
+      String string0 = updateNetworkRequest0.getNetworkStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("", "");
+      updateNetworkRequest0.setNetworkParams(hashMap0);
+      Map<String, String> map0 = updateNetworkRequest0.getNetworkParams();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkName("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateNetworkRequest>\n    <skipAAI>false</skipAAI>\n    <backout>true</backout>\n    <msoRequest/>\n    <networkParams/>\n    <networkTechnology>NEUTRON</networkTechnology>\n</updateNetworkRequest>\n");
+      String string0 = updateNetworkRequest0.getNetworkName();
+      assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateNetworkRequest>\n    <skipAAI>false</skipAAI>\n    <backout>true</backout>\n    <msoRequest/>\n    <networkParams/>\n    <networkTechnology>NEUTRON</networkTechnology>\n</updateNetworkRequest>\n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkName("");
+      String string0 = updateNetworkRequest0.getNetworkName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkId("");
+      String string0 = updateNetworkRequest0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setMsoRequest((MsoRequest) null);
+      MsoRequest msoRequest0 = updateNetworkRequest0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      ContrailNetwork contrailNetwork0 = new ContrailNetwork();
+      updateNetworkRequest0.setContrailNetwork(contrailNetwork0);
+      ContrailNetwork contrailNetwork1 = updateNetworkRequest0.getContrailNetwork();
+      assertEquals("false", contrailNetwork1.getShared());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setCloudSiteId("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateNetworkRequest>\n    <skipAAI>false</skipAAI>\n    <backout>true</backout>\n    <msoRequest>\n        <requestId></requestId>\n        <serviceInstanceId></serviceInstanceId>\n    </msoRequest>\n    <networkParams/>\n    <networkTechnology>NEUTRON</networkTechnology>\n</updateNetworkRequest>\n");
+      String string0 = updateNetworkRequest0.getCloudSiteId();
+      assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateNetworkRequest>\n    <skipAAI>false</skipAAI>\n    <backout>true</backout>\n    <msoRequest>\n        <requestId></requestId>\n        <serviceInstanceId></serviceInstanceId>\n    </msoRequest>\n    <networkParams/>\n    <networkTechnology>NEUTRON</networkTechnology>\n</updateNetworkRequest>\n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setBackout((Boolean) null);
+      Boolean boolean0 = updateNetworkRequest0.getBackout();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      Boolean boolean0 = Boolean.valueOf(false);
+      updateNetworkRequest0.setBackout(boolean0);
+      Boolean boolean1 = updateNetworkRequest0.getBackout();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      // Undeclared exception!
+      try { 
+        updateNetworkRequest0.setNetworkTechnology((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.adapters.nwrest.UpdateNetworkRequest", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      ContrailNetwork contrailNetwork0 = updateNetworkRequest0.getContrailNetwork();
+      assertNull(contrailNetwork0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      List<Subnet> list0 = updateNetworkRequest0.getSubnets();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      Boolean boolean0 = updateNetworkRequest0.getBackout();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      String string0 = updateNetworkRequest0.getNetworkType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      String string0 = updateNetworkRequest0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      MsoRequest msoRequest0 = updateNetworkRequest0.getMsoRequest();
+      assertNull(msoRequest0.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      String string0 = updateNetworkRequest0.getNetworkName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      String string0 = updateNetworkRequest0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      Map<String, String> map0 = updateNetworkRequest0.getNetworkParams();
+      assertEquals(0, map0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      ProviderVlanNetwork providerVlanNetwork0 = updateNetworkRequest0.getProviderVlanNetwork();
+      assertNull(providerVlanNetwork0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      String string0 = updateNetworkRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      String string0 = updateNetworkRequest0.getNetworkTechnology();
+      assertEquals("NEUTRON", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      String string0 = updateNetworkRequest0.getNetworkTypeVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      String string0 = updateNetworkRequest0.getNetworkStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      boolean boolean0 = updateNetworkRequest0.isContrailRequest();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkId("}!c9td^-G>0|Ac");
+      String string0 = updateNetworkRequest0.getNetworkId();
+      assertEquals("}!c9td^-G>0|Ac", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      LinkedList<Subnet> linkedList0 = new LinkedList<Subnet>();
+      updateNetworkRequest0.setSubnets(linkedList0);
+      List<Subnet> list0 = updateNetworkRequest0.getSubnets();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkTechnology("X$XC7&D7JVmMj3FS.");
+      assertTrue(updateNetworkRequest0.isSynchronous());
+  }
+
+  @Test(timeout = 4000)
+  public void test37()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setCloudSiteId("");
+      String string0 = updateNetworkRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test38()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setTenantId("X$XC7&D7JVmMj3FS.");
+      String string0 = updateNetworkRequest0.getTenantId();
+      assertEquals("X$XC7&D7JVmMj3FS.", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test39()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkParams((Map<String, String>) null);
+      Map<String, String> map0 = updateNetworkRequest0.getNetworkParams();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test40()  throws Throwable  {
+      UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest();
+      updateNetworkRequest0.setNetworkType("");
+      String string0 = updateNetworkRequest0.getNetworkType();
+      assertEquals("", string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..0965197
--- /dev/null
@@ -0,0 +1,246 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:13:39 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateNetworkRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.UpdateNetworkRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateNetworkRequestESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.map.JsonSerializableWithType",
+      "org.codehaus.jackson.map.HandlerInstantiator",
+      "org.codehaus.jackson.map.deser.StdDeserializerProvider",
+      "org.codehaus.jackson.map.SerializerFactory",
+      "org.codehaus.jackson.map.SerializerProvider",
+      "org.codehaus.jackson.map.type.TypeBindings",
+      "org.codehaus.jackson.map.SerializationConfig",
+      "org.codehaus.jackson.map.introspect.AnnotationMap",
+      "org.codehaus.jackson.JsonProcessingException",
+      "org.codehaus.jackson.map.introspect.Annotated",
+      "org.codehaus.jackson.io.InputDecorator",
+      "org.codehaus.jackson.map.Module",
+      "org.codehaus.jackson.map.util.Annotations",
+      "org.codehaus.jackson.map.type.TypeModifier",
+      "org.codehaus.jackson.sym.NameN",
+      "org.codehaus.jackson.JsonGenerator",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$1",
+      "org.codehaus.jackson.map.JsonSerializable",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.node.BaseJsonNode",
+      "org.codehaus.jackson.map.ObjectReader",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.map.DeserializerProvider",
+      "org.codehaus.jackson.node.ValueNode",
+      "org.codehaus.jackson.map.ser.BeanSerializerFactory",
+      "org.codehaus.jackson.map.JsonSerializer",
+      "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
+      "org.codehaus.jackson.map.AnnotationIntrospector",
+      "org.codehaus.jackson.map.MappingJsonFactory",
+      "org.codehaus.jackson.map.MapperConfig$Impl",
+      "org.codehaus.jackson.sym.Name1",
+      "org.codehaus.jackson.sym.Name2",
+      "org.openecomp.mso.openstack.beans.Subnet",
+      "org.codehaus.jackson.sym.Name3",
+      "org.codehaus.jackson.map.introspect.MethodFilter",
+      "org.codehaus.jackson.map.ser.StdSerializerProvider",
+      "org.codehaus.jackson.map.deser.StdDeserializationContext",
+      "org.codehaus.jackson.type.TypeReference",
+      "org.codehaus.jackson.map.ClassIntrospector",
+      "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
+      "org.codehaus.jackson.map.PropertyNamingStrategy$LowerCaseWithUnderscoresStrategy",
+      "org.codehaus.jackson.map.MapperConfig$ConfigFeature",
+      "org.codehaus.jackson.map.SerializationConfig$Feature",
+      "org.codehaus.jackson.Versioned",
+      "org.codehaus.jackson.io.IOContext",
+      "org.codehaus.jackson.map.type.TypeBase",
+      "org.codehaus.jackson.map.ser.BasicSerializerFactory",
+      "org.codehaus.jackson.map.PropertyNamingStrategy",
+      "org.codehaus.jackson.node.ContainerNode",
+      "org.codehaus.jackson.map.jsontype.NamedType",
+      "org.codehaus.jackson.map.ser.FilterProvider",
+      "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
+      "org.codehaus.jackson.map.DeserializationConfig",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.openecomp.mso.adapters.nwrest.NetworkRequestCommon",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.codehaus.jackson.impl.ReaderBasedParser",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
+      "org.codehaus.jackson.JsonEncoding",
+      "org.codehaus.jackson.map.type.MapLikeType",
+      "org.codehaus.jackson.map.JsonDeserializer",
+      "org.codehaus.jackson.map.PropertyNamingStrategy$PropertyNamingStrategyBase",
+      "org.codehaus.jackson.node.ObjectNode",
+      "org.codehaus.jackson.map.ser.std.SerializerBase",
+      "org.codehaus.jackson.map.type.CollectionLikeType",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
+      "org.codehaus.jackson.map.DeserializationConfig$Feature",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethodMap",
+      "org.codehaus.jackson.impl.JsonParserMinimalBase",
+      "org.codehaus.jackson.map.type.TypeParser",
+      "org.codehaus.jackson.map.introspect.POJOPropertiesCollector",
+      "org.codehaus.jackson.JsonParseException",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker",
+      "org.codehaus.jackson.map.introspect.AnnotatedField",
+      "org.codehaus.jackson.impl.JsonGeneratorBase",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.util.ByteArrayBuilder",
+      "org.codehaus.jackson.map.ser.impl.FailingSerializer",
+      "org.codehaus.jackson.PrettyPrinter",
+      "org.codehaus.jackson.JsonToken",
+      "org.codehaus.jackson.map.jsontype.SubtypeResolver",
+      "org.codehaus.jackson.map.type.SimpleType",
+      "org.codehaus.jackson.impl.Utf8Generator",
+      "org.codehaus.jackson.node.NumericNode",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
+      "org.codehaus.jackson.JsonNode",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.codehaus.jackson.map.ObjectWriter",
+      "org.codehaus.jackson.schema.SchemaAware",
+      "org.codehaus.jackson.io.OutputDecorator",
+      "org.codehaus.jackson.FormatSchema",
+      "org.codehaus.jackson.format.MatchStrength",
+      "org.codehaus.jackson.ObjectCodec",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethod",
+      "org.codehaus.jackson.JsonGenerationException",
+      "org.codehaus.jackson.format.InputAccessor",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.node.ArrayNode",
+      "org.codehaus.jackson.util.BufferRecycler",
+      "org.codehaus.jackson.io.SegmentedStringWriter",
+      "org.openecomp.mso.adapters.nwrest.NetworkTechnology",
+      "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
+      "org.codehaus.jackson.map.type.HierarchicType",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.map.BeanDescription",
+      "org.codehaus.jackson.JsonParser$1",
+      "org.codehaus.jackson.impl.WriterBasedGenerator",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.sym.Name",
+      "org.codehaus.jackson.Version",
+      "org.codehaus.jackson.io.CharacterEscapes",
+      "org.codehaus.jackson.map.introspect.BasicBeanDescription",
+      "org.codehaus.jackson.schema.JsonSchema",
+      "org.codehaus.jackson.util.TokenBuffer",
+      "org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion",
+      "org.codehaus.jackson.map.MappingIterator",
+      "org.codehaus.jackson.map.DeserializationContext",
+      "org.codehaus.jackson.map.ObjectMapper$DefaultTyping",
+      "org.codehaus.jackson.impl.JsonParserBase",
+      "org.codehaus.jackson.map.JsonMappingException",
+      "org.codehaus.jackson.map.introspect.AnnotatedMember",
+      "org.codehaus.jackson.node.JsonNodeFactory",
+      "org.codehaus.jackson.type.JavaType",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.annotate.JsonTypeInfo$As",
+      "org.codehaus.jackson.map.annotate.JsonRootName",
+      "org.codehaus.jackson.JsonParser",
+      "org.codehaus.jackson.node.NullNode",
+      "org.codehaus.jackson.map.InjectableValues",
+      "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.codehaus.jackson.node.TreeTraversingParser",
+      "org.codehaus.jackson.map.type.CollectionType",
+      "org.openecomp.mso.adapters.nwrest.UpdateNetworkRequest",
+      "org.codehaus.jackson.map.MapperConfig",
+      "org.codehaus.jackson.map.Module$SetupContext",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$1",
+      "org.codehaus.jackson.io.UTF8Writer",
+      "org.openecomp.mso.adapters.nwrest.ContrailNetwork",
+      "org.codehaus.jackson.map.type.MapType",
+      "org.openecomp.mso.adapters.nwrest.ProviderVlanNetwork",
+      "org.codehaus.jackson.annotate.JsonAutoDetect",
+      "org.codehaus.jackson.map.type.ArrayType",
+      "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UpdateNetworkRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.nwrest.NetworkTechnology",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponseESTest.java
new file mode 100644 (file)
index 0000000..a3e4178
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:27:07 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateNetworkResponseESTest extends UpdateNetworkResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse("|YT76&e:{$$La`3", "", (Map<String, String>) hashMap0, "h#%+?1`[X0M#}D0#1");
+      updateNetworkResponse0.getSubnetMap();
+      assertEquals("", updateNetworkResponse0.getNeutronNetworkId());
+      assertEquals("|YT76&e:{$$La`3", updateNetworkResponse0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse("|YT76&e:{$$La`3", "", (Map<String, String>) hashMap0, "h#%+?1`[X0M#}D0#1");
+      hashMap0.put((String) null, "|YT76&e:{$$La`3");
+      updateNetworkResponse0.getSubnetMap();
+      assertEquals("", updateNetworkResponse0.getNeutronNetworkId());
+      assertEquals("|YT76&e:{$$La`3", updateNetworkResponse0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse();
+      String string0 = updateNetworkResponse0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse();
+      String string0 = updateNetworkResponse0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse("", "", (Map<String, String>) null, "");
+      String string0 = updateNetworkResponse0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse("+xyc4(mUPnyf\"U)b", "+xyc4(mUPnyf\"U)b", (Map<String, String>) null, "K:spgI9eR/g*L\"*8OY");
+      String string0 = updateNetworkResponse0.getNetworkId();
+      assertEquals("+xyc4(mUPnyf\"U)b", string0);
+      assertEquals("+xyc4(mUPnyf\"U)b", updateNetworkResponse0.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse();
+      Map<String, String> map0 = updateNetworkResponse0.getSubnetMap();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse();
+      updateNetworkResponse0.setNetworkId("");
+      assertNull(updateNetworkResponse0.getNeutronNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      updateNetworkResponse0.setSubnetMap(hashMap0);
+      assertTrue(hashMap0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse("", "", (Map<String, String>) null, "?B\"6@FJt`=0v\7femyZk");
+      String string0 = updateNetworkResponse0.getNeutronNetworkId();
+      assertEquals("", updateNetworkResponse0.getNetworkId());
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      UpdateNetworkResponse updateNetworkResponse0 = new UpdateNetworkResponse();
+      updateNetworkResponse0.setNeutronNetworkId("~<;oyAz");
+      String string0 = updateNetworkResponse0.getNeutronNetworkId();
+      assertEquals("~<;oyAz", string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1df83e9
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:27:07 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.nwrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateNetworkResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.nwrest.UpdateNetworkResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateNetworkResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.nwrest.NetworkResponseCommon",
+      "org.openecomp.mso.adapters.nwrest.UpdateNetworkResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UpdateNetworkResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantErrorESTest.java
new file mode 100644 (file)
index 0000000..3198195
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:11:09 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateTenantErrorESTest extends CreateTenantErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      CreateTenantError createTenantError0 = new CreateTenantError("1lR", msoExceptionCategory0, true);
+      Boolean boolean0 = createTenantError0.getRolledBack();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      CreateTenantError createTenantError0 = new CreateTenantError("]n~ZI>O", msoExceptionCategory0, false);
+      Boolean boolean0 = createTenantError0.getRolledBack();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      CreateTenantError createTenantError0 = new CreateTenantError("1lR");
+      String string0 = createTenantError0.getMessage();
+      assertEquals("1lR", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      CreateTenantError createTenantError0 = new CreateTenantError("1lR");
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      createTenantError0.setCategory(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = createTenantError0.getCategory();
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      CreateTenantError createTenantError0 = new CreateTenantError();
+      assertNull(createTenantError0.getMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      CreateTenantError createTenantError0 = new CreateTenantError("1lR");
+      createTenantError0.setRolledBack((Boolean) null);
+      assertNull(createTenantError0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      CreateTenantError createTenantError0 = new CreateTenantError("1lR");
+      Boolean boolean0 = createTenantError0.getRolledBack();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      CreateTenantError createTenantError0 = new CreateTenantError("1lR");
+      createTenantError0.getCategory();
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      CreateTenantError createTenantError0 = new CreateTenantError((String) null, msoExceptionCategory0, false);
+      String string0 = createTenantError0.getMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test9()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      CreateTenantError createTenantError0 = new CreateTenantError((String) null, msoExceptionCategory0, false);
+      createTenantError0.setMessage("");
+      String string0 = createTenantError0.getMessage();
+      assertEquals("", string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..4919889
--- /dev/null
@@ -0,0 +1,85 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:11:09 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateTenantErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.CreateTenantError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateTenantErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.tenantrest.CreateTenantError",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateTenantErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.tenantrest.CreateTenantError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequestESTest.java
new file mode 100644 (file)
index 0000000..244194b
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:17:07 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateTenantRequestESTest extends CreateTenantRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      createTenantRequest0.setTenantName("");
+      String string0 = createTenantRequest0.getTenantName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      createTenantRequest0.setMsoRequest((MsoRequest) null);
+      MsoRequest msoRequest0 = createTenantRequest0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      createTenantRequest0.setMetadata((Map<String, String>) null);
+      Map<String, String> map0 = createTenantRequest0.getMetadata();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("+xMNxiyZP", (String) null);
+      createTenantRequest0.setMetadata(hashMap0);
+      Map<String, String> map0 = createTenantRequest0.getMetadata();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      Boolean boolean0 = new Boolean(true);
+      createTenantRequest0.setFailIfExists(boolean0);
+      Boolean boolean1 = createTenantRequest0.getFailIfExists();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      Boolean boolean0 = new Boolean("%Rg\"4z\"\7faLm@>#");
+      createTenantRequest0.setFailIfExists(boolean0);
+      Boolean boolean1 = createTenantRequest0.getFailIfExists();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      createTenantRequest0.setCloudSiteId("[E;Tr]]/");
+      String string0 = createTenantRequest0.getCloudSiteId();
+      assertEquals("[E;Tr]]/", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      createTenantRequest0.setCloudSiteId("");
+      String string0 = createTenantRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      Boolean boolean0 = new Boolean(true);
+      createTenantRequest0.setBackout(boolean0);
+      Boolean boolean1 = createTenantRequest0.getBackout();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      Boolean boolean0 = Boolean.valueOf("I?$u7");
+      createTenantRequest0.setBackout(boolean0);
+      Boolean boolean1 = createTenantRequest0.getBackout();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      Boolean boolean0 = createTenantRequest0.getBackout();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      Boolean boolean0 = createTenantRequest0.getFailIfExists();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      String string0 = createTenantRequest0.getTenantName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      String string0 = createTenantRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      String string0 = createTenantRequest0.toString();
+      assertEquals("CreateTenantRequest [cloudSiteId=null, tenantName=null, failIfExists=null, backout=null, metadata={}]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      MsoRequest msoRequest0 = createTenantRequest0.getMsoRequest();
+      createTenantRequest0.setMsoRequest(msoRequest0);
+      assertNull(createTenantRequest0.getTenantName());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      createTenantRequest0.setTenantName("Z:%{KRDa=c\"`");
+      String string0 = createTenantRequest0.getTenantName();
+      assertEquals("Z:%{KRDa=c\"`", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateTenantRequest createTenantRequest0 = new CreateTenantRequest();
+      Map<String, String> map0 = createTenantRequest0.getMetadata();
+      createTenantRequest0.setMetadata(map0);
+      assertEquals(0, map0.size());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..357047d
--- /dev/null
@@ -0,0 +1,97 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:17:07 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateTenantRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.CreateTenantRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateTenantRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.tenantrest.TenantRequestCommon",
+      "org.openecomp.mso.adapters.tenantrest.CreateTenantRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateTenantRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponseESTest.java
new file mode 100644 (file)
index 0000000..b7c8e72
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:18:27 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateTenantResponseESTest extends CreateTenantResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf((String) null);
+      TenantRollback tenantRollback0 = new TenantRollback();
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse("<MtZQZIH{-M@", "<MtZQZIH{-M@", boolean0, tenantRollback0);
+      String string0 = createTenantResponse0.toString();
+      assertEquals("CreateTenantResponse [cloudSiteId=<MtZQZIH{-M@, tenantId=<MtZQZIH{-M@, tenantCreated=false, tenantRollback=VnfRollback: cloud=null, tenant=null, tenantCreated=false]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf((String) null);
+      TenantRollback tenantRollback0 = new TenantRollback();
+      tenantRollback0.setTenantCreated(true);
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse("<MtZQZIH{-M@", "<MtZQZIH{-M@", boolean0, tenantRollback0);
+      TenantRollback tenantRollback1 = createTenantResponse0.getTenantRollback();
+      assertSame(tenantRollback0, tenantRollback1);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      createTenantResponse0.setTenantId("");
+      String string0 = createTenantResponse0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      Boolean boolean0 = createTenantResponse0.getTenantCreated();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf("");
+      TenantRollback tenantRollback0 = new TenantRollback();
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse("", "", boolean0, tenantRollback0);
+      Boolean boolean1 = createTenantResponse0.getTenantCreated();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      createTenantResponse0.setCloudSiteId("");
+      String string0 = createTenantResponse0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      createTenantResponse0.setTenantRollback((TenantRollback) null);
+      TenantRollback tenantRollback0 = createTenantResponse0.getTenantRollback();
+      assertNull(tenantRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      String string0 = createTenantResponse0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      TenantRollback tenantRollback0 = createTenantResponse0.getTenantRollback();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf(true);
+      TenantRollback tenantRollback0 = new TenantRollback();
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse("2@/.nLo", "2@/.nLo", boolean0, tenantRollback0);
+      Boolean boolean1 = createTenantResponse0.getTenantCreated();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      Boolean boolean0 = new Boolean("");
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse("8{", "U<b`ZSrD;4T", boolean0, (TenantRollback) null);
+      // Undeclared exception!
+      try { 
+        createTenantResponse0.toString();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.adapters.tenantrest.CreateTenantResponse", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      createTenantResponse0.setCloudSiteId("uj>\"L98");
+      String string0 = createTenantResponse0.getCloudSiteId();
+      assertEquals("uj>\"L98", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      String string0 = createTenantResponse0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      createTenantResponse0.setTenantId("uj>\"L98");
+      String string0 = createTenantResponse0.getTenantId();
+      assertEquals("uj>\"L98", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateTenantResponse createTenantResponse0 = new CreateTenantResponse();
+      Boolean boolean0 = Boolean.valueOf((String) null);
+      createTenantResponse0.setTenantCreated(boolean0);
+      assertNull(createTenantResponse0.getTenantId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..71fe644
--- /dev/null
@@ -0,0 +1,87 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:18:27 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateTenantResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.CreateTenantResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateTenantResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.tenantrest.CreateTenantResponse",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.tenantrest.TenantRequestCommon",
+      "org.openecomp.mso.adapters.tenantrest.TenantRollback",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateTenantResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.tenantrest.CreateTenantResponse"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantErrorESTest.java
new file mode 100644 (file)
index 0000000..54c187b
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:21:42 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteTenantErrorESTest extends DeleteTenantErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError();
+      deleteTenantError0.setMessage("");
+      String string0 = deleteTenantError0.getMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError();
+      deleteTenantError0.setRolledBack((Boolean) null);
+      assertNull(deleteTenantError0.getMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.USERDATA;
+      deleteTenantError0.setCategory(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = deleteTenantError0.getCategory();
+      assertEquals(MsoExceptionCategory.USERDATA, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError();
+      Boolean boolean0 = deleteTenantError0.getRolledBack();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError();
+      MsoExceptionCategory msoExceptionCategory0 = deleteTenantError0.getCategory();
+      DeleteTenantError deleteTenantError1 = new DeleteTenantError((String) null, msoExceptionCategory0, true);
+      Boolean boolean0 = deleteTenantError1.getRolledBack();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError((String) null, (MsoExceptionCategory) null, false);
+      Boolean boolean0 = deleteTenantError0.getRolledBack();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError("lg\7fbv,d=W|mN,b");
+      assertNull(deleteTenantError0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError();
+      String string0 = deleteTenantError0.getMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      DeleteTenantError deleteTenantError0 = new DeleteTenantError();
+      deleteTenantError0.setMessage("lg\7fbv,d=W|mN,b");
+      String string0 = deleteTenantError0.getMessage();
+      assertEquals("lg\7fbv,d=W|mN,b", string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..4603377
--- /dev/null
@@ -0,0 +1,85 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:21:42 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteTenantErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.DeleteTenantError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteTenantErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.openecomp.mso.adapters.tenantrest.DeleteTenantError"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteTenantErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.tenantrest.DeleteTenantError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequestESTest.java
new file mode 100644 (file)
index 0000000..3ad1b05
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:11:58 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteTenantRequestESTest extends DeleteTenantRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      DeleteTenantRequest deleteTenantRequest0 = new DeleteTenantRequest();
+      deleteTenantRequest0.setTenantId("");
+      String string0 = deleteTenantRequest0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      DeleteTenantRequest deleteTenantRequest0 = new DeleteTenantRequest();
+      deleteTenantRequest0.setMsoRequest((MsoRequest) null);
+      MsoRequest msoRequest0 = deleteTenantRequest0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      DeleteTenantRequest deleteTenantRequest0 = new DeleteTenantRequest();
+      deleteTenantRequest0.setCloudSiteId("");
+      String string0 = deleteTenantRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      DeleteTenantRequest deleteTenantRequest0 = new DeleteTenantRequest();
+      String string0 = deleteTenantRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      DeleteTenantRequest deleteTenantRequest0 = new DeleteTenantRequest();
+      MsoRequest msoRequest0 = deleteTenantRequest0.getMsoRequest();
+      assertNull(msoRequest0.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      DeleteTenantRequest deleteTenantRequest0 = new DeleteTenantRequest();
+      deleteTenantRequest0.setTenantId("jaxb.formatted.output");
+      String string0 = deleteTenantRequest0.getTenantId();
+      assertEquals("jaxb.formatted.output", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      DeleteTenantRequest deleteTenantRequest0 = new DeleteTenantRequest();
+      String string0 = deleteTenantRequest0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      DeleteTenantRequest deleteTenantRequest0 = new DeleteTenantRequest();
+      deleteTenantRequest0.setCloudSiteId("7hA.^5Lo<M_u");
+      String string0 = deleteTenantRequest0.getCloudSiteId();
+      assertEquals("7hA.^5Lo<M_u", string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..ecd8329
--- /dev/null
@@ -0,0 +1,97 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:11:58 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteTenantRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.DeleteTenantRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteTenantRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.tenantrest.DeleteTenantRequest",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.tenantrest.TenantRequestCommon",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteTenantRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponseESTest.java
new file mode 100644 (file)
index 0000000..79ca972
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:19:42 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteTenantResponseESTest extends DeleteTenantResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      DeleteTenantResponse deleteTenantResponse0 = new DeleteTenantResponse();
+      Boolean boolean0 = Boolean.valueOf("");
+      deleteTenantResponse0.setTenantDeleted(boolean0);
+      Boolean boolean1 = deleteTenantResponse0.getTenantDeleted();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      DeleteTenantResponse deleteTenantResponse0 = new DeleteTenantResponse();
+      Boolean boolean0 = deleteTenantResponse0.getTenantDeleted();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      DeleteTenantResponse deleteTenantResponse0 = new DeleteTenantResponse();
+      Boolean boolean0 = new Boolean(true);
+      deleteTenantResponse0.setTenantDeleted(boolean0);
+      Boolean boolean1 = deleteTenantResponse0.getTenantDeleted();
+      assertTrue(boolean1);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..057d669
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:19:42 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteTenantResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.DeleteTenantResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteTenantResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.tenantrest.DeleteTenantResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandlerESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandlerESTest.java
new file mode 100644 (file)
index 0000000..b42f9da
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:28:25 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.jboss.resteasy.specimpl.BuiltResponse;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HealthCheckHandlerESTest extends HealthCheckHandlerESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      HealthCheckHandler healthCheckHandler0 = new HealthCheckHandler();
+      BuiltResponse builtResponse0 = (BuiltResponse)healthCheckHandler0.healthcheck();
+      assertFalse(builtResponse0.isClosed());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandlerESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandlerESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c53bc98
--- /dev/null
@@ -0,0 +1,107 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:28:25 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class HealthCheckHandlerESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.HealthCheckHandler"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HealthCheckHandlerESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.jboss.resteasy.specimpl.BuiltResponse",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.openecomp.mso.adapters.tenantrest.HealthCheckHandler",
+      "com.att.eelf.i18n.EELFResourceManager"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HealthCheckHandlerESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.adapters.tenantrest.HealthCheckHandler"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantErrorESTest.java
new file mode 100644 (file)
index 0000000..1695ad3
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:23:14 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryTenantErrorESTest extends QueryTenantErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      QueryTenantError queryTenantError0 = new QueryTenantError();
+      String string0 = queryTenantError0.getMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      QueryTenantError queryTenantError0 = new QueryTenantError("", msoExceptionCategory0);
+      assertEquals("", queryTenantError0.getMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      QueryTenantError queryTenantError0 = new QueryTenantError();
+      queryTenantError0.setMessage("\7fIo21y\"Bvi");
+      String string0 = queryTenantError0.getMessage();
+      assertEquals("\7fIo21y\"Bvi", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      QueryTenantError queryTenantError0 = new QueryTenantError();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      queryTenantError0.setCategory(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = queryTenantError0.getCategory();
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      QueryTenantError queryTenantError0 = new QueryTenantError("");
+      String string0 = queryTenantError0.getMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      QueryTenantError queryTenantError0 = new QueryTenantError();
+      queryTenantError0.getCategory();
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..e7bbd3d
--- /dev/null
@@ -0,0 +1,85 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:23:14 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class QueryTenantErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.QueryTenantError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryTenantErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.tenantrest.QueryTenantError",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryTenantErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.tenantrest.QueryTenantError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponseESTest.java
new file mode 100644 (file)
index 0000000..86ae5ef
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:16:12 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryTenantResponseESTest extends QueryTenantResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse();
+      String string0 = queryTenantResponse0.getTenantName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse("", "jaxb.formatted.output", (Map<String, String>) null);
+      String string0 = queryTenantResponse0.getTenantName();
+      assertEquals("jaxb.formatted.output", string0);
+      assertEquals("", queryTenantResponse0.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse("/d/SGl|KH4#n", "", (Map<String, String>) hashMap0);
+      String string0 = queryTenantResponse0.getTenantId();
+      assertEquals("", queryTenantResponse0.getTenantName());
+      assertEquals("/d/SGl|KH4#n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse(":!JHcoDwU", ":!JHcoDwU", (Map<String, String>) hashMap0);
+      Map<String, String> map0 = queryTenantResponse0.getMetadata();
+      assertTrue(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("3Lk\"uS,GJ", "3Lk\"uS,GJ");
+      queryTenantResponse0.setMetadata(hashMap0);
+      Map<String, String> map0 = queryTenantResponse0.getMetadata();
+      assertEquals(1, map0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse("b", "", (Map<String, String>) hashMap0);
+      String string0 = queryTenantResponse0.getTenantName();
+      assertEquals("", string0);
+      assertEquals("b", queryTenantResponse0.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse();
+      String string0 = queryTenantResponse0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse();
+      Map<String, String> map0 = queryTenantResponse0.getMetadata();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse();
+      queryTenantResponse0.setTenantName("hKe?S+T{hz:~0");
+      assertEquals("hKe?S+T{hz:~0", queryTenantResponse0.getTenantName());
+  }
+
+  @Test(timeout = 4000)
+  public void test9()  throws Throwable  {
+      QueryTenantResponse queryTenantResponse0 = new QueryTenantResponse();
+      queryTenantResponse0.setTenantId("");
+      String string0 = queryTenantResponse0.getTenantId();
+      assertEquals("", string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..960abf7
--- /dev/null
@@ -0,0 +1,96 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:16:12 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class QueryTenantResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.QueryTenantResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryTenantResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.tenantrest.TenantRequestCommon",
+      "org.openecomp.mso.adapters.tenantrest.QueryTenantResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryTenantResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantErrorESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantErrorESTest.java
new file mode 100644 (file)
index 0000000..b1232f3
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:22:42 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackTenantErrorESTest extends RollbackTenantErrorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError();
+      Boolean boolean0 = rollbackTenantError0.getRolledBack();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError("w8nm;2F^\"Z", (MsoExceptionCategory) null, true);
+      Boolean boolean0 = rollbackTenantError0.getRolledBack();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError();
+      String string0 = rollbackTenantError0.getMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError("=i_>GLf`");
+      String string0 = rollbackTenantError0.getMessage();
+      assertEquals("=i_>GLf`", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError();
+      rollbackTenantError0.getCategory();
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError("", msoExceptionCategory0, false);
+      rollbackTenantError0.setCategory(msoExceptionCategory0);
+      assertEquals(MsoExceptionCategory.OPENSTACK, rollbackTenantError0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError("", msoExceptionCategory0, false);
+      MsoExceptionCategory msoExceptionCategory1 = rollbackTenantError0.getCategory();
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError("", msoExceptionCategory0, false);
+      String string0 = rollbackTenantError0.getMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError("", msoExceptionCategory0, false);
+      Boolean boolean0 = rollbackTenantError0.getRolledBack();
+      rollbackTenantError0.setRolledBack(boolean0);
+      assertEquals(MsoExceptionCategory.OPENSTACK, rollbackTenantError0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test9()  throws Throwable  {
+      RollbackTenantError rollbackTenantError0 = new RollbackTenantError();
+      rollbackTenantError0.setMessage("org.openecomp.mso.openstack.exceptions.MsoExceptionCategory");
+      assertEquals("org.openecomp.mso.openstack.exceptions.MsoExceptionCategory", rollbackTenantError0.getMessage());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantErrorESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantErrorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8ca1cb0
--- /dev/null
@@ -0,0 +1,85 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:22:42 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackTenantErrorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.RollbackTenantError"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackTenantErrorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.tenantrest.RollbackTenantError",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackTenantErrorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.tenantrest.RollbackTenantError"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequestESTest.java
new file mode 100644 (file)
index 0000000..c846222
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:26:04 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackTenantRequestESTest extends RollbackTenantRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackTenantRequest rollbackTenantRequest0 = new RollbackTenantRequest();
+      TenantRollback tenantRollback0 = new TenantRollback();
+      rollbackTenantRequest0.setTenantRollback(tenantRollback0);
+      tenantRollback0.setTenantCreated(true);
+      TenantRollback tenantRollback1 = rollbackTenantRequest0.getTenantRollback();
+      assertTrue(tenantRollback1.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RollbackTenantRequest rollbackTenantRequest0 = new RollbackTenantRequest();
+      TenantRollback tenantRollback0 = new TenantRollback();
+      rollbackTenantRequest0.setTenantRollback(tenantRollback0);
+      TenantRollback tenantRollback1 = rollbackTenantRequest0.getTenantRollback();
+      assertSame(tenantRollback1, tenantRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackTenantRequest rollbackTenantRequest0 = new RollbackTenantRequest();
+      TenantRollback tenantRollback0 = rollbackTenantRequest0.getTenantRollback();
+      assertNull(tenantRollback0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..fa9d0c6
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:26:04 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackTenantRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.RollbackTenantRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackTenantRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.tenantrest.TenantRequestCommon",
+      "org.openecomp.mso.adapters.tenantrest.RollbackTenantRequest",
+      "org.openecomp.mso.adapters.tenantrest.TenantRollback",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackTenantRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponseESTest.java
new file mode 100644 (file)
index 0000000..3669382
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:19:02 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackTenantResponseESTest extends RollbackTenantResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackTenantResponse rollbackTenantResponse0 = new RollbackTenantResponse();
+      Boolean boolean0 = Boolean.TRUE;
+      rollbackTenantResponse0.setTenantRolledback(boolean0);
+      Boolean boolean1 = rollbackTenantResponse0.getTenantRolledback();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RollbackTenantResponse rollbackTenantResponse0 = new RollbackTenantResponse();
+      Boolean boolean0 = Boolean.valueOf(":;W(ksM>u2+");
+      rollbackTenantResponse0.setTenantRolledback(boolean0);
+      Boolean boolean1 = rollbackTenantResponse0.getTenantRolledback();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackTenantResponse rollbackTenantResponse0 = new RollbackTenantResponse();
+      Boolean boolean0 = rollbackTenantResponse0.getTenantRolledback();
+      assertNull(boolean0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..975ce05
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:19:02 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackTenantResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.RollbackTenantResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackTenantResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.tenantrest.RollbackTenantResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponseESTest.java
new file mode 100644 (file)
index 0000000..1694ca2
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:25:22 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class TenantExceptionResponseESTest extends TenantExceptionResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse((String) null, msoExceptionCategory0, true);
+      Boolean boolean0 = tenantExceptionResponse0.getRolledBack();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse("sxH3DHvAo$");
+      String string0 = tenantExceptionResponse0.getMessage();
+      assertEquals("sxH3DHvAo$", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse((String) null, msoExceptionCategory0, true);
+      MsoExceptionCategory msoExceptionCategory1 = tenantExceptionResponse0.getCategory();
+      assertSame(msoExceptionCategory0, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse("");
+      tenantExceptionResponse0.setMessage("1LGUz =Y?.wyJ");
+      assertNull(tenantExceptionResponse0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse("");
+      Boolean boolean0 = tenantExceptionResponse0.getRolledBack();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse("");
+      tenantExceptionResponse0.setCategory((MsoExceptionCategory) null);
+      assertEquals("", tenantExceptionResponse0.getMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse();
+      String string0 = tenantExceptionResponse0.getMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse("");
+      String string0 = tenantExceptionResponse0.getMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL;
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse("", msoExceptionCategory0, false);
+      Boolean boolean0 = tenantExceptionResponse0.getRolledBack();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse("");
+      tenantExceptionResponse0.setRolledBack((Boolean) null);
+      assertNull(tenantExceptionResponse0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      TenantExceptionResponse tenantExceptionResponse0 = new TenantExceptionResponse("");
+      tenantExceptionResponse0.getCategory();
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..712eea3
--- /dev/null
@@ -0,0 +1,85 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:25:22 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class TenantExceptionResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.TenantExceptionResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(TenantExceptionResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.tenantrest.TenantExceptionResponse",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(TenantExceptionResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.tenantrest.TenantExceptionResponse"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantRollbackESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantRollbackESTest.java
new file mode 100644 (file)
index 0000000..48b4e04
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:14:33 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class TenantRollbackESTest extends TenantRollbackESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      tenantRollback0.setTenantId("e'W6mm;1{:,");
+      tenantRollback0.getTenantId();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      assertFalse(tenantRollback0.getTenantCreated());
+      
+      tenantRollback0.setTenantCreated(true);
+      boolean boolean0 = tenantRollback0.getTenantCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      tenantRollback0.setCloudId("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<rollbackTenantRequest>\n    <tenantCreated>false</tenantCreated>\n</rollbackTenantRequest>\n");
+      tenantRollback0.getCloudId();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      tenantRollback0.setCloudId("");
+      tenantRollback0.getCloudId();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      tenantRollback0.getMsoRequest();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      boolean boolean0 = tenantRollback0.getTenantCreated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      tenantRollback0.getCloudId();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      tenantRollback0.getTenantId();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      MsoRequest msoRequest0 = new MsoRequest();
+      tenantRollback0.setMsoRequest(msoRequest0);
+      tenantRollback0.getMsoRequest();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      tenantRollback0.setTenantId("");
+      tenantRollback0.getTenantId();
+      assertFalse(tenantRollback0.getTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      TenantRollback tenantRollback0 = new TenantRollback();
+      String string0 = tenantRollback0.toString();
+      assertEquals("VnfRollback: cloud=null, tenant=null, tenantCreated=false", string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantRollbackESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/tenantrest/TenantRollbackESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c75ee49
--- /dev/null
@@ -0,0 +1,97 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:14:33 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.tenantrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class TenantRollbackESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.tenantrest.TenantRollback"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(TenantRollbackESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.tenantrest.TenantRequestCommon",
+      "org.openecomp.mso.adapters.tenantrest.TenantRollback",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(TenantRollbackESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequestESTest.java
new file mode 100644 (file)
index 0000000..daaf4f0
--- /dev/null
@@ -0,0 +1,661 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:13:00 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateVfModuleRequestESTest extends CreateVfModuleRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      assertNull(createVfModuleRequest0.getVnfId());
+      
+      createVfModuleRequest0.setVnfVersion("sJ%kzC");
+      createVfModuleRequest0.getVolumeGroupId();
+      createVfModuleRequest0.setTenantId((String) null);
+      createVfModuleRequest0.setRequestType((String) null);
+      createVfModuleRequest0.getVnfVersion();
+      createVfModuleRequest0.setVnfType((String) null);
+      createVfModuleRequest0.getBaseVfModuleId();
+      createVfModuleRequest0.getBaseVfModuleId();
+      MsoRequest msoRequest0 = new MsoRequest();
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.toXmlString();
+      Boolean.logicalAnd(false, false);
+      createVfModuleRequest0.setBackout((Boolean) null);
+      createVfModuleRequest0.getVolumeGroupId();
+      createVfModuleRequest0.getVfModuleType();
+      createVfModuleRequest0.setBaseVfModuleStackId("");
+      createVfModuleRequest0.setRequestType("&$7s5#");
+      assertTrue(createVfModuleRequest0.isSynchronous());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setBaseVfModuleStackId("gi,pZwt!/Q");
+      createVfModuleRequest0.setTenantId("<(b");
+      createVfModuleRequest0.setVfModuleName("");
+      createVfModuleRequest0.setVnfId("");
+      createVfModuleRequest0.getVnfId();
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.setRequestType("");
+      createVfModuleRequest0.getTenantId();
+      createVfModuleRequest0.setVfModuleId("gi,pZwt!/Q");
+      createVfModuleRequest0.getVfModuleParams();
+      createVfModuleRequest0.getVolumeGroupStackId();
+      String string0 = createVfModuleRequest0.getVolumeGroupId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.getFailIfExists();
+      createVfModuleRequest0.setFailIfExists((Boolean) null);
+      assertTrue(createVfModuleRequest0.isSynchronous());
+      
+      createVfModuleRequest0.setVnfId("");
+      createVfModuleRequest0.setTenantId("P%");
+      createVfModuleRequest0.setTenantId("vqbsX2ysx.>]T ");
+      createVfModuleRequest0.getBaseVfModuleStackId();
+      createVfModuleRequest0.getBaseVfModuleStackId();
+      createVfModuleRequest0.getCloudSiteId();
+      createVfModuleRequest0.getVfModuleParams();
+      String string0 = createVfModuleRequest0.getTenantId();
+      assertEquals("vqbsX2ysx.>]T ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setMessageId("");
+      createVfModuleRequest0.setVfModuleName("");
+      createVfModuleRequest0.setVnfType("");
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setRequestId("");
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      createVfModuleRequest0.getBaseVfModuleId();
+      Boolean boolean0 = Boolean.TRUE;
+      Boolean.getBoolean("");
+      createVfModuleRequest0.setBaseVfModuleId("$I<po0F7W[gG2}iD,.");
+      createVfModuleRequest0.setBackout(boolean0);
+      CreateVfModuleRequest createVfModuleRequest1 = new CreateVfModuleRequest();
+      createVfModuleRequest0.toXmlString();
+      createVfModuleRequest1.setBaseVfModuleStackId("$I<po0F7W[gG2}iD,.");
+      createVfModuleRequest0.getVfModuleName();
+      Boolean boolean1 = createVfModuleRequest0.getBackout();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      MsoRequest msoRequest0 = new MsoRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      createVfModuleRequest0.setVfModuleParams(hashMap0);
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      createVfModuleRequest0.setTenantId("");
+      Map<String, String> map0 = createVfModuleRequest0.getVfModuleParams();
+      createVfModuleRequest0.setVfModuleParams(map0);
+      createVfModuleRequest0.setVolumeGroupStackId("E8");
+      createVfModuleRequest0.setVfModuleId("");
+      createVfModuleRequest0.setVfModuleParams((Map<String, String>) null);
+      createVfModuleRequest0.getVfModuleId();
+      createVfModuleRequest0.setVfModuleParams((Map<String, String>) null);
+      createVfModuleRequest0.setVfModuleType("@<W6qx4|DZ(CMN`JzXQ");
+      assertEquals("", createVfModuleRequest0.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setBaseVfModuleStackId("jaxb.formatted.output");
+      Boolean boolean0 = Boolean.valueOf(false);
+      Boolean.compare(false, false);
+      createVfModuleRequest0.setVfModuleType("");
+      Boolean.logicalXor(false, true);
+      Boolean.logicalOr(true, true);
+      Boolean.compare(false, false);
+      createVfModuleRequest0.setFailIfExists(boolean0);
+      createVfModuleRequest0.setVfModuleName("bMZ`m<$@<x?!ofbD`!");
+      createVfModuleRequest0.setVfModuleType("");
+      createVfModuleRequest0.getFailIfExists();
+      createVfModuleRequest0.setTenantId("");
+      createVfModuleRequest0.setVnfId("");
+      createVfModuleRequest0.getBaseVfModuleStackId();
+      createVfModuleRequest0.getMsoRequest();
+      createVfModuleRequest0.getTenantId();
+      MsoRequest msoRequest0 = createVfModuleRequest0.getMsoRequest();
+      msoRequest0.setServiceInstanceId("");
+      createVfModuleRequest0.getVnfType();
+      createVfModuleRequest0.getVnfType();
+      createVfModuleRequest0.setVfModuleName("");
+      msoRequest0.setRequestId((String) null);
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      createVfModuleRequest0.setVfModuleId((String) null);
+      createVfModuleRequest0.setBaseVfModuleId("");
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.setRequestType("");
+      assertNull(createVfModuleRequest0.getVnfType());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVolumeGroupId("C}GH#3Zrrwj]-VWQfx");
+      createVfModuleRequest0.setVnfType("jaxb.formatted.output");
+      createVfModuleRequest0.setRequestType("jaxb.formatted.output");
+      createVfModuleRequest0.getBackout();
+      String string0 = createVfModuleRequest0.getVolumeGroupId();
+      assertEquals("C}GH#3Zrrwj]-VWQfx", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      createVfModuleRequest0.setVfModuleParams(hashMap0);
+      Boolean boolean0 = Boolean.valueOf(false);
+      Boolean.logicalXor(false, false);
+      createVfModuleRequest0.setFailIfExists(boolean0);
+      createVfModuleRequest0.setVolumeGroupId((String) null);
+      createVfModuleRequest0.setRequestType("jaxb.formatted.output");
+      createVfModuleRequest0.getRequestType();
+      String string0 = createVfModuleRequest0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVnfType("4$IXyLo,UL9");
+      createVfModuleRequest0.getVfModuleName();
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("4$IXyLo,UL9");
+      createVfModuleRequest0.toXmlString();
+      msoRequest0.setServiceInstanceId("");
+      msoRequest0.setRequestId("4$IXyLo,UL9");
+      Boolean boolean0 = Boolean.valueOf("4$IXyLo,UL9");
+      Boolean.getBoolean("4$IXyLo,UL9");
+      createVfModuleRequest0.setBackout(boolean0);
+      msoRequest0.setServiceInstanceId("t.d]=Q;m");
+      msoRequest0.setRequestId("");
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      createVfModuleRequest0.setVolumeGroupId("");
+      createVfModuleRequest0.getVolumeGroupId();
+      createVfModuleRequest0.getBaseVfModuleStackId();
+      createVfModuleRequest0.getVnfId();
+      createVfModuleRequest0.getCloudSiteId();
+      createVfModuleRequest0.setVfModuleType("Hc<-mV");
+      assertNull(createVfModuleRequest0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setBaseVfModuleStackId(":N_M0a[eewxveG");
+      createVfModuleRequest0.setMessageId("qajtT(\"^v~n0>3Q/F9");
+      Boolean boolean0 = Boolean.valueOf(":N_M0a[eewxveG");
+      Boolean.compare(true, true);
+      createVfModuleRequest0.setFailIfExists(boolean0);
+      createVfModuleRequest0.setVfModuleId("");
+      createVfModuleRequest0.setBaseVfModuleId("");
+      createVfModuleRequest0.setVnfId("&uC#o/=");
+      createVfModuleRequest0.setVfModuleName("jaxb.formatted.output");
+      createVfModuleRequest0.setVnfType("jaxb.formatted.output");
+      createVfModuleRequest0.getVnfId();
+      createVfModuleRequest0.getBaseVfModuleId();
+      createVfModuleRequest0.setVfModuleId("");
+      createVfModuleRequest0.setVfModuleId("'l b#");
+      assertNull(createVfModuleRequest0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      Map<String, String> map0 = createVfModuleRequest0.getVfModuleParams();
+      createVfModuleRequest0.setVnfId("Mi!");
+      createVfModuleRequest0.setVolumeGroupId((String) null);
+      createVfModuleRequest0.setVfModuleParams(map0);
+      createVfModuleRequest0.setBaseVfModuleStackId("Mi!");
+      createVfModuleRequest0.getVnfId();
+      createVfModuleRequest0.getBaseVfModuleStackId();
+      createVfModuleRequest0.getVolumeGroupId();
+      createVfModuleRequest0.setVfModuleId((String) null);
+      assertNull(createVfModuleRequest0.getVolumeGroupStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.toXmlString();
+      createVfModuleRequest0.setVolumeGroupId("");
+      createVfModuleRequest0.getBaseVfModuleId();
+      createVfModuleRequest0.toXmlString();
+      createVfModuleRequest0.setVfModuleType("~o");
+      createVfModuleRequest0.setRequestType("");
+      createVfModuleRequest0.getVfModuleName();
+      Boolean boolean0 = new Boolean(false);
+      createVfModuleRequest0.setFailIfExists(boolean0);
+      createVfModuleRequest0.getRequestType();
+      createVfModuleRequest0.setVfModuleId("");
+      createVfModuleRequest0.setVfModuleId("");
+      assertEquals("", createVfModuleRequest0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      Map<String, String> map0 = createVfModuleRequest0.getVfModuleParams();
+      createVfModuleRequest0.setVfModuleParams(map0);
+      createVfModuleRequest0.getBaseVfModuleId();
+      createVfModuleRequest0.getTenantId();
+      createVfModuleRequest0.getCloudSiteId();
+      createVfModuleRequest0.setVolumeGroupStackId((String) null);
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.getVfModuleType();
+      createVfModuleRequest0.setVnfId("\7f3TEn*yZmhM~PV>H");
+      createVfModuleRequest0.getFailIfExists();
+      createVfModuleRequest0.setCloudSiteId("");
+      createVfModuleRequest0.getCloudSiteId();
+      String string0 = createVfModuleRequest0.getVnfVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVnfVersion("!oK");
+      createVfModuleRequest0.setCloudSiteId((String) null);
+      createVfModuleRequest0.setVfModuleType("");
+      createVfModuleRequest0.getRequestType();
+      createVfModuleRequest0.setVfModuleId((String) null);
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      createVfModuleRequest0.setNotificationUrl((String) null);
+      hashMap0.put("", (String) null);
+      createVfModuleRequest0.setVfModuleParams(hashMap0);
+      hashMap0.put("!oK", "");
+      createVfModuleRequest0.setVfModuleParams(hashMap0);
+      createVfModuleRequest0.getVnfType();
+      createVfModuleRequest0.getVfModuleParams();
+      String string0 = createVfModuleRequest0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      Boolean boolean0 = Boolean.TRUE;
+      Boolean.getBoolean((String) null);
+      Boolean.logicalOr(true, false);
+      createVfModuleRequest0.setSkipAAI(boolean0);
+      Boolean boolean1 = createVfModuleRequest0.getSkipAAI();
+      createVfModuleRequest0.setSkipAAI(boolean1);
+      createVfModuleRequest0.setBaseVfModuleId("u=(R\7f@E]!q2rk");
+      createVfModuleRequest0.setVnfId("");
+      createVfModuleRequest0.setVfModuleId("u=(R\7f@E]!q2rk");
+      createVfModuleRequest0.setVolumeGroupId("u=(R\7f@E]!q2rk");
+      createVfModuleRequest0.setBaseVfModuleStackId((String) null);
+      createVfModuleRequest0.setCloudSiteId("^)DR(@$VIDb");
+      createVfModuleRequest0.setVnfId("^)DR(@$VIDb");
+      createVfModuleRequest0.getVfModuleParams();
+      createVfModuleRequest0.getVfModuleId();
+      createVfModuleRequest0.getBaseVfModuleId();
+      String string0 = createVfModuleRequest0.getVnfType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setRequestType("");
+      createVfModuleRequest0.setRequestType("");
+      createVfModuleRequest0.getMsoRequest();
+      createVfModuleRequest0.setBaseVfModuleStackId("");
+      createVfModuleRequest0.setVolumeGroupStackId(":S");
+      createVfModuleRequest0.getBaseVfModuleStackId();
+      CreateVfModuleRequest createVfModuleRequest1 = new CreateVfModuleRequest();
+      createVfModuleRequest1.getFailIfExists();
+      Boolean.compare(false, false);
+      // Undeclared exception!
+      try { 
+        createVfModuleRequest1.toJsonString();
+        fail("Expecting exception: VerifyError");
+      
+      } catch(VerifyError e) {
+         //
+         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
+         //
+         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVnfType("");
+      assertNull(createVfModuleRequest0.getBaseVfModuleStackId());
+      
+      MsoRequest msoRequest0 = new MsoRequest("", (String) null);
+      msoRequest0.setServiceInstanceId("");
+      msoRequest0.setRequestId("y/H`4");
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      createVfModuleRequest0.setVolumeGroupStackId("1!1@Hk");
+      createVfModuleRequest0.setNotificationUrl("");
+      createVfModuleRequest0.getVnfType();
+      createVfModuleRequest0.getRequestType();
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.getVolumeGroupStackId();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      createVfModuleRequest0.setVfModuleParams(hashMap0);
+      assertNull(createVfModuleRequest0.getVnfVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVnfVersion("");
+      createVfModuleRequest0.setVolumeGroupStackId("g[TSR)[o{D\"(-N");
+      createVfModuleRequest0.getFailIfExists();
+      MsoRequest msoRequest0 = new MsoRequest("", "");
+      msoRequest0.setServiceInstanceId("{l*;T:\7fT");
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      createVfModuleRequest0.setVnfType("");
+      createVfModuleRequest0.setMessageId("");
+      createVfModuleRequest0.setBaseVfModuleId("6=");
+      createVfModuleRequest0.setRequestType("");
+      createVfModuleRequest0.getVnfVersion();
+      createVfModuleRequest0.setVolumeGroupStackId("");
+      createVfModuleRequest0.getVolumeGroupStackId();
+      createVfModuleRequest0.setVnfType("");
+      createVfModuleRequest0.setVfModuleId("7vlbM({1@v[1?Q^A;");
+      assertNull(createVfModuleRequest0.getBaseVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      MsoRequest msoRequest0 = new MsoRequest();
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      createVfModuleRequest0.getVfModuleName();
+      Boolean boolean0 = Boolean.FALSE;
+      Boolean.logicalOr(true, true);
+      createVfModuleRequest0.setBackout(boolean0);
+      createVfModuleRequest0.setVnfVersion("");
+      createVfModuleRequest0.setVnfVersion("");
+      createVfModuleRequest0.getMsoRequest();
+      String string0 = createVfModuleRequest0.getVnfVersion();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      Boolean boolean0 = new Boolean("");
+      Boolean.logicalOr(true, false);
+      createVfModuleRequest0.setBackout(boolean0);
+      createVfModuleRequest0.setTenantId("");
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.setVfModuleName("rdQqc>\7fV^");
+      assertTrue(createVfModuleRequest0.isSynchronous());
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      Map<String, String> map0 = createVfModuleRequest0.getVfModuleParams();
+      Boolean boolean0 = Boolean.valueOf("");
+      boolean boolean1 = Boolean.logicalXor(false, false);
+      createVfModuleRequest0.setSkipAAI(boolean0);
+      createVfModuleRequest0.setVfModuleParams(map0);
+      createVfModuleRequest0.getVfModuleType();
+      createVfModuleRequest0.setVnfId("");
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.getBaseVfModuleId();
+      createVfModuleRequest0.getVfModuleParams();
+      Boolean boolean2 = new Boolean(true);
+      createVfModuleRequest0.setFailIfExists(boolean2);
+      Boolean boolean3 = createVfModuleRequest0.getFailIfExists();
+      assertFalse(boolean3.equals((Object)boolean1));
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVfModuleId(",XO#k)z!8GWX&8V+O\7f");
+      createVfModuleRequest0.setCloudSiteId((String) null);
+      createVfModuleRequest0.setRequestType(",XO#k)z!8GWX&8V+O\7f");
+      createVfModuleRequest0.setMsoRequest((MsoRequest) null);
+      createVfModuleRequest0.setRequestType(",XO#k)z!8GWX&8V+O\7f");
+      createVfModuleRequest0.setVolumeGroupStackId("'ug-");
+      createVfModuleRequest0.setVnfType("\7fs7~':&U/'F;]h");
+      createVfModuleRequest0.setBaseVfModuleId("'ug-");
+      createVfModuleRequest0.toXmlString();
+      createVfModuleRequest0.setVnfId("NmH3Tn>J]!Fg%4@%uY");
+      createVfModuleRequest0.setVnfId("'ug-");
+      createVfModuleRequest0.setVolumeGroupId("'ug-");
+      createVfModuleRequest0.setVolumeGroupId("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<createVfModuleRequest>\n    <baseVfModuleId>'ug-</baseVfModuleId>\n    <requestType>,XO#k)z!8GWX&amp;8V+O\7f</requestType>\n    <vfModuleId>,XO#k)z!8GWX&amp;8V+O\7f</vfModuleId>\n    <vfModuleParams/>\n    <vnfType>\7fs7~':&amp;U/'F;]h</vnfType>\n    <volumeGroupStackId>'ug-</volumeGroupStackId>\n</createVfModuleRequest>\n");
+      createVfModuleRequest0.getVfModuleType();
+      createVfModuleRequest0.getMsoRequest();
+      createVfModuleRequest0.getVfModuleName();
+      createVfModuleRequest0.getVfModuleId();
+      Boolean boolean0 = Boolean.TRUE;
+      createVfModuleRequest0.setVfModuleName("p'k7");
+      createVfModuleRequest0.setFailIfExists(boolean0);
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.getVfModuleType();
+      createVfModuleRequest0.setBackout(boolean0);
+      createVfModuleRequest0.setVfModuleId((String) null);
+      createVfModuleRequest0.getVfModuleParams();
+      String string0 = createVfModuleRequest0.getVfModuleName();
+      assertEquals("p'k7", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setCloudSiteId("");
+      assertNull(createVfModuleRequest0.getVfModuleType());
+      
+      createVfModuleRequest0.setVfModuleId("-)#\"]O:7");
+      createVfModuleRequest0.getRequestType();
+      createVfModuleRequest0.getVfModuleName();
+      createVfModuleRequest0.setVfModuleName("-)#\"]O:7");
+      createVfModuleRequest0.setVnfVersion("");
+      createVfModuleRequest0.getVfModuleId();
+      Boolean boolean0 = new Boolean("$HZL");
+      Boolean.logicalXor(false, true);
+      Boolean.getBoolean("-)#\"]O:7");
+      Boolean.getBoolean("$HZL");
+      createVfModuleRequest0.setBackout(boolean0);
+      CreateVfModuleRequest createVfModuleRequest1 = new CreateVfModuleRequest();
+      CreateVfModuleRequest createVfModuleRequest2 = new CreateVfModuleRequest();
+      assertTrue(createVfModuleRequest2.isSynchronous());
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setBaseVfModuleStackId("");
+      createVfModuleRequest0.getFailIfExists();
+      createVfModuleRequest0.setBackout((Boolean) null);
+      createVfModuleRequest0.setVfModuleName("^z)=F7B=Zvfa\7fN");
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.setVnfVersion("^z)=F7B=Zvfa\7fN");
+      createVfModuleRequest0.setVolumeGroupId("jaxb.formatted.output");
+      createVfModuleRequest0.setVfModuleType("");
+      createVfModuleRequest0.getVfModuleName();
+      createVfModuleRequest0.getVnfId();
+      createVfModuleRequest0.setBaseVfModuleId("");
+      createVfModuleRequest0.getVfModuleType();
+      createVfModuleRequest0.getCloudSiteId();
+      createVfModuleRequest0.setVolumeGroupId("");
+      createVfModuleRequest0.setFailIfExists((Boolean) null);
+      String string0 = createVfModuleRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVolumeGroupId("a72)-2");
+      String string0 = createVfModuleRequest0.getVfModuleName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVfModuleName("}2#uF?(\7f<`4`}\7f.");
+      assertNull(createVfModuleRequest0.getVnfVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVfModuleParams((Map<String, String>) null);
+      createVfModuleRequest0.getBaseVfModuleId();
+      createVfModuleRequest0.getVnfVersion();
+      createVfModuleRequest0.setVolumeGroupStackId("");
+      createVfModuleRequest0.setCloudSiteId("aZB6^K~Z,$Q1");
+      createVfModuleRequest0.setVolumeGroupId("");
+      createVfModuleRequest0.setBaseVfModuleId((String) null);
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.getVfModuleParams();
+      createVfModuleRequest0.setVolumeGroupStackId("\"tKNX~{9QfJ");
+      String string0 = createVfModuleRequest0.getCloudSiteId();
+      assertEquals("aZB6^K~Z,$Q1", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVnfType("Zp..9csA_m");
+      createVfModuleRequest0.setVolumeGroupStackId("Zp..9csA_m");
+      createVfModuleRequest0.setVnfId("");
+      CreateVfModuleRequest createVfModuleRequest1 = new CreateVfModuleRequest();
+      createVfModuleRequest1.setTenantId("");
+      createVfModuleRequest1.setVnfVersion("");
+      createVfModuleRequest0.setBaseVfModuleId("Zp..9csA_m");
+      Boolean boolean0 = Boolean.FALSE;
+      createVfModuleRequest0.setBackout(boolean0);
+      createVfModuleRequest0.setVfModuleType("");
+      String string0 = createVfModuleRequest0.getVnfType();
+      assertEquals("Zp..9csA_m", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVolumeGroupStackId("");
+      createVfModuleRequest0.setBaseVfModuleId("");
+      String string0 = createVfModuleRequest0.getVnfType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.getVolumeGroupStackId();
+      // Undeclared exception!
+      try { 
+        createVfModuleRequest0.toJsonString();
+        fail("Expecting exception: VerifyError");
+      
+      } catch(VerifyError e) {
+         //
+         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
+         //
+         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setRequestType("]8]Fja*=.9+U");
+      createVfModuleRequest0.setVnfVersion("]8]Fja*=.9+U");
+      createVfModuleRequest0.setBackout((Boolean) null);
+      createVfModuleRequest0.setVnfType("");
+      createVfModuleRequest0.setVfModuleType("]8]Fja*=.9+U");
+      createVfModuleRequest0.setVfModuleId("2`+q>,#Bb");
+      createVfModuleRequest0.setCloudSiteId("]8]Fja*=.9+U");
+      createVfModuleRequest0.setVolumeGroupId("2`+q>,#Bb");
+      createVfModuleRequest0.setVnfId("@=t[3*cN,^q ");
+      createVfModuleRequest0.getVfModuleType();
+      createVfModuleRequest0.getTenantId();
+      createVfModuleRequest0.getBackout();
+      createVfModuleRequest0.setBaseVfModuleStackId("1w$l-\7f");
+      assertTrue(createVfModuleRequest0.isSynchronous());
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setBaseVfModuleId("");
+      createVfModuleRequest0.getCloudSiteId();
+      createVfModuleRequest0.setRequestType((String) null);
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      createVfModuleRequest0.setVfModuleParams(hashMap0);
+      assertNull(createVfModuleRequest0.getBaseVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      MsoRequest msoRequest0 = createVfModuleRequest0.getMsoRequest();
+      createVfModuleRequest0.setMsoRequest(msoRequest0);
+      assertNull(createVfModuleRequest0.getVfModuleName());
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.setVnfVersion("");
+      String string0 = createVfModuleRequest0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.getVolumeGroupId();
+      createVfModuleRequest0.setVfModuleType((String) null);
+      createVfModuleRequest0.setVnfId("");
+      assertNull(createVfModuleRequest0.getVnfVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.toXmlString();
+      createVfModuleRequest0.setVfModuleType("");
+      String string0 = createVfModuleRequest0.getVnfVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      CreateVfModuleRequest createVfModuleRequest0 = new CreateVfModuleRequest();
+      createVfModuleRequest0.getVfModuleType();
+      createVfModuleRequest0.getVfModuleParams();
+      createVfModuleRequest0.setTenantId((String) null);
+      assertNull(createVfModuleRequest0.getBaseVfModuleId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..685cb06
--- /dev/null
@@ -0,0 +1,197 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:13:00 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateVfModuleRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.CreateVfModuleRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateVfModuleRequestESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.map.JsonSerializableWithType",
+      "org.openecomp.mso.adapters.vnfrest.CreateVfModuleRequest",
+      "org.codehaus.jackson.map.deser.StdDeserializerProvider",
+      "org.codehaus.jackson.map.SerializerFactory",
+      "org.codehaus.jackson.map.SerializerProvider",
+      "org.codehaus.jackson.map.SerializationConfig",
+      "org.codehaus.jackson.JsonProcessingException",
+      "org.codehaus.jackson.map.introspect.AnnotationMap",
+      "org.codehaus.jackson.map.introspect.Annotated",
+      "org.codehaus.jackson.map.util.Annotations",
+      "org.codehaus.jackson.sym.NameN",
+      "org.codehaus.jackson.JsonGenerator",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
+      "org.codehaus.jackson.map.JsonSerializable",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.node.BaseJsonNode",
+      "org.codehaus.jackson.map.DeserializerProvider",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.node.ValueNode",
+      "org.codehaus.jackson.map.ser.BeanSerializerFactory",
+      "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
+      "org.codehaus.jackson.map.AnnotationIntrospector",
+      "org.codehaus.jackson.map.MappingJsonFactory",
+      "org.codehaus.jackson.map.MapperConfig$Impl",
+      "org.codehaus.jackson.sym.Name1",
+      "org.codehaus.jackson.sym.Name2",
+      "org.codehaus.jackson.sym.Name3",
+      "org.codehaus.jackson.map.introspect.MethodFilter",
+      "org.codehaus.jackson.map.ser.StdSerializerProvider",
+      "org.codehaus.jackson.map.deser.StdDeserializationContext",
+      "org.codehaus.jackson.map.ClassIntrospector",
+      "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
+      "org.codehaus.jackson.Versioned",
+      "org.codehaus.jackson.map.type.TypeBase",
+      "org.codehaus.jackson.map.ser.BasicSerializerFactory",
+      "org.codehaus.jackson.node.ContainerNode",
+      "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
+      "org.codehaus.jackson.map.DeserializationConfig",
+      "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.codehaus.jackson.impl.ReaderBasedParser",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
+      "org.codehaus.jackson.map.type.MapLikeType",
+      "org.codehaus.jackson.node.ObjectNode",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
+      "org.codehaus.jackson.map.type.CollectionLikeType",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
+      "org.codehaus.jackson.impl.JsonParserMinimalBase",
+      "org.codehaus.jackson.map.type.TypeParser",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker",
+      "org.codehaus.jackson.map.introspect.AnnotatedField",
+      "org.codehaus.jackson.impl.JsonGeneratorBase",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.util.ByteArrayBuilder",
+      "org.codehaus.jackson.PrettyPrinter",
+      "org.codehaus.jackson.map.jsontype.SubtypeResolver",
+      "org.codehaus.jackson.map.type.SimpleType",
+      "org.codehaus.jackson.map.util.StdDateFormat",
+      "org.codehaus.jackson.impl.Utf8Generator",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
+      "org.codehaus.jackson.JsonNode",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.codehaus.jackson.ObjectCodec",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethod",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.node.ArrayNode",
+      "org.codehaus.jackson.io.SegmentedStringWriter",
+      "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.map.BeanDescription",
+      "org.codehaus.jackson.impl.WriterBasedGenerator",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.sym.Name",
+      "org.codehaus.jackson.map.introspect.BasicBeanDescription",
+      "org.codehaus.jackson.util.TokenBuffer",
+      "org.codehaus.jackson.map.DeserializationContext",
+      "org.codehaus.jackson.impl.JsonParserBase",
+      "org.codehaus.jackson.map.JsonMappingException",
+      "org.codehaus.jackson.map.introspect.AnnotatedMember",
+      "org.codehaus.jackson.type.JavaType",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.annotate.JsonRootName",
+      "org.codehaus.jackson.JsonParser",
+      "org.codehaus.jackson.node.NullNode",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.codehaus.jackson.node.TreeTraversingParser",
+      "org.codehaus.jackson.map.type.CollectionType",
+      "org.codehaus.jackson.map.MapperConfig",
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.map.Module$SetupContext",
+      "org.codehaus.jackson.io.UTF8Writer",
+      "org.codehaus.jackson.map.type.MapType",
+      "org.codehaus.jackson.annotate.JsonAutoDetect",
+      "org.codehaus.jackson.map.type.ArrayType",
+      "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateVfModuleRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponseESTest.java
new file mode 100644 (file)
index 0000000..b6719ef
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:29:29 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateVfModuleResponseESTest extends CreateVfModuleResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      createVfModuleResponse0.setVnfId("IJ@");
+      String string0 = createVfModuleResponse0.getVnfId();
+      assertEquals("IJ@", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      Boolean boolean0 = Boolean.TRUE;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse("", "", "", boolean0, (Map<String, String>) hashMap0, (VfModuleRollback) null, "");
+      String string0 = createVfModuleResponse0.getVnfId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      createVfModuleResponse0.setVfModuleStackId(", tenantCreated=");
+      String string0 = createVfModuleResponse0.getVfModuleStackId();
+      assertEquals(", tenantCreated=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse("j|[9Y&=Ke", ", tenant=", "", boolean0, (Map<String, String>) hashMap0, (VfModuleRollback) null, ", tenant=");
+      String string0 = createVfModuleResponse0.getVfModuleStackId();
+      assertEquals(", tenant=", createVfModuleResponse0.getVfModuleId());
+      assertEquals("", string0);
+      assertEquals("j|[9Y&=Ke", createVfModuleResponse0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      Boolean boolean0 = new Boolean("");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse("Dz?II3`92;Y(@b$'\"", "Dz?II3`92;Y(@b$'\"", "", boolean0, (Map<String, String>) null, vfModuleRollback0, "Dz?II3`92;Y(@b$'\"");
+      createVfModuleResponse0.getVfModuleOutputs();
+      assertEquals("", createVfModuleResponse0.getVfModuleStackId());
+      assertEquals("Dz?II3`92;Y(@b$'\"", createVfModuleResponse0.getVfModuleId());
+      assertEquals("Dz?II3`92;Y(@b$'\"", createVfModuleResponse0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("01.rc\"}EZ", "01.rc\"}EZ");
+      createVfModuleResponse0.setVfModuleOutputs(hashMap0);
+      Map<String, String> map0 = createVfModuleResponse0.getVfModuleOutputs();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse("j|[9Y&=Ke", ", tenant=", "", boolean0, (Map<String, String>) hashMap0, (VfModuleRollback) null, ", tenant=");
+      String string0 = createVfModuleResponse0.getVfModuleId();
+      assertEquals("", createVfModuleResponse0.getVfModuleStackId());
+      assertEquals(", tenant=", string0);
+      assertEquals("j|[9Y&=Ke", createVfModuleResponse0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      Boolean boolean0 = Boolean.TRUE;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse("", "", "", boolean0, (Map<String, String>) hashMap0, (VfModuleRollback) null, "");
+      String string0 = createVfModuleResponse0.getVfModuleId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      Boolean boolean0 = createVfModuleResponse0.getVfModuleCreated();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      Map<String, String> map0 = createVfModuleResponse0.getVfModuleOutputs();
+      MsoRequest msoRequest0 = new MsoRequest("a", "");
+      VnfRollback vnfRollback0 = new VnfRollback("a", "", (String) null, true, false, msoRequest0, "", (String) null, "a");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, "a", "", "W[dY\7f");
+      CreateVfModuleResponse createVfModuleResponse1 = new CreateVfModuleResponse("a", "", "", boolean0, (Map<String, String>) map0, vfModuleRollback0, "Q");
+      createVfModuleResponse1.getVfModuleCreated();
+      assertEquals("", createVfModuleResponse1.getVfModuleStackId());
+      assertEquals("", createVfModuleResponse1.getVfModuleId());
+      assertEquals("a", createVfModuleResponse1.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      createVfModuleResponse0.setRollback((VfModuleRollback) null);
+      VfModuleRollback vfModuleRollback0 = createVfModuleResponse0.getRollback();
+      assertNull(vfModuleRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      MsoRequest msoRequest0 = new MsoRequest();
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback("", "", "GC", true, "", "", msoRequest0, "");
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse("", "", "", boolean0, (Map<String, String>) null, vfModuleRollback0, "xoOjQ;h*'Qx&0ys4");
+      createVfModuleResponse0.getRollback();
+      assertEquals("", createVfModuleResponse0.getVnfId());
+      assertEquals("", createVfModuleResponse0.getVfModuleStackId());
+      assertEquals("", createVfModuleResponse0.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      Boolean boolean0 = new Boolean("");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse("Dz?II3`92;Y(@b$'\"", "Dz?II3`92;Y(@b$'\"", "", boolean0, (Map<String, String>) null, vfModuleRollback0, "Dz?II3`92;Y(@b$'\"");
+      createVfModuleResponse0.getVfModuleCreated();
+      assertEquals("Dz?II3`92;Y(@b$'\"", createVfModuleResponse0.getVfModuleId());
+      assertEquals("", createVfModuleResponse0.getVfModuleStackId());
+      assertEquals("Dz?II3`92;Y(@b$'\"", createVfModuleResponse0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      String string0 = createVfModuleResponse0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      String string0 = createVfModuleResponse0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      VfModuleRollback vfModuleRollback0 = createVfModuleResponse0.getRollback();
+      assertNull(vfModuleRollback0.getCloudSiteId());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      String string0 = createVfModuleResponse0.getVfModuleStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      createVfModuleResponse0.setVfModuleCreated((Boolean) null);
+      assertNull(createVfModuleResponse0.getVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CreateVfModuleResponse createVfModuleResponse0 = new CreateVfModuleResponse();
+      createVfModuleResponse0.setVfModuleId((String) null);
+      assertNull(createVfModuleResponse0.getVnfId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..2e7c295
--- /dev/null
@@ -0,0 +1,101 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:29:29 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateVfModuleResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.CreateVfModuleResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateVfModuleResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.openstack.beans.VnfRollback",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.vnfrest.VfModuleRollback",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName",
+      "org.openecomp.mso.adapters.vnfrest.CreateVfModuleResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateVfModuleResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequestESTest.java
new file mode 100644 (file)
index 0000000..42a4ff7
--- /dev/null
@@ -0,0 +1,367 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:25:19 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.System;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateVolumeGroupRequestESTest extends CreateVolumeGroupRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      assertNull(createVolumeGroupRequest0.getVnfVersion());
+      
+      CreateVolumeGroupRequest createVolumeGroupRequest1 = new CreateVolumeGroupRequest();
+      MsoRequest msoRequest0 = createVolumeGroupRequest1.getMsoRequest();
+      createVolumeGroupRequest0.setMsoRequest(msoRequest0);
+      Boolean boolean0 = new Boolean(true);
+      createVolumeGroupRequest0.toXmlString();
+      createVolumeGroupRequest0.setVnfVersion("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<createVolumeGroupRequest>\n    <msoRequest/>\n    <volumeGroupParams/>\n</createVolumeGroupRequest>\n");
+      Boolean.compare(true, false);
+      createVolumeGroupRequest0.setFailIfExists(boolean0);
+      createVolumeGroupRequest0.getTenantId();
+      createVolumeGroupRequest0.getSuppressBackout();
+      createVolumeGroupRequest0.getVnfVersion();
+      createVolumeGroupRequest1.getVnfVersion();
+      createVolumeGroupRequest1.getVolumeGroupName();
+      Boolean boolean1 = createVolumeGroupRequest0.getSuppressBackout();
+      assertNull(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      Boolean boolean0 = Boolean.FALSE;
+      Boolean.getBoolean("p?:e~");
+      createVolumeGroupRequest0.setFailIfExists(boolean0);
+      createVolumeGroupRequest0.toXmlString();
+      createVolumeGroupRequest0.setVnfVersion("\r>M+*VxIe4t0");
+      createVolumeGroupRequest0.getFailIfExists();
+      createVolumeGroupRequest0.toXmlString();
+      createVolumeGroupRequest0.setVolumeGroupId("");
+      createVolumeGroupRequest0.getVfModuleType();
+      createVolumeGroupRequest0.getSuppressBackout();
+      createVolumeGroupRequest0.setVnfVersion("");
+      createVolumeGroupRequest0.getVolumeGroupName();
+      createVolumeGroupRequest0.setMsoRequest((MsoRequest) null);
+      createVolumeGroupRequest0.setTenantId((String) null);
+      createVolumeGroupRequest0.getTenantId();
+      createVolumeGroupRequest0.setMsoRequest((MsoRequest) null);
+      assertNull(createVolumeGroupRequest0.getVolumeGroupName());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      Boolean boolean0 = Boolean.valueOf(true);
+      createVolumeGroupRequest0.setFailIfExists(boolean0);
+      createVolumeGroupRequest0.setVnfVersion("");
+      createVolumeGroupRequest0.getFailIfExists();
+      createVolumeGroupRequest0.getVnfVersion();
+      Boolean boolean1 = createVolumeGroupRequest0.getFailIfExists();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.setVfModuleType("@ 8T");
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      createVolumeGroupRequest0.setVolumeGroupParams(hashMap0);
+      createVolumeGroupRequest0.getSuppressBackout();
+      createVolumeGroupRequest0.setVolumeGroupId("@ 8T");
+      createVolumeGroupRequest0.setVolumeGroupId("@ 8T");
+      createVolumeGroupRequest0.setVolumeGroupName("@ 8T");
+      createVolumeGroupRequest0.getVolumeGroupName();
+      createVolumeGroupRequest0.getVnfType();
+      String string0 = createVolumeGroupRequest0.getVolumeGroupName();
+      String string1 = createVolumeGroupRequest0.getVfModuleType();
+      assertTrue(string1.equals((Object)string0));
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.setVnfType("");
+      createVolumeGroupRequest0.setVolumeGroupId("I<\"*}");
+      createVolumeGroupRequest0.setTenantId("");
+      createVolumeGroupRequest0.setMessageId("gZK#x[BqFD");
+      createVolumeGroupRequest0.getVnfType();
+      createVolumeGroupRequest0.getTenantId();
+      Boolean boolean0 = new Boolean(true);
+      Boolean.logicalOr(true, true);
+      createVolumeGroupRequest0.setSuppressBackout(boolean0);
+      createVolumeGroupRequest0.setFailIfExists(boolean0);
+      assertTrue(createVolumeGroupRequest0.isSynchronous());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.getSkipAAI();
+      createVolumeGroupRequest0.setFailIfExists((Boolean) null);
+      createVolumeGroupRequest0.setVfModuleType("");
+      createVolumeGroupRequest0.setNotificationUrl("");
+      createVolumeGroupRequest0.setVnfType((String) null);
+      CreateVolumeGroupRequest createVolumeGroupRequest1 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.getSuppressBackout();
+      MsoRequest msoRequest0 = new MsoRequest();
+      createVolumeGroupRequest0.setMsoRequest(msoRequest0);
+      String string0 = createVolumeGroupRequest0.getVfModuleType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      MsoRequest msoRequest0 = createVolumeGroupRequest0.getMsoRequest();
+      createVolumeGroupRequest0.setMsoRequest(msoRequest0);
+      assertNull(createVolumeGroupRequest0.getVnfType());
+      
+      createVolumeGroupRequest0.getVnfVersion();
+      createVolumeGroupRequest0.getTenantId();
+      Boolean boolean0 = Boolean.TRUE;
+      createVolumeGroupRequest0.setSkipAAI(boolean0);
+      createVolumeGroupRequest0.setSuppressBackout(boolean0);
+      Boolean boolean1 = createVolumeGroupRequest0.getSuppressBackout();
+      createVolumeGroupRequest0.setVnfVersion("");
+      Boolean.compare(false, false);
+      createVolumeGroupRequest0.setSuppressBackout(boolean1);
+      assertNull(createVolumeGroupRequest0.getVolumeGroupName());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("", "");
+      createVolumeGroupRequest0.setVolumeGroupParams(hashMap0);
+      createVolumeGroupRequest0.getVolumeGroupParams();
+      createVolumeGroupRequest0.setVfModuleType("jaxb.formatted.output");
+      assertNull(createVolumeGroupRequest0.getVnfType());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      CreateVolumeGroupRequest createVolumeGroupRequest1 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest1.getSkipAAI();
+      createVolumeGroupRequest0.setFailIfExists((Boolean) null);
+      createVolumeGroupRequest0.setVnfType("Hi&CG{k}/*QY9RvXr");
+      createVolumeGroupRequest1.setMessageId("");
+      createVolumeGroupRequest1.setVnfType("xUUBE/B}M{1");
+      String string0 = createVolumeGroupRequest1.getVnfType();
+      assertEquals("xUUBE/B}M{1", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.setCloudSiteId("");
+      createVolumeGroupRequest0.setVolumeGroupId("");
+      createVolumeGroupRequest0.setMessageId("");
+      createVolumeGroupRequest0.setVfModuleType("");
+      String string0 = createVolumeGroupRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      CreateVolumeGroupRequest createVolumeGroupRequest1 = new CreateVolumeGroupRequest();
+      Map<String, String> map0 = createVolumeGroupRequest1.getVolumeGroupParams();
+      createVolumeGroupRequest1.setVolumeGroupParams(map0);
+      createVolumeGroupRequest0.setTenantId("$m=");
+      createVolumeGroupRequest0.setVolumeGroupParams(map0);
+      createVolumeGroupRequest1.getSuppressBackout();
+      createVolumeGroupRequest0.getTenantId();
+      createVolumeGroupRequest1.setVolumeGroupId((String) null);
+      createVolumeGroupRequest0.getVfModuleType();
+      createVolumeGroupRequest0.getSuppressBackout();
+      createVolumeGroupRequest0.setFailIfExists((Boolean) null);
+      createVolumeGroupRequest0.getSuppressBackout();
+      createVolumeGroupRequest0.setSuppressBackout((Boolean) null);
+      createVolumeGroupRequest0.getVnfType();
+      String string0 = createVolumeGroupRequest1.getVfModuleType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      MsoRequest msoRequest0 = new MsoRequest("V", "");
+      createVolumeGroupRequest0.setMsoRequest(msoRequest0);
+      createVolumeGroupRequest0.setVolumeGroupId("V");
+      createVolumeGroupRequest0.getVolumeGroupId();
+      Map<String, String> map0 = createVolumeGroupRequest0.getVolumeGroupParams();
+      assertEquals(0, map0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.setCloudSiteId("q^BO");
+      createVolumeGroupRequest0.setCloudSiteId(")|yH");
+      Boolean boolean0 = new Boolean(true);
+      Boolean.logicalXor(true, true);
+      createVolumeGroupRequest0.setSuppressBackout(boolean0);
+      createVolumeGroupRequest0.setVnfVersion("1SaWHwHs.6GKc|");
+      createVolumeGroupRequest0.getCloudSiteId();
+      CreateVolumeGroupRequest createVolumeGroupRequest1 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.getCloudSiteId();
+      CreateVolumeGroupRequest createVolumeGroupRequest2 = new CreateVolumeGroupRequest();
+      assertNull(createVolumeGroupRequest2.getVfModuleType());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      Boolean boolean0 = Boolean.valueOf(true);
+      createVolumeGroupRequest0.setVolumeGroupId("");
+      createVolumeGroupRequest0.setFailIfExists(boolean0);
+      createVolumeGroupRequest0.setSuppressBackout(boolean0);
+      createVolumeGroupRequest0.getVolumeGroupName();
+      CreateVolumeGroupRequest createVolumeGroupRequest1 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.getVolumeGroupId();
+      createVolumeGroupRequest0.setVolumeGroupId((String) null);
+      createVolumeGroupRequest1.setTenantId("k|l4f6h+M:_");
+      assertNull(createVolumeGroupRequest1.getVnfVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.toXmlString();
+      createVolumeGroupRequest0.setMsoRequest((MsoRequest) null);
+      createVolumeGroupRequest0.setVfModuleType("");
+      createVolumeGroupRequest0.getFailIfExists();
+      createVolumeGroupRequest0.setSuppressBackout((Boolean) null);
+      createVolumeGroupRequest0.setSuppressBackout((Boolean) null);
+      createVolumeGroupRequest0.getMsoRequest();
+      createVolumeGroupRequest0.setMsoRequest((MsoRequest) null);
+      createVolumeGroupRequest0.setVnfVersion("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<createVolumeGroupRequest>\n    <msoRequest/>\n    <volumeGroupParams/>\n</createVolumeGroupRequest>\n");
+      createVolumeGroupRequest0.getVolumeGroupId();
+      String string0 = createVolumeGroupRequest0.getVolumeGroupName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.setVolumeGroupId("C}BU:zm--=1Md");
+      Boolean boolean0 = Boolean.valueOf(false);
+      createVolumeGroupRequest0.setSuppressBackout(boolean0);
+      createVolumeGroupRequest0.setVnfVersion("");
+      createVolumeGroupRequest0.setVfModuleType("i%IbRNJ6X^k'i&e+s");
+      createVolumeGroupRequest0.setVnfType("");
+      createVolumeGroupRequest0.getSuppressBackout();
+      createVolumeGroupRequest0.setVolumeGroupId("i%IbRNJ6X^k'i&e+s");
+      createVolumeGroupRequest0.setTenantId("");
+      createVolumeGroupRequest0.setVolumeGroupId("");
+      createVolumeGroupRequest0.setVnfVersion("VK&a");
+      createVolumeGroupRequest0.setTenantId("");
+      assertEquals("", createVolumeGroupRequest0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      String string0 = createVolumeGroupRequest0.getVnfVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      String string0 = createVolumeGroupRequest0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.setVolumeGroupId("");
+      assertNull(createVolumeGroupRequest0.getVolumeGroupName());
+      
+      String string0 = createVolumeGroupRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.getVolumeGroupParams();
+      createVolumeGroupRequest0.getVnfType();
+      createVolumeGroupRequest0.setCloudSiteId("");
+      assertEquals("", createVolumeGroupRequest0.getCloudSiteId());
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.getFailIfExists();
+      createVolumeGroupRequest0.setSuppressBackout((Boolean) null);
+      assertNull(createVolumeGroupRequest0.getVnfType());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.setNotificationUrl("");
+      createVolumeGroupRequest0.setVolumeGroupParams((Map<String, String>) null);
+      createVolumeGroupRequest0.getFailIfExists();
+      Boolean.compare(true, true);
+      createVolumeGroupRequest0.setFailIfExists((Boolean) null);
+      createVolumeGroupRequest0.getFailIfExists();
+      createVolumeGroupRequest0.setVolumeGroupName("");
+      createVolumeGroupRequest0.getVolumeGroupName();
+      createVolumeGroupRequest0.getVolumeGroupParams();
+      System.setCurrentTimeMillis(0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.getSuppressBackout();
+      createVolumeGroupRequest0.setFailIfExists((Boolean) null);
+      assertNull(createVolumeGroupRequest0.getVfModuleType());
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.setVolumeGroupName("");
+      assertNull(createVolumeGroupRequest0.getNotificationUrl());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      createVolumeGroupRequest0.toXmlString();
+      String string0 = createVolumeGroupRequest0.getVolumeGroupId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      Map<String, String> map0 = createVolumeGroupRequest0.getVolumeGroupParams();
+      assertTrue(map0.isEmpty());
+      
+      createVolumeGroupRequest0.setVolumeGroupParams(map0);
+      assertNull(createVolumeGroupRequest0.getVolumeGroupName());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..2cd4efc
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:25:19 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateVolumeGroupRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.CreateVolumeGroupRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateVolumeGroupRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.CreateVolumeGroupRequest",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateVolumeGroupRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponseESTest.java
new file mode 100644 (file)
index 0000000..141d7f8
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:22:14 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateVolumeGroupResponseESTest extends CreateVolumeGroupResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      createVolumeGroupResponse0.setVolumeGroupStackId("#soQ+\"O.VGnL");
+      String string0 = createVolumeGroupResponse0.getVolumeGroupStackId();
+      assertEquals("#soQ+\"O.VGnL", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      createVolumeGroupResponse0.setVolumeGroupOutputs((Map<String, String>) null);
+      Map<String, String> map0 = createVolumeGroupResponse0.getVolumeGroupOutputs();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put(",MyEf", ",MyEf");
+      createVolumeGroupResponse0.setVolumeGroupOutputs(hashMap0);
+      Map<String, String> map0 = createVolumeGroupResponse0.getVolumeGroupOutputs();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      createVolumeGroupResponse0.setVolumeGroupId(".X(v-Tvwzh&");
+      String string0 = createVolumeGroupResponse0.getVolumeGroupId();
+      assertEquals(".X(v-Tvwzh&", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      createVolumeGroupResponse0.setVolumeGroupId("");
+      String string0 = createVolumeGroupResponse0.getVolumeGroupId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      Boolean boolean0 = Boolean.valueOf(true);
+      createVolumeGroupResponse0.setVolumeGroupCreated(boolean0);
+      Boolean boolean1 = createVolumeGroupResponse0.getVolumeGroupCreated();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      Boolean boolean0 = new Boolean("^MG80I,4g3M>=01Xp");
+      createVolumeGroupResponse0.setVolumeGroupCreated(boolean0);
+      Boolean boolean1 = createVolumeGroupResponse0.getVolumeGroupCreated();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      createVolumeGroupResponse0.setVolumeGroupStackId("");
+      String string0 = createVolumeGroupResponse0.getVolumeGroupStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      VolumeGroupRollback volumeGroupRollback0 = createVolumeGroupResponse0.getVolumeGroupRollback();
+      volumeGroupRollback0.setVolumeGroupCreated(true);
+      VolumeGroupRollback volumeGroupRollback1 = createVolumeGroupResponse0.getVolumeGroupRollback();
+      assertSame(volumeGroupRollback1, volumeGroupRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      createVolumeGroupResponse0.setVolumeGroupRollback((VolumeGroupRollback) null);
+      VolumeGroupRollback volumeGroupRollback0 = createVolumeGroupResponse0.getVolumeGroupRollback();
+      assertNull(volumeGroupRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      Boolean boolean0 = createVolumeGroupResponse0.getVolumeGroupCreated();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      String string0 = createVolumeGroupResponse0.getVolumeGroupStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      String string0 = createVolumeGroupResponse0.getVolumeGroupId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      Map<String, String> map0 = createVolumeGroupResponse0.getVolumeGroupOutputs();
+      createVolumeGroupResponse0.setVolumeGroupOutputs(map0);
+      assertNull(createVolumeGroupResponse0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateVolumeGroupResponse createVolumeGroupResponse0 = new CreateVolumeGroupResponse();
+      Map<String, String> map0 = createVolumeGroupResponse0.getVolumeGroupOutputs();
+      CreateVolumeGroupResponse createVolumeGroupResponse1 = new CreateVolumeGroupResponse("", "", (Boolean) null, map0, (VolumeGroupRollback) null, "");
+      assertEquals("", createVolumeGroupResponse1.getVolumeGroupStackId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..990517d
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:22:14 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateVolumeGroupResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.CreateVolumeGroupResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateVolumeGroupResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.VolumeGroupRollback",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.openecomp.mso.adapters.vnfrest.CreateVolumeGroupResponse",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CreateVolumeGroupResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequestESTest.java
new file mode 100644 (file)
index 0000000..8c2d6b7
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:28:35 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteVfModuleRequestESTest extends DeleteVfModuleRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setVnfId("5=?YJsH");
+      String string0 = deleteVfModuleRequest0.getVnfId();
+      assertEquals("5=?YJsH", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setVfModuleStackId("}VSDk5?");
+      String string0 = deleteVfModuleRequest0.getVfModuleStackId();
+      assertEquals("}VSDk5?", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setVfModuleId("S\7fi8s(O0S8");
+      String string0 = deleteVfModuleRequest0.getVfModuleId();
+      assertEquals("S\7fi8s(O0S8", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setTenantId("");
+      String string0 = deleteVfModuleRequest0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setMsoRequest((MsoRequest) null);
+      MsoRequest msoRequest0 = deleteVfModuleRequest0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setCloudSiteId("");
+      String string0 = deleteVfModuleRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      String string0 = deleteVfModuleRequest0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      String string0 = deleteVfModuleRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setTenantId("[!?QZiHc2[");
+      String string0 = deleteVfModuleRequest0.getTenantId();
+      assertEquals("[!?QZiHc2[", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setVnfId("");
+      String string0 = deleteVfModuleRequest0.getVnfId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setCloudSiteId("jaxb.formatted.output");
+      String string0 = deleteVfModuleRequest0.getCloudSiteId();
+      assertEquals("jaxb.formatted.output", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      String string0 = deleteVfModuleRequest0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      String string0 = deleteVfModuleRequest0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setVfModuleId("");
+      String string0 = deleteVfModuleRequest0.getVfModuleId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setVfModuleStackId("");
+      String string0 = deleteVfModuleRequest0.getVfModuleStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      MsoRequest msoRequest0 = deleteVfModuleRequest0.getMsoRequest();
+      deleteVfModuleRequest0.setMsoRequest(msoRequest0);
+      assertNull(deleteVfModuleRequest0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      String string0 = deleteVfModuleRequest0.getVfModuleStackId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..3090fbc
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:28:35 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteVfModuleRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.DeleteVfModuleRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteVfModuleRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.vnfrest.DeleteVfModuleRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteVfModuleRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponseESTest.java
new file mode 100644 (file)
index 0000000..e141f4b
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:11:34 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteVfModuleResponseESTest extends DeleteVfModuleResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse();
+      String string0 = deleteVfModuleResponse0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse("", "", boolean0, "");
+      String string0 = deleteVfModuleResponse0.getVnfId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse();
+      String string0 = deleteVfModuleResponse0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf("");
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse("", "", boolean0, "");
+      String string0 = deleteVfModuleResponse0.getVfModuleId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse();
+      Boolean boolean0 = deleteVfModuleResponse0.getVfModuleDeleted();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf("");
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse("", "", boolean0, "");
+      Boolean boolean1 = deleteVfModuleResponse0.getVfModuleDeleted();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf(true);
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse("0ID1Ty#VhJ)'G`m%:", "ZtG4nF]b8,X8", boolean0, "V)B9%\"dq&%l{_Ou@");
+      String string0 = deleteVfModuleResponse0.getVfModuleId();
+      assertEquals("ZtG4nF]b8,X8", string0);
+      assertEquals("0ID1Ty#VhJ)'G`m%:", deleteVfModuleResponse0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse();
+      Boolean boolean0 = Boolean.valueOf("");
+      deleteVfModuleResponse0.setVfModuleDeleted(boolean0);
+      assertNull(deleteVfModuleResponse0.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse();
+      deleteVfModuleResponse0.setVfModuleId("D:`0Q");
+      assertNull(deleteVfModuleResponse0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse("%cklg~Aa", "h*U[;Rpm9k o5[<", boolean0, "%cklg~Aa");
+      String string0 = deleteVfModuleResponse0.getVnfId();
+      assertEquals("h*U[;Rpm9k o5[<", deleteVfModuleResponse0.getVfModuleId());
+      assertEquals("%cklg~Aa", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf(true);
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse("0ID1Ty#VhJ)'G`m%:", "ZtG4nF]b8,X8", boolean0, "V)B9%\"dq&%l{_Ou@");
+      deleteVfModuleResponse0.getVfModuleDeleted();
+      assertEquals("ZtG4nF]b8,X8", deleteVfModuleResponse0.getVfModuleId());
+      assertEquals("0ID1Ty#VhJ)'G`m%:", deleteVfModuleResponse0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      Boolean boolean0 = Boolean.valueOf("");
+      DeleteVfModuleResponse deleteVfModuleResponse0 = new DeleteVfModuleResponse("", "", boolean0, "");
+      deleteVfModuleResponse0.setVnfId("");
+      assertEquals("", deleteVfModuleResponse0.getVnfId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c1b3717
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:11:34 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteVfModuleResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.DeleteVfModuleResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteVfModuleResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.DeleteVfModuleResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteVfModuleResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequestESTest.java
new file mode 100644 (file)
index 0000000..e9d6d0e
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:17:10 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteVolumeGroupRequestESTest extends DeleteVolumeGroupRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setVolumeGroupStackId("");
+      String string0 = deleteVolumeGroupRequest0.getVolumeGroupStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setVolumeGroupId("");
+      String string0 = deleteVolumeGroupRequest0.getVolumeGroupId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setTenantId("yv3_q/ h?N");
+      String string0 = deleteVolumeGroupRequest0.getTenantId();
+      assertEquals("yv3_q/ h?N", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setMsoRequest((MsoRequest) null);
+      MsoRequest msoRequest0 = deleteVolumeGroupRequest0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setCloudSiteId("u'!&M 10_");
+      String string0 = deleteVolumeGroupRequest0.getCloudSiteId();
+      assertEquals("u'!&M 10_", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      String string0 = deleteVolumeGroupRequest0.getVolumeGroupId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setVolumeGroupId(")wf3_");
+      String string0 = deleteVolumeGroupRequest0.getVolumeGroupId();
+      assertEquals(")wf3_", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setVolumeGroupStackId("jaxb.formatted.output");
+      String string0 = deleteVolumeGroupRequest0.getVolumeGroupStackId();
+      assertEquals("jaxb.formatted.output", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setTenantId("");
+      String string0 = deleteVolumeGroupRequest0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      MsoRequest msoRequest0 = deleteVolumeGroupRequest0.getMsoRequest();
+      deleteVolumeGroupRequest0.setMsoRequest(msoRequest0);
+      assertNull(msoRequest0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setCloudSiteId("");
+      String string0 = deleteVolumeGroupRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      String string0 = deleteVolumeGroupRequest0.getVolumeGroupStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      String string0 = deleteVolumeGroupRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      String string0 = deleteVolumeGroupRequest0.getTenantId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8441202
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:17:10 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteVolumeGroupRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.DeleteVolumeGroupRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteVolumeGroupRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.vnfrest.DeleteVolumeGroupRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteVolumeGroupRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponseESTest.java
new file mode 100644 (file)
index 0000000..2947693
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:18:54 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteVolumeGroupResponseESTest extends DeleteVolumeGroupResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      DeleteVolumeGroupResponse deleteVolumeGroupResponse0 = new DeleteVolumeGroupResponse(boolean0, (String) null);
+      Boolean boolean1 = new Boolean("");
+      deleteVolumeGroupResponse0.setVolumeGroupDeleted(boolean1);
+      Boolean boolean2 = deleteVolumeGroupResponse0.getVolumeGroupDeleted();
+      assertFalse(boolean2.equals((Object)boolean0));
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      DeleteVolumeGroupResponse deleteVolumeGroupResponse0 = new DeleteVolumeGroupResponse();
+      Boolean boolean0 = deleteVolumeGroupResponse0.getVolumeGroupDeleted();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      DeleteVolumeGroupResponse deleteVolumeGroupResponse0 = new DeleteVolumeGroupResponse(boolean0, (String) null);
+      Boolean boolean1 = deleteVolumeGroupResponse0.getVolumeGroupDeleted();
+      assertTrue(boolean1);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..f0476f6
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:18:54 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteVolumeGroupResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.DeleteVolumeGroupResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteVolumeGroupResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.DeleteVolumeGroupResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DeleteVolumeGroupResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponseESTest.java
new file mode 100644 (file)
index 0000000..61e9884
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:15:19 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.openstack.beans.VnfStatus;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryVfModuleResponseESTest extends QueryVfModuleResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      queryVfModuleResponse0.setVnfId("K@Avo(l_W.<jd$");
+      String string0 = queryVfModuleResponse0.getVnfId();
+      assertEquals("K@Avo(l_W.<jd$", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VnfStatus vnfStatus0 = VnfStatus.UNKNOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse("", "", "/iul.p>pa`\7fw<:0tL", vnfStatus0, (Map<String, String>) hashMap0);
+      String string0 = queryVfModuleResponse0.getVnfId();
+      assertEquals("/iul.p>pa`\7fw<:0tL", queryVfModuleResponse0.getVfModuleStackId());
+      assertEquals("", string0);
+      assertEquals("", queryVfModuleResponse0.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VnfStatus vnfStatus0 = VnfStatus.UNKNOWN;
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse("", "", "", vnfStatus0, (Map<String, String>) null);
+      String string0 = queryVfModuleResponse0.getVfModuleStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      VnfStatus vnfStatus0 = VnfStatus.UNKNOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse("", "", "/iul.p>pa`\7fw<:0tL", vnfStatus0, (Map<String, String>) hashMap0);
+      queryVfModuleResponse0.getVfModuleOutputs();
+      assertEquals("", queryVfModuleResponse0.getVnfId());
+      assertEquals("/iul.p>pa`\7fw<:0tL", queryVfModuleResponse0.getVfModuleStackId());
+      assertEquals("", queryVfModuleResponse0.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VnfStatus vnfStatus0 = VnfStatus.UNKNOWN;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse("", "", "q'&!##_pFRAIJ4uo]*=", vnfStatus0, (Map<String, String>) hashMap0);
+      hashMap0.put("q'&!##_pFRAIJ4uo]*=", "");
+      queryVfModuleResponse0.getVfModuleOutputs();
+      assertEquals("", queryVfModuleResponse0.getVfModuleId());
+      assertEquals("q'&!##_pFRAIJ4uo]*=", queryVfModuleResponse0.getVfModuleStackId());
+      assertEquals("", queryVfModuleResponse0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VnfStatus vnfStatus0 = VnfStatus.FAILED;
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse("C5aGYYh%|7be0.E!NHp", "C5aGYYh%|7be0.E!NHp", "C5aGYYh%|7be0.E!NHp", vnfStatus0, (Map<String, String>) hashMap0);
+      String string0 = queryVfModuleResponse0.getVfModuleId();
+      assertEquals("C5aGYYh%|7be0.E!NHp", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      VnfStatus vnfStatus0 = VnfStatus.NOTFOUND;
+      queryVfModuleResponse0.setVnfStatus(vnfStatus0);
+      VnfStatus vnfStatus1 = queryVfModuleResponse0.getVnfStatus();
+      assertSame(vnfStatus1, vnfStatus0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      String string0 = queryVfModuleResponse0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      queryVfModuleResponse0.setVfModuleId("\"Sdeh");
+      assertNull(queryVfModuleResponse0.getVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      String string0 = queryVfModuleResponse0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      Map<String, String> map0 = queryVfModuleResponse0.getVfModuleOutputs();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      queryVfModuleResponse0.setVfModuleStackId("\"Sdeh");
+      String string0 = queryVfModuleResponse0.getVfModuleStackId();
+      assertEquals("\"Sdeh", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      // Undeclared exception!
+      try { 
+        queryVfModuleResponse0.toJsonString();
+        fail("Expecting exception: VerifyError");
+      
+      } catch(VerifyError e) {
+         //
+         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
+         //
+         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      queryVfModuleResponse0.setVfModuleOutputs(hashMap0);
+      assertNull(queryVfModuleResponse0.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      String string0 = queryVfModuleResponse0.getVfModuleStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      VnfStatus vnfStatus0 = VnfStatus.ACTIVE;
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse((String) null, "", "", vnfStatus0, (Map<String, String>) null);
+      String string0 = queryVfModuleResponse0.getVfModuleId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      QueryVfModuleResponse queryVfModuleResponse0 = new QueryVfModuleResponse();
+      queryVfModuleResponse0.getVnfStatus();
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..fcad1ea
--- /dev/null
@@ -0,0 +1,194 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:15:19 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class QueryVfModuleResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.QueryVfModuleResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryVfModuleResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.map.JsonSerializableWithType",
+      "org.codehaus.jackson.map.deser.StdDeserializerProvider",
+      "org.codehaus.jackson.map.SerializerFactory",
+      "org.codehaus.jackson.map.SerializerProvider",
+      "org.codehaus.jackson.map.SerializationConfig",
+      "org.codehaus.jackson.JsonProcessingException",
+      "org.codehaus.jackson.map.introspect.AnnotationMap",
+      "org.openecomp.mso.adapters.vnfrest.QueryVfModuleResponse",
+      "org.codehaus.jackson.map.introspect.Annotated",
+      "org.codehaus.jackson.map.util.Annotations",
+      "org.codehaus.jackson.sym.NameN",
+      "org.codehaus.jackson.JsonGenerator",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
+      "org.codehaus.jackson.map.JsonSerializable",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.node.BaseJsonNode",
+      "org.codehaus.jackson.map.DeserializerProvider",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.node.ValueNode",
+      "org.codehaus.jackson.map.ser.BeanSerializerFactory",
+      "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
+      "org.codehaus.jackson.map.AnnotationIntrospector",
+      "org.codehaus.jackson.map.MappingJsonFactory",
+      "org.codehaus.jackson.map.MapperConfig$Impl",
+      "org.codehaus.jackson.sym.Name1",
+      "org.codehaus.jackson.sym.Name2",
+      "org.codehaus.jackson.sym.Name3",
+      "org.codehaus.jackson.map.introspect.MethodFilter",
+      "org.codehaus.jackson.map.ser.StdSerializerProvider",
+      "org.codehaus.jackson.map.deser.StdDeserializationContext",
+      "org.codehaus.jackson.map.ClassIntrospector",
+      "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
+      "org.codehaus.jackson.Versioned",
+      "org.codehaus.jackson.map.type.TypeBase",
+      "org.codehaus.jackson.map.ser.BasicSerializerFactory",
+      "org.codehaus.jackson.node.ContainerNode",
+      "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
+      "org.codehaus.jackson.map.DeserializationConfig",
+      "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.codehaus.jackson.impl.ReaderBasedParser",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
+      "org.codehaus.jackson.map.type.MapLikeType",
+      "org.codehaus.jackson.node.ObjectNode",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
+      "org.codehaus.jackson.map.type.CollectionLikeType",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
+      "org.codehaus.jackson.impl.JsonParserMinimalBase",
+      "org.codehaus.jackson.map.type.TypeParser",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker",
+      "org.codehaus.jackson.map.introspect.AnnotatedField",
+      "org.codehaus.jackson.impl.JsonGeneratorBase",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.util.ByteArrayBuilder",
+      "org.codehaus.jackson.PrettyPrinter",
+      "org.codehaus.jackson.map.jsontype.SubtypeResolver",
+      "org.codehaus.jackson.map.type.SimpleType",
+      "org.codehaus.jackson.map.util.StdDateFormat",
+      "org.codehaus.jackson.impl.Utf8Generator",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
+      "org.codehaus.jackson.JsonNode",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.openstack.beans.VnfStatus",
+      "org.codehaus.jackson.ObjectCodec",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethod",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.node.ArrayNode",
+      "org.codehaus.jackson.io.SegmentedStringWriter",
+      "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.map.BeanDescription",
+      "org.codehaus.jackson.impl.WriterBasedGenerator",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.sym.Name",
+      "org.codehaus.jackson.map.introspect.BasicBeanDescription",
+      "org.codehaus.jackson.util.TokenBuffer",
+      "org.codehaus.jackson.map.DeserializationContext",
+      "org.codehaus.jackson.impl.JsonParserBase",
+      "org.codehaus.jackson.map.JsonMappingException",
+      "org.codehaus.jackson.map.introspect.AnnotatedMember",
+      "org.codehaus.jackson.type.JavaType",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.JsonParser",
+      "org.codehaus.jackson.node.NullNode",
+      "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
+      "org.codehaus.jackson.node.TreeTraversingParser",
+      "org.codehaus.jackson.map.type.CollectionType",
+      "org.codehaus.jackson.map.MapperConfig",
+      "org.codehaus.jackson.map.Module$SetupContext",
+      "org.codehaus.jackson.io.UTF8Writer",
+      "org.codehaus.jackson.map.type.MapType",
+      "org.codehaus.jackson.annotate.JsonAutoDetect",
+      "org.codehaus.jackson.map.type.ArrayType",
+      "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(QueryVfModuleResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequestESTest.java
new file mode 100644 (file)
index 0000000..3262059
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:14:23 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackVfModuleRequestESTest extends RollbackVfModuleRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackVfModuleRequest rollbackVfModuleRequest0 = new RollbackVfModuleRequest();
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("iL", "cG!", "", true, true, msoRequest0, "cG!", "", (String) null);
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, "", "", (String) null);
+      rollbackVfModuleRequest0.setVfModuleRollback(vfModuleRollback0);
+      VfModuleRollback vfModuleRollback1 = rollbackVfModuleRequest0.getVfModuleRollback();
+      assertEquals("", vfModuleRollback1.getVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RollbackVfModuleRequest rollbackVfModuleRequest0 = new RollbackVfModuleRequest();
+      MsoRequest msoRequest0 = new MsoRequest("MJ|D", "MJ|D");
+      VnfRollback vnfRollback0 = new VnfRollback("jaxb.formatted.output", "jaxb.formatted.output", "jaxb.formatted.output", false, false, msoRequest0, "", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, "jaxb.formatted.output", "jaxb.formatted.output");
+      rollbackVfModuleRequest0.setVfModuleRollback(vfModuleRollback0);
+      VfModuleRollback vfModuleRollback1 = rollbackVfModuleRequest0.getVfModuleRollback();
+      assertEquals("jaxb.formatted.output", vfModuleRollback1.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackVfModuleRequest rollbackVfModuleRequest0 = new RollbackVfModuleRequest();
+      VfModuleRollback vfModuleRollback0 = rollbackVfModuleRequest0.getVfModuleRollback();
+      assertNull(vfModuleRollback0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..aae081e
--- /dev/null
@@ -0,0 +1,102 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:14:23 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackVfModuleRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.RollbackVfModuleRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackVfModuleRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.openstack.beans.VnfRollback",
+      "org.openecomp.mso.adapters.vnfrest.VfModuleRollback",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.openecomp.mso.adapters.vnfrest.RollbackVfModuleRequest",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackVfModuleRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponseESTest.java
new file mode 100644 (file)
index 0000000..f0e6c09
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:20:06 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackVfModuleResponseESTest extends RollbackVfModuleResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      RollbackVfModuleResponse rollbackVfModuleResponse0 = new RollbackVfModuleResponse(boolean0, "W$Bqj~ \u0000}YvH");
+      Boolean boolean1 = rollbackVfModuleResponse0.getVfModuleRolledback();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      Boolean boolean0 = new Boolean("nR:)\"X2$B@=Yf<Y~Z");
+      RollbackVfModuleResponse rollbackVfModuleResponse0 = new RollbackVfModuleResponse(boolean0, "");
+      Boolean boolean1 = rollbackVfModuleResponse0.getVfModuleRolledback();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      Boolean boolean0 = new Boolean("nR:)\"X2$B@=Yf<Y~Z");
+      RollbackVfModuleResponse rollbackVfModuleResponse0 = new RollbackVfModuleResponse(boolean0, "");
+      rollbackVfModuleResponse0.setVfModuleRolledback(boolean0);
+      assertEquals("", rollbackVfModuleResponse0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      RollbackVfModuleResponse rollbackVfModuleResponse0 = new RollbackVfModuleResponse();
+      Boolean boolean0 = rollbackVfModuleResponse0.getVfModuleRolledback();
+      assertNull(boolean0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..e2202d8
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:20:06 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackVfModuleResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.RollbackVfModuleResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackVfModuleResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.RollbackVfModuleResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackVfModuleResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequestESTest.java
new file mode 100644 (file)
index 0000000..89ff8de
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:23:56 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackVolumeGroupRequestESTest extends RollbackVolumeGroupRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackVolumeGroupRequest rollbackVolumeGroupRequest0 = new RollbackVolumeGroupRequest();
+      rollbackVolumeGroupRequest0.setVolumeGroupRollback((VolumeGroupRollback) null);
+      assertNull(rollbackVolumeGroupRequest0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RollbackVolumeGroupRequest rollbackVolumeGroupRequest0 = new RollbackVolumeGroupRequest();
+      VolumeGroupRollback volumeGroupRollback0 = rollbackVolumeGroupRequest0.getVolumeGroupRollback();
+      assertNull(volumeGroupRollback0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..7b4fcaa
--- /dev/null
@@ -0,0 +1,101 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:23:56 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackVolumeGroupRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.RollbackVolumeGroupRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackVolumeGroupRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.VolumeGroupRollback",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName",
+      "org.openecomp.mso.adapters.vnfrest.RollbackVolumeGroupRequest"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackVolumeGroupRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponseESTest.java
new file mode 100644 (file)
index 0000000..c6804b2
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:15:06 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackVolumeGroupResponseESTest extends RollbackVolumeGroupResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      RollbackVolumeGroupResponse rollbackVolumeGroupResponse0 = new RollbackVolumeGroupResponse(boolean0, "");
+      Boolean boolean1 = rollbackVolumeGroupResponse0.getVolumeGroupRolledBack();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      Boolean boolean0 = Boolean.FALSE;
+      RollbackVolumeGroupResponse rollbackVolumeGroupResponse0 = new RollbackVolumeGroupResponse(boolean0, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<rollbackVolumeGroupResponse>\n    <messageId></messageId>\n    <volumeGroupRolledBack>true</volumeGroupRolledBack>\n</rollbackVolumeGroupResponse>\n");
+      Boolean boolean1 = rollbackVolumeGroupResponse0.getVolumeGroupRolledBack();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackVolumeGroupResponse rollbackVolumeGroupResponse0 = new RollbackVolumeGroupResponse();
+      rollbackVolumeGroupResponse0.setVolumeGroupRolledBack((Boolean) null);
+      assertNull(rollbackVolumeGroupResponse0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      RollbackVolumeGroupResponse rollbackVolumeGroupResponse0 = new RollbackVolumeGroupResponse();
+      Boolean boolean0 = rollbackVolumeGroupResponse0.getVolumeGroupRolledBack();
+      assertNull(boolean0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..d2acc79
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:15:06 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackVolumeGroupResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.RollbackVolumeGroupResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackVolumeGroupResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.RollbackVolumeGroupResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackVolumeGroupResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequestESTest.java
new file mode 100644 (file)
index 0000000..0702294
--- /dev/null
@@ -0,0 +1,746 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:24:18 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.System;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateVfModuleRequestESTest extends UpdateVfModuleRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.toXmlString();
+      updateVfModuleRequest0.setVfModuleId("xM");
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      updateVfModuleRequest0.setVnfType("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateVfModuleRequest>\n    <msoRequest/>\n    <vfModuleParams/>\n</updateVfModuleRequest>\n");
+      hashMap0.entrySet();
+      updateVfModuleRequest0.setVfModuleParams(hashMap0);
+      updateVfModuleRequest0.getVnfType();
+      updateVfModuleRequest0.setVfModuleId("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateVfModuleRequest>\n    <msoRequest/>\n    <vfModuleParams/>\n</updateVfModuleRequest>\n");
+      updateVfModuleRequest0.setVolumeGroupStackId("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateVfModuleRequest>\n    <msoRequest/>\n    <vfModuleParams/>\n</updateVfModuleRequest>\n");
+      updateVfModuleRequest0.setCloudSiteId("$i@h");
+      updateVfModuleRequest0.setVfModuleParams(hashMap0);
+      updateVfModuleRequest0.setTenantId("$i@h");
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateVfModuleRequest>\n    <msoRequest/>\n    <vfModuleParams/>\n</updateVfModuleRequest>\n");
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      Boolean boolean0 = new Boolean("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateVfModuleRequest>\n    <msoRequest/>\n    <vfModuleParams/>\n</updateVfModuleRequest>\n");
+      updateVfModuleRequest0.setFailIfExists(boolean0);
+      updateVfModuleRequest0.getVfModuleStackId();
+      updateVfModuleRequest0.getRequestType();
+      updateVfModuleRequest0.setBaseVfModuleId("$i@h");
+      updateVfModuleRequest0.setVfModuleId((String) null);
+      updateVfModuleRequest0.getVolumeGroupStackId();
+      String string0 = updateVfModuleRequest0.getTenantId();
+      assertEquals("$i@h", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVnfType(">LosD~A.W]T\"Ht");
+      updateVfModuleRequest0.setVfModuleStackId("");
+      updateVfModuleRequest0.setVnfType(">LosD~A.W]T\"Ht");
+      updateVfModuleRequest0.setBaseVfModuleStackId("rG\"Rcq79:TWr}bI");
+      updateVfModuleRequest0.getVfModuleName();
+      updateVfModuleRequest0.setVnfVersion((String) null);
+      updateVfModuleRequest0.setVfModuleType((String) null);
+      updateVfModuleRequest0.getVnfType();
+      String string0 = updateVfModuleRequest0.getVfModuleType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVfModuleStackId("");
+      updateVfModuleRequest0.getVfModuleId();
+      updateVfModuleRequest0.setVolumeGroupId("");
+      updateVfModuleRequest0.setVfModuleId(";Zz^*Eup;I8");
+      updateVfModuleRequest0.getTenantId();
+      updateVfModuleRequest0.setVfModuleName((String) null);
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.getVnfId();
+      updateVfModuleRequest0.getVfModuleId();
+      updateVfModuleRequest0.setVfModuleType((String) null);
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.setVfModuleId("p H/yV<46O");
+      updateVfModuleRequest0.setVnfId("");
+      assertNull(updateVfModuleRequest0.getVolumeGroupStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setBaseVfModuleId("y|.n5Xbo!qUzw");
+      updateVfModuleRequest0.setRequestType("y|.n5Xbo!qUzw");
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      updateVfModuleRequest0.getBaseVfModuleStackId();
+      updateVfModuleRequest0.getBaseVfModuleId();
+      MsoRequest msoRequest0 = updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.setSkipAAI((Boolean) null);
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.setRequestType("");
+      updateVfModuleRequest0.getVfModuleStackId();
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      updateVfModuleRequest0.setTenantId("");
+      assertNull(updateVfModuleRequest0.getVfModuleName());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVfModuleStackId("jaxb.formatted.output");
+      updateVfModuleRequest0.setVfModuleName("jaxb.formatted.output");
+      Boolean boolean0 = Boolean.valueOf("");
+      Boolean.logicalXor(false, false);
+      updateVfModuleRequest0.setFailIfExists(boolean0);
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.setVfModuleType("jaxb.formatted.output");
+      Boolean.logicalOr(true, true);
+      updateVfModuleRequest0.setBackout((Boolean) null);
+      updateVfModuleRequest0.getVfModuleStackId();
+      updateVfModuleRequest0.getVfModuleName();
+      updateVfModuleRequest0.setVolumeGroupId("jaxb.formatted.output");
+      updateVfModuleRequest0.getBaseVfModuleStackId();
+      updateVfModuleRequest0.setRequestType(".zGbDU h'`XYM2");
+      updateVfModuleRequest0.getVfModuleStackId();
+      updateVfModuleRequest0.setBaseVfModuleStackId("");
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.getVolumeGroupId();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      updateVfModuleRequest0.setVfModuleParams(hashMap0);
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      assertNull(updateVfModuleRequest0.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      Boolean boolean0 = updateVfModuleRequest0.getFailIfExists();
+      assertNull(boolean0);
+      
+      updateVfModuleRequest0.getVnfId();
+      updateVfModuleRequest0.setVnfVersion((String) null);
+      updateVfModuleRequest0.setBaseVfModuleId((String) null);
+      updateVfModuleRequest0.setVfModuleStackId("");
+      updateVfModuleRequest0.getVfModuleStackId();
+      // Undeclared exception!
+      try { 
+        updateVfModuleRequest0.toJsonString();
+        fail("Expecting exception: VerifyError");
+      
+      } catch(VerifyError e) {
+         //
+         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
+         //
+         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVfModuleStackId("tnNRSR)XN");
+      updateVfModuleRequest0.setCloudSiteId("");
+      updateVfModuleRequest0.setVnfId("");
+      updateVfModuleRequest0.setVfModuleType("");
+      updateVfModuleRequest0.setVfModuleStackId("");
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("");
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      updateVfModuleRequest0.setVfModuleName("*$x.GUPO|E:0LZ<");
+      String string0 = updateVfModuleRequest0.getVfModuleType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getVfModuleName();
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.setBackout((Boolean) null);
+      updateVfModuleRequest0.getVfModuleName();
+      updateVfModuleRequest0.setVolumeGroupStackId((String) null);
+      updateVfModuleRequest0.setRequestType("td");
+      updateVfModuleRequest0.getRequestType();
+      updateVfModuleRequest0.setVolumeGroupId((String) null);
+      updateVfModuleRequest0.getBaseVfModuleStackId();
+      MsoRequest msoRequest0 = updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      assertNull(updateVfModuleRequest0.getVolumeGroupStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVolumeGroupStackId("");
+      updateVfModuleRequest0.setVfModuleType("");
+      updateVfModuleRequest0.setVnfVersion("");
+      updateVfModuleRequest0.getVolumeGroupId();
+      MsoRequest msoRequest0 = new MsoRequest("jaxb.formatted.output", (String) null);
+      msoRequest0.setServiceInstanceId((String) null);
+      Boolean boolean0 = Boolean.FALSE;
+      updateVfModuleRequest0.setSkipAAI(boolean0);
+      msoRequest0.setServiceInstanceId((String) null);
+      msoRequest0.setServiceInstanceId("");
+      updateVfModuleRequest0.setVolumeGroupId("9oR~ ");
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      updateVfModuleRequest0.getVfModuleStackId();
+      updateVfModuleRequest0.setVfModuleName("");
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.getVfModuleName();
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.getRequestType();
+      String string0 = updateVfModuleRequest0.getRequestType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("8bJYY1&kKT", "8bJYY1&kKT");
+      hashMap0.entrySet();
+      updateVfModuleRequest0.setVfModuleParams(hashMap0);
+      updateVfModuleRequest0.toXmlString();
+      updateVfModuleRequest0.setVolumeGroupId((String) null);
+      updateVfModuleRequest0.getMsoRequest();
+      Boolean boolean0 = new Boolean(true);
+      Boolean.logicalAnd(true, true);
+      updateVfModuleRequest0.setBackout(boolean0);
+      updateVfModuleRequest0.getBackout();
+      Boolean boolean1 = Boolean.valueOf(true);
+      Boolean.logicalXor(true, true);
+      updateVfModuleRequest0.setFailIfExists(boolean1);
+      assertNull(updateVfModuleRequest0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVfModuleType(" h&a.O(2wp'tIm%yKJY");
+      MsoRequest msoRequest0 = updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      updateVfModuleRequest0.getVolumeGroupId();
+      updateVfModuleRequest0.getVolumeGroupId();
+      String string0 = updateVfModuleRequest0.getVfModuleType();
+      assertEquals(" h&a.O(2wp'tIm%yKJY", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setTenantId("");
+      updateVfModuleRequest0.setVolumeGroupStackId("");
+      updateVfModuleRequest0.setBaseVfModuleStackId("");
+      updateVfModuleRequest0.setVolumeGroupId("");
+      updateVfModuleRequest0.setBaseVfModuleId("Q)H$p?i^[$S\u0003_Q");
+      updateVfModuleRequest0.setVnfVersion("");
+      updateVfModuleRequest0.setTenantId("Q)H$p?i^[$S\u0003_Q");
+      updateVfModuleRequest0.setVfModuleId("");
+      updateVfModuleRequest0.getRequestType();
+      updateVfModuleRequest0.setVfModuleType("(");
+      String string0 = updateVfModuleRequest0.getVolumeGroupStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getCloudSiteId();
+      Map<String, String> map0 = updateVfModuleRequest0.getVfModuleParams();
+      updateVfModuleRequest0.setTenantId((String) null);
+      updateVfModuleRequest0.setBaseVfModuleStackId((String) null);
+      updateVfModuleRequest0.getBaseVfModuleId();
+      updateVfModuleRequest0.getTenantId();
+      updateVfModuleRequest0.setVfModuleStackId("");
+      updateVfModuleRequest0.setVfModuleParams(map0);
+      updateVfModuleRequest0.setBaseVfModuleId("og~*KEPst]:7");
+      updateVfModuleRequest0.setVfModuleStackId("");
+      updateVfModuleRequest0.setVnfId("");
+      Boolean boolean0 = new Boolean(false);
+      updateVfModuleRequest0.setBackout(boolean0);
+      updateVfModuleRequest0.setVnfType("");
+      String string0 = updateVfModuleRequest0.getBaseVfModuleId();
+      assertEquals("og~*KEPst]:7", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("tW$,C`\"=2HoY\"N", "tW$,C`\"=2HoY\"N");
+      updateVfModuleRequest0.setVfModuleParams(hashMap0);
+      updateVfModuleRequest0.setBaseVfModuleId((String) null);
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      updateVfModuleRequest0.getVnfVersion();
+      MsoRequest msoRequest0 = updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      msoRequest0.setRequestId("HA");
+      msoRequest0.setServiceInstanceId("}Fo|8N");
+      msoRequest0.setRequestId("");
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      Map<String, String> map0 = updateVfModuleRequest0.getVfModuleParams();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setTenantId("");
+      updateVfModuleRequest0.setMessageId("");
+      updateVfModuleRequest0.toXmlString();
+      updateVfModuleRequest0.setVfModuleType("");
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      updateVfModuleRequest0.setVolumeGroupId("");
+      updateVfModuleRequest0.setVfModuleType((String) null);
+      updateVfModuleRequest0.setNotificationUrl((String) null);
+      updateVfModuleRequest0.setBaseVfModuleStackId("");
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      updateVfModuleRequest0.getBaseVfModuleStackId();
+      Boolean boolean0 = Boolean.FALSE;
+      Boolean.logicalOr(false, false);
+      updateVfModuleRequest0.setFailIfExists(boolean0);
+      updateVfModuleRequest0.getRequestType();
+      updateVfModuleRequest0.setBaseVfModuleStackId("4N9!j*vkAv[");
+      updateVfModuleRequest0.setMessageId((String) null);
+      String string0 = updateVfModuleRequest0.getVnfType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setBaseVfModuleStackId("jaxb.formatted.output");
+      updateVfModuleRequest0.getVnfId();
+      updateVfModuleRequest0.getSkipAAI();
+      Boolean.getBoolean((String) null);
+      updateVfModuleRequest0.setFailIfExists((Boolean) null);
+      updateVfModuleRequest0.getBaseVfModuleStackId();
+      updateVfModuleRequest0.setVfModuleStackId((String) null);
+      Map<String, String> map0 = updateVfModuleRequest0.getVfModuleParams();
+      updateVfModuleRequest0.setVfModuleParams(map0);
+      String string0 = updateVfModuleRequest0.getRequestType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      Boolean boolean0 = Boolean.FALSE;
+      updateVfModuleRequest0.setTenantId("");
+      updateVfModuleRequest0.setVnfId("^");
+      Boolean.logicalAnd(false, false);
+      Boolean.logicalOr(false, true);
+      Boolean.logicalXor(false, false);
+      updateVfModuleRequest0.setCloudSiteId(", )iA\"g F{9C");
+      Boolean boolean1 = Boolean.valueOf("");
+      updateVfModuleRequest0.setFailIfExists(boolean1);
+      updateVfModuleRequest0.setFailIfExists(boolean0);
+      updateVfModuleRequest0.getVfModuleParams();
+      String string0 = updateVfModuleRequest0.getTenantId();
+      updateVfModuleRequest0.setBaseVfModuleStackId("");
+      updateVfModuleRequest0.getVfModuleParams();
+      updateVfModuleRequest0.getVnfId();
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.getVnfVersion();
+      updateVfModuleRequest0.setVfModuleStackId("^");
+      updateVfModuleRequest0.setVolumeGroupId("");
+      updateVfModuleRequest0.setBaseVfModuleStackId("");
+      String string1 = updateVfModuleRequest0.getCloudSiteId();
+      assertFalse(string1.equals((Object)string0));
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setNotificationUrl("XC8g/I");
+      updateVfModuleRequest0.setVfModuleParams((Map<String, String>) null);
+      updateVfModuleRequest0.setRequestType("");
+      updateVfModuleRequest0.setVfModuleType("");
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.setBackout((Boolean) null);
+      updateVfModuleRequest0.setTenantId("");
+      updateVfModuleRequest0.setVfModuleStackId("");
+      updateVfModuleRequest0.setMsoRequest((MsoRequest) null);
+      updateVfModuleRequest0.getRequestType();
+      updateVfModuleRequest0.getBaseVfModuleId();
+      updateVfModuleRequest0.setVfModuleType((String) null);
+      updateVfModuleRequest0.setVfModuleType("");
+      updateVfModuleRequest0.setTenantId((String) null);
+      updateVfModuleRequest0.getTenantId();
+      updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setVnfVersion("");
+      updateVfModuleRequest0.getVfModuleName();
+      updateVfModuleRequest0.setVfModuleType((String) null);
+      String string0 = updateVfModuleRequest0.getVolumeGroupStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVfModuleId("");
+      updateVfModuleRequest0.setRequestType("");
+      updateVfModuleRequest0.getVfModuleName();
+      updateVfModuleRequest0.setVolumeGroupStackId("?|d!=PZ_");
+      updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setVnfType("");
+      updateVfModuleRequest0.setVnfType((String) null);
+      updateVfModuleRequest0.getRequestType();
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.setTenantId("");
+      assertEquals("", updateVfModuleRequest0.getRequestType());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getVfModuleName();
+      Boolean boolean0 = new Boolean("");
+      updateVfModuleRequest0.setBaseVfModuleId((String) null);
+      Boolean.getBoolean("");
+      Boolean.getBoolean("");
+      MsoRequest msoRequest0 = new MsoRequest();
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      updateVfModuleRequest0.setBackout(boolean0);
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.setVolumeGroupId("jaxb.formatted.output");
+      updateVfModuleRequest0.getVolumeGroupId();
+      updateVfModuleRequest0.setVolumeGroupId("");
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.getCloudSiteId();
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.getVolumeGroupId();
+      updateVfModuleRequest0.setVnfType("");
+      updateVfModuleRequest0.getVnfVersion();
+      updateVfModuleRequest0.setVnfVersion("nSI5S-r/)Nt{7E");
+      updateVfModuleRequest0.setTenantId((String) null);
+      assertNull(updateVfModuleRequest0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVolumeGroupId("1}p^{.,|o6fiV%T=nE");
+      updateVfModuleRequest0.getVfModuleId();
+      updateVfModuleRequest0.getBaseVfModuleId();
+      updateVfModuleRequest0.setRequestType((String) null);
+      updateVfModuleRequest0.setVnfId("()4#Rt0S|Ok?6LpP6d");
+      updateVfModuleRequest0.setCloudSiteId((String) null);
+      updateVfModuleRequest0.setVnfId("OTV[DjNZt,,%");
+      updateVfModuleRequest0.setVnfId((String) null);
+      updateVfModuleRequest0.setVnfType((String) null);
+      updateVfModuleRequest0.getRequestType();
+      updateVfModuleRequest0.getVolumeGroupId();
+      MsoRequest msoRequest0 = updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      updateVfModuleRequest0.getBackout();
+      updateVfModuleRequest0.setBackout((Boolean) null);
+      updateVfModuleRequest0.getVnfVersion();
+      updateVfModuleRequest0.setVfModuleId("()4#Rt0S|Ok?6LpP6d");
+      String string0 = updateVfModuleRequest0.getBaseVfModuleStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getVolumeGroupId();
+      updateVfModuleRequest0.setVnfVersion((String) null);
+      updateVfModuleRequest0.getVfModuleName();
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      updateVfModuleRequest0.setCloudSiteId("");
+      updateVfModuleRequest0.getVnfType();
+      updateVfModuleRequest0.setVolumeGroupStackId("");
+      updateVfModuleRequest0.setVolumeGroupId("");
+      updateVfModuleRequest0.setVolumeGroupId("");
+      updateVfModuleRequest0.getVfModuleId();
+      updateVfModuleRequest0.getTenantId();
+      UpdateVfModuleRequest updateVfModuleRequest1 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getVolumeGroupId();
+      updateVfModuleRequest1.getVfModuleStackId();
+      updateVfModuleRequest1.getVolumeGroupStackId();
+      Boolean boolean0 = new Boolean(false);
+      updateVfModuleRequest0.setBackout(boolean0);
+      assertNull(updateVfModuleRequest0.getRequestType());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      Boolean boolean0 = new Boolean("[b#W!$Hl5#Z");
+      updateVfModuleRequest0.setFailIfExists(boolean0);
+      String string0 = updateVfModuleRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getVolumeGroupStackId();
+      updateVfModuleRequest0.getVnfVersion();
+      updateVfModuleRequest0.setVfModuleStackId("V|x2kON!8h|bBCf,\"I");
+      assertNull(updateVfModuleRequest0.getVnfType());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getVnfVersion();
+      String string0 = updateVfModuleRequest0.getVfModuleName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setTenantId("3G");
+      updateVfModuleRequest0.getSkipAAI();
+      updateVfModuleRequest0.toXmlString();
+      updateVfModuleRequest0.setBackout((Boolean) null);
+      updateVfModuleRequest0.getVfModuleParams();
+      updateVfModuleRequest0.setVnfId("MnBvF");
+      updateVfModuleRequest0.setTenantId("NX5yxi");
+      updateVfModuleRequest0.getVnfId();
+      updateVfModuleRequest0.getBaseVfModuleStackId();
+      updateVfModuleRequest0.getVfModuleParams();
+      MsoRequest msoRequest0 = updateVfModuleRequest0.getMsoRequest();
+      assertNull(msoRequest0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getVfModuleId();
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      assertNull(updateVfModuleRequest0.getVfModuleName());
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVnfId("");
+      assertNull(updateVfModuleRequest0.getVolumeGroupStackId());
+      
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.setFailIfExists((Boolean) null);
+      updateVfModuleRequest0.setMessageId((String) null);
+      updateVfModuleRequest0.setVolumeGroupId("");
+      updateVfModuleRequest0.getVfModuleType();
+      updateVfModuleRequest0.setVnfVersion("4x");
+      String string0 = updateVfModuleRequest0.getVnfVersion();
+      updateVfModuleRequest0.setBaseVfModuleStackId("[Oc:_#*]&+\7f4`o");
+      String string1 = updateVfModuleRequest0.getVnfId();
+      assertFalse(string1.equals((Object)string0));
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      MsoRequest msoRequest0 = updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setMsoRequest(msoRequest0);
+      assertNull(updateVfModuleRequest0.getVnfVersion());
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getRequestType();
+      Boolean boolean0 = updateVfModuleRequest0.getBackout();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setCloudSiteId("");
+      updateVfModuleRequest0.setVfModuleParams((Map<String, String>) null);
+      updateVfModuleRequest0.getBaseVfModuleStackId();
+      updateVfModuleRequest0.setVnfVersion("");
+      updateVfModuleRequest0.getVfModuleParams();
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      updateVfModuleRequest0.getCloudSiteId();
+      updateVfModuleRequest0.setVfModuleParams((Map<String, String>) null);
+      updateVfModuleRequest0.getVnfVersion();
+      updateVfModuleRequest0.getVfModuleStackId();
+      updateVfModuleRequest0.getVolumeGroupId();
+      updateVfModuleRequest0.setCloudSiteId((String) null);
+      updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setBaseVfModuleStackId("");
+      updateVfModuleRequest0.getVfModuleParams();
+      updateVfModuleRequest0.setVolumeGroupStackId("[9~u'k\7fSpnk!");
+      assertNull(updateVfModuleRequest0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.setVnfType("");
+      updateVfModuleRequest0.setBackout((Boolean) null);
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      updateVfModuleRequest0.getVfModuleParams();
+      updateVfModuleRequest0.getVnfId();
+      updateVfModuleRequest0.setVfModuleId("");
+      updateVfModuleRequest0.setVfModuleStackId("");
+      updateVfModuleRequest0.getVfModuleId();
+      updateVfModuleRequest0.setCloudSiteId("");
+      updateVfModuleRequest0.getMsoRequest();
+      updateVfModuleRequest0.setVfModuleId("");
+      updateVfModuleRequest0.getVnfType();
+      Boolean boolean0 = updateVfModuleRequest0.getFailIfExists();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.setBackout((Boolean) null);
+      assertNull(updateVfModuleRequest0.getVnfId());
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVfModuleName("");
+      updateVfModuleRequest0.setBaseVfModuleStackId("");
+      // Undeclared exception!
+      try { 
+        updateVfModuleRequest0.toJsonString();
+        fail("Expecting exception: VerifyError");
+      
+      } catch(VerifyError e) {
+         //
+         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
+         //
+         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVolumeGroupStackId("nY0b");
+      assertNull(updateVfModuleRequest0.getRequestType());
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVnfVersion("Ht/U");
+      assertNull(updateVfModuleRequest0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVnfType("W;cx8uJk]p#e&?c3PcO");
+      updateVfModuleRequest0.setVfModuleType("z3qr`!V;?");
+      updateVfModuleRequest0.setVfModuleName("W;cx8uJk]p#e&?c3PcO");
+      assertNull(updateVfModuleRequest0.getRequestType());
+  }
+
+  @Test(timeout = 4000)
+  public void test37()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.toXmlString();
+      String string0 = updateVfModuleRequest0.getBaseVfModuleStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test38()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setVfModuleName("W#m\"_5ykHHHo_@kq/");
+      assertNull(updateVfModuleRequest0.getRequestType());
+  }
+
+  @Test(timeout = 4000)
+  public void test39()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setTenantId("?!vD=6S.7p/[;zX3i");
+      assertNull(updateVfModuleRequest0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test40()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setCloudSiteId("");
+      Map<String, String> map0 = updateVfModuleRequest0.getVfModuleParams();
+      updateVfModuleRequest0.setVfModuleParams(map0);
+      updateVfModuleRequest0.setVfModuleParams(map0);
+      updateVfModuleRequest0.setVfModuleStackId("");
+      assertNull(updateVfModuleRequest0.getRequestType());
+  }
+
+  @Test(timeout = 4000)
+  public void test41()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      Boolean boolean0 = Boolean.valueOf(true);
+      Boolean.logicalAnd(true, true);
+      Boolean.logicalXor(true, true);
+      Boolean.logicalAnd(true, true);
+      Boolean.logicalXor(true, false);
+      updateVfModuleRequest0.setFailIfExists(boolean0);
+      updateVfModuleRequest0.setFailIfExists(boolean0);
+      Boolean boolean1 = new Boolean(false);
+      Boolean.compare(true, true);
+      boolean boolean2 = Boolean.logicalAnd(true, true);
+      updateVfModuleRequest0.setSkipAAI(boolean1);
+      updateVfModuleRequest0.setBaseVfModuleId("O[9~5!");
+      updateVfModuleRequest0.setVfModuleType((String) null);
+      updateVfModuleRequest0.getFailIfExists();
+      updateVfModuleRequest0.getFailIfExists();
+      System.setCurrentTimeMillis(3682L);
+      System.setCurrentTimeMillis(3682L);
+      System.setCurrentTimeMillis((-116L));
+      System.setCurrentTimeMillis((-116L));
+      System.setCurrentTimeMillis(0L);
+      System.setCurrentTimeMillis(0);
+      Boolean boolean3 = updateVfModuleRequest0.getFailIfExists();
+      assertTrue(boolean3.equals((Object)boolean2));
+  }
+
+  @Test(timeout = 4000)
+  public void test42()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setBaseVfModuleId("");
+      assertNull(updateVfModuleRequest0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test43()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      updateVfModuleRequest0.setRequestType("");
+      updateVfModuleRequest0.setVfModuleType("ybR");
+      assertEquals("ybR", updateVfModuleRequest0.getVfModuleType());
+  }
+
+  @Test(timeout = 4000)
+  public void test44()  throws Throwable  {
+      UpdateVfModuleRequest updateVfModuleRequest0 = new UpdateVfModuleRequest();
+      UpdateVfModuleRequest updateVfModuleRequest1 = new UpdateVfModuleRequest();
+      updateVfModuleRequest1.getSkipAAI();
+      updateVfModuleRequest0.setFailIfExists((Boolean) null);
+      assertNull(updateVfModuleRequest0.getVfModuleName());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..7d23ee1
--- /dev/null
@@ -0,0 +1,197 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:24:18 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateVfModuleRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.UpdateVfModuleRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateVfModuleRequestESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.map.JsonSerializableWithType",
+      "org.codehaus.jackson.map.deser.StdDeserializerProvider",
+      "org.codehaus.jackson.map.SerializerFactory",
+      "org.codehaus.jackson.map.SerializerProvider",
+      "org.codehaus.jackson.map.SerializationConfig",
+      "org.codehaus.jackson.JsonProcessingException",
+      "org.codehaus.jackson.map.introspect.AnnotationMap",
+      "org.codehaus.jackson.map.introspect.Annotated",
+      "org.codehaus.jackson.map.util.Annotations",
+      "org.codehaus.jackson.sym.NameN",
+      "org.codehaus.jackson.JsonGenerator",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
+      "org.codehaus.jackson.map.JsonSerializable",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.node.BaseJsonNode",
+      "org.codehaus.jackson.map.DeserializerProvider",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.node.ValueNode",
+      "org.codehaus.jackson.map.ser.BeanSerializerFactory",
+      "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
+      "org.codehaus.jackson.map.AnnotationIntrospector",
+      "org.codehaus.jackson.map.MappingJsonFactory",
+      "org.codehaus.jackson.map.MapperConfig$Impl",
+      "org.codehaus.jackson.sym.Name1",
+      "org.codehaus.jackson.sym.Name2",
+      "org.codehaus.jackson.sym.Name3",
+      "org.codehaus.jackson.map.introspect.MethodFilter",
+      "org.codehaus.jackson.map.ser.StdSerializerProvider",
+      "org.codehaus.jackson.map.deser.StdDeserializationContext",
+      "org.codehaus.jackson.map.ClassIntrospector",
+      "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
+      "org.codehaus.jackson.Versioned",
+      "org.codehaus.jackson.map.type.TypeBase",
+      "org.codehaus.jackson.map.ser.BasicSerializerFactory",
+      "org.codehaus.jackson.node.ContainerNode",
+      "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
+      "org.codehaus.jackson.map.DeserializationConfig",
+      "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.codehaus.jackson.impl.ReaderBasedParser",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
+      "org.codehaus.jackson.map.type.MapLikeType",
+      "org.codehaus.jackson.node.ObjectNode",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
+      "org.codehaus.jackson.map.type.CollectionLikeType",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
+      "org.codehaus.jackson.impl.JsonParserMinimalBase",
+      "org.codehaus.jackson.map.type.TypeParser",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker",
+      "org.codehaus.jackson.map.introspect.AnnotatedField",
+      "org.codehaus.jackson.impl.JsonGeneratorBase",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.util.ByteArrayBuilder",
+      "org.codehaus.jackson.PrettyPrinter",
+      "org.codehaus.jackson.map.jsontype.SubtypeResolver",
+      "org.codehaus.jackson.map.type.SimpleType",
+      "org.codehaus.jackson.map.util.StdDateFormat",
+      "org.codehaus.jackson.impl.Utf8Generator",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
+      "org.codehaus.jackson.JsonNode",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.codehaus.jackson.ObjectCodec",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethod",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.node.ArrayNode",
+      "org.codehaus.jackson.io.SegmentedStringWriter",
+      "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.map.BeanDescription",
+      "org.codehaus.jackson.impl.WriterBasedGenerator",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.sym.Name",
+      "org.codehaus.jackson.map.introspect.BasicBeanDescription",
+      "org.codehaus.jackson.util.TokenBuffer",
+      "org.codehaus.jackson.map.DeserializationContext",
+      "org.codehaus.jackson.impl.JsonParserBase",
+      "org.codehaus.jackson.map.JsonMappingException",
+      "org.codehaus.jackson.map.introspect.AnnotatedMember",
+      "org.codehaus.jackson.type.JavaType",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.annotate.JsonRootName",
+      "org.codehaus.jackson.JsonParser",
+      "org.openecomp.mso.adapters.vnfrest.UpdateVfModuleRequest",
+      "org.codehaus.jackson.node.NullNode",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.codehaus.jackson.node.TreeTraversingParser",
+      "org.codehaus.jackson.map.type.CollectionType",
+      "org.codehaus.jackson.map.MapperConfig",
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.map.Module$SetupContext",
+      "org.codehaus.jackson.io.UTF8Writer",
+      "org.codehaus.jackson.map.type.MapType",
+      "org.codehaus.jackson.annotate.JsonAutoDetect",
+      "org.codehaus.jackson.map.type.ArrayType",
+      "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UpdateVfModuleRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponseESTest.java
new file mode 100644 (file)
index 0000000..2d48c57
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:18:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateVfModuleResponseESTest extends UpdateVfModuleResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse();
+      String string0 = updateVfModuleResponse0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse("", "", "\"c2N\7fA-]kge", (Map<String, String>) hashMap0, "");
+      String string0 = updateVfModuleResponse0.getVnfId();
+      assertEquals("\"c2N\7fA-]kge", updateVfModuleResponse0.getVfModuleStackId());
+      assertEquals("", updateVfModuleResponse0.getVfModuleId());
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse();
+      String string0 = updateVfModuleResponse0.getVfModuleStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse("", "", "", (Map<String, String>) null, "eBT|~3\"z");
+      updateVfModuleResponse0.getVfModuleOutputs();
+      assertEquals("", updateVfModuleResponse0.getVfModuleStackId());
+      assertEquals("", updateVfModuleResponse0.getVnfId());
+      assertEquals("", updateVfModuleResponse0.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse((String) null, (String) null, "", (Map<String, String>) hashMap0, (String) null);
+      hashMap0.put((String) null, "");
+      Map<String, String> map0 = updateVfModuleResponse0.getVfModuleOutputs();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse();
+      String string0 = updateVfModuleResponse0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse("}t3zhbFZl^dGLS@6+", "}t3zhbFZl^dGLS@6+", "}t3zhbFZl^dGLS@6+", (Map<String, String>) hashMap0, "");
+      String string0 = updateVfModuleResponse0.getVfModuleId();
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse();
+      updateVfModuleResponse0.setVfModuleStackId("p|+\7f");
+      String string0 = updateVfModuleResponse0.getVfModuleStackId();
+      assertEquals("p|+\7f", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse((String) null, (String) null, "", (Map<String, String>) hashMap0, (String) null);
+      String string0 = updateVfModuleResponse0.getVfModuleStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse((String) null, (String) null, "", (Map<String, String>) hashMap0, (String) null);
+      updateVfModuleResponse0.setVnfId("trb");
+      assertEquals("", updateVfModuleResponse0.getVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse("'o^@:C|OvN:", "'o^@:C|OvN:", "'o^@:C|OvN:", (Map<String, String>) hashMap0, "xcX3]w^");
+      String string0 = updateVfModuleResponse0.getVnfId();
+      assertEquals("'o^@:C|OvN:", updateVfModuleResponse0.getVfModuleStackId());
+      assertEquals("'o^@:C|OvN:", updateVfModuleResponse0.getVfModuleId());
+      assertEquals("'o^@:C|OvN:", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse("lE0", "", "", (Map<String, String>) hashMap0, "");
+      String string0 = updateVfModuleResponse0.getVfModuleId();
+      assertEquals("", string0);
+      assertEquals("lE0", updateVfModuleResponse0.getVnfId());
+      assertEquals("", updateVfModuleResponse0.getVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse("", "", "", (Map<String, String>) null, "eBT|~3\"z");
+      assertEquals("", updateVfModuleResponse0.getVfModuleId());
+      
+      updateVfModuleResponse0.setVfModuleId("");
+      assertEquals("", updateVfModuleResponse0.getVnfId());
+      assertEquals("", updateVfModuleResponse0.getVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse("", "", "", (Map<String, String>) null, "eBT|~3\"z");
+      updateVfModuleResponse0.setVfModuleOutputs((Map<String, String>) null);
+      assertEquals("", updateVfModuleResponse0.getVfModuleId());
+      assertEquals("", updateVfModuleResponse0.getVnfId());
+      assertEquals("", updateVfModuleResponse0.getVfModuleStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVfModuleResponse updateVfModuleResponse0 = new UpdateVfModuleResponse("'o^@:C|OvN:", "'o^@:C|OvN:", "'o^@:C|OvN:", (Map<String, String>) hashMap0, "xcX3]w^");
+      updateVfModuleResponse0.getVfModuleOutputs();
+      assertEquals("'o^@:C|OvN:", updateVfModuleResponse0.getVfModuleStackId());
+      assertEquals("'o^@:C|OvN:", updateVfModuleResponse0.getVfModuleId());
+      assertEquals("'o^@:C|OvN:", updateVfModuleResponse0.getVnfId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..4551abb
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:18:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateVfModuleResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.UpdateVfModuleResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateVfModuleResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName",
+      "org.openecomp.mso.adapters.vnfrest.UpdateVfModuleResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UpdateVfModuleResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequestESTest.java
new file mode 100644 (file)
index 0000000..5ee5d2e
--- /dev/null
@@ -0,0 +1,222 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:13:54 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateVolumeGroupRequestESTest extends UpdateVolumeGroupRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVolumeGroupStackId("");
+      String string0 = updateVolumeGroupRequest0.getVolumeGroupStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVolumeGroupParams((Map<String, String>) null);
+      Map<String, String> map0 = updateVolumeGroupRequest0.getVolumeGroupParams();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      hashMap0.put("x; 6d0BPfz`", "x; 6d0BPfz`");
+      updateVolumeGroupRequest0.setVolumeGroupParams(hashMap0);
+      Map<String, String> map0 = updateVolumeGroupRequest0.getVolumeGroupParams();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVolumeGroupId("jaxb.formatted.output");
+      String string0 = updateVolumeGroupRequest0.getVolumeGroupId();
+      assertEquals("jaxb.formatted.output", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVnfVersion("VE");
+      String string0 = updateVolumeGroupRequest0.getVnfVersion();
+      assertEquals("VE", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVnfType(";z<~4]OiR");
+      String string0 = updateVolumeGroupRequest0.getVnfType();
+      assertEquals(";z<~4]OiR", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVnfType("");
+      String string0 = updateVolumeGroupRequest0.getVnfType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVfModuleType("jaxb.formatted.output");
+      String string0 = updateVolumeGroupRequest0.getVfModuleType();
+      assertEquals("jaxb.formatted.output", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setTenantId("*\"Y)Ey _n!jPx[,gv");
+      String string0 = updateVolumeGroupRequest0.getTenantId();
+      assertEquals("*\"Y)Ey _n!jPx[,gv", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setCloudSiteId("kaFalmm'SWu=)x");
+      String string0 = updateVolumeGroupRequest0.getCloudSiteId();
+      assertEquals("kaFalmm'SWu=)x", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      String string0 = updateVolumeGroupRequest0.getVnfVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      String string0 = updateVolumeGroupRequest0.getVfModuleType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      String string0 = updateVolumeGroupRequest0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      MsoRequest msoRequest0 = updateVolumeGroupRequest0.getMsoRequest();
+      assertNull(msoRequest0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      String string0 = updateVolumeGroupRequest0.getVnfType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      String string0 = updateVolumeGroupRequest0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setTenantId("");
+      String string0 = updateVolumeGroupRequest0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVolumeGroupStackId("%CmN&s3>7F)p/0");
+      String string0 = updateVolumeGroupRequest0.getVolumeGroupStackId();
+      assertEquals("%CmN&s3>7F)p/0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVfModuleType("");
+      String string0 = updateVolumeGroupRequest0.getVfModuleType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setCloudSiteId("");
+      String string0 = updateVolumeGroupRequest0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVnfVersion("");
+      String string0 = updateVolumeGroupRequest0.getVnfVersion();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setMsoRequest((MsoRequest) null);
+      MsoRequest msoRequest0 = updateVolumeGroupRequest0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      updateVolumeGroupRequest0.setVolumeGroupId("");
+      String string0 = updateVolumeGroupRequest0.getVolumeGroupId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      Map<String, String> map0 = updateVolumeGroupRequest0.getVolumeGroupParams();
+      updateVolumeGroupRequest0.setVolumeGroupParams(map0);
+      assertNull(updateVolumeGroupRequest0.getCloudSiteId());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      String string0 = updateVolumeGroupRequest0.getVolumeGroupStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      UpdateVolumeGroupRequest updateVolumeGroupRequest0 = new UpdateVolumeGroupRequest();
+      String string0 = updateVolumeGroupRequest0.getVolumeGroupId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequestESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..048f6b9
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:13:54 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateVolumeGroupRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.UpdateVolumeGroupRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateVolumeGroupRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.vnfrest.UpdateVolumeGroupRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UpdateVolumeGroupRequestESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponseESTest.java
new file mode 100644 (file)
index 0000000..ccf0983
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:23:04 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateVolumeGroupResponseESTest extends UpdateVolumeGroupResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse("", "F`m", (Map<String, String>) hashMap0, "");
+      String string0 = updateVolumeGroupResponse0.getVolumeGroupStackId();
+      assertEquals("", updateVolumeGroupResponse0.getVolumeGroupId());
+      assertEquals("F`m", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse("", "F`m", (Map<String, String>) hashMap0, "");
+      hashMap0.put("9GcmH1su}s&bc=", "");
+      updateVolumeGroupResponse0.getVolumeGroupOutputs();
+      assertEquals("F`m", updateVolumeGroupResponse0.getVolumeGroupStackId());
+      assertEquals("", updateVolumeGroupResponse0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse();
+      String string0 = updateVolumeGroupResponse0.getVolumeGroupId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse("TzCXEX\"l?\"8x", "", (Map<String, String>) hashMap0, "TzCXEX\"l?\"8x");
+      String string0 = updateVolumeGroupResponse0.getVolumeGroupId();
+      assertEquals("", updateVolumeGroupResponse0.getVolumeGroupStackId());
+      assertEquals("TzCXEX\"l?\"8x", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse();
+      Map<String, String> map0 = updateVolumeGroupResponse0.getVolumeGroupOutputs();
+      updateVolumeGroupResponse0.setVolumeGroupOutputs(map0);
+      assertNull(updateVolumeGroupResponse0.getVolumeGroupStackId());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse();
+      updateVolumeGroupResponse0.setVolumeGroupStackId("");
+      String string0 = updateVolumeGroupResponse0.getVolumeGroupStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse();
+      String string0 = updateVolumeGroupResponse0.getVolumeGroupStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse("", "", (Map<String, String>) null, "");
+      Map<String, String> map0 = updateVolumeGroupResponse0.getVolumeGroupOutputs();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse("", "", (Map<String, String>) null, "");
+      updateVolumeGroupResponse0.setVolumeGroupId("@(Ux]`8\7fWPh");
+      assertEquals("@(Ux]`8\7fWPh", updateVolumeGroupResponse0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test9()  throws Throwable  {
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      UpdateVolumeGroupResponse updateVolumeGroupResponse0 = new UpdateVolumeGroupResponse("", "", (Map<String, String>) hashMap0, "");
+      String string0 = updateVolumeGroupResponse0.getVolumeGroupId();
+      assertEquals("", string0);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c53ea4c
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:23:04 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateVolumeGroupResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.UpdateVolumeGroupResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateVolumeGroupResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.UpdateVolumeGroupResponse",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UpdateVolumeGroupResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponseESTest.java
new file mode 100644 (file)
index 0000000..66144ba
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:24:56 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VfModuleExceptionResponseESTest extends VfModuleExceptionResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      VfModuleExceptionResponse vfModuleExceptionResponse0 = new VfModuleExceptionResponse("2\7fm", msoExceptionCategory0, false, "2\7fm");
+      assertEquals(MsoExceptionCategory.OPENSTACK, vfModuleExceptionResponse0.getCategory());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      VfModuleExceptionResponse vfModuleExceptionResponse0 = new VfModuleExceptionResponse();
+      assertNull(vfModuleExceptionResponse0.getCategory());
+      
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.USERDATA;
+      Boolean boolean0 = new Boolean(false);
+      vfModuleExceptionResponse0.setMessage("jaxb.formatted.output");
+      vfModuleExceptionResponse0.setRolledBack(boolean0);
+      vfModuleExceptionResponse0.setMessage("jaxb.formatted.output");
+      vfModuleExceptionResponse0.setMessageId("jaxb.formatted.output");
+      Boolean.logicalXor(false, false);
+      Boolean.getBoolean((String) null);
+      vfModuleExceptionResponse0.setRolledBack(boolean0);
+      vfModuleExceptionResponse0.setCategory(msoExceptionCategory0);
+      vfModuleExceptionResponse0.setMessageId("OPENSTACK");
+      VfModuleExceptionResponse vfModuleExceptionResponse1 = new VfModuleExceptionResponse();
+      Boolean boolean1 = vfModuleExceptionResponse0.getRolledBack();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.USERDATA;
+      VfModuleExceptionResponse vfModuleExceptionResponse0 = new VfModuleExceptionResponse("", msoExceptionCategory0, true, "");
+      vfModuleExceptionResponse0.setMessageId("");
+      Boolean boolean0 = vfModuleExceptionResponse0.getRolledBack();
+      assertTrue(boolean0);
+      
+      Boolean.logicalAnd(false, false);
+      MsoExceptionCategory msoExceptionCategory1 = MsoExceptionCategory.USERDATA;
+      Boolean.logicalAnd(true, true);
+      vfModuleExceptionResponse0.setRolledBack(boolean0);
+      VfModuleExceptionResponse vfModuleExceptionResponse1 = new VfModuleExceptionResponse("&g.0W4Nah+8,", msoExceptionCategory1, true, "");
+      vfModuleExceptionResponse0.setMessageId((String) null);
+      VfModuleExceptionResponse vfModuleExceptionResponse2 = new VfModuleExceptionResponse((String) null, msoExceptionCategory1, false, (String) null);
+      VfModuleExceptionResponse vfModuleExceptionResponse3 = new VfModuleExceptionResponse("&g.0W4Nah+8,");
+      vfModuleExceptionResponse0.getMessage();
+      VfModuleExceptionResponse vfModuleExceptionResponse4 = new VfModuleExceptionResponse();
+      vfModuleExceptionResponse1.setRolledBack((Boolean) null);
+      assertEquals("&g.0W4Nah+8,", vfModuleExceptionResponse1.getMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      VfModuleExceptionResponse vfModuleExceptionResponse0 = new VfModuleExceptionResponse("org.openecomp.mso.openstack.exceptions.MsoExceptionCategory");
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL;
+      vfModuleExceptionResponse0.setCategory(msoExceptionCategory0);
+      String string0 = vfModuleExceptionResponse0.getMessage();
+      assertEquals("org.openecomp.mso.openstack.exceptions.MsoExceptionCategory", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      String string0 = "";
+      VfModuleExceptionResponse vfModuleExceptionResponse0 = new VfModuleExceptionResponse("XOGaF|t", msoExceptionCategory0, true, "");
+      // Undeclared exception!
+      try { 
+        vfModuleExceptionResponse0.toJsonString();
+        fail("Expecting exception: VerifyError");
+      
+      } catch(VerifyError e) {
+         //
+         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
+         //
+         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      VfModuleExceptionResponse vfModuleExceptionResponse0 = new VfModuleExceptionResponse();
+      vfModuleExceptionResponse0.setMessage("");
+      vfModuleExceptionResponse0.setMessage("");
+      vfModuleExceptionResponse0.toXmlString();
+      vfModuleExceptionResponse0.setMessage("org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse");
+      VfModuleExceptionResponse vfModuleExceptionResponse1 = new VfModuleExceptionResponse("org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse");
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL;
+      vfModuleExceptionResponse1.toXmlString();
+      vfModuleExceptionResponse1.setCategory(msoExceptionCategory0);
+      vfModuleExceptionResponse0.setMessage((String) null);
+      MsoExceptionCategory msoExceptionCategory1 = vfModuleExceptionResponse1.getCategory();
+      VfModuleExceptionResponse vfModuleExceptionResponse2 = new VfModuleExceptionResponse();
+      vfModuleExceptionResponse1.setCategory(msoExceptionCategory1);
+      VfModuleExceptionResponse vfModuleExceptionResponse3 = new VfModuleExceptionResponse("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vfModuleException>\n    <message>org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse</message>\n</vfModuleException>\n");
+      vfModuleExceptionResponse3.getRolledBack();
+      vfModuleExceptionResponse3.getMessage();
+      vfModuleExceptionResponse3.setRolledBack((Boolean) null);
+      Boolean boolean0 = Boolean.TRUE;
+      Boolean.getBoolean("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<vfModuleException>\n    <message>org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse</message>\n</vfModuleException>\n");
+      vfModuleExceptionResponse0.setRolledBack(boolean0);
+      vfModuleExceptionResponse0.getCategory();
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      VfModuleExceptionResponse vfModuleExceptionResponse0 = new VfModuleExceptionResponse();
+      vfModuleExceptionResponse0.setMessageId("cO)VBma");
+      vfModuleExceptionResponse0.getMessage();
+      VfModuleExceptionResponse vfModuleExceptionResponse1 = new VfModuleExceptionResponse();
+      Boolean boolean0 = vfModuleExceptionResponse0.getRolledBack();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      VfModuleExceptionResponse vfModuleExceptionResponse0 = new VfModuleExceptionResponse("IxX(PnBaVq=pz", msoExceptionCategory0, false, "");
+      Boolean boolean0 = Boolean.valueOf(false);
+      Boolean.logicalAnd(true, false);
+      vfModuleExceptionResponse0.setRolledBack(boolean0);
+      assertEquals("IxX(PnBaVq=pz", vfModuleExceptionResponse0.getMessage());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..954f118
--- /dev/null
@@ -0,0 +1,196 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:24:56 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VfModuleExceptionResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleExceptionResponseESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.map.JsonSerializableWithType",
+      "org.codehaus.jackson.map.deser.StdDeserializerProvider",
+      "org.codehaus.jackson.map.SerializerFactory",
+      "org.codehaus.jackson.map.SerializerProvider",
+      "org.codehaus.jackson.map.SerializationConfig",
+      "org.codehaus.jackson.JsonProcessingException",
+      "org.codehaus.jackson.map.introspect.AnnotationMap",
+      "org.codehaus.jackson.map.introspect.Annotated",
+      "org.codehaus.jackson.map.util.Annotations",
+      "org.codehaus.jackson.sym.NameN",
+      "org.codehaus.jackson.JsonGenerator",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector",
+      "org.codehaus.jackson.map.JsonSerializable",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.node.BaseJsonNode",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.codehaus.jackson.map.DeserializerProvider",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.node.ValueNode",
+      "org.codehaus.jackson.map.ser.BeanSerializerFactory",
+      "org.codehaus.jackson.map.introspect.AnnotatedWithParams",
+      "org.codehaus.jackson.map.AnnotationIntrospector",
+      "org.codehaus.jackson.map.MappingJsonFactory",
+      "org.codehaus.jackson.map.MapperConfig$Impl",
+      "org.codehaus.jackson.sym.Name1",
+      "org.codehaus.jackson.sym.Name2",
+      "org.codehaus.jackson.sym.Name3",
+      "org.codehaus.jackson.map.introspect.MethodFilter",
+      "org.codehaus.jackson.map.ser.StdSerializerProvider",
+      "org.codehaus.jackson.map.deser.StdDeserializationContext",
+      "org.codehaus.jackson.map.ClassIntrospector",
+      "org.codehaus.jackson.map.AnnotationIntrospector$Pair",
+      "org.codehaus.jackson.Versioned",
+      "org.codehaus.jackson.map.type.TypeBase",
+      "org.codehaus.jackson.map.ser.BasicSerializerFactory",
+      "org.codehaus.jackson.node.ContainerNode",
+      "org.codehaus.jackson.map.introspect.NopAnnotationIntrospector",
+      "org.codehaus.jackson.map.DeserializationConfig",
+      "org.codehaus.jackson.map.introspect.AnnotatedConstructor",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.codehaus.jackson.impl.ReaderBasedParser",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer$TableInfo",
+      "org.codehaus.jackson.map.type.MapLikeType",
+      "org.codehaus.jackson.node.ObjectNode",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$MinimalMethodFilter",
+      "org.codehaus.jackson.map.type.CollectionLikeType",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer$Bucket",
+      "org.codehaus.jackson.impl.JsonParserMinimalBase",
+      "org.codehaus.jackson.map.type.TypeParser",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterMethodFilter",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker",
+      "org.codehaus.jackson.map.introspect.AnnotatedField",
+      "org.codehaus.jackson.impl.JsonGeneratorBase",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.util.ByteArrayBuilder",
+      "org.codehaus.jackson.PrettyPrinter",
+      "org.codehaus.jackson.map.jsontype.SubtypeResolver",
+      "org.codehaus.jackson.map.type.SimpleType",
+      "org.codehaus.jackson.map.util.StdDateFormat",
+      "org.codehaus.jackson.impl.Utf8Generator",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$SetterAndGetterMethodFilter",
+      "org.codehaus.jackson.JsonNode",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.codehaus.jackson.ObjectCodec",
+      "org.codehaus.jackson.map.introspect.AnnotatedMethod",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.node.ArrayNode",
+      "org.codehaus.jackson.io.SegmentedStringWriter",
+      "org.codehaus.jackson.map.jsontype.TypeResolverBuilder",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector$GetterMethodFilter",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.map.BeanDescription",
+      "org.codehaus.jackson.impl.WriterBasedGenerator",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.sym.Name",
+      "org.codehaus.jackson.map.introspect.BasicBeanDescription",
+      "org.codehaus.jackson.util.TokenBuffer",
+      "org.codehaus.jackson.map.DeserializationContext",
+      "org.codehaus.jackson.impl.JsonParserBase",
+      "org.codehaus.jackson.map.JsonMappingException",
+      "org.codehaus.jackson.map.introspect.AnnotatedMember",
+      "org.codehaus.jackson.type.JavaType",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.JsonParser",
+      "org.codehaus.jackson.node.NullNode",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse",
+      "org.codehaus.jackson.map.jsontype.impl.StdSubtypeResolver",
+      "org.codehaus.jackson.node.TreeTraversingParser",
+      "org.codehaus.jackson.map.type.CollectionType",
+      "org.codehaus.jackson.map.MapperConfig",
+      "org.codehaus.jackson.map.Module$SetupContext",
+      "org.codehaus.jackson.io.UTF8Writer",
+      "org.codehaus.jackson.map.type.MapType",
+      "org.codehaus.jackson.annotate.JsonAutoDetect",
+      "org.codehaus.jackson.map.type.ArrayType",
+      "org.codehaus.jackson.map.ClassIntrospector$MixInResolver"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VfModuleExceptionResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollbackESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollbackESTest.java
new file mode 100644 (file)
index 0000000..1ba09e1
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:20:21 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VfModuleRollbackESTest extends VfModuleRollbackESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      boolean boolean0 = vfModuleRollback0.isVfModuleCreated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer());
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback("", (String) null, "", false, "", "", msoRequest0, "");
+      String string0 = vfModuleRollback0.getVnfId();
+      assertNotNull(string0);
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.setVfModuleStackId("ORmnn<.2+z\7fb!'teC5");
+      vfModuleRollback0.getVfModuleStackId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      MsoRequest msoRequest0 = mock(MsoRequest.class, new ViolatedAssumptionAnswer());
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback("", (String) null, "", false, "", "", msoRequest0, "");
+      String string0 = vfModuleRollback0.getVfModuleStackId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, "", "", "");
+      String string0 = vfModuleRollback0.getVfModuleId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.setTenantId("ORmnn<.2+z\7fb!'teC5");
+      vfModuleRollback0.getTenantId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.setTenantId("");
+      vfModuleRollback0.getTenantId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.getMsoRequest();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.getMessageId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, "", "", "");
+      String string0 = vfModuleRollback0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.setCloudSiteId("yIF#jVMha");
+      vfModuleRollback0.getCloudSiteId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback("^4s-K=q)*Tb/", "XG?<}b?*4B", "XG?<}b?*4B", false, "", "", (MsoRequest) null, (String) null);
+      String string0 = vfModuleRollback0.getCloudSiteId();
+      assertEquals("", string0);
+      assertEquals("XG?<}b?*4B", vfModuleRollback0.getVfModuleId());
+      assertEquals("", vfModuleRollback0.getTenantId());
+      assertNotNull(string0);
+      assertEquals("^4s-K=q)*Tb/", vfModuleRollback0.getVnfId());
+      assertEquals("XG?<}b?*4B", vfModuleRollback0.getVfModuleStackId());
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = null;
+      try {
+        vfModuleRollback0 = new VfModuleRollback((VnfRollback) null, ", tenantCreated=", ", tenantCreated=", ", tenantCreated=");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.adapters.vnfrest.VfModuleRollback", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", requestType = ", "", true, true, msoRequest0, " .~y_qT", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, (String) null, "TgLE(4jqRR&B*tjC*6");
+      boolean boolean0 = vfModuleRollback0.isVfModuleCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.getVnfId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.getCloudSiteId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", requestType = ", "", true, true, msoRequest0, " .~y_qT", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, (String) null, "TgLE(4jqRR&B*tjC*6");
+      MsoRequest msoRequest1 = vfModuleRollback0.getMsoRequest();
+      assertNull(msoRequest1.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", requestType = ", "", true, true, msoRequest0, " .~y_qT", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, (String) null, "TgLE(4jqRR&B*tjC*6");
+      vfModuleRollback0.setVfModuleId("TUj9qO3IbhX0v~");
+      String string0 = vfModuleRollback0.getVfModuleId();
+      assertEquals("TUj9qO3IbhX0v~", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", requestType = ", "", true, true, msoRequest0, " .~y_qT", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, (String) null, "TgLE(4jqRR&B*tjC*6");
+      vfModuleRollback0.setMessageId(", tenantCreated=");
+      assertNull(vfModuleRollback0.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.setVnfId("n+S7/*fyf8oP5jpt#");
+      vfModuleRollback0.getVnfId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", requestType = ", "", true, true, msoRequest0, " .~y_qT", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, (String) null, "TgLE(4jqRR&B*tjC*6");
+      vfModuleRollback0.setVfModuleCreated(true);
+      assertTrue(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", requestType = ", "", true, true, msoRequest0, " .~y_qT", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, (String) null, "TgLE(4jqRR&B*tjC*6");
+      vfModuleRollback0.setMsoRequest(msoRequest0);
+      assertEquals(", requestType = ", vfModuleRollback0.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", requestType = ", "", true, true, msoRequest0, " .~y_qT", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, (String) null, "TgLE(4jqRR&B*tjC*6");
+      String string0 = vfModuleRollback0.getMessageId();
+      assertEquals("TgLE(4jqRR&B*tjC*6", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.getVfModuleStackId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VnfRollback vnfRollback0 = new VnfRollback("", ", requestType = ", "", true, true, msoRequest0, " .~y_qT", "", "");
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback(vnfRollback0, (String) null, (String) null, "TgLE(4jqRR&B*tjC*6");
+      String string0 = vfModuleRollback0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      VfModuleRollback vfModuleRollback0 = new VfModuleRollback();
+      vfModuleRollback0.getTenantId();
+      assertFalse(vfModuleRollback0.isVfModuleCreated());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollbackESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollbackESTestscaffolding.java
new file mode 100644 (file)
index 0000000..b89667d
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:20:21 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VfModuleRollbackESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.VfModuleRollback"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleRollbackESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.openstack.beans.VnfRollback",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.adapters.vnfrest.VfModuleRollback",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommonESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommonESTest.java
new file mode 100644 (file)
index 0000000..58a2d1c
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:10:46 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VfRequestCommonESTest extends VfRequestCommonESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      Boolean boolean0 = Boolean.TRUE;
+      createVolumeGroupRequest0.setSkipAAI(boolean0);
+      Boolean boolean1 = createVolumeGroupRequest0.getSkipAAI();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setNotificationUrl("ghhl_5");
+      String string0 = deleteVfModuleRequest0.getNotificationUrl();
+      assertEquals("ghhl_5", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      deleteVolumeGroupRequest0.setNotificationUrl("");
+      String string0 = deleteVolumeGroupRequest0.getNotificationUrl();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setNotificationUrl("");
+      boolean boolean0 = deleteVfModuleRequest0.isSynchronous();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      DeleteVolumeGroupRequest deleteVolumeGroupRequest0 = new DeleteVolumeGroupRequest();
+      boolean boolean0 = deleteVolumeGroupRequest0.isSynchronous();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      Boolean boolean0 = createVolumeGroupRequest0.getSkipAAI();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      String string0 = deleteVfModuleRequest0.getNotificationUrl();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      DeleteVfModuleRequest deleteVfModuleRequest0 = new DeleteVfModuleRequest();
+      deleteVfModuleRequest0.setNotificationUrl("ghhl_5");
+      boolean boolean0 = deleteVfModuleRequest0.isSynchronous();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      CreateVolumeGroupRequest createVolumeGroupRequest0 = new CreateVolumeGroupRequest();
+      Boolean boolean0 = new Boolean("");
+      createVolumeGroupRequest0.setSkipAAI(boolean0);
+      Boolean boolean1 = createVolumeGroupRequest0.getSkipAAI();
+      assertFalse(boolean1);
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommonESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommonESTestscaffolding.java
new file mode 100644 (file)
index 0000000..61a986d
--- /dev/null
@@ -0,0 +1,104 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:10:46 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VfRequestCommonESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.VfRequestCommon"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfRequestCommonESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnfrest.VfRequestCommon",
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.codehaus.jackson.Versioned",
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.CreateVolumeGroupRequest",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker",
+      "org.openecomp.mso.adapters.vnfrest.DeleteVfModuleRequest",
+      "org.openecomp.mso.adapters.vnfrest.DeleteVolumeGroupRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VfRequestCommonESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponseESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponseESTest.java
new file mode 100644 (file)
index 0000000..08fb770
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:27:29 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VolumeGroupExceptionResponseESTest extends VolumeGroupExceptionResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      VolumeGroupExceptionResponse volumeGroupExceptionResponse0 = new VolumeGroupExceptionResponse();
+      assertNull(volumeGroupExceptionResponse0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.USERDATA;
+      VolumeGroupExceptionResponse volumeGroupExceptionResponse0 = new VolumeGroupExceptionResponse("L", msoExceptionCategory0, false, "M4");
+      assertEquals("L", volumeGroupExceptionResponse0.getMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      VolumeGroupExceptionResponse volumeGroupExceptionResponse0 = new VolumeGroupExceptionResponse("M4");
+      assertNull(volumeGroupExceptionResponse0.getCategory());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponseESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..7046189
--- /dev/null
@@ -0,0 +1,88 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:27:29 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VolumeGroupExceptionResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.VolumeGroupExceptionResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VolumeGroupExceptionResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnfrest.VfResponseCommon",
+      "org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse",
+      "org.openecomp.mso.adapters.vnfrest.VolumeGroupExceptionResponse",
+      "org.openecomp.mso.openstack.exceptions.MsoExceptionCategory",
+      "org.jboss.resteasy.annotations.providers.NoJackson"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VolumeGroupExceptionResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.vnfrest.VfModuleExceptionResponse",
+      "org.openecomp.mso.adapters.vnfrest.VolumeGroupExceptionResponse"
+    );
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollbackESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollbackESTest.java
new file mode 100644 (file)
index 0000000..7a4a386
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:18:37 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VolumeGroupRollbackESTest extends VolumeGroupRollbackESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.setVolumeGroupStackId("F");
+      volumeGroupRollback0.getVolumeGroupStackId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.setVolumeGroupId("?4I<}KM\7f{|IP");
+      volumeGroupRollback0.getVolumeGroupId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest("", "");
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback("", "", false, "", "", msoRequest0, "");
+      volumeGroupRollback0.getVolumeGroupId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback("q\"(B{+Ht7bO5", "q\"(B{+Ht7bO5", false, "q\"(B{+Ht7bO5", "q\"(B{+Ht7bO5", msoRequest0, "q\"(B{+Ht7bO5");
+      volumeGroupRollback0.getTenantId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.setTenantId("");
+      volumeGroupRollback0.getTenantId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback("", "", true, "", "", msoRequest0, "");
+      volumeGroupRollback0.getMsoRequest();
+      assertTrue(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.setMessageId("~O0>CjU'2WS");
+      volumeGroupRollback0.getMessageId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.setMessageId("");
+      volumeGroupRollback0.getMessageId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.setCloudSiteId("F");
+      volumeGroupRollback0.getCloudSiteId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = null;
+      try {
+        volumeGroupRollback0 = new VolumeGroupRollback((VolumeGroupRollback) null, "", "");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.adapters.vnfrest.VolumeGroupRollback", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.getMsoRequest();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      boolean boolean0 = volumeGroupRollback0.isVolumeGroupCreated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.getVolumeGroupId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.getTenantId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.getCloudSiteId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.getMessageId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.setCloudSiteId("");
+      volumeGroupRollback0.getCloudSiteId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.getVolumeGroupStackId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+      
+      volumeGroupRollback0.setVolumeGroupCreated(true);
+      boolean boolean0 = volumeGroupRollback0.isVolumeGroupCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      volumeGroupRollback0.setVolumeGroupStackId("");
+      volumeGroupRollback0.getVolumeGroupStackId();
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      MsoRequest msoRequest0 = new MsoRequest();
+      volumeGroupRollback0.setMsoRequest(msoRequest0);
+      assertFalse(volumeGroupRollback0.isVolumeGroupCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      VolumeGroupRollback volumeGroupRollback0 = new VolumeGroupRollback();
+      VolumeGroupRollback volumeGroupRollback1 = new VolumeGroupRollback(volumeGroupRollback0, "", "HC1I]xTWKN0*icHc]");
+      assertEquals("", volumeGroupRollback1.getVolumeGroupStackId());
+      assertFalse(volumeGroupRollback1.isVolumeGroupCreated());
+      assertEquals("HC1I]xTWKN0*icHc]", volumeGroupRollback1.getMessageId());
+  }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollbackESTestscaffolding.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollbackESTestscaffolding.java
new file mode 100644 (file)
index 0000000..d88e9e7
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:18:37 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnfrest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VolumeGroupRollbackESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnfrest.VolumeGroupRollback"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VolumeGroupRollbackESTestscaffolding.class.getClassLoader() ,
+      "org.codehaus.jackson.annotate.JacksonAnnotation",
+      "org.openecomp.mso.adapters.vnfrest.VolumeGroupRollback",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.jboss.resteasy.annotations.providers.NoJackson",
+      "org.codehaus.jackson.map.annotate.JsonRootName"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/README.md b/adapters/mso-network-adapter-async-client/README.md
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/adapters/mso-network-adapter-async-client/WebContent/META-INF/MANIFEST.MF b/adapters/mso-network-adapter-async-client/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..254272e
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+
diff --git a/adapters/mso-network-adapter-async-client/pom.xml b/adapters/mso-network-adapter-async-client/pom.xml
new file mode 100644 (file)
index 0000000..3b2cd42
--- /dev/null
@@ -0,0 +1,90 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-network-adapter-async-client</artifactId>
+       <packaging>jar</packaging>
+       <name>mso-network-adapter-async-client</name>
+       <description>MSO Network Adapter Async Client</description>
+
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <version>2.6</version>
+                               <configuration>
+                                       <classesDirectory>target/classes</classesDirectory>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.jvnet.jax-ws-commons</groupId>
+                               <artifactId>jaxws-maven-plugin</artifactId>
+                               <version>2.3</version>
+                               <executions>
+                                       <execution>
+                                               <id>generate-stubs</id>
+                                               <phase>process-classes</phase>
+                                               <goals>
+                                                       <goal>wsimport</goal>
+                                               </goals>
+                                               <configuration>
+                            <vmArgs>
+                                <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
+                            </vmArgs>
+                                                       <wsdlDirectory>src/main/resources</wsdlDirectory>
+                                                       <wsdlFiles>
+                                                               <wsdlFile>NetworkAdapterNotify.wsdl</wsdlFile>
+                                                       </wsdlFiles>
+                                                       <wsdlLocation>/NetworkAdapterNotify.wsdl</wsdlLocation>
+                                                       <packageName>org.openecomp.mso.adapters.network.async.client</packageName>
+                                                       <xnocompile>false</xnocompile>
+                                                       <keep>true</keep>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings 
+                                       only. It has no influence on the Maven build itself. -->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>
+                                                                                       org.jvnet.jax-ws-commons
+                                                                               </groupId>
+                                                                               <artifactId>
+                                                                                       jaxws-maven-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [2.3,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>wsimport</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+</project>
diff --git a/adapters/mso-network-adapter-async-client/src/main/resources/NetworkAdapterNotify.wsdl b/adapters/mso-network-adapter-async-client/src/main/resources/NetworkAdapterNotify.wsdl
new file mode 100644 (file)
index 0000000..fe5346d
--- /dev/null
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01  svn-revision#13316. -->
+<definitions targetNamespace="http://com.att.mso/networkNotify" name="networkAdapterNotify" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://com.att.mso/networkNotify" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+  <types>
+    <xs:schema version="1.0" targetNamespace="http://com.att.mso/networkNotify" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+      <xs:element name="createNetworkNotification" type="tns:createNetworkNotification"/>
+
+      <xs:element name="createNetworkNotificationResponse" type="tns:createNetworkNotificationResponse"/>
+
+      <xs:element name="deleteNetworkNotification" type="tns:deleteNetworkNotification"/>
+
+      <xs:element name="deleteNetworkNotificationResponse" type="tns:deleteNetworkNotificationResponse"/>
+
+      <xs:element name="queryNetworkNotification" type="tns:queryNetworkNotification"/>
+
+      <xs:element name="queryNetworkNotificationResponse" type="tns:queryNetworkNotificationResponse"/>
+
+      <xs:element name="rollbackNetworkNotification" type="tns:rollbackNetworkNotification"/>
+
+      <xs:element name="rollbackNetworkNotificationResponse" type="tns:rollbackNetworkNotificationResponse"/>
+      
+       <xs:element name="updateNetworkNotification" type="tns:updateNetworkNotification"/>
+
+      <xs:element name="updateNetworkNotificationResponse" type="tns:updateNetworkNotificationResponse"/>
+      
+      <xs:complexType name="queryNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkExists" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="status" type="tns:networkStatus" minOccurs="0"/>
+          <xs:element name="vlans" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
+           <xs:element name="subnetIdMap"  minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="queryNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+
+      <xs:complexType name="deleteNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkDeleted" type="xs:boolean" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="deleteNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+
+      <xs:complexType name="rollbackNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="rollbackNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+
+      <xs:complexType name="createNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="subnetIdMap"  minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      
+       <xs:complexType name="createNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      
+       <xs:complexType name="updateNetworkNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="subnetIdMap"  minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="updateNetworkNotificationResponse">
+        <xs:sequence/>
+      </xs:complexType>
+
+      <xs:complexType name="networkRollback">
+        <xs:sequence>
+          <xs:element name="cloudId" type="xs:string" minOccurs="0"/>
+          <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/>
+          <xs:element name="networkCreated" type="xs:boolean"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkStackId" type="xs:string" minOccurs="0"/>
+           <xs:element name="networkName" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkType" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkUpdated" type="xs:boolean"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="physicalNetwork" type="xs:string" minOccurs="0"/>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vlans" type="xs:int" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="msoRequest">
+        <xs:sequence>
+          <xs:element name="requestId" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:simpleType name="msoExceptionCategory">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="OPENSTACK"/>
+          <xs:enumeration value="IO"/>
+          <xs:enumeration value="INTERNAL"/>
+          <xs:enumeration value="USERDATA"/>
+        </xs:restriction>
+      </xs:simpleType>
+
+      <xs:simpleType name="networkStatus">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="NOTFOUND"/>
+          <xs:enumeration value="ACTIVE"/>
+          <xs:enumeration value="DOWN"/>
+          <xs:enumeration value="BUILD"/>
+          <xs:enumeration value="ERROR"/>
+          <xs:enumeration value="UNKNOWN"/>
+        </xs:restriction>
+      </xs:simpleType>
+</xs:schema>
+  </types>
+  <message name="rollbackNetworkNotification">
+    <part name="parameters" element="tns:rollbackNetworkNotification"/>
+  </message>
+  <message name="rollbackNetworkNotificationResponse">
+    <part name="parameters" element="tns:rollbackNetworkNotificationResponse"/>
+  </message>
+  <message name="queryNetworkNotification">
+    <part name="parameters" element="tns:queryNetworkNotification"/>
+  </message>
+  <message name="queryNetworkNotificationResponse">
+    <part name="parameters" element="tns:queryNetworkNotificationResponse"/>
+  </message>
+  <message name="createNetworkNotification">
+    <part name="parameters" element="tns:createNetworkNotification"/>
+  </message>
+  <message name="createNetworkNotificationResponse">
+    <part name="parameters" element="tns:createNetworkNotificationResponse"/>
+  </message>
+  <message name="deleteNetworkNotification">
+    <part name="parameters" element="tns:deleteNetworkNotification"/>
+  </message>
+  <message name="deleteNetworkNotificationResponse">
+    <part name="parameters" element="tns:deleteNetworkNotificationResponse"/>
+  </message>
+   <message name="updateNetworkNotification">
+    <part name="parameters" element="tns:updateNetworkNotification"/>
+  </message>
+  <message name="updateNetworkNotificationResponse">
+    <part name="parameters" element="tns:updateNetworkNotificationResponse"/>
+  </message>
+  <portType name="networkAdapterNotify">
+    <operation name="rollbackNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/rollbackNetworkNotificationRequest" message="tns:rollbackNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/rollbackNetworkNotificationResponse" message="tns:rollbackNetworkNotificationResponse"/>
+    </operation>
+    <operation name="queryNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/queryNetworkNotificationRequest" message="tns:queryNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/queryNetworkNotificationResponse" message="tns:queryNetworkNotificationResponse"/>
+    </operation>
+    <operation name="createNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/createNetworkNotificationRequest" message="tns:createNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/createNetworkNotificationResponse" message="tns:createNetworkNotificationResponse"/>
+    </operation>
+    <operation name="deleteNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/deleteNetworkNotificationRequest" message="tns:deleteNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/deleteNetworkNotificationResponse" message="tns:deleteNetworkNotificationResponse"/>
+    </operation>
+     <operation name="updateNetworkNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/updateNetworkNotificationRequest" message="tns:updateNetworkNotification"/>
+      <output wsam:Action="http://com.att.mso/notify/adapterNotify/updateNetworkNotificationResponse" message="tns:updateNetworkNotificationResponse"/>
+    </operation>
+  </portType>
+  <binding name="MsoNetworkAdapterAsyncImplPortBinding" type="tns:networkAdapterNotify">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="rollbackNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="queryNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="createNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="deleteNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="updateNetworkNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+  </binding>
+  <service name="networkAdapterNotify">
+    <port name="MsoNetworkAdapterAsyncImplPort" binding="tns:MsoNetworkAdapterAsyncImplPortBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>
+
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTest.java
new file mode 100644 (file)
index 0000000..ce129e4
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:38:53 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateNetworkNotificationESTest extends CreateNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap0 = new CreateNetworkNotification.SubnetIdMap();
+      createNetworkNotification0.setSubnetIdMap(createNetworkNotification_SubnetIdMap0);
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap1 = createNetworkNotification0.getSubnetIdMap();
+      assertSame(createNetworkNotification_SubnetIdMap1, createNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.neutronNetworkId = "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory";
+      String string0 = createNetworkNotification0.getNeutronNetworkId();
+      assertEquals("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.neutronNetworkId = "";
+      String string0 = createNetworkNotification0.getNeutronNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setNetworkId("IO");
+      String string0 = createNetworkNotification0.getNetworkId();
+      assertEquals("IO", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setMessageId(",x!0\7f'6/o1Bj\"nxg JH");
+      String string0 = createNetworkNotification0.getMessageId();
+      assertEquals(",x!0\7f'6/o1Bj\"nxg JH", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.messageId = "";
+      String string0 = createNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.errorMessage = "";
+      String string0 = createNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      String string0 = createNetworkNotification0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      NetworkRollback networkRollback0 = createNetworkNotification0.getRollback();
+      assertNull(networkRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      boolean boolean0 = createNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setErrorMessage("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory");
+      String string0 = createNetworkNotification0.getErrorMessage();
+      assertEquals("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      String string0 = createNetworkNotification0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setNeutronNetworkId("");
+      assertNull(createNetworkNotification0.getErrorMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      createNetworkNotification0.setException(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = createNetworkNotification0.getException();
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setRollback((NetworkRollback) null);
+      assertNull(createNetworkNotification0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setCompleted(true);
+      boolean boolean0 = createNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      createNetworkNotification0.setNetworkId("");
+      String string0 = createNetworkNotification0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap0 = createNetworkNotification0.getSubnetIdMap();
+      assertNull(createNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      String string0 = createNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CreateNetworkNotification createNetworkNotification0 = new CreateNetworkNotification();
+      String string0 = createNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = new CreateNetworkNotification.SubnetIdMap.Entry();
+      createNetworkNotification_SubnetIdMap_Entry0.setKey("");
+      assertEquals("", createNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = new CreateNetworkNotification.SubnetIdMap.Entry();
+      String string0 = createNetworkNotification_SubnetIdMap_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = new CreateNetworkNotification.SubnetIdMap.Entry();
+      createNetworkNotification_SubnetIdMap_Entry0.setValue("'G^M#'lc\7fLg6Gw}");
+      assertNull(createNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = new CreateNetworkNotification.SubnetIdMap.Entry();
+      String string0 = createNetworkNotification_SubnetIdMap_Entry0.getKey();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap0 = new CreateNetworkNotification.SubnetIdMap();
+      createNetworkNotification_SubnetIdMap0.getEntry();
+      List<CreateNetworkNotification.SubnetIdMap.Entry> list0 = createNetworkNotification_SubnetIdMap0.getEntry();
+      assertTrue(list0.isEmpty());
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..358324c
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:38:53 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateNetworkNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification$SubnetIdMap",
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.network.async.client.NetworkRollback",
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTest.java
new file mode 100644 (file)
index 0000000..411bb0e
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:26 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateNetworkNotificationResponseESTest extends CreateNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      CreateNetworkNotificationResponse createNetworkNotificationResponse0 = new CreateNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/CreateNetworkNotificationResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..63ec1f4
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:26 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateNetworkNotificationResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotificationResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTest.java
new file mode 100644 (file)
index 0000000..2023b62
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:34:29 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteNetworkNotificationESTest extends DeleteNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.completed = true;
+      boolean boolean0 = deleteNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.messageId = "";
+      String string0 = deleteNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      deleteNetworkNotification0.setException(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = deleteNetworkNotification0.getException();
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setErrorMessage("");
+      String string0 = deleteNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setMessageId("d\7foA");
+      String string0 = deleteNetworkNotification0.getMessageId();
+      assertEquals("d\7foA", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setErrorMessage("aZ");
+      String string0 = deleteNetworkNotification0.getErrorMessage();
+      assertEquals("aZ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      String string0 = deleteNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      boolean boolean0 = deleteNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setNetworkDeleted((Boolean) null);
+      assertFalse(deleteNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      Boolean boolean0 = deleteNetworkNotification0.isNetworkDeleted();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.setCompleted(false);
+      assertFalse(deleteNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      deleteNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      DeleteNetworkNotification deleteNetworkNotification0 = new DeleteNetworkNotification();
+      String string0 = deleteNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..368b7d2
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:34:29 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteNetworkNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTest.java
new file mode 100644 (file)
index 0000000..f2a20f8
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:19 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteNetworkNotificationResponseESTest extends DeleteNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      DeleteNetworkNotificationResponse deleteNetworkNotificationResponse0 = new DeleteNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/DeleteNetworkNotificationResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..ff40a14
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:19 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteNetworkNotificationResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotificationResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTest.java
new file mode 100644 (file)
index 0000000..90f4136
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:36:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoExceptionCategoryESTest extends MsoExceptionCategoryESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoExceptionCategory[] msoExceptionCategoryArray0 = MsoExceptionCategory.values();
+      assertNotNull(msoExceptionCategoryArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.valueOf("IO");
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.valueOf((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.valueOf("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory.
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.fromValue("v@;'v:U'4Kk;");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory.v@;'v:U'4Kk;
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.fromValue("INTERNAL");
+      String string0 = msoExceptionCategory0.value();
+      assertEquals("INTERNAL", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.fromValue((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoExceptionCategoryESTestscaffolding.java
new file mode 100644 (file)
index 0000000..aff7063
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:36:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoExceptionCategoryESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoExceptionCategoryESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoExceptionCategoryESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory"
+    );
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTest.java
new file mode 100644 (file)
index 0000000..3d53643
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:33:43 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoRequestESTest extends MsoRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("");
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.requestId = "";
+      msoRequest0.requestId = "0[73oqjz<&DT/q@";
+      String string0 = msoRequest0.getRequestId();
+      assertEquals("0[73oqjz<&DT/q@", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.requestId = null;
+      msoRequest0.requestId = "";
+      String string0 = msoRequest0.getRequestId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setRequestId("");
+      assertEquals("", msoRequest0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("0[73oqjz<&DT/q@");
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertEquals("0[73oqjz<&DT/q@", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      String string0 = msoRequest0.getRequestId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/MsoRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..266db77
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:33:43 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.MsoRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTest.java
new file mode 100644 (file)
index 0000000..524d5d0
--- /dev/null
@@ -0,0 +1,301 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:33:22 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkRollbackESTest extends NetworkRollbackESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkUpdated = true;
+      boolean boolean0 = networkRollback0.isNetworkUpdated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      linkedList0.add((Integer) null);
+      networkRollback0.vlans = (List<Integer>) linkedList0;
+      List<Integer> list0 = networkRollback0.getVlans();
+      assertEquals(1, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.tenantId = "&Ks\7f9_, 2}e``";
+      String string0 = networkRollback0.getTenantId();
+      assertEquals("&Ks\7f9_, 2}e``", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.tenantId = "";
+      String string0 = networkRollback0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.physicalNetwork = "'@3 VI0";
+      String string0 = networkRollback0.getPhysicalNetwork();
+      assertEquals("'@3 VI0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.physicalNetwork = "";
+      String string0 = networkRollback0.getPhysicalNetwork();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.neutronNetworkId = "";
+      String string0 = networkRollback0.getNeutronNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkType("INXI`s_hhn8 \7f|A");
+      String string0 = networkRollback0.getNetworkType();
+      assertEquals("INXI`s_hhn8 \7f|A", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkType = "";
+      String string0 = networkRollback0.getNetworkType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkStackId = "{vfF!&8J>*u,6e";
+      String string0 = networkRollback0.getNetworkStackId();
+      assertEquals("{vfF!&8J>*u,6e", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkStackId = "";
+      String string0 = networkRollback0.getNetworkStackId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkName = "!mdg>u#";
+      String string0 = networkRollback0.getNetworkName();
+      assertEquals("!mdg>u#", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkName("");
+      String string0 = networkRollback0.getNetworkName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkId(">jKMf7Ce<f,p<");
+      String string0 = networkRollback0.getNetworkId();
+      assertEquals(">jKMf7Ce<f,p<", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkId("");
+      String string0 = networkRollback0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      MsoRequest msoRequest0 = new MsoRequest();
+      networkRollback0.msoRequest = msoRequest0;
+      MsoRequest msoRequest1 = networkRollback0.getMsoRequest();
+      assertSame(msoRequest1, msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.cloudId = "wzy(*<k&K@W";
+      String string0 = networkRollback0.getCloudId();
+      assertEquals("wzy(*<k&K@W", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setCloudId("");
+      String string0 = networkRollback0.getCloudId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      List<Integer> list0 = networkRollback0.getVlans();
+      assertEquals(0, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNetworkName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkCreated(true);
+      boolean boolean0 = networkRollback0.isNetworkCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setPhysicalNetwork("T(SG{/@|z:");
+      assertNull(networkRollback0.getNetworkName());
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      MsoRequest msoRequest0 = networkRollback0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      boolean boolean0 = networkRollback0.isNetworkCreated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNetworkStackId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getCloudId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkUpdated(false);
+      assertFalse(networkRollback0.isNetworkUpdated());
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNetworkType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setMsoRequest((MsoRequest) null);
+      assertNull(networkRollback0.getNetworkType());
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNeutronNetworkId("hiSG;1>|vJ^&^D");
+      String string0 = networkRollback0.getNeutronNetworkId();
+      assertEquals("hiSG;1>|vJ^&^D", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      boolean boolean0 = networkRollback0.isNetworkUpdated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setTenantId("");
+      assertFalse(networkRollback0.isNetworkCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getPhysicalNetwork();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      String string0 = networkRollback0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.setNetworkStackId("hiSG;1>|vJ^&^D");
+      assertNull(networkRollback0.getNetworkType());
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkRollbackESTestscaffolding.java
new file mode 100644 (file)
index 0000000..b493406
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:33:22 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class NetworkRollbackESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.NetworkRollback"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkRollbackESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.network.async.client.NetworkRollback"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTest.java
new file mode 100644 (file)
index 0000000..ac2729a
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkStatusESTest extends NetworkStatusESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      NetworkStatus[] networkStatusArray0 = NetworkStatus.values();
+      assertNotNull(networkStatusArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        NetworkStatus.valueOf((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        NetworkStatus.valueOf("RjP-NHISY|sp*/M");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.network.async.client.NetworkStatus.RjP-NHISY|sp*_/M
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        NetworkStatus.fromValue((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        NetworkStatus.fromValue("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.network.async.client.NetworkStatus.
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      NetworkStatus networkStatus0 = NetworkStatus.ACTIVE;
+      String string0 = networkStatus0.value();
+      assertEquals("ACTIVE", string0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/NetworkStatusESTestscaffolding.java
new file mode 100644 (file)
index 0000000..0d9c2ef
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:01 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class NetworkStatusESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.NetworkStatus"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkStatusESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.NetworkStatus"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(NetworkStatusESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.network.async.client.NetworkStatus"
+    );
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTest.java
new file mode 100644 (file)
index 0000000..d897ae6
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:38:17 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import javax.xml.bind.JAXBElement;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ObjectFactoryESTest extends ObjectFactoryESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      MsoRequest msoRequest0 = objectFactory0.createMsoRequest();
+      assertNull(msoRequest0.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      NetworkRollback networkRollback0 = objectFactory0.createNetworkRollback();
+      assertNull(networkRollback0.getPhysicalNetwork());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateNetworkNotification.SubnetIdMap.Entry createNetworkNotification_SubnetIdMap_Entry0 = objectFactory0.createCreateNetworkNotificationSubnetIdMapEntry();
+      assertNull(createNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateNetworkNotification.SubnetIdMap createNetworkNotification_SubnetIdMap0 = objectFactory0.createCreateNetworkNotificationSubnetIdMap();
+      assertNotNull(createNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = objectFactory0.createUpdateNetworkNotificationSubnetIdMapEntry();
+      assertNull(updateNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = objectFactory0.createUpdateNetworkNotificationSubnetIdMap();
+      assertNotNull(updateNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = objectFactory0.createQueryNetworkNotificationSubnetIdMapEntry();
+      assertNull(queryNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      DeleteNetworkNotification deleteNetworkNotification0 = objectFactory0.createDeleteNetworkNotification();
+      JAXBElement<DeleteNetworkNotification> jAXBElement0 = objectFactory0.createDeleteNetworkNotification(deleteNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap0 = objectFactory0.createQueryNetworkNotificationSubnetIdMap();
+      assertNotNull(queryNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      DeleteNetworkNotificationResponse deleteNetworkNotificationResponse0 = objectFactory0.createDeleteNetworkNotificationResponse();
+      JAXBElement<DeleteNetworkNotificationResponse> jAXBElement0 = objectFactory0.createDeleteNetworkNotificationResponse(deleteNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      RollbackNetworkNotificationResponse rollbackNetworkNotificationResponse0 = objectFactory0.createRollbackNetworkNotificationResponse();
+      JAXBElement<RollbackNetworkNotificationResponse> jAXBElement0 = objectFactory0.createRollbackNetworkNotificationResponse(rollbackNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateNetworkNotificationResponse createNetworkNotificationResponse0 = objectFactory0.createCreateNetworkNotificationResponse();
+      JAXBElement<CreateNetworkNotificationResponse> jAXBElement0 = objectFactory0.createCreateNetworkNotificationResponse(createNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      RollbackNetworkNotification rollbackNetworkNotification0 = objectFactory0.createRollbackNetworkNotification();
+      JAXBElement<RollbackNetworkNotification> jAXBElement0 = objectFactory0.createRollbackNetworkNotification(rollbackNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateNetworkNotification updateNetworkNotification0 = objectFactory0.createUpdateNetworkNotification();
+      JAXBElement<UpdateNetworkNotification> jAXBElement0 = objectFactory0.createUpdateNetworkNotification(updateNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryNetworkNotification queryNetworkNotification0 = objectFactory0.createQueryNetworkNotification();
+      JAXBElement<QueryNetworkNotification> jAXBElement0 = objectFactory0.createQueryNetworkNotification(queryNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateNetworkNotificationResponse updateNetworkNotificationResponse0 = objectFactory0.createUpdateNetworkNotificationResponse();
+      JAXBElement<UpdateNetworkNotificationResponse> jAXBElement0 = objectFactory0.createUpdateNetworkNotificationResponse(updateNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryNetworkNotificationResponse queryNetworkNotificationResponse0 = objectFactory0.createQueryNetworkNotificationResponse();
+      JAXBElement<QueryNetworkNotificationResponse> jAXBElement0 = objectFactory0.createQueryNetworkNotificationResponse(queryNetworkNotificationResponse0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateNetworkNotification createNetworkNotification0 = objectFactory0.createCreateNetworkNotification();
+      JAXBElement<CreateNetworkNotification> jAXBElement0 = objectFactory0.createCreateNetworkNotification(createNetworkNotification0);
+      assertNotNull(jAXBElement0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/ObjectFactoryESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1ac0a53
--- /dev/null
@@ -0,0 +1,103 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:38:17 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ObjectFactoryESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.ObjectFactory"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ObjectFactoryESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.NetworkRollback",
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotificationResponse",
+      "org.openecomp.mso.adapters.network.async.client.NetworkStatus",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotificationResponse",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification$SubnetIdMap",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification$SubnetIdMap",
+      "org.openecomp.mso.adapters.network.async.client.DeleteNetworkNotificationResponse",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification$SubnetIdMap",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotificationResponse",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.ObjectFactory",
+      "org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ObjectFactoryESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.network.async.client.ObjectFactory"
+    );
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTest.java
new file mode 100644 (file)
index 0000000..f5e0f95
--- /dev/null
@@ -0,0 +1,266 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:33:21 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryNetworkNotificationESTest extends QueryNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      Boolean boolean0 = new Boolean(true);
+      queryNetworkNotification0.networkExists = boolean0;
+      Boolean boolean1 = queryNetworkNotification0.isNetworkExists();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      Boolean boolean0 = new Boolean("EY");
+      queryNetworkNotification0.networkExists = boolean0;
+      Boolean boolean1 = queryNetworkNotification0.isNetworkExists();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      LinkedList<Integer> linkedList0 = new LinkedList<Integer>();
+      queryNetworkNotification0.vlans = (List<Integer>) linkedList0;
+      Integer integer0 = new Integer((-1490));
+      linkedList0.add(integer0);
+      List<Integer> list0 = queryNetworkNotification0.getVlans();
+      assertEquals(1, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap0 = new QueryNetworkNotification.SubnetIdMap();
+      queryNetworkNotification0.setSubnetIdMap(queryNetworkNotification_SubnetIdMap0);
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap1 = queryNetworkNotification0.getSubnetIdMap();
+      assertSame(queryNetworkNotification_SubnetIdMap1, queryNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      NetworkStatus networkStatus0 = NetworkStatus.ERROR;
+      queryNetworkNotification0.setStatus(networkStatus0);
+      NetworkStatus networkStatus1 = queryNetworkNotification0.getStatus();
+      assertEquals(NetworkStatus.ERROR, networkStatus1);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setNeutronNetworkId("\"9\"@lJ*tfb");
+      String string0 = queryNetworkNotification0.getNeutronNetworkId();
+      assertEquals("\"9\"@lJ*tfb", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setNetworkId("uuPPD.~Xq(<)vCwo`");
+      String string0 = queryNetworkNotification0.getNetworkId();
+      assertEquals("uuPPD.~Xq(<)vCwo`", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.messageId = "[P/";
+      String string0 = queryNetworkNotification0.getMessageId();
+      assertEquals("[P/", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.messageId = "";
+      String string0 = queryNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setErrorMessage("Q39tT8q6(`");
+      String string0 = queryNetworkNotification0.getErrorMessage();
+      assertEquals("Q39tT8q6(`", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setErrorMessage("");
+      String string0 = queryNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      List<Integer> list0 = queryNetworkNotification0.getVlans();
+      assertEquals(0, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap0 = new QueryNetworkNotification.SubnetIdMap();
+      queryNetworkNotification_SubnetIdMap0.getEntry();
+      List<QueryNetworkNotification.SubnetIdMap.Entry> list0 = queryNetworkNotification_SubnetIdMap0.getEntry();
+      assertEquals(0, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = new QueryNetworkNotification.SubnetIdMap.Entry();
+      String string0 = queryNetworkNotification_SubnetIdMap_Entry0.getKey();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = new QueryNetworkNotification.SubnetIdMap.Entry();
+      queryNetworkNotification_SubnetIdMap_Entry0.setKey("");
+      assertEquals("", queryNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = new QueryNetworkNotification.SubnetIdMap.Entry();
+      String string0 = queryNetworkNotification_SubnetIdMap_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      QueryNetworkNotification.SubnetIdMap.Entry queryNetworkNotification_SubnetIdMap_Entry0 = new QueryNetworkNotification.SubnetIdMap.Entry();
+      queryNetworkNotification_SubnetIdMap_Entry0.setValue("");
+      assertNull(queryNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setCompleted(true);
+      boolean boolean0 = queryNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      QueryNetworkNotification.SubnetIdMap queryNetworkNotification_SubnetIdMap0 = queryNetworkNotification0.getSubnetIdMap();
+      assertNull(queryNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      String string0 = queryNetworkNotification0.getNeutronNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setMessageId("q;G$a9I6oMF_p-Zy4");
+      assertNull(queryNetworkNotification0.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      String string0 = queryNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      String string0 = queryNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      queryNetworkNotification0.setException(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = queryNetworkNotification0.getException();
+      assertSame(msoExceptionCategory1, msoExceptionCategory0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      Boolean boolean0 = Boolean.TRUE;
+      queryNetworkNotification0.setNetworkExists(boolean0);
+      assertFalse(queryNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      String string0 = queryNetworkNotification0.getNetworkId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.getStatus();
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      boolean boolean0 = queryNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      Boolean boolean0 = queryNetworkNotification0.isNetworkExists();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setNetworkId("");
+      String string0 = queryNetworkNotification0.getNetworkId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      QueryNetworkNotification queryNetworkNotification0 = new QueryNetworkNotification();
+      queryNetworkNotification0.setNeutronNetworkId("");
+      String string0 = queryNetworkNotification0.getNeutronNetworkId();
+      assertEquals("", string0);
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..9442379
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:33:21 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class QueryNetworkNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.NetworkStatus",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification$SubnetIdMap"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTest.java
new file mode 100644 (file)
index 0000000..5ffce39
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:36:18 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryNetworkNotificationResponseESTest extends QueryNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      QueryNetworkNotificationResponse queryNetworkNotificationResponse0 = new QueryNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/QueryNetworkNotificationResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..cee3409
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:36:18 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class QueryNetworkNotificationResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotificationResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.QueryNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTest.java
new file mode 100644 (file)
index 0000000..2e1ec50
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:41 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackNetworkNotificationESTest extends RollbackNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.completed = true;
+      boolean boolean0 = rollbackNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.messageId = "";
+      rollbackNetworkNotification0.messageId = "V^{b/%gy^";
+      String string0 = rollbackNetworkNotification0.getMessageId();
+      assertEquals("V^{b/%gy^", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.messageId = "";
+      String string0 = rollbackNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      rollbackNetworkNotification0.exception = msoExceptionCategory0;
+      MsoExceptionCategory msoExceptionCategory1 = rollbackNetworkNotification0.getException();
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.setErrorMessage("06SZ x\"@[d5*iJ");
+      String string0 = rollbackNetworkNotification0.getErrorMessage();
+      assertEquals("06SZ x\"@[d5*iJ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.errorMessage = "";
+      String string0 = rollbackNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.setCompleted(false);
+      assertFalse(rollbackNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      boolean boolean0 = rollbackNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      String string0 = rollbackNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      rollbackNetworkNotification0.setException(msoExceptionCategory0);
+      assertFalse(rollbackNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      String string0 = rollbackNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      RollbackNetworkNotification rollbackNetworkNotification0 = new RollbackNetworkNotification();
+      rollbackNetworkNotification0.setMessageId("!!IDL8");
+      assertNull(rollbackNetworkNotification0.getErrorMessage());
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..fc15f61
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:41 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackNetworkNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotification"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTest.java
new file mode 100644 (file)
index 0000000..1858a8e
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:37:09 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackNetworkNotificationResponseESTest extends RollbackNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackNetworkNotificationResponse rollbackNetworkNotificationResponse0 = new RollbackNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/RollbackNetworkNotificationResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..15f739f
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:37:09 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackNetworkNotificationResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotificationResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.RollbackNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTest.java
new file mode 100644 (file)
index 0000000..eff07d3
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:35:17 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateNetworkNotificationESTest extends UpdateNetworkNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.setCompleted(true);
+      boolean boolean0 = updateNetworkNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = new UpdateNetworkNotification.SubnetIdMap();
+      updateNetworkNotification0.subnetIdMap = updateNetworkNotification_SubnetIdMap0;
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap1 = updateNetworkNotification0.getSubnetIdMap();
+      assertSame(updateNetworkNotification_SubnetIdMap1, updateNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      networkRollback0.networkCreated = true;
+      updateNetworkNotification0.rollback = networkRollback0;
+      NetworkRollback networkRollback1 = updateNetworkNotification0.getRollback();
+      assertNull(networkRollback1.getCloudId());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      NetworkRollback networkRollback0 = new NetworkRollback();
+      updateNetworkNotification0.rollback = networkRollback0;
+      NetworkRollback networkRollback1 = updateNetworkNotification0.getRollback();
+      assertSame(networkRollback1, networkRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.messageId = "Uc.\7fS9x&9M[n";
+      String string0 = updateNetworkNotification0.getMessageId();
+      assertEquals("Uc.\7fS9x&9M[n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.messageId = "";
+      String string0 = updateNetworkNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      updateNetworkNotification0.exception = msoExceptionCategory0;
+      MsoExceptionCategory msoExceptionCategory1 = updateNetworkNotification0.getException();
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.setErrorMessage("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory");
+      String string0 = updateNetworkNotification0.getErrorMessage();
+      assertEquals("org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.errorMessage = "";
+      String string0 = updateNetworkNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = new UpdateNetworkNotification.SubnetIdMap();
+      updateNetworkNotification_SubnetIdMap0.getEntry();
+      List<UpdateNetworkNotification.SubnetIdMap.Entry> list0 = updateNetworkNotification_SubnetIdMap0.getEntry();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = new UpdateNetworkNotification.SubnetIdMap.Entry();
+      updateNetworkNotification_SubnetIdMap_Entry0.setValue("");
+      assertEquals("", updateNetworkNotification_SubnetIdMap_Entry0.getValue());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = new UpdateNetworkNotification.SubnetIdMap.Entry();
+      String string0 = updateNetworkNotification_SubnetIdMap_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = new UpdateNetworkNotification.SubnetIdMap.Entry();
+      String string0 = updateNetworkNotification_SubnetIdMap_Entry0.getKey();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      UpdateNetworkNotification.SubnetIdMap.Entry updateNetworkNotification_SubnetIdMap_Entry0 = new UpdateNetworkNotification.SubnetIdMap.Entry();
+      updateNetworkNotification_SubnetIdMap_Entry0.setKey("F");
+      assertEquals("F", updateNetworkNotification_SubnetIdMap_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = new UpdateNetworkNotification.SubnetIdMap();
+      updateNetworkNotification0.setSubnetIdMap(updateNetworkNotification_SubnetIdMap0);
+      assertFalse(updateNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.setMessageId("");
+      assertEquals("", updateNetworkNotification0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      updateNetworkNotification0.setRollback((NetworkRollback) null);
+      assertFalse(updateNetworkNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      String string0 = updateNetworkNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      boolean boolean0 = updateNetworkNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      NetworkRollback networkRollback0 = updateNetworkNotification0.getRollback();
+      assertNull(networkRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      String string0 = updateNetworkNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      UpdateNetworkNotification.SubnetIdMap updateNetworkNotification_SubnetIdMap0 = updateNetworkNotification0.getSubnetIdMap();
+      assertNull(updateNetworkNotification_SubnetIdMap0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      UpdateNetworkNotification updateNetworkNotification0 = new UpdateNetworkNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      updateNetworkNotification0.setException(msoExceptionCategory0);
+      assertNull(updateNetworkNotification0.getMessageId());
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8c4e0ed
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:35:17 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateNetworkNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateNetworkNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification",
+      "org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory",
+      "org.openecomp.mso.adapters.network.async.client.NetworkRollback",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification$SubnetIdMap$Entry",
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification$SubnetIdMap"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTest.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTest.java
new file mode 100644 (file)
index 0000000..a493ce1
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:38:03 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateNetworkNotificationResponseESTest extends UpdateNetworkNotificationResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      UpdateNetworkNotificationResponse updateNetworkNotificationResponse0 = new UpdateNetworkNotificationResponse();
+  }
+}
diff --git a/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTestscaffolding.java b/adapters/mso-network-adapter-async-client/src/test/java/org/openecomp/mso/adapters/network/async/client/UpdateNetworkNotificationResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..f897b27
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:38:03 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.network.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateNetworkNotificationResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotificationResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateNetworkNotificationResponseESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotificationResponse"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-network-adapter/README b/adapters/mso-network-adapter/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/adapters/mso-network-adapter/WebContent/META-INF/MANIFEST.MF b/adapters/mso-network-adapter/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..5e94951
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0\r
+Class-Path: \r
+\r
diff --git a/adapters/mso-network-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector b/adapters/mso-network-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector
new file mode 100644 (file)
index 0000000..1281d32
--- /dev/null
@@ -0,0 +1 @@
+com.woorea.openstack.connector.HttpClientConnector
\ No newline at end of file
diff --git a/adapters/mso-network-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml b/adapters/mso-network-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..58ddb4a
--- /dev/null
@@ -0,0 +1,16 @@
+<jboss-deployment-structure>\r
+       <deployment>\r
+               <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->\r
+               <exclusions>\r
+                       <module name="org.apache.log4j" />\r
+                       <module name="org.slf4j" />\r
+                       <module name="org.slf4j.impl" />\r
+               </exclusions>\r
+               <dependencies>\r
+                           <module name="org.jboss.jandex" slot="main" />\r
+                <module name="org.javassist" slot="main" />\r
+                <module name="org.antlr" slot="main" />\r
+                <module name="org.dom4j" slot="main" />\r
+               </dependencies>\r
+       </deployment>\r
+</jboss-deployment-structure>
\ No newline at end of file
diff --git a/adapters/mso-network-adapter/WebContent/WEB-INF/jboss-web.xml b/adapters/mso-network-adapter/WebContent/WEB-INF/jboss-web.xml
new file mode 100644 (file)
index 0000000..251a78b
--- /dev/null
@@ -0,0 +1,3 @@
+<jboss-web>\r
+       <context-root>networks</context-root>\r
+</jboss-web>
\ No newline at end of file
diff --git a/adapters/mso-network-adapter/WebContent/WEB-INF/web.xml b/adapters/mso-network-adapter/WebContent/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..a0c726a
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+  <display-name>mso-network-adapter</display-name>
+
+   <context-param>
+       <param-name>resteasy.jndi.resources</param-name>
+       <param-value>java:module/MsoPropertiesFactory,java:module/CloudConfigFactory</param-value>
+   </context-param>
+
+   <context-param>
+       <param-name>log.configuration</param-name>
+       <param-value>logback.network.xml</param-value>
+  </context-param>
+  <context-param>
+       <param-name>mso.configuration</param-name>
+       <param-value>MSO_PROP_NETWORK_ADAPTER=mso.network.properties,MSO_PROP_TOPOLOGY=topology.properties</param-value>
+  </context-param>
+  <context-param>
+       <param-name>mso.cloud_config.configuration</param-name>
+       <param-value>cloud_config.json=2</param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.resources</param-name>
+    <param-value>
+               org.openecomp.mso.MsoStatusHandler,
+               org.openecomp.mso.logger.MsoLoggingServlet,
+               org.openecomp.mso.adapters.network.HealthCheckHandler,
+               org.openecomp.mso.adapters.network.NetworkAdapterRest
+    </param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.servlet.mapping.prefix</param-name>
+    <param-value>/rest</param-value>
+  </context-param>
+  <servlet>
+    <servlet-name>Resteasy</servlet-name>
+    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Resteasy</servlet-name>
+    <url-pattern>/rest/*</url-pattern>
+  </servlet-mapping>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SoapRequests</web-resource-name>
+            <description>Soap Ingress Requests</description>
+            <url-pattern>/NetworkAdapter</url-pattern>
+            <url-pattern>/NetworkAdapterAsync</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>BPEL-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SiteStatus</web-resource-name>
+            <description>SiteStatus APIs</description>
+            <url-pattern>/rest/setStatus/*</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>SiteControl-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>RestRequests</web-resource-name>
+            <description>Rest Ingress Requests</description>
+            <url-pattern>/rest/v1/networks/*</url-pattern>
+            <http-method>DELETE</http-method>
+            <http-method>GET</http-method>
+            <http-method>POST</http-method>
+            <http-method>PUT</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>BPEL-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <login-config>
+        <auth-method>BASIC</auth-method>
+        <realm-name>ApplicationRealm</realm-name>
+    </login-config>
+    <security-role>
+        <role-name>BPEL-Client</role-name>
+    </security-role>
+    <security-role>
+        <role-name>SiteControl-Client</role-name>
+    </security-role>
+  <filter>
+               <filter-name>LogFilter</filter-name>
+               <filter-class>org.openecomp.mso.logger.LogFilter</filter-class> 
+  </filter>
+    <filter-mapping>
+               <filter-name>LogFilter</filter-name>
+               <url-pattern>/*</url-pattern>
+       </filter-mapping>
+  <welcome-file-list>
+    <welcome-file>check.html</welcome-file>
+  </welcome-file-list>
+</web-app>
+
diff --git a/adapters/mso-network-adapter/WebContent/check.html b/adapters/mso-network-adapter/WebContent/check.html
new file mode 100644 (file)
index 0000000..00f37d6
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html>\r
+<html>\r
+<head>\r
+<meta charset="ISO-8859-1">\r
+<title>Health Check</title>\r
+</head>\r
+<body>\r
+Application ready\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/adapters/mso-network-adapter/pom.xml b/adapters/mso-network-adapter/pom.xml
new file mode 100644 (file)
index 0000000..3991bf3
--- /dev/null
@@ -0,0 +1,154 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-network-adapter</artifactId>
+       <packaging>war</packaging>
+       <name>mso-network-adapter</name>
+       <description>Web service endpoint for Network operations</description>
+
+       <!-- <properties> -->
+       <!-- <project.build.sourceEncoding/> -->
+       <!-- <project.reporting.outputEncoding/> -->
+       <!-- </properties> -->
+
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.4</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                                       <attachClasses>true</attachClasses>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.jvnet.jax-ws-commons</groupId>
+                               <artifactId>jaxws-maven-plugin</artifactId>
+                               <version>2.3</version>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>wsgen</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                               <configuration>
+                                       <verbose>true</verbose>
+                                       <sei>org.openecomp.mso.adapters.network.MsoNetworkAdapterImpl</sei>
+                                       <genWsdl>true</genWsdl>
+                                       <inlineSchemas>true</inlineSchemas>
+                               </configuration>
+                               <dependencies>
+                                       <dependency>
+                                               <groupId>com.sun.xml.ws</groupId>
+                                               <artifactId>jaxws-tools</artifactId>
+                                               <version>2.2.7</version>
+                                       </dependency>
+                                       <dependency>
+                                               <groupId>org.openecomp.mso.adapters</groupId>
+                                               <artifactId>mso-adapter-utils</artifactId>
+                                               <version>${project.version}</version>
+                                       </dependency>
+                               </dependencies>
+                       </plugin>
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings 
+                                       only. It has no influence on the Maven build itself. -->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>
+                                                                                       org.jvnet.jax-ws-commons
+                                                                               </groupId>
+                                                                               <artifactId>
+                                                                                       jaxws-maven-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [2.3,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>wsgen</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+
+       <dependencies>
+               <dependency>
+                       <groupId>javax</groupId>
+                       <artifactId>javaee-web-api</artifactId>
+                       <version>6.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-adapter-utils</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-network-adapter-async-client</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-adapters-rest-interface</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-all</artifactId>
+                       <version>1.10.19</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>javax.servlet</groupId>
+                       <artifactId>javax.servlet-api</artifactId>
+                       <version>3.1.0</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.spec.javax.ejb</groupId>
+                       <artifactId>jboss-ejb-api_3.2_spec</artifactId>
+                       <version>1.0.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.ejb3</groupId>
+                       <artifactId>jboss-ejb3-ext-api</artifactId>
+                       <version>2.2.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>status-control</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+       </dependencies>
+</project>
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java
new file mode 100644 (file)
index 0000000..dcd12d2
--- /dev/null
@@ -0,0 +1,304 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import java.io.IOException;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+/**
+ * This is the class that is used to POST replies from the MSO adapters to the BPEL engine.
+ * It can be configured via property file, or modified using the member methods.
+ * The properties to use are:
+ * org.openecomp.mso.adapters.vnf.bpelauth  encrypted authorization string to send to BEPL engine
+ * org.openecomp.mso.adapters.vnf.sockettimeout socket timeout value
+ * org.openecomp.mso.adapters.vnf.connecttimeout connect timeout value
+ * org.openecomp.mso.adapters.vnf.retrycount number of times to retry failed connections
+ * org.openecomp.mso.adapters.vnf.retryinterval interval (in seconds) between retries
+ * org.openecomp.mso.adapters.vnf.retrylist list of response codes that will trigger a retry (the special code
+ *                     900 means "connection was not established")
+ */
+public class BpelRestClient {
+       public  static final String MSO_PROP_NETWORK_ADAPTER = "MSO_PROP_NETWORK_ADAPTER";
+       private static final String PROPERTY_DOMAIN          = "org.openecomp.mso.adapters.network";
+       private static final String BPEL_AUTH_PROPERTY       = PROPERTY_DOMAIN+".bpelauth";
+       private static final String SOCKET_TIMEOUT_PROPERTY  = PROPERTY_DOMAIN+".sockettimeout";
+       private static final String CONN_TIMEOUT_PROPERTY    = PROPERTY_DOMAIN+".connecttimeout";
+       private static final String RETRY_COUNT_PROPERTY     = PROPERTY_DOMAIN+".retrycount";
+       private static final String RETRY_INTERVAL_PROPERTY  = PROPERTY_DOMAIN+".retryinterval";
+       private static final String RETRY_LIST_PROPERTY      = PROPERTY_DOMAIN+".retrylist";
+       private static final String ENCRYPTION_KEY           = "aa3871669d893c7fb8abbcda31b88b4f";
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+       /** Default socket timeout (in seconds) */
+       public static final int DEFAULT_SOCKET_TIMEOUT = 5;
+       /** Default connect timeout (in seconds) */
+       public static final int DEFAULT_CONNECT_TIMEOUT = 5;
+       /** By default, retry up to five times */
+       public static final int DEFAULT_RETRY_COUNT = 5;
+       /** Default interval to wait between retries (in seconds), negative means use backoff algorithm */
+       public static final int DEFAULT_RETRY_INTERVAL = -15;
+       /** Default list of response codes to trigger a retry */
+       public static final String DEFAULT_RETRY_LIST = "408,429,500,502,503,504,900";  // 900 is "connection failed"
+       /** Default credentials */
+       public static final String DEFAULT_CREDENTIALS = "";
+
+       // Properties of the BPEL client -- all are configurable
+       private int socketTimeout;
+       private int connectTimeout;
+       private int retryCount;
+       private int retryInterval;
+       private Set<Integer> retryList;
+       private String credentials;
+
+       // last response from BPEL engine
+       private int lastResponseCode;
+       private String lastResponse;
+
+       /**
+        * Create a client to send results to the BPEL engine, using configuration from the
+        * MSO_PROP_NETWORK_ADAPTER properties.
+        */
+       public BpelRestClient() {
+               socketTimeout  = DEFAULT_SOCKET_TIMEOUT;
+               connectTimeout = DEFAULT_CONNECT_TIMEOUT;
+               retryCount     = DEFAULT_RETRY_COUNT;
+               retryInterval  = DEFAULT_RETRY_INTERVAL;
+               setRetryList(DEFAULT_RETRY_LIST);
+               credentials    = DEFAULT_CREDENTIALS;
+               lastResponseCode = 0;
+               lastResponse = "";
+
+               try {
+                       MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+                       MsoJavaProperties jp = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_NETWORK_ADAPTER);
+                       socketTimeout  = jp.getIntProperty(SOCKET_TIMEOUT_PROPERTY, DEFAULT_SOCKET_TIMEOUT);
+                       connectTimeout = jp.getIntProperty(CONN_TIMEOUT_PROPERTY,   DEFAULT_CONNECT_TIMEOUT);
+                       retryCount     = jp.getIntProperty(RETRY_COUNT_PROPERTY,    DEFAULT_RETRY_COUNT);
+                       retryInterval  = jp.getIntProperty(RETRY_INTERVAL_PROPERTY, DEFAULT_RETRY_INTERVAL);
+                       setRetryList(jp.getProperty(RETRY_LIST_PROPERTY, DEFAULT_RETRY_LIST));
+                       credentials    = jp.getEncryptedProperty(BPEL_AUTH_PROPERTY, DEFAULT_CREDENTIALS, ENCRYPTION_KEY);
+               } catch (MsoPropertiesException e) {
+                       String error = "Unable to get properties:" + MSO_PROP_NETWORK_ADAPTER;
+                       LOGGER.error (MessageEnum.RA_CONFIG_EXC, error, "", "", MsoLogger.ErrorCode.DataError, "Unable to get properties", e);
+               }
+       }
+
+       public int getSocketTimeout() {
+               return socketTimeout;
+       }
+
+       public void setSocketTimeout(int socketTimeout) {
+               this.socketTimeout = socketTimeout;
+       }
+
+       public int getConnectTimeout() {
+               return connectTimeout;
+       }
+
+       public void setConnectTimeout(int connectTimeout) {
+               this.connectTimeout = connectTimeout;
+       }
+
+       public int getRetryCount() {
+               return retryCount;
+       }
+
+       public void setRetryCount(int retryCount) {
+               if (retryCount < 0)
+                       retryCount = DEFAULT_RETRY_COUNT;
+               this.retryCount = retryCount;
+       }
+
+       public int getRetryInterval() {
+               return retryInterval;
+       }
+
+       public void setRetryInterval(int retryInterval) {
+               this.retryInterval = retryInterval;
+       }
+
+       public String getCredentials() {
+               return credentials;
+       }
+
+       public void setCredentials(String credentials) {
+               this.credentials = credentials;
+       }
+
+       public String getRetryList() {
+               if (retryList.size() == 0)
+                       return "";
+               String t = retryList.toString();
+               return t.substring(1, t.length()-1);
+       }
+
+       public void setRetryList(String retryList) {
+               Set<Integer> s = new TreeSet<Integer>();
+               for (String t : retryList.split("[, ]")) {
+                       try {
+                               s.add(Integer.parseInt(t));
+                       } catch (NumberFormatException x) {
+                               // ignore
+                       }
+               }
+               this.retryList = s;
+       }
+
+       public int getLastResponseCode() {
+               return lastResponseCode;
+       }
+
+       public String getLastResponse() {
+               return lastResponse;
+       }
+
+       /**
+        * Post a response to the URL of the BPEL engine.  As long as the response code is one of those in
+        * the retryList, the post will be retried up to "retrycount" times with an interval (in seconds)
+        * of "retryInterval".  If retryInterval is negative, then each successive retry interval will be
+        * double the previous one.
+        * @param toBpelStr the content (XML or JSON) to post
+        * @param bpelUrl the URL to post to
+        * @param isxml true if the content is XML, otherwise assumed to be JSON
+        * @return true if the post succeeded, false if all retries failed
+        */
+       public boolean bpelPost(final String toBpelStr, final String bpelUrl, final boolean isxml)  {
+               debug("Sending response to BPEL: " + toBpelStr);
+               int totalretries = 0;
+               int retryint = retryInterval;
+               while (true) {
+                       sendOne(toBpelStr, bpelUrl, isxml);
+                       // Note: really should handle response code 415 by switching between content types if needed
+                       if (!retryList.contains(lastResponseCode)) {
+                               debug("Got response code: " + lastResponseCode + ": returning.");
+                               return true;
+                       }
+                       if (totalretries >= retryCount) {
+                               debug("Retried " + totalretries + " times, giving up.");
+                               LOGGER.error(MessageEnum.RA_SEND_VNF_NOTIF_ERR, "Could not deliver response to BPEL after "+totalretries+" tries: "+toBpelStr, "Camunda", "", MsoLogger.ErrorCode.DataError, "Could not deliver response to BPEL");
+                               return false;
+                       }
+                       totalretries++;
+                       int sleepinterval = retryint;
+                       if (retryint < 0) {
+                               // if retry interval is negative double the retry on each pass
+                               sleepinterval = -retryint;
+                               retryint *= 2;
+                       }
+                       debug("Sleeping for " + sleepinterval + " seconds.");
+                       try {
+                               Thread.sleep(sleepinterval * 1000L);
+                       } catch (InterruptedException e) {
+                               // ignore
+                       }
+               }
+       }
+       private void debug(String m) {
+               LOGGER.debug(m);
+//             System.err.println(m);
+       }
+       private void sendOne(final String toBpelStr, final String bpelUrl, final boolean isxml) {
+               LOGGER.debug("Sending to BPEL server: "+bpelUrl);
+               LOGGER.debug("Content is: "+toBpelStr);
+
+        //POST
+               HttpPost post = new HttpPost(bpelUrl);
+               if (credentials != null && !credentials.isEmpty())
+                       post.addHeader("Authorization", "Basic " + DatatypeConverter.printBase64Binary(credentials.getBytes()));
+
+        //ContentType
+        ContentType ctype = isxml ? ContentType.APPLICATION_XML : ContentType.APPLICATION_JSON;
+        post.setEntity(new StringEntity(toBpelStr, ctype));
+
+        //Timeouts
+               RequestConfig requestConfig = RequestConfig
+                       .custom()
+                       .setSocketTimeout(socketTimeout * 1000)
+                       .setConnectTimeout(connectTimeout * 1000)
+                       .build();
+               post.setConfig(requestConfig);
+
+        //Client 4.3+
+               //Execute & GetResponse
+               try (CloseableHttpClient client = HttpClients.createDefault();
+             CloseableHttpResponse response = client.execute(post)) {
+                       if (response != null) {
+                               lastResponseCode = response.getStatusLine().getStatusCode();
+                               HttpEntity entity = response.getEntity();
+                               lastResponse = (entity != null) ? EntityUtils.toString(entity) : "";
+                       } else {
+                               lastResponseCode = 900;
+                               lastResponse = "";
+                       }
+               } catch (Exception e) {
+                       String error = "Error sending Bpel notification:" + toBpelStr;
+                       LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, error, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Exception sending Bpel notification", e);
+                       lastResponseCode = 900;
+                       lastResponse = "";
+               }
+               LOGGER.debug("Response code from BPEL server: "+lastResponseCode);
+               LOGGER.debug("Response body is: "+lastResponse);
+       }
+
+       public static void main(String[] a) throws MsoPropertiesException {
+               final String bpelengine = "http://mtmac1.research.att.com:8080/catch.jsp";
+               final String propfile = "/tmp/mso.vnf.properties";
+               // "/Users/eby/src/mso.rest/mso/packages/mso-config-centralized/mso-po-adapter-config/mso.vnf.properties"
+               final String xml =
+                       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" +
+                       "<updateVolumeGroupResponse><volumeGroupId>1464013300723</volumeGroupId><volumeGroupOutputs>" +
+               "<entry><key>clyde</key><value>10</value></entry>" +
+               "<entry><key>wayne</key><value>99</value></entry>" +
+               "<entry><key>mickey</key><value>7</value></entry>" +
+               "</volumeGroupOutputs></updateVolumeGroupResponse>";
+
+               MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+               msoPropertiesFactory.initializeMsoProperties (MSO_PROP_NETWORK_ADAPTER, propfile);
+
+               BpelRestClient bc = new BpelRestClient();
+               System.out.println(bc.getRetryList());
+               System.out.println(bc.getCredentials()); // poAvos:Domain2.0!
+
+               bc.bpelPost(xml, bpelengine, true);
+               System.out.println("respcode = "+bc.getLastResponseCode());
+               System.out.println("resp = "+bc.getLastResponse());
+       }
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailPolicyRef.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailPolicyRef.java
new file mode 100644 (file)
index 0000000..6e2644d
--- /dev/null
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+
+public class ContrailPolicyRef {
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+        
+       @JsonProperty("network_policy_refs_data_sequence")
+       private ContrailPolicyRefSeq seq;
+       
+       public JsonNode toJsonNode()
+       {
+               JsonNode node = null;
+               try
+               {
+                       ObjectMapper mapper = new ObjectMapper(); 
+                       node = mapper.convertValue(this, JsonNode.class);
+               }
+               catch (Exception e)
+               {
+                       LOGGER.error (MessageEnum.RA_MARSHING_ERROR, "Error creating JsonString for Contrail Policy Ref", "", "", MsoLogger.ErrorCode.SchemaError, "Exception creating JsonString for Contrail Policy Ref", e);
+               }
+               
+               return node;
+       }
+       
+       public String toJsonString()
+       {
+               String jsonString = null;
+               try
+               {
+                       ObjectMapper mapper = new ObjectMapper(); 
+                       jsonString = mapper.writeValueAsString(this);
+               }
+               catch (Exception e)
+               {
+                       LOGGER.error (MessageEnum.RA_MARSHING_ERROR, "Error creating JsonString for Contrail Policy Ref", "", "", MsoLogger.ErrorCode.SchemaError, "Exception creating JsonString for Contrail Policy Ref", e);
+               }
+               
+               return jsonString;
+       }
+       
+       public void populate(String major, String minor)
+       {
+               seq = new ContrailPolicyRefSeq(major, minor);
+               return;
+       }
+       
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailPolicyRefSeq.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailPolicyRefSeq.java
new file mode 100644 (file)
index 0000000..b5d7502
--- /dev/null
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class ContrailPolicyRefSeq {
+       
+       @JsonProperty("network_policy_refs_data_sequence_major")
+       private String major;
+       
+       @JsonProperty("network_policy_refs_data_sequence_minor")
+       private String minor;
+
+       public ContrailPolicyRefSeq() {
+       }
+       
+       public ContrailPolicyRefSeq(String major, String minor) {
+               super();
+               this.major = major;
+               this.minor = minor;
+       }
+
+       public String getMajor() {
+               return major;
+       }
+
+       public void setMajor(String major) {
+               this.major = major;
+       }
+
+       public String getMinor() {
+               return minor;
+       }
+
+       public void setMinor(String minor) {
+               this.minor = minor;
+       }
+
+       @Override
+       public String toString() {
+               return "ContrailPolicyRefSeq [major=" + major + ", minor=" + minor
+                               + "]";
+       } 
+
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnet.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnet.java
new file mode 100644 (file)
index 0000000..3df1014
--- /dev/null
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.Pool;
+import org.openecomp.mso.openstack.beans.Subnet;
+import static org.openecomp.mso.openstack.utils.MsoCommonUtils.isNullOrEmpty;
+
+public class ContrailSubnet {
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet")
+       private ContrailSubnetIp subnet = new ContrailSubnetIp();
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_default_gateway")
+       private String default_gateway;
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_name")
+       private String subnet_name;
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_enable_dhcp")
+       private Boolean enable_dhcp;
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_addr_from_start")
+       private Boolean addr_from_start = true;
+       
+       /** future - leave this commented
+       private String subnet_uuid;
+       private String dns_server_address;
+       private List<String> dns_nameservers;
+       private String dhcp_option_list;
+       private String host_routes;
+       **/
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools")
+       private List<ContrailSubnetPool> allocation_pools =  new ArrayList <ContrailSubnetPool> ();
+
+       public ContrailSubnet() {
+               super();
+       }
+
+       public String getDefault_gateway() {
+               return default_gateway;
+       }
+
+       public void setDefault_gateway(String default_gateway) {
+               this.default_gateway = default_gateway;
+       }
+
+       public ContrailSubnetIp getSubnet() {
+               return subnet;
+       }
+
+       public void setSubnet(ContrailSubnetIp subnet) {
+               this.subnet = subnet;
+       }
+
+       public Boolean isEnable_dhcp() {
+               return enable_dhcp;
+       }
+
+       public void setEnable_dhcp(Boolean enable_dhcp) {
+               this.enable_dhcp = enable_dhcp;
+       }
+
+       public String getSubnet_name() {
+               return subnet_name;
+       }
+
+       public void setSubnet_name(String subnet_name) {
+               this.subnet_name = subnet_name;
+       }
+
+       public List<ContrailSubnetPool> getAllocation_pools() {
+               return allocation_pools;
+       }
+
+       public void setPools(List<ContrailSubnetPool> allocation_pools) {
+               this.allocation_pools = allocation_pools;
+       }
+
+       public Boolean isAddr_from_start() {
+               return addr_from_start;
+       }
+
+       public void setAddr_from_start(Boolean addr_from_start) {
+               this.addr_from_start = addr_from_start;
+       }
+
+       public JsonNode toJsonNode()
+       {
+               JsonNode node = null;
+               try
+               {
+                       ObjectMapper mapper = new ObjectMapper();
+                       node = mapper.convertValue(this, JsonNode.class);
+               }
+               catch (Exception e)
+               {
+                       String error = "Error creating JsonNode for Contrail Subnet:" + subnet_name;
+                       LOGGER.error (MessageEnum.RA_MARSHING_ERROR, error, "", "", MsoLogger.ErrorCode.SchemaError, "Exception creating JsonNode for Contrail Subnet", e);
+               }
+               
+               return node;
+       }
+       
+       public String toJsonString()
+       {
+               String jsonString = null;
+               try
+               {
+                       ObjectMapper mapper = new ObjectMapper();
+                       jsonString = mapper.writeValueAsString(this);
+               }
+               catch (Exception e)
+               {
+                       String error = "Error creating JsonString for Contrail Subnet:" + subnet_name;
+                       LOGGER.error (MessageEnum.RA_MARSHING_ERROR, error, "", "", MsoLogger.ErrorCode.SchemaError, "Exception creating JsonString for Contrail Subnet", e);
+               }
+               
+               return jsonString;
+       }
+       //poulate contrail subnet with input(from bopel) subnet
+       public void populateWith(Subnet i_subnet)
+       {
+               if (i_subnet != null)
+               {
+                       if (!isNullOrEmpty(i_subnet.getSubnetName()))
+                               subnet_name = i_subnet.getSubnetName();
+                       else
+                               subnet_name = i_subnet.getSubnetId();
+                       enable_dhcp = i_subnet.getEnableDHCP();
+                       default_gateway = i_subnet.getGatewayIp();
+                       if (!isNullOrEmpty(i_subnet.getCidr()) )
+                       {
+                               int idx = i_subnet.getCidr().indexOf("/");
+                               if (idx != -1)
+                               {
+                                       subnet.setIp_prefix(i_subnet.getCidr().substring(0, idx));
+                                       subnet.setIp_prefix_len(i_subnet.getCidr().substring(idx+1));
+                               }
+                       }
+                       if (i_subnet.getAllocationPools() != null)
+                       {
+                               for (Pool pool : i_subnet.getAllocationPools())
+                               {
+                                       if ( !isNullOrEmpty(pool.getStart()) && !isNullOrEmpty(pool.getEnd()) )
+                                       {               
+                                               ContrailSubnetPool csp = new ContrailSubnetPool();
+                                               csp.populateWith(pool);
+                                               allocation_pools.add (csp);
+                                       }
+                               }
+                       }
+               }
+       }
+
+       @Override
+       public String toString() {
+               
+               StringBuilder buf = new StringBuilder ();
+               for (ContrailSubnetPool pool : allocation_pools)
+               {
+                        buf.append(pool.toString());
+               }
+               return "ContrailSubnet [subnet=" + subnet.toString() + " default_gateway=" + default_gateway
+                               + " enable_dhcp=" + enable_dhcp +  " addr_from_start=" + addr_from_start + " subnet_name=" + subnet_name + " allocation_pools=" + buf + " ]";
+       }
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetIp.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetIp.java
new file mode 100644 (file)
index 0000000..c0a5311
--- /dev/null
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class ContrailSubnetIp {
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix")
+       private String ip_prefix;
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len")
+       private String ip_prefix_len; 
+
+       public ContrailSubnetIp() {
+       }
+
+       public String getIp_prefix() {
+               return ip_prefix;
+       }
+
+       public void setIp_prefix(String ip_prefix) {
+               this.ip_prefix = ip_prefix;
+       }
+
+       public String getIp_prefix_len() {
+               return ip_prefix_len;
+       }
+
+       public void setIp_prefix_len(String ip_prefix_len) {
+               this.ip_prefix_len = ip_prefix_len;
+       }
+
+       @Override
+       public String toString() {
+               return "ContrailSubnetIp [ip_prefix=" + ip_prefix + ", ip_prefix_len=" + ip_prefix_len + "]";
+       }
+
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetPool.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/ContrailSubnetPool.java
new file mode 100644 (file)
index 0000000..5b40ba2
--- /dev/null
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import org.openecomp.mso.openstack.beans.Pool;
+import org.codehaus.jackson.annotate.JsonProperty;
+public class ContrailSubnetPool {
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools_start")
+       private String start;
+       
+       @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools_end")
+       private String end;
+
+       public ContrailSubnetPool() {
+       }
+
+       public String getStart() {
+               return start;
+       }
+
+       public void setStart(String start) {
+               this.start = start;
+       }
+
+       public String getEnd() {
+               return end;
+       }
+
+       public void setEnd(String end) {
+               this.end = end;
+       }
+       
+       public void populateWith(Pool pool)
+       {
+               if (pool != null)
+               {
+                       start = pool.getStart();
+                       end = pool.getEnd();
+               }
+       }
+
+       @Override
+       public String toString() {
+               return "ContrailSubnetPool [start=" + start + ", end=" + end + "]";
+       }
+       
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/HealthCheckHandler.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/HealthCheckHandler.java
new file mode 100644 (file)
index 0000000..2767baf
--- /dev/null
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.HealthCheckUtils;
+import org.openecomp.mso.utils.UUIDChecker;
+
+
+@Path("/")
+       public class HealthCheckHandler {
+               
+               private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+               private static final String MSO_PROP_NETWORK_ADAPTER = "MSO_PROP_NETWORK_ADAPTER";
+
+           @HEAD
+           @GET
+           @Path("/healthcheck")
+           @Produces("text/html")
+           public Response healthcheck (@QueryParam("requestId") String requestId) {
+                       long startTime = System.currentTimeMillis ();
+                       MsoLogger.setServiceName ("Healthcheck");
+                       UUIDChecker.verifyOldUUID(requestId, msoLogger);
+                       HealthCheckUtils healthCheck = new HealthCheckUtils ();
+                       if (!healthCheck.siteStatusCheck(msoLogger, startTime)) {
+                               return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+                       }
+
+                       if (!healthCheck.configFileCheck(msoLogger, startTime, MSO_PROP_NETWORK_ADAPTER)) {
+                               return HealthCheckUtils.NOT_STARTED_RESPONSE;
+                       }
+
+                       if (!healthCheck.catalogDBCheck (msoLogger, startTime)) {
+                               return HealthCheckUtils.NOT_STARTED_RESPONSE;
+                       }
+                       msoLogger.debug("healthcheck - Successful");
+                       return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+           }
+
+
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapter.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapter.java
new file mode 100644 (file)
index 0000000..4960877
--- /dev/null
@@ -0,0 +1,216 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import java.util.List;
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebParam.Mode;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.ws.Holder;
+
+import org.openecomp.mso.adapters.network.exceptions.NetworkException;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+import org.openecomp.mso.openstack.beans.NetworkStatus;
+import org.openecomp.mso.openstack.beans.Subnet;
+
+@WebService (name="NetworkAdapter", targetNamespace="http://com.att.mso/network")
+public interface MsoNetworkAdapter
+{
+       // TODO:  Rename all of these to include Vlan in the service name?  At least for the
+       // create and update calls, since they are specific to VLAN-based provider networks.
+
+       /**
+        * This is the "Create Network" Web Service Endpoint definition.
+        */
+       @WebMethod
+       public void createNetwork (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkName") @XmlElement(required=true) String networkName,
+                                                       @WebParam(name="physicalNetworkName") String physicalNetworkName,
+                                                       @WebParam(name="vlans") List<Integer> vlans,
+                                                       @WebParam(name="failIfExists") Boolean failIfExists,
+                                                       @WebParam(name="backout") Boolean backout,
+                                                       @WebParam(name="subnets") List<Subnet> subnets,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="networkId", mode=Mode.OUT) Holder<String> networkId,
+                                                       @WebParam(name="neutronNetworkId", mode=Mode.OUT) Holder<String> neutronNetworkId,
+                                                       @WebParam(name="subnetIdMap", mode=Mode.OUT) Holder<Map<String, String>> subnetIdMap,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<NetworkRollback> rollback )
+               throws NetworkException;
+
+       @WebMethod
+       public void createNetworkContrail (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkName") @XmlElement(required=true) String networkName,
+                                                       @WebParam(name="routeTargets") List<String> routeTargets,
+                                                       @WebParam(name="shared") String shared,
+                                                       @WebParam(name="external") String external,
+                                                       @WebParam(name="failIfExists") Boolean failIfExists,
+                                                       @WebParam(name="backout") Boolean backout,
+                                                       @WebParam(name="subnets") List<Subnet> subnets,
+                                                       @WebParam(name="policyFqdns") List<String> policyFqdns,
+                                                       @WebParam(name="routeTableFqdns") List<String> routeTableFqdns,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="networkId", mode=Mode.OUT) Holder<String> networkId,
+                                                       @WebParam(name="neutronNetworkId", mode=Mode.OUT) Holder<String> neutronNetworkId,
+                                                       @WebParam(name="networkFqdn", mode=Mode.OUT) Holder<String> networkFqdn,
+                                                       @WebParam(name="subnetIdMap", mode=Mode.OUT) Holder<Map<String, String>> subnetIdMap,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<NetworkRollback> rollback )
+               throws NetworkException;
+
+       /**
+        * This is the "Update VLANs" Web Service Endpoint definition.
+        * This webservice replaces the set of VLANs on a network.
+        */
+       @WebMethod
+       public void updateNetwork (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkId") @XmlElement(required=true) String networkId,
+                                                       @WebParam(name="networkName") @XmlElement(required=true) String networkName,
+                                                       @WebParam(name="physicalNetworkName") @XmlElement(required=true) String physicalNetworkName,
+                                                       @WebParam(name="vlans") @XmlElement(required=true) List<Integer> vlans,
+                                                       @WebParam(name="subnets") List<Subnet> subnets,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="subnetIdMap", mode=Mode.OUT) Holder<Map<String, String>> subnetIdMap,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<NetworkRollback> rollback )
+               throws NetworkException;
+
+       @WebMethod
+       public void updateNetworkContrail (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkId") @XmlElement(required=true) String networkId,
+                                                       @WebParam(name="networkName") @XmlElement(required=true) String networkName,
+                                                       @WebParam(name="routeTargets") List<String> routeTargets,
+                                                       @WebParam(name="shared") String shared,
+                                                       @WebParam(name="external") String external,
+                                                       @WebParam(name="subnets") List<Subnet> subnets,
+                                                       @WebParam(name="policyFqdns") List<String> policyFqdns,
+                                                       @WebParam(name="routeTableFqdns") List<String> routeTableFqdns,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="subnetIdMap", mode=Mode.OUT) Holder<Map<String, String>> subnetIdMap,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<NetworkRollback> rollback )
+               throws NetworkException;
+
+       /**
+        * TODO:
+        * This is the "Add VLAN" Web Service Endpoint definition.
+        * This webservice adds a VLAN to a network.
+        * This service assumes that PO supports querying the current vlans in real time.
+        * Otherwise, the caller must have the complete list and should use updateVlans instead.
+       @WebMethod
+       public void addVlan (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkId") @XmlElement(required=true) String networkId,
+                                                       @WebParam(name="physicalNetworkName") @XmlElement(required=true) String physicalNetworkName,
+                                                       @WebParam(name="vlan") @XmlElement(required=true) Integer vlan,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<NetworkRollback> rollback )
+               throws NetworkException;
+        */
+
+       /**
+        * TODO:
+        * This is the "Remove VLAN" Web Service Endpoint definition.
+        * This webservice removes a VLAN from a network.
+        * This service assumes that PO supports querying the current vlans in real time.
+        * Otherwise, the caller must have the complete list and should use updateVlans instead.
+        *
+        * This service returns an indicator (noMoreVLans) if the VLAN that was removed was
+        * the last one on the network.
+        *
+        * It is not clear that Rollback will work for delete.  The network can be
+        * recreated from the NetworkRollback object, but the network ID (and stack ID
+        * for Heat-based orchestration) will be different.  The caller will need to know
+        * to update these identifiers in the inventory DB (A&AI).
+       @WebMethod
+       public void removeVlan (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkId") @XmlElement(required=true) String networkId,
+                                                       @WebParam(name="physicalNetworkName") @XmlElement(required=true) String physicalNetworkName,
+                                                       @WebParam(name="vlan") @XmlElement(required=true) Integer vlan,
+                                                       @WebParam(name="noMoreVlans", mode=Mode.OUT) Holder<Boolean> noMoreVlans,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<NetworkRollback> rollback )
+               throws NetworkException;
+        */
+
+       /**
+        * This is the "Query Network" Web Service Endpoint definition.
+        * TODO: Should this just return the NetworkInfo complete structure?
+        */
+       @WebMethod
+       public void queryNetwork (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkNameOrId") @XmlElement(required=true) String networkNameOrId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="networkExists", mode=Mode.OUT) Holder<Boolean> networkExists,
+                                                       @WebParam(name="networkId", mode=Mode.OUT) Holder<String> networkId,
+                                                       @WebParam(name="neutronNetworkId", mode=Mode.OUT) Holder<String> neutronNetworkId,
+                                                       @WebParam(name="status", mode=Mode.OUT) Holder<NetworkStatus> status,
+                                                       @WebParam(name="vlans", mode=Mode.OUT) Holder<List<Integer>> vlans,
+                                                       @WebParam(name="subnetIdMap", mode=Mode.OUT) Holder<Map<String, String>> subnetIdMap)
+               throws NetworkException;
+
+       @WebMethod
+       public void queryNetworkContrail (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkNameOrId") @XmlElement(required=true) String networkNameOrId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="networkExists", mode=Mode.OUT) Holder<Boolean> networkExists,
+                                                       @WebParam(name="networkId", mode=Mode.OUT) Holder<String> networkId,
+                                                       @WebParam(name="neutronNetworkId", mode=Mode.OUT) Holder<String> neutronNetworkId,
+                                                       @WebParam(name="status", mode=Mode.OUT) Holder<NetworkStatus> status,
+                                                       @WebParam(name="routeTargets", mode=Mode.OUT) Holder<List<String>> routeTargets,
+                                                       @WebParam(name="subnetIdMap", mode=Mode.OUT) Holder<Map<String, String>> subnetIdMap)
+               throws NetworkException;
+
+       /**
+        * This is the "Delete Network" Web Service endpoint definition.
+        */
+       @WebMethod
+       public void deleteNetwork (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkId") @XmlElement(required=true) String networkId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="networkDeleted", mode=Mode.OUT) Holder<Boolean> networkDeleted)
+               throws NetworkException;
+
+       /**
+        * This is the "Rollback Network" Web Service endpoint definition.
+        */
+       @WebMethod
+       public void rollbackNetwork (@WebParam(name="rollback") @XmlElement(required=true) NetworkRollback rollback)
+               throws NetworkException;
+
+       @WebMethod
+       public void healthCheck ();
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsync.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsync.java
new file mode 100644 (file)
index 0000000..e79ba12
--- /dev/null
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.Subnet;
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+
+import java.util.List;
+/**
+ * This webservice defines the Asynchronous versions of NETWORK adapter calls.
+ * The notification messages for final responses are documented elsewhere
+ * (by the client service WSDL).
+ *
+ */
+@WebService (name="NetworkAdapterAsync", targetNamespace="http://com.att.mso/networkA")
+public interface MsoNetworkAdapterAsync
+{
+       /**
+        * This is the "Create NETWORK" Web Service Endpoint definition.
+        */
+       @WebMethod
+       @Oneway
+       public void createNetworkA (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkName") @XmlElement(required=true) String networkName,
+                                                       @WebParam(name="physicalNetworkName") String physicalNetworkName,
+                                                       @WebParam(name="vlans") List<Integer> vlans,
+                                                       @WebParam(name="failIfExists") Boolean failIfExists,
+                                                       @WebParam(name="backout") Boolean backout,
+                                                       @WebParam(name="subnets") List<Subnet> subnets,
+                                                       @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+       
+       @WebMethod
+       @Oneway
+       public void updateNetworkA (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                               @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                               @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                               @WebParam(name="networkId") @XmlElement(required=true) String networkId,
+                                               @WebParam(name="networkName") @XmlElement(required=true) String networkName,
+                                               @WebParam(name="physicalNetworkName") @XmlElement(required=true) String physicalNetworkName,
+                                               @WebParam(name="vlans") @XmlElement(required=true) List<Integer> vlans,
+                                               @WebParam(name="subnets") List<Subnet> subnets,
+                                               @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                               @WebParam(name="request") MsoRequest msoRequest,
+                                               @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+
+       @WebMethod
+       @Oneway
+       public void queryNetworkA (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkNameOrId") @XmlElement(required=true) String networkNameOrId,
+                                                       @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+
+       @WebMethod
+       @Oneway
+       public void deleteNetworkA (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="networkType") @XmlElement(required=true) String networkType,
+                                                       @WebParam(name="networkId") @XmlElement(required=true) String networkId,
+                                                       @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+
+       @WebMethod
+       @Oneway
+       public void rollbackNetworkA (@WebParam(name="rollback") @XmlElement(required=true) NetworkRollback rollback,
+                                               @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                               @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+       
+       @WebMethod
+       public void healthCheckA ();
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsyncImpl.java
new file mode 100644 (file)
index 0000000..75cbc63
--- /dev/null
@@ -0,0 +1,679 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jws.WebService;
+import javax.xml.bind.DatatypeConverter;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Holder;
+import javax.xml.ws.handler.MessageContext;
+
+import org.openecomp.mso.adapters.network.async.client.CreateNetworkNotification;
+import org.openecomp.mso.adapters.network.async.client.MsoExceptionCategory;
+import org.openecomp.mso.adapters.network.async.client.NetworkAdapterNotify;
+import org.openecomp.mso.adapters.network.async.client.NetworkAdapterNotify_Service;
+import org.openecomp.mso.adapters.network.async.client.QueryNetworkNotification;
+import org.openecomp.mso.adapters.network.async.client.UpdateNetworkNotification;
+import org.openecomp.mso.adapters.network.exceptions.NetworkException;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+import org.openecomp.mso.openstack.beans.NetworkStatus;
+import org.openecomp.mso.openstack.beans.Subnet;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+
+@WebService(serviceName = "NetworkAdapterAsync", endpointInterface = "org.openecomp.mso.adapters.network.MsoNetworkAdapterAsync", targetNamespace = "http://com.att.mso/networkA")
+public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
+
+       MsoPropertiesFactory msoPropertiesFactory=new MsoPropertiesFactory();
+
+       CloudConfigFactory cloudConfigFactory=new CloudConfigFactory();
+
+       public static final String MSO_PROP_NETWORK_ADAPTER="MSO_PROP_NETWORK_ADAPTER";
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+    private static final String BPEL_AUTH_PROP = "org.openecomp.mso.adapters.network.bpelauth";
+    private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+    /**
+     * Health Check web method. Does nothing but return to show the adapter is deployed.
+     */
+    @Override
+    public void healthCheckA () {
+        LOGGER.debug ("Health check call in Network Adapter");
+    }
+
+    /**
+     * This is the "Create Network" web service implementation.
+     * It will create a new Network of the requested type in the specified cloud
+     * and tenant. The tenant must exist at the time this service is called.
+     *
+     * If a network with the same name already exists, this can be considered a
+     * success or failure, depending on the value of the 'failIfExists' parameter.
+     *
+     * There will be a pre-defined set of network types defined in the MSO Catalog.
+     * All such networks will have a similar configuration, based on the allowable
+     * Openstack networking definitions. This includes basic networks, provider
+     * networks (with a single VLAN), and multi-provider networks (one or more VLANs)
+     *
+     * Initially, all provider networks must be "vlan" type, and multiple segments in
+     * a multi-provider network must be multiple VLANs on the same physical network.
+     *
+     * This service supports two modes of Network creation/update:
+     * - via Heat Templates
+     * - via Neutron API
+     * The network orchestration mode for each network type is declared in its
+     * catalog definition. All Heat-based templates must support some subset of
+     * the same input parameters: network_name, physical_network, vlan(s).
+     *
+     * The method returns the network ID and a NetworkRollback object. This latter
+     * object can be passed as-is to the rollbackNetwork operation to undo everything
+     * that was created. This is useful if a network is successfully created but
+     * the orchestration fails on a subsequent operation.
+     */
+    @Override
+    public void createNetworkA (String cloudSiteId,
+                                String tenantId,
+                                String networkType,
+                                String networkName,
+                                String physicalNetworkName,
+                                List <Integer> vlans,
+                                Boolean failIfExists,
+                                Boolean backout,
+                                List <Subnet> subnets,
+                                String messageId,
+                                MsoRequest msoRequest,
+                                String notificationUrl) {
+        String error;
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName ("CreateNetworkA");
+        LOGGER.debug ("Async Create Network: " + networkName
+                                      + " of type "
+                                      + networkType
+                                      + " in "
+                                      + cloudSiteId
+                                      + "/"
+                                      + tenantId);
+
+        // Use the synchronous method to perform the actual Create
+        MsoNetworkAdapter networkAdapter = new MsoNetworkAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        // Synchronous Web Service Outputs
+        Holder <String> networkId = new Holder <String> ();
+        Holder <String> neutronNetworkId = new Holder <String> ();
+        Holder <NetworkRollback> networkRollback = new Holder <NetworkRollback> ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <Map <String, String>> ();
+
+        try {
+            networkAdapter.createNetwork (cloudSiteId,
+                                          tenantId,
+                                          networkType,
+                                          networkName,
+                                          physicalNetworkName,
+                                          vlans,
+                                          failIfExists,
+                                          backout,
+                                          subnets,
+                                          msoRequest,
+                                          networkId,
+                                          neutronNetworkId,
+                                          subnetIdMap,
+                                          networkRollback);
+        } catch (NetworkException e) {
+            LOGGER.debug ("Got a NetworkException on createNetwork: ", e);
+            MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
+            } catch (Exception e1) {
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception - fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                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);
+            }
+            return;
+        }
+        LOGGER.debug ("Async Create Network:Name " + networkName + " physicalNetworkName:" + physicalNetworkName);
+        // Build and send Asynchronous response
+        try {
+            NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            notifyPort.createNetworkNotification (messageId,
+                                                  true,
+                                                  null,
+                                                  null,
+                                                  networkId.value,
+                                                  neutronNetworkId.value,
+                                                  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);
+        }
+        return;
+    }
+
+    /**
+     * This is the "Update Network" web service implementation.
+     * It will update an existing Network of the requested type in the specified cloud
+     * and tenant. The typical use will be to replace the VLANs with the supplied
+     * list (to add or remove a VLAN), but other properties may be updated as well.
+     *
+     * There will be a pre-defined set of network types defined in the MSO Catalog.
+     * All such networks will have a similar configuration, based on the allowable
+     * Openstack networking definitions. This includes basic networks, provider
+     * networks (with a single VLAN), and multi-provider networks (one or more VLANs).
+     *
+     * Initially, all provider networks must currently be "vlan" type, and multi-provider
+     * networks must be multiple VLANs on the same physical network.
+     *
+     * This service supports two modes of Network update:
+     * - via Heat Templates
+     * - via Neutron API
+     * The network orchestration mode for each network type is declared in its
+     * catalog definition. All Heat-based templates must support some subset of
+     * the same input parameters: network_name, physical_network, vlan, segments.
+     *
+     * The method returns a NetworkRollback object. This object can be passed
+     * as-is to the rollbackNetwork operation to undo everything that was updated.
+     * This is useful if a network is successfully updated but orchestration
+     * fails on a subsequent operation.
+     */
+    @Override
+    public void updateNetworkA (String cloudSiteId,
+                                String tenantId,
+                                String networkType,
+                                String networkId,
+                                String networkName,
+                                String physicalNetworkName,
+                                List <Integer> vlans,
+                                List <Subnet> subnets,
+                                String messageId,
+                                MsoRequest msoRequest,
+                                String notificationUrl) {
+        String error;
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        String serviceName = "UpdateNetworkA";
+        MsoLogger.setServiceName (serviceName);
+        MsoLogger.setLogContext (msoRequest);
+        LOGGER.debug ("Async Update Network: " + networkId
+                      + " of type "
+                      + networkType
+                      + "in "
+                      + cloudSiteId
+                      + "/"
+                      + tenantId);
+
+        // Use the synchronous method to perform the actual Create
+        MsoNetworkAdapter networkAdapter = new MsoNetworkAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        // Synchronous Web Service Outputs
+        Holder <NetworkRollback> networkRollback = new Holder <NetworkRollback> ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <Map <String, String>> ();
+
+        try {
+            networkAdapter.updateNetwork (cloudSiteId,
+                                          tenantId,
+                                          networkType,
+                                          networkId,
+                                          networkName,
+                                          physicalNetworkName,
+                                          vlans,
+                                          subnets,
+                                          msoRequest,
+                                          subnetIdMap,
+                                          networkRollback);
+            MsoLogger.setServiceName (serviceName);
+        } catch (NetworkException e) {
+               MsoLogger.setServiceName (serviceName);
+            LOGGER.debug ("Got a NetworkException on updateNetwork: ", e);
+            MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
+            } catch (Exception e1) {
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception - fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.updateNetworkNotification (messageId, false, exCat, eMsg, null, copyNrb (networkRollback));
+            } catch (Exception e1) {
+                error = "Error sending updateNetwork notification " + e1.getMessage ();
+                LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception sending updateNetwork notification", e1);
+                alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+            }
+            return;
+        }
+        LOGGER.debug ("Async Update Network:Name " + networkName + " NetworkId:" + networkId);
+        // Build and send Asynchronous response
+        try {
+            NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            notifyPort.updateNetworkNotification (messageId,
+                                                  true,
+                                                  null,
+                                                  null,
+                                                  copyUpdateSubnetIdMap (subnetIdMap),
+                                                  copyNrb (networkRollback));
+        } catch (Exception e) {
+            error = "Error sending updateNotification request" + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception sending updateNotification request", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+        }
+        return;
+    }
+
+    /**
+     * This is the queryNetwork method. It returns the existence and status of
+     * the specified network, along with its Neutron UUID and list of VLANs.
+     * This method attempts to find the network using both Heat and Neutron.
+     * Heat stacks are first searched based on the provided network name/id.
+     * If none is found, the Neutron is directly queried.
+     */
+    @Override
+    public void queryNetworkA (String cloudSiteId,
+                               String tenantId,
+                               String networkNameOrId,
+                               String messageId,
+                               MsoRequest msoRequest,
+                               String notificationUrl) {
+        String error;
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setLogContext (msoRequest);
+        String serviceName = "QueryNetworkA";
+        MsoLogger.setServiceName (serviceName);
+        LOGGER.debug ("Async Query Network " + networkNameOrId + " in " + cloudSiteId + "/" + tenantId);
+
+        // Use the synchronous method to perform the actual Create
+        MsoNetworkAdapter networkAdapter = new MsoNetworkAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        // Synchronous Web Service Outputs
+        Holder <Boolean> networkExists = new Holder <Boolean> ();
+        Holder <String> networkId = new Holder <String> ();
+        Holder <String> neutronNetworkId = new Holder <String> ();
+        Holder <NetworkStatus> status = new Holder <NetworkStatus> ();
+        Holder <List <Integer>> vlans = new Holder <List <Integer>> ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <Map <String, String>> ();
+
+        try {
+            networkAdapter.queryNetwork (cloudSiteId,
+                                         tenantId,
+                                         networkNameOrId,
+                                         msoRequest,
+                                         networkExists,
+                                         networkId,
+                                         neutronNetworkId,
+                                         status,
+                                         vlans,
+                                         subnetIdMap);
+            MsoLogger.setServiceName (serviceName);
+        } catch (NetworkException e) {
+               MsoLogger.setServiceName (serviceName);
+            LOGGER.debug ("Got a NetworkException on createNetwork: ", e);
+            MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
+            } catch (Exception e1) {
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception - fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.queryNetworkNotification (messageId, false, exCat, eMsg, null, null, 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);
+            }
+            return;
+        }
+        LOGGER.debug ("Async Query Network:NameOrId " + networkNameOrId + " tenantId:" + tenantId);
+        // Build and send Asynchronous response
+        try {
+            NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            org.openecomp.mso.adapters.network.async.client.NetworkStatus networkS = org.openecomp.mso.adapters.network.async.client.NetworkStatus.fromValue (status.value.name ());
+            notifyPort.queryNetworkNotification (messageId,
+                                                 true,
+                                                 null,
+                                                 null,
+                                                 networkExists.value,
+                                                 networkId.value,
+                                                 neutronNetworkId.value,
+                                                 networkS,
+                                                 vlans.value,
+                                                 copyQuerySubnetIdMap (subnetIdMap));
+        } 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);
+        }
+        return;
+    }
+
+    /**
+     * This is the "Delete Network" web service implementation.
+     * It will delete a Network in the specified cloud and tenant.
+     *
+     * If the network is not found, it is treated as a success.
+     *
+     * This service supports two modes of Network creation/update/delete:
+     * - via Heat Templates
+     * - via Neutron API
+     * The network orchestration mode for each network type is declared in its
+     * catalog definition.
+     *
+     * For Heat-based orchestration, the networkId should be the stack ID.
+     * For Neutron-based orchestration, the networkId should be the Neutron network UUID.
+     *
+     * The method returns nothing on success. Rollback is not possible for delete
+     * commands, so any failure on delete will require manual fallout in the client.
+     */
+    @Override
+    public void deleteNetworkA (String cloudSiteId,
+                                String tenantId,
+                                String networkType,
+                                String networkId,
+                                String messageId,
+                                MsoRequest msoRequest,
+                                String notificationUrl) {
+        String error;
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setLogContext (msoRequest);
+        String serviceName = "DeleteNetworkA";
+        MsoLogger.setServiceName (serviceName);
+        LOGGER.debug ("Async Delete Network " + networkId + " in " + cloudSiteId + "/" + tenantId);
+
+        // Use the synchronous method to perform the actual Create
+        MsoNetworkAdapter networkAdapter = new MsoNetworkAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        // Synchronous Web Service Outputs
+        Holder <Boolean> networkDeleted = new Holder <Boolean> ();
+
+        try {
+            networkAdapter.deleteNetwork (cloudSiteId, tenantId, networkType, networkId, msoRequest, networkDeleted);
+            MsoLogger.setServiceName (serviceName);
+        } catch (NetworkException e) {
+               MsoLogger.setServiceName (serviceName);
+            LOGGER.debug ("Got a NetworkException on createNetwork: ", e);
+            MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
+            } catch (Exception e1) {
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception - fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.deleteNetworkNotification (messageId, false, exCat, eMsg, 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);
+            }
+            return;
+        }
+        LOGGER.debug ("Async Delete NetworkId: " + networkId + " tenantId:" + tenantId);
+        // Build and send Asynchronous response
+        try {
+            NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            notifyPort.deleteNetworkNotification (messageId, true, null, null, networkDeleted.value);
+        } catch (Exception e) {
+            error = "Error sending deleteNetwork notification " + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception sending deleteNetwork notification", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+        }
+        return;
+    }
+
+    /**
+     * This web service endpoint will rollback a previous Create VNF operation.
+     * A rollback object is returned to the client in a successful creation
+     * response. The client can pass that object as-is back to the rollbackNetwork
+     * operation to undo the creation.
+     *
+     * The rollback includes removing the VNF and deleting the tenant if the
+     * tenant did not exist prior to the VNF creation.
+     */
+    @Override
+    public void rollbackNetworkA (NetworkRollback rollback, String messageId, String notificationUrl) {
+        String error;
+        String serviceName = "RollbackNetworkA";
+        MsoLogger.setServiceName (serviceName);
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        // rollback may be null (e.g. if network already existed when Create was called)
+        if (rollback == null) {
+            LOGGER.warn (MessageEnum.RA_ROLLBACK_NULL, "", "", MsoLogger.ErrorCode.SchemaError, "Rollback is null");
+            return;
+        }
+
+        MsoLogger.setLogContext (rollback.getMsoRequest ());
+        LOGGER.info (MessageEnum.RA_ASYNC_ROLLBACK, rollback.getNetworkStackId (), "", "");
+        // Use the synchronous method to perform the actual Create
+        MsoNetworkAdapter networkAdapter = new MsoNetworkAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        try {
+            networkAdapter.rollbackNetwork (rollback);
+            MsoLogger.setServiceName (serviceName);
+        } catch (NetworkException e) {
+               MsoLogger.setServiceName (serviceName);
+            LOGGER.debug ("Got a NetworkException on rollbackNetwork: ", e);
+            // Build and send Asynchronous error response
+            MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
+            } catch (Exception e1) {
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception in get fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.rollbackNetworkNotification (rollback.getMsoRequest ().getRequestId (), false, exCat, eMsg);
+            } catch (Exception e1) {
+                error = "Error sending createNetwork notification " + e1.getMessage ();
+                LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception in sending createNetwork notification ", e1);
+                alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+            }
+            return;
+        }
+        LOGGER.debug ("Async Rollback NetworkId: " + rollback.getNetworkStackId () + " tenantId:" + rollback.getTenantId ());
+        // Build and send Asynchronous response
+        try {
+            NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            notifyPort.rollbackNetworkNotification (rollback.getMsoRequest ().getRequestId (), true, null, null);
+        } catch (Exception e) {
+            error = "Error sending rollbackNetwork notification " + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception in sending rollbackNetwork notification", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+        }
+        return;
+    }
+
+    private org.openecomp.mso.adapters.network.async.client.NetworkRollback copyNrb (Holder <NetworkRollback> hNrb) {
+        org.openecomp.mso.adapters.network.async.client.NetworkRollback cnrb = new org.openecomp.mso.adapters.network.async.client.NetworkRollback ();
+
+        if (hNrb != null && hNrb.value != null) {
+            org.openecomp.mso.adapters.network.async.client.MsoRequest cmr = new org.openecomp.mso.adapters.network.async.client.MsoRequest ();
+
+            cnrb.setCloudId (hNrb.value.getCloudId ());
+            cmr.setRequestId (hNrb.value.getMsoRequest ().getRequestId ());
+            cmr.setServiceInstanceId (hNrb.value.getMsoRequest ().getServiceInstanceId ());
+            cnrb.setMsoRequest (cmr);
+            cnrb.setNetworkId (hNrb.value.getNetworkId ());
+            cnrb.setNetworkStackId (hNrb.value.getNetworkStackId ());
+            cnrb.setNeutronNetworkId (hNrb.value.getNeutronNetworkId ());
+            cnrb.setTenantId (hNrb.value.getTenantId ());
+            cnrb.setNetworkType (hNrb.value.getNetworkType ());
+            cnrb.setNetworkCreated (hNrb.value.getNetworkCreated ());
+            cnrb.setNetworkName (hNrb.value.getNetworkName ());
+            cnrb.setPhysicalNetwork (hNrb.value.getPhysicalNetwork ());
+            List <Integer> vlansc = cnrb.getVlans ();
+            List <Integer> vlansh = hNrb.value.getVlans ();
+            if (vlansh != null) {
+                vlansc.addAll (vlansh);
+            }
+        }
+        return cnrb;
+    }
+
+    private NetworkAdapterNotify getNotifyEP (String notificationUrl) {
+
+        URL warWsdlLoc = null;
+        try {
+            warWsdlLoc = Thread.currentThread ().getContextClassLoader ().getResource ("NetworkAdapterNotify.wsdl");
+        } catch (Exception e) {
+            LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "NetworkAdpaterNotify.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e);
+        }
+        if (warWsdlLoc == null) {
+            LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "NetworkAdpaterNotify.wsdl", "", "", MsoLogger.ErrorCode.DataError, "WSDL not found");
+        } else {
+            try {
+                LOGGER.debug ("NetworkAdpaterNotify.wsdl location:" + warWsdlLoc.toURI ().toString ());
+            } catch (Exception e) {
+                LOGGER.error (MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "NetworkAdpaterNotify.wsdl", "", "", MsoLogger.ErrorCode.SchemaError, "Exception - WSDL URL convention", e);
+            }
+        }
+
+        NetworkAdapterNotify_Service notifySvc = new NetworkAdapterNotify_Service (warWsdlLoc,
+                                                                                   new QName ("http://com.att.mso/networkNotify",
+                                                                                              "networkAdapterNotify"));
+
+        NetworkAdapterNotify notifyPort = notifySvc.getMsoNetworkAdapterAsyncImplPort ();
+
+        BindingProvider bp = (BindingProvider) notifyPort;
+
+        URL epUrl = null;
+        try {
+            epUrl = new URL (notificationUrl);
+        } catch (MalformedURLException e1) {
+            LOGGER.error (MessageEnum.RA_INIT_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception - init notification", e1);
+        }
+
+        LOGGER.debug ("Notification Endpoint URL: " + epUrl.toExternalForm ());
+
+        bp.getRequestContext ().put (BindingProvider.ENDPOINT_ADDRESS_PROPERTY, epUrl.toExternalForm ());
+
+        // authentication
+        try {
+            Map <String, Object> reqCtx = bp.getRequestContext ();
+            Map <String, List <String>> headers = new HashMap <String, List <String>> ();
+
+            String userCredentials = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_NETWORK_ADAPTER).getEncryptedProperty (BPEL_AUTH_PROP,
+                                                                                             "",
+                                                                                          ENCRYPTION_KEY);
+
+            String basicAuth = "Basic " + DatatypeConverter.printBase64Binary (userCredentials.getBytes ());
+            reqCtx.put (MessageContext.HTTP_REQUEST_HEADERS, headers);
+            headers.put ("Authorization", Collections.singletonList (basicAuth));
+        } catch (Exception e) {
+            String error1 = "Unable to set authorization in callback request" + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_SET_CALLBACK_AUTH_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception - Unable to set authorization in callback request", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error1);
+        }
+
+        return notifyPort;
+    }
+
+    private CreateNetworkNotification.SubnetIdMap copyCreateSubnetIdMap (Holder <Map <String, String>> hMap) {
+
+        CreateNetworkNotification.SubnetIdMap subnetIdMap = new CreateNetworkNotification.SubnetIdMap ();
+
+        if (hMap != null && hMap.value != null) {
+            Map <String, String> sMap = new HashMap <String, String> ();
+            sMap = hMap.value;
+            CreateNetworkNotification.SubnetIdMap.Entry entry = new CreateNetworkNotification.SubnetIdMap.Entry ();
+
+            for (String key : sMap.keySet ()) {
+                entry.setKey (key);
+                entry.setValue (sMap.get (key));
+                subnetIdMap.getEntry ().add (entry);
+            }
+        }
+        return subnetIdMap;
+    }
+
+    private UpdateNetworkNotification.SubnetIdMap copyUpdateSubnetIdMap (Holder <Map <String, String>> hMap) {
+
+        UpdateNetworkNotification.SubnetIdMap subnetIdMap = new UpdateNetworkNotification.SubnetIdMap ();
+
+        if (hMap != null && hMap.value != null) {
+            Map <String, String> sMap = new HashMap <String, String> ();
+            sMap = hMap.value;
+            UpdateNetworkNotification.SubnetIdMap.Entry entry = new UpdateNetworkNotification.SubnetIdMap.Entry ();
+
+            for (String key : sMap.keySet ()) {
+                entry.setKey (key);
+                entry.setValue (sMap.get (key));
+                subnetIdMap.getEntry ().add (entry);
+            }
+        }
+        return subnetIdMap;
+    }
+
+    private QueryNetworkNotification.SubnetIdMap copyQuerySubnetIdMap (Holder <Map <String, String>> hMap) {
+
+        QueryNetworkNotification.SubnetIdMap subnetIdMap = new QueryNetworkNotification.SubnetIdMap ();
+
+        if (hMap != null && hMap.value != null) {
+            Map <String, String> sMap = new HashMap <String, String> ();
+            sMap = hMap.value;
+            QueryNetworkNotification.SubnetIdMap.Entry entry = new QueryNetworkNotification.SubnetIdMap.Entry ();
+
+            for (String key : sMap.keySet ()) {
+                entry.setKey (key);
+                entry.setValue (sMap.get (key));
+                subnetIdMap.getEntry ().add (entry);
+            }
+        }
+        return subnetIdMap;
+    }
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterImpl.java
new file mode 100644 (file)
index 0000000..97624da
--- /dev/null
@@ -0,0 +1,2052 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import org.openecomp.mso.adapters.network.exceptions.NetworkException;
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudSite;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.NetworkResource;
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.HeatStatus;
+import org.openecomp.mso.openstack.beans.NetworkInfo;
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+import org.openecomp.mso.openstack.beans.NetworkStatus;
+import org.openecomp.mso.openstack.beans.Pool;
+import org.openecomp.mso.openstack.beans.StackInfo;
+import org.openecomp.mso.openstack.beans.Subnet;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.openecomp.mso.openstack.utils.MsoCommonUtils;
+import org.openecomp.mso.openstack.utils.MsoHeatUtils;
+import org.openecomp.mso.openstack.utils.MsoHeatUtilsWithUpdate;
+import org.openecomp.mso.openstack.utils.MsoNeutronUtils;
+import org.openecomp.mso.openstack.utils.MsoNeutronUtils.NetworkType;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+import static org.openecomp.mso.openstack.utils.MsoCommonUtils.isNullOrEmpty;
+
+@WebService(serviceName = "NetworkAdapter", endpointInterface = "org.openecomp.mso.adapters.network.MsoNetworkAdapter", targetNamespace = "http://com.att.mso/network")
+public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
+
+       MsoPropertiesFactory msoPropertiesFactory=new MsoPropertiesFactory();
+
+       CloudConfigFactory cloudConfigFactory=new CloudConfigFactory();
+
+       private static final String AIC3_NW_PROPERTY= "org.openecomp.mso.adapters.network.aic3nw";
+       private static final String AIC3_NW="OS::ContrailV2::VirtualNetwork";
+       public static final String MSO_PROP_NETWORK_ADAPTER="MSO_PROP_NETWORK_ADAPTER";
+    private static final String VLANS = "vlans";
+    private static final String PHYSICAL_NETWORK = "physical_network";
+    private static final String UPDATE_NETWORK_CONTEXT = "UpdateNetwork";
+    private static final String NETWORK_ID = "network_id";
+    private static final String NETWORK_FQDN = "network_fqdn";
+    private static final String CREATE_NETWORK_CONTEXT = "CreateNetwork";
+    private static final String MSO_CONFIGURATION_ERROR = "MsoConfigurationError";
+    private static final String NEUTRON_MODE = "NEUTRON";
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+    protected CloudConfig cloudConfig;
+
+    /**
+     * Health Check web method. Does nothing but return to show the adapter is deployed.
+     */
+    @Override
+    public void healthCheck () {
+        LOGGER.debug ("Health check call in Network Adapter");
+    }
+
+    /**
+     * Do not use this constructor or the msoPropertiesFactory will be NULL.
+     *
+        * @see MsoNetworkAdapterImpl#MsoNetworkAdapterImpl(MsoPropertiesFactory)
+     */
+    public MsoNetworkAdapterImpl() {
+    }
+
+    /**
+     * This constructor MUST be used if this class if called with the new operator.
+     * @param msoPropFactory
+
+     */
+    public MsoNetworkAdapterImpl(MsoPropertiesFactory msoPropFactory,CloudConfigFactory cloudConfigFact) {
+       this.msoPropertiesFactory = msoPropFactory;
+       this.cloudConfigFactory=cloudConfigFact;
+       cloudConfig = cloudConfigFactory.getCloudConfig ();
+    }
+
+    @Override
+    public void createNetwork (String cloudSiteId,
+                               String tenantId,
+                               String networkType,
+                               String networkName,
+                               String physicalNetworkName,
+                               List <Integer> vlans,
+                               Boolean failIfExists,
+                               Boolean backout,
+                               List <Subnet> subnets,
+                               MsoRequest msoRequest,
+                               Holder <String> networkId,
+                               Holder <String> neutronNetworkId,
+                               Holder <Map <String, String>> subnetIdMap,
+                               Holder <NetworkRollback> rollback) throws NetworkException {
+       Holder <String> networkFqdn = new Holder <String> ();
+        createNetwork (cloudSiteId,
+                       tenantId,
+                       networkType,
+                       networkName,
+                       physicalNetworkName,
+                       vlans,
+                       null,
+                       null,
+                       null,
+                       failIfExists,
+                       backout,
+                       subnets,
+                       null,
+                       null,
+                       msoRequest,
+                       networkId,
+                       neutronNetworkId,
+                       networkFqdn,
+                       subnetIdMap,
+                       rollback);
+    }
+
+    @Override
+    public void createNetworkContrail (String cloudSiteId,
+                                       String tenantId,
+                                       String networkType,
+                                       String networkName,
+                                       List <String> routeTargets,
+                                       String shared,
+                                       String external,
+                                       Boolean failIfExists,
+                                       Boolean backout,
+                                       List <Subnet> subnets,
+                                       List <String> policyFqdns,
+                                       List<String> routeTableFqdns,
+                                       MsoRequest msoRequest,
+                                       Holder <String> networkId,
+                                       Holder <String> neutronNetworkId,
+                                       Holder <String> networkFqdn,
+                                       Holder <Map <String, String>> subnetIdMap,
+                                       Holder <NetworkRollback> rollback) throws NetworkException {
+        createNetwork (cloudSiteId,
+                       tenantId,
+                       networkType,
+                       networkName,
+                       null,
+                       null,
+                       routeTargets,
+                       shared,
+                       external,
+                       failIfExists,
+                       backout,
+                       subnets,
+                       policyFqdns,
+                       routeTableFqdns,
+                       msoRequest,
+                       networkId,
+                       neutronNetworkId,
+                       networkFqdn,
+                       subnetIdMap,
+                       rollback);
+    }
+
+    /**
+     * This is the "Create Network" web service implementation.
+     * It will create a new Network of the requested type in the specified cloud
+     * and tenant. The tenant must exist at the time this service is called.
+     *
+     * If a network with the same name already exists, this can be considered a
+     * success or failure, depending on the value of the 'failIfExists' parameter.
+     *
+     * There will be a pre-defined set of network types defined in the MSO Catalog.
+     * All such networks will have a similar configuration, based on the allowable
+     * Openstack networking definitions. This includes basic networks, provider
+     * networks (with a single VLAN), and multi-provider networks (one or more VLANs)
+     *
+     * Initially, all provider networks must be "vlan" type, and multiple segments in
+     * a multi-provider network must be multiple VLANs on the same physical network.
+     *
+     * This service supports two modes of Network creation/update:
+     * - via Heat Templates
+     * - via Neutron API
+     * The network orchestration mode for each network type is declared in its
+     * catalog definition. All Heat-based templates must support some subset of
+     * the same input parameters: network_name, physical_network, vlan(s).
+     *
+     * The method returns the network ID and a NetworkRollback object. This latter
+     * object can be passed as-is to the rollbackNetwork operation to undo everything
+     * that was created. This is useful if a network is successfully created but
+     * the orchestration fails on a subsequent operation.
+     */
+
+    private void createNetwork (String cloudSiteId,
+                               String tenantId,
+                               String networkType,
+                               String networkName,
+                               String physicalNetworkName,
+                               List <Integer> vlans,
+                               List <String> routeTargets,
+                               String shared,
+                               String external,
+                               Boolean failIfExists,
+                               Boolean backout,
+                               List <Subnet> subnets,
+                               List <String> policyFqdns,
+                               List <String> routeTableFqdns,
+                               MsoRequest msoRequest,
+                               Holder <String> networkId,
+                               Holder <String> neutronNetworkId,
+                               Holder <String> networkFqdn,
+                               Holder <Map <String, String>> subnetIdMap,
+                               Holder <NetworkRollback> rollback) throws NetworkException {
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName ("CreateNetwork");
+
+        LOGGER.debug ("*** CREATE Network: " + networkName
+                      + " of type "
+                      + networkType
+                      + " in "
+                      + cloudSiteId
+                      + "/"
+                      + tenantId);
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        // Build a default rollback object (no actions performed)
+        NetworkRollback networkRollback = new NetworkRollback ();
+        networkRollback.setCloudId (cloudSiteId);
+        networkRollback.setTenantId (tenantId);
+        networkRollback.setMsoRequest (msoRequest);
+
+        // tenant query is not required here.
+        // If the tenant doesn’t exist, the Heat calls will fail anyway (when the HeatUtils try to obtain a token).
+        // So this is just catching that error in a bit more obvious way up front.
+
+        cloudConfig = cloudConfigFactory.getCloudConfig ();
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null)
+        {
+               String error = "Configuration Error. Stack " + networkName + " in "
+                               + cloudSiteId
+                               + "/"
+                               + tenantId
+                               + ": "
+                               + " CloudSite does not exist in MSO Configuration";
+               LOGGER.error (MessageEnum.RA_CONFIG_EXC, error, "", "", MsoLogger.ErrorCode.DataError, "Configuration Error");
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, error);
+               // Set the detailed error as the Exception 'message'
+               throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+        }
+
+        try (CatalogDatabase db = getCatalogDb()) {
+            NetworkResource networkResource = networkCheck (db,
+                                                            startTime,
+                                                            networkType,
+                                                            networkName,
+                                                            physicalNetworkName,
+                                                            vlans,
+                                                            routeTargets,
+                                                            cloudSite);
+            String mode = networkResource.getOrchestrationMode ();
+            NetworkType neutronNetworkType = NetworkType.valueOf (networkResource.getNeutronNetworkType ());
+
+            if (NEUTRON_MODE.equals (mode)) {
+
+                // Use an MsoNeutronUtils for all neutron commands
+                MsoNeutronUtils neutron = new MsoNeutronUtils (MSO_PROP_NETWORK_ADAPTER, cloudConfigFactory);
+
+                // See if the Network already exists (by name)
+                NetworkInfo netInfo = null;
+                long queryNetworkStarttime = System.currentTimeMillis ();
+                try {
+                    netInfo = neutron.queryNetwork (networkName, tenantId, cloudSiteId);
+                    LOGGER.recordMetricEvent (queryNetworkStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Response successfully received from OpenStack", "OpenStack", "QueryNetwork", null);
+                } catch (MsoException me) {
+                    LOGGER.recordMetricEvent (queryNetworkStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while querying network from OpenStack", "OpenStack", "QueryNetwork", null);
+                    String error = "Create Network (neutron): query network " + networkName
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.error (MessageEnum.RA_QUERY_NETWORK_EXC, networkName, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception while querying network from OpenStack", me);
+                    me.addContext (CREATE_NETWORK_CONTEXT);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while querying network from OpenStack");
+                    throw new NetworkException (me);
+                }
+
+                if (netInfo != null) {
+                    // Exists. If that's OK, return success with the network ID.
+                    // Otherwise, return an exception.
+                    if (failIfExists != null && failIfExists) {
+                        String error = "Create Nework: Network " + networkName
+                                       + " already exists in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + " with ID " + netInfo.getId();
+                        LOGGER.error (MessageEnum.RA_NETWORK_ALREADY_EXIST, networkName, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Network already exists");
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error);
+                        throw new NetworkException(error, MsoExceptionCategory.USERDATA);
+                    } else {
+                        // Populate the outputs from the existing network.
+                        networkId.value = netInfo.getId ();
+                        neutronNetworkId.value = netInfo.getId ();
+                        rollback.value = networkRollback; // Default rollback - no updates performed
+                        String msg = "Found Existing network, status=" + netInfo.getStatus () + " for Neutron mode";
+                        LOGGER.warn (MessageEnum.RA_NETWORK_ALREADY_EXIST, networkName, cloudSiteId, tenantId, "", "", MsoLogger.ErrorCode.DataError, "Found Existing network, status=" + netInfo.getStatus ());
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, msg);
+                    }
+                    return;
+                }
+
+                long createNetworkStarttime = System.currentTimeMillis ();
+                try {
+                    netInfo = neutron.createNetwork (cloudSiteId,
+                                                     tenantId,
+                                                     neutronNetworkType,
+                                                     networkName,
+                                                     physicalNetworkName,
+                                                     vlans);
+                    LOGGER.recordMetricEvent (createNetworkStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Response successfully received from OpenStack", "OpenStack", "CreateNetwork", null);
+                } catch (MsoException me) {
+                       me.addContext (CREATE_NETWORK_CONTEXT);
+                    LOGGER.recordMetricEvent (createNetworkStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with OpenStack", "OpenStack", "CreateNetwork", null);
+                       String error = "Create Network: type " + neutronNetworkType
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.error (MessageEnum.RA_CREATE_NETWORK_EXC, networkName, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception while communicate with OpenStack", me);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+
+                    throw new NetworkException (me);
+                }
+
+                // Note: ignoring MsoNetworkAlreadyExists because we already checked.
+
+                // If reach this point, network creation is successful.
+                // Since directly created via Neutron, networkId tracked by MSO is the same
+                // as the neutron network ID.
+                networkId.value = netInfo.getId ();
+                neutronNetworkId.value = netInfo.getId ();
+
+                networkRollback.setNetworkCreated (true);
+                networkRollback.setNetworkId (netInfo.getId ());
+                networkRollback.setNeutronNetworkId (netInfo.getId ());
+                networkRollback.setNetworkType (networkType);
+
+                LOGGER.debug ("Network " + networkName + " created, id = " + netInfo.getId ());
+            } else if ("HEAT".equals (mode)) {
+
+                // Use an MsoHeatUtils for all Heat commands
+                MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_NETWORK_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+                
+                HeatTemplate heatTemplate = db.getHeatTemplate (networkResource.getTemplateId ());
+                if (heatTemplate == null) {
+                    String error = "Network error - undefined Heat Template. Network Type = " + networkType;
+                    LOGGER.error (MessageEnum.RA_PARAM_NOT_FOUND, "Heat Template", "Network Type", networkType, "Openstack", "", MsoLogger.ErrorCode.DataError, "Network error - undefined Heat Template. Network Type = " + networkType);
+                    alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error); // Alarm on this
+                                                                                                     // error,
+                                                                                                     // configuration
+                                                                                                     // must be fixed
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                    throw new NetworkException (error, MsoExceptionCategory.INTERNAL);
+                }
+
+                LOGGER.debug ("Got HEAT Template from DB: " + heatTemplate.toString ());
+                
+                // "Fix" the template if it has CR/LF (getting this from Oracle)
+                String template = heatTemplate.getHeatTemplate ();
+                template = template.replaceAll ("\r\n", "\n");
+                
+                boolean aic3template=false;
+                String aic3nw = AIC3_NW;
+                try {
+                       aic3nw = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_NETWORK_ADAPTER).getProperty(AIC3_NW_PROPERTY, AIC3_NW);
+                       } catch (MsoPropertiesException e) {
+                               String error = "Unable to get properties:" + MSO_PROP_NETWORK_ADAPTER;
+                               LOGGER.error (MessageEnum.RA_CONFIG_EXC, error, "", "", MsoLogger.ErrorCode.DataError, "Exception - Unable to get properties", e);
+                       }
+               
+                if (template.contains(aic3nw))
+                       aic3template = true;
+                
+                // First, look up to see if the Network already exists (by name).
+                // For HEAT orchestration of networks, the stack name will always match the network name
+                StackInfo heatStack = null;
+                long queryNetworkStarttime = System.currentTimeMillis ();
+                try {
+                    heatStack = heat.queryStack (cloudSiteId, tenantId, networkName);
+                    LOGGER.recordMetricEvent (queryNetworkStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Response successfully received from OpenStack", "OpenStack", "QueryNetwork", null);
+                } catch (MsoException me) {
+                    me.addContext (CREATE_NETWORK_CONTEXT);
+                    LOGGER.recordMetricEvent (queryNetworkStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while querying stack from OpenStack", "OpenStack", "QueryNetwork", null);
+                       String error = "Create Network (heat): query network " + networkName
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.error (MessageEnum.RA_QUERY_NETWORK_EXC, networkName, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception while querying stack from OpenStack", me);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                    throw new NetworkException (me);
+                }
+
+                if (heatStack != null && !(heatStack.getStatus () == HeatStatus.NOTFOUND)) {
+                    // Stack exists. Return success or error depending on input directive
+                    if (failIfExists != null && failIfExists) {
+                        String error = "CreateNetwork: Stack " + networkName
+                                       + " already exists in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + " as " + heatStack.getCanonicalName();
+                        LOGGER.error (MessageEnum.RA_NETWORK_ALREADY_EXIST, networkName, cloudSiteId, tenantId, "", "", MsoLogger.ErrorCode.DataError, "Network already exists");
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error);
+                        throw new NetworkException(error, MsoExceptionCategory.USERDATA);
+                    } else {
+                        // Populate the outputs from the existing stack.
+                        networkId.value = heatStack.getCanonicalName ();
+                        neutronNetworkId.value = (String) heatStack.getOutputs ().get (NETWORK_ID);
+                        rollback.value = networkRollback; // Default rollback - no updates performed
+                        if (aic3template)
+                        {
+                               networkFqdn.value = (String) heatStack.getOutputs().get(NETWORK_FQDN);
+                        }
+                        Map <String, Object> outputs = heatStack.getOutputs ();
+                        Map <String, String> sMap = new HashMap <String, String> ();
+                        if (outputs != null) {
+                               for (String key : outputs.keySet ()) {
+                                       if (key != null && key.startsWith ("subnet")) {
+                                               if (aic3template) //one subnet_id output 
+                                               {
+                                                        Map <String, String> map = getSubnetUUId(key, outputs, subnets); 
+                                                        sMap.putAll(map);
+                                               }
+                                               else //multiples subnet_%aaid% outputs
+                                               {
+                                                       String subnetUUId = (String) outputs.get(key); 
+                                                       sMap.put (key.substring("subnet_id_".length()), subnetUUId);
+                                               }
+                                       }
+                               }
+                        }
+                        subnetIdMap.value = sMap;
+                        String msg = "Found Existing network stack, status=" + heatStack.getStatus () + " for Heat mode";
+                        LOGGER.warn (MessageEnum.RA_NETWORK_ALREADY_EXIST, networkName, cloudSiteId, tenantId, "", "", MsoLogger.ErrorCode.DataError, "Found Existing network stack, status=" + heatStack.getStatus ());
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Suc, "Found Existing network stack");
+                    }
+                    return;
+                }
+
+                // Ready to deploy the new Network
+                // Build the common set of HEAT template parameters
+                Map <String, Object> stackParams = populateNetworkParams (neutronNetworkType,
+                                                                          networkName,
+                                                                          physicalNetworkName,
+                                                                          vlans,
+                                                                          routeTargets,
+                                                                          shared, 
+                                                                          external,
+                                                                          aic3template);
+
+                // Validate (and update) the input parameters against the DB definition
+                // Shouldn't happen unless DB config is wrong, since all networks use same inputs
+                // and inputs were already validated.
+                try {
+                    stackParams = heat.validateStackParams (stackParams, heatTemplate);
+                } catch (IllegalArgumentException e) {
+                    String error = "Create Network: Configuration Error: " + e.getMessage ();
+                    LOGGER.error (MessageEnum.RA_CONFIG_EXC, e.getMessage(), "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception - Create Network, Configuration Error", e);
+                    alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error); // Alarm on this
+                                                                                                     // error,
+                                                                                                     // configuration
+                                                                                                     // must be fixed
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, error);
+                    // Input parameters were not valid
+                    throw new NetworkException (error, MsoExceptionCategory.INTERNAL);
+                }
+
+                if (subnets != null) {
+                       try {
+                               if (aic3template)
+                               {
+                                       template = mergeSubnetsAIC3 (template, subnets, stackParams);
+                               }
+                               else
+                               {
+                                       template = mergeSubnets (template, subnets);
+                               }
+                       } catch (MsoException me) {
+                               me.addContext (CREATE_NETWORK_CONTEXT);
+                               String error = "Create Network (heat): type " + neutronNetworkType
+                                               + " in "
+                                               + cloudSiteId
+                                               + "/"
+                                               + tenantId
+                                               + ": "
+                                               + me;
+                               LOGGER.error (MessageEnum.RA_CREATE_NETWORK_EXC, neutronNetworkType.toString(), cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception Create Network, merging subnets", me);
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, error);
+                               throw new NetworkException (me);
+                       }
+                }
+
+                if (policyFqdns != null && !policyFqdns.isEmpty() && aic3template) {
+                    try {
+                        mergePolicyRefs (policyFqdns, stackParams);
+                    } catch (MsoException me) {
+                        me.addContext (CREATE_NETWORK_CONTEXT);
+                       String error = "Create Network (heat) mergePolicyRefs type " + neutronNetworkType
+                                       + " in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + ": "
+                                       + me;
+                        LOGGER.error (MessageEnum.RA_CREATE_NETWORK_EXC, neutronNetworkType.toString(), cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception Create Network, merging policyRefs", me);
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, error);
+                        throw new NetworkException (me);
+                    }
+                }
+                
+                if (routeTableFqdns != null && !routeTableFqdns.isEmpty() && aic3template) {
+                    try {
+                        mergeRouteTableRefs (routeTableFqdns, stackParams);
+                    } catch (MsoException me) {
+                        me.addContext (CREATE_NETWORK_CONTEXT);
+                       String error = "Create Network (heat) mergeRouteTableRefs type " + neutronNetworkType
+                                       + " in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + ": "
+                                       + me;
+                        LOGGER.error (MessageEnum.RA_CREATE_NETWORK_EXC, neutronNetworkType.toString(), cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception Create Network, merging routeTableRefs", me);
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, error);
+                        throw new NetworkException (me);
+                    }
+                }
+
+                // Deploy the network stack
+                // Ignore MsoStackAlreadyExists exception because we already checked.
+                long createStackStartTime = System.currentTimeMillis ();
+                try {
+                       if (backout == null)
+                               backout = true;
+                    heatStack = heat.createStack (cloudSiteId,
+                                                  tenantId,
+                                                  networkName,
+                                                  template,
+                                                  stackParams,
+                                                  true,
+                                                  heatTemplate.getTimeoutMinutes (),
+                                                  null,
+                                                  null,
+                                                  null,
+                                                  backout.booleanValue());
+                } catch (MsoException me) {
+                    me.addContext (CREATE_NETWORK_CONTEXT);
+                       String error = "Create Network (heat): type " + neutronNetworkType
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.error (MessageEnum.RA_CREATE_NETWORK_EXC, networkName, cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception creating network", me);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                    throw new NetworkException (me);
+                }
+
+                // Reach this point if createStack is successful.
+
+                // For Heat-based orchestration, the MSO-tracked network ID is the heat stack,
+                // and the neutronNetworkId is the network UUID returned in stack outputs.
+                networkId.value = heatStack.getCanonicalName ();
+                neutronNetworkId.value = (String) heatStack.getOutputs ().get (NETWORK_ID);
+                if (aic3template)
+                {
+                       networkFqdn.value = (String) heatStack.getOutputs().get(NETWORK_FQDN);
+                }
+                Map <String, Object> outputs = heatStack.getOutputs ();
+                Map <String, String> sMap = new HashMap <String, String> ();
+                if (outputs != null) {
+                    for (String key : outputs.keySet ()) {
+                        if (key != null && key.startsWith ("subnet")) {
+                               if (aic3template) //one subnet output expected
+                                       {
+                                                Map <String, String> map = getSubnetUUId(key, outputs, subnets); 
+                                                sMap.putAll(map);
+                                       }
+                                       else //multiples subnet_%aaid% outputs allowed
+                                       {
+                                               String subnetUUId = (String) outputs.get(key); 
+                                               sMap.put (key.substring("subnet_id_".length()), subnetUUId);
+                                       }
+                        }
+                    }
+                }
+                subnetIdMap.value = sMap;
+
+                rollback.value = networkRollback;
+                // Populate remaining rollback info and response parameters.
+                networkRollback.setNetworkStackId (heatStack.getCanonicalName ());
+                networkRollback.setNeutronNetworkId ((String) heatStack.getOutputs ().get (NETWORK_ID));
+                networkRollback.setNetworkCreated (true);
+                networkRollback.setNetworkType (networkType);
+
+                LOGGER.debug ("Network " + networkName + " successfully created via HEAT");
+            }
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Suc, "Successfully created network");
+        return;
+    }
+
+    @Override
+    public void updateNetwork (String cloudSiteId,
+                               String tenantId,
+                               String networkType,
+                               String networkId,
+                               String networkName,
+                               String physicalNetworkName,
+                               List <Integer> vlans,
+                               List <Subnet> subnets,
+                               MsoRequest msoRequest,
+                               Holder <Map <String, String>> subnetIdMap,
+                               Holder <NetworkRollback> rollback) throws NetworkException {
+        updateNetwork (cloudSiteId,
+                       tenantId,
+                       networkType,
+                       networkId,
+                       networkName,
+                       physicalNetworkName,
+                       vlans,
+                       null,
+                       null,
+                       null,
+                       subnets,
+                       null,
+                       null,
+                       msoRequest,
+                       subnetIdMap,
+                       rollback);
+
+    }
+
+    @Override
+    public void updateNetworkContrail (String cloudSiteId,
+                                       String tenantId,
+                                       String networkType,
+                                       String networkId,
+                                       String networkName,
+                                       List <String> routeTargets,
+                                       String shared,
+                                       String external,
+                                       List <Subnet> subnets,
+                                       List <String> policyFqdns,
+                                       List<String> routeTableFqdns,
+                                       MsoRequest msoRequest,
+                                       Holder <Map <String, String>> subnetIdMap,
+                                       Holder <NetworkRollback> rollback) throws NetworkException {
+        updateNetwork (cloudSiteId,
+                       tenantId,
+                       networkType,
+                       networkId,
+                       networkName,
+                       null,
+                       null,
+                       routeTargets,
+                       shared,
+                       external,
+                       subnets,
+                       policyFqdns,
+                       routeTableFqdns,
+                       msoRequest,
+                       subnetIdMap,
+                       rollback);
+    }
+
+    /**
+     * This is the "Update Network" web service implementation.
+     * It will update an existing Network of the requested type in the specified cloud
+     * and tenant. The typical use will be to replace the VLANs with the supplied
+     * list (to add or remove a VLAN), but other properties may be updated as well.
+     *
+     * There will be a pre-defined set of network types defined in the MSO Catalog.
+     * All such networks will have a similar configuration, based on the allowable
+     * Openstack networking definitions. This includes basic networks, provider
+     * networks (with a single VLAN), and multi-provider networks (one or more VLANs).
+     *
+     * Initially, all provider networks must currently be "vlan" type, and multi-provider
+     * networks must be multiple VLANs on the same physical network.
+     *
+     * This service supports two modes of Network update:
+     * - via Heat Templates
+     * - via Neutron API
+     * The network orchestration mode for each network type is declared in its
+     * catalog definition. All Heat-based templates must support some subset of
+     * the same input parameters: network_name, physical_network, vlan, segments.
+     *
+     * The method returns a NetworkRollback object. This object can be passed
+     * as-is to the rollbackNetwork operation to undo everything that was updated.
+     * This is useful if a network is successfully updated but orchestration
+     * fails on a subsequent operation.
+     */
+    private void updateNetwork (String cloudSiteId,
+                               String tenantId,
+                               String networkType,
+                               String networkId,
+                               String networkName,
+                               String physicalNetworkName,
+                               List <Integer> vlans,
+                               List <String> routeTargets,
+                               String shared,
+                               String external,
+                               List <Subnet> subnets,
+                               List <String> policyFqdns,
+                               List<String> routeTableFqdns,
+                               MsoRequest msoRequest,
+                               Holder <Map <String, String>> subnetIdMap,
+                               Holder <NetworkRollback> rollback) throws NetworkException {
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName ("UpdateNetwork");
+        LOGGER.debug ("***UPDATE Network adapter with Network: " + networkName
+                + " of type "
+                + networkType
+                + " in "
+                + cloudSiteId
+                + "/"
+                + tenantId);
+
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        // Build a default rollback object (no actions performed)
+        NetworkRollback networkRollback = new NetworkRollback ();
+        networkRollback.setCloudId (cloudSiteId);
+        networkRollback.setTenantId (tenantId);
+        networkRollback.setMsoRequest (msoRequest);
+
+        cloudConfig = cloudConfigFactory.getCloudConfig ();
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null) {
+                  String error = "UpdateNetwork: Configuration Error. Stack " + networkName + " in "
+                       + cloudSiteId
+                       + "/"
+                       + tenantId
+                       + ": "
+                       + " CloudSite does not exist in MSO Configuration";
+                  LOGGER.error (MessageEnum.RA_CONFIG_EXC, error, "Openstack", "", MsoLogger.ErrorCode.DataError, "CloudSite does not exist in MSO Configuration");
+               LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, error);
+                  // Set the detailed error as the Exception 'message'
+                  throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+        }
+
+        try(CatalogDatabase db = getCatalogDb()) {
+            NetworkResource networkResource = networkCheck (db,
+                                                            startTime,
+                                                            networkType,
+                                                            networkName,
+                                                            physicalNetworkName,
+                                                            vlans,
+                                                            routeTargets,
+                                                            cloudSite);
+            String mode = networkResource.getOrchestrationMode ();
+            NetworkType neutronNetworkType = NetworkType.valueOf (networkResource.getNeutronNetworkType ());
+
+            // Use an MsoNeutronUtils for all Neutron commands
+            MsoNeutronUtils neutron = new MsoNeutronUtils (MSO_PROP_NETWORK_ADAPTER, cloudConfigFactory);
+
+            if (NEUTRON_MODE.equals (mode)) {
+
+                // Verify that the Network exists
+                // For Neutron-based orchestration, the networkId is the Neutron Network UUID.
+                NetworkInfo netInfo = null;
+                long queryNetworkStarttime = System.currentTimeMillis ();
+                try {
+                    netInfo = neutron.queryNetwork (networkId, tenantId, cloudSiteId);
+                    LOGGER.recordMetricEvent (queryNetworkStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryNetwork", null);
+                } catch (MsoException me) {
+                    me.addContext (UPDATE_NETWORK_CONTEXT);
+                       String error = "Update Network (neutron): query " + networkId
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.recordMetricEvent (queryNetworkStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryNetwork", null);
+                    LOGGER.error (MessageEnum.RA_QUERY_NETWORK_EXC, networkId, cloudSiteId, tenantId, "OpenStack", "QueryNetwork", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - queryNetwork", me);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                    throw new NetworkException (me);
+                }
+
+                if (netInfo == null) {
+                    String error = "Update Nework: Network " + networkId
+                                   + " does not exist in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId;
+                    LOGGER.error (MessageEnum.RA_NETWORK_NOT_FOUND, networkId, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.BusinessProcesssError, "Network not found");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+                    // Does not exist. Throw an exception (can't update a non-existent network)
+                    throw new NetworkException(error, MsoExceptionCategory.USERDATA);
+                }
+                long updateNetworkStarttime = System.currentTimeMillis ();
+                try {
+                    netInfo = neutron.updateNetwork (cloudSiteId,
+                                                     tenantId,
+                                                     networkId,
+                                                     neutronNetworkType,
+                                                     physicalNetworkName,
+                                                     vlans);
+                    LOGGER.recordMetricEvent (updateNetworkStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "UpdateNetwork", null);
+                } catch (MsoException me) {
+                    me.addContext (UPDATE_NETWORK_CONTEXT);
+                    String error = "Update Network (neutron): " + networkId
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.error (MessageEnum.RA_UPDATE_NETWORK_ERR, networkId, cloudSiteId, tenantId, "Openstack", "updateNetwork", MsoLogger.ErrorCode.DataError, "Exception - updateNetwork", me);
+                    LOGGER.recordMetricEvent (updateNetworkStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "UpdateNetwork", null);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                    throw new NetworkException (me);
+                }
+
+                // Add the network ID and previously queried vlans to the rollback object
+                networkRollback.setNetworkId (netInfo.getId ());
+                networkRollback.setNeutronNetworkId (netInfo.getId ());
+                networkRollback.setNetworkType (networkType);
+                // Save previous parameters
+                networkRollback.setNetworkName (netInfo.getName ());
+                networkRollback.setPhysicalNetwork (netInfo.getProvider ());
+                networkRollback.setVlans (netInfo.getVlans ());
+
+                LOGGER.debug ("Network " + networkId + " updated, id = " + netInfo.getId ());
+            } else if ("HEAT".equals (mode)) {
+
+                // Use an MsoHeatUtils for all Heat commands
+                MsoHeatUtilsWithUpdate heat = new MsoHeatUtilsWithUpdate (MSO_PROP_NETWORK_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+                // First, look up to see that the Network already exists.
+                // For Heat-based orchestration, the networkId is the network Stack ID.
+                StackInfo heatStack = null;
+                long queryStackStarttime = System.currentTimeMillis ();
+                try {
+                    heatStack = heat.queryStack (cloudSiteId, tenantId, networkName);
+                    LOGGER.recordMetricEvent (queryStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryStack", null);
+                } catch (MsoException me) {
+                    me.addContext (UPDATE_NETWORK_CONTEXT);
+                    String error = "UpdateNetwork (heat): query " + networkName
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.recordMetricEvent (queryStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", null);
+                    LOGGER.error (MessageEnum.RA_QUERY_NETWORK_EXC, networkId, cloudSiteId, tenantId, "OpenStack", "queryStack", MsoLogger.ErrorCode.DataError, "Exception - QueryStack", me);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                    throw new NetworkException (me);
+                }
+
+                if (heatStack == null || (heatStack.getStatus () == HeatStatus.NOTFOUND)) {
+                    String error = "UpdateNetwork: Stack " + networkName
+                                   + " does not exist in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId;
+                    LOGGER.error (MessageEnum.RA_NETWORK_NOT_FOUND, networkId, cloudSiteId, tenantId, "OpenStack", "queryStack", MsoLogger.ErrorCode.DataError, "Network not found");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+                    // Network stack does not exist. Return an error
+                    throw new NetworkException(error, MsoExceptionCategory.USERDATA);
+                }
+
+                // Get the previous parameters for rollback
+                Map <String, Object> heatParams = heatStack.getParameters ();
+
+                String previousNetworkName = (String) heatParams.get ("network_name");
+                String previousPhysicalNetwork = (String) heatParams.get (PHYSICAL_NETWORK);
+
+                List <Integer> previousVlans = new ArrayList <Integer> ();
+                String vlansParam = (String) heatParams.get (VLANS);
+                if (vlansParam != null) {
+                    for (String vlan : vlansParam.split (",")) {
+                        try {
+                            previousVlans.add (Integer.parseInt (vlan));
+                        } catch (NumberFormatException e) {
+                            LOGGER.warn (MessageEnum.RA_VLAN_PARSE, networkId, vlansParam, "", "", MsoLogger.ErrorCode.DataError, "Exception - VLAN parse", e);
+                        }
+                    }
+                }
+                LOGGER.debug ("Update Stack:  Previous VLANS: " + previousVlans);
+
+                // Ready to deploy the updated Network via Heat
+
+                HeatTemplate heatTemplate = db.getHeatTemplate (networkResource.getTemplateId ());
+                if (heatTemplate == null) {
+                    String error = "Network error - undefined Heat Template. Network Type=" + networkType;
+                    LOGGER.error (MessageEnum.RA_PARAM_NOT_FOUND, "Heat Template", "Network Type", networkType, "OpenStack", "getHeatTemplate", MsoLogger.ErrorCode.DataError, "Network error - undefined Heat Template. Network Type=" + networkType);
+                    alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+                    throw new NetworkException (error, MsoExceptionCategory.INTERNAL);
+                }
+
+                LOGGER.debug ("Got HEAT Template from DB: " + heatTemplate.toString ());
+                
+                // "Fix" the template if it has CR/LF (getting this from Oracle)
+                String template = heatTemplate.getHeatTemplate ();
+                template = template.replaceAll ("\r\n", "\n");
+                
+                boolean aic3template=false;
+                String aic3nw = AIC3_NW;
+                try {
+                       aic3nw = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_NETWORK_ADAPTER).getProperty(AIC3_NW_PROPERTY, AIC3_NW);
+                       } catch (MsoPropertiesException e) {
+                               String error = "Unable to get properties:" + MSO_PROP_NETWORK_ADAPTER;
+                               LOGGER.error (MessageEnum.RA_CONFIG_EXC, error, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception - Unable to get properties", e);
+                       }
+                if (template.contains(aic3nw))
+                       aic3template = true;
+
+                // Build the common set of HEAT template parameters
+                Map <String, Object> stackParams = populateNetworkParams (neutronNetworkType,
+                                                                          networkName,
+                                                                          physicalNetworkName,
+                                                                          vlans,
+                                                                          routeTargets,
+                                                                          shared,
+                                                                          external,
+                                                                          aic3template);
+
+                // Validate (and update) the input parameters against the DB definition
+                // Shouldn't happen unless DB config is wrong, since all networks use same inputs
+                try {
+                    stackParams = heat.validateStackParams (stackParams, heatTemplate);
+                } catch (IllegalArgumentException e) {
+                    String error = "UpdateNetwork: Configuration Error: Network Type=" + networkType;
+                    LOGGER.error (MessageEnum.RA_CONFIG_EXC, "Network Type=" + networkType, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception - UpdateNetwork: Configuration Error");
+                    alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, error);
+                    throw new NetworkException (error, MsoExceptionCategory.INTERNAL, e);
+                }
+
+                if (subnets != null) {
+                    try {
+                       if (aic3template)
+                               {
+                                       template = mergeSubnetsAIC3 (template, subnets, stackParams);
+                               }
+                               else
+                               {
+                                       template = mergeSubnets (template, subnets);
+                               }
+                    } catch (MsoException me) {
+                        me.addContext (UPDATE_NETWORK_CONTEXT);
+                        String error = "Update Network (heat): type " + neutronNetworkType
+                                       + " in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + ": "
+                                       + me;
+                        LOGGER.error (MessageEnum.RA_UPDATE_NETWORK_ERR, neutronNetworkType.toString(), cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception - UpdateNetwork mergeSubnets ", me);
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, error);
+                        throw new NetworkException (me);
+                    }
+                }
+
+                if (policyFqdns != null && aic3template) {
+                    try {
+                       mergePolicyRefs (policyFqdns, stackParams);
+                    } catch (MsoException me) {
+                        me.addContext (UPDATE_NETWORK_CONTEXT);
+                       String error = "UpdateNetwork (heat) mergePolicyRefs type " + neutronNetworkType
+                                       + " in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + ": "
+                                       + me;
+                        LOGGER.error (MessageEnum.RA_UPDATE_NETWORK_ERR, neutronNetworkType.toString(), cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception - UpdateNetwork mergePolicyRefs", me);
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, error);
+                        throw new NetworkException (me);
+                    }
+                }
+                
+                if (routeTableFqdns != null && !routeTableFqdns.isEmpty() && aic3template) {
+                    try {
+                        mergeRouteTableRefs (routeTableFqdns, stackParams);
+                    } catch (MsoException me) {
+                        me.addContext (UPDATE_NETWORK_CONTEXT);
+                       String error = "UpdateNetwork (heat) mergeRouteTableRefs type " + neutronNetworkType
+                                       + " in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + ": "
+                                       + me;
+                        LOGGER.error (MessageEnum.RA_UPDATE_NETWORK_ERR, neutronNetworkType.toString(), cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception - UpdateNetwork mergeRouteTableRefs", me);
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, error);
+                        throw new NetworkException (me);
+                    }
+                }
+                
+                // Update the network stack
+                // Ignore MsoStackNotFound exception because we already checked.
+                long updateStackStarttime = System.currentTimeMillis ();
+                try {
+                    heatStack = heat.updateStack (cloudSiteId,
+                                                  tenantId,
+                                                  networkId,
+                                                  template,
+                                                  stackParams,
+                                                  true,
+                                                  heatTemplate.getTimeoutMinutes ());
+                    LOGGER.recordMetricEvent (updateStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "UpdateStack", null);
+                } catch (MsoException me) {
+                    me.addContext (UPDATE_NETWORK_CONTEXT);
+                    String error = "Update Network: " + networkId + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+                    LOGGER.recordMetricEvent (updateStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "UpdateStack", null);
+                    LOGGER.error (MessageEnum.RA_UPDATE_NETWORK_ERR, networkId, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception - update network", me);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                    throw new NetworkException (me);
+                }
+
+                Map <String, Object> outputs = heatStack.getOutputs ();
+                Map <String, String> sMap = new HashMap <String, String> ();
+                if (outputs != null) {
+                    for (String key : outputs.keySet ()) {
+                        if (key != null && key.startsWith ("subnet")) {
+                               if (aic3template) //one subnet output expected
+                                       {
+                                                Map <String, String> map = getSubnetUUId(key, outputs, subnets); 
+                                                sMap.putAll(map);
+                                       }
+                                       else //multiples subnet_%aaid% outputs allowed
+                                       {
+                                               String subnetUUId = (String) outputs.get(key); 
+                                               sMap.put (key.substring("subnet_id_".length()), subnetUUId);
+                                       }
+                        }
+                    }
+                }
+                subnetIdMap.value = sMap;
+
+                // Reach this point if createStack is successful.
+                // Populate remaining rollback info and response parameters.
+                networkRollback.setNetworkStackId (heatStack.getCanonicalName ());
+                networkRollback.setNeutronNetworkId ((String) outputs.get (NETWORK_ID));
+                networkRollback.setNetworkType (networkType);
+                // Save previous parameters
+                networkRollback.setNetworkName (previousNetworkName);
+                networkRollback.setPhysicalNetwork (previousPhysicalNetwork);
+                networkRollback.setVlans (previousVlans);
+
+                rollback.value = networkRollback;
+
+                LOGGER.debug ("Network " + networkId + " successfully updated via HEAT");
+            }
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully updated network");
+        return;
+    }
+
+    private NetworkResource networkCheck (CatalogDatabase db,
+                                          long startTime,
+                                          String networkType,
+                                          String networkName,
+                                          String physicalNetworkName,
+                                          List <Integer> vlans,
+                                          List <String> routeTargets,
+                                          CloudSite cloudSite) throws NetworkException {
+        // Retrieve the Network Resource definition
+        NetworkResource networkResource = db.getNetworkResource (networkType);
+        if (networkResource == null) {
+            String error = "CreateNetwork: Unknown Network Type: " + networkType;
+            LOGGER.error (MessageEnum.RA_UNKOWN_PARAM, "Network Type", networkType, "OpenStack", "", MsoLogger.ErrorCode.DataError, "CreateNetwork: Unknown Network Type");
+
+            throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+        }
+        LOGGER.debug ("Got Network definition from Catalog: " + networkResource.toString ());
+
+        String mode = networkResource.getOrchestrationMode ();
+        NetworkType neutronNetworkType = NetworkType.valueOf (networkResource.getNeutronNetworkType ());
+
+        // All Networks are orchestrated via HEAT or Neutron
+        if (!("HEAT".equals (mode) || NEUTRON_MODE.equals (mode))) {
+            String error = "CreateNetwork: Configuration Error: Network Type = " + networkType;
+            LOGGER.error (MessageEnum.RA_NETWORK_ORCHE_MODE_NOT_SUPPORT, mode, "OpenStack", "", MsoLogger.ErrorCode.DataError, "CreateNetwork: Configuration Error");
+            // Alarm on this error, configuration must be fixed
+            alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+
+            throw new NetworkException (error, MsoExceptionCategory.INTERNAL);
+        }
+
+        MavenLikeVersioning aicV = new MavenLikeVersioning();
+               aicV.setVersion(cloudSite.getAic_version());
+               if ((aicV.isMoreRecentThan(networkResource.getAicVersionMin()) || aicV.isTheSameVersion(networkResource.getAicVersionMin())) // aic >= min
+                               && (aicV.isTheSameVersion(networkResource.getAicVersionMax()) || !(aicV.isMoreRecentThan(networkResource.getAicVersionMax())))) //aic <= max
+               {
+                       LOGGER.debug ("Network Type:" + networkType 
+                               +   " VersionMin:" + networkResource.getAicVersionMin() 
+                               +       " VersionMax:" + networkResource.getAicVersionMax() 
+                               +       " supported on Cloud:" + cloudSite.getId()
+                               +       " with AIC_Version:" + cloudSite.getAic_version());
+               }
+               else
+               {
+                       String error = "Network Type:" + networkType
+                                       + " Version_Min:" + networkResource.getAicVersionMin() 
+                                       + " Version_Max:" + networkResource.getAicVersionMax() 
+                                       + " not supported on Cloud:" + cloudSite.getId()
+                                       + " with AIC_Version:"  + cloudSite.getAic_version();
+                       LOGGER.error (MessageEnum.RA_CONFIG_EXC, error, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Network Type not supported on Cloud");
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, error);
+                       throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+               }
+
+
+        // Validate the Network parameters.
+        String missing = validateNetworkParams (neutronNetworkType,
+                                                networkName,
+                                                physicalNetworkName,
+                                                vlans,
+                                                routeTargets);
+        if (!missing.isEmpty ()) {
+            String error = "Create Network: Missing parameters: " + missing;
+            LOGGER.error (MessageEnum.RA_MISSING_PARAM, missing, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Create Network: Missing parameters");
+
+            throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+        }
+        return networkResource;
+    }
+
+    @Override
+    public void queryNetwork (String cloudSiteId,
+                              String tenantId,
+                              String networkNameOrId,
+                              MsoRequest msoRequest,
+                              Holder <Boolean> networkExists,
+                              Holder <String> networkId,
+                              Holder <String> neutronNetworkId,
+                              Holder <NetworkStatus> status,
+                              Holder <List <Integer>> vlans,
+                              Holder <Map <String, String>> subnetIdMap) throws NetworkException {
+        queryNetwork (cloudSiteId,
+                      tenantId,
+                      networkNameOrId,
+                      msoRequest,
+                      networkExists,
+                      networkId,
+                      neutronNetworkId,
+                      status,
+                      vlans,
+                      null,
+                      subnetIdMap);
+    }
+
+    @Override
+    public void queryNetworkContrail (String cloudSiteId,
+                                      String tenantId,
+                                      String networkNameOrId,
+                                      MsoRequest msoRequest,
+                                      Holder <Boolean> networkExists,
+                                      Holder <String> networkId,
+                                      Holder <String> neutronNetworkId,
+                                      Holder <NetworkStatus> status,
+                                      Holder <List <String>> routeTargets,
+                                      Holder <Map <String, String>> subnetIdMap) throws NetworkException {
+        queryNetwork (cloudSiteId,
+                      tenantId,
+                      networkNameOrId,
+                      msoRequest,
+                      networkExists,
+                      networkId,
+                      neutronNetworkId,
+                      status,
+                      null,
+                      routeTargets,
+                      subnetIdMap);
+    }
+
+    /**
+     * This is the queryNetwork method. It returns the existence and status of
+     * the specified network, along with its Neutron UUID and list of VLANs.
+     * This method attempts to find the network using both Heat and Neutron.
+     * Heat stacks are first searched based on the provided network name/id.
+     * If none is found, the Neutron is directly queried.
+     */
+    private void queryNetwork (String cloudSiteId,
+                              String tenantId,
+                              String networkNameOrId,
+                              MsoRequest msoRequest,
+                              Holder <Boolean> networkExists,
+                              Holder <String> networkId,
+                              Holder <String> neutronNetworkId,
+                              Holder <NetworkStatus> status,
+                              Holder <List <Integer>> vlans,
+                              Holder <List <String>> routeTargets,
+                              Holder <Map <String, String>> subnetIdMap) throws NetworkException {
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName ("QueryNetwork");
+        LOGGER.debug ("*** QUERY Network with Network: " + networkNameOrId
+                + " in "
+                + cloudSiteId
+                + "/"
+                + tenantId);
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        if (isNullOrEmpty (cloudSiteId)
+            || isNullOrEmpty(tenantId)
+            || isNullOrEmpty(networkNameOrId)) {
+
+            String error = "Missing mandatory parameter cloudSiteId, tenantId or networkId";
+            LOGGER.error (MessageEnum.RA_MISSING_PARAM, "cloudSiteId or tenantId or networkNameOrId", "OpenStack", "", MsoLogger.ErrorCode.DataError, "Missing mandatory parameter cloudSiteId, tenantId or networkId");
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+            throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+        }
+
+        cloudConfig = cloudConfigFactory.getCloudConfig ();
+        CloudSite cloudSite = cloudConfig.getCloudSite (cloudSiteId);
+        if (cloudSite == null)
+        {
+               String error = "Configuration Error. Stack " + networkNameOrId + " in "
+                               + cloudSiteId
+                               + "/"
+                               + tenantId
+                               + ": "
+                               + " CloudSite does not exist in MSO Configuration";
+               LOGGER.error (MessageEnum.RA_CONFIG_EXC, error, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Configuration Error");
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, error);
+               // Set the detailed error as the Exception 'message'
+               throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+        }
+
+        // Use MsoNeutronUtils for all NEUTRON commands
+        MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_NETWORK_ADAPTER,msoPropertiesFactory,cloudConfigFactory);
+        MsoNeutronUtils neutron = new MsoNeutronUtils (MSO_PROP_NETWORK_ADAPTER, cloudConfigFactory);
+
+        String mode = null;
+        String neutronId = null;
+        // Try Heat first, since networks may be named the same as the Heat stack
+        StackInfo heatStack = null;
+        long queryStackStarttime = System.currentTimeMillis ();
+        try {
+            heatStack = heat.queryStack (cloudSiteId, tenantId, networkNameOrId);
+            LOGGER.recordMetricEvent (queryStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryStack", null);
+        } catch (MsoException me) {
+               me.addContext ("QueryNetwork");
+            String error = "Query Network (heat): " + networkNameOrId
+                           + " in "
+                           + cloudSiteId
+                           + "/"
+                           + tenantId
+                           + ": "
+                           + me;
+            LOGGER.recordMetricEvent (queryStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "BPMN", "QueryStack", null);
+            LOGGER.error (MessageEnum.RA_QUERY_NETWORK_EXC, networkNameOrId, cloudSiteId, tenantId, "OpenStack", "queryStack", MsoLogger.ErrorCode.DataError, "Exception - Query Network (heat)", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new NetworkException (me);
+        }
+
+        // Populate the outputs based on the returned Stack information
+        if (heatStack != null && heatStack.getStatus () != HeatStatus.NOTFOUND) {
+            // Found it. Get the neutronNetworkId for further query
+            Map <String, Object> outputs = heatStack.getOutputs ();
+            neutronId = (String) outputs.get (NETWORK_ID);
+            mode = "HEAT";
+
+            Map <String, String> sMap = new HashMap <String, String> ();
+            if (outputs != null) {
+               for (String key : outputs.keySet ()) {
+                       if (key != null && key.startsWith ("subnet_id_")) //multiples subnet_%aaid% outputs
+                       {
+                               String subnetUUId = (String) outputs.get(key); 
+                               sMap.put (key.substring("subnet_id_".length()), subnetUUId);
+                       }
+                       else if (key != null && key.startsWith ("subnet")) //one subnet output expected
+                       {
+                               Map <String, String> map = getSubnetUUId(key, outputs, null); 
+                               sMap.putAll(map);
+                       }
+
+               }
+            }
+            subnetIdMap.value = sMap;
+        } else {
+            // Input ID was not a Heat stack ID. Try it directly in Neutron
+            neutronId = networkNameOrId;
+            mode = NEUTRON_MODE;
+        }
+
+        // Query directly against the Neutron Network for the details
+        // no RouteTargets available for ContrailV2 in neutron net-show
+        // networkId is heatStackId
+        long queryNetworkStarttime = System.currentTimeMillis ();
+        try {
+            NetworkInfo netInfo = neutron.queryNetwork (neutronId, tenantId, cloudSiteId);
+            LOGGER.recordMetricEvent (queryNetworkStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryNetwork", null);
+            if (netInfo != null) {
+                // Found. Populate the output elements
+                networkExists.value = Boolean.TRUE;
+                if ("HEAT".equals (mode)) {
+                    networkId.value = heatStack.getCanonicalName ();
+                } else {
+                    networkId.value = netInfo.getId ();
+                }
+                neutronNetworkId.value = netInfo.getId ();
+                status.value = netInfo.getStatus ();
+                if (vlans != null)
+                       vlans.value = netInfo.getVlans ();
+
+                LOGGER.debug ("Network " + networkNameOrId
+                              + " found ("
+                              + mode
+                              + "), ID = "
+                              + networkId.value
+                              + ("HEAT".equals (mode) ? ",NeutronId = " + neutronNetworkId.value : ""));
+            } else {
+                // Not found. Populate the status fields, leave the rest null
+                networkExists.value = Boolean.FALSE;
+                status.value = NetworkStatus.NOTFOUND;
+                neutronNetworkId.value = null;
+                if (vlans != null)
+                       vlans.value = new ArrayList <Integer> ();
+
+                LOGGER.debug ("Network " + networkNameOrId + " not found");
+            }
+        } catch (MsoException me) {
+            me.addContext ("QueryNetwork");
+            String error = "Query Network (neutron): " + networkNameOrId
+                           + " in "
+                           + cloudSiteId
+                           + "/"
+                           + tenantId
+                           + ": "
+                           + me;
+            LOGGER.recordMetricEvent (queryNetworkStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryNetwork", null);
+            LOGGER.error (MessageEnum.RA_QUERY_NETWORK_EXC, networkNameOrId, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception - Query Network (neutron)", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new NetworkException (me);
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully queried network");
+        return;
+    }
+
+    /**
+     * This is the "Delete Network" web service implementation.
+     * It will delete a Network in the specified cloud and tenant.
+     *
+     * If the network is not found, it is treated as a success.
+     *
+     * This service supports two modes of Network creation/update/delete:
+     * - via Heat Templates
+     * - via Neutron API
+     * The network orchestration mode for each network type is declared in its
+     * catalog definition.
+     *
+     * For Heat-based orchestration, the networkId should be the stack ID.
+     * For Neutron-based orchestration, the networkId should be the Neutron network UUID.
+     *
+     * The method returns nothing on success. Rollback is not possible for delete
+     * commands, so any failure on delete will require manual fallout in the client.
+     */
+    @Override
+    public void deleteNetwork (String cloudSiteId,
+                               String tenantId,
+                               String networkType,
+                               String networkId,
+                               MsoRequest msoRequest,
+                               Holder <Boolean> networkDeleted) throws NetworkException {
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName ("DeleteNetwork");
+        LOGGER.debug ("*** DELETE Network adapter with Network: " + networkId
+                                      + " in "
+                                      + cloudSiteId
+                                      + "/"
+                                      + tenantId);
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        try (CatalogDatabase db = getCatalogDb()) {
+            if (isNullOrEmpty (cloudSiteId)
+                            || isNullOrEmpty(tenantId)
+                            || isNullOrEmpty(networkId)) {
+                String error = "Missing mandatory parameter cloudSiteId, tenantId or networkId";
+                LOGGER.error (MessageEnum.RA_MISSING_PARAM, "cloudSiteId or tenantId or networkId", "Openstack", "", MsoLogger.ErrorCode.DataError, "Missing mandatory parameter cloudSiteId, tenantId or networkId");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+                throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+            }
+
+            // Retrieve the Network Resource definition
+            NetworkResource networkResource = db.getNetworkResource (networkType);
+            if (networkResource == null) {
+                String error = "Unknown Network Type: " + networkType;
+                LOGGER.error (MessageEnum.RA_UNKOWN_PARAM, "Network Type", networkType, "Openstack", "", MsoLogger.ErrorCode.DataError, "Unknown Network Type");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+                throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+            }
+            LOGGER.debug ("Got Network definition from Catalog: " + networkResource.toString ());
+
+            String mode = networkResource.getOrchestrationMode ();
+
+            if (NEUTRON_MODE.equals (mode)) {
+
+                // Use MsoNeutronUtils for all NEUTRON commands
+                MsoNeutronUtils neutron = new MsoNeutronUtils (MSO_PROP_NETWORK_ADAPTER, cloudConfigFactory);
+                long deleteNetworkStarttime = System.currentTimeMillis ();
+                try {
+                    // The deleteNetwork function in MsoNeutronUtils returns success if the network
+                    // was not found. So don't bother to query first.
+                    boolean deleted = neutron.deleteNetwork (networkId, tenantId, cloudSiteId);
+                    LOGGER.recordMetricEvent (deleteNetworkStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "DeleteNetwork", null);
+                    networkDeleted.value = deleted;
+                } catch (MsoException me) {
+                    me.addContext ("DeleteNetwork");
+                       String error = "Delete Network (neutron): " + networkId
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.recordMetricEvent (deleteNetworkStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "DeleteNetwork", null);
+                    LOGGER.error (MessageEnum.RA_DELETE_NETWORK_EXC, networkId, cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Delete Network (neutron)", me);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                    throw new NetworkException (me);
+                }
+            } else if ("HEAT".equals (mode)) {
+                long deleteStackStarttime = System.currentTimeMillis ();
+                // Use MsoHeatUtils for all HEAT commands
+                MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_NETWORK_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+                try {
+                    // The deleteStack function in MsoHeatUtils returns NOTFOUND if the stack was not found or if the stack was deleted.
+                    //  So query first to report back if stack WAS deleted or just NOTOFUND 
+                       StackInfo heatStack = null;
+                       heatStack = heat.queryStack(cloudSiteId, tenantId, networkId);
+                       if (heatStack != null && heatStack.getStatus() != HeatStatus.NOTFOUND)
+                       {
+                               heat.deleteStack (tenantId, cloudSiteId, networkId, true);
+                               LOGGER.recordMetricEvent (deleteStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "DeleteStack", null);
+                               networkDeleted.value = true;
+                       }
+                       else
+                       {
+                               networkDeleted.value = false;
+                       }
+                } catch (MsoException me) {
+                    me.addContext ("DeleteNetwork");
+                       String error = "Delete Network (heat): " + networkId
+                                   + " in "
+                                   + cloudSiteId
+                                   + "/"
+                                   + tenantId
+                                   + ": "
+                                   + me;
+                    LOGGER.recordMetricEvent (deleteStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "DeleteStack", null);
+                    LOGGER.error (MessageEnum.RA_DELETE_NETWORK_EXC, networkId, cloudSiteId, tenantId, "Openstack", "", MsoLogger.ErrorCode.DataError, "Delete Network (heat)", me);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                    throw new NetworkException (me);
+                }
+            }
+        }
+
+        // On success, nothing is returned.
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully deleted network");
+        return;
+    }
+
+    public CatalogDatabase getCatalogDb() {
+        return new CatalogDatabase();
+    }
+
+    /**
+     * This web service endpoint will rollback a previous Create VNF operation.
+     * A rollback object is returned to the client in a successful creation
+     * response. The client can pass that object as-is back to the rollbackVnf
+     * operation to undo the creation.
+     *
+     * The rollback includes removing the VNF and deleting the tenant if the
+     * tenant did not exist prior to the VNF creation.
+     */
+    @Override
+    public void rollbackNetwork (NetworkRollback rollback) throws NetworkException {
+        MsoLogger.setServiceName ("RollbackNetwork");
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        if (rollback == null) {
+               LOGGER.error (MessageEnum.RA_ROLLBACK_NULL, "Openstack", "", MsoLogger.ErrorCode.DataError, "rollback is null");
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "No action to perform");
+            return;
+        }
+
+        MsoLogger.setLogContext (rollback.getMsoRequest());
+
+        // Get the elements of the VnfRollback object for easier access
+        String cloudSiteId = rollback.getCloudId ();
+        String tenantId = rollback.getTenantId ();
+        String networkId = rollback.getNetworkStackId ();
+        String networkType = rollback.getNetworkType ();
+
+        LOGGER.debug ("*** ROLLBACK Network " + networkId + " in " + cloudSiteId + "/" + tenantId);
+
+        // rollback may be null (e.g. if network already existed when Create was called)
+        // Get a handle to the Catalog Database
+
+        try (CatalogDatabase db = getCatalogDb()){
+
+            // Retrieve the Network Resource definition
+            NetworkResource networkResource = db.getNetworkResource (networkType);
+            if (networkResource == null) {
+                String error = "Rollback Network: Unknown Network Type: " + networkType;
+                LOGGER.error (MessageEnum.RA_UNKOWN_PARAM, "Network Type", networkType, "Openstack", "", MsoLogger.ErrorCode.DataError, "Rollback Network: Unknown Network Type");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+                throw new NetworkException (error, MsoExceptionCategory.USERDATA);
+            }
+            LOGGER.debug ("Got Network definition from Catalog: " + networkResource.toString ());
+
+            String mode = networkResource.getOrchestrationMode ();
+
+            if (rollback.getNetworkCreated ()) {
+                // Rolling back a newly created network, so delete it.
+                if (NEUTRON_MODE.equals (mode)) {
+                    // Use MsoNeutronUtils for all NEUTRON commands
+                    MsoNeutronUtils neutron = new MsoNeutronUtils (MSO_PROP_NETWORK_ADAPTER, cloudConfigFactory);
+                    long deleteNetworkStarttime = System.currentTimeMillis ();
+                    try {
+                        // The deleteNetwork function in MsoNeutronUtils returns success if the network
+                        // was not found. So don't bother to query first.
+                        neutron.deleteNetwork (networkId, tenantId, cloudSiteId);
+                        LOGGER.recordMetricEvent (deleteNetworkStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "DeleteNetwork", null);
+                    } catch (MsoException me) {
+                        me.addContext ("RollbackNetwork");
+                        String error = "Rollback Network (neutron): " + networkId
+                                       + " in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + ": "
+                                       + me;
+                        LOGGER.recordMetricEvent (deleteNetworkStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "DeleteNetwork", null);
+                        LOGGER.error (MessageEnum.RA_DELETE_NETWORK_EXC, networkId, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Rollback Network (neutron)", me);
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                        throw new NetworkException (me);
+                    }
+                } else if ("HEAT".equals (mode)) {
+                    // Use MsoHeatUtils for all HEAT commands
+                    MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_NETWORK_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+                    long deleteStackStarttime = System.currentTimeMillis ();
+                    try {
+                        // The deleteStack function in MsoHeatUtils returns success if the stack
+                        // was not found. So don't bother to query first.
+                        heat.deleteStack (tenantId, cloudSiteId, networkId, true);
+                        LOGGER.recordMetricEvent (deleteStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "DeleteStack", null);
+                    } catch (MsoException me) {
+                        me.addContext ("RollbackNetwork");
+                        String error = "Rollback Network (heat): " + networkId
+                                       + " in "
+                                       + cloudSiteId
+                                       + "/"
+                                       + tenantId
+                                       + ": "
+                                       + me;
+                        LOGGER.recordMetricEvent (deleteStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "DeleteStack", null);
+                        LOGGER.error (MessageEnum.RA_DELETE_NETWORK_EXC, networkId, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Rollback Network (heat)", me);
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                        throw new NetworkException (me);
+                    }
+                }
+            } 
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully rolled back network");
+        return;
+    }
+
+    private String validateNetworkParams (NetworkType neutronNetworkType,
+                                          String networkName,
+                                          String physicalNetwork,
+                                          List <Integer> vlans,
+                                          List <String> routeTargets) {
+        String sep = "";
+        StringBuilder missing = new StringBuilder ();
+        if (isNullOrEmpty(networkName)) {
+            missing.append ("networkName");
+            sep = ",";
+        }
+
+        if (neutronNetworkType == NetworkType.PROVIDER || neutronNetworkType == NetworkType.MULTI_PROVIDER) {
+            if (isNullOrEmpty(physicalNetwork)) {
+                missing.append (sep).append ("physicalNetworkName");
+                sep = ",";
+            }
+            if (vlans == null || vlans.isEmpty ()) {
+                missing.append (sep).append (VLANS);
+            }
+        }
+
+        return missing.toString ();
+    }
+
+    private Map <String, Object> populateNetworkParams (NetworkType neutronNetworkType,
+                                                        String networkName,
+                                                        String physicalNetwork,
+                                                        List <Integer> vlans,
+                                                        List <String> routeTargets,
+                                                        String shared,
+                                                        String external,
+                                                        boolean aic3template) {
+        // Build the common set of HEAT template parameters
+        Map <String, Object> stackParams = new HashMap <String, Object> ();
+        stackParams.put ("network_name", networkName);
+
+        if (neutronNetworkType == NetworkType.PROVIDER) {
+            // For Provider type
+            stackParams.put (PHYSICAL_NETWORK, physicalNetwork);
+            stackParams.put ("vlan", vlans.get (0).toString ());
+        } else if (neutronNetworkType == NetworkType.MULTI_PROVIDER) {
+            // For Multi-provider, PO supports a custom resource extension of ProviderNet.
+            // It supports all ProviderNet properties except segmentation_id, and adds a
+            // comma-separated-list of VLANs as a "segments" property.
+            // Note that this does not match the Neutron definition of Multi-Provider network,
+            // which contains a list of 'segments', each having physical_network, network_type,
+            // and segmentation_id.
+            StringBuilder buf = new StringBuilder ();
+            String sep = "";
+            for (Integer vlan : vlans) {
+                buf.append (sep).append (vlan.toString ());
+                sep = ",";
+            }
+            String csl = buf.toString ();
+
+            stackParams.put (PHYSICAL_NETWORK, physicalNetwork);
+            stackParams.put (VLANS, csl);
+        }
+        if (routeTargets != null && !routeTargets.isEmpty()) {
+            StringBuilder buf = new StringBuilder ();
+            String sep = "";
+            for (String rt : routeTargets) {
+               if (!isNullOrEmpty(rt))
+               {
+                       if (aic3template)
+                               buf.append (sep).append ("target:" + rt.toString ());
+                       else
+                               buf.append (sep).append (rt.toString ());
+
+                       sep = ",";
+               }
+            }
+            String csl = buf.toString ();
+
+            stackParams.put ("route_targets", csl);
+        }
+        if (isNullOrEmpty(shared)) {
+            stackParams.put ("shared", "False");
+        } else {
+            stackParams.put ("shared", shared);
+        }
+        if (isNullOrEmpty(external)) {
+            stackParams.put ("external", "False");
+        } else {
+            stackParams.put ("external", external);
+        }
+        return stackParams;
+    }
+    
+
+    
+    /** policyRef_list structure in stackParams
+    [
+     {
+         "network_policy_refs_data_sequence": {
+             "network_policy_refs_data_sequence_major": "1",
+             "network_policy_refs_data_sequence_minor": "0"
+         }
+     },
+     {
+         "network_policy_refs_data_sequence": {
+             "network_policy_refs_data_sequence_major": "2",
+             "network_policy_refs_data_sequence_minor": "0"
+         }
+     }
+       ]
+    **/
+    private void mergePolicyRefs(List <String> pFqdns, Map <String, Object> stackParams) throws MsoException {
+               //Resource Property
+               List<ContrailPolicyRef> prlist =  new ArrayList <ContrailPolicyRef> ();
+               int index = 1;
+               for (String pf : pFqdns) {
+                       if (!isNullOrEmpty(pf))
+                       {
+                               ContrailPolicyRef pr = new ContrailPolicyRef();
+                               pr.populate(String.valueOf(index), "0");
+                               index++;
+                               LOGGER.debug("Contrail PolicyRefs Data:" + pr.toString());
+                               prlist.add(pr);
+                       }
+               }
+               
+               JsonNode node = null;
+               try
+               {
+                       ObjectMapper mapper = new ObjectMapper(); 
+                       node = mapper.convertValue(prlist, JsonNode.class);
+                       String jsonString = mapper.writeValueAsString(prlist);
+                       LOGGER.debug("Json PolicyRefs Data:" + jsonString);
+               }
+               catch (Exception e)
+               {
+                       String error = "Error creating JsonNode for policyRefs Data";
+                       LOGGER.error (MessageEnum.RA_MARSHING_ERROR, error, "Openstack", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception creating JsonNode for policyRefs Data", e);
+                       throw new MsoAdapterException (error);
+               }
+               //update parameters
+               if (pFqdns != null && node != null)
+               {
+                       StringBuilder buf = new StringBuilder ();
+                       String sep = "";
+                       for (String pf : pFqdns) {
+                               if (!isNullOrEmpty(pf))
+                               {
+                                       buf.append (sep).append (pf.toString ());
+                                       sep = ",";
+                               }
+                       }
+                       String csl = buf.toString ();
+                       stackParams.put ("policy_refs", csl);
+                       stackParams.put ("policy_refsdata", node);
+               }
+
+               LOGGER.debug ("StackParams updated with policy refs");
+               return;
+    }
+    
+    private void mergeRouteTableRefs(List <String> rtFqdns, Map <String, Object> stackParams) throws MsoException {
+               
+               //update parameters
+               if (rtFqdns != null)
+               {
+                       StringBuilder buf = new StringBuilder ();
+                       String sep = "";
+                       for (String rtf : rtFqdns) {
+                               if (!isNullOrEmpty(rtf))
+                               {
+                                       buf.append (sep).append (rtf.toString ());
+                                       sep = ",";
+                               }
+                       }
+                       String csl = buf.toString ();
+                       stackParams.put ("route_table_refs", csl);
+               }
+
+               LOGGER.debug ("StackParams updated with route_table refs");
+               return;
+    }
+
+    
+    /*** Subnet Output structure from Juniper
+     {
+    "ipam_subnets": [
+        {
+            "subnet": {
+                "ip_prefix": "10.100.1.0",
+                "ip_prefix_len": 28
+            },
+            "addr_from_start": null,
+            "enable_dhcp": false,
+            "default_gateway": "10.100.1.1",
+            "dns_nameservers": [],
+            "dhcp_option_list": null,
+            "subnet_uuid": "10391fbf-6b9c-4160-825d-2d018b7649cf",
+            "allocation_pools": [
+                {
+                    "start": "10.100.1.3",
+                    "end": "10.100.1.5"
+                },
+                {
+                    "start": "10.100.1.6",
+                    "end": "10.100.1.9"
+                }
+            ],
+            "host_routes": null,
+            "dns_server_address": "10.100.1.13",
+            "subnet_name": "subnet_MsoNW1_692c9032-e1a2-4d64-828c-7b9a4fcc05b0"
+        },
+        {
+            "subnet": {
+                "ip_prefix": "10.100.2.16",
+                "ip_prefix_len": 28
+            },
+            "addr_from_start": null,
+            "enable_dhcp": true,
+            "default_gateway": "10.100.2.17",
+            "dns_nameservers": [],
+            "dhcp_option_list": null,
+            "subnet_uuid": "c7aac5ea-66fe-443a-85f9-9c38a608c0f6",
+            "allocation_pools": [
+                {
+                    "start": "10.100.2.18",
+                    "end": "10.100.2.20"
+                }
+            ],
+            "host_routes": null,
+            "dns_server_address": "10.100.2.29",
+            "subnet_name": "subnet_MsoNW1_692c9032-e1a2-4d64-828c-7b9a4fcc05b1"
+        }
+    ],
+    "host_routes": null
+       }
+    ***/
+    private String mergeSubnetsAIC3 (String heatTemplate, List <Subnet> subnets, Map <String, Object> stackParams) throws MsoException {
+
+               //Resource Property
+               List<ContrailSubnet> cslist =  new ArrayList <ContrailSubnet> ();
+               for (Subnet subnet : subnets) {
+                       ContrailSubnet cs = new ContrailSubnet();
+                       LOGGER.debug("Input Subnet:" + subnet.toString());
+                       cs.populateWith(subnet);
+                       LOGGER.debug("Contrail Subnet:" + cs.toString());
+                       cslist.add(cs);
+               }
+
+               JsonNode node = null;
+               try
+               {
+                       ObjectMapper mapper = new ObjectMapper();
+                       node = mapper.convertValue(cslist, JsonNode.class);
+                       String jsonString = mapper.writeValueAsString(cslist);
+                       LOGGER.debug("Json Subnet List:" + jsonString);
+               }
+               catch (Exception e)
+               {
+                       String error = "Error creating JsonNode from input subnets";
+                       LOGGER.error (MessageEnum.RA_MARSHING_ERROR, error, "", "", MsoLogger.ErrorCode.DataError, "Exception creating JsonNode from input subnets", e);
+                       throw new MsoAdapterException (error);
+               }
+               //update parameters
+               if (node != null)
+               {
+                       stackParams.put ("subnet_list", node);
+               }
+               //Outputs - All subnets are in one ipam_subnets structure
+               String outputTempl = "  subnet:\n" + "    description: Openstack subnet identifier\n"
+                               + "    value: { get_attr: [network, network_ipam_refs, 0, attr]}\n";
+
+               // append outputs in heatTemplate
+               int outputsIdx = heatTemplate.indexOf ("outputs:");
+               heatTemplate = insertStr (heatTemplate, outputTempl, outputsIdx + 8);
+               LOGGER.debug ("Template updated with all AIC3.0 subnets:" + heatTemplate);
+               return heatTemplate;
+    }
+
+
+    private String mergeSubnets (String heatTemplate, List <Subnet> subnets) throws MsoException {
+
+               String resourceTempl = "  subnet_%subnetId%:\n" + "    type: OS::Neutron::Subnet\n"
+                               + "    properties:\n"
+                               + "      name: %name%\n"
+                               + "      network_id: { get_resource: network }\n"
+                               + "      cidr: %cidr%\n";
+
+               /* make these optional
+                               + "      ip_version: %ipversion%\n"
+                               + "      enable_dhcp: %enabledhcp%\n"
+                               + "      gateway_ip: %gatewayip%\n" 
+                               + "      allocation_pools:\n"
+                               + "       - start: %poolstart%\n"
+                               + "         end: %poolend%\n";
+
+                */
+               
+               String outputTempl = "  subnet_id_%subnetId%:\n" + "    description: Openstack subnet identifier\n"
+                               + "    value: {get_resource: subnet_%subnetId%}\n";
+
+               String curR = "";
+               String curO = "";
+               StringBuilder resourcesBuf = new StringBuilder ();
+               StringBuilder outputsBuf = new StringBuilder ();
+               for (Subnet subnet : subnets) {
+
+                       // build template for each subnet
+                       curR = resourceTempl;
+                       if (subnet.getSubnetId () != null) {
+                               curR = curR.replace ("%subnetId%", subnet.getSubnetId ());
+                       } else {
+                               String error = "Missing Required AAI SubnetId for subnet in HEAT Template";
+                               LOGGER.error (MessageEnum.RA_MISSING_PARAM, error, "Openstack", "", MsoLogger.ErrorCode.DataError, "Missing Required AAI ID  for subnet in HEAT Template");
+                               throw new MsoAdapterException (error);
+                       }
+                       
+                       if (subnet.getSubnetName () != null) {
+                               curR = curR.replace ("%name%", subnet.getSubnetName ());
+                       } else {
+                               curR = curR.replace ("%name%", subnet.getSubnetId ());
+                       }
+                       
+                       if (subnet.getCidr () != null) {
+                               curR = curR.replace ("%cidr%", subnet.getCidr ());
+                       } else {
+                               String error = "Missing Required cidr for subnet in HEAT Template";
+                               LOGGER.error (MessageEnum.RA_MISSING_PARAM, error, "Openstack", "", MsoLogger.ErrorCode.DataError, "Missing Required cidr for subnet in HEAT Template");
+                               throw new MsoAdapterException (error);
+                       }
+
+                       if (subnet.getIpVersion () != null) {
+                               curR = curR + "      ip_version: " + subnet.getIpVersion () + "\n";
+                       }
+                       if (subnet.getEnableDHCP () != null) {
+                               curR = curR + "      enable_dhcp: " +  Boolean.toString (subnet.getEnableDHCP ()) + "\n";
+                       }
+                       if (subnet.getGatewayIp () != null && !subnet.getGatewayIp ().isEmpty() ) {
+                               curR = curR + "      gateway_ip: " + subnet.getGatewayIp () + "\n";
+                       }       
+
+                       if (subnet.getAllocationPools() != null) { 
+                               curR = curR + "      allocation_pools:\n";
+                               for (Pool pool : subnet.getAllocationPools()) 
+                               {
+                                       if (!isNullOrEmpty(pool.getStart()) && !isNullOrEmpty(pool.getEnd()))
+                                       {
+                                               curR = curR + "       - start: " + pool.getStart () + "\n";
+                                               curR = curR + "         end: " + pool.getEnd () + "\n";
+                                       }
+                               }
+                       }
+
+                       resourcesBuf.append (curR);
+
+                       curO = outputTempl;
+                       curO = curO.replace ("%subnetId%", subnet.getSubnetId ());
+
+                       outputsBuf.append (curO);
+
+               }
+               // append resources and outputs in heatTemplate
+               LOGGER.debug ("Tempate initial:" + heatTemplate);
+               int outputsIdx = heatTemplate.indexOf ("outputs:");
+               heatTemplate = insertStr (heatTemplate, outputsBuf.toString (), outputsIdx + 8);
+               int resourcesIdx = heatTemplate.indexOf ("resources:");
+               heatTemplate = insertStr (heatTemplate, resourcesBuf.toString (), resourcesIdx + 10);
+
+               LOGGER.debug ("Template updated with all subnets:" + heatTemplate);
+               return heatTemplate;
+    }
+
+    private Map <String, String> getSubnetUUId(String key,  Map <String, Object> outputs, List <Subnet> subnets) {
+
+       Map <String, String> sMap = new HashMap <String, String> ();
+
+       try{
+               Object obj = outputs.get(key);
+               ObjectMapper mapper = new ObjectMapper();
+               String jStr = mapper.writeValueAsString(obj);
+               LOGGER.debug ("Subnet_Ipam Output JSON String:" + obj.getClass() + " " + jStr);
+
+               JsonNode rootNode = mapper.readTree(jStr);
+               for (JsonNode sNode : rootNode.path("ipam_subnets"))
+               {
+                       LOGGER.debug("Output Subnet Node" + sNode.toString());
+                       String name = sNode.path("subnet_name").getTextValue();
+                       String uuid = sNode.path("subnet_uuid").getTextValue();
+                       String aaiId = name; // default
+                       // try to find aaiId for name in input subnetList
+                       if (subnets != null)
+                       {
+                               for (Subnet subnet : subnets)
+                               {
+                                       if ( subnet !=  null && !isNullOrEmpty(subnet.getSubnetName()))
+                                       {               
+                                               if (subnet.getSubnetName().equals(name))
+                                               {
+                                                       aaiId = subnet.getSubnetId(); 
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+                       sMap.put(aaiId, uuid); //bpmn needs aaid to uuid map
+               }
+       }
+       catch (Exception e)
+       {
+               LOGGER.error (MessageEnum.RA_MARSHING_ERROR, "error getting subnet-uuids", "Openstack", "", MsoLogger.ErrorCode.DataError, "Exception getting subnet-uuids", e);
+       }
+
+       LOGGER.debug ("Return sMap" + sMap.toString());
+       return sMap;
+    }
+
+    private static String insertStr (String template, String snippet, int index) {
+
+        String updatedTemplate = "";
+
+        LOGGER.debug ("Index:" + index + " Snippet:" + snippet);
+
+        String templateBeg = template.substring (0, index);
+        String templateEnd = template.substring (index);
+
+        updatedTemplate = templateBeg + "\n" + snippet + templateEnd;
+
+        LOGGER.debug ("Template updated with a subnet:" + updatedTemplate);
+        return updatedTemplate;
+    }
+
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/NetworkAdapterRest.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/NetworkAdapterRest.java
new file mode 100644 (file)
index 0000000..c813534
--- /dev/null
@@ -0,0 +1,595 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+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.QueryParam;
+import javax.ws.rs.core.GenericEntity;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.xml.ws.Holder;
+
+import org.apache.http.HttpStatus;
+
+import org.openecomp.mso.adapters.network.exceptions.NetworkException;
+import org.openecomp.mso.adapters.nwrest.ContrailNetwork;
+import org.openecomp.mso.adapters.nwrest.CreateNetworkError;
+import org.openecomp.mso.adapters.nwrest.CreateNetworkRequest;
+import org.openecomp.mso.adapters.nwrest.CreateNetworkResponse;
+import org.openecomp.mso.adapters.nwrest.DeleteNetworkError;
+import org.openecomp.mso.adapters.nwrest.DeleteNetworkRequest;
+import org.openecomp.mso.adapters.nwrest.DeleteNetworkResponse;
+import org.openecomp.mso.adapters.nwrest.ProviderVlanNetwork;
+import org.openecomp.mso.adapters.nwrest.QueryNetworkError;
+import org.openecomp.mso.adapters.nwrest.QueryNetworkResponse;
+import org.openecomp.mso.adapters.nwrest.RollbackNetworkError;
+import org.openecomp.mso.adapters.nwrest.RollbackNetworkRequest;
+import org.openecomp.mso.adapters.nwrest.RollbackNetworkResponse;
+import org.openecomp.mso.adapters.nwrest.UpdateNetworkError;
+import org.openecomp.mso.adapters.nwrest.UpdateNetworkRequest;
+import org.openecomp.mso.adapters.nwrest.UpdateNetworkResponse;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+import org.openecomp.mso.openstack.beans.NetworkStatus;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+@Path("/v1/networks")
+public class NetworkAdapterRest {
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+       private static final String TESTING_KEYWORD = "___TESTING___";
+       private final CloudConfigFactory cloudConfigFactory = new CloudConfigFactory();
+       private final MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       private final MsoNetworkAdapterImpl adapter = new MsoNetworkAdapterImpl(msoPropertiesFactory, cloudConfigFactory);
+
+       @POST
+       @Path("")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response createNetwork(CreateNetworkRequest req) {
+               LOGGER.debug("createNetwork enter: " + req.toJsonString());
+               CreateNetworkTask task = new CreateNetworkTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+                       try {
+                               Thread t1 = new Thread(task);
+                               t1.start();
+                       } catch (Exception e) {
+                               // problem handling create, send generic failure as sync resp to caller
+                               LOGGER.error (MessageEnum.RA_CREATE_NETWORK_EXC, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception while create network", e);
+                               return Response.serverError().build();
+                       }
+                       // send sync response (ACK) to caller
+                       LOGGER.debug ("createNetwork exit");
+                       return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class CreateNetworkTask implements Runnable {
+               private final CreateNetworkRequest req;
+               private CreateNetworkResponse response = null;
+               private CreateNetworkError eresp = null;
+               private boolean sendxml;
+
+               public CreateNetworkTask(CreateNetworkRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<CreateNetworkResponse>(response) {}
+                               : new GenericEntity<CreateNetworkError>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       LOGGER.debug ("CreateNetworkTask start");
+                       try {
+                               // Synchronous Web Service Outputs
+                               Holder<String> networkId = new Holder<String>();
+                               Holder<String> neutronNetworkId = new Holder<String>();
+                               Holder<String> networkFqdn = new Holder<String>();
+                               Holder<Map<String, String>> subnetIdMap = new Holder<Map<String, String>>();
+                               Holder<NetworkRollback> rollback = new Holder<NetworkRollback>();
+
+                               String cloudsite = req.getCloudSiteId();
+                               if (cloudsite != null && cloudsite.equals(TESTING_KEYWORD)) {
+                                       String tenant = req.getTenantId();
+                                       if (tenant != null && tenant.equals(TESTING_KEYWORD)) {
+                                               throw new NetworkException("testing.");
+                                       }
+                                       networkId.value = "479D3D8B-6360-47BC-AB75-21CC91981484";
+                                       neutronNetworkId.value = "55e55884-28fa-11e6-8971-0017f20fe1b8";
+                                       networkFqdn.value = "086f70b6-28fb-11e6-8260-0017f20fe1b8";
+                                       subnetIdMap.value = testMap();
+                                       rollback.value = new NetworkRollback();
+                               } else if (req.isContrailRequest()) {
+                                       ContrailNetwork ctn = req.getContrailNetwork();
+                                       if (ctn == null) {
+                                               ctn = new ContrailNetwork();
+                                               req.setContrailNetwork(ctn);
+                                       }
+                                       adapter.createNetworkContrail(
+                                               req.getCloudSiteId(),
+                                               req.getTenantId(),
+                                               req.getNetworkType(),
+                                               req.getNetworkName(),
+                        req.getContrailNetwork().getRouteTargets(),
+                        req.getContrailNetwork().getShared(),
+                        req.getContrailNetwork().getExternal(),
+                        req.getFailIfExists(),
+                        req.getBackout(),
+                        req.getSubnets(),
+                        req.getContrailNetwork().getPolicyFqdns(),
+                        req.getContrailNetwork().getRouteTableFqdns(),
+                               req.getMsoRequest(),
+                                               networkId,
+                                               neutronNetworkId,
+                                               networkFqdn,
+                                               subnetIdMap,
+                                               rollback);
+                               } else {
+                                       ProviderVlanNetwork pvn = req.getProviderVlanNetwork();
+                                       if (pvn == null) {
+                                               pvn = new ProviderVlanNetwork();
+                                               req.setProviderVlanNetwork(pvn);
+                                       }
+                                       adapter.createNetwork(
+                                               req.getCloudSiteId(),
+                                               req.getTenantId(),
+                                               req.getNetworkType(),
+                                               req.getNetworkName(),
+                                               req.getProviderVlanNetwork().getPhysicalNetworkName(),
+                                               req.getProviderVlanNetwork().getVlans(),
+                        req.getFailIfExists(),
+                        req.getBackout(),
+                        req.getSubnets(),
+                        req.getMsoRequest(),
+                                       networkId,
+                                       neutronNetworkId,
+                                       subnetIdMap,
+                                       rollback);
+                               }
+                               response = new CreateNetworkResponse(
+                                               req.getNetworkId(),
+                                               neutronNetworkId.value,
+                                               rollback.value.getNetworkStackId(),
+                                               networkFqdn.value,
+                                               rollback.value.getNetworkCreated(),
+                                               subnetIdMap.value,
+                                               rollback.value,
+                                               req.getMessageId());
+                       } catch (NetworkException e) {
+                               eresp = new CreateNetworkError(
+                                       e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug ("CreateNetworkTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       @DELETE
+       @Path("{aaiNetworkId}")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response deleteNetwork(
+               @PathParam("aaiNetworkId") String aaiNetworkId,
+               DeleteNetworkRequest req)
+       {
+               LOGGER.debug("deleteNetwork enter: " + req.toJsonString());
+               if (aaiNetworkId == null || !aaiNetworkId.equals(req.getNetworkId())) {
+                       return Response
+                               .status(HttpStatus.SC_BAD_REQUEST)
+                               .type(MediaType.TEXT_PLAIN)
+                               .entity("A&AI NetworkId in URL ("+aaiNetworkId+") does not match content ("+req.getNetworkId()+")")
+                               .build();
+               }
+               DeleteNetworkTask task = new DeleteNetworkTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+                       try {
+                               Thread t1 = new Thread(task);
+                               t1.start();
+                       } catch (Exception e) {
+                               // problem handling create, send generic failure as sync resp to caller
+                               LOGGER.error (MessageEnum.RA_DELETE_NETWORK_EXC, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception while delete network", e);
+                               return Response.serverError().build();
+                       }
+                       // send sync response (ACK) to caller
+                       LOGGER.debug ("deleteNetwork exit");
+                       return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class DeleteNetworkTask implements Runnable {
+               private final DeleteNetworkRequest req;
+               private DeleteNetworkResponse response = null;
+               private DeleteNetworkError eresp = null;
+               private boolean sendxml;
+
+               public DeleteNetworkTask(DeleteNetworkRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<DeleteNetworkResponse>(response) {}
+                               : new GenericEntity<DeleteNetworkError>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       LOGGER.debug("DeleteNetworkTask start");
+                       try {
+                               Holder<Boolean> networkDeleted = new Holder<Boolean>();
+                               if (req.getCloudSiteId().equals(TESTING_KEYWORD)) {
+                                       networkDeleted.value = true;
+                               } else {
+                                       adapter.deleteNetwork(
+                                               req.getCloudSiteId(),
+                                               req.getTenantId(),
+                                               req.getNetworkType(),
+                                               req.getNetworkStackId(),
+                                               req.getMsoRequest(),
+                                               networkDeleted);
+                               }
+                               response = new DeleteNetworkResponse(req.getNetworkId(), networkDeleted.value, req.getMessageId());
+                       } catch (NetworkException e) {
+                               eresp = new DeleteNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug("DeleteNetworkTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       @GET
+       @Path("{aaiNetworkId}")
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response queryNetwork(
+               @QueryParam("cloudSiteId") String cloudSiteId,
+               @QueryParam("tenantId") String tenantId,
+               @QueryParam("networkStackId") String networkStackId,
+               @QueryParam("skipAAI") String skipAAI,
+               @QueryParam("msoRequest.requestId") String requestId,
+               @QueryParam("msoRequest.serviceInstanceId") String serviceInstanceId,
+               @PathParam("aaiNetworkId") String aaiNetworkId)
+       {
+               //This request responds synchronously only
+               LOGGER.debug ("Query network enter:" + aaiNetworkId);
+               MsoRequest msoRequest = new MsoRequest(requestId, serviceInstanceId);
+
+               try {
+                       int respStatus = HttpStatus.SC_OK;
+                       QueryNetworkResponse resp = new QueryNetworkResponse(networkStackId, null, networkStackId, null, null);
+                       Holder<Boolean> networkExists = new Holder<Boolean>();
+            Holder<String> networkId = new Holder<String>();
+            Holder<String> neutronNetworkId = new Holder<String>();
+            Holder<NetworkStatus> status = new Holder<NetworkStatus>();
+            Holder<List<String>> routeTargets = new Holder<List<String>>();
+            Holder<Map<String, String>> subnetIdMap = new Holder<Map<String, String>>();
+
+                       adapter.queryNetworkContrail(cloudSiteId,  tenantId, aaiNetworkId,  msoRequest,
+                               networkExists, networkId, neutronNetworkId, status, routeTargets, subnetIdMap);
+
+                       if (!networkExists.value) {
+                               LOGGER.debug ("network not found");
+                               respStatus = HttpStatus.SC_NOT_FOUND;
+                       } else {
+                               LOGGER.debug ("network found" + networkId.value + ", status=" + status.value);
+                               resp.setNetworkExists(networkExists.value);
+                               resp.setNetworkId(networkId.value);
+                               resp.setNeutronNetworkId(neutronNetworkId.value);
+                               resp.setNetworkStatus(status.value);
+                               resp.setRouteTargets(routeTargets.value);
+                               resp.setSubnetIdMap(subnetIdMap.value);
+                       }
+                       LOGGER.debug ("Query network exit");
+                       return Response
+                               .status(respStatus)
+                               .entity(new GenericEntity<QueryNetworkResponse>(resp) {})
+                               .build();
+               } catch (NetworkException e) {
+                       LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, aaiNetworkId, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception when query VNF", e);
+                       QueryNetworkError err = new QueryNetworkError();
+                       err.setMessage(e.getMessage());
+                       err.setCategory(MsoExceptionCategory.INTERNAL);
+                       return Response
+                               .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
+                               .entity(new GenericEntity<QueryNetworkError>(err) {})
+                               .build();
+               }
+       }
+
+       @DELETE
+       @Path("{aaiNetworkId}/rollback")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response rollbackNetwork(
+               RollbackNetworkRequest req)
+       {
+               LOGGER.debug("rollbackNetwork enter: " + req.toJsonString());
+               RollbackNetworkTask task = new RollbackNetworkTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+                       try {
+                               Thread t1 = new Thread(task);
+                               t1.start();
+                       } catch (Exception e) {
+                               // problem handling create, send generic failure as sync resp to caller
+                               LOGGER.error (MessageEnum.RA_ROLLBACK_NULL, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in rollbackNetwork", e);
+                               return Response.serverError().build();
+                       }
+                       // send sync response (ACK) to caller
+                       LOGGER.debug("rollbackNetwork exit");
+                       return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class RollbackNetworkTask implements Runnable {
+               private final RollbackNetworkRequest req;
+               private RollbackNetworkResponse response = null;
+               private RollbackNetworkError eresp = null;
+               private boolean sendxml;
+
+               public RollbackNetworkTask(RollbackNetworkRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<RollbackNetworkResponse>(response) {}
+                               : new GenericEntity<RollbackNetworkError>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       LOGGER.debug("RollbackNetworkTask start");
+                       try {
+                               NetworkRollback nwr = req.getNetworkRollback();
+                               adapter.rollbackNetwork(nwr);
+                               response = new RollbackNetworkResponse(true, req.getMessageId());
+                       } catch (NetworkException e) {
+                               eresp = new RollbackNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug("RollbackNetworkTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       @PUT
+       @Path("{aaiNetworkId}")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response updateNetwork(
+               @PathParam("aaiNetworkId") String aaiNetworkId,
+               UpdateNetworkRequest req)
+       {
+               LOGGER.debug("updateNetwork enter: " + req.toJsonString());
+               if (aaiNetworkId == null || !aaiNetworkId.equals(req.getNetworkId())) {
+                       return Response
+                               .status(HttpStatus.SC_BAD_REQUEST)
+                               .type(MediaType.TEXT_PLAIN)
+                               .entity("A&AI NetworkId in URL ("+aaiNetworkId+") does not match content ("+req.getNetworkId()+")")
+                               .build();
+               }
+               UpdateNetworkTask task = new UpdateNetworkTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+               try {
+                       Thread t1 = new Thread(task);
+                       t1.start();
+               } catch (Exception e) {
+                       // problem handling create, send generic failure as sync resp to caller
+                       LOGGER.error (MessageEnum.RA_UPDATE_NETWORK_ERR, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in updateNetwork", e);
+                       return Response.serverError().build();
+               }
+               // send sync response (ACK) to caller
+               LOGGER.debug ("updateNetwork exit");
+               return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class UpdateNetworkTask implements Runnable {
+               private final UpdateNetworkRequest req;
+               private UpdateNetworkResponse response = null;
+               private UpdateNetworkError eresp = null;
+               private boolean sendxml;
+
+               public UpdateNetworkTask(UpdateNetworkRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<UpdateNetworkResponse>(response) {}
+                               : new GenericEntity<UpdateNetworkError>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       LOGGER.debug("UpdateNetworkTask start");
+                       try {
+                               Holder<Map<String, String>> subnetIdMap = new Holder<Map<String, String>>();
+                               Holder<NetworkRollback> rollback = new Holder<NetworkRollback> ();
+
+                               if (req.getCloudSiteId().equals(TESTING_KEYWORD)) {
+                                       subnetIdMap.value = testMap();
+                               NetworkRollback rb = new NetworkRollback ();
+                               rb.setCloudId(req.getCloudSiteId());
+                               rb.setTenantId(req.getTenantId());
+                               rb.setMsoRequest(req.getMsoRequest());
+                               rollback.value = rb;
+                               } else if (req.isContrailRequest()) {
+                                       ContrailNetwork ctn = req.getContrailNetwork();
+                                       if (ctn == null) {
+                                               ctn = new ContrailNetwork();
+                                               req.setContrailNetwork(ctn);
+                                       }
+                                       adapter.updateNetworkContrail(
+                                               req.getCloudSiteId(),
+                                               req.getTenantId(),
+                                               req.getNetworkType(),
+                                               req.getNetworkStackId(),
+                                               req.getNetworkName(),
+                                               req.getContrailNetwork().getRouteTargets(),
+                           req.getContrailNetwork().getShared(),
+                           req.getContrailNetwork().getExternal(),
+                           req.getSubnets(),
+                           req.getContrailNetwork().getPolicyFqdns(),
+                           req.getContrailNetwork().getRouteTableFqdns(),
+                           req.getMsoRequest(),
+                           subnetIdMap,
+                           rollback);
+                               } else {
+                                       ProviderVlanNetwork pvn = req.getProviderVlanNetwork();
+                                       if (pvn == null) {
+                                               pvn = new ProviderVlanNetwork();
+                                               req.setProviderVlanNetwork(pvn);
+                                       }
+                                       adapter.updateNetwork(
+                                               req.getCloudSiteId(),
+                                               req.getTenantId(),
+                                               req.getNetworkType(),
+                                               req.getNetworkStackId(),
+                                               req.getNetworkName(),
+                                               req.getProviderVlanNetwork().getPhysicalNetworkName(),
+                                               req.getProviderVlanNetwork().getVlans(),
+                                               req.getSubnets(),
+                                               req.getMsoRequest(),
+                                               subnetIdMap,
+                                               rollback);
+                               }
+                               response = new UpdateNetworkResponse(
+                                       req.getNetworkId(),
+                                       null,   // NeutronNetworkId is not available from an update
+                                       subnetIdMap.value,
+                                       req.getMessageId());
+                       } catch (NetworkException e) {
+                               eresp = new UpdateNetworkError(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug("UpdateNetworkTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       public static Map<String, String> testMap() {
+               Map<String, String> m = new HashMap<String, String>();
+               m.put("mickey", "7");
+               m.put("clyde", "10");
+               m.put("wayne", "99");
+               return m;
+    }
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/exceptions/NetworkException.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/exceptions/NetworkException.java
new file mode 100644 (file)
index 0000000..0fd4d02
--- /dev/null
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network.exceptions;
+
+
+
+import javax.xml.ws.WebFault;
+
+import org.openecomp.mso.adapters.network.exceptions.NetworkExceptionBean;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+/**
+ * This class simply extends Exception (without addition additional functionality)
+ * to provide an identifier for Network related exceptions on create, delete, query.
+ * 
+ *
+ */
+@WebFault (name="NetworkException", faultBean="org.openecomp.mso.adapters.network.exceptions.NetworkExceptionBean", targetNamespace="http://com.att.mso/network")
+public class NetworkException extends Exception {
+
+       private static final long serialVersionUID = 1L;
+
+       private NetworkExceptionBean faultInfo;
+       
+       public NetworkException (String msg) {
+               super(msg);
+               faultInfo = new NetworkExceptionBean (msg);
+       }
+       
+       public NetworkException (Throwable e) {
+               super(e);
+               faultInfo = new NetworkExceptionBean (e.getMessage());
+       }
+       
+       public NetworkException (String msg, Throwable e) {
+               super (msg, e);
+               faultInfo = new NetworkExceptionBean (msg);
+       }
+
+       public NetworkException (String msg, MsoExceptionCategory category) {
+               super(msg);
+               faultInfo = new NetworkExceptionBean (msg, category);
+       }
+       
+       public NetworkException (String msg, MsoExceptionCategory category, Throwable e) {
+               super (msg, e);
+               faultInfo = new NetworkExceptionBean (msg, category);
+       }
+       
+       public NetworkException (MsoException e) {
+               super (e);
+               faultInfo = new NetworkExceptionBean (e.getContextMessage(), e.getCategory());
+       }
+       
+       public NetworkExceptionBean getFaultInfo() {
+               return faultInfo;
+       }
+
+       public void setFaultInfo(NetworkExceptionBean faultInfo) {
+               this.faultInfo = faultInfo;
+       }
+}
diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/exceptions/NetworkExceptionBean.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/exceptions/NetworkExceptionBean.java
new file mode 100644 (file)
index 0000000..af4e0e3
--- /dev/null
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network.exceptions;
+
+
+import java.io.Serializable;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+/**
+ * Jax-WS Fault Bean for Network Exceptions
+ */
+public class NetworkExceptionBean implements Serializable {
+
+    private static final long serialVersionUID = 1655343530371342871L;
+
+    private String message;
+       private MsoExceptionCategory category;
+       private Boolean rolledBack;
+
+       public NetworkExceptionBean () {}
+
+       public NetworkExceptionBean (String message) {
+               this.message = message;
+       }
+
+       public NetworkExceptionBean (String message, MsoExceptionCategory category) {
+               this.message = message;
+               this.category = category;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+
+       public Boolean isRolledBack() {
+               return rolledBack;
+       }
+
+       public void setRolledBack(Boolean rolledBack) {
+               this.rolledBack = rolledBack;
+       }
+}
diff --git a/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/NetworkAdapterTest.java b/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/NetworkAdapterTest.java
new file mode 100644 (file)
index 0000000..41cc3f5
--- /dev/null
@@ -0,0 +1,266 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.network;
+
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.ws.Holder;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+
+import org.openecomp.mso.adapters.network.exceptions.NetworkException;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.NetworkResource;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.NetworkStatus;
+import org.openecomp.mso.openstack.beans.Subnet;
+import org.openecomp.mso.openstack.beans.NetworkRollback;
+
+public class NetworkAdapterTest {
+
+    @Mock
+    private static MsoNetworkAdapterImpl adapter;
+
+    @Mock
+    private static CatalogDatabase db;
+
+    @BeforeClass
+    public static final void prepare () {
+        adapter = Mockito.spy (new MsoNetworkAdapterImpl ());
+        db = Mockito.mock (CatalogDatabase.class);
+        NetworkResource networkResource = new NetworkResource ();
+        networkResource.setNetworkType ("PROVIDER");
+        networkResource.setNeutronNetworkType ("PROVIDER");
+        networkResource.setId (1);
+        networkResource.setOrchestrationMode ("toto");
+        Mockito.when (db.getNetworkResource ("PROVIDER")).thenReturn (networkResource);
+        Mockito.when (adapter.getCatalogDb()).thenReturn (db);
+    }
+
+    @Test
+    public void createTest () {
+
+        List <Integer> vlans = new LinkedList <> ();
+        vlans.add (1);
+        vlans.add (2);
+        List <Subnet> subnets = new LinkedList <> ();
+        subnets.add (new Subnet ());
+        MsoRequest msoRequest = new MsoRequest ();
+        Holder <String> networkId = new Holder <> ();
+        Holder <String> neutronNetworkId = new Holder <> ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <> ();
+        Holder <NetworkRollback> rollback = new Holder <> ();
+        try {
+            adapter.createNetwork ("toto",
+                                   "tenant",
+                                   "PROVIDER",
+                                   "networkName",
+                                   "physicalNetworkName",
+                                   vlans,
+                                   Boolean.TRUE,
+                                   Boolean.TRUE,
+                                   subnets,
+                                   msoRequest,
+                                   networkId,
+                                   neutronNetworkId,
+                                   subnetIdMap,
+                                   rollback);
+        } catch (NetworkException e) {
+            assertTrue (e.getMessage ().contains ("Configuration Error"));
+        }
+    }
+
+    @Test
+    public void createTest2 () {
+        List <Integer> vlans = new LinkedList <> ();
+        vlans.add (1);
+        vlans.add (2);
+        List <Subnet> subnets = new LinkedList <> ();
+        List <String> routeTargets = new LinkedList <> ();
+        subnets.add (new Subnet ());
+        List <String> policyFqdns = new LinkedList <> ();
+        policyFqdns.add("pfqdn1");
+        policyFqdns.add("pfqdn2");
+        List <String> routeTableFqdns = new LinkedList <> ();
+        routeTableFqdns.add("rtfqdn1");
+        routeTableFqdns.add("rtfqdn2");
+        MsoRequest msoRequest = new MsoRequest ();
+        Holder <String> networkId = new Holder <> ();
+        Holder <String> neutronNetworkId = new Holder <> ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <> ();
+        Holder <NetworkRollback> rollback = new Holder <> ();
+        Holder <String> networkFqdn= new Holder <> ();
+        try {
+            adapter.createNetworkContrail ("toto",
+                                           "tenant",
+                                           "PROVIDER",
+                                           "networkName",
+                                           routeTargets,
+                                           "shared",
+                                           "external",
+                                           Boolean.TRUE,
+                                           Boolean.TRUE,
+                                           subnets,
+                                           policyFqdns,
+                                           routeTableFqdns,
+                                           msoRequest,
+                                           networkId,
+                                           neutronNetworkId,
+                                           networkFqdn,
+                                           subnetIdMap,
+                                           rollback);
+        } catch (NetworkException e) {
+            assertTrue (e.getMessage ().contains ("Configuration Error"));
+        }
+    }
+
+    @Test
+    public void updateTest () {
+        List <Integer> vlans = new LinkedList <> ();
+        vlans.add (1);
+        vlans.add (2);
+        List <Subnet> subnets = new LinkedList <> ();
+        subnets.add (new Subnet ());
+        MsoRequest msoRequest = new MsoRequest ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <> ();
+        Holder <NetworkRollback> rollback = new Holder <> ();
+        try {
+            adapter.updateNetwork ("toto",
+                                   "tenant",
+                                   "PROVIDER",
+                                   "networkId",
+                                   "networkName",
+                                   "physicalNetworkName",
+                                   vlans,
+                                   subnets,
+                                   msoRequest,
+                                   subnetIdMap,
+                                   rollback);
+        } catch (NetworkException e) {
+            assertTrue (e.getMessage ().contains ("Configuration Error"));
+        }
+    }
+
+    @Test
+    public void updateTest2 () {
+        List <Integer> vlans = new LinkedList <> ();
+        vlans.add (1);
+        vlans.add (2);
+        List <Subnet> subnets = new LinkedList <> ();
+        List <String> routeTargets = new LinkedList <> ();
+        subnets.add (new Subnet ());
+        List <String> policyFqdns = new LinkedList <> ();
+        policyFqdns.add("pfqdn1");
+        List <String> routeTableFqdns = new LinkedList <> ();
+        routeTableFqdns.add("rtfqdn1");
+        routeTableFqdns.add("rtfqdn2");
+        MsoRequest msoRequest = new MsoRequest ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <> ();
+        Holder <NetworkRollback> rollback = new Holder <> ();
+        try {
+            adapter.updateNetworkContrail ("toto",
+                                           "tenant",
+                                           "PROVIDER",
+                                           "networkId",
+                                           "networkName",
+                                           routeTargets,
+                                           "shared",
+                                           "external",
+                                           subnets,
+                                           policyFqdns,
+                                           routeTableFqdns,
+                                           msoRequest,
+                                           subnetIdMap,
+                                           rollback);
+        } catch (NetworkException e) {
+            assertTrue (e.getMessage ().contains ("Configuration Error"));
+        }
+    }
+
+    @Test
+    public void queryTest () {
+        Holder <List <Integer>> vlans = new Holder <> ();
+        Holder <NetworkStatus> status = new Holder <> ();
+        MsoRequest msoRequest = new MsoRequest ();
+        Holder <String> networkId = new Holder <> ();
+        Holder <Boolean> result = new Holder <> ();
+        Holder <String> neutronNetworkId = new Holder <> ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <> ();
+        try {
+            adapter.queryNetwork (null,
+                                  "tenant",
+                                  "networkName",
+                                  msoRequest,
+                                  result,
+                                  networkId,
+                                  neutronNetworkId,
+                                  status,
+                                  vlans,
+                                  subnetIdMap);
+        } catch (NetworkException e) {
+            assertTrue (e.getMessage ().contains ("Missing mandatory parameter"));
+        }
+    }
+
+    @Test
+    public void queryTest2 () {
+        Holder <List <String>> routeTargets = new Holder <> ();
+        Holder <NetworkStatus> status = new Holder <> ();
+        MsoRequest msoRequest = new MsoRequest ();
+        Holder <String> networkId = new Holder <> ();
+        Holder <Boolean> result = new Holder <> ();
+        Holder <String> neutronNetworkId = new Holder <> ();
+        Holder <Map <String, String>> subnetIdMap = new Holder <> ();
+        try {
+            adapter.queryNetworkContrail (null,
+                                          "tenant",
+                                          "networkName",
+                                          msoRequest,
+                                          result,
+                                          networkId,
+                                          neutronNetworkId,
+                                          status,
+                                          routeTargets,
+                                          subnetIdMap);
+        } catch (NetworkException e) {
+            assertTrue (e.getMessage ().contains ("Missing mandatory parameter"));
+        }
+    }
+
+    @Test
+    public void deleteTest () {
+        Holder <Boolean> networkDeleted = new Holder<> ();
+        MsoRequest msoRequest = new MsoRequest ();
+        try {
+            adapter.deleteNetwork ("toto", "tenant", "PROVIDER", "networkId", msoRequest, networkDeleted);
+        } catch (NetworkException e) {
+            assertTrue (e.getMessage ().contains ("Configuration Error"));
+        }
+    }
+}
diff --git a/adapters/mso-network-adapter/src/test/resources/logback-test.xml b/adapters/mso-network-adapter/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..d2c1719
--- /dev/null
@@ -0,0 +1,48 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+  
+  
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/adapters/mso-requests-db-adapter/WebContent/META-INF/MANIFEST.MF b/adapters/mso-requests-db-adapter/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..5e94951
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0\r
+Class-Path: \r
+\r
diff --git a/adapters/mso-requests-db-adapter/WebContent/WEB-INF/beans.xml b/adapters/mso-requests-db-adapter/WebContent/WEB-INF/beans.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/adapters/mso-requests-db-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml b/adapters/mso-requests-db-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..88d5024
--- /dev/null
@@ -0,0 +1,17 @@
+<jboss-deployment-structure>\r
+       <deployment>\r
+               <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->\r
+               <exclusions>\r
+                       <module name="org.apache.log4j" />\r
+                       <module name="org.slf4j" />\r
+                       <module name="org.slf4j.impl" />\r
+               </exclusions>\r
+               <dependencies>\r
+                           <module name="org.jboss.jandex" slot="main" />\r
+                <module name="org.javassist" slot="main" />\r
+                <module name="org.antlr" slot="main" />\r
+                <module name="org.dom4j" slot="main" />\r
+               </dependencies>\r
+       </deployment>\r
+</jboss-deployment-structure>\r
+\r
diff --git a/adapters/mso-requests-db-adapter/WebContent/WEB-INF/jboss-web.xml b/adapters/mso-requests-db-adapter/WebContent/WEB-INF/jboss-web.xml
new file mode 100644 (file)
index 0000000..a39d506
--- /dev/null
@@ -0,0 +1,3 @@
+<jboss-web>\r
+       <context-root>dbadapters</context-root>\r
+</jboss-web>
\ No newline at end of file
diff --git a/adapters/mso-requests-db-adapter/WebContent/WEB-INF/web.xml b/adapters/mso-requests-db-adapter/WebContent/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..7fa3f2a
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xmlns="http://java.sun.com/xml/ns/javaee"\r
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"\r
+       id="WebApp_ID" version="3.0">\r
+       <display-name>mso-requests-db-adapter</display-name>\r
+       <context-param>\r
+           <param-name>resteasy.scan</param-name>\r
+           <param-value>true</param-value>\r
+    </context-param>\r
+    <context-param>\r
+       <param-name>resteasy.scan.providers</param-name>\r
+       <param-value>true</param-value>\r
+       </context-param>\r
+       <context-param>\r
+           <param-name>resteasy.scan.resources</param-name>\r
+           <param-value>true</param-value>\r
+       </context-param>\r
+       <context-param>\r
+               <param-name>mso.configuration</param-name>\r
+               <param-value>MSO_PROP_TOPOLOGY=topology.properties</param-value>\r
+       </context-param>\r
+\r
+       <servlet>\r
+       <servlet-name>Resteasy</servlet-name>\r
+       <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>\r
+       </servlet>\r
+       <servlet-mapping>\r
+       <servlet-name>Resteasy</servlet-name>\r
+       <url-pattern>/*</url-pattern>\r
+       </servlet-mapping>\r
+       \r
+       <filter>\r
+               <filter-name>LogFilter</filter-name>\r
+               <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>\r
+       </filter>\r
+       <filter-mapping>\r
+               <filter-name>LogFilter</filter-name>\r
+               <url-pattern>/*</url-pattern>\r
+       </filter-mapping>\r
+\r
+  <context-param>\r
+       <param-name>log.configuration</param-name>\r
+       <param-value>logback.msorequestsdbadapter.xml</param-value>\r
+  </context-param>\r
+  <context-param>\r
+       <param-name>resteasy.scan</param-name>\r
+       <param-value>true</param-value>\r
+       </context-param>\r
+  <context-param>\r
+       <param-name>resteasy.scan.providers</param-name>\r
+       <param-value>true</param-value>\r
+  </context-param>\r
+  <context-param>\r
+       <param-name>resteasy.scan.resources</param-name>\r
+       <param-value>true</param-value>\r
+  </context-param>\r
+\r
+       <security-constraint>\r
+               <web-resource-collection>\r
+                       <web-resource-name>SiteStatus</web-resource-name>\r
+                       <description>SiteStatus APIs</description>\r
+                       <url-pattern>/setStatus/*</url-pattern>\r
+                       <http-method>POST</http-method>\r
+               </web-resource-collection>\r
+               <auth-constraint>\r
+                       <role-name>SiteControl-Client</role-name>\r
+               </auth-constraint>\r
+       </security-constraint>\r
+       <login-config>\r
+               <auth-method>BASIC</auth-method>\r
+               <realm-name>ApplicationRealm</realm-name>\r
+       </login-config>\r
+       <security-role>\r
+               <role-name>SiteControl-Client</role-name>\r
+       </security-role>\r
+</web-app>\r
diff --git a/adapters/mso-requests-db-adapter/WebContent/index.xhtml b/adapters/mso-requests-db-adapter/WebContent/index.xhtml
new file mode 100644 (file)
index 0000000..f902af8
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \r
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml"\r
+    xmlns:ui="http://java.sun.com/jsf/facelets"\r
+    xmlns:h="http://java.sun.com/jsf/html"\r
+    xmlns:f="http://java.sun.com/jsf/core">\r
+\r
+<f:loadBundle basename="resources.application" var="msg"/>\r
+\r
+<head>\r
+    <title><h:outputText value="#{msg.welcomeTitle}" /></title>\r
+</head>\r
+\r
+<body>\r
+<h3><h:outputText value="#{msg.welcomeHeading}" /></h3>\r
+<p><h:outputText value="#{msg.welcomeMessage}" /></p>\r
+</body>\r
+</html>\r
diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml
new file mode 100644 (file)
index 0000000..b14cde1
--- /dev/null
@@ -0,0 +1,96 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-requests-db-adapter</artifactId>
+       <packaging>war</packaging>
+       
+       
+       <dependencies>
+               
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-requests-db</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.resteasy</groupId>
+                       <artifactId>resteasy-jaxrs</artifactId>
+                       <version>3.0.19.Final</version>
+                       <scope>provided</scope>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.slf4j</groupId>
+                                       <artifactId>slf4j-api</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.slf4j</groupId>
+                                       <artifactId>slf4j-simple</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.httpcomponents</groupId>
+                                       <artifactId>httpclient</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>status-control</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+       </dependencies>
+
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+                               
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.4</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                                       <attachClasses>true</attachClasses>
+                               </configuration>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.jvnet.jax-ws-commons</groupId>
+                               <artifactId>jaxws-maven-plugin</artifactId>
+                               <version>2.3</version>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>wsgen</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                               <configuration>
+                                       <verbose>true</verbose>
+                                       <sei>org.openecomp.mso.adapters.requestsdb.MsoRequestsDbAdapterImpl</sei>
+                                       <genWsdl>true</genWsdl>
+                                       <inlineSchemas>true</inlineSchemas>
+                               </configuration>
+                               <dependencies>
+                                       <dependency>
+                                               <groupId>com.sun.xml.ws</groupId>
+                                               <artifactId>jaxws-tools</artifactId>
+                                               <version>2.2.7</version>
+                                       </dependency>
+                                       <dependency>
+                                               <groupId>org.openecomp.mso.adapters</groupId>
+                                               <artifactId>mso-adapter-utils</artifactId>
+                                               <version>${project.version}</version>
+                                       </dependency>
+                               </dependencies>
+                       </plugin>
+               </plugins>
+       </build>
+</project>
\ No newline at end of file
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/HealthCheckHandler.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/HealthCheckHandler.java
new file mode 100644 (file)
index 0000000..22fcdda
--- /dev/null
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.requestsdb;
+
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.HealthCheckUtils;
+import org.openecomp.mso.utils.UUIDChecker;
+
+
+@Path("/")
+       public class HealthCheckHandler {
+               
+               private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+
+           @HEAD
+           @GET
+           @Path("/healthcheck")
+           @Produces("text/html")
+           public Response healthcheck (@QueryParam("requestId") String requestId) {
+                       long startTime = System.currentTimeMillis ();
+                       MsoLogger.setServiceName ("Healthcheck");
+                       UUIDChecker.verifyOldUUID(requestId, msoLogger);
+                       HealthCheckUtils healthCheck = new HealthCheckUtils ();
+                       if (!healthCheck.siteStatusCheck(msoLogger, startTime)) {
+                               return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+                       }
+
+                       if (!healthCheck.requestDBCheck (msoLogger, startTime)) {
+                               return HealthCheckUtils.NOT_STARTED_RESPONSE;
+                       }
+                       msoLogger.debug("healthcheck - Successful");
+                       return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+           }
+
+}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java
new file mode 100644 (file)
index 0000000..5b4009f
--- /dev/null
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.requestsdb;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.openecomp.mso.adapters.requestsdb.exceptions.MsoRequestsDbException;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.SiteStatus;
+
+/**
+ * MSO Request DB Adapter Web Service
+ */
+@WebService(name = "RequestsDbAdapter", targetNamespace = "http://com.att.mso/requestsdb")
+public interface MsoRequestsDbAdapter {
+
+    @WebMethod
+    public void updateInfraRequest (@WebParam(name = "requestId") @XmlElement(required = true) String requestId,
+                                    @WebParam(name = "lastModifiedBy") @XmlElement(required = true) String lastModifiedBy,
+                                    @WebParam(name = "statusMessage") @XmlElement(required = false) String statusMessage,
+                                    @WebParam(name = "responseBody") @XmlElement(required = false) String responseBody,
+                                    @WebParam(name = "requestStatus") @XmlElement(required = false) RequestStatusType requestStatus,
+                                    @WebParam(name = "progress") @XmlElement(required = false) String progress,
+                                    @WebParam(name = "vnfOutputs") @XmlElement(required = false) String vnfOutputs,
+                                    @WebParam(name = "serviceInstanceId") @XmlElement(required = false) String serviceInstanceId,
+                                    @WebParam(name = "networkId") @XmlElement(required = false) String networkId,
+                                    @WebParam(name = "vnfId") @XmlElement(required = false) String vnfId,
+                                    @WebParam(name = "vfModuleId") @XmlElement(required = false) String vfModuleId,
+                                    @WebParam(name = "volumeGroupId") @XmlElement(required = false) String volumeGroupId) throws MsoRequestsDbException;
+
+    @WebMethod
+    public InfraActiveRequests getInfraRequest (@WebParam(name="requestId") @XmlElement(required = true) String requestId) throws MsoRequestsDbException;
+
+    @WebMethod
+    public boolean getSiteStatus (@WebParam(name="siteName") @XmlElement(required = true) String siteName);
+
+}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
new file mode 100644 (file)
index 0000000..e1b752a
--- /dev/null
@@ -0,0 +1,246 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.requestsdb;
+
+import java.sql.Timestamp;
+import java.util.List;
+
+import javax.jws.WebService;
+
+import org.openecomp.mso.requestsdb.SiteStatus;
+import org.openecomp.mso.utils.UUIDChecker;
+import org.hibernate.HibernateException;
+import org.hibernate.Query;
+import org.hibernate.Session;
+
+import org.openecomp.mso.adapters.requestsdb.exceptions.MsoRequestsDbException;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.requestsdb.HibernateUtil;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+
+@WebService(serviceName = "RequestsDbAdapter", endpointInterface = "org.openecomp.mso.adapters.requestsdb.MsoRequestsDbAdapter", targetNamespace = "http://com.att.mso/requestsdb")
+public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
+
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+    @Override
+    public void updateInfraRequest (String requestId,
+                                    String lastModifiedBy,
+                                    String statusMessage,
+                                    String responseBody,
+                                    RequestStatusType requestStatus,
+                                    String progress,
+                                    String vnfOutputs,
+                                    String serviceInstanceId,
+                                    String networkId,
+                                    String vnfId,
+                                    String vfModuleId,
+                                    String volumeGroupId) throws MsoRequestsDbException {
+        MsoLogger.setLogContext (requestId, null);
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        int result = 0;
+        long startTime = System.currentTimeMillis ();
+        try {
+               session.beginTransaction ();
+            String queryString = "update InfraActiveRequests set ";
+            if (statusMessage != null) {
+                queryString += "statusMessage = :statusMessage, ";
+            }
+            if (responseBody != null) {
+                queryString += "responseBody = :responseBody, ";
+            }
+            if (requestStatus != null) {
+                queryString += "requestStatus = :requestStatus, ";
+            }
+            if (progress != null) {
+                queryString += "progress = :progress, ";
+            }
+            if (vnfOutputs != null) {
+                queryString += "vnfOutputs = :vnfOutputs, ";
+            }
+            if (serviceInstanceId != null) {
+                queryString += "serviceInstanceId = :serviceInstanceId, ";
+            }
+            if (networkId != null) {
+                queryString += "networkId = :networkId, ";
+            }
+            if (vnfId != null) {
+                queryString += "vnfId = :vnfId, ";
+            }
+            if (vfModuleId != null) {
+                queryString += "vfModuleId = :vfModuleId, ";
+            }
+            if (volumeGroupId != null) {
+                queryString += "volumeGroupId = :volumeGroupId, ";
+            }
+            if (requestStatus == RequestStatusType.COMPLETE || requestStatus == RequestStatusType.FAILED) {
+                queryString += "endTime = :endTime, ";
+            } else {
+                queryString += "modifyTime = :modifyTime, ";
+            }
+            queryString += "lastModifiedBy = :lastModifiedBy where requestId = :requestId OR clientRequestId = :requestId";
+            
+            LOGGER.debug("Executing update: " + queryString); 
+            
+            Query query = session.createQuery (queryString);
+            query.setParameter ("requestId", requestId);
+            if (statusMessage != null) {
+                query.setParameter ("statusMessage", statusMessage);
+                LOGGER.debug ("StatusMessage in updateInfraRequest is set to: " + statusMessage);               
+            }
+            if (responseBody != null) {
+               query.setParameter ("responseBody", responseBody);
+               LOGGER.debug ("ResponseBody in updateInfraRequest is set to: " + responseBody);
+            }
+            if (requestStatus != null) {
+                query.setParameter ("requestStatus", requestStatus.toString ());
+                LOGGER.debug ("RequestStatus in updateInfraRequest is set to: " + requestStatus.toString());
+            }
+            
+            if (progress != null) {
+                query.setParameter ("progress", Long.parseLong (progress));
+                LOGGER.debug ("Progress in updateInfraRequest is set to: " + progress);
+            }
+            if (vnfOutputs != null) {
+                query.setParameter ("vnfOutputs", vnfOutputs);
+                LOGGER.debug ("VnfOutputs in updateInfraRequest is set to: " + vnfOutputs);
+            }
+            if (serviceInstanceId != null) {
+                query.setParameter ("serviceInstanceId", serviceInstanceId);
+                LOGGER.debug ("ServiceInstanceId in updateInfraRequest is set to: " + serviceInstanceId);
+            }
+            if (networkId != null) {
+                query.setParameter ("networkId", networkId);
+                LOGGER.debug ("NetworkId in updateInfraRequest is set to: " + networkId);
+            }
+            if (vnfId != null) {
+                query.setParameter ("vnfId", vnfId);
+                LOGGER.debug ("VnfId in updateInfraRequest is set to: " + vnfId);
+            }
+            if (vfModuleId != null) {
+                query.setParameter ("vfModuleId", vfModuleId);
+                LOGGER.debug ("vfModuleId in updateInfraRequest is set to: " + vfModuleId);
+            }
+            if (volumeGroupId != null) {
+                query.setParameter ("volumeGroupId", volumeGroupId);
+                LOGGER.debug ("VolumeGroupId in updateInfraRequest is set to: " + volumeGroupId);
+            }
+            Timestamp nowTimeStamp = new Timestamp (System.currentTimeMillis ());
+            if (requestStatus == RequestStatusType.COMPLETE || requestStatus == RequestStatusType.FAILED) {
+                query.setParameter ("endTime", nowTimeStamp);
+                LOGGER.debug ("EndTime in updateInfraRequest is set to: " + nowTimeStamp);
+            } else {
+                query.setParameter ("modifyTime", nowTimeStamp);
+                LOGGER.debug ("ModifyTime in updateInfraRequest is set to: " + nowTimeStamp);
+            }
+            query.setParameter ("lastModifiedBy", lastModifiedBy);
+            LOGGER.debug ("LastModifiedBy in updateInfraRequest is set to: " + lastModifiedBy);
+            result = query.executeUpdate ();
+            checkIfExists (result, requestId, startTime);
+            session.getTransaction ().commit (); 
+        } catch (HibernateException e) {
+            String error = "Unable to update MSO Requests DB: " + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_CANT_UPDATE_REQUEST, "infra request parameters", requestId, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error);
+            throw new MsoRequestsDbException (error, e);
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+    }
+
+
+    private void checkIfExists (int result, String requestId, long startTime) throws MsoRequestsDbException {
+        if (result == 0) {
+            String error = "Request ID does not exist in MSO Requests DB: " + requestId;
+            LOGGER.error (MessageEnum.RA_DB_REQUEST_NOT_EXIST, requestId, "", "", MsoLogger.ErrorCode.DataError, error);
+            throw new MsoRequestsDbException (error);
+        }
+    }
+
+
+    @Override
+    public InfraActiveRequests getInfraRequest (String requestId) throws MsoRequestsDbException {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setLogContext (requestId, null);
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+
+        LOGGER.debug ("Call to MSO Infra RequestsDb adapter get method with request Id: " + requestId);
+
+        InfraActiveRequests request = null;
+        try {
+            session.beginTransaction ();
+            Query query = session.createQuery ("FROM InfraActiveRequests where requestId = :requestId OR clientRequestId = :requestId");
+            query.setParameter ("requestId", requestId);
+            request = (InfraActiveRequests) query.uniqueResult();
+        } catch (HibernateException e) {
+            String error = "Unable to retrieve MSO Infra Requests DB for Request ID "
+                           + requestId;
+            LOGGER.error (MessageEnum.RA_DB_REQUEST_NOT_EXIST, "Get Infra request", requestId, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error);
+            throw new MsoRequestsDbException (error, e);
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        return request;
+    }
+
+
+    /**
+     * Get SiteStatus by SiteName.
+     *
+     * @param siteName The unique name of the site
+     * @return Status of that site
+     */
+    public boolean getSiteStatus (String siteName) {
+        UUIDChecker.generateUUID (LOGGER);
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+
+        long startTime = System.currentTimeMillis ();
+        SiteStatus siteStatus = null;
+        LOGGER.debug ("Request database - get Site Status with Site name:" + siteName);
+        try {
+            String hql = "FROM SiteStatus WHERE siteName = :site_name";
+            Query query = session.createQuery (hql);
+            query.setParameter ("site_name", siteName);
+
+            siteStatus = (SiteStatus) query.uniqueResult ();
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+        }
+        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");
+            return siteStatus.getStatus();
+        }
+    }
+}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/RequestStatusType.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/RequestStatusType.java
new file mode 100644 (file)
index 0000000..706142f
--- /dev/null
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.07.24 at 11:49:17 AM EDT 
+//
+
+
+package org.openecomp.mso.adapters.requestsdb;
+
+
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for request-status-type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="request-status-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="COMPLETE"/>
+ *     &lt;enumeration value="FAILED"/>
+ *     &lt;enumeration value="IN_PROGRESS"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "request-status-type")
+@XmlEnum
+public enum RequestStatusType {
+
+    COMPLETE,
+    FAILED,
+    IN_PROGRESS;
+
+    public String value() {
+        return name();
+    }
+
+    public static RequestStatusType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/ResponseStatus.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/ResponseStatus.java
new file mode 100644 (file)
index 0000000..5b943e2
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.requestsdb;
+
+
+
+/*
+ * Enum for Status values returned by API Handler to Tail-F
+*/
+public enum ResponseStatus {
+       SENDING_FINAL_NOTIFY,
+       SUCCESS,
+       FAILED,
+       TIMEOUT 
+}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/Status.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/Status.java
new file mode 100644 (file)
index 0000000..0b4db4b
--- /dev/null
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.requestsdb;
+
+
+/*
+ * Enum for Status values returned by API Handler to Tail-F
+*/
+public enum Status {
+                    PENDING, INPROGRESS, COMPLETED, FAILED, TIMEOUT;
+
+    public boolean isFinished () {
+        switch (this) {
+            case COMPLETED:
+            case FAILED:
+            case TIMEOUT:
+                return true;
+            default:
+                return false;
+        }
+    }
+}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbException.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbException.java
new file mode 100644 (file)
index 0000000..8e4fcf4
--- /dev/null
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.requestsdb.exceptions;
+
+
+
+import javax.xml.ws.WebFault;
+
+/**
+ * This class simply extends Exception (without addition additional functionality)
+ * to provide an identifier for RequestsDB related exceptions on create, delete, query.
+ * 
+ *
+ */
+@WebFault (name="MsoRequestsDbException", faultBean="org.openecomp.mso.adapters.requestsdb.exceptions.MsoRequestsDbExceptionBean", targetNamespace="http://com.att.mso/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;
+       }
+}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbExceptionBean.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbExceptionBean.java
new file mode 100644 (file)
index 0000000..8701e5b
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.requestsdb.exceptions;
+
+
+import java.io.Serializable;
+
+/**
+ * Jax-WS Fault Bean for MsoRequestsDB Exception
+ */
+public class MsoRequestsDbExceptionBean implements Serializable {
+
+    private static final long serialVersionUID = 1360000062602372639L;
+
+    private String message;
+
+       public MsoRequestsDbExceptionBean () {}
+
+       public MsoRequestsDbExceptionBean (String message) {
+               this.message = message;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/resources/application.properties b/adapters/mso-requests-db-adapter/src/main/java/resources/application.properties
new file mode 100644 (file)
index 0000000..c934538
--- /dev/null
@@ -0,0 +1,28 @@
+###
+# ============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=========================================================
+###
+
+
+# -- welcome --
+welcomeTitle=JSF Blank Application
+
+welcomeHeading=Welcome!
+
+welcomeMessage=This is a JSF blank application. \
+       You can find the application.properties file with this message in the src/resources folder.
diff --git a/adapters/mso-sdnc-adapter/WebContent/META-INF/MANIFEST.MF b/adapters/mso-sdnc-adapter/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..bbf7aa0
--- /dev/null
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Dependencies: org.jboss.logging
+Class-Path: 
+
diff --git a/adapters/mso-sdnc-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml b/adapters/mso-sdnc-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..88d5024
--- /dev/null
@@ -0,0 +1,17 @@
+<jboss-deployment-structure>\r
+       <deployment>\r
+               <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->\r
+               <exclusions>\r
+                       <module name="org.apache.log4j" />\r
+                       <module name="org.slf4j" />\r
+                       <module name="org.slf4j.impl" />\r
+               </exclusions>\r
+               <dependencies>\r
+                           <module name="org.jboss.jandex" slot="main" />\r
+                <module name="org.javassist" slot="main" />\r
+                <module name="org.antlr" slot="main" />\r
+                <module name="org.dom4j" slot="main" />\r
+               </dependencies>\r
+       </deployment>\r
+</jboss-deployment-structure>\r
+\r
diff --git a/adapters/mso-sdnc-adapter/WebContent/WEB-INF/jboss-web.xml b/adapters/mso-sdnc-adapter/WebContent/WEB-INF/jboss-web.xml
new file mode 100644 (file)
index 0000000..fa0fe9b
--- /dev/null
@@ -0,0 +1,4 @@
+<jboss-web>
+       <context-root>adapters</context-root>
+       <security-domain>other</security-domain>
+</jboss-web>
\ No newline at end of file
diff --git a/adapters/mso-sdnc-adapter/WebContent/WEB-INF/web.xml b/adapters/mso-sdnc-adapter/WebContent/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..bb58197
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+  <display-name>mso-sdnc-adapter</display-name>
+  <welcome-file-list>
+    <welcome-file>check.html</welcome-file>
+  </welcome-file-list>
+  
+  <context-param>
+       <param-name>resteasy.jndi.resources</param-name>
+       <param-value>java:module/MsoPropertiesFactory,java:module/CloudConfigFactory</param-value>
+  </context-param>
+  <context-param>
+       <param-name>log.configuration</param-name>
+       <param-value>logback.sdnc.xml</param-value>
+  </context-param>
+  <context-param>
+       <param-name>mso.configuration</param-name>
+       <param-value>MSO_PROP_SDNC_ADAPTER=mso.sdnc.properties,MSO_PROP_TOPOLOGY=topology.properties</param-value>
+  </context-param>
+  <context-param>
+       <param-name>mso.cloud_config.configuration</param-name>
+       <param-value>cloud_config.json=2</param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.resources</param-name>
+    <param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.adapters.sdnc.notify.SDNCNotifyResource,org.openecomp.mso.adapters.sdnc.impl.SDNCAdapterRestImpl,org.openecomp.mso.MsoStatusHandler</param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.servlet.mapping.prefix</param-name>
+    <param-value>/rest</param-value>
+  </context-param>
+  <servlet>
+    <display-name>SDNCAdapter</display-name>
+    <servlet-name>SDNCAdapter</servlet-name>
+    <servlet-class>org.openecomp.mso.adapters.sdnc.impl.SDNCAdapterPortTypeImpl</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>SDNCAdapter</servlet-name>
+    <url-pattern>/SDNCAdapter</url-pattern>
+  </servlet-mapping>
+    <servlet>
+        <servlet-name>Resteasy</servlet-name>
+        <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Resteasy</servlet-name>
+        <url-pattern>/rest/*</url-pattern>
+    </servlet-mapping>
+
+    <filter>
+        <filter-name>LogFilter</filter-name>
+        <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>LogFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+    <listener>
+        <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
+    </listener>
+
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>RestRequests</web-resource-name>
+            <description>Rest Ingress Requests</description>
+            <url-pattern>/rest/logging/*</url-pattern>
+            <url-pattern>/rest/properties/*</url-pattern>
+            <url-pattern>/rest/MSORequest</url-pattern>
+            <http-method>POST</http-method>
+            <http-method>GET</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>MSO-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SDNCNotification</web-resource-name>
+            <description>Rest Async Notification from SDNC</description>
+            <url-pattern>/rest/SDNCNotify</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>SDNC-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SoapRequests</web-resource-name>
+            <description>Soap Ingress Requests</description>
+            <url-pattern>/SDNCAdapter</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>BPEL-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SiteStatus</web-resource-name>
+            <description>SiteStatus APIs</description>
+            <url-pattern>/rest/setStatus/*</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>SiteControl-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+
+    <login-config>
+        <auth-method>BASIC</auth-method>
+        <realm-name>ApplicationRealm</realm-name>
+    </login-config>
+    <security-role>
+        <role-name>SDNC-Client</role-name>
+    </security-role>
+    <security-role>
+        <role-name>MSO-Client</role-name>
+    </security-role>
+    <security-role>
+        <role-name>BPEL-Client</role-name>
+    </security-role>
+    <security-role>
+        <role-name>SiteControl-Client</role-name>
+    </security-role>
+</web-app>
diff --git a/adapters/mso-sdnc-adapter/WebContent/check.html b/adapters/mso-sdnc-adapter/WebContent/check.html
new file mode 100644 (file)
index 0000000..4549979
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="ISO-8859-1">
+<title>Health Check</title>
+</head>
+<body>
+Application ready
+</body>
+</html>
\ No newline at end of file
diff --git a/adapters/mso-sdnc-adapter/null/mso-config/uuid/uuid_null b/adapters/mso-sdnc-adapter/null/mso-config/uuid/uuid_null
new file mode 100644 (file)
index 0000000..1e11123
--- /dev/null
@@ -0,0 +1 @@
+57df7036-93ea-48bb-9667-f97098b99742
\ No newline at end of file
diff --git a/adapters/mso-sdnc-adapter/pom.xml b/adapters/mso-sdnc-adapter/pom.xml
new file mode 100644 (file)
index 0000000..11648aa
--- /dev/null
@@ -0,0 +1,104 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-sdnc-adapter</artifactId>
+       <packaging>war</packaging>
+       <name>mso-sdnc-adapter</name>
+       <description>mso sdnc adapter</description>
+
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+               
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.4</version>
+                               <configuration>
+                                       <warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                                       <attachClasses>true</attachClasses>
+                               </configuration>
+                       </plugin>
+<!--                   <plugin> -->
+<!--                           <groupId>org.jboss.as.plugins</groupId> -->
+<!--                           <artifactId>jboss-as-maven-plugin</artifactId> -->
+<!--                           <version>7.6.Final</version> -->
+<!--                           <configuration> -->
+<!--                                   <force>true</force> -->
+<!--                                   <port>${jboss.port}</port> -->
+<!--                                   <hostname>${jboss.hostname}</hostname> -->
+<!--                                   <username>${jboss.username}</username> -->
+<!--                                   <password>${jboss.password}</password> -->
+<!--                                   <ignoreMissingDeployment>true</ignoreMissingDeployment> -->
+<!--                                   <domain> -->
+<!--                                           <server-groups> -->
+<!--                                                   <server-group>server-group-one</server-group> -->
+<!--                                                   <server-group>server-group-two</server-group> -->
+<!--                                           </server-groups> -->
+<!--                                   </domain> -->
+<!--                                   <fileNames> -->
+<!--                                           <fileName>target/${project.build.finalName}.${project.packaging}</fileName> -->
+<!--                                   </fileNames> -->
+<!--                           </configuration> -->
+<!--                           <executions> -->
+<!--                                   <execution> -->
+<!--                                           <id>undeploy</id> -->
+<!--                                           <phase>clean</phase> -->
+<!--                                           <goals> -->
+<!--                                                   <goal>undeploy</goal> -->
+<!--                                           </goals> -->
+<!--                                   </execution> -->
+<!--                                   <execution> -->
+<!--                                           <id>deploy</id> -->
+<!--                                           <phase>install</phase> -->
+<!--                                           <goals> -->
+<!--                                                   <goal>deploy</goal> -->
+<!--                                           </goals> -->
+<!--                                   </execution> -->
+<!--                           </executions> -->
+<!--                   </plugin> -->
+               </plugins>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-adapter-utils</artifactId>
+                       <version>${project.version}</version>
+                       
+               </dependency>
+               <dependency>
+                       <groupId>javax</groupId>
+                       <artifactId>javaee-web-api</artifactId>
+                       <version>6.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.spec.javax.ejb</groupId>
+                       <artifactId>jboss-ejb-api_3.2_spec</artifactId>
+                       <version>1.0.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.ejb3</groupId>
+                       <artifactId>jboss-ejb3-ext-api</artifactId>
+                       <version>2.2.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>status-control</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+        <dependency>
+            <groupId>org.openecomp.mso.adapters</groupId>
+            <artifactId>mso-adapters-rest-interface</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/adapters/mso-sdnc-adapter/readme b/adapters/mso-sdnc-adapter/readme
new file mode 100644 (file)
index 0000000..34c09fd
--- /dev/null
@@ -0,0 +1,67 @@
+SDNC Adapter is a conduit between MSO BPEL and SDNC
+SOAP requests from BPEL are sent as REST requests to SDNC 
+BPEL get a SYNC response (with no data) right away
+On SDNC SYNC response, BPEL is  sent an ASYNC (callback) response
+On SDNC ASYNC responses/notifications, BPEL is sent ASYNC responses
+Failure to send request to SDNC results in header to BPEL with respCode(4xx,5xx) and msg
+Success in sending requests to SDNC results in header to BPEL with 2xx respCode to BPEL and data received from SDNC 
+SDNC data might have failures or success
+
+SDNCAdapter behaviour on being deployed in JBOSS 
+-------------------------------------------------
+http://host:port/ - JBOSS Default Msg (Welcome to JBoss EAP 6)
+
+http://host:port/adapters/[check.html] - Application Ready
+
+http://host:port/adapters/rest/[anything] - SDNC Adapter Rest Services [: Anything]
+
+http://host:port/adapters/rest/properties/show - Lists all the properties loaded
+       org.openecomp.mso.adapters.sdnc.bpelcauth=avosAdmin:jboss123
+       org.openecomp.mso.adapters.sdnc.sdncconnecttime=2000
+       org.openecomp.mso.adapters.sdnc.myurl=http://192.20.205.182:8380/adapters/rest/SDNCNotify
+       org.openecomp.mso.adapters.sdnc.sdncurl=https://odl.node01.it.app.sdn.labs.att.com:8443/restconf/operations/L3SDN-API:
+       org.openecomp.mso.adapters.sdnc.sdncauth=admin:admin
+       org.openecomp.mso.adapters.sdnc.bpelurl=http://NJCDTL21RA1926.ITServices.sbc.com:8088/mockSDNCCallbackAdapterSoapHttpBinding?wsdl
+       org.openecomp.mso.adapters.sdnc.sdncreadtime=5000
+       
+http://host:port/adapters/rest/properties/reload - Reloads all the properties  
+       from $configDir/$configFile : /etc/ecomp/mso/config/mso.sdnc.properties
+       
+http://host:port/adapters/rest/logging/setLevel//{logContext}/{level}") - changes application loglevel
+ where level is one of (ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF)
+ e.g
+       http://192.20.205.182:8380/adapters/rest/logging/setLevel/ROOT/INFO
+               log Level set to: INFO for 
+       http://192.20.205.182:8380/adapters/rest/logging/setLevel/ROOT/INFO
+               log Level set to: DEBUG for com.att
+       http://192.20.205.182:8380/adapters/rest/logging/setLevel/garbage/DEBUG
+               Unknown logger: garbage
+               
+http://host:port/adapters/rest/logging/loggers - shows all the loggers  
+       :DEBUG (DEBUG)
+       com.att:INFO (INFO)
+       org.openecomp.mso:DEBUG (DEBUG)
+       org.openecomp.mso.adapters.sdnc.impl.SDNCAdapterPortTypeImpl:null (DEBUG)
+       org.openecomp.mso.adapters.sdnc.impl.SDNCRestClient:null (DEBUG)
+       org.openecomp.mso.adapters.sdnc.client.SDNCCallbackAdapterService:null (DEBUG)
+       org.openecomp.mso.adapters.sdnc.client.SDNCAdapterCallbackRequest:null (DEBUG)
+       org.openecomp.mso.adapters.sdnc.SDNCAdapterRequest:null (DEBUG)
+       org.openecomp.mso.adapters.sdnc.notify.SDNCNotifyResource:null (DEBUG)
+       org.openecomp.mso.adapters.vnf.MsoVnfAdapterImpl:null (DEBUG)
+       org.openecomp.mso.adapters.network.MsoNetworkAdapterImpl:null (DEBUG)
+       org.openecomp.mso.logger.MsoLoggingServlet:null (DEBUG)
+       org.openecomp.mso.logger.MsoLogger:null (DEBUG)
+       org.openecomp.mso.properties.MsoProperties:null (DEBUG)
+       org.openecomp.mso.properties.MsoPropertyInitializer:null (DEBUG)
+       org.jboss.resteasy.plugins.providers.YamlProvider:null (DEBUG)
+       org.jboss.resteasy.plugins.providers.RegisterBuiltin:null (DEBUG)
+       org.jboss.resteasy.plugins.providers.DocumentProvider:null (DEBUG)
+       org.jboss.resteasy.plugins.providers.IIOImageProvider:null (DEBUG)
+       org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap:null (DEBUG)
+       org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher:null (DEBUG)
+       org.jboss.resteasy.spi.ResteasyDeployment:null (DEBUG)
+       org.jboss.resteasy.core.SynchronousDispatcher:null (DEBUG)
+       org.jboss.resteasy.core.ResourceMethodRegistry:null (DEBUG)
+       org.jboss.resteasy.util.PickConstructor:null (DEBUG)
+       
+SDNC Adapter will use ActiveRequests DB to track SDNC_CALLBACK_BPEL_URL
\ No newline at end of file
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/ObjectFactory.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/ObjectFactory.java
new file mode 100644 (file)
index 0000000..1f63eb8
--- /dev/null
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc;
+
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.openecomp.mso.adapters.sdnc package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups.  Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.mso.adapters.sdnc
+     *
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link RequestHeader }
+     *
+     */
+    public RequestHeader createRequestHeader() {
+        return new RequestHeader();
+    }
+
+    /**
+     * Create an instance of {@link SDNCAdapterResponse }
+     *
+     */
+    public SDNCAdapterResponse createSDNCAdapterResponse() {
+        return new SDNCAdapterResponse();
+    }
+
+    /**
+     * Create an instance of {@link SDNCAdapterRequest }
+     *
+     */
+    public SDNCAdapterRequest createSDNCAdapterRequest() {
+        return new SDNCAdapterRequest();
+    }
+
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/RequestHeader.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/RequestHeader.java
new file mode 100644 (file)
index 0000000..c26d48b
--- /dev/null
@@ -0,0 +1,219 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="SvcInstanceId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="SvcAction" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="SvcOperation" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="CallbackUrl" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+//BPEL to SDNCAdapter request header
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "svcInstanceId",
+    "svcAction",
+    "svcOperation",
+    "callbackUrl",
+    "msoAction"
+})
+@XmlRootElement(name = "RequestHeader")
+public class RequestHeader {
+
+    @XmlElement(name = "RequestId", required = true)
+    protected String requestId;
+    @XmlElement(name = "SvcInstanceId")
+    protected String svcInstanceId;
+    @XmlElement(name = "SvcAction", required = true)
+    protected String svcAction;
+    @XmlElement(name = "SvcOperation", required = true)
+    protected String svcOperation;
+    @XmlElement(name = "CallbackUrl", required = true)
+    protected String callbackUrl;
+    @XmlElement(name = "MsoAction")
+    protected String msoAction;
+
+    /**
+     * Gets the value of the requestId property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    public String getSvcInstanceId() {
+               return svcInstanceId;
+       }
+
+       public void setSvcInstanceId(String svcInstanceId) {
+               this.svcInstanceId = svcInstanceId;
+       }
+
+       /**
+     * Gets the value of the svcAction property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getSvcAction() {
+        return svcAction;
+    }
+
+    /**
+     * Sets the value of the svcAction property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setSvcAction(String value) {
+        this.svcAction = value;
+    }
+
+    /**
+     * Gets the value of the svcOperation property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getSvcOperation() {
+        return svcOperation;
+    }
+
+    /**
+     * Sets the value of the svcOperation property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setSvcOperation(String value) {
+        this.svcOperation = value;
+    }
+
+    /**
+     * Gets the value of the callbackUrl property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getCallbackUrl() {
+        return callbackUrl;
+    }
+
+    /**
+     * Sets the value of the callbackUrl property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setCallbackUrl(String value) {
+        this.callbackUrl = value;
+    }
+
+    /**
+     * Gets the value of the callbackUrl property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getMsoAction() {
+        return msoAction;
+    }
+
+    /**
+     * Sets the value of the callbackUrl property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setMsoAction(String value) {
+        this.msoAction = value;
+    }
+
+
+       @Override
+       public String toString() {
+               return "RequestHeader [requestId=" + requestId +
+                               ", svcInstanceId=" + svcInstanceId +
+                               ", svcAction=" + svcAction +
+                               ", svcOperation=" + svcOperation +
+                               ", callbackUrl=" + callbackUrl +
+                               ", msoAction=" + msoAction + "]";
+       }
+
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterPortType.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterPortType.java
new file mode 100644 (file)
index 0000000..254fea0
--- /dev/null
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc;
+
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+
+/**
+ * This class was generated by Apache CXF 2.7.11.redhat-3
+ * 2015-01-27T18:25:50.914-05:00
+ * Generated source version: 2.7.11.redhat-3
+ *
+ */
+//BPEL SDNCAdapter SOAP WebService - impl class in impl pkg
+@WebService(targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1", name = "SDNCAdapterPortType")
+@XmlSeeAlso({ObjectFactory.class})
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface SDNCAdapterPortType {
+
+    @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterResponse")
+    @WebMethod(operationName = "SDNCAdapter")
+    public SDNCAdapterResponse sdncAdapter(
+        @WebParam(partName = "SDNCAdapterRequest", name = "SDNCAdapterRequest", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+        SDNCAdapterRequest sdncAdapterRequest
+    );
+
+    @WebMethod
+       public void healthCheck();
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterRequest.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterRequest.java
new file mode 100644 (file)
index 0000000..6b75949
--- /dev/null
@@ -0,0 +1,129 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+import org.openecomp.mso.adapters.sdnc.impl.Utils;
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://domain2.att.com/workflow/sdnc/adapter/schema/v1}RequestHeader"/>
+ *         &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+//BPEL to SDNCAdapter request
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestHeader",
+    "requestData"
+})
+@XmlRootElement(name = "SDNCAdapterRequest")
+public class SDNCAdapterRequest {
+
+    @XmlElement(name = "RequestHeader", required = true)
+    protected RequestHeader requestHeader;
+    @XmlElement(name = "RequestData", required = true)
+    protected Object requestData;
+
+    /**
+     * Gets the value of the requestHeader property.
+     *
+     * @return
+     *     possible object is
+     *     {@link RequestHeader }
+     *
+     */
+    public RequestHeader getRequestHeader() {
+        return requestHeader;
+    }
+
+    /**
+     * Sets the value of the requestHeader property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link RequestHeader }
+     *
+     */
+    public void setRequestHeader(RequestHeader value) {
+        this.requestHeader = value;
+    }
+
+    /**
+     * Gets the value of the requestData property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *
+     */
+    public Object getRequestData() {
+        return requestData;
+    }
+
+    /**
+     * Sets the value of the requestData property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *
+     */
+    public void setRequestData(Object value) {
+        this.requestData = value;
+    }
+
+       @Override
+       public String toString() {
+
+               String rd = "";
+               if (requestData != null)
+               {
+                       Node node = (Node) requestData;
+                       Document doc = node.getOwnerDocument();
+                       rd = Utils.domToStr(doc);
+               }
+               return "SDNCAdapterRequest [requestHeader=" + requestHeader.toString()
+                               + ", requestData=" + rd + "]";
+       }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterResponse.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterResponse.java
new file mode 100644 (file)
index 0000000..edbd329
--- /dev/null
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+//SDNCAdapter to BPEL Sync Response(ACK) - async response(s) follow
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+@XmlRootElement(name = "SDNCAdapterResponse")
+public class SDNCAdapterResponse {
+
+
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterService.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/SDNCAdapterService.java
new file mode 100644 (file)
index 0000000..0b63ad6
--- /dev/null
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc;
+
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+
+//import org.openecomp.mso.adapters.sdnc.impl.MsoLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+
+/**
+ * This class was generated by Apache CXF 2.7.11.redhat-3
+ * 2015-01-27T18:25:50.994-05:00
+ * Generated source version: 2.7.11.redhat-3
+ *
+ */
+//BPEL SDNCAdapter SOAP WebService
+@WebServiceClient(name = "SDNCAdapterService",
+                  wsdlLocation = "main/resources/SDNCAdapter.wsdl",
+                  targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1")
+public class SDNCAdapterService extends Service {
+
+       private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+
+    public final static URL WSDL_LOCATION;
+
+    public final static QName SERVICE = new QName("http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterService");
+    public final static QName SDNCAdapterSoapHttpPort = new QName("http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1", "SDNCAdapterSoapHttpPort");
+    static {
+        URL wsdlUrl = null;
+        try {
+               wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCAdapter.wsdl");
+               //wsdlUrl = SDNCAdapterService.class.getClassLoader().getResource("SDNCAdapter.wsdl");
+        } catch (Exception e) {
+            logger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCAdapter.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");
+       } else {
+               try {
+                               logger.info(MessageEnum.RA_PRINT_URL, "SDNCAdpater.wsdl", wsdlUrl.toURI().toString(), "", "");
+                       } catch (Exception e) {
+                               logger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - print URL", e);
+                       }
+       }
+        WSDL_LOCATION = wsdlUrl;
+    }
+
+    public SDNCAdapterService(URL wsdlLocation) {
+        super(wsdlLocation, SERVICE);
+    }
+
+    public SDNCAdapterService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public SDNCAdapterService() {
+        super(WSDL_LOCATION, SERVICE);
+    }
+
+    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
+    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
+    //compliant code instead.
+    public SDNCAdapterService(WebServiceFeature ... features) {
+        super(WSDL_LOCATION, SERVICE, features);
+    }
+
+    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
+    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
+    //compliant code instead.
+    public SDNCAdapterService(URL wsdlLocation, WebServiceFeature ... features) {
+        super(wsdlLocation, SERVICE, features);
+    }
+
+    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
+    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
+    //compliant code instead.
+    public SDNCAdapterService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
+        super(wsdlLocation, serviceName, features);
+    }
+
+    /**
+     *
+     * @return
+     *     returns SDNCAdapterPortType
+     */
+    @WebEndpoint(name = "SDNCAdapterSoapHttpPort")
+    public SDNCAdapterPortType getSDNCAdapterSoapHttpPort() {
+        return super.getPort(SDNCAdapterSoapHttpPort, SDNCAdapterPortType.class);
+    }
+
+    /**
+     *
+     * @param features
+     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
+     * @return
+     *     returns SDNCAdapterPortType
+     */
+    @WebEndpoint(name = "SDNCAdapterSoapHttpPort")
+    public SDNCAdapterPortType getSDNCAdapterSoapHttpPort(WebServiceFeature... features) {
+        return super.getPort(SDNCAdapterSoapHttpPort, SDNCAdapterPortType.class, features);
+    }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeader.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeader.java
new file mode 100644 (file)
index 0000000..a49f55b
--- /dev/null
@@ -0,0 +1,154 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.client;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="ResponseCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="ResponseMessage" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+//SDNCAdapter to BPEL Async response header
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "responseCode",
+    "responseMessage"
+})
+@XmlRootElement(name = "CallbackHeader")
+public class CallbackHeader {
+
+    @XmlElement(name = "RequestId", required = true)
+    protected String requestId;
+    @XmlElement(name = "ResponseCode", required = true)
+    protected String responseCode;
+    @XmlElement(name = "ResponseMessage", required = true)
+    protected String responseMessage;
+
+    public CallbackHeader() {
+    }
+
+    public CallbackHeader(String reqId, String respCode, String respMsg) {
+       this.requestId = reqId;
+       this.responseCode = respCode;
+       this.responseMessage  = respMsg;
+    }
+
+    /**
+     * Gets the value of the requestId property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the responseCode property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getResponseCode() {
+        return responseCode;
+    }
+
+    /**
+     * Sets the value of the responseCode property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setResponseCode(String value) {
+        this.responseCode = value;
+    }
+
+    /**
+     * Gets the value of the responseMessage property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getResponseMessage() {
+        return responseMessage;
+    }
+
+    /**
+     * Sets the value of the responseMessage property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setResponseMessage(String value) {
+        this.responseMessage = value;
+    }
+
+       @Override
+       public String toString() {
+               return "CallbackHeader [requestId=" + requestId + ", responseCode="
+                               + responseCode + ", responseMessage=" + responseMessage + "]";
+       }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/ObjectFactory.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/ObjectFactory.java
new file mode 100644 (file)
index 0000000..6e7e599
--- /dev/null
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.client;
+
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.openecomp.mso.adapters.sdnc.client package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.mso.adapters.sdnc.client
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+
+    /**
+     * Create an instance of {@link SDNCAdapterCallbackRequest }
+     * 
+     */
+    public SDNCAdapterCallbackRequest createSDNCAdapterCallbackRequest() {
+        return new SDNCAdapterCallbackRequest();
+    }
+
+    /**
+     * Create an instance of {@link CallbackHeader }
+     * 
+     */
+    public CallbackHeader createCallbackHeader() {
+        return new CallbackHeader();
+    }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCAdapterCallbackRequest.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCAdapterCallbackRequest.java
new file mode 100644 (file)
index 0000000..fd16e47
--- /dev/null
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.client;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+import java.io.StringWriter;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://domain2.att.com/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
+ *         &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+//SDNCAdapter to BPEL Async response
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "callbackHeader",
+    "requestData"
+})
+@XmlRootElement(name = "SDNCAdapterCallbackRequest")
+public class SDNCAdapterCallbackRequest {
+
+    @XmlElement(name = "CallbackHeader", required = true)
+    protected CallbackHeader callbackHeader;
+    @XmlElement(name = "RequestData")
+    protected Object requestData;
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+
+    /**
+     * Gets the value of the callbackHeader property.
+     *
+     * @return
+     *     possible object is
+     *     {@link CallbackHeader }
+     *
+     */
+    public CallbackHeader getCallbackHeader() {
+        return callbackHeader;
+    }
+
+    /**
+     * Sets the value of the callbackHeader property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link CallbackHeader }
+     *
+     */
+    public void setCallbackHeader(CallbackHeader value) {
+        this.callbackHeader = value;
+    }
+
+    /**
+     * Gets the value of the requestData property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *
+     */
+    public Object getRequestData() {
+        return requestData;
+    }
+
+    /**
+     * Sets the value of the requestData property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *
+     */
+    public void setRequestData(Object value) {
+        this.requestData = value;
+    }
+
+       @Override
+       public String toString() {
+               try {
+                       JAXBContext ctx = JAXBContext.newInstance("org.openecomp.mso.adapters.sdnc.client");
+                       Marshaller m = ctx.createMarshaller();
+                       m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+                       m.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+                       StringWriter w = new StringWriter();
+                       m.marshal(this, w);
+                       return (w.toString());
+               }
+               catch (Exception e)
+               {
+                       msoLogger.error(MessageEnum.RA_MARSHING_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception - MARSHING_ERROR", e);
+               }
+               return("");
+       }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCCallbackAdapterPortType.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCCallbackAdapterPortType.java
new file mode 100644 (file)
index 0000000..6818e67
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.client;
+
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import org.openecomp.mso.adapters.sdnc.SDNCAdapterResponse;
+
+
+/**
+ * This class was generated by Apache CXF 2.7.11.redhat-3
+ * 2015-01-28T11:07:01.997-05:00
+ * Generated source version: 2.7.11.redhat-3
+ *
+ */
+//SDNCAdapter to BPEL Async response WEB Service
+@WebService(targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1", name = "SDNCCallbackAdapterPortType")
+@XmlSeeAlso({ObjectFactory.class})
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface SDNCCallbackAdapterPortType {
+
+    @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
+    @WebMethod(operationName = "SDNCAdapterCallback")
+    public SDNCAdapterResponse sdncAdapterCallback(
+        @WebParam(partName = "SDNCAdapterCallbackRequest", name = "SDNCAdapterCallbackRequest", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+        SDNCAdapterCallbackRequest sdncAdapterCallbackRequest
+    );
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCCallbackAdapterService.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/SDNCCallbackAdapterService.java
new file mode 100644 (file)
index 0000000..6fa8e03
--- /dev/null
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.client;
+
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * This class was generated by Apache CXF 2.7.11.redhat-3
+ * 2015-01-28T11:07:02.074-05:00
+ * Generated source version: 2.7.11.redhat-3
+ *
+ */
+//SDNCAdapter to BPEL Async response WEB Service
+@WebServiceClient(name = "SDNCCallbackAdapterService",
+                  wsdlLocation = "main/resources/SDNCCallbackAdapter.wsdl",
+                  targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1")
+public class SDNCCallbackAdapterService extends Service {
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+
+    public final static URL WSDL_LOCATION;
+    public final static QName SERVICE = new QName("http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1", "SDNCCallbackAdapterService");
+    public final static QName SDNCCallbackAdapterSoapHttpPort = new QName("http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1", "SDNCCallbackAdapterSoapHttpPort");
+    static {
+        URL wsdlUrl = null;
+        try {
+               wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCCallbackAdapter.wsdl");
+               //wsdlUrl = SDNCCallbackAdapterService.class.getClassLoader().getResource("SDNCCallbackAdapter.wsdl");
+        } catch (Exception e) {
+            msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCCallbackAdapter.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");
+       } else {
+               try {
+                       msoLogger.info(MessageEnum.RA_PRINT_URL, "SDNCCallbackAdapter.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);
+                       }
+       }
+        WSDL_LOCATION = wsdlUrl;
+    }
+
+    public SDNCCallbackAdapterService(URL wsdlLocation) {
+        super(wsdlLocation, SERVICE);
+    }
+
+    public SDNCCallbackAdapterService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public SDNCCallbackAdapterService() {
+        super(WSDL_LOCATION, SERVICE);
+    }
+
+    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
+    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
+    //compliant code instead.
+    public SDNCCallbackAdapterService(WebServiceFeature ... features) {
+        super(WSDL_LOCATION, SERVICE, features);
+    }
+
+    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
+    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
+    //compliant code instead.
+    public SDNCCallbackAdapterService(URL wsdlLocation, WebServiceFeature ... features) {
+        super(wsdlLocation, SERVICE, features);
+    }
+
+    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
+    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
+    //compliant code instead.
+    public SDNCCallbackAdapterService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
+        super(wsdlLocation, serviceName, features);
+    }
+
+    /**
+     *
+     * @return
+     *     returns SDNCCallbackAdapterPortType
+     */
+    @WebEndpoint(name = "SDNCCallbackAdapterSoapHttpPort")
+    public SDNCCallbackAdapterPortType getSDNCCallbackAdapterSoapHttpPort() {
+        return super.getPort(SDNCCallbackAdapterSoapHttpPort, SDNCCallbackAdapterPortType.class);
+    }
+
+    /**
+     *
+     * @param features
+     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
+     * @return
+     *     returns SDNCCallbackAdapterPortType
+     */
+    @WebEndpoint(name = "SDNCCallbackAdapterSoapHttpPort")
+    public SDNCCallbackAdapterPortType getSDNCCallbackAdapterSoapHttpPort(WebServiceFeature... features) {
+        return super.getPort(SDNCCallbackAdapterSoapHttpPort, SDNCCallbackAdapterPortType.class, features);
+    }
+
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/package-info.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/package-info.java
new file mode 100644 (file)
index 0000000..0d6f900
--- /dev/null
@@ -0,0 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.mso.adapters.sdnc.client;
+
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/Constants.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/Constants.java
new file mode 100644 (file)
index 0000000..6cc0ecb
--- /dev/null
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.impl;
+
+
+public interface Constants {
+
+               public static final String BPEL_URL_PROP = "org.openecomp.mso.adapters.sdnc.bpelurl";
+               public static final String DEFAULT_BPEL_URL = "http://msobpel.mtcnj.aic.cip.att.com:8080//active-bpel/services/SDNCAdapterCallbackV1";
+
+               public static final String MY_URL_PROP = "org.openecomp.mso.adapters.sdnc.myurl";
+               public static final String DEFAULT_MY_URL = "https://msojra.mtcnj.aic.cip.att.com:8443/adapters/rest/SDNCNotify";
+
+               public static final String SDNC_AUTH_PROP = "org.openecomp.mso.adapters.sdnc.sdncauth";
+               public static final String DEFAULT_SDNC_AUTH = "406B2AE613211B6FB52466DE6E1769AC";
+
+               public static final String DEFAULT_BPEL_AUTH = "05FDA034C27D1CA51AAB8FAE512EDE45241E16FC8C137D292AA3A964431C82DB";
+           public static final String BPEL_AUTH_PROP = "org.openecomp.mso.adapters.sdnc.bpelauth";
+
+
+               public static final String SDNC_SVCCFGRESP_ROOT = "input";
+               public static final String SDNC_REQ_ID = "/svc-request-id";
+               public static final String SDNC_RESP_CODE = "/response-code";
+               public static final String SDNC_RESP_MSG = "/response-message";
+               public static final String SDNC_CONNECTTIME_PROP = "org.openecomp.mso.adapters.sdnc.sdncconnecttime";
+               public static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+
+               public static final String REQUEST_TUNABLES = "org.openecomp.mso.adapters.sdnc";
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunables.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunables.java
new file mode 100644 (file)
index 0000000..6c8c881
--- /dev/null
@@ -0,0 +1,223 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.impl;
+
+
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+import org.openecomp.mso.logger.MessageEnum;
+public class RequestTunables {
+
+       private MsoPropertiesFactory msoPropertiesFactory;
+       
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+       private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger();
+       public static final String MSO_PROP_SDNC_ADAPTER="MSO_PROP_SDNC_ADAPTER";
+
+       //criteria
+       private String reqId = "";
+       private String msoAction = "";
+       private String operation = "";
+       private String action = "";
+
+       //tunables
+       private String reqMethod = "POST";
+       private String sdncUrl = null;
+       private String timeout = "60000";
+       private String headerName = "sdnc-request-header";
+       private String namespace = "";
+       private String asyncInd = "N"; //future use
+
+       private String sdncaNotificationUrl = null;
+
+       public RequestTunables(String reqId, String msoAction, String operation, String action, MsoPropertiesFactory msoPropFactory) {
+               super();
+               msoPropertiesFactory = msoPropFactory;
+               if (reqId != null) {
+            this.reqId = reqId;
+        }
+               if (msoAction != null) {
+            this.msoAction = msoAction;
+        }
+               if (operation != null) {
+            this.operation = operation;
+        }
+               if (action != null) {
+            this.action = action;
+        }
+       }
+
+       public String getReqId() {
+               return reqId;
+       }
+       public void setReqId(String reqId) {
+               this.reqId = reqId;
+       }
+       public String getReqMethod() {
+               return reqMethod;
+       }
+       public void setReqMethod(String reqMethod) {
+               this.reqMethod = reqMethod;
+       }
+       public String getMsoAction() {
+               return msoAction;
+       }
+       public void setMsoAction(String msoAction) {
+               this.msoAction = msoAction;
+       }
+       public String getAction() {
+               return action;
+       }
+       public void setAction(String action) {
+               this.action = action;
+       }
+       public String getOperation() {
+               return operation;
+       }
+       public void setOperation(String operation) {
+               this.operation = operation;
+       }
+       public String getSdncUrl() {
+               return sdncUrl;
+       }
+       public void setSdncUrl(String sdncUrl) {
+               this.sdncUrl = sdncUrl;
+       }
+       public String getTimeout() {
+               return timeout;
+       }
+       public void setTimeout(String timeout) {
+               this.timeout = timeout;
+       }
+       public String getAsyncInd() {
+               return asyncInd;
+       }
+       public void setAsyncInd(String asyncInd) {
+               this.asyncInd = asyncInd;
+       }
+       public String getHeaderName() {
+               return headerName;
+       }
+       public void setHeaderName(String headerName) {
+               this.headerName = headerName;
+       }
+
+
+       public String getSdncaNotificationUrl() {
+               return sdncaNotificationUrl;
+       }
+
+       public void setSdncaNotificationUrl(String sdncaNotificationUrl) {
+               this.sdncaNotificationUrl = sdncaNotificationUrl;
+       }
+
+       public String getNamespace() {
+               return namespace;
+       }
+
+       public void setNamespace(String namespace) {
+               this.namespace = namespace;
+       }
+
+       @Override
+       public String toString() {
+               return "RequestTunables [reqId=" + reqId + ", msoAction=" + msoAction
+                               + ", operation=" + operation + ", action=" + action
+                               + ", reqMethod=" + reqMethod + ", sdncUrl=" + sdncUrl
+                               + ", timeout=" + timeout + ", headerName=" + headerName
+                               + ", sdncaNotificationUrl=" + sdncaNotificationUrl
+                               + ", namespace=" + namespace + "]";
+       }
+
+       public void setTunables()
+       {
+               String error = null;
+               String key = null;
+               if ("query".equals(action)) { //due to variable format for operation eg services/layer3-service-list/8fe4ba4f-35cf-4d9b-a04a-fd3f5d4c5cc9
+                       key = Constants.REQUEST_TUNABLES + "." + msoAction + ".." + action;
+                       msoLogger.debug("Generated key: " + key);
+               }
+               else if ("put".equals(action)  || "restdelete".equals(action)) { //due to variable format for operation eg services/layer3-service-list/8fe4ba4f-35cf-4d9b-a04a-fd3f5d4c5cc9
+                       key = Constants.REQUEST_TUNABLES + "..." + action;
+                       msoLogger.debug("Generated key: " + key);
+               } else {
+                       key = Constants.REQUEST_TUNABLES + "." + msoAction + "." + operation +"."  + action;
+                       msoLogger.debug("Generated key: " + key);
+               }
+
+               String value;
+               try {
+                       value = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_SDNC_ADAPTER).getProperty(key, "");
+               } catch (MsoPropertiesException e) {
+                       msoLogger.error (MessageEnum.LOAD_PROPERTIES_FAIL, "Unknown. Mso Properties ID not found in cache: " + MSO_PROP_SDNC_ADAPTER, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - Mso Properties ID not found in cache", e);
+                       value="";
+               }
+
+               if (value != null && value.length() > 0) {
+
+                       String[] parts = value.split("\\|"); //escape pipe
+                       if (parts.length < 3) {
+                               msoLogger.warn(MessageEnum.RA_SDNC_INVALID_CONFIG, key, value, "SDNC", "", MsoLogger.ErrorCode.DataError, "Invalid config");
+                       }
+
+                       for (int i = 0; i < parts.length; i++) {
+                               if (i == 0) {
+                                       reqMethod = parts[i];
+                                       msoLogger.debug("Request Method is set to: " + reqMethod);
+                               } else if (i == 1) {
+                                       timeout = parts[i];
+                                       msoLogger.debug("Timeout is set to: " + timeout);
+                               } else if (i == 2) {
+                                       sdncUrl = SDNCAdapterPortTypeImpl.getProperty(Constants.REQUEST_TUNABLES + "." + parts[i], "",msoPropertiesFactory);
+                                       if (operation != null && sdncUrl != null) {
+                                               sdncUrl = sdncUrl  + operation;
+                                       }
+                                       msoLogger.debug("SDNC Url is set to: " + sdncUrl);
+                               } else if  (i == 3) {
+                                       headerName = parts[i];
+                                       msoLogger.debug("HeaderName is set to: " + headerName);
+                               } else if  (i == 4) {
+                                       namespace = parts[i];
+                                       msoLogger.debug("NameSpace is set to: " + namespace);
+                               } else if  (i == 5) {
+                                       asyncInd = parts[i];
+                                       msoLogger.debug("AsyncInd is set to: " + asyncInd);
+                               }
+                       }
+
+                       if (sdncUrl == null) {
+                               error = "Invalid configuration, sdncUrl required for:" + key + " value:" + value;
+                       }
+               } else {
+                       error = "Missing configuration for:" + key;
+               }
+               if (error != null) {
+                       msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, key, "SDNC", "", MsoLogger.ErrorCode.DataError, "Missing config param");
+                       alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+               }
+               msoLogger.debug ("RequestTunables Key:" + key + " Value:" + value + " Tunables:" + this.toString());
+               return;
+       }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java
new file mode 100644 (file)
index 0000000..887c0a9
--- /dev/null
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.impl;
+
+import javax.annotation.PostConstruct;
+import javax.jws.WebService;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.mso.adapters.sdnc.SDNCAdapterPortType;
+import org.openecomp.mso.adapters.sdnc.SDNCAdapterRequest;
+import org.openecomp.mso.adapters.sdnc.SDNCAdapterResponse;
+import org.openecomp.mso.adapters.sdnc.util.SDNCRequestIdUtil;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+//BPEL SDNCAdapter SOAP Web Service implementation
+@WebService(serviceName = "SDNCAdapterService", endpointInterface = "org.openecomp.mso.adapters.sdnc.SDNCAdapterPortType", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1")
+public class SDNCAdapterPortTypeImpl implements SDNCAdapterPortType {
+
+       private MsoPropertiesFactory msoPropertiesFactory=new MsoPropertiesFactory();
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+       private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger();
+       private static final String LOG_SERVICE_NAME = "MSO-BPMN:MSO-SDNCAdapter.";
+       private static final String LOG_REPLY_NAME = "MSO-SDNCAdapter:MSO-BPMN.";
+       public static final String MSO_PROP_SDNC_ADAPTER="MSO_PROP_SDNC_ADAPTER";
+
+       @PostConstruct
+       public void init () {
+               msoLogger.info(MessageEnum.RA_INIT_SDNC_ADAPTER, "SDNC", "SDNCAdapterPortType");
+       }
+
+       /**
+        * Health Check web method.  Does nothing but return to show the adapter is deployed.
+        */
+       @Override
+       public void healthCheck ()
+       {
+               msoLogger.debug("Health check call in SDNC Adapter");
+       }
+
+       public static String getProperty(String key, String defaultValue, MsoPropertiesFactory msoPropertiesFactoryp) {
+               String value;
+               try {
+                       value = msoPropertiesFactoryp.getMsoJavaProperties(MSO_PROP_SDNC_ADAPTER).getProperty(key, defaultValue);
+               } catch (MsoPropertiesException e) {
+                       msoLogger.error (MessageEnum.NO_PROPERTIES, "Unknown. Mso Properties ID not found in cache: " + MSO_PROP_SDNC_ADAPTER, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - Mso Properties ID not found in cache", e);
+                       return null;
+               }
+               msoLogger.debug("Config read for " + MSO_PROP_SDNC_ADAPTER + " - key:" + key + " value:" + value);
+               return value;
+       }
+
+       @Override
+       public SDNCAdapterResponse sdncAdapter(SDNCAdapterRequest bpelRequest) {
+               String bpelReqId = bpelRequest.getRequestHeader().getRequestId();
+               String callbackUrl = bpelRequest.getRequestHeader().getCallbackUrl();
+               long startTime = System.currentTimeMillis ();
+               MsoLogger.setLogContext(SDNCRequestIdUtil.getSDNCOriginalRequestId (bpelReqId), bpelRequest.getRequestHeader().getSvcInstanceId());
+               MsoLogger.setServiceName (bpelRequest.getRequestHeader().getSvcAction());
+               msoLogger.info(MessageEnum.RA_RECEIVE_BPEL_REQUEST, bpelReqId, callbackUrl, "SDNC", "");
+
+               SDNCRestClient sdncClient = new SDNCRestClient(bpelRequest,msoPropertiesFactory);
+               long subStartTime = System.currentTimeMillis ();
+               try {
+                       Thread sdncClientThread = new Thread(sdncClient);
+                       sdncClientThread.start();
+               }
+               catch (Exception e){
+                       String respMsg = "Error sending request to SDNC. Failed to start SDNC Client thread " + e.getMessage();
+                       msoLogger.error(MessageEnum.RA_SEND_REQUEST_SDNC_ERR, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception sending request to SDNC. Failed to start SDNC Client thread", e);
+                       alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, respMsg);
+                       SDNCResponse sdncResp = new SDNCResponse(bpelReqId);
+                       sdncResp.setRespCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                       sdncResp.setRespMsg(respMsg);
+                       SDNCRestClient.sendRespToBpel(callbackUrl, sdncResp, msoPropertiesFactory);
+               }
+
+               msoLogger.debug("Sending synchronous response to BPEL");
+               SDNCAdapterResponse wsResp = new SDNCAdapterResponse();
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+               return (wsResp);
+       }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterRestImpl.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterRestImpl.java
new file mode 100644 (file)
index 0000000..c873c92
--- /dev/null
@@ -0,0 +1,191 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.impl;
+
+
+import java.io.StringReader;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.POST;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.openecomp.mso.HealthCheckUtils;
+import org.openecomp.mso.utils.UUIDChecker;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.logger.MessageEnum;
+@Path("/")
+public class SDNCAdapterRestImpl {
+
+       private MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       public final static String MSO_PROP_ADAPTER="MSO_PROP_SDNC_ADAPTER";
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+
+       @Context
+       private HttpHeaders headers;
+       @Context HttpServletRequest request;
+
+       @POST
+       @Path("/MSORequest")
+       @Consumes("application/xml")
+       @Produces("application/xml")
+       public Response MSORequest(String reqXML) {
+           msoLogger.debug("***Received MSO Rest Request. XML:" + reqXML);
+
+           Document reqDoc = null;
+       SDNCResponse sdncResp = null;
+       RequestTunables rt = null;
+       String reqId = "";
+       long startTime = System.currentTimeMillis();
+       MsoLogger.setServiceName("UNKNOWN");
+               String action = "";
+               String operation = "";
+           try {
+
+               reqId = headers.getRequestHeader("att-mso-request-id").get(0);
+               action = headers.getRequestHeader("att-mso-request-action").get(0);
+               operation = headers.getRequestHeader("att-mso-request-operation").get(0);
+
+               MsoLogger.setLogContext(reqId, "");
+
+               msoLogger.debug ("Received MSO Rest Request XML: " + reqXML);
+                       rt = new RequestTunables(reqId, "", operation, action, msoPropertiesFactory);
+               rt.setTunables();
+
+               DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+               dbf.setFeature (XMLConstants.FEATURE_SECURE_PROCESSING, true);
+               DocumentBuilder db = dbf.newDocumentBuilder();
+
+               InputSource source = new InputSource(new StringReader(reqXML));
+
+               reqDoc = db.parse(source);
+
+           } catch (Exception e) {
+               msoLogger.error(MessageEnum.RA_PARSING_REQUEST_ERROR, reqXML, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - Invalid XML request format", e);
+               sdncResp = new SDNCResponse(reqId, HttpServletResponse.SC_BAD_REQUEST, "Invalid XML request format");
+           }
+
+               if (reqDoc != null) {
+                       msoLogger.debug("***Getting response from sdnc***");
+                       long subStartTime = System.currentTimeMillis ();
+                       sdncResp = SDNCRestClient.getSdncResp(Utils.genSdncReq(reqDoc, rt), rt,msoPropertiesFactory);
+                       msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from SDNC", "SDNC", action + "." + operation, null);
+               }
+
+               if (sdncResp == null) {
+                       msoLogger.debug("An Internal Server error has occurred in SDNC Adapter");
+                       sdncResp = new SDNCResponse(reqId, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "MSO - SDNCA Internal Error");
+               }
+
+               if (sdncResp.getSdncRespXml() == null) {
+            sdncResp.setSdncRespXml(Utils.genMsoFailResp(sdncResp));
+        }
+
+               msoLogger.debug("***Completed MSO Rest Request." + sdncResp.toString());
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+               return Response.status(sdncResp.getRespCode()).entity(sdncResp.getSdncRespXml()).build();
+       }
+       
+    @HEAD
+    @GET
+    @Path("/healthcheck")
+    @Produces("text/html")
+    public Response healthcheck (@QueryParam("requestId") String requestId) {
+               long startTime = System.currentTimeMillis ();
+               MsoLogger.setServiceName ("Healthcheck");
+               UUIDChecker.verifyOldUUID(requestId, msoLogger);
+               HealthCheckUtils healthCheck = new HealthCheckUtils ();
+               if (!healthCheck.siteStatusCheck(msoLogger, startTime)) {
+                       return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+               }
+
+               if (!healthCheck.configFileCheck(msoLogger, startTime, MSO_PROP_ADAPTER)) {
+                       return HealthCheckUtils.NOT_STARTED_RESPONSE;
+               }
+               msoLogger.debug("healthcheck - Successful");
+               return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+    }
+
+       @HEAD
+       @GET
+       @Path("/globalhealthcheck")
+       @Produces("text/html")
+       public Response globalHealthcheck (@DefaultValue("true") @QueryParam("enableBpmn") boolean enableBpmn) {
+               long startTime = System.currentTimeMillis ();
+               MsoLogger.setServiceName ("GlobalHealthcheck");
+               // Generate a Request Id
+               String requestId = UUIDChecker.generateUUID(msoLogger);
+               HealthCheckUtils healthCheck = new HealthCheckUtils ();
+               if (!healthCheck.siteStatusCheck (msoLogger, startTime)) {
+                       return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+               }
+
+               if (healthCheck.verifyGlobalHealthCheck(enableBpmn, requestId)) {
+                       msoLogger.debug("globalHealthcheck - Successful");
+                       return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+               } else {
+                       msoLogger.debug("globalHealthcheck - At leaset one of the sub-modules is not available.");
+                       return  HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+               }
+       }
+
+       @HEAD
+       @GET
+       @Path("/nodehealthcheck")
+       @Produces("text/html")
+       public Response nodeHealthcheck () {
+               long startTime = System.currentTimeMillis ();
+               MsoLogger.setServiceName ("NodeHealthcheck");
+               // Generate a Request Id
+               String requestId = UUIDChecker.generateUUID(msoLogger);
+               HealthCheckUtils healthCheck = new HealthCheckUtils ();
+               if (!healthCheck.siteStatusCheck (msoLogger, startTime)) {
+                       return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+               }
+
+               if (healthCheck.verifyNodeHealthCheck(HealthCheckUtils.NodeType.RA, requestId)) {
+                       msoLogger.debug("nodeHealthcheck - Successful");
+                       return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+               } else {
+                       msoLogger.debug("nodeHealthcheck - At leaset one of the sub-modules is not available.");
+                       return  HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+               }
+       }
+
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCResponse.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCResponse.java
new file mode 100644 (file)
index 0000000..b617859
--- /dev/null
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.impl;
+
+
+import java.io.Serializable;
+
+public class SDNCResponse implements Serializable {
+
+       private static final long serialVersionUID = 1L;
+       private String reqId = null;
+       private int respCode = 0;
+       private String respMsg = null;
+       private String sdncRespXml = null;
+
+       public SDNCResponse(String reqId) {
+               this.reqId = reqId;
+       }
+       public SDNCResponse(String reqId, int respCode, String respMsg) {
+               this.reqId = reqId;
+               this.respCode = respCode;
+               this.respMsg = respMsg;
+       }
+
+       public String getReqId() {
+               return reqId;
+       }
+       public void setReqId(String reqId) {
+               this.reqId = reqId;
+       }
+       public int getRespCode() {
+               return respCode;
+       }
+       public void setRespCode(int respCode) {
+               this.respCode = respCode;
+       }
+       public String getRespMsg() {
+               return respMsg;
+       }
+       public void setRespMsg(String respMsg) {
+               this.respMsg = respMsg;
+       }
+       public String getSdncRespXml() {
+               return sdncRespXml;
+       }
+       public void setSdncRespXml(String sdncRespXml) {
+               this.sdncRespXml = sdncRespXml;
+       }
+
+       @Override
+       public String toString() {
+               return "SDNCResponse [reqId=" + reqId + ", respCode=" + respCode
+                               + ", respMsg=" + respMsg + ", sdncRespXml=" + sdncRespXml + "]";
+       }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java
new file mode 100644 (file)
index 0000000..00d7c5a
--- /dev/null
@@ -0,0 +1,345 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.impl;
+
+
+import java.io.BufferedReader;
+import java.io.DataOutputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.ejb.EJB;
+import javax.xml.XMLConstants;
+import javax.xml.bind.DatatypeConverter;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.openecomp.mso.adapters.sdnc.SDNCAdapterRequest;
+import org.openecomp.mso.adapters.sdnc.client.CallbackHeader;
+import org.openecomp.mso.adapters.sdnc.client.SDNCAdapterCallbackRequest;
+import org.openecomp.mso.adapters.sdnc.client.SDNCCallbackAdapterPortType;
+import org.openecomp.mso.adapters.sdnc.client.SDNCCallbackAdapterService;
+import org.openecomp.mso.adapters.sdnc.util.SDNCRequestIdUtil;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+//SDNCAdapter to SDNC Rest Client
+public class SDNCRestClient implements Runnable {
+
+       private MsoPropertiesFactory msoPropertiesFactory;
+       
+       private SDNCAdapterRequest bpelRequest;
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+       private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger();
+       public static final String MSO_PROP_SDNC_ADAPTER="MSO_PROP_SDNC_ADAPTER";
+
+
+       public SDNCRestClient(SDNCAdapterRequest bpelRequest,MsoPropertiesFactory msoPropFactory) {
+               this.bpelRequest = bpelRequest;
+               msoPropertiesFactory = msoPropFactory;
+       }
+
+       @Override
+       public void run()
+       {
+
+               String action = bpelRequest.getRequestHeader().getSvcAction();
+               String operation = bpelRequest.getRequestHeader().getSvcOperation();
+               String bpelReqId = bpelRequest.getRequestHeader().getRequestId();
+               String callbackUrl = bpelRequest.getRequestHeader().getCallbackUrl();
+               MsoLogger.setLogContext(SDNCRequestIdUtil.getSDNCOriginalRequestId (bpelReqId), bpelRequest.getRequestHeader().getSvcInstanceId());
+               MsoLogger.setServiceName("SDNCRestClient");
+
+               String sdncReqBody = null;
+
+               msoLogger.debug("BPEL Request:" + bpelRequest.toString());
+
+               RequestTunables rt = new RequestTunables(bpelReqId,
+                               bpelRequest.getRequestHeader().getMsoAction(),
+                               bpelRequest.getRequestHeader().getSvcOperation(),
+                               bpelRequest.getRequestHeader().getSvcAction(),msoPropertiesFactory);
+               rt.setTunables();
+               rt.setSdncaNotificationUrl(SDNCAdapterPortTypeImpl.getProperty(Constants.MY_URL_PROP, Constants.DEFAULT_MY_URL,msoPropertiesFactory));
+
+
+               if ("POST".equals(rt.getReqMethod()))
+               {
+                       /* TODO Hibernate
+                       try {
+                               RequestsDatabase.updateBpelUrl(bpelReqId, callbackUrl);
+                       }
+                       catch (Exception e1)
+                       {
+                               logger.error("Failed to update DB ActiveRequests with SDNC_CALLBACK_BPEL_URL. Default CallbackUrl will be used for SDNC async notifications", e1);
+                       }
+                       */
+
+                       Node node = (Node)      bpelRequest.getRequestData();
+               Document reqDoc = node.getOwnerDocument();
+                       sdncReqBody = Utils.genSdncReq(reqDoc, rt);
+
+               }
+               //should be more generic if we do RPC then we add the input tags etc, if it is pure REST this is not needed
+               else if("PUT".equals(rt.getReqMethod())){
+                       Node node = (Node)      bpelRequest.getRequestData();
+               Document reqDoc = node.getOwnerDocument();
+                       sdncReqBody = Utils.genSdncPutReq(reqDoc, rt);
+               }
+               long sdncStartTime = System.currentTimeMillis();
+               SDNCResponse sdncResp = getSdncResp(sdncReqBody, rt, msoPropertiesFactory);
+               msoLogger.recordMetricEvent (sdncStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from SDNC", "SDNC", action + "." + operation, null);
+
+               msoLogger.debug ("Got the SDNC Response: " + sdncResp.getSdncRespXml());
+               msoLogger.debug("Sending reponse to bpel from SDNC rest client");
+               long bpelStartTime = System.currentTimeMillis();
+               sendRespToBpel(callbackUrl, sdncResp,msoPropertiesFactory);
+               msoLogger.recordMetricEvent (bpelStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully send reauest to BPEL", "BPMN", callbackUrl, null);
+               return;
+       }
+
+       public static SDNCResponse getSdncResp(String sdncReqBody, RequestTunables rt, MsoPropertiesFactory msoPropertiesFactoryp)
+       {
+
+               URL url;
+               HttpURLConnection con = null;
+               DataOutputStream out = null;
+               BufferedReader in = null;
+               SDNCResponse sdncResp = new SDNCResponse(rt.getReqId());
+               StringBuffer response = new StringBuffer();
+
+               msoLogger.info(MessageEnum.RA_SEND_REQUEST_SDNC, rt.toString(), "SDNC", "");
+               msoLogger.debug("SDNC Request Body:\n" + sdncReqBody);
+
+               try {
+
+                       url = new URL(rt.getSdncUrl());
+
+                       con = (HttpURLConnection) url.openConnection();
+                   con.setConnectTimeout(Integer.parseInt(SDNCAdapterPortTypeImpl.getProperty(Constants.SDNC_CONNECTTIME_PROP, "2000",msoPropertiesFactoryp)));
+                   con.setReadTimeout(Integer.parseInt(rt.getTimeout()));
+                       con.setRequestProperty("Accept", "application/yang.data+xml"); //for response in xml
+                       String userCredentials = msoPropertiesFactoryp.getMsoJavaProperties(MSO_PROP_SDNC_ADAPTER).getEncryptedProperty(Constants.SDNC_AUTH_PROP, Constants.DEFAULT_SDNC_AUTH, Constants.ENCRYPTION_KEY);
+
+                       String basicAuth = "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes());
+                       con.setRequestProperty ("Authorization", basicAuth);
+                   con.setRequestMethod(rt.getReqMethod());
+
+                       // Add request headers
+                   if ("POST".equals(rt.getReqMethod()) || "PUT".equals(rt.getReqMethod()))
+                   {
+                       con.setRequestProperty("Content-type", "application/xml");
+                       con.setRequestProperty("Content-length",String.valueOf(sdncReqBody.length()));
+                               con.setDoOutput(true);
+                               out = new DataOutputStream(con.getOutputStream());
+                               out.writeBytes(sdncReqBody);
+                               out.flush();
+                               out.close();
+                   }
+
+                       //Get response
+                       sdncResp.setRespCode(con.getResponseCode());
+                       sdncResp.setRespMsg(con.getResponseMessage());
+
+                       in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+
+                       String inputLine;
+                       //Not parsing the response -it contains a responseHdr section and data section
+                       while ((inputLine = in.readLine()) != null) {
+                               response.append(inputLine);
+                       }
+                       in.close();
+
+                       sdncResp.setSdncRespXml(response.toString());
+                       msoLogger.info(MessageEnum.RA_RESPONSE_FROM_SDNC, sdncResp.toString(), "SDNC", "");
+                       return(sdncResp);
+               }
+               catch (Exception e)
+               {
+                       msoLogger.error(MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC, "SDNC", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception processing request to SDNC", e);
+                       //default
+                       sdncResp.setRespCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
+                       String respMsg = "Error processing request to SDNC. ";
+                       String sdncErrMsg = null;
+
+                       if (e instanceof java.net.SocketTimeoutException )
+                       {
+                               sdncResp.setRespCode(HttpURLConnection.HTTP_CLIENT_TIMEOUT);
+                               respMsg = "Request to SDNC timed out. ";
+                       }
+                       if (con != null)
+                       {
+                               try { //e1
+                                       if (con.getResponseCode() != HttpURLConnection.HTTP_OK) //seen in SocketException connection reset 
+                                               sdncResp.setRespCode(con.getResponseCode());
+                                       respMsg = respMsg + con.getResponseMessage() + ". ";
+                                       InputStream is = con.getErrorStream();
+                                       if (is != null)
+                                       {
+                                               XPathFactory xpathFactory = XPathFactory.newInstance();
+                                           XPath xpath = xpathFactory.newXPath();
+                                               DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+                        dbf.setFeature (XMLConstants.FEATURE_SECURE_PROCESSING, true);
+                                               DocumentBuilder db;
+                                               Document doc = null;
+                                               try { //e2
+                                                       db = dbf.newDocumentBuilder();
+                                                       doc = db.parse(is);
+                                                       NodeList errors = (NodeList)xpath.evaluate("errors/error", doc, XPathConstants.NODESET);
+                                                       for (int i = 0; i < errors.getLength(); i++)
+                                                       {
+                                                               Element error = (Element) errors.item(i);
+                                                               String eType = null;
+                                                               try {
+                                                                       eType = xpath.evaluate("error-type", error);
+                                                                       sdncErrMsg = ". 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);
+                                                               }
+
+                                                               String eTag = null;
+                                                               try {
+                                                                       eTag = xpath.evaluate( "error-tag", error);
+                                                                       sdncErrMsg = sdncErrMsg + ", error-tag:" + eTag;
+                                                               } catch (Exception e3) {
+                                                                       msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
+                                                               }
+
+                                                               String eMsg = null;
+                                                               try {
+                                                                       eMsg = xpath.evaluate("error-message", error);
+                                                                       sdncErrMsg = sdncErrMsg + ", error-message:" + eMsg + "]";
+                                                               } catch (Exception e3) {
+                                                                       msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
+                                                               }
+                                                       }
+                                               } catch (Exception e2) {
+                                                   msoLogger.error (MessageEnum.RA_ANALYZE_ERROR_EXC, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while analyse error", e2);
+                                               }
+                                       } //is != null
+                               } catch (Exception e1) {
+                                       msoLogger.error (MessageEnum.RA_ERROR_GET_RESPONSE_SDNC, "SDNC", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception while get SDNC response", e1);
+                               }
+                       } //con != null
+
+                       if (e.getMessage() != null) {
+                respMsg = respMsg + e.getMessage();
+            }
+                       if (sdncErrMsg != null) {
+                respMsg = respMsg + sdncErrMsg;
+            }
+
+                       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);
+                       return(sdncResp);
+               }
+               finally
+               {
+                       if (con != null) {
+                con.disconnect();
+            }
+               }
+       }
+
+       public static void sendRespToBpel(String bpelUrl, SDNCResponse sdncResp,MsoPropertiesFactory msoPropertiesFactoryp)
+       {
+               String error;
+               try
+               {
+                       SDNCAdapterCallbackRequest cbReq = new SDNCAdapterCallbackRequest();
+                       cbReq.setCallbackHeader(new CallbackHeader(sdncResp.getReqId(), Integer.toString(sdncResp.getRespCode()), sdncResp.getRespMsg()));
+                       if (sdncResp.getSdncRespXml() != null)
+                       {
+                               cbReq.setRequestData(sdncResp.getSdncRespXml());
+                       }
+                       msoLogger.info(MessageEnum.RA_CALLBACK_BPEL, 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);
+                       }
+
+                       SDNCCallbackAdapterService cbSvc = new SDNCCallbackAdapterService();
+
+                       SDNCCallbackAdapterPortType cbPort = cbSvc.getSDNCCallbackAdapterSoapHttpPort();
+
+                       BindingProvider bp = (BindingProvider)cbPort;
+
+                       bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsdlUrl.toExternalForm());
+
+                       //authentication
+                       try
+                       {
+                               Map<String, Object> req_ctx = bp.getRequestContext();
+                               Map<String, List<String>> headers = new HashMap<String, List<String>>();
+                               String userCredentials = msoPropertiesFactoryp.getMsoJavaProperties(MSO_PROP_SDNC_ADAPTER).getEncryptedProperty(Constants.BPEL_AUTH_PROP, Constants.DEFAULT_BPEL_AUTH, Constants.ENCRYPTION_KEY);
+
+                               String basicAuth = "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes());
+                               req_ctx.put(MessageContext.HTTP_REQUEST_HEADERS, headers);
+                               headers.put ("Authorization", Collections.singletonList(basicAuth));
+                       }
+                       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.debug("Invoking Bpel Callback. BpelCallbackUrl:" + bpelUrl);
+                       cbPort.sdncAdapterCallback(cbReq);
+
+               }
+               catch (Exception e)
+               {
+                       error = "Error sending BpelCallback request" + e.getMessage();
+                       msoLogger.error(MessageEnum.RA_CALLBACK_BPEL_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending BpelCallback request", e);
+                       alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+               }
+               msoLogger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE, "Camunda", "");
+               return;
+       }
+
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/Utils.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/Utils.java
new file mode 100644 (file)
index 0000000..345d0a0
--- /dev/null
@@ -0,0 +1,195 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.impl;
+
+
+import java.io.StringWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+public class Utils {
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+
+       public static String genSdncReq(Document reqDoc, RequestTunables rt) {
+               try {
+
+                       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+                       DocumentBuilder db = dbf.newDocumentBuilder();
+
+                       //NewDoc for output
+                       //Root
+                       Document newdoc = db.newDocument();
+                       Element root = newdoc.createElementNS(rt.getNamespace(), "input");
+                       newdoc.appendChild(root);
+
+                       //Header
+                       Element hdr = newdoc.createElement(rt.getHeaderName());
+                       root.appendChild(hdr);
+
+                       String elemData = rt.getReqId();
+                       Element hdrChild;
+                       if (elemData != null && elemData.length() > 0)
+                       {
+                               hdrChild = newdoc.createElement("svc-request-id");
+                               hdrChild.appendChild(newdoc.createTextNode(elemData));
+                               hdr.appendChild(hdrChild);
+                       }
+
+                       elemData = rt.getAction();
+                       if (elemData != null && elemData.length() > 0)
+                       {
+                               hdrChild = newdoc.createElement("svc-action");
+                               hdrChild.appendChild(newdoc.createTextNode(elemData));
+                               hdr.appendChild(hdrChild);
+                       }
+
+                       elemData = rt.getSdncaNotificationUrl();
+                       if (elemData != null && elemData.length() > 0)
+                       {
+                               hdrChild = newdoc.createElement("svc-notification-url");
+                               hdrChild.appendChild(newdoc.createTextNode(elemData));
+                               hdr.appendChild(hdrChild);
+                       }
+
+                       //RequestData
+                       NodeList nodes = reqDoc.getDocumentElement().getChildNodes();
+                       for (int i = 0; i < nodes.getLength(); i++) {
+                               Node n = nodes.item(i);
+                               Node newNode = newdoc.importNode(n, true);
+                               root.appendChild(newNode);
+                       }
+
+                       String s = domToStr(newdoc);
+                       msoLogger.debug("Formatted SdncReq:\n" + s);
+                       return (s);
+
+               } catch (Exception e) {
+                       msoLogger.error(MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST, "SDNC", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in genSdncReq", e);
+               }
+               return(null);
+       }
+       
+       public static String genSdncPutReq(Document reqDoc, RequestTunables rt) {
+               try {
+
+                       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+                       DocumentBuilder db = dbf.newDocumentBuilder();
+
+                       //NewDoc for output
+                       //Root
+                       Document newdoc = db.newDocument();
+                       
+                       //RequestData
+                       NodeList nodes = reqDoc.getDocumentElement().getChildNodes();
+                       
+                       
+                       Element root = newdoc.createElement(nodes.item(0).getNodeName());
+                       newdoc.appendChild(root);
+
+                       NodeList childNodes = nodes.item(0).getChildNodes();
+                       for (int i = 0; i < childNodes.getLength(); i++) {                              
+                                       Node n = childNodes.item(i);
+                                       Node newNode = newdoc.importNode(n, true);
+                                       root.appendChild(newNode);                              
+                       }
+
+                       String s = domToStr(newdoc);
+                       msoLogger.debug("Formatted SdncPutReq:\n" + s);
+                       return (s);
+
+               } catch (Exception e) {
+                       msoLogger.error(MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception in genSdncPutReq", e);
+               }
+               return(null);
+       }
+
+       public static String genMsoFailResp(SDNCResponse resp) {
+               try {
+
+                       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+                       DocumentBuilder db = dbf.newDocumentBuilder();
+
+                       //NewDoc for output
+                       //Root
+                       Document newdoc = db.newDocument();
+                       Element root = newdoc.createElement("output");
+                       newdoc.appendChild(root);
+
+                       Element elem1 = newdoc.createElement("svc-request-id");
+                       elem1.appendChild(newdoc.createTextNode(resp.getReqId()));
+                       root.appendChild(elem1);
+
+                       Element elem2 = newdoc.createElement("response-code");
+                       elem2.appendChild(newdoc.createTextNode(String.valueOf(resp.getRespCode())));
+                       root.appendChild(elem2);
+
+                       Element elem3 = newdoc.createElement("response-message");
+                       elem3.appendChild(newdoc.createTextNode(String.valueOf(resp.getRespMsg())));
+                       root.appendChild(elem3);
+
+                       String s = domToStr(newdoc);
+                       msoLogger.debug("Formatted SdncReq:" + s);
+                       return (s);
+
+               } catch (Exception e) {
+                       msoLogger.error(MessageEnum.RA_ERROR_CREATE_SDNC_RESPONSE, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception in genMsoFailResp", e);
+               }
+               return(null);
+       }
+
+
+       public static String domToStr(Document doc)
+       {
+               if (doc != null)
+               {
+                       try {
+                               DOMSource ds = new DOMSource(doc);
+                               StringWriter sw = new StringWriter();
+                               StreamResult sr = new StreamResult(sw);
+                               TransformerFactory tf = TransformerFactory.newInstance();
+                               Transformer t = tf.newTransformer();
+                               //t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");//<?xml version="1.0" encoding="UTF-8"?>
+                               t.transform(ds, sr);
+                               String s = sw.toString();
+                               
+                               // This is an awful fix for now but we don't want that xmlns="" to be generated
+                               s = s.replaceAll("xmlns=\"\"", "");
+                               return(s);
+                       } catch (Exception e) {
+                               msoLogger.error(MessageEnum.RA_ERROR_CONVERT_XML2STR, "", "", MsoLogger.ErrorCode.DataError, "Exception - domToStr", e);
+                       }
+               }
+               return(null);
+       }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/notify/SDNCNotifyResource.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/notify/SDNCNotifyResource.java
new file mode 100644 (file)
index 0000000..68f31f1
--- /dev/null
@@ -0,0 +1,200 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.notify;
+
+
+import java.io.StringReader;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+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.Response;
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+import javax.ejb.EJB;
+
+import org.openecomp.mso.utils.UUIDChecker;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.adapters.sdnc.impl.Constants;
+import org.openecomp.mso.adapters.sdnc.impl.SDNCAdapterPortTypeImpl;
+import org.openecomp.mso.adapters.sdnc.impl.SDNCResponse;
+import org.openecomp.mso.adapters.sdnc.impl.SDNCRestClient;
+import org.openecomp.mso.adapters.sdnc.util.SDNCRequestIdUtil;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.logger.MessageEnum;
+
+//SDNC to SDNC Async Notifcations
+@Path("/")
+public class SDNCNotifyResource {
+
+       private MsoPropertiesFactory msoPropertiesFactory=new MsoPropertiesFactory();
+       
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+    @GET()
+    public Response printMessage () {
+        long startTime = System.currentTimeMillis ();
+        UUIDChecker.generateUUID (msoLogger);
+        String result = "SDNCAdapter Rest services";
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        return Response.status (HttpServletResponse.SC_OK).entity (result).build ();
+
+    }
+
+    @GET()
+    @Path("/{param}")
+    public Response printMessageParam (@PathParam("param") String msg) {
+        long startTime = System.currentTimeMillis ();
+        UUIDChecker.generateUUID (msoLogger);
+        String result = "SDNCAdapter Rest services : " + msg;
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        return Response.status (HttpServletResponse.SC_OK).entity (result).build ();
+
+    }
+
+    @POST
+    @Path("/SDNCNotify")
+    @Consumes("application/xml")
+    @Produces("application/xml")
+    public Response SDNCNotify (String reqXML, @Context HttpServletRequest request) {
+
+        XPathFactory xpathFactory = XPathFactory.newInstance ();
+        XPath xpath = xpathFactory.newXPath ();
+        long startTime = System.currentTimeMillis ();
+
+        msoLogger.info (MessageEnum.RA_RECEIVE_SDNC_NOTIF, reqXML, "SDNC", "SDNCNotify");
+
+        InputSource source = new InputSource (new StringReader (reqXML));
+
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance ();
+
+        DocumentBuilder db;
+
+        try {
+            dbf.setFeature (XMLConstants.FEATURE_SECURE_PROCESSING, true);
+            db = dbf.newDocumentBuilder ();
+        } catch (ParserConfigurationException e) {
+            msoLogger.error (MessageEnum.RA_PARSING_REQUEST_ERROR, "SDNC", "SDNCNotify", MsoLogger.ErrorCode.SchemaError, "Exception - Invalid XML request format", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Invalid XML request format");
+            return Response.status (HttpServletResponse.SC_BAD_REQUEST).entity ("Invalid XML request format").build ();
+        }
+
+        Document doc = null;
+        try {
+            doc = db.parse (source);
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.RA_PARSING_REQUEST_ERROR, "SDNC", "SDNCNotify", MsoLogger.ErrorCode.SchemaError, "Exception - Invalid XML request format", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Invalid XML request format");
+            return Response.status (HttpServletResponse.SC_BAD_REQUEST).entity ("Invalid XML request format").build ();
+        }
+
+        try {
+            NodeList nl = (NodeList) xpath.evaluate (Constants.SDNC_SVCCFGRESP_ROOT, doc, XPathConstants.NODESET);
+            if (nl.getLength () <= 0) {
+                msoLogger.error (MessageEnum.RA_MISSING_PARAM, Constants.SDNC_SVCCFGRESP_ROOT, "SDNC", "SDNCNotify", MsoLogger.ErrorCode.DataError, "Missing param");
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "Missing" + Constants.SDNC_SVCCFGRESP_ROOT);
+                return Response.status (HttpServletResponse.SC_BAD_REQUEST)
+                               .entity ("Missing " + Constants.SDNC_SVCCFGRESP_ROOT)
+                               .build ();
+            }
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.RA_MISSING_PARAM, Constants.SDNC_SVCCFGRESP_ROOT, "SDNC", "SDNCNotify", MsoLogger.ErrorCode.DataError, "Exception - Missing param", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "Missing" + Constants.SDNC_SVCCFGRESP_ROOT);
+            return Response.status (HttpServletResponse.SC_BAD_REQUEST)
+                           .entity ("Missing " + Constants.SDNC_SVCCFGRESP_ROOT)
+                           .build ();
+        }
+
+        String reqId;
+        try {
+            reqId = xpath.evaluate (Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_REQ_ID, doc);
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.RA_MISSING_PARAM, Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_REQ_ID, "SDNC", "SDNCNotify", MsoLogger.ErrorCode.DataError, "Exception - Missing param", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "Missing" + Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_REQ_ID);
+            return Response.status (HttpServletResponse.SC_BAD_REQUEST)
+                           .entity ("Missing " + Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_REQ_ID)
+                           .build ();
+        }
+
+        MsoLogger.setLogContext (SDNCRequestIdUtil.getSDNCOriginalRequestId (reqId), "");
+
+        String respCode;
+        try {
+            respCode = xpath.evaluate (Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_RESP_CODE, doc);
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.RA_MISSING_PARAM,
+                             Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_RESP_CODE, "SDNC", "SDNCNotify", MsoLogger.ErrorCode.DataError, "Exception - Missing param",
+                             e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "Missing" + Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_RESP_CODE);
+            return Response.status (HttpServletResponse.SC_BAD_REQUEST)
+                           .entity ("Missing" + Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_RESP_CODE)
+                           .build ();
+        }
+
+        String respMsg = "";
+        try {
+            respMsg = xpath.evaluate (Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_RESP_MSG, doc);
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.RA_MISSING_PARAM, Constants.SDNC_SVCCFGRESP_ROOT + Constants.SDNC_RESP_MSG, "SDNC", "SDNCNotify", MsoLogger.ErrorCode.DataError, "Exception - Missing param", e);
+        }
+
+        String bpelUrl = null;
+        /*
+         * TODO Hibernate
+         * try {
+         * bpelUrl = RequestsDatabase.getBpelUrl(reqId);
+         * }
+         * catch (Exception e)
+         * {
+         * logger.error("Unable to get SDNC_CALLBACK_URL from ActiveRequests, using default for reqid:" + reqId, e);
+         * }
+         */
+        if (bpelUrl == null) {
+            bpelUrl = SDNCAdapterPortTypeImpl.getProperty (Constants.BPEL_URL_PROP, Constants.DEFAULT_BPEL_URL,msoPropertiesFactory);
+        }
+
+        SDNCResponse sdncResp = new SDNCResponse (reqId);
+        sdncResp.setRespCode (Integer.parseInt (respCode));
+        sdncResp.setRespMsg (respMsg);
+        sdncResp.setSdncRespXml (reqXML);
+        long subStartTime = System.currentTimeMillis ();
+        SDNCRestClient.sendRespToBpel (bpelUrl, sdncResp,msoPropertiesFactory);
+        msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully send request to BPMN", "BPMN", bpelUrl, null);
+
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        return Response.ok ().build ();
+    }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/package-info.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/package-info.java
new file mode 100644 (file)
index 0000000..58359c6
--- /dev/null
@@ -0,0 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.mso.adapters.sdnc;
+
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/util/SDNCRequestIdUtil.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/util/SDNCRequestIdUtil.java
new file mode 100644 (file)
index 0000000..733cb69
--- /dev/null
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.util;
+
+
+public class SDNCRequestIdUtil {
+       // Add private constructor to prevent instance creation.
+       private SDNCRequestIdUtil () {}
+
+    public static String getSDNCOriginalRequestId (String newRequestId) {
+       
+       // Camunda scripts will add postfix, such as -1, -2, on the original requestID, to make sure requestID is unique while sending request to SDNC 
+       // In order to use the unique requestID in logging, need to remove the postfix added by the Camunda scripts
+       // Verify whether the requestId is a valid UUID with postfix (-1, -2). If yes, it should contain 5 times char '-', since valid UUID contains 4 times '-'
+       // If the requestId is not a valid UUID with postfix, we do nothing
+               if (newRequestId.split("-").length == 6) {
+                       return newRequestId.substring(0, newRequestId.lastIndexOf('-'));
+               }
+               return newRequestId;
+    }
+}
diff --git a/adapters/mso-sdnc-adapter/src/main/resources/SDNCAdapter.wsdl b/adapters/mso-sdnc-adapter/src/main/resources/SDNCAdapter.wsdl
new file mode 100644 (file)
index 0000000..2f4c5ad
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+       xmlns:sdncadaptersc="http://domain2.att.com/workflow/sdnc/adapter/schema/v1"
+       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+       xmlns:tns="http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1"
+       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+       targetNamespace="http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1">
+       <types>
+               <schema xmlns="http://www.w3.org/2001/XMLSchema"
+                       elementFormDefault="qualified"
+                       targetNamespace="http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1">
+                       <import namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1"
+                               schemaLocation="SDNCAdapterSchema.xsd" />
+               </schema>
+       </types>
+
+       <message name="SDNCAdapterRequest">
+               <part element="sdncadaptersc:SDNCAdapterRequest" name="SDNCAdapterRequest">
+               </part>
+       </message>
+       <message name="SDNCAdapterResponse">
+               <part element="sdncadaptersc:SDNCAdapterResponse" name="SDNCAdapterResponse">
+               </part>
+       </message>
+
+       <portType name="SDNCAdapterPortType">
+               <operation name="SDNCAdapter">
+                       <input message="tns:SDNCAdapterRequest" name="SDNCAdapterRequest">
+                       </input>
+                       <output message="tns:SDNCAdapterResponse" name="SDNCAdapterResponse">
+                       </output>
+               </operation>
+       </portType>
+
+       <binding name="SDNCAdapterSoapHttpBinding" type="tns:SDNCAdapterPortType">
+               <soap:binding style="document"
+                       transport="http://schemas.xmlsoap.org/soap/http" />
+               <operation name="SDNCAdapter">
+                       <soap:operation soapAction="" style="document" />
+                       <input>
+                               <soap:body use="literal" />
+                       </input>
+                       <output>
+                               <soap:body use="literal" />
+                       </output>
+               </operation>
+       </binding>
+
+       <service name="SDNCAdapterService">
+               <port binding="tns:SDNCAdapterSoapHttpBinding" name="SDNCAdapterSoapHttpPort">
+                       <soap:address location="SDNCAdapterService" />
+               </port>
+       </service>
+</definitions>
diff --git a/adapters/mso-sdnc-adapter/src/main/resources/SDNCAdapterSchema.xsd b/adapters/mso-sdnc-adapter/src/main/resources/SDNCAdapterSchema.xsd
new file mode 100644 (file)
index 0000000..f0e4435
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema targetNamespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1" 
+xmlns="http://www.w3.org/2001/XMLSchema" 
+       xmlns:tns="http://domain2.att.com/workflow/sdnc/adapter/schema/v1" 
+       xmlns:sdncadaptersc="http://domain2.att.com/workflow/sdnc/adapter/schema/v1"    
+       elementFormDefault="qualified">
+
+
+       <!-- ========================= -->
+       <!-- Complex Types             -->
+       <!-- ========================= -->
+       
+       
+       <!-- ========================= -->
+       <!-- Elements             -->
+       <!-- ========================= -->
+       
+       <element  name="RequestHeader">
+               <complexType>
+                       <sequence>
+                               <element name="RequestId" type="string" minOccurs="1" maxOccurs="1"/>   
+                               <element name="SvcInstanceId" type="string" minOccurs="0" maxOccurs="1"/>       
+                               <element name="SvcAction" type="string" minOccurs="1" maxOccurs="1"/>   
+                               <element name="SvcOperation" type="string" minOccurs="1" maxOccurs="1"/>        
+                               <element name="CallbackUrl" type="string" minOccurs="1" maxOccurs="1"/> 
+                               <element name="MsoAction" type="string" minOccurs="0" maxOccurs="1"/>                   
+                       </sequence>
+               </complexType>
+       </element>      
+       
+       <element  name="CallbackHeader">
+               <complexType>
+                       <sequence>
+                               <element name="RequestId" type="string" minOccurs="1" maxOccurs="1"/>   
+                               <element name="ResponseCode" type="string" minOccurs="1" maxOccurs="1"/>        
+                               <element name="ResponseMessage" type="string" minOccurs="1" maxOccurs="1"/>     
+                       </sequence>
+               </complexType>
+       </element>      
+       
+       <!-- ========================= -->
+       <!-- Requests/Responses        -->
+       <!-- ========================= -->
+       
+       <element name="SDNCAdapterRequest">
+               <complexType>
+                       <sequence>
+                               <element ref="tns:RequestHeader" minOccurs="1" maxOccurs="1" />
+                               <element name="RequestData" type="anyType" minOccurs="1" maxOccurs="1" />                               
+                       </sequence>
+               </complexType>
+       </element>
+       
+       <!-- Empty Ack -->
+       <element name="SDNCAdapterResponse">    
+               <complexType>
+                       
+               </complexType>
+       </element>
+       
+       <!--Used to post Async Status back to workflow, Status Message would be used for any fallouts from SDNC -->
+       <element name="SDNCAdapterCallbackRequest">
+               <complexType>
+                       <sequence>
+                               <element ref="tns:CallbackHeader" minOccurs="1" maxOccurs="1" />
+                               <element name="RequestData" type="anyType" minOccurs="0" maxOccurs="1" />                                                               
+                       </sequence>
+               </complexType>
+       </element>      
+       
+       
+</schema>
diff --git a/adapters/mso-sdnc-adapter/src/main/resources/SDNCCallbackAdapter.wsdl b/adapters/mso-sdnc-adapter/src/main/resources/SDNCCallbackAdapter.wsdl
new file mode 100644 (file)
index 0000000..1429b5f
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+       xmlns:sdncadaptersc="http://domain2.att.com/workflow/sdnc/adapter/schema/v1"
+       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+       xmlns:tns="http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1"
+       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+       targetNamespace="http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1">
+       <types>
+               <schema xmlns="http://www.w3.org/2001/XMLSchema"
+                       elementFormDefault="qualified"
+                       targetNamespace="http://domain2.att.com/workflow/sdnc/adapter/wsdl/v1">
+                       <import namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1"
+                               schemaLocation="SDNCAdapterSchema.xsd" />
+               </schema>
+       </types>
+
+       <message name="SDNCAdapterCallbackRequest">
+               <part element="sdncadaptersc:SDNCAdapterCallbackRequest" name="SDNCAdapterCallbackRequest">
+               </part>
+       </message>
+
+       <message name="SDNCAdapterCallbackResponse">
+               <part element="sdncadaptersc:SDNCAdapterResponse" name="SDNCAdapterCallbackResponse">
+               </part>
+       </message>
+
+       <portType name="SDNCCallbackAdapterPortType">
+               <operation name="SDNCAdapterCallback">
+                       <input message="tns:SDNCAdapterCallbackRequest" name="SDNCAdapterCallbackRequest">
+                       </input>
+                       <output message="tns:SDNCAdapterCallbackResponse" name="SDNCAdapterCallbackResponse">
+                       </output>
+               </operation>
+       </portType>
+       
+       <binding name="SDNCCallbackAdapterSoapHttpBinding" type="tns:SDNCCallbackAdapterPortType">
+               <soap:binding style="document"
+                       transport="http://schemas.xmlsoap.org/soap/http" />
+               <operation name="SDNCAdapterCallback">
+                       <soap:operation soapAction="" style="document" />
+                       <input>
+                               <soap:body use="literal" />
+                       </input>
+                       <output>
+                               <soap:body use="literal" />
+                       </output>
+               </operation>
+       </binding>
+
+       <service name="SDNCCallbackAdapterService">
+               <port binding="tns:SDNCCallbackAdapterSoapHttpBinding" name="SDNCCallbackAdapterSoapHttpPort">
+                       <soap:address location="SDNCCallbackAdapterService" />
+               </port>
+       </service>
+</definitions>
diff --git a/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/ObjectFactoryTest.java b/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/ObjectFactoryTest.java
new file mode 100644 (file)
index 0000000..ed3c780
--- /dev/null
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc;
+
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.nio.charset.Charset;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
+import org.junit.Test;
+
+public class ObjectFactoryTest {
+
+    private Marshaller jaxbMarshaller;
+    private Unmarshaller jaxbUnmarshaller;
+
+    /**
+     * Test method for {@link org.openecomp.mso.adapters.sdnc.ObjectFactory#createRequestHeader()}.
+     */
+    @Test
+    public final void testCreateRequestHeader () {
+        ObjectFactory of = new ObjectFactory ();
+        RequestHeader rh = of.createRequestHeader ();
+        rh.setCallbackUrl ("callback");
+        rh.setMsoAction ("action");
+        rh.setRequestId ("reqid");
+        rh.setSvcAction ("svcAction");
+        rh.setSvcInstanceId ("svcId");
+        rh.setSvcOperation ("op");
+        
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance(RequestHeader.class);
+            jaxbMarshaller = jaxbContext.createMarshaller();
+        
+            JAXBContext jaxbContext2 = JAXBContext.newInstance(RequestHeader.class);
+            jaxbUnmarshaller = jaxbContext2.createUnmarshaller();
+        }
+        catch (JAXBException e) {
+            e.printStackTrace ();
+            fail();
+            return;
+        }
+
+        StringWriter writer = new StringWriter();
+        try {
+            jaxbMarshaller.marshal (rh, writer);
+        } catch (JAXBException e) {
+            e.printStackTrace();
+            fail ();
+        }
+        String marshalled = writer.toString ();
+        assert(marshalled.contains ("<RequestId>reqid</RequestId>"));
+        
+        InputStream inputStream = new ByteArrayInputStream(marshalled.getBytes(Charset.forName("UTF-8")));
+        try {
+            RequestHeader res2 = (RequestHeader) jaxbUnmarshaller.unmarshal (inputStream);
+            assert(res2.getCallbackUrl ().equals ("callback"));
+            assert(res2.getMsoAction ().equals ("action"));
+            assert(res2.getSvcOperation ().equals ("op"));
+        } catch (JAXBException e) {
+            e.printStackTrace();
+            fail();
+        }
+    }
+
+    /**
+     * Test method for {@link org.openecomp.mso.adapters.sdnc.ObjectFactory#createSDNCAdapterResponse()}.
+     */
+    @Test
+    public final void testCreateSDNCAdapterResponse () {
+        ObjectFactory of = new ObjectFactory ();
+        SDNCAdapterResponse ar = of.createSDNCAdapterResponse ();
+        assert (ar != null);
+    }
+}
diff --git a/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunablesTest.java b/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunablesTest.java
new file mode 100644 (file)
index 0000000..59e561a
--- /dev/null
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.impl;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+public class RequestTunablesTest {
+
+       public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       
+    /**
+     * This method is called before any test occurs.
+     * It creates a fake tree from scratch
+     * @throws MsoPropertiesException 
+     */
+    @BeforeClass
+    public static final void prepare () throws MsoPropertiesException {
+        ClassLoader classLoader = RequestTunablesTest.class.getClassLoader ();
+        String path = classLoader.getResource ("mso.properties").toString ().substring (5);
+        
+        msoPropertiesFactory.initializeMsoProperties(RequestTunables.MSO_PROP_SDNC_ADAPTER, path);
+      
+    }
+
+    /**
+     * Test method for
+     * {@link org.openecomp.mso.adapters.sdnc.impl.RequestTunables#RequestTunables(java.lang.String, java.lang.String, java.lang.String, java.lang.String)}
+     * .
+     */
+    @Test
+    public final void testRequestTunables () {
+        RequestTunables rt = new RequestTunables (null, null, "op", null,msoPropertiesFactory);
+        assert(rt.getReqId ().length ()==0);
+        rt = new RequestTunables ("reqId", "msoAction", null, "query",msoPropertiesFactory);
+        rt.setTunables ();
+        System.out.println(rt.toString ());
+      //  assert (rt.getReqMethod ().equals ("toto"));
+        assert (rt.getTimeout () != null);
+        assert (rt.getAction ().equals ("query"));
+        assert (rt.getMsoAction ().equals ("msoAction"));
+        assert (rt.getHeaderName ().equals ("sdnc-request-header"));
+        assert (rt.getOperation ().length () == 0);
+        assert (rt.getAsyncInd ().equals ("N"));
+        assert (rt.getReqId ().equals ("reqId"));
+    }
+
+}
diff --git a/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/util/SDNCRequestIdUtilTest.java b/adapters/mso-sdnc-adapter/src/test/java/org/openecomp/mso/adapters/sdnc/util/SDNCRequestIdUtilTest.java
new file mode 100644 (file)
index 0000000..d296d8d
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.sdnc.util;
+
+import java.util.UUID;
+import org.junit.Test;
+
+
+public class SDNCRequestIdUtilTest {
+
+    /**
+     * Test method for {@link org.openecomp.mso.adapters.sdnc.SDNCRequestIdUtil#getSDNCOriginalRequestId()}.
+     */
+    @Test
+    public final void testGetSDNCOriginalRequestId () {
+       String originalRequestId = UUID.randomUUID().toString();
+       String postfixedRequestId = originalRequestId + "-1466203712068";
+       String postfixedRequestId2 = originalRequestId + "-1466203712068-2";
+
+        assert(SDNCRequestIdUtil.getSDNCOriginalRequestId(postfixedRequestId).equals(originalRequestId));
+        assert(SDNCRequestIdUtil.getSDNCOriginalRequestId(postfixedRequestId2).equals(postfixedRequestId2));
+       
+    }
+
+}
diff --git a/adapters/mso-sdnc-adapter/src/test/resources/logback-test.xml b/adapters/mso-sdnc-adapter/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..a66a1e8
--- /dev/null
@@ -0,0 +1,47 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/adapters/mso-sdnc-adapter/src/test/resources/mso.properties b/adapters/mso-sdnc-adapter/src/test/resources/mso.properties
new file mode 100644 (file)
index 0000000..5384285
--- /dev/null
@@ -0,0 +1,52 @@
+###
+# ============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=========================================================
+###
+
+### SDNCURL 
+###
+#EE#
+org.openecomp.mso.adapters.sdnc.sdncgeturl=https://localhost:8443/restconf/config/L3SDN-API:
+org.openecomp.mso.adapters.sdnc.sdncposturl=https://localhost:8443/restconf/operations/L3SDN-API:
+#ST#org.openecomp.mso.adapters.sdnc.sdncgeturl=https://sdncodl.mtsnjdcp1.aic.cip.att.com:8443/restconf/config/L3SDN-API:
+#ST#org.openecomp.mso.adapters.sdnc.sdncposturl=https://sdncodl.mtsnjdcp1.aic.cip.att.com:8443/restconf/operations/L3SDN-API:
+#IT#org.openecomp.mso.adapters.sdnc.sdncgeturl=https://odl.node01.it.app.sdn.labs.att.com:8443/restconf/config/L3SDN-API:
+#IT#org.openecomp.mso.adapters.sdnc.sdncposturl=https://odl.node01.it.app.sdn.labs.att.com:8443/restconf/operations/L3SDN-API:
+###
+### BPEL ASYNC CALLLBACK/NOTIFICATION URL
+###
+#EE#
+org.openecomp.mso.adapters.sdnc.bpelurl=http://localhost:8080/active-bpel/services/SDNCAdapterCallbackV1
+#ST#org.openecomp.mso.adapters.sdnc.bpelurl=http://mtsnjv9mobp01.aic.cip.att.com:8080/active-bpel/services/SDNCAdapterCallbackV1
+#IT#org.openecomp.mso.adapters.sdnc.bpelurl=http://mtanjv9mobp01.aic.cip.att.com:8080/active-bpel/services/SDNCAdapterCallbackV1
+#DV#org.openecomp.mso.adapters.sdnc.bpelurl=http://NJCDTL21RA1926.ITServices.sbc.com:8088/mockSDNCCallbackAdapterSoapHttpBinding?wsdl
+###
+### SDNC ASYNC NOTIFICATION/RESPONSE URL
+###
+#EE#
+org.openecomp.mso.adapters.sdnc.myurl=https://localhost:8443/adapters/rest/SDNCNotify
+#ST#org.openecomp.mso.adapters.sdnc.myurl=https://msojra.mtsnjdcp1.aic.cip.att.com:8443/adapters/rest/SDNCNotify
+#IT#org.openecomp.mso.adapters.sdnc.myurl=http://mtanjv9moja01.aic.cip.att.com:8080/adapters/rest/SDNCNotify
+#DV#org.openecomp.mso.adapters.sdnc.myurl=http://NJCDTL21RA1926.ITServices.sbc.com:8080/adapters/rest/SDNCNotify
+###
+org.openecomp.mso.adapters.sdnc.sdncauth=admin:admin
+org.openecomp.mso.adapters.sdnc.bpelauth=avosAdmin:jboss123
+org.openecomp.mso.adapters.sdnc.sdncconnecttime=2000
+org.openecomp.mso.adapters.sdnc.sdncreadtime=5000
+
+org.openecomp.mso.adapters.sdnc...query=toto
diff --git a/adapters/mso-tenant-adapter/README.md b/adapters/mso-tenant-adapter/README.md
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/adapters/mso-tenant-adapter/WebContent/META-INF/MANIFEST.MF b/adapters/mso-tenant-adapter/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..5e94951
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0\r
+Class-Path: \r
+\r
diff --git a/adapters/mso-tenant-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector b/adapters/mso-tenant-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector
new file mode 100644 (file)
index 0000000..1281d32
--- /dev/null
@@ -0,0 +1 @@
+com.woorea.openstack.connector.HttpClientConnector
\ No newline at end of file
diff --git a/adapters/mso-tenant-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml b/adapters/mso-tenant-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..58ddb4a
--- /dev/null
@@ -0,0 +1,16 @@
+<jboss-deployment-structure>\r
+       <deployment>\r
+               <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->\r
+               <exclusions>\r
+                       <module name="org.apache.log4j" />\r
+                       <module name="org.slf4j" />\r
+                       <module name="org.slf4j.impl" />\r
+               </exclusions>\r
+               <dependencies>\r
+                           <module name="org.jboss.jandex" slot="main" />\r
+                <module name="org.javassist" slot="main" />\r
+                <module name="org.antlr" slot="main" />\r
+                <module name="org.dom4j" slot="main" />\r
+               </dependencies>\r
+       </deployment>\r
+</jboss-deployment-structure>
\ No newline at end of file
diff --git a/adapters/mso-tenant-adapter/WebContent/WEB-INF/jboss-web.xml b/adapters/mso-tenant-adapter/WebContent/WEB-INF/jboss-web.xml
new file mode 100644 (file)
index 0000000..5583b34
--- /dev/null
@@ -0,0 +1,3 @@
+<jboss-web>\r
+       <context-root>tenants</context-root>\r
+</jboss-web>
\ No newline at end of file
diff --git a/adapters/mso-tenant-adapter/WebContent/WEB-INF/web.xml b/adapters/mso-tenant-adapter/WebContent/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..9118bba
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+  <display-name>mso-tenant-adapter</display-name>
+
+ <context-param>
+       <param-name>resteasy.jndi.resources</param-name>
+       <param-value>java:module/MsoPropertiesFactory,java:module/CloudConfigFactory</param-value>
+ </context-param>
+
+ <context-param>
+       <param-name>log.configuration</param-name>
+       <param-value>logback.tenant.xml</param-value>
+  </context-param>
+  <context-param>
+       <param-name>mso.configuration</param-name>
+       <param-value>MSO_PROP_TENANT_ADAPTER=mso.tenant.properties,MSO_PROP_TOPOLOGY=topology.properties</param-value>
+  </context-param>
+  <context-param>
+       <param-name>mso.cloud_config.configuration</param-name>
+       <param-value>cloud_config.json=2</param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.resources</param-name>
+    <param-value>
+       org.openecomp.mso.logger.MsoLoggingServlet,
+       org.openecomp.mso.MsoStatusHandler,
+       org.openecomp.mso.adapters.tenant.HealthCheckHandler,
+       org.openecomp.mso.adapters.tenant.TenantAdapterRest
+    </param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.servlet.mapping.prefix</param-name>
+    <param-value>/rest</param-value>
+  </context-param>
+  <servlet>
+    <servlet-name>Resteasy</servlet-name>
+    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Resteasy</servlet-name>
+<!-- <url-pattern>/admin/*</url-pattern> -->
+    <url-pattern>/rest/*</url-pattern>
+  </servlet-mapping>
+
+    <filter>
+               <filter-name>LogFilter</filter-name>
+               <filter-class>org.openecomp.mso.logger.LogFilter</filter-class> 
+    </filter>
+    <filter-mapping>
+               <filter-name>LogFilter</filter-name>
+               <url-pattern>/*</url-pattern>
+       </filter-mapping>
+  <welcome-file-list>
+    <welcome-file>/check.html</welcome-file>
+  </welcome-file-list>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SoapRequests</web-resource-name>
+            <description>Soap Ingress Requests</description>
+            <url-pattern>/TenantAdapter</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>BPEL-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SiteStatus</web-resource-name>
+            <description>SiteStatus APIs</description>
+            <url-pattern>/rest/setStatus/*</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>SiteControl-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>RestRequests</web-resource-name>
+            <description>Rest Ingress Requests</description>
+            <url-pattern>/rest/v1/tenants/*</url-pattern>
+            <http-method>DELETE</http-method>
+            <http-method>GET</http-method>
+            <http-method>POST</http-method>
+            <http-method>PUT</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>BPEL-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <login-config>
+        <auth-method>BASIC</auth-method>
+        <realm-name>ApplicationRealm</realm-name>
+    </login-config>
+    <security-role>
+        <role-name>BPEL-Client</role-name>
+    </security-role>
+    <security-role>
+        <role-name>SiteControl-Client</role-name>
+    </security-role>
+</web-app>
+
diff --git a/adapters/mso-tenant-adapter/WebContent/check.html b/adapters/mso-tenant-adapter/WebContent/check.html
new file mode 100644 (file)
index 0000000..00f37d6
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html>\r
+<html>\r
+<head>\r
+<meta charset="ISO-8859-1">\r
+<title>Health Check</title>\r
+</head>\r
+<body>\r
+Application ready\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/adapters/mso-tenant-adapter/pom.xml b/adapters/mso-tenant-adapter/pom.xml
new file mode 100644 (file)
index 0000000..c649e9e
--- /dev/null
@@ -0,0 +1,155 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-tenant-adapter</artifactId>
+       <packaging>war</packaging>
+       <name>mso-tenant-adapter</name>
+       <description>Web Service endpoint for Tenant operations</description>
+
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-resources-plugin</artifactId>
+                               <version>2.6</version>
+                               <executions>
+                                       <execution>
+                                               <id>copy-resources</id>
+                                               <phase>validate</phase>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>./src/main/resources/META-INF</directory>
+                                                                       <filtering>false</filtering>
+                                                               </resource>
+                                                       </resources>
+                                                       <outputDirectory>${project.build.directory}/${project.build.finalName}/META-INF/</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.4</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                                       <attachClasses>true</attachClasses>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.jvnet.jax-ws-commons</groupId>
+                               <artifactId>jaxws-maven-plugin</artifactId>
+                               <version>2.3</version>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>wsgen</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                               <configuration>
+                                       <verbose>true</verbose>
+                                       <sei>org.openecomp.mso.adapters.tenant.MsoTenantAdapterImpl</sei>
+                                       <genWsdl>true</genWsdl>
+                                       <inlineSchemas>true</inlineSchemas>
+                               </configuration>
+                               <dependencies>
+                                       <dependency>
+                                               <groupId>com.sun.xml.ws</groupId>
+                                               <artifactId>jaxws-tools</artifactId>
+                                               <version>2.2.7</version>
+                                       </dependency>
+                                       <dependency>
+                                               <groupId>org.openecomp.mso.adapters</groupId>
+                                               <artifactId>mso-adapter-utils</artifactId>
+                                               <version>${project.version}</version>
+                                       </dependency>
+                               </dependencies>
+                       </plugin>
+
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings 
+                                       only. It has no influence on the Maven build itself. -->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>
+                                                                                       org.jvnet.jax-ws-commons
+                                                                               </groupId>
+                                                                               <artifactId>
+                                                                                       jaxws-maven-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [2.3,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>wsgen</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-adapter-utils</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-adapters-rest-interface</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>javax</groupId>
+                       <artifactId>javaee-web-api</artifactId>
+                       <version>6.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.spec.javax.ejb</groupId>
+                       <artifactId>jboss-ejb-api_3.2_spec</artifactId>
+                       <version>1.0.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.ejb3</groupId>
+                       <artifactId>jboss-ejb3-ext-api</artifactId>
+                       <version>2.2.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>status-control</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/HealthCheckHandler.java b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/HealthCheckHandler.java
new file mode 100644 (file)
index 0000000..7916be2
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenant;
+
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.HealthCheckUtils;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/")
+       public class HealthCheckHandler {
+               
+               private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+               @HEAD
+           @GET
+           @Path("/healthcheck")
+           @Produces("text/html")
+           public Response healthcheck (@QueryParam("requestId") String requestId) {
+                       long startTime = System.currentTimeMillis ();
+                       MsoLogger.setServiceName ("Healthcheck");
+                       UUIDChecker.verifyOldUUID(requestId, msoLogger);
+                       HealthCheckUtils healthCheck = new HealthCheckUtils ();
+                       if (!healthCheck.siteStatusCheck(msoLogger, startTime)) {
+                               return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+                       }
+
+                       if (!healthCheck.catalogDBCheck (msoLogger, startTime)) {
+                               return HealthCheckUtils.NOT_STARTED_RESPONSE;
+                       }
+                       msoLogger.debug("healthcheck - Successful");
+                       return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+           }
+
+}
diff --git a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapter.java b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapter.java
new file mode 100644 (file)
index 0000000..a86c938
--- /dev/null
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenant;
+
+
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebParam.Mode;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.ws.Holder;
+
+import org.openecomp.mso.adapters.tenant.exceptions.TenantAlreadyExists;
+import org.openecomp.mso.adapters.tenant.exceptions.TenantException;
+import org.openecomp.mso.adapters.tenantrest.TenantRollback;
+import org.openecomp.mso.entity.MsoRequest;
+
+@WebService (name="TenantAdapter", targetNamespace="http://com.att.mso/tenant")
+public interface MsoTenantAdapter
+{
+       /**
+        * This is the "Create Tenant" Web Service Endpoint definition.
+        */
+       @WebMethod
+       public void createTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantName") @XmlElement(required=true) String tenantName,
+                                                       @WebParam(name="metadata") Map<String,String> metadata,
+                                                       @WebParam(name="failIfExists") Boolean failIfExists,
+                                                       @WebParam(name="backout") Boolean backout,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="tenantId", mode=Mode.OUT) Holder<String> tenantId,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<TenantRollback> rollback )
+               throws TenantException, TenantAlreadyExists;
+       
+       @WebMethod
+       public void queryTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantNameOrId") @XmlElement(required=true) String tenantNameOrId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="tenantId", mode=Mode.OUT) Holder<String> tenantId,
+                                                       @WebParam(name="tenantName", mode=Mode.OUT) Holder<String> tenantName,
+                                                       @WebParam(name="metadata", mode=Mode.OUT) Holder<Map<String,String>> metadata )
+               throws TenantException;
+       
+       @WebMethod
+       public void deleteTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="tenantDeleted", mode=Mode.OUT) Holder<Boolean> tenantDeleted)
+               throws TenantException;
+       
+       @WebMethod
+       public void rollbackTenant (@WebParam(name="rollback") @XmlElement(required=true) TenantRollback rollback)
+               throws TenantException;
+       
+       @WebMethod
+       public void healthCheck ();
+}
diff --git a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapterImpl.java b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/MsoTenantAdapterImpl.java
new file mode 100644 (file)
index 0000000..040c682
--- /dev/null
@@ -0,0 +1,279 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenant;
+
+
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceContext;
+
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.adapters.tenant.exceptions.TenantAlreadyExists;
+import org.openecomp.mso.adapters.tenant.exceptions.TenantException;
+import org.openecomp.mso.adapters.tenantrest.TenantRollback;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.MsoTenant;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.utils.MsoTenantUtils;
+import org.openecomp.mso.openstack.utils.MsoTenantUtilsFactory;
+
+@WebService(serviceName = "TenantAdapter", endpointInterface = "org.openecomp.mso.adapters.tenant.MsoTenantAdapter", targetNamespace = "http://com.att.mso/tenant")
+public class MsoTenantAdapterImpl implements MsoTenantAdapter {
+
+       MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       MsoTenantUtilsFactory tFactory = new MsoTenantUtilsFactory(MSO_PROP_TENANT_ADAPTER);
+       
+       public static final String MSO_PROP_TENANT_ADAPTER="MSO_PROP_TENANT_ADAPTER";
+       
+    @Resource
+    WebServiceContext wsContext;
+
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+    /**
+     * Health Check web method. Does nothing but return to show the adapter is deployed.
+     */
+    @Override
+    public void healthCheck () {
+        LOGGER.debug ("Health check call in Tenant Adapter");
+    }
+
+    /**
+     * This is the "Create Tenant" web service implementation. It will create
+     * a new Tenant in the specified cloud. If the tenant already exists, this
+     * can be considered a success or failure, depending on the value of the
+     * 'failIfExists' parameter.
+     *
+     * The method returns the tenantId (the Openstack ID), and a TenantRollback
+     * object. This last object can be passed as-is to the rollbackTenant method
+     * to undo what (if anything) was created. This is useful if a Tenant is
+     * successfully created but the orchestrator fails on a subsequent operation.
+     */
+    @Override
+    public void createTenant (String cloudSiteId,
+                              String tenantName,
+                              Map <String, String> metadata,
+                              Boolean failIfExists,
+                              Boolean backout,
+                              MsoRequest msoRequest,
+                              Holder <String> tenantId,
+                              Holder <TenantRollback> rollback) throws TenantException, TenantAlreadyExists {
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName ("CreateTenant");
+
+        LOGGER.debug ("Call to MSO createTenant adapter. Creating Tenant: " + tenantName
+                                      + "in "
+                                      + cloudSiteId);
+
+        // Will capture total time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        // Start building up rollback object
+        TenantRollback tenantRollback = new TenantRollback ();
+        tenantRollback.setCloudId (cloudSiteId);
+        tenantRollback.setMsoRequest (msoRequest);
+        
+        MsoTenantUtils tUtils = tFactory.getTenantUtils (cloudSiteId);
+
+        MsoTenant newTenant = null;
+        String newTenantId = null;
+        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", "QueryTenant", null);
+        } catch (MsoException me) {
+            LOGGER.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with Open Stack", "OpenStack", "QueryTenant", 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.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new TenantException (me);
+        }
+        if (newTenant == null) {
+            if (backout == null)
+                backout = true;
+            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", "CreateTenant", null);
+            } catch (MsoException me) {
+                LOGGER.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with Open Stack", "OpenStack", "CreateTenant", 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.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                throw new TenantException (me);
+            }
+            tenantRollback.setTenantId (newTenantId);
+            tenantRollback.setTenantCreated (true);
+            LOGGER.debug ("Tenant " + tenantName + " successfully created with ID " + newTenantId);
+        } else {
+            if (failIfExists != null && failIfExists) {
+                String error = "CreateTenant: Tenant " + tenantName + " already exists in " + cloudSiteId;
+                LOGGER.error (MessageEnum.RA_TENANT_ALREADY_EXIST, tenantName, cloudSiteId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "CreateTenant, Tenant already exists");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, error);
+                throw new TenantAlreadyExists (tenantName, cloudSiteId, newTenant.getTenantId ());
+            }
+
+            newTenantId = newTenant.getTenantId ();
+            tenantRollback.setTenantCreated (false);
+            LOGGER.debug ("Tenant " + tenantName + " already exists with ID " + newTenantId);
+        }
+
+
+        tenantId.value = newTenantId;
+        rollback.value = tenantRollback;
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully create tenant");
+        return;
+    }
+
+    @Override
+    public void queryTenant (String cloudSiteId,
+                             String tenantNameOrId,
+                             MsoRequest msoRequest,
+                             Holder <String> tenantId,
+                             Holder <String> tenantName,
+                             Holder <Map <String, String>> metadata) throws TenantException {
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName ("QueryTenant");
+        LOGGER.debug ("Querying Tenant " + tenantNameOrId + " in " + cloudSiteId);
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        MsoTenantUtils tUtils = tFactory.getTenantUtils (cloudSiteId);
+        
+        MsoTenant qTenant = null;
+        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", "QueryTenant", null);
+            if (qTenant == null) {
+                // Not found by ID, Try by name.
+                qTenant = tUtils.queryTenantByName (tenantNameOrId, cloudSiteId);
+            }
+
+            if (qTenant == null) {
+                LOGGER.debug ("QueryTenant: Tenant " + tenantNameOrId + " not found");
+                tenantId.value = null;
+                tenantName.value = null;
+                metadata.value = null;
+            } else {
+                LOGGER.debug ("QueryTenant: Tenant " + tenantNameOrId + " found with ID " + qTenant.getTenantId ());
+                tenantId.value = qTenant.getTenantId ();
+                tenantName.value = qTenant.getTenantName ();
+                metadata.value = qTenant.getMetadata ();
+            }
+        } catch (MsoException me) {
+            String error = "Query Tenant " + tenantNameOrId + ": " + me;
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryTenant", null);
+            LOGGER.error (MessageEnum.RA_GENERAL_EXCEPTION, me.getMessage(), "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception in queryTenant", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new TenantException (me);
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully query tenant");
+        return;
+    }
+
+    @Override
+    public void deleteTenant (String cloudSiteId,
+                              String tenantId,
+                              MsoRequest msoRequest,
+                              Holder <Boolean> tenantDeleted) throws TenantException {
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName ("DeleteTenant");
+
+        LOGGER.debug ("Deleting Tenant " + tenantId + " in " + cloudSiteId);
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        // Delete the Tenant.
+        long subStartTime = System.currentTimeMillis ();
+        try {
+               
+               MsoTenantUtils tUtils = tFactory.getTenantUtils (cloudSiteId);
+            boolean deleted = tUtils.deleteTenant (tenantId, cloudSiteId);
+            tenantDeleted.value = deleted;
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully communicate with Open Stack", "OpenStack", "DeleteTenant", null);
+        } catch (MsoException me) {
+            String error = "Delete Tenant " + tenantId + ": " + me;
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "DeleteTenant", null);
+            LOGGER.error (MessageEnum.RA_DELETE_TEMAMT_ERR, me.getMessage(), "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception - DeleteTenant", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new TenantException (me);
+        }
+
+        // On success, nothing is returned.
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully delete tenant");
+        return;
+    }
+
+    /**
+     * This web service endpoint will rollback a previous Create VNF operation.
+     * A rollback object is returned to the client in a successful creation
+     * response. The client can pass that object as-is back to the rollbackVnf
+     * operation to undo the creation.
+     *
+     * The rollback includes removing the VNF and deleting the tenant if the
+     * tenant did not exist prior to the VNF creation.
+     */
+    @Override
+    public void rollbackTenant (TenantRollback rollback) throws TenantException {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("RollbackTenant");
+        // rollback may be null (e.g. if stack already existed when Create was called)
+        if (rollback == null) {
+            LOGGER.warn (MessageEnum.RA_ROLLBACK_NULL, "OpenStack", "rollbackTenant", MsoLogger.ErrorCode.DataError, "rollbackTenant, rollback is null");
+            return;
+        }
+
+        // Get the elements of the VnfRollback object for easier access
+        String cloudSiteId = rollback.getCloudId ();
+        String tenantId = rollback.getTenantId ();
+
+        MsoLogger.setLogContext (rollback.getMsoRequest ());
+        LOGGER.debug ("Rolling Back Tenant " + rollback.getTenantId () + " in " + cloudSiteId);
+
+        long subStartTime = System.currentTimeMillis ();
+        if (rollback.getTenantCreated ()) {
+            try {
+                
+               MsoTenantUtils tUtils = tFactory.getTenantUtils (cloudSiteId);
+                tUtils.deleteTenant (tenantId, cloudSiteId);
+                LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully communicate with Open Stack", "OpenStack", "RollbackTenant", null);
+            } catch (MsoException me) {
+                me.addContext ("RollbackTenant");
+                // Failed to delete the tenant.
+                String error = "Rollback Tenant " + tenantId + ": " + me;
+                LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "RollbackTenant", null);
+                LOGGER.error (MessageEnum.RA_ROLLBACK_TENANT_ERR, me.getMessage(), "OpenStack", "rollbackTenant", MsoLogger.ErrorCode.DataError, "Exception - rollbackTenant", me);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                throw new TenantException (me);
+            }
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully roll back tenant");
+        return;
+    }
+}
diff --git a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/TenantAdapterRest.java b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/TenantAdapterRest.java
new file mode 100644 (file)
index 0000000..0c9993c
--- /dev/null
@@ -0,0 +1,297 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenant;
+
+
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+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.xml.ws.Holder;
+
+import org.openecomp.mso.adapters.tenant.exceptions.TenantAlreadyExists;
+import org.openecomp.mso.adapters.tenant.exceptions.TenantException;
+import org.openecomp.mso.adapters.tenantrest.CreateTenantError;
+import org.openecomp.mso.adapters.tenantrest.CreateTenantRequest;
+import org.openecomp.mso.adapters.tenantrest.CreateTenantResponse;
+import org.openecomp.mso.adapters.tenantrest.DeleteTenantError;
+import org.openecomp.mso.adapters.tenantrest.DeleteTenantRequest;
+import org.openecomp.mso.adapters.tenantrest.DeleteTenantResponse;
+import org.openecomp.mso.adapters.tenantrest.QueryTenantError;
+import org.openecomp.mso.adapters.tenantrest.QueryTenantResponse;
+import org.openecomp.mso.adapters.tenantrest.RollbackTenantError;
+import org.openecomp.mso.adapters.tenantrest.RollbackTenantRequest;
+import org.openecomp.mso.adapters.tenantrest.RollbackTenantResponse;
+import org.openecomp.mso.adapters.tenantrest.TenantRollback;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.MsoTenant;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+/**
+ * This class services calls to the REST interface for Tenants (http://host:port/vnfs/rest/v1/tenants)
+ * Both XML and JSON can be produced/consumed.  Set Accept: and Content-Type: headers appropriately.  XML is the default.
+ */
+@Path("/v1/tenants")
+public class TenantAdapterRest {
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+       //RAA? No logging in wrappers
+
+       @HEAD
+       @GET
+       @Path("/healthcheck")
+       @Produces(MediaType.TEXT_HTML)
+       public Response healthcheck () {
+               String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
+               return Response.status (HttpServletResponse.SC_OK).entity (CHECK_HTML).build ();
+       }
+
+       /*
+       URL:
+       EP: http://host:8080/tenants/rest
+       Resource: v1/tenants
+       REQ - metadata?
+       {
+       "cloudSiteId": "DAN",
+       "tenantName": "RAA_1",
+       "failIfExists": true,
+       "msoRequest": {
+       "requestId": "ra1",
+       "serviceInstanceId": "sa1"
+       }}
+       RESP-
+       {
+   "cloudSiteId": "DAN",
+   "tenantId": "128e10b9996d43a7874f19bbc4eb6749",
+   "tenantCreated": true,
+   "tenantRollback":    {
+      "tenantId": "128e10b9996d43a7874f19bbc4eb6749",
+      "cloudId": "DAN", // RAA? cloudId instead of cloudSiteId
+      "tenantCreated": true,
+      "msoRequest":       {
+         "requestId": "ra1",
+         "serviceInstanceId": "sa1"
+      }
+        }
+       }
+       */
+       @POST
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response createTenant(CreateTenantRequest req) {
+               LOGGER.debug("createTenant enter: " + req.toJsonString());
+
+               String newTenantId = null;
+               TenantRollback tenantRollback = new TenantRollback ();
+
+               try {
+                       Holder<String> htenant = new Holder<String>();
+                       Holder<TenantRollback> hrollback = new Holder<TenantRollback>();
+                       MsoTenantAdapter impl = new MsoTenantAdapterImpl();
+                   impl.createTenant(
+                       req.getCloudSiteId(),
+                       req.getTenantName(),
+                       req.getMetadata(),
+                       req.getFailIfExists(),
+                req.getBackout(),
+                req.getMsoRequest(),
+                htenant,
+                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) {
+                       CreateTenantError exc = new CreateTenantError(tae.getMessage(), tae.getFaultInfo().getCategory(), Boolean.TRUE);
+                       return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).entity(exc).build();
+               }
+               catch (TenantException 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) {
+                       CreateTenantError exc = new CreateTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE);
+                       return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
+               }
+
+               CreateTenantResponse resp = new CreateTenantResponse (req.getCloudSiteId(), newTenantId, tenantRollback.getTenantCreated(), tenantRollback);
+               return Response.status(HttpServletResponse.SC_OK).entity(resp).build();
+       }
+
+       /*
+       URL:
+       http://host:8080/tenants/rest
+       Resource: v1/tenant/tennatId
+       REQ:
+       {"cloudSiteId": "DAN",
+       "tenantId": "ca84cd3d3df44272845da554656b3ace",
+       "msoRequest": {
+       "requestId": "ra1",
+       "serviceInstanceId": "sa1"
+       }
+       }
+       RESP:
+       {"tenantDeleted": true}
+        */
+       @DELETE
+       @Path("{tenantId}")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response deleteTenant(
+               @PathParam("tenantId") String tenantId,
+               DeleteTenantRequest req)
+       {
+               boolean tenantDeleted = false;
+
+               try {
+                       Holder<Boolean> deleted = new Holder<Boolean>();
+                       MsoTenantAdapter impl = new MsoTenantAdapterImpl();
+                   impl.deleteTenant(
+                       req.getCloudSiteId(),
+                       req.getTenantId(),
+                       req.getMsoRequest(),
+                       deleted);
+                   tenantDeleted = deleted.value;
+               }
+               catch (TenantException 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) {
+                       DeleteTenantError exc = new DeleteTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE);
+                       return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
+               }
+               DeleteTenantResponse resp = new DeleteTenantResponse();
+               resp.setTenantDeleted(tenantDeleted);
+               return Response.status(HttpServletResponse.SC_OK).entity(resp).build();
+       }
+
+       /*
+       URL
+       EP://http://host:8080/tenants/rest
+       Resource: /v1/tenants
+       Params:?tenantNameOrId=RAA_1&cloudSiteId=DAN
+       RESP
+       {
+                  "tenantId": "214b428a1f554c02935e66330f6a5409",
+                  "tenantName": "RAA_1",
+                  "metadata": {}
+       }
+       */
+       @GET
+       @Path("{tenantId}")
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response queryTenant(
+                       @PathParam("tenantId") String tenantId,
+//                     @QueryParam("tenantNameOrId") String tenantNameOrId, //RAA? diff from doc
+                       @QueryParam("cloudSiteId") String cloudSiteId,
+                       @QueryParam("msoRequest.requestId") String requestId,
+                       @QueryParam("msoRequest.serviceInstanceId") String serviceInstanceId)
+       {
+               MsoTenant tenant = null;
+               try {
+                       Holder<String> htenant = new Holder<String>();
+                       Holder<String> tenantName = new Holder<String>();
+                       Holder<Map<String,String>> metadata = new Holder<Map<String,String>>();
+                       MsoTenantAdapter impl = new MsoTenantAdapterImpl();
+                   impl.queryTenant(
+                       cloudSiteId,
+                       tenantId,
+                       null,
+                       htenant,
+                       tenantName,
+                       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) {
+                       QueryTenantError exc = new QueryTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory());
+                       return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
+               }
+               catch (Exception e) {
+                       QueryTenantError exc = new QueryTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL);
+                       return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
+               }
+               QueryTenantResponse resp = new QueryTenantResponse(tenant.getTenantId(), tenant.getTenantName(), tenant.getMetadata());
+               return Response.status(HttpServletResponse.SC_OK).entity(resp).build();
+       }
+
+       /*
+       URL
+       EP: //http://host:8080/tenants/rest
+       Resource: /v1/tenants/rollback
+       REQ
+       {"cloudSiteId": "DAN",
+       "tenantId": "f58abb05041d4ff384d4d22d1ccd2a6c",
+       "msoRequest": {
+       "requestId": "ra1",
+       "serviceInstanceId": "sa1"
+       }
+       }
+       RESP:
+       {"tenantDeleted": true}
+        */
+       @DELETE
+       @Path("")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response rollbackTenant(
+               @QueryParam("rollback") String action, // WTF?
+               RollbackTenantRequest req)
+       {
+               try {
+                       MsoTenantAdapter impl = new MsoTenantAdapterImpl();
+                   impl.rollbackTenant(req.getTenantRollback());
+               }
+               catch (TenantException 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) {
+                       RollbackTenantError exc = new RollbackTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE);
+                       return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
+               }
+
+               RollbackTenantResponse resp = new RollbackTenantResponse ();
+               resp.setTenantRolledback(req != null);
+               return Response.status(HttpServletResponse.SC_OK).entity(resp).build();
+       }
+}
diff --git a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantAlreadyExists.java b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantAlreadyExists.java
new file mode 100644 (file)
index 0000000..cc80b94
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenant.exceptions;
+
+
+
+import javax.xml.ws.WebFault;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+
+/**
+ * This class reports an exception when trying to create a VNF when another
+ * VNF of the same name already exists in the target cloud/tenant.  Note that
+ * the createVnf method suppresses this exception by default.
+ * 
+ *
+ */
+@WebFault (name="TenantAlreadyExists", faultBean="org.openecomp.mso.adapters.tenant.exceptions.TenantExceptionBean", targetNamespace="http://com.att.mso/tenant")
+public class TenantAlreadyExists extends TenantException {
+
+       private static final long serialVersionUID = 1L;
+
+       public TenantAlreadyExists (String name, String cloudId, String tenantId) {
+               super("Tenant " + name + " already exists in " + cloudId + " with ID " + tenantId, MsoExceptionCategory.USERDATA);
+       }
+}
diff --git a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantException.java b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantException.java
new file mode 100644 (file)
index 0000000..f68b0fa
--- /dev/null
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenant.exceptions;
+
+
+
+import javax.xml.ws.WebFault;
+
+import org.openecomp.mso.adapters.tenant.exceptions.TenantExceptionBean;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+/**
+ * This class simply extends Exception (without addition additional functionality)
+ * to provide an identifier for Tenant related exceptions on create, delete, query.
+ * 
+ *
+ */
+@WebFault (name="TenantException", faultBean="org.openecomp.mso.adapters.tenant.exceptions.TenantExceptionBean", targetNamespace="http://com.att.mso/tenant")
+public class TenantException extends Exception {
+
+       private static final long serialVersionUID = 1L;
+
+       private TenantExceptionBean faultInfo;
+       
+       public TenantException (String msg) {
+               super(msg);
+               faultInfo = new TenantExceptionBean (msg);
+       }
+       
+       public TenantException (String msg, Throwable e) {
+               super (msg, e);
+               faultInfo = new TenantExceptionBean (msg);
+       }
+
+       public TenantException (String msg, MsoExceptionCategory category) {
+               super(msg);
+               faultInfo = new TenantExceptionBean (msg, category);
+       }
+       
+       public TenantException (String msg, MsoExceptionCategory category, Throwable e) {
+               super (msg, e);
+               faultInfo = new TenantExceptionBean (msg, category);
+       }
+       
+       public TenantException (MsoException e) {
+               super (e);
+               faultInfo = new TenantExceptionBean (e.getContextMessage(), e.getCategory());
+       }
+
+       public TenantExceptionBean getFaultInfo() {
+               return faultInfo;
+       }
+
+       public void setFaultInfo(TenantExceptionBean faultInfo) {
+               this.faultInfo = faultInfo;
+       }
+}
diff --git a/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantExceptionBean.java b/adapters/mso-tenant-adapter/src/main/java/org/openecomp/mso/adapters/tenant/exceptions/TenantExceptionBean.java
new file mode 100644 (file)
index 0000000..61c8f33
--- /dev/null
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenant.exceptions;
+
+
+import java.io.Serializable;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+/**
+ * Jax-WS Fault Bean for Network Exceptions
+ */
+public class TenantExceptionBean implements Serializable {
+
+    private static final long serialVersionUID = -9062290006520066109L;
+
+    private String message;
+       private MsoExceptionCategory category;
+
+       public TenantExceptionBean () {}
+
+       public TenantExceptionBean (String message) {
+               this.message = message;
+       }
+
+       public TenantExceptionBean (String message, MsoExceptionCategory category) {
+               this.message = message;
+               this.category = category;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+}
diff --git a/adapters/mso-tenant-adapter/src/test/java/org/openecomp/mso/adapters/tenant/test/TenantTest.java b/adapters/mso-tenant-adapter/src/test/java/org/openecomp/mso/adapters/tenant/test/TenantTest.java
new file mode 100644 (file)
index 0000000..dac0e6e
--- /dev/null
@@ -0,0 +1,132 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.tenant.test;
+
+
+
+import java.util.Map;
+
+import javax.xml.ws.Holder;
+
+import org.openecomp.mso.adapters.tenant.MsoTenantAdapter;
+import org.openecomp.mso.adapters.tenant.MsoTenantAdapterImpl;
+import org.openecomp.mso.adapters.tenant.exceptions.TenantException;
+import org.openecomp.mso.adapters.tenantrest.TenantRollback;
+
+public class TenantTest {
+       public static final void main (String args[])
+       {
+               String cloudId = "MT";
+                cloudId = "AIC_GAMMALAB";
+               
+               MsoTenantAdapter tenantAdapter = new MsoTenantAdapterImpl();
+               
+               Holder<String> tenantId = new Holder<String>();
+               Holder<String> tenantName = new Holder<String>();
+               Holder<Map<String,String>> tenantMetadata = new Holder<Map<String,String>>();
+               Holder<Boolean> tenantDeleted = new Holder<Boolean>();
+               Holder<TenantRollback> rollback = new Holder<TenantRollback>();
+               
+               try {
+                       tenantAdapter.queryTenant (cloudId, "934a4ac9c4bd4b8d9d8ab3ef900281b0", null, tenantId, tenantName, tenantMetadata);
+                       System.out.println ("Got Tenant ID=" + tenantId.value + ", name=" + tenantName.value + ", metadata = " + tenantMetadata.value);
+               }
+               catch (TenantException e) {
+                       System.out.println ("Got Tenant Exception: " + e);
+                       System.exit(1);
+               }
+/*             
+               Map<String,String> metadata = new HashMap<String,String>();
+               metadata.put("sdn-global-id", "abc");
+               metadata.put("service-type", "gamma");
+               
+               // Create a new tenant
+               try {
+                       tenantAdapter.createTenant(cloudId, "TEST_META6", metadata, true, tenantId, rollback);
+                       System.out.println ("Created Tenant ID " + tenantId.value);
+               }
+               catch (TenantAlreadyExists e) {
+                       System.out.println ("Create: Tenant already exists: " + "TEST_META6");
+               }
+               catch (TenantException e) {
+                       System.out.println ("Got Tenant Exception on Create: " + e);
+                       System.exit(1);
+               }
+               
+               // Query the new tenant
+               try {
+                       tenantAdapter.queryTenant (cloudId, "TEST_META6", tenantId, tenantName, tenantMetadata);
+                       System.out.println ("Queried Tenant ID=" + tenantId.value + ", name=" + tenantName.value + ", metadata = " + tenantMetadata.value);
+               }
+               catch (TenantException e) {
+                       System.out.println ("Got Tenant Exception on Query: " + e);
+                       System.exit(1);
+               }
+               
+               try {
+                       Thread.sleep(10000);
+               } catch (InterruptedException e1) {}
+               
+               // Delete the new tenant
+               try {
+                       tenantAdapter.deleteTenant (cloudId, tenantId.value, tenantDeleted);
+                       if (tenantDeleted.value)
+                               System.out.println ("Deleted Tenant " + tenantId.value);
+                       else
+                               System.out.println ("Delete: Tenant " + tenantId.value + " does not exist");
+               }
+               catch (TenantException e) {
+                       System.out.println ("Got Tenant Exception on Delete: " + e);
+               }
+/*
+               // Create another new tenant
+               try {
+                       tenantAdapter.createTenant(cloudId, "TEST_MSO2", null, false, tenantId, rollback);
+                       System.out.println ("Created Tenant ID " + tenantId.value);
+               }
+               catch (TenantException e) {
+                       System.out.println ("Got Tenant Exception on Create: " + e);
+               }
+               
+               // Query the new tenant
+               try {
+                       tenantAdapter.queryTenant (cloudId, "TEST_MSO2", tenantId, tenantName);
+                       System.out.println ("Queried Tenant ID=" + tenantId.value + ", name=" + tenantName.value);
+               }
+               catch (TenantException e) {
+                       System.out.println ("Got Tenant Exception on Query: " + e);
+               }
+               
+               try {
+                       Thread.sleep(10000);
+               } catch (InterruptedException e1) {}
+
+               // Rollback the new tenant
+               try {
+                       tenantAdapter.rollbackTenant(rollback.value);
+                       System.out.println ("Rolled Back Tenant ID " + tenantId.value);
+               }
+               catch (TenantException e) {
+                       System.out.println ("Got Tenant Exception on Rollback: " + e);
+               }
+*/
+       }
+}
diff --git a/adapters/mso-tenant-adapter/src/test/resources/logback-test.xml b/adapters/mso-tenant-adapter/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..a23395f
--- /dev/null
@@ -0,0 +1,47 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/adapters/mso-vnf-adapter-async-client/README.md b/adapters/mso-vnf-adapter-async-client/README.md
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/adapters/mso-vnf-adapter-async-client/WebContent/META-INF/MANIFEST.MF b/adapters/mso-vnf-adapter-async-client/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..254272e
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+
diff --git a/adapters/mso-vnf-adapter-async-client/pom.xml b/adapters/mso-vnf-adapter-async-client/pom.xml
new file mode 100644 (file)
index 0000000..fc10f1c
--- /dev/null
@@ -0,0 +1,90 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-vnf-adapter-async-client</artifactId>
+       <packaging>jar</packaging>
+       <name>mso-vnf-adapter-async-client</name>
+       <description>MSO VNF Adapter Async Client</description>
+
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <version>2.6</version>
+                               <configuration>
+                                       <classesDirectory>target/classes</classesDirectory>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.jvnet.jax-ws-commons</groupId>
+                               <artifactId>jaxws-maven-plugin</artifactId>
+                               <version>2.3</version>
+                               <executions>
+                                       <execution>
+                                               <id>generate-stubs</id>
+                                               <phase>process-classes</phase>
+                                               <goals>
+                                                       <goal>wsimport</goal>
+                                               </goals>
+                                               <configuration>
+                            <vmArgs>
+                                <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
+                            </vmArgs>
+                                                       <wsdlDirectory>src/main/resources</wsdlDirectory>
+                                                       <wsdlFiles>
+                                                               <wsdlFile>VnfAdapterNotify.wsdl</wsdlFile>
+                                                       </wsdlFiles>
+                                                       <wsdlLocation>/VnfAdapterNotify.wsdl</wsdlLocation>
+                                                       <packageName>org.openecomp.mso.adapters.vnf.async.client</packageName>
+                                                       <xnocompile>false</xnocompile>
+                                                       <keep>true</keep>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings 
+                                       only. It has no influence on the Maven build itself. -->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>
+                                                                                       org.jvnet.jax-ws-commons
+                                                                               </groupId>
+                                                                               <artifactId>
+                                                                                       jaxws-maven-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [2.3,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>wsimport</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+</project>
diff --git a/adapters/mso-vnf-adapter-async-client/src/main/resources/VnfAdapterNotify.wsdl b/adapters/mso-vnf-adapter-async-client/src/main/resources/VnfAdapterNotify.wsdl
new file mode 100644 (file)
index 0000000..aecef0d
--- /dev/null
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01  svn-revision#13316. -->
+<definitions targetNamespace="http://com.att.mso/vnfNotify" name="vnfAdapterNotify" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://com.att.mso/vnfNotify" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+  <types>
+    <xs:schema version="1.0" targetNamespace="http://com.att.mso/vnfNotify" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+      <xs:element name="createVnfNotification" type="tns:createVnfNotification"/>
+      
+       <xs:element name="updateVnfNotification" type="tns:updateVnfNotification"/>
+
+      <xs:element name="deleteVnfNotification" type="tns:deleteVnfNotification"/>
+
+      <xs:element name="queryVnfNotification" type="tns:queryVnfNotification"/>
+
+      <xs:element name="rollbackVnfNotification" type="tns:rollbackVnfNotification"/>
+
+      <xs:complexType name="queryVnfNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfExists" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="vnfId" type="xs:string" minOccurs="0"/>
+          <xs:element name="status" type="tns:vnfStatus" minOccurs="0"/>
+          <xs:element name="outputs" minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="deleteVnfNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="rollbackVnfNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="createVnfNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfId" type="xs:string" minOccurs="0"/>
+          <xs:element name="outputs"  minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="rollback" type="tns:vnfRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      
+      <xs:complexType name="updateVnfNotification">
+        <xs:sequence>
+          <xs:element name="messageId" type="xs:string"/>
+          <xs:element name="completed" type="xs:boolean"/>
+          <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="errorMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="outputs"  minOccurs="0">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="rollback" type="tns:vnfRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="vnfRollback">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string" minOccurs="0"/>
+          <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/>
+          <xs:element name="tenantCreated" type="xs:boolean"/>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfCreated" type="xs:boolean"/>
+          <xs:element name="vnfId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:complexType name="msoRequest">
+        <xs:sequence>
+          <xs:element name="requestId" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:simpleType name="msoExceptionCategory">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="OPENSTACK"/>
+          <xs:enumeration value="IO"/>
+          <xs:enumeration value="INTERNAL"/>
+          <xs:enumeration value="USERDATA"/>
+        </xs:restriction>
+      </xs:simpleType>
+
+      <xs:simpleType name="vnfStatus">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="ACTIVE"/>
+          <xs:enumeration value="FAILED"/>
+          <xs:enumeration value="NOTFOUND"/>
+          <xs:enumeration value="UNKNOWN"/>
+        </xs:restriction>
+      </xs:simpleType>
+</xs:schema>
+  </types>
+  <message name="rollbackVnfNotification">
+    <part name="parameters" element="tns:rollbackVnfNotification"/>
+  </message>
+  <message name="queryVnfNotification">
+    <part name="parameters" element="tns:queryVnfNotification"/>
+  </message>
+  <message name="createVnfNotification">
+    <part name="parameters" element="tns:createVnfNotification"/>
+  </message>
+  <message name="updateVnfNotification">
+    <part name="parameters" element="tns:updateVnfNotification"/>
+  </message>
+  <message name="deleteVnfNotification">
+    <part name="parameters" element="tns:deleteVnfNotification"/>
+  </message>
+  <portType name="vnfAdapterNotify">
+    <operation name="rollbackVnfNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/rollbackVnfNotificationRequest" message="tns:rollbackVnfNotification"/>
+    </operation>
+    <operation name="queryVnfNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/queryVnfNotificationRequest" message="tns:queryVnfNotification"/>
+    </operation>
+    <operation name="createVnfNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/createVnfNotificationRequest" message="tns:createVnfNotification"/>
+    </operation>
+      <operation name="updateVnfNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/updateVnfNotificationRequest" message="tns:updateVnfNotification"/>
+    </operation>
+    <operation name="deleteVnfNotification">
+      <input wsam:Action="http://com.att.mso/notify/adapterNotify/deleteVnfNotificationRequest" message="tns:deleteVnfNotification"/>
+    </operation>
+  </portType>
+  <binding name="MsoVnfAdapterAsyncImplPortBinding" type="tns:vnfAdapterNotify">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="rollbackVnfNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+    </operation>
+    <operation name="queryVnfNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+    </operation>
+    <operation name="createVnfNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+    </operation>
+    <operation name="updateVnfNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+    </operation>
+    <operation name="deleteVnfNotification">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+    </operation>
+  </binding>
+  <service name="vnfAdapterNotify">
+    <port name="MsoVnfAdapterAsyncImplPort" binding="tns:MsoVnfAdapterAsyncImplPortBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>
+
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTest.java
new file mode 100644 (file)
index 0000000..bd72cac
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:47:44 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CreateVnfNotificationESTest extends CreateVnfNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.completed = true;
+      boolean boolean0 = createVnfNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.vnfId = "hxb7d^";
+      String string0 = createVnfNotification0.getVnfId();
+      assertEquals("hxb7d^", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.vnfId = "";
+      String string0 = createVnfNotification0.getVnfId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVnfCreated(true);
+      createVnfNotification0.setRollback(vnfRollback0);
+      VnfRollback vnfRollback1 = createVnfNotification0.getRollback();
+      assertSame(vnfRollback1, vnfRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      VnfRollback vnfRollback0 = new VnfRollback();
+      createVnfNotification0.rollback = vnfRollback0;
+      VnfRollback vnfRollback1 = createVnfNotification0.getRollback();
+      assertFalse(vnfRollback1.isVnfCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      CreateVnfNotification.Outputs createVnfNotification_Outputs0 = new CreateVnfNotification.Outputs();
+      createVnfNotification0.outputs = createVnfNotification_Outputs0;
+      CreateVnfNotification.Outputs createVnfNotification_Outputs1 = createVnfNotification0.getOutputs();
+      assertSame(createVnfNotification_Outputs1, createVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.messageId = "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory";
+      String string0 = createVnfNotification0.getMessageId();
+      assertEquals("org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      createVnfNotification0.exception = msoExceptionCategory0;
+      MsoExceptionCategory msoExceptionCategory1 = createVnfNotification0.getException();
+      assertEquals(MsoExceptionCategory.OPENSTACK, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.errorMessage = "=(,wm";
+      String string0 = createVnfNotification0.getErrorMessage();
+      assertEquals("=(,wm", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CreateVnfNotification.Outputs createVnfNotification_Outputs0 = new CreateVnfNotification.Outputs();
+      createVnfNotification_Outputs0.getEntry();
+      List<CreateVnfNotification.Outputs.Entry> list0 = createVnfNotification_Outputs0.getEntry();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      CreateVnfNotification.Outputs createVnfNotification_Outputs0 = new CreateVnfNotification.Outputs();
+      createVnfNotification0.setOutputs(createVnfNotification_Outputs0);
+      assertNull(createVnfNotification0.getErrorMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      VnfRollback vnfRollback0 = createVnfNotification0.getRollback();
+      assertNull(vnfRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK;
+      createVnfNotification0.setException(msoExceptionCategory0);
+      assertFalse(createVnfNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      String string0 = createVnfNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      CreateVnfNotification.Outputs createVnfNotification_Outputs0 = createVnfNotification0.getOutputs();
+      assertNull(createVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.setCompleted(false);
+      assertFalse(createVnfNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      String string0 = createVnfNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.setVnfId("N");
+      assertNull(createVnfNotification0.getException());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.setErrorMessage("");
+      String string0 = createVnfNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      String string0 = createVnfNotification0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      createVnfNotification0.setMessageId("");
+      String string0 = createVnfNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      boolean boolean0 = createVnfNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = new CreateVnfNotification.Outputs.Entry();
+      createVnfNotification_Outputs_Entry0.setValue("`)_fe1");
+      assertNull(createVnfNotification_Outputs_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = new CreateVnfNotification.Outputs.Entry();
+      createVnfNotification_Outputs_Entry0.setKey("");
+      assertEquals("", createVnfNotification_Outputs_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = new CreateVnfNotification.Outputs.Entry();
+      String string0 = createVnfNotification_Outputs_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = new CreateVnfNotification.Outputs.Entry();
+      String string0 = createVnfNotification_Outputs_Entry0.getKey();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..ff2e368
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:47:44 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CreateVnfNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateVnfNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification$Outputs$Entry",
+      "org.openecomp.mso.adapters.vnf.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification$Outputs",
+      "org.openecomp.mso.adapters.vnf.async.client.VnfRollback",
+      "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTest.java
new file mode 100644 (file)
index 0000000..0d42b35
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:48:02 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DeleteVnfNotificationESTest extends DeleteVnfNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      deleteVnfNotification0.setCompleted(true);
+      boolean boolean0 = deleteVnfNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      deleteVnfNotification0.messageId = "H\"7~I/-7S[";
+      String string0 = deleteVnfNotification0.getMessageId();
+      assertEquals("H\"7~I/-7S[", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      deleteVnfNotification0.messageId = "";
+      String string0 = deleteVnfNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.USERDATA;
+      deleteVnfNotification0.exception = msoExceptionCategory0;
+      MsoExceptionCategory msoExceptionCategory1 = deleteVnfNotification0.getException();
+      assertEquals(MsoExceptionCategory.USERDATA, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      deleteVnfNotification0.errorMessage = "";
+      deleteVnfNotification0.errorMessage = "H\"7~I/-7S[";
+      String string0 = deleteVnfNotification0.getErrorMessage();
+      assertEquals("H\"7~I/-7S[", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      deleteVnfNotification0.setErrorMessage("");
+      String string0 = deleteVnfNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      boolean boolean0 = deleteVnfNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      deleteVnfNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      String string0 = deleteVnfNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      String string0 = deleteVnfNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      deleteVnfNotification0.setMessageId("Jl^?zBSSPj<c<rl");
+      assertEquals("Jl^?zBSSPj<c<rl", deleteVnfNotification0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      MsoExceptionCategory msoExceptionCategory0 = deleteVnfNotification0.exception;
+      deleteVnfNotification0.setException(msoExceptionCategory0);
+      assertNull(deleteVnfNotification0.getErrorMessage());
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..ea624cf
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:48:02 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DeleteVnfNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DeleteVnfNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoExceptionCategoryESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoExceptionCategoryESTest.java
new file mode 100644 (file)
index 0000000..74b074c
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:52:03 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoExceptionCategoryESTest extends MsoExceptionCategoryESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoExceptionCategory[] msoExceptionCategoryArray0 = MsoExceptionCategory.values();
+      assertNotNull(msoExceptionCategoryArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.valueOf("INTERNAL");
+      assertEquals(MsoExceptionCategory.INTERNAL, msoExceptionCategory0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.valueOf((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.valueOf("sm%");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory.sm%
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.fromValue((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        MsoExceptionCategory.fromValue("'E'J4$ovJ-=|?p<\7fo5");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory.'E'J4$ovJ-=|?p<\7fo5
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      String string0 = msoExceptionCategory0.value();
+      assertEquals("IO", string0);
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoExceptionCategoryESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoExceptionCategoryESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8b4298b
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:52:03 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoExceptionCategoryESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoExceptionCategoryESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoExceptionCategoryESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"
+    );
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoRequestESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoRequestESTest.java
new file mode 100644 (file)
index 0000000..7a1583e
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:46:30 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoRequestESTest extends MsoRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("1lbEy=v({)?8!~ gb2");
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertEquals("1lbEy=v({)?8!~ gb2", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("");
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.requestId = "<;cSWuoV*]74";
+      String string0 = msoRequest0.getRequestId();
+      assertEquals("<;cSWuoV*]74", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.requestId = "";
+      String string0 = msoRequest0.getRequestId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setRequestId((String) null);
+      assertNull(msoRequest0.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      String string0 = msoRequest0.getRequestId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoRequestESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c758057
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:46:30 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.MsoRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.MsoRequest"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTest.java
new file mode 100644 (file)
index 0000000..ecfd66d
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:50:08 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import javax.xml.bind.JAXBElement;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ObjectFactoryESTest extends ObjectFactoryESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateVnfNotification createVnfNotification0 = objectFactory0.createCreateVnfNotification();
+      assertNull(createVnfNotification0.getErrorMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      JAXBElement<UpdateVnfNotification> jAXBElement0 = objectFactory0.createUpdateVnfNotification(updateVnfNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryVnfNotification queryVnfNotification0 = objectFactory0.createQueryVnfNotification();
+      assertNull(queryVnfNotification0.getException());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      MsoRequest msoRequest0 = objectFactory0.createMsoRequest();
+      assertNull(msoRequest0.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateVnfNotification createVnfNotification0 = new CreateVnfNotification();
+      JAXBElement<CreateVnfNotification> jAXBElement0 = objectFactory0.createCreateVnfNotification(createVnfNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      VnfRollback vnfRollback0 = objectFactory0.createVnfRollback();
+      assertNull(vnfRollback0.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification();
+      JAXBElement<DeleteVnfNotification> jAXBElement0 = objectFactory0.createDeleteVnfNotification(deleteVnfNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = objectFactory0.createUpdateVnfNotificationOutputsEntry();
+      assertNull(updateVnfNotification_Outputs_Entry0.getValue());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateVnfNotification.Outputs createVnfNotification_Outputs0 = objectFactory0.createCreateVnfNotificationOutputs();
+      assertNotNull(createVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateVnfNotification updateVnfNotification0 = objectFactory0.createUpdateVnfNotification();
+      assertNull(updateVnfNotification0.getMessageId());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      UpdateVnfNotification.Outputs updateVnfNotification_Outputs0 = objectFactory0.createUpdateVnfNotificationOutputs();
+      assertNotNull(updateVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = objectFactory0.createCreateVnfNotificationOutputsEntry();
+      assertNull(createVnfNotification_Outputs_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      DeleteVnfNotification deleteVnfNotification0 = objectFactory0.createDeleteVnfNotification();
+      assertNull(deleteVnfNotification0.getErrorMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryVnfNotification.Outputs queryVnfNotification_Outputs0 = objectFactory0.createQueryVnfNotificationOutputs();
+      assertNotNull(queryVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      RollbackVnfNotification rollbackVnfNotification0 = objectFactory0.createRollbackVnfNotification();
+      JAXBElement<RollbackVnfNotification> jAXBElement0 = objectFactory0.createRollbackVnfNotification(rollbackVnfNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      JAXBElement<QueryVnfNotification> jAXBElement0 = objectFactory0.createQueryVnfNotification(queryVnfNotification0);
+      assertNotNull(jAXBElement0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      ObjectFactory objectFactory0 = new ObjectFactory();
+      QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = objectFactory0.createQueryVnfNotificationOutputsEntry();
+      assertNull(queryVnfNotification_Outputs_Entry0.getValue());
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTestscaffolding.java
new file mode 100644 (file)
index 0000000..4482069
--- /dev/null
@@ -0,0 +1,98 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:50:08 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ObjectFactoryESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.ObjectFactory"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ObjectFactoryESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification$Outputs$Entry",
+      "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification$Outputs$Entry",
+      "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.VnfStatus",
+      "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification$Outputs",
+      "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification$Outputs",
+      "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification$Outputs$Entry",
+      "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification$Outputs",
+      "org.openecomp.mso.adapters.vnf.async.client.ObjectFactory",
+      "org.openecomp.mso.adapters.vnf.async.client.VnfRollback",
+      "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ObjectFactoryESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.vnf.async.client.ObjectFactory"
+    );
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTest.java
new file mode 100644 (file)
index 0000000..f658251
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:49:18 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class QueryVnfNotificationESTest extends QueryVnfNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      Boolean boolean0 = Boolean.valueOf("`97");
+      queryVnfNotification0.setVnfExists(boolean0);
+      Boolean boolean1 = queryVnfNotification0.isVnfExists();
+      assertFalse(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.completed = true;
+      boolean boolean0 = queryVnfNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.setVnfId("");
+      String string0 = queryVnfNotification0.getVnfId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      VnfStatus vnfStatus0 = VnfStatus.FAILED;
+      queryVnfNotification0.status = vnfStatus0;
+      VnfStatus vnfStatus1 = queryVnfNotification0.getStatus();
+      assertSame(vnfStatus1, vnfStatus0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      QueryVnfNotification.Outputs queryVnfNotification_Outputs0 = new QueryVnfNotification.Outputs();
+      queryVnfNotification0.setOutputs(queryVnfNotification_Outputs0);
+      QueryVnfNotification.Outputs queryVnfNotification_Outputs1 = queryVnfNotification0.getOutputs();
+      assertSame(queryVnfNotification_Outputs1, queryVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.messageId = "FAILED";
+      String string0 = queryVnfNotification0.getMessageId();
+      assertEquals("FAILED", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL;
+      queryVnfNotification0.setException(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = queryVnfNotification0.getException();
+      assertEquals(MsoExceptionCategory.INTERNAL, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.errorMessage = "Jk{*#{\7f!k";
+      String string0 = queryVnfNotification0.getErrorMessage();
+      assertEquals("Jk{*#{\7f!k", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      String string0 = queryVnfNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.setMessageId("");
+      String string0 = queryVnfNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.setCompleted(true);
+      assertTrue(queryVnfNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.setVnfId("M:E`?t");
+      String string0 = queryVnfNotification0.getVnfId();
+      assertEquals("M:E`?t", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      String string0 = queryVnfNotification0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      boolean boolean0 = queryVnfNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.getStatus();
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.setErrorMessage("");
+      String string0 = queryVnfNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      VnfStatus vnfStatus0 = VnfStatus.NOTFOUND;
+      queryVnfNotification0.setStatus(vnfStatus0);
+      assertFalse(queryVnfNotification0.isCompleted());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      Boolean boolean0 = queryVnfNotification0.isVnfExists();
+      assertNull(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      queryVnfNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      QueryVnfNotification.Outputs queryVnfNotification_Outputs0 = queryVnfNotification0.getOutputs();
+      assertNull(queryVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      String string0 = queryVnfNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification();
+      Boolean boolean0 = new Boolean(true);
+      queryVnfNotification0.setVnfExists(boolean0);
+      Boolean boolean1 = queryVnfNotification0.isVnfExists();
+      assertTrue(boolean1);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      QueryVnfNotification.Outputs queryVnfNotification_Outputs0 = new QueryVnfNotification.Outputs();
+      List<QueryVnfNotification.Outputs.Entry> list0 = queryVnfNotification_Outputs0.getEntry();
+      List<QueryVnfNotification.Outputs.Entry> list1 = queryVnfNotification_Outputs0.getEntry();
+      assertSame(list1, list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = new QueryVnfNotification.Outputs.Entry();
+      String string0 = queryVnfNotification_Outputs_Entry0.getKey();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = new QueryVnfNotification.Outputs.Entry();
+      queryVnfNotification_Outputs_Entry0.setValue("{[VrUC");
+      assertNull(queryVnfNotification_Outputs_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = new QueryVnfNotification.Outputs.Entry();
+      String string0 = queryVnfNotification_Outputs_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = new QueryVnfNotification.Outputs.Entry();
+      queryVnfNotification_Outputs_Entry0.setKey("");
+      assertNull(queryVnfNotification_Outputs_Entry0.getValue());
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1c1a774
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:49:18 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class QueryVnfNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryVnfNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification$Outputs$Entry",
+      "org.openecomp.mso.adapters.vnf.async.client.VnfStatus",
+      "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification$Outputs",
+      "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTest.java
new file mode 100644 (file)
index 0000000..02203ac
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:46:51 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackVnfNotificationESTest extends RollbackVnfNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      rollbackVnfNotification0.setMessageId(":HW@8Kxo`M[S:7>");
+      String string0 = rollbackVnfNotification0.getMessageId();
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      rollbackVnfNotification0.errorMessage = "INTERNAL";
+      String string0 = rollbackVnfNotification0.getErrorMessage();
+      assertEquals("INTERNAL", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      rollbackVnfNotification0.errorMessage = "";
+      String string0 = rollbackVnfNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      rollbackVnfNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      rollbackVnfNotification0.setMessageId("");
+      String string0 = rollbackVnfNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      String string0 = rollbackVnfNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL;
+      rollbackVnfNotification0.setException(msoExceptionCategory0);
+      MsoExceptionCategory msoExceptionCategory1 = rollbackVnfNotification0.getException();
+      assertSame(msoExceptionCategory1, msoExceptionCategory0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      rollbackVnfNotification0.setErrorMessage("");
+      assertEquals("", rollbackVnfNotification0.getErrorMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      String string0 = rollbackVnfNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      boolean boolean0 = rollbackVnfNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification();
+      rollbackVnfNotification0.setCompleted(true);
+      boolean boolean0 = rollbackVnfNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8d91d5c
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:46:51 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackVnfNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackVnfNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTest.java
new file mode 100644 (file)
index 0000000..e71d416
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:51:15 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UpdateVnfNotificationESTest extends UpdateVnfNotificationESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.tenantCreated = true;
+      updateVnfNotification0.setRollback(vnfRollback0);
+      VnfRollback vnfRollback1 = updateVnfNotification0.getRollback();
+      assertNull(vnfRollback1.getTenantId());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      VnfRollback vnfRollback0 = new VnfRollback();
+      updateVnfNotification0.rollback = vnfRollback0;
+      VnfRollback vnfRollback1 = updateVnfNotification0.getRollback();
+      assertFalse(vnfRollback1.isTenantCreated());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      UpdateVnfNotification.Outputs updateVnfNotification_Outputs0 = new UpdateVnfNotification.Outputs();
+      updateVnfNotification0.setOutputs(updateVnfNotification_Outputs0);
+      UpdateVnfNotification.Outputs updateVnfNotification_Outputs1 = updateVnfNotification0.getOutputs();
+      assertSame(updateVnfNotification_Outputs1, updateVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      updateVnfNotification0.messageId = ":_rGAeg9'Jf17.p+,m";
+      String string0 = updateVnfNotification0.getMessageId();
+      assertEquals(":_rGAeg9'Jf17.p+,m", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      updateVnfNotification0.setMessageId("");
+      String string0 = updateVnfNotification0.getMessageId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      updateVnfNotification0.exception = msoExceptionCategory0;
+      MsoExceptionCategory msoExceptionCategory1 = updateVnfNotification0.getException();
+      assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      updateVnfNotification0.errorMessage = null;
+      updateVnfNotification0.errorMessage = "";
+      String string0 = updateVnfNotification0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      VnfRollback vnfRollback0 = updateVnfNotification0.getRollback();
+      assertNull(vnfRollback0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      boolean boolean0 = updateVnfNotification0.isCompleted();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      updateVnfNotification0.getException();
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      String string0 = updateVnfNotification0.getMessageId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO;
+      updateVnfNotification0.setException(msoExceptionCategory0);
+      assertEquals(MsoExceptionCategory.IO, updateVnfNotification0.getException());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      updateVnfNotification0.setCompleted(true);
+      boolean boolean0 = updateVnfNotification0.isCompleted();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      UpdateVnfNotification.Outputs updateVnfNotification_Outputs0 = updateVnfNotification0.getOutputs();
+      assertNull(updateVnfNotification_Outputs0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      updateVnfNotification0.setErrorMessage("m.m)#ZJF);)x*\"HQ8WB");
+      String string0 = updateVnfNotification0.getErrorMessage();
+      assertEquals("m.m)#ZJF);)x*\"HQ8WB", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification();
+      String string0 = updateVnfNotification0.getErrorMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      UpdateVnfNotification.Outputs updateVnfNotification_Outputs0 = new UpdateVnfNotification.Outputs();
+      List<UpdateVnfNotification.Outputs.Entry> list0 = updateVnfNotification_Outputs0.getEntry();
+      List<UpdateVnfNotification.Outputs.Entry> list1 = updateVnfNotification_Outputs0.getEntry();
+      assertSame(list1, list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = new UpdateVnfNotification.Outputs.Entry();
+      updateVnfNotification_Outputs_Entry0.setKey(",");
+      assertEquals(",", updateVnfNotification_Outputs_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = new UpdateVnfNotification.Outputs.Entry();
+      String string0 = updateVnfNotification_Outputs_Entry0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = new UpdateVnfNotification.Outputs.Entry();
+      updateVnfNotification_Outputs_Entry0.setValue("IO");
+      assertNull(updateVnfNotification_Outputs_Entry0.getKey());
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = new UpdateVnfNotification.Outputs.Entry();
+      String string0 = updateVnfNotification_Outputs_Entry0.getKey();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTestscaffolding.java
new file mode 100644 (file)
index 0000000..6517163
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:51:15 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UpdateVnfNotificationESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateVnfNotificationESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification$Outputs$Entry",
+      "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification$Outputs",
+      "org.openecomp.mso.adapters.vnf.async.client.VnfRollback",
+      "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification",
+      "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTest.java
new file mode 100644 (file)
index 0000000..7ac55f0
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:50:26 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VnfRollbackESTest extends VnfRollbackESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVnfId("12&$HOD'rH:!tJy");
+      String string0 = vnfRollback0.getVnfId();
+      assertEquals("12&$HOD'rH:!tJy", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.vnfId = "";
+      String string0 = vnfRollback0.getVnfId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.tenantId = "=x@lXzB:nqB-5F9";
+      String string0 = vnfRollback0.getTenantId();
+      assertEquals("=x@lXzB:nqB-5F9", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      MsoRequest msoRequest0 = new MsoRequest();
+      vnfRollback0.setMsoRequest(msoRequest0);
+      MsoRequest msoRequest1 = vnfRollback0.getMsoRequest();
+      assertNull(msoRequest1.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setCloudSiteId("/8Qc+9]");
+      String string0 = vnfRollback0.getCloudSiteId();
+      assertEquals("/8Qc+9]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setTenantCreated(true);
+      boolean boolean0 = vnfRollback0.isTenantCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      boolean boolean0 = vnfRollback0.isTenantCreated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      String string0 = vnfRollback0.getVnfId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      MsoRequest msoRequest0 = vnfRollback0.getMsoRequest();
+      assertNull(msoRequest0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setVnfCreated(true);
+      boolean boolean0 = vnfRollback0.isVnfCreated();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      boolean boolean0 = vnfRollback0.isVnfCreated();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setCloudSiteId("");
+      String string0 = vnfRollback0.getCloudSiteId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      vnfRollback0.setTenantId("");
+      String string0 = vnfRollback0.getTenantId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      String string0 = vnfRollback0.getCloudSiteId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      VnfRollback vnfRollback0 = new VnfRollback();
+      String string0 = vnfRollback0.getTenantId();
+      assertNull(string0);
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTestscaffolding.java
new file mode 100644 (file)
index 0000000..10defa4
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:50:26 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VnfRollbackESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.VnfRollback"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfRollbackESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.MsoRequest",
+      "org.openecomp.mso.adapters.vnf.async.client.VnfRollback"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTest.java
new file mode 100644 (file)
index 0000000..2f40d5e
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 10:48:53 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VnfStatusESTest extends VnfStatusESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      VnfStatus[] vnfStatusArray0 = VnfStatus.values();
+      assertNotNull(vnfStatusArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        VnfStatus.valueOf((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        VnfStatus.valueOf("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.vnf.async.client.VnfStatus.
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        VnfStatus.fromValue((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // Name is null
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        VnfStatus.fromValue("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // No enum constant org.openecomp.mso.adapters.vnf.async.client.VnfStatus.
+         //
+         verifyException("java.lang.Enum", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      VnfStatus vnfStatus0 = VnfStatus.NOTFOUND;
+      String string0 = vnfStatus0.value();
+      assertEquals("NOTFOUND", string0);
+  }
+}
diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTestscaffolding.java
new file mode 100644 (file)
index 0000000..7875037
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 10:48:53 GMT 2016
+ */
+
+package org.openecomp.mso.adapters.vnf.async.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VnfStatusESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.VnfStatus"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfStatusESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.adapters.vnf.async.client.VnfStatus"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VnfStatusESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.adapters.vnf.async.client.VnfStatus"
+    );
+  }
+}
diff --git a/adapters/mso-vnf-adapter/README.md b/adapters/mso-vnf-adapter/README.md
new file mode 100644 (file)
index 0000000..2085fc9
--- /dev/null
@@ -0,0 +1,11 @@
+This artifact is the MSO VNF adapter.  It serves both SOAP and REST requests to the following URLs:
+
+  * http://host:port/vnfs/VnfAdapter?wsdl
+  * http://host:port/vnfs/VnfAdapterAsync?wsdl
+  * http://host:port/vnfs/rest/v1/vnfs/healthcheck
+  * http://host:port/vnfs/rest/v1/vnfs/{aaiVnfId}/vf-modules
+  * http://host:port/vnfs/rest/v1/vnfs/{aaiVnfId}/vf-modules/{aaiVfModuleId}
+  * http://host:port/vnfs/rest/v1/vnfs/{aaiVnfId}/vf-modules/{aaiVfModuleId}/rollback
+  * http://host:port/vnfs/rest/v1/volume-groups
+  * http://host:port/vnfs/rest/v1/volume-groups/{aaiVolumeGroupId}
+  * http://host:port/vnfs/rest/v1/volume-groups/{aaiVolumeGroupId}/rollback
diff --git a/adapters/mso-vnf-adapter/WebContent/META-INF/MANIFEST.MF b/adapters/mso-vnf-adapter/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..5e94951
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0\r
+Class-Path: \r
+\r
diff --git a/adapters/mso-vnf-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector b/adapters/mso-vnf-adapter/WebContent/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector
new file mode 100644 (file)
index 0000000..1281d32
--- /dev/null
@@ -0,0 +1 @@
+com.woorea.openstack.connector.HttpClientConnector
\ No newline at end of file
diff --git a/adapters/mso-vnf-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml b/adapters/mso-vnf-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..58ddb4a
--- /dev/null
@@ -0,0 +1,16 @@
+<jboss-deployment-structure>\r
+       <deployment>\r
+               <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->\r
+               <exclusions>\r
+                       <module name="org.apache.log4j" />\r
+                       <module name="org.slf4j" />\r
+                       <module name="org.slf4j.impl" />\r
+               </exclusions>\r
+               <dependencies>\r
+                           <module name="org.jboss.jandex" slot="main" />\r
+                <module name="org.javassist" slot="main" />\r
+                <module name="org.antlr" slot="main" />\r
+                <module name="org.dom4j" slot="main" />\r
+               </dependencies>\r
+       </deployment>\r
+</jboss-deployment-structure>
\ No newline at end of file
diff --git a/adapters/mso-vnf-adapter/WebContent/WEB-INF/jboss-web.xml b/adapters/mso-vnf-adapter/WebContent/WEB-INF/jboss-web.xml
new file mode 100644 (file)
index 0000000..6224f07
--- /dev/null
@@ -0,0 +1,3 @@
+<jboss-web>\r
+       <context-root>vnfs</context-root>\r
+</jboss-web>
\ No newline at end of file
diff --git a/adapters/mso-vnf-adapter/WebContent/WEB-INF/web.xml b/adapters/mso-vnf-adapter/WebContent/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..3a50781
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+  <display-name>mso-vnf-adapter</display-name>
+
+  <context-param>
+       <param-name>resteasy.jndi.resources</param-name>
+       <param-value>java:module/MsoPropertiesFactory,java:module/CloudConfigFactory</param-value>
+  </context-param>
+
+  <context-param>
+    <param-name>log.configuration</param-name>
+    <param-value>logback.vnf.xml</param-value>
+  </context-param>
+  <context-param>
+    <param-name>mso.configuration</param-name>
+    <param-value>MSO_PROP_VNF_ADAPTER=mso.vnf.properties,MSO_PROP_TOPOLOGY=topology.properties</param-value>
+  </context-param>
+  <context-param>
+       <param-name>mso.cloud_config.configuration</param-name>
+       <param-value>cloud_config.json=2</param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.resources</param-name>
+    <param-value>
+       org.openecomp.mso.MsoStatusHandler,
+       org.openecomp.mso.logger.MsoLoggingServlet,
+       org.openecomp.mso.adapters.vnf.HealthCheckHandler,
+       org.openecomp.mso.adapters.vnf.VnfAdapterRest,
+       org.openecomp.mso.adapters.vnf.VolumeAdapterRest
+    </param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.servlet.mapping.prefix</param-name>
+    <param-value>/rest</param-value>
+  </context-param>
+  <servlet>
+    <servlet-name>Resteasy</servlet-name>
+    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Resteasy</servlet-name>
+    <url-pattern>/rest/*</url-pattern>
+  </servlet-mapping>
+
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>RestRequests</web-resource-name>
+            <description>Rest Ingress Requests</description>
+            <url-pattern>/rest/v1/*</url-pattern>
+            <http-method>POST</http-method>
+            <http-method>GET</http-method>
+            <http-method>PUT</http-method>
+            <http-method>DELETE</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>BPEL-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SoapRequests</web-resource-name>
+            <description>Soap Ingress Requests</description>
+            <url-pattern>/VnfAdapter</url-pattern>
+            <url-pattern>/VnfAdapterAsync</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>BPEL-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>SiteStatus</web-resource-name>
+            <description>SiteStatus APIs</description>
+            <url-pattern>/rest/setStatus/*</url-pattern>
+            <http-method>POST</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>SiteControl-Client</role-name>
+        </auth-constraint>
+    </security-constraint>
+    <login-config>
+        <auth-method>BASIC</auth-method>
+        <realm-name>ApplicationRealm</realm-name>
+    </login-config>
+    <security-role>
+        <role-name>BPEL-Client</role-name>
+    </security-role>
+    <security-role>
+        <role-name>SiteControl-Client</role-name>
+    </security-role>
+
+    <filter>
+               <filter-name>LogFilter</filter-name>
+               <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>
+  </filter>
+    <filter-mapping>
+               <filter-name>LogFilter</filter-name>
+               <url-pattern>/*</url-pattern>
+       </filter-mapping>
+</web-app>
diff --git a/adapters/mso-vnf-adapter/WebContent/check.html b/adapters/mso-vnf-adapter/WebContent/check.html
new file mode 100644 (file)
index 0000000..00f37d6
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html>\r
+<html>\r
+<head>\r
+<meta charset="ISO-8859-1">\r
+<title>Health Check</title>\r
+</head>\r
+<body>\r
+Application ready\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/adapters/mso-vnf-adapter/pom.xml b/adapters/mso-vnf-adapter/pom.xml
new file mode 100644 (file)
index 0000000..1914eb1
--- /dev/null
@@ -0,0 +1,159 @@
+<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.openecomp.mso</groupId>
+               <artifactId>adapters</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <groupId>org.openecomp.mso.adapters</groupId>
+       <artifactId>mso-vnf-adapter</artifactId>
+       <packaging>war</packaging>
+       <name>mso-vnf-adapter</name>
+       <description>Web Service and REST endpoint for VNF operations</description>
+
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.4</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                                       <attachClasses>true</attachClasses>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.jvnet.jax-ws-commons</groupId>
+                               <artifactId>jaxws-maven-plugin</artifactId>
+                               <version>2.3</version>
+                               <executions>
+                                       <execution>
+                                           <id>Synch</id>
+                                               <goals>
+                                                       <goal>wsgen</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <verbose>true</verbose>
+                                                       <sei>org.openecomp.mso.adapters.vnf.MsoVnfAdapterImpl</sei>
+                                                       <genWsdl>true</genWsdl>
+                                                       <inlineSchemas>true</inlineSchemas>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>Asynch</id>
+                                               <goals>
+                                                       <goal>wsgen</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <verbose>true</verbose>
+                                                       <sei>org.openecomp.mso.adapters.vnf.MsoVnfAdapterAsyncImpl</sei>
+                                                       <genWsdl>true</genWsdl>
+                                                       <inlineSchemas>true</inlineSchemas>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                               <dependencies>
+                                       <dependency>
+                                               <groupId>org.openecomp.mso.adapters</groupId>
+                                               <artifactId>mso-adapter-utils</artifactId>
+                                               <version>${project.version}</version>
+                                       </dependency>
+                                       <dependency>
+                                               <groupId>com.sun.xml.ws</groupId>
+                                               <artifactId>jaxws-tools</artifactId>
+                                               <version>2.2.7</version>
+                                       </dependency>
+                               </dependencies>
+                       </plugin>
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings
+                                       only. It has no influence on the Maven build itself. -->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>
+                                                                                       org.jvnet.jax-ws-commons
+                                                                               </groupId>
+                                                                               <artifactId>
+                                                                                       jaxws-maven-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [2.3,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>wsgen</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-adapter-utils</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-adapters-rest-interface</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso.adapters</groupId>
+                       <artifactId>mso-vnf-adapter-async-client</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>javax</groupId>
+                       <artifactId>javaee-web-api</artifactId>
+                       <version>6.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.spec.javax.ejb</groupId>
+                       <artifactId>jboss-ejb-api_3.2_spec</artifactId>
+                       <version>1.0.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.ejb3</groupId>
+                       <artifactId>jboss-ejb3-ext-api</artifactId>
+                       <version>2.2.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>status-control</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+               <!-- <dependency> -->
+               <!-- <groupId>org.openecomp.mso</groupId> -->
+               <!-- <artifactId>mso-catalog-db</artifactId> -->
+               <!-- <version>${project.version}</version> -->
+               <!-- </dependency> -->
+               <!-- <dependency> -->
+               <!-- <groupId>log4j</groupId> -->
+               <!-- <artifactId>log4j</artifactId> -->
+               <!-- <version>1.2.17</version> -->
+               <!-- </dependency> -->
+       </dependencies>
+</project>
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java
new file mode 100644 (file)
index 0000000..e76aa40
--- /dev/null
@@ -0,0 +1,304 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+import java.io.IOException;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+/**
+ * This is the class that is used to POST replies from the MSO adapters to the BPEL engine.
+ * It can be configured via property file, or modified using the member methods.
+ * The properties to use are:
+ * org.openecomp.mso.adapters.vnf.bpelauth  encrypted authorization string to send to BEPL engine
+ * org.openecomp.mso.adapters.vnf.sockettimeout socket timeout value
+ * org.openecomp.mso.adapters.vnf.connecttimeout connect timeout value
+ * org.openecomp.mso.adapters.vnf.retrycount number of times to retry failed connections
+ * org.openecomp.mso.adapters.vnf.retryinterval interval (in seconds) between retries
+ * org.openecomp.mso.adapters.vnf.retrylist list of response codes that will trigger a retry (the special code
+ *                     900 means "connection was not established")
+ */
+public class BpelRestClient {
+       public  static final String MSO_PROP_VNF_ADAPTER     = "MSO_PROP_VNF_ADAPTER";
+       private static final String PROPERTY_DOMAIN          = "org.openecomp.mso.adapters.vnf";
+       private static final String BPEL_AUTH_PROPERTY       = PROPERTY_DOMAIN+".bpelauth";
+       private static final String SOCKET_TIMEOUT_PROPERTY  = PROPERTY_DOMAIN+".sockettimeout";
+       private static final String CONN_TIMEOUT_PROPERTY    = PROPERTY_DOMAIN+".connecttimeout";
+       private static final String RETRY_COUNT_PROPERTY     = PROPERTY_DOMAIN+".retrycount";
+       private static final String RETRY_INTERVAL_PROPERTY  = PROPERTY_DOMAIN+".retryinterval";
+       private static final String RETRY_LIST_PROPERTY      = PROPERTY_DOMAIN+".retrylist";
+       private static final String ENCRYPTION_KEY           = "aa3871669d893c7fb8abbcda31b88b4f";
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+       /** Default socket timeout (in seconds) */
+       public static final int DEFAULT_SOCKET_TIMEOUT = 5;
+       /** Default connect timeout (in seconds) */
+       public static final int DEFAULT_CONNECT_TIMEOUT = 5;
+       /** By default, retry up to five times */
+       public static final int DEFAULT_RETRY_COUNT = 5;
+       /** Default interval to wait between retries (in seconds), negative means use backoff algorithm */
+       public static final int DEFAULT_RETRY_INTERVAL = -15;
+       /** Default list of response codes to trigger a retry */
+       public static final String DEFAULT_RETRY_LIST = "408,429,500,502,503,504,900";  // 900 is "connection failed"
+       /** Default credentials */
+       public static final String DEFAULT_CREDENTIALS = "";
+
+       // Properties of the BPEL client -- all are configurable
+       private int socketTimeout;
+       private int connectTimeout;
+       private int retryCount;
+       private int retryInterval;
+       private Set<Integer> retryList;
+       private String credentials;
+
+       // last response from BPEL engine
+       private int lastResponseCode;
+       private String lastResponse;
+
+       /**
+        * Create a client to send results to the BPEL engine, using configuration from the
+        * MSO_PROP_VNF_ADAPTER properties.
+        */
+       public BpelRestClient() {
+               socketTimeout  = DEFAULT_SOCKET_TIMEOUT;
+               connectTimeout = DEFAULT_CONNECT_TIMEOUT;
+               retryCount     = DEFAULT_RETRY_COUNT;
+               retryInterval  = DEFAULT_RETRY_INTERVAL;
+               setRetryList(DEFAULT_RETRY_LIST);
+               credentials    = DEFAULT_CREDENTIALS;
+               lastResponseCode = 0;
+               lastResponse = "";
+
+               try {
+                       MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+                       MsoJavaProperties jp = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_VNF_ADAPTER);
+                       socketTimeout  = jp.getIntProperty(SOCKET_TIMEOUT_PROPERTY, DEFAULT_SOCKET_TIMEOUT);
+                       connectTimeout = jp.getIntProperty(CONN_TIMEOUT_PROPERTY,   DEFAULT_CONNECT_TIMEOUT);
+                       retryCount     = jp.getIntProperty(RETRY_COUNT_PROPERTY,    DEFAULT_RETRY_COUNT);
+                       retryInterval  = jp.getIntProperty(RETRY_INTERVAL_PROPERTY, DEFAULT_RETRY_INTERVAL);
+                       setRetryList(jp.getProperty(RETRY_LIST_PROPERTY, DEFAULT_RETRY_LIST));
+                       credentials    = jp.getEncryptedProperty(BPEL_AUTH_PROPERTY, DEFAULT_CREDENTIALS, ENCRYPTION_KEY);
+               } catch (MsoPropertiesException e) {
+                       String error = "Unable to get properties:" + MSO_PROP_VNF_ADAPTER;
+                       LOGGER.error (MessageEnum.RA_CONFIG_EXC, error, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "MsoPropertiesException - Unable to get properties", e);
+               }
+       }
+
+       public int getSocketTimeout() {
+               return socketTimeout;
+       }
+
+       public void setSocketTimeout(int socketTimeout) {
+               this.socketTimeout = socketTimeout;
+       }
+
+       public int getConnectTimeout() {
+               return connectTimeout;
+       }
+
+       public void setConnectTimeout(int connectTimeout) {
+               this.connectTimeout = connectTimeout;
+       }
+
+       public int getRetryCount() {
+               return retryCount;
+       }
+
+       public void setRetryCount(int retryCount) {
+               if (retryCount < 0)
+                       retryCount = DEFAULT_RETRY_COUNT;
+               this.retryCount = retryCount;
+       }
+
+       public int getRetryInterval() {
+               return retryInterval;
+       }
+
+       public void setRetryInterval(int retryInterval) {
+               this.retryInterval = retryInterval;
+       }
+
+       public String getCredentials() {
+               return credentials;
+       }
+
+       public void setCredentials(String credentials) {
+               this.credentials = credentials;
+       }
+
+       public String getRetryList() {
+               if (retryList.size() == 0)
+                       return "";
+               String t = retryList.toString();
+               return t.substring(1, t.length()-1);
+       }
+
+       public void setRetryList(String retryList) {
+               Set<Integer> s = new TreeSet<Integer>();
+               for (String t : retryList.split("[, ]")) {
+                       try {
+                               s.add(Integer.parseInt(t));
+                       } catch (NumberFormatException x) {
+                               // ignore
+                       }
+               }
+               this.retryList = s;
+       }
+
+       public int getLastResponseCode() {
+               return lastResponseCode;
+       }
+
+       public String getLastResponse() {
+               return lastResponse;
+       }
+
+       /**
+        * Post a response to the URL of the BPEL engine.  As long as the response code is one of those in
+        * the retryList, the post will be retried up to "retrycount" times with an interval (in seconds)
+        * of "retryInterval".  If retryInterval is negative, then each successive retry interval will be
+        * double the previous one.
+        * @param toBpelStr the content (XML or JSON) to post
+        * @param bpelUrl the URL to post to
+        * @param isxml true if the content is XML, otherwise assumed to be JSON
+        * @return true if the post succeeded, false if all retries failed
+        */
+       public boolean bpelPost(final String toBpelStr, final String bpelUrl, final boolean isxml)  {
+               debug("Sending response to BPEL: " + toBpelStr);
+               int totalretries = 0;
+               int retryint = retryInterval;
+               while (true) {
+                       sendOne(toBpelStr, bpelUrl, isxml);
+                       // Note: really should handle response code 415 by switching between content types if needed
+                       if (!retryList.contains(lastResponseCode)) {
+                               debug("Got response code: " + lastResponseCode + ": returning.");
+                               return true;
+                       }
+                       if (totalretries >= retryCount) {
+                               debug("Retried " + totalretries + " times, giving up.");
+                               LOGGER.error(MessageEnum.RA_SEND_VNF_NOTIF_ERR, "Could not deliver response to BPEL after "+totalretries+" tries: "+toBpelStr, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Could not deliver response to BPEL");
+                               return false;
+                       }
+                       totalretries++;
+                       int sleepinterval = retryint;
+                       if (retryint < 0) {
+                               // if retry interval is negative double the retry on each pass
+                               sleepinterval = -retryint;
+                               retryint *= 2;
+                       }
+                       debug("Sleeping for " + sleepinterval + " seconds.");
+                       try {
+                               Thread.sleep(sleepinterval * 1000L);
+                       } catch (InterruptedException e) {
+                               // ignore
+                       }
+               }
+       }
+       private void debug(String m) {
+               LOGGER.debug(m);
+//             System.err.println(m);
+       }
+       private void sendOne(final String toBpelStr, final String bpelUrl, final boolean isxml) {
+               LOGGER.debug("Sending to BPEL server: "+bpelUrl);
+               LOGGER.debug("Content is: "+toBpelStr);
+
+               //POST
+               HttpPost post = new HttpPost(bpelUrl);
+               if (credentials != null && !credentials.isEmpty())
+                       post.addHeader("Authorization", "Basic " + DatatypeConverter.printBase64Binary(credentials.getBytes()));
+
+        //ContentType
+        ContentType ctype = isxml ? ContentType.APPLICATION_XML : ContentType.APPLICATION_JSON;
+        post.setEntity(new StringEntity(toBpelStr, ctype));
+
+        //Timeouts
+               RequestConfig requestConfig = RequestConfig
+                       .custom()
+                       .setSocketTimeout(socketTimeout * 1000)
+                       .setConnectTimeout(connectTimeout * 1000)
+                       .build();
+               post.setConfig(requestConfig);
+
+        //Client 4.3+
+        //Execute & GetResponse
+        try (CloseableHttpClient client = HttpClients.createDefault();
+             CloseableHttpResponse response = client.execute(post)) {
+                       if (response != null) {
+                               lastResponseCode = response.getStatusLine().getStatusCode();
+                               HttpEntity entity = response.getEntity();
+                               lastResponse = (entity != null) ? EntityUtils.toString(entity) : "";
+                       } else {
+                               lastResponseCode = 900;
+                               lastResponse = "";
+                       }
+               } catch (Exception e) {
+                       String error = "Error sending Bpel notification:" + toBpelStr;
+                       LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, error, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Error sending Bpel notification", e);
+                       lastResponseCode = 900;
+                       lastResponse = "";
+               }
+               LOGGER.debug("Response code from BPEL server: "+lastResponseCode);
+               LOGGER.debug("Response body is: "+lastResponse);
+       }
+
+       public static void main(String[] a) throws MsoPropertiesException {
+               final String bpelengine = "http://mtmac1.research.att.com:8080/catch.jsp";
+               final String propfile = "/tmp/mso.vnf.properties";
+               // "/Users/eby/src/mso.rest/mso/packages/mso-config-centralized/mso-po-adapter-config/mso.vnf.properties"
+               final String xml =
+                       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" +
+                       "<updateVolumeGroupResponse><volumeGroupId>1464013300723</volumeGroupId><volumeGroupOutputs>" +
+               "<entry><key>clyde</key><value>10</value></entry>" +
+               "<entry><key>wayne</key><value>99</value></entry>" +
+               "<entry><key>mickey</key><value>7</value></entry>" +
+               "</volumeGroupOutputs></updateVolumeGroupResponse>";
+
+               MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+               msoPropertiesFactory.initializeMsoProperties (MSO_PROP_VNF_ADAPTER, propfile);
+
+               BpelRestClient bc = new BpelRestClient();
+               System.out.println(bc.getRetryList());
+               System.out.println(bc.getCredentials()); // poAvos:Domain2.0!
+
+               bc.bpelPost(xml, bpelengine, true);
+               System.out.println("respcode = "+bc.getLastResponseCode());
+               System.out.println("resp = "+bc.getLastResponse());
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/HealthCheckHandler.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/HealthCheckHandler.java
new file mode 100644 (file)
index 0000000..108baf3
--- /dev/null
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.HealthCheckUtils;
+import org.openecomp.mso.utils.UUIDChecker;
+
+
+@Path("/")
+public class HealthCheckHandler {
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+    private static final String MSO_PROP_VNF_ADAPTER = "MSO_PROP_VNF_ADAPTER";
+
+       @HEAD
+       @GET
+       @Path("/healthcheck")
+       @Produces(MediaType.TEXT_HTML)
+       public Response healthcheck (@QueryParam("requestId") String requestId) {
+               long startTime = System.currentTimeMillis ();
+               MsoLogger.setServiceName ("Healthcheck");
+               UUIDChecker.verifyOldUUID(requestId, msoLogger);
+               HealthCheckUtils healthCheck = new HealthCheckUtils ();
+               if (!healthCheck.siteStatusCheck(msoLogger, startTime)) {
+                       return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+               }
+
+               if (!healthCheck.configFileCheck(msoLogger, startTime, MSO_PROP_VNF_ADAPTER)) {
+                       return HealthCheckUtils.NOT_STARTED_RESPONSE;
+               }
+
+               if (!healthCheck.catalogDBCheck (msoLogger, startTime)) {
+                       return HealthCheckUtils.NOT_STARTED_RESPONSE;
+               }
+               msoLogger.debug("healthcheck - Successful");
+               return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapter.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapter.java
new file mode 100644 (file)
index 0000000..95d8ee2
--- /dev/null
@@ -0,0 +1,142 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebParam.Mode;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.ws.Holder;
+
+import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfAlreadyExists;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+import org.openecomp.mso.entity.MsoRequest;
+
+import java.util.Map;
+
+@WebService (name="VnfAdapter", targetNamespace="http://com.att.mso/vnf")
+public interface MsoVnfAdapter
+{
+       /**
+        * This is the "Create VNF" Web Service Endpoint definition.
+        */
+       @WebMethod
+       public void createVnf (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfType") @XmlElement(required=true) String vnfType,
+                                                       @WebParam(name="vnfVersion") @XmlElement(required=false) String vnfVersion,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="requestType") @XmlElement(required=false) String requestType,
+                                                       @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
+                                                       @WebParam(name="inputs") Map<String,String> inputs,
+                                                       @WebParam(name="failIfExists") Boolean failIfExists,
+                                                       @WebParam(name="backout") Boolean backout,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="vnfId", mode=Mode.OUT) Holder<String> vnfId,
+                                                       @WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<VnfRollback> rollback )
+               throws VnfException, VnfAlreadyExists;
+       
+       @WebMethod
+       public void updateVnf (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfType") @XmlElement(required=true) String vnfType,
+                                                       @WebParam(name="vnfVersion") @XmlElement(required=false) String vnfVersion,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="requestType") @XmlElement(required=false) String requestType,
+                                                       @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
+                                                       @WebParam(name="inputs") Map<String,String> inputs,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<VnfRollback> rollback )
+               throws VnfException;
+       
+       @WebMethod
+       public void queryVnf (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="vnfExists", mode=Mode.OUT) Holder<Boolean> vnfExists,
+                                                       @WebParam(name="vnfId", mode=Mode.OUT) Holder<String> vnfId,
+                                                       @WebParam(name="status", mode=Mode.OUT) Holder<VnfStatus> status,
+                                                       @WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs )
+               throws VnfException;
+       
+       @WebMethod
+       public void deleteVnf (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="request") MsoRequest msoRequest)
+               throws VnfException;
+       
+       
+       @WebMethod
+       public void rollbackVnf (@WebParam(name="rollback") @XmlElement(required=true) VnfRollback rollback)
+               throws VnfException;
+       
+       @WebMethod
+       public void createVfModule (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfType") @XmlElement(required=true) String vnfType,
+                                                       @WebParam(name="vnfVersion") @XmlElement(required=false) String vnfVersion,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="requestType") @XmlElement(required=false) String requestType,
+                                                       @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
+                                                       @WebParam(name="baseVfHeatStackId") @XmlElement(required=false) String baseVfHeatStackId,
+                                                       @WebParam(name="inputs") Map<String,String> inputs,
+                                                       @WebParam(name="failIfExists") Boolean failIfExists,
+                                                       @WebParam(name="backout") Boolean backout,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="vnfId", mode=Mode.OUT) Holder<String> vnfId,
+                                                       @WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<VnfRollback> rollback )
+               throws VnfException, VnfAlreadyExists;
+       
+       @WebMethod
+       public void deleteVfModule (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vfName") @XmlElement(required=true) String vfName,
+                                                       @WebParam(name="request") MsoRequest msoRequest)
+               throws VnfException;
+       
+       @WebMethod
+       public void updateVfModule (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfType") @XmlElement(required=true) String vnfType,
+                                                       @WebParam(name="vnfVersion") @XmlElement(required=false) String vnfVersion,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="requestType") @XmlElement(required=false) String requestType,
+                                                       @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
+                                                       @WebParam(name="baseVfHeatStackId") @XmlElement(required=false) String baseVfHeatStackId,
+                                                       @WebParam(name="vfModuleStackId") @XmlElement(required=false) String vfModuleStackId,
+                                                       @WebParam(name="inputs") Map<String,String> inputs,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs,
+                                                       @WebParam(name="rollback", mode=Mode.OUT) Holder<VnfRollback> rollback )
+               throws VnfException;
+       
+       @WebMethod
+       public void healthCheck ();
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsync.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsync.java
new file mode 100644 (file)
index 0000000..d58e9ee
--- /dev/null
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import java.util.Map;
+
+/**
+ * This webservice defines the Asynchronous versions of VNF adapter calls.
+ * The notification messages for final responses are documented elsewhere
+ * (by the client service WSDL).
+ *
+ */
+@WebService (name="VnfAdapterAsync", targetNamespace="http://com.att.mso/vnfA")
+public interface MsoVnfAdapterAsync
+{
+       /**
+        * This is the "Create VNF" Web Service Endpoint definition.
+        */
+       @WebMethod
+       @Oneway
+       public void createVnfA (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfType") @XmlElement(required=true) String vnfType,
+                                                       @WebParam(name="vnfVersion") @XmlElement(required=false) String vnfVersion,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="requestType") @XmlElement(required=false) String requestType,
+                                                       @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
+                                                       @WebParam(name="inputs") Map<String,String> inputs,
+                                                       @WebParam(name="failIfExists") Boolean failIfExists,
+                                                       @WebParam(name="backout") Boolean backout,
+                                                       @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+       
+       @WebMethod
+       @Oneway
+       public void updateVnfA (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfType") @XmlElement(required=true) String vnfType,
+                                                       @WebParam(name="vnfVersion") @XmlElement(required=false) String vnfVersion,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="requestType") @XmlElement(required=false) String requestType,
+                                                       @WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
+                                                       @WebParam(name="inputs") Map<String,String> inputs,
+                                                       @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+                                                       
+       @WebMethod
+       @Oneway
+       public void queryVnfA (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+
+       @WebMethod
+       @Oneway
+       public void deleteVnfA (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
+                                                       @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
+                                                       @WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
+                                                       @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                                       @WebParam(name="request") MsoRequest msoRequest,
+                                                       @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+
+       @WebMethod
+       @Oneway
+       public void rollbackVnfA (@WebParam(name="rollback") @XmlElement(required=true) VnfRollback rollback,
+                                               @WebParam(name="messageId") @XmlElement(required=true) String messageId,
+                                               @WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
+
+       
+       @WebMethod
+       public void healthCheckA ();
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterAsyncImpl.java
new file mode 100644 (file)
index 0000000..c192eb6
--- /dev/null
@@ -0,0 +1,652 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jws.WebService;
+import javax.xml.bind.DatatypeConverter;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Holder;
+import javax.xml.ws.handler.MessageContext;
+
+import org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification;
+import org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification;
+import org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification;
+import org.openecomp.mso.adapters.vnf.async.client.VnfAdapterNotify;
+import org.openecomp.mso.adapters.vnf.async.client.VnfAdapterNotify_Service;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+
+@WebService(serviceName = "VnfAdapterAsync", endpointInterface = "org.openecomp.mso.adapters.vnf.MsoVnfAdapterAsync", targetNamespace = "http://com.att.mso/vnfA")
+public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
+
+       MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+       CloudConfigFactory cloudConfigFactory=new CloudConfigFactory();
+
+       public static final String MSO_PROP_VNF_ADAPTER="MSO_PROP_VNF_ADAPTER";
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+    private static final String BPEL_AUTH_PROP = "org.openecomp.mso.adapters.vnf.bpelauth";
+    private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+
+    /**
+     * Health Check web method. Does nothing but return to show the adapter is deployed.
+     */
+    @Override
+    public void healthCheckA () {
+        LOGGER.debug ("Health check call in VNF Adapter");
+    }
+
+    /**
+     * This is the asynchronous "Create VNF" web service implementation.
+     * It will create a new VNF of the requested type in the specified cloud
+     * and tenant. The tenant must exist before this service is called.
+     *
+     * If a VNF with the same name already exists, this can be considered a
+     * success or failure, depending on the value of the 'failIfExists' parameter.
+     *
+     * All VNF types will be defined in the MSO catalog. The caller must request
+     * one of these pre-defined types or an error will be returned. Within the
+     * catalog, each VNF type references (among other things) a Heat template
+     * which is used to deploy the required VNF artifacts (VMs, networks, etc.)
+     * to the cloud.
+     *
+     * Depending on the Heat template, a variable set of input parameters will
+     * be defined, some of which are required. The caller is responsible to
+     * pass the necessary input data for the VNF or an error will be thrown.
+     *
+     * The method sends an asynchronous response to the notification URL when
+     * processing completes. The createAsyncResponse contains the vnfId (the
+     * canonical name of the stack), a Map of VNF output attributes, and a
+     * VnfRollback object. This last object can be passed as-is to the
+     * rollbackVnf operation to undo everything that was created for the VNF.
+     * This is useful if a VNF is successfully created but the orchestrator
+     * fails on a subsequent operation.
+     *
+     * Note: this method is implemented by calling the synchronous web method
+     * and translating the response to an asynchronous notification.
+     *
+     * @param cloudSiteId CLLI code of the cloud site in which to create the VNF
+     * @param tenantId Openstack tenant identifier
+     * @param vnfType VNF type key, should match a VNF definition in catalog DB
+     * @param vnfName Name to be assigned to the new VNF
+     * @param inputs Map of key=value inputs for VNF stack creation
+     * @param failIfExists Flag whether already existing VNF should be considered
+     *        a success or failure
+     * @param msoRequest Request tracking information for logs
+     * @param notificationURL the target URL for asynchronous response
+     */
+    @Override
+    public void createVnfA (String cloudSiteId,
+                            String tenantId,
+                            String vnfType,
+                            String vnfVersion,
+                            String vnfName,
+                            String requestType,
+                            String volumeGroupHeatStackId,
+                            Map <String, String> inputs,
+                            Boolean failIfExists,
+                            Boolean backout,
+                            String messageId,
+                            MsoRequest msoRequest,
+                            String notificationUrl) {
+        String error;
+        String serviceName = "CreateVnfA";
+        MsoLogger.setLogContext (msoRequest);
+        MsoLogger.setServiceName (serviceName);
+        LOGGER.info (MessageEnum.RA_ASYNC_CREATE_VNF, vnfName, vnfType, cloudSiteId, tenantId, "", "createVnfA");
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        // Use the synchronous method to perform the actual Create
+        MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl (msoPropertiesFactory, cloudConfigFactory);
+
+        // Synchronous Web Service Outputs
+        Holder <String> vnfId = new Holder <String> ();
+        Holder <Map <String, String>> outputs = new Holder <Map <String, String>> ();
+        Holder <VnfRollback> vnfRollback = new Holder <VnfRollback> ();
+
+        try {
+            vnfAdapter.createVnf (cloudSiteId,
+                                  tenantId,
+                                  vnfType,
+                                  vnfVersion,
+                                  vnfName,
+                                  requestType,
+                                  volumeGroupHeatStackId,
+                                  inputs,
+                                  failIfExists,
+                                  backout,
+                                  msoRequest,
+                                  vnfId,
+                                  outputs,
+                                  vnfRollback);
+            MsoLogger.setServiceName (serviceName);
+        } catch (VnfException e) {
+               MsoLogger.setServiceName (serviceName);
+               LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "createVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "VnfException in createVnfA", e);
+            org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory.fromValue (e.getFaultInfo ()
+                                                                                                     .getCategory ()
+                                                                                                     .name ());
+            } catch (Exception e1) {
+                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "createVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.createVnfNotification (messageId, false, exCat, eMsg, null, null, null);
+            } catch (Exception e1) {
+                error = "Error sending createVnf notification " + e1.getMessage ();
+                LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "createVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending createVnf notification", e1);
+                alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+            }
+            LOGGER.info (MessageEnum.RA_ASYNC_CREATE_VNF_COMPLETE, "", "createVnfA", "", "createVnfA");
+            return;
+        }
+        LOGGER.debug ("Async Create VNF: " + vnfName + " VnfId:" + vnfId.value);
+        // Build and send Asynchronous response
+        try {
+            VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            notifyPort.createVnfNotification (messageId,
+                                              true,
+                                              null,
+                                              null,
+                                              vnfId.value,
+                                              copyCreateOutputs (outputs),
+                                              copyVrb (vnfRollback));
+        } catch (Exception e) {
+            error = "Error sending createVnf notification " + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "createVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending createVnf notification", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+        }
+        LOGGER.info (MessageEnum.RA_ASYNC_CREATE_VNF_COMPLETE, "", "createVnfA");
+        return;
+    }
+
+    @Override
+    public void updateVnfA (String cloudSiteId,
+                            String tenantId,
+                            String vnfType,
+                            String vnfVersion,
+                            String vnfName,
+                            String requestType,
+                            String volumeGroupHeatStackId,
+                            Map <String, String> inputs,
+                            String messageId,
+                            MsoRequest msoRequest,
+                            String notificationUrl) {
+        String error;
+        String serviceName = "UpdateVnfA";
+        MsoLogger.setServiceName (serviceName);
+        MsoLogger.setLogContext (msoRequest);
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        LOGGER.info (MessageEnum.RA_ASYNC_UPDATE_VNF, vnfName, vnfType, cloudSiteId, tenantId, "", "UpdateVnfA");
+
+        // Use the synchronous method to perform the actual Create
+        MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        // Synchronous Web Service Outputs
+        Holder <String> vnfId = new Holder <String> ();
+        Holder <Map <String, String>> outputs = new Holder <Map <String, String>> ();
+        Holder <VnfRollback> vnfRollback = new Holder <VnfRollback> ();
+
+        try {
+            vnfAdapter.updateVnf (cloudSiteId, tenantId, vnfType,vnfVersion, vnfName, requestType, volumeGroupHeatStackId, inputs, msoRequest, outputs, vnfRollback);
+            MsoLogger.setServiceName (serviceName);
+        } catch (VnfException e) {
+               MsoLogger.setServiceName (serviceName);
+               LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending updateVnf notification", e);
+            org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory.fromValue (e.getFaultInfo ()
+                                                                                                     .getCategory ()
+                                                                                                     .name ());
+            } catch (Exception e1) {
+               LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.updateVnfNotification (messageId, false, exCat, eMsg, null, null);
+            } catch (Exception e1) {
+                error = "Error sending updateVnf notification " + e1.getMessage ();
+                LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending updateVnf notification", e1);
+                alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+            }
+            LOGGER.info (MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE, "", "UpdateVnfA");
+            return;
+        }
+        LOGGER.debug ("Async Update VNF: " + vnfName + " VnfId:" + vnfId.value);
+        // Build and send Asynchronous response
+        try {
+            VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            notifyPort.updateVnfNotification (messageId,
+                                              true,
+                                              null,
+                                              null,
+                                              copyUpdateOutputs (outputs),
+                                              copyVrb (vnfRollback));
+        } catch (Exception e) {
+            error = "Error sending updateVnf notification " + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending updateVnf notification", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+        }
+        LOGGER.info (MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE, "", "UpdateVnfA");
+        return;
+    }
+
+    /**
+     * This is the "Query VNF" web service implementation.
+     * It will look up a VNF by name or ID in the specified cloud and tenant.
+     *
+     * The method returns an indicator that the VNF exists, its Openstack internal
+     * ID, its status, and the set of outputs (from when the stack was created).
+     *
+     * @param cloudSiteId CLLI code of the cloud site in which to query
+     * @param tenantId Openstack tenant identifier
+     * @param vnfName VNF Name or Openstack ID
+     * @param msoRequest Request tracking information for logs
+     * @param notificationURL the target URL for asynchronous response
+     */
+    @Override
+    public void queryVnfA (String cloudSiteId,
+                           String tenantId,
+                           String vnfName,
+                           String messageId,
+                           MsoRequest msoRequest,
+                           String notificationUrl) {
+        String error;
+        String serviceName = "QueryVnfA";
+        MsoLogger.setServiceName (serviceName);
+        MsoLogger.setLogContext (msoRequest);
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        LOGGER.info (MessageEnum.RA_ASYNC_QUERY_VNF, vnfName, cloudSiteId, tenantId);
+
+        // Use the synchronous method to perform the actual query
+        MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        // Synchronous Web Service Outputs
+        Holder <Boolean> vnfExists = new Holder <Boolean> ();
+        Holder <String> vnfId = new Holder <String> ();
+        Holder <VnfStatus> status = new Holder <VnfStatus> ();
+        Holder <Map <String, String>> outputs = new Holder <Map <String, String>> ();
+
+        try {
+            vnfAdapter.queryVnf (cloudSiteId, tenantId, vnfName, msoRequest, vnfExists, vnfId, status, outputs);
+            MsoLogger.setServiceName (serviceName);
+        } catch (VnfException e) {
+               MsoLogger.setServiceName (serviceName);
+            LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending queryVnfA notification", e);
+            org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory.fromValue (e.getFaultInfo ()
+                                                                                                     .getCategory ()
+                                                                                                     .name ());
+            } catch (Exception e1) {
+               LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.queryVnfNotification (messageId, false, exCat, eMsg, null, null, null, null);
+            } catch (Exception e1) {
+                error = "Error sending queryVnf notification " + e1.getMessage ();
+                LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending queryVnf notification", e1);
+                alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+            }
+            LOGGER.info (MessageEnum.RA_ASYNC_QUERY_VNF_COMPLETE, "", "queryVnfA");
+            return;
+        }
+
+        if (!vnfExists.value) {
+            LOGGER.debug ("Async Query, VNF not found");
+        } else {
+            LOGGER.debug ("Async Query, VNF=" + vnfId.value + ", status=" + status.value);
+        }
+        // Build and send Asynchronous response
+        try {
+            VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            org.openecomp.mso.adapters.vnf.async.client.VnfStatus vnfS = org.openecomp.mso.adapters.vnf.async.client.VnfStatus.fromValue (status.value.name ());
+            notifyPort.queryVnfNotification (messageId,
+                                             true,
+                                             null,
+                                             null,
+                                             vnfExists.value,
+                                             vnfId.value,
+                                             vnfS,
+                                             copyQueryOutputs (outputs));
+        } catch (Exception e) {
+            error = "Error sending queryVnf notification " + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending queryVnf notification", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+        }
+
+        LOGGER.info (MessageEnum.RA_ASYNC_QUERY_VNF_COMPLETE, "", "queryVnfA");
+        return;
+    }
+
+    /**
+     * This is the Asynchronous "Delete VNF" web service implementation.
+     * It will delete a VNF by name or ID in the specified cloud and tenant.
+     *
+     * The method has no outputs.
+     *
+     * @param cloudSiteId CLLI code of the cloud site in which to delete
+     * @param tenantId Openstack tenant identifier
+     * @param vnfName VNF Name or Openstack ID
+     * @param msoRequest Request tracking information for logs
+     * @param notificationURL the target URL for asynchronous response
+     */
+    @Override
+    public void deleteVnfA (String cloudSiteId,
+                            String tenantId,
+                            String vnfName,
+                            String messageId,
+                            MsoRequest msoRequest,
+                            String notificationUrl) {
+        String error;
+        String serviceName = "DeleteVnfA";
+        MsoLogger.setServiceName (serviceName);
+        MsoLogger.setLogContext (msoRequest);
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        LOGGER.info (MessageEnum.RA_ASYNC_DELETE_VNF, vnfName, cloudSiteId, tenantId);
+
+        // Use the synchronous method to perform the actual delete
+        MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        try {
+            vnfAdapter.deleteVnf (cloudSiteId, tenantId, vnfName, msoRequest);
+            MsoLogger.setServiceName (serviceName);
+        } catch (VnfException e) {
+               MsoLogger.setServiceName (serviceName);
+               LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending deleteVnfA notification", e);
+            org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory.fromValue (e.getFaultInfo ()
+                                                                                                     .getCategory ()
+                                                                                                     .name ());
+            } catch (Exception e1) {
+               LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.deleteVnfNotification (messageId, false, exCat, eMsg);
+            } catch (Exception e1) {
+                error = "Error sending deleteVnf notification " + e1.getMessage ();
+                LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending deleteVnfA notification", e1);
+                alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+            }
+            LOGGER.info (MessageEnum.RA_ASYNC_DELETE_VNF_COMPLETE, "", "deleteVnfA");
+            return;
+        }
+
+        LOGGER.debug ("Async Delete VNF: " + vnfName);
+        // Build and send Asynchronous response
+        try {
+            VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            notifyPort.deleteVnfNotification (messageId, true, null, null);
+
+        } catch (Exception e) {
+            error = "Error sending deleteVnf notification " + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending deleteVnfA notification", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+        }
+
+        LOGGER.info (MessageEnum.RA_ASYNC_DELETE_VNF_COMPLETE, "", "deleteVnfA");
+        return;
+    }
+
+    /**
+     * This web service endpoint will rollback a previous Create VNF operation.
+     * A rollback object is returned to the client in a successful creation
+     * response. The client can pass that object as-is back to the rollbackVnf
+     * operation to undo the creation.
+     */
+    @Override
+    public void rollbackVnfA (VnfRollback rollback, String messageId, String notificationUrl) {
+        String serviceName = "RollbackVnfA";
+        MsoLogger.setServiceName (serviceName);
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+        String error;
+        // rollback may be null (e.g. if stack already existed when Create was called)
+        if (rollback == null) {
+            error = "Empty Rollback: No action to perform";
+            LOGGER.info (MessageEnum.RA_ROLLBACK_NULL, "", "rollbackVnfA");
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+            return;
+        }
+
+        MsoLogger.setLogContext (rollback.getMsoRequest ());
+        LOGGER.info (MessageEnum.RA_ASYNC_ROLLBACK_VNF, "", "rollbackVnfA");
+
+        // Use the synchronous method to perform the actual rollback
+        MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl (msoPropertiesFactory,cloudConfigFactory);
+
+        try {
+            vnfAdapter.rollbackVnf (rollback);
+            MsoLogger.setServiceName (serviceName);
+        } catch (VnfException e) {
+               MsoLogger.setServiceName (serviceName);
+               LOGGER.error (MessageEnum.RA_ROLLBACK_VNF_ERR, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending rollbackVnfA notification", e);
+            org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
+            String eMsg = null;
+            try {
+                eMsg = e.getFaultInfo ().getMessage ();
+                exCat = org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory.fromValue (e.getFaultInfo ()
+                                                                                                     .getCategory ()
+                                                                                                     .name ());
+            } catch (Exception e1) {
+               LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+            }
+            // Build and send Asynchronous error response
+            try {
+                VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+                notifyPort.rollbackVnfNotification (messageId, false, exCat, eMsg);
+            } catch (Exception e1) {
+                error = "Error sending rollbackVnf notification " + e1.getMessage ();
+                LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending rollbackVnfA notification", e1);
+                alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+            }
+            LOGGER.info (MessageEnum.RA_ASYNC_ROLLBACK_VNF_COMPLETE, "", "rollbackVnfA");
+            return;
+        }
+
+        LOGGER.debug ("Async Rollback VNF:" + rollback.getVnfId ());
+        // Build and send Asynchronous response
+        try {
+            VnfAdapterNotify notifyPort = getNotifyEP (notificationUrl);
+            notifyPort.rollbackVnfNotification (messageId, true, null, null);
+        } catch (Exception e) {
+            error = "Error sending rollbackVnf notification " + e.getMessage ();
+            LOGGER.error (MessageEnum.RA_SEND_VNF_NOTIF_ERR, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending rollbackVnfA notification", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+        }
+
+        LOGGER.info (MessageEnum.RA_ASYNC_ROLLBACK_VNF_COMPLETE, "", "rollbackVnfA");
+        return;
+    }
+
+    private org.openecomp.mso.adapters.vnf.async.client.VnfRollback copyVrb (Holder <VnfRollback> hVrb) {
+        org.openecomp.mso.adapters.vnf.async.client.VnfRollback cvrb = new org.openecomp.mso.adapters.vnf.async.client.VnfRollback ();
+
+        if (hVrb != null && hVrb.value != null) {
+            org.openecomp.mso.adapters.vnf.async.client.MsoRequest cmr = new org.openecomp.mso.adapters.vnf.async.client.MsoRequest ();
+
+            cvrb.setCloudSiteId (hVrb.value.getCloudSiteId ());
+            if (hVrb.value.getMsoRequest() != null) {
+               cmr.setRequestId (hVrb.value.getMsoRequest ().getRequestId ());
+               cmr.setServiceInstanceId (hVrb.value.getMsoRequest ().getServiceInstanceId ());
+            } else {
+               cmr.setRequestId (null);
+               cmr.setServiceInstanceId (null);
+            }
+            cvrb.setMsoRequest (cmr);
+            cvrb.setVnfId (hVrb.value.getVnfId ());
+            cvrb.setTenantId (hVrb.value.getTenantId ());
+            cvrb.setTenantCreated (hVrb.value.getTenantCreated ());
+            cvrb.setVnfCreated (hVrb.value.getVnfCreated ());
+        }
+        return cvrb;
+    }
+
+    private CreateVnfNotification.Outputs copyCreateOutputs (Holder <Map <String, String>> hMap) {
+
+        CreateVnfNotification.Outputs outputs = new CreateVnfNotification.Outputs ();
+
+        if (hMap != null && hMap.value != null) {
+            Map <String, String> sMap = new HashMap <String, String> ();
+            sMap = hMap.value;
+            CreateVnfNotification.Outputs.Entry entry = new CreateVnfNotification.Outputs.Entry ();
+
+            for (String key : sMap.keySet ()) {
+                entry.setKey (key);
+                entry.setValue (sMap.get (key));
+                outputs.getEntry ().add (entry);
+            }
+        }
+        return outputs;
+    }
+
+    private UpdateVnfNotification.Outputs copyUpdateOutputs (Holder <Map <String, String>> hMap) {
+
+        UpdateVnfNotification.Outputs outputs = new UpdateVnfNotification.Outputs ();
+
+        if (hMap != null && hMap.value != null) {
+            Map <String, String> sMap = new HashMap <String, String> ();
+            sMap = hMap.value;
+            UpdateVnfNotification.Outputs.Entry entry = new UpdateVnfNotification.Outputs.Entry ();
+
+            for (String key : sMap.keySet ()) {
+                entry.setKey (key);
+                entry.setValue (sMap.get (key));
+                outputs.getEntry ().add (entry);
+            }
+        }
+        return outputs;
+    }
+
+    private QueryVnfNotification.Outputs copyQueryOutputs (Holder <Map <String, String>> hMap) {
+
+        QueryVnfNotification.Outputs outputs = new QueryVnfNotification.Outputs ();
+
+        if (hMap != null && hMap.value != null) {
+            Map <String, String> sMap = new HashMap <String, String> ();
+            sMap = hMap.value;
+
+            QueryVnfNotification.Outputs.Entry entry = new QueryVnfNotification.Outputs.Entry ();
+
+            for (String key : sMap.keySet ()) {
+                entry.setKey (key);
+                entry.setValue (sMap.get (key));
+                outputs.getEntry ().add (entry);
+            }
+        }
+        return outputs;
+    }
+
+    private VnfAdapterNotify getNotifyEP (String notificationUrl) {
+
+        URL warWsdlLoc = null;
+        try {
+            warWsdlLoc = Thread.currentThread ().getContextClassLoader ().getResource ("VnfAdapterNotify.wsdl");
+        } catch (Exception e) {
+            LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - WSDL not found", e);
+        }
+        if (warWsdlLoc == null) {
+               LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "WSDL not found");
+        } else {
+            try {
+                LOGGER.debug ("VnfAdpaterNotify.wsdl location:" + warWsdlLoc.toURI ().toString ());
+            } catch (Exception e) {
+                LOGGER.error (MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - WSDL URL convention", e);
+            }
+        }
+
+        VnfAdapterNotify_Service notifySvc = new VnfAdapterNotify_Service (warWsdlLoc,
+                                                                           new QName ("http://com.att.mso/vnfNotify",
+                                                                                      "vnfAdapterNotify"));
+
+        VnfAdapterNotify notifyPort = notifySvc.getMsoVnfAdapterAsyncImplPort ();
+
+        BindingProvider bp = (BindingProvider) notifyPort;
+
+        URL epUrl = null;
+        try {
+            epUrl = new URL (notificationUrl);
+        } catch (MalformedURLException e1) {
+            LOGGER.error (MessageEnum.RA_INIT_NOTIF_EXC, "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "MalformedURLException", e1);
+        }
+
+        LOGGER.debug ("Notification Endpoint URL: " + epUrl.toExternalForm ());
+
+        bp.getRequestContext ().put (BindingProvider.ENDPOINT_ADDRESS_PROPERTY, epUrl.toExternalForm ());
+
+        // authentication
+        try {
+            Map <String, Object> req_ctx = bp.getRequestContext ();
+            Map <String, List <String>> headers = new HashMap <String, List <String>> ();
+
+            String userCredentials = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_VNF_ADAPTER).getEncryptedProperty (BPEL_AUTH_PROP,
+                                                                                             "",
+                                                                                             ENCRYPTION_KEY);
+
+            String basicAuth = "Basic " + DatatypeConverter.printBase64Binary (userCredentials.getBytes ());
+            req_ctx.put (MessageContext.HTTP_REQUEST_HEADERS, headers);
+            headers.put ("Authorization", Collections.singletonList (basicAuth));
+        } catch (Exception e) {
+            LOGGER.error (MessageEnum.RA_SET_CALLBACK_AUTH_EXC, "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Unable to set authorization in callback request", e);
+            alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, "Unable to set authorization in callback request");
+        }
+
+        return notifyPort;
+    }
+
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
new file mode 100644 (file)
index 0000000..757f875
--- /dev/null
@@ -0,0 +1,2391 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Scanner;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+import org.openecomp.mso.adapters.vnf.exceptions.VnfAlreadyExists;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfNotFound;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudSite;
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.HeatEnvironment;
+import org.openecomp.mso.db.catalog.beans.HeatFiles;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import org.openecomp.mso.db.catalog.beans.VnfComponent;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.HeatStatus;
+import org.openecomp.mso.openstack.beans.StackInfo;
+import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.openecomp.mso.openstack.utils.MsoHeatUtils;
+import org.openecomp.mso.openstack.utils.MsoHeatUtilsWithUpdate;
+import org.openecomp.mso.openstack.utils.MsoHeatEnvironmentEntry;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+import org.codehaus.jackson.JsonFactory;
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.ObjectMapper;
+
+@WebService(serviceName = "VnfAdapter", endpointInterface = "org.openecomp.mso.adapters.vnf.MsoVnfAdapter", targetNamespace = "http://com.att.mso/vnf")
+public class MsoVnfAdapterImpl implements MsoVnfAdapter {
+
+       CloudConfigFactory cloudConfigFactory = new CloudConfigFactory();
+       protected CloudConfig cloudConfig = null;
+
+       MsoPropertiesFactory msoPropertiesFactory=new MsoPropertiesFactory();
+
+       private static final String MSO_PROP_VNF_ADAPTER = "MSO_PROP_VNF_ADAPTER";
+    private static final String MSO_CONFIGURATION_ERROR = "MsoConfigurationError";
+    private static final String VNF_ADAPTER_SERVICE_NAME = "MSO-BPMN:MSO-VnfAdapter.";
+    private static final String LOG_REPLY_NAME = "MSO-VnfAdapter:MSO-BPMN.";
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+    private static final String CHECK_REQD_PARAMS = "org.openecomp.mso.adapters.vnf.checkRequiredParameters";
+    private static final String ADD_GET_FILES_ON_VOLUME_REQ = "org.openecomp.mso.adapters.vnf.addGetFilesOnVolumeReq";
+
+    /**
+     * Health Check web method. Does nothing but return to show the adapter is deployed.
+     */
+    @Override
+    public void healthCheck () {
+        LOGGER.debug ("Health check call in VNF Adapter");
+    }
+
+    /**
+     * DO NOT use that constructor to instantiate this class, the msoPropertiesfactory will be NULL.
+     * @see MsoVnfAdapterImpl#MsoVnfAdapterImpl(MsoPropertiesFactory, CloudConfigFactory)
+     */
+    public MsoVnfAdapterImpl() {
+
+    }
+
+    /**
+     * This constructor MUST be used if this class is called with the new operator.
+     * @param msoPropFactory
+     */
+    public MsoVnfAdapterImpl(MsoPropertiesFactory msoPropFactory, CloudConfigFactory cloudConfigFact) {
+       this.msoPropertiesFactory = msoPropFactory;
+       this.cloudConfigFactory = cloudConfigFact;
+    }
+
+    /**
+     * This is the "Create VNF" web service implementation.
+     * It will create a new VNF of the requested type in the specified cloud
+     * and tenant. The tenant must exist before this service is called.
+     *
+     * If a VNF with the same name already exists, this can be considered a
+     * success or failure, depending on the value of the 'failIfExists' parameter.
+     *
+     * All VNF types will be defined in the MSO catalog. The caller must request
+     * one of these pre-defined types or an error will be returned. Within the
+     * catalog, each VNF type references (among other things) a Heat template
+     * which is used to deploy the required VNF artifacts (VMs, networks, etc.)
+     * to the cloud.
+     *
+     * Depending on the Heat template, a variable set of input parameters will
+     * be defined, some of which are required. The caller is responsible to
+     * pass the necessary input data for the VNF or an error will be thrown.
+     *
+     * The method returns the vnfId (the canonical name), a Map of VNF output
+     * attributes, and a VnfRollback object. This last object can be passed
+     * as-is to the rollbackVnf operation to undo everything that was created
+     * for the VNF. This is useful if a VNF is successfully created but the
+     * orchestrator fails on a subsequent operation.
+     *
+     * @param cloudSiteId CLLI code of the cloud site in which to create the VNF
+     * @param tenantId Openstack tenant identifier
+     * @param vnfType VNF type key, should match a VNF definition in catalog DB
+     * @param vnfVersion VNF version key, should match a VNF definition in catalog DB
+     * @param vnfName Name to be assigned to the new VNF
+     * @param inputs Map of key=value inputs for VNF stack creation
+     * @param failIfExists Flag whether already existing VNF should be considered
+     *        a success or failure
+     * @param msoRequest Request tracking information for logs
+     * @param vnfId Holder for output VNF Openstack ID
+     * @param outputs Holder for Map of VNF outputs from heat (assigned IPs, etc)
+     * @param rollback Holder for returning VnfRollback object
+     */
+    @Override
+    public void createVnf (String cloudSiteId,
+                           String tenantId,
+                           String vnfType,
+                           String vnfVersion,
+                           String vnfName,
+                           String requestType,
+                           String volumeGroupHeatStackId,
+                           Map <String, String> inputs,
+                           Boolean failIfExists,
+                           Boolean backout,
+                           MsoRequest msoRequest,
+                           Holder <String> vnfId,
+                           Holder <Map <String, String>> outputs,
+                           Holder <VnfRollback> rollback) throws VnfException {
+       // Create a hook here to catch shortcut createVf requests:
+       if (requestType != null) {
+               if (requestType.startsWith("VFMOD")) {
+                       LOGGER.debug("Calling createVfModule from createVnf -- requestType=" + requestType);
+                       String newRequestType = requestType.substring(5);
+                       String vfVolGroupHeatStackId = "";
+                       String vfBaseHeatStackId = "";
+                       try {
+                               if (volumeGroupHeatStackId != null) {
+                                       vfVolGroupHeatStackId = volumeGroupHeatStackId.substring(0, volumeGroupHeatStackId.lastIndexOf("|"));
+                                       vfBaseHeatStackId = volumeGroupHeatStackId.substring(volumeGroupHeatStackId.lastIndexOf("|")+1);
+                               }
+                       } catch (Exception e) {
+                               // might be ok - both are just blank
+                               LOGGER.debug("ERROR trying to parse the volumeGroupHeatStackId " + volumeGroupHeatStackId);
+                       }
+                       this.createVfModule(cloudSiteId, 
+                                       tenantId, 
+                                       vnfType, 
+                                       vnfVersion, 
+                                       vnfName, 
+                                       newRequestType, 
+                                       vfVolGroupHeatStackId, 
+                                       vfBaseHeatStackId, 
+                                       inputs, 
+                                       failIfExists, 
+                                       backout, 
+                                       msoRequest, 
+                                       vnfId, 
+                                       outputs, 
+                                       rollback);
+                       return;
+               }
+       } 
+       // createVf will know if the requestType starts with "X" that it's the "old" way
+       StringBuilder newRequestTypeSb = new StringBuilder("X");
+       String vfVolGroupHeatStackId = "";
+       String vfBaseHeatStackId = "";
+       if (requestType != null) {
+               newRequestTypeSb.append(requestType);
+       }
+               this.createVfModule(cloudSiteId, 
+                               tenantId, 
+                               vnfType, 
+                               vnfVersion, 
+                               vnfName, 
+                               newRequestTypeSb.toString(), 
+                               vfVolGroupHeatStackId, 
+                               vfBaseHeatStackId, 
+                               inputs, 
+                               failIfExists, 
+                               backout, 
+                               msoRequest, 
+                               vnfId, 
+                               outputs, 
+                               rollback);
+       return;
+       // End createVf shortcut
+    }
+
+    @Override
+    public void updateVnf (String cloudSiteId,
+                           String tenantId,
+                           String vnfType,
+                           String vnfVersion,
+                           String vnfName,
+                           String requestType,
+                           String volumeGroupHeatStackId,
+                           Map <String, String> inputs,
+                           MsoRequest msoRequest,
+                           Holder <Map <String, String>> outputs,
+                           Holder <VnfRollback> rollback) throws VnfException {
+       MsoLogger.setLogContext (msoRequest.getRequestId (), msoRequest.getServiceInstanceId ());
+       MsoLogger.setServiceName ("UpdateVnf");
+       String requestTypeString = "";
+        if (requestType != null && !requestType.equals("")) {
+               requestTypeString = requestType;
+        }
+        String nestedStackId = null;
+        if (volumeGroupHeatStackId != null && !volumeGroupHeatStackId.equals("")) {
+               nestedStackId = volumeGroupHeatStackId;
+        }
+
+        LOGGER.debug ("Updating VNF: " + vnfName + " of type " + vnfType + "in " + cloudSiteId + "/" + tenantId);
+        LOGGER.debug("requestTypeString = " + requestTypeString + ", nestedStackId = " + nestedStackId);
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        // Build a default rollback object (no actions performed)
+        VnfRollback vnfRollback = new VnfRollback ();
+        vnfRollback.setCloudSiteId (cloudSiteId);
+        vnfRollback.setTenantId (tenantId);
+        vnfRollback.setMsoRequest (msoRequest);
+        vnfRollback.setRequestType(requestTypeString);
+
+        // First, look up to see if the VNF already exists.
+        MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+        MsoHeatUtilsWithUpdate heatU = new MsoHeatUtilsWithUpdate (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+        StackInfo heatStack = null;
+        long queryStackStarttime1 = System.currentTimeMillis ();
+        try {
+            heatStack = heat.queryStack (cloudSiteId, tenantId, vnfName);
+            LOGGER.recordMetricEvent (queryStackStarttime1, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryStack", vnfName);
+        } catch (MsoException me) {
+            // Failed to query the Stack due to an openstack exception.
+            // Convert to a generic VnfException
+            me.addContext ("UpdateVNF");
+            String error = "Update VNF: Query " + vnfName + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+            LOGGER.recordMetricEvent (queryStackStarttime1, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", vnfName);
+            LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, "OpenStack", "QueryStack", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in updateVnf", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new VnfException (me);
+        }
+
+        if (heatStack == null || heatStack.getStatus () == HeatStatus.NOTFOUND) {
+            // Not Found
+            String error = "Update VNF: Stack " + vnfName + " does not exist in " + cloudSiteId + "/" + tenantId;
+            LOGGER.error (MessageEnum.RA_VNF_NOT_EXIST, vnfName, cloudSiteId, tenantId, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Update VNF: Stack " + vnfName + " does not exist");
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+            throw new VnfNotFound (cloudSiteId, tenantId, vnfName);
+        } else {
+            LOGGER.debug ("Found Existing stack, status=" + heatStack.getStatus ());
+            // Populate the outputs from the existing stack.
+            outputs.value = copyStringOutputs (heatStack.getOutputs ());
+            rollback.value = vnfRollback; // Default rollback - no updates performed
+        }
+        
+        // 1604 Cinder Volume support - handle a nestedStackId if sent (volumeGroupHeatStackId):
+        StackInfo nestedHeatStack = null;
+        long queryStackStarttime2 = System.currentTimeMillis ();
+        if (nestedStackId != null) {
+               try {
+                       LOGGER.debug("Querying for nestedStackId = " + nestedStackId);
+                       nestedHeatStack = heat.queryStack(cloudSiteId, tenantId, nestedStackId);
+                LOGGER.recordMetricEvent (queryStackStarttime2, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryStack", vnfName);
+               } catch (MsoException me) {
+                   // Failed to query the Stack due to an openstack exception.
+                   // Convert to a generic VnfException
+                   me.addContext ("UpdateVNF");
+                   String error = "Update VNF: Attached heatStack ID Query " + nestedStackId + " in " + cloudSiteId + "/" + tenantId + ": " + me ;
+                LOGGER.recordMetricEvent (queryStackStarttime2, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", vnfName);
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, "OpenStack", "QueryStack", MsoLogger.ErrorCode.AvailabilityError, "Exception trying to query nested stack", me);
+                       LOGGER.debug("ERROR trying to query nested stack= " + error);
+                   LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                   throw new VnfException (me);
+               }
+               if (nestedHeatStack == null || nestedHeatStack.getStatus() == HeatStatus.NOTFOUND) {
+                   String error = "Update VNF: Attached heatStack ID DOES NOT EXIST " + nestedStackId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR"  ;
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, error, "OpenStack", "QueryStack", MsoLogger.ErrorCode.AvailabilityError, "Attached heatStack ID DOES NOT EXIST");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                   LOGGER.debug(error);
+                   throw new VnfException (error, MsoExceptionCategory.USERDATA);
+               } else {
+                       LOGGER.debug("Found nested heat stack - copying values to inputs");
+                       this.sendMapToDebug(inputs);
+                       heat.copyStringOutputsToInputs(inputs, nestedHeatStack.getOutputs(), false);      
+                       this.sendMapToDebug(inputs);
+               }
+        }
+
+        // Ready to deploy the new VNF
+
+        try(CatalogDatabase db = new CatalogDatabase ()) {
+            // Retrieve the VNF definition
+            VnfResource vnf;
+            if (vnfVersion != null && !vnfVersion.isEmpty ()) {
+                vnf = db.getVnfResource (vnfType, vnfVersion);
+            } else {
+                vnf = db.getVnfResource (vnfType);
+            }
+            if (vnf == null) {
+                String error = "Update VNF: Unknown VNF Type: " + vnfType;
+                LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "VNF Type", vnfType, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Update VNF: Unknown VNF Type");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                throw new VnfException (error, MsoExceptionCategory.USERDATA);
+            }
+            LOGGER.debug ("Got VNF definition from Catalog: " + vnf.toString ());
+
+            // Currently, all VNFs are orchestrated via HEAT
+            if (!"HEAT".equals (vnf.getOrchestrationMode ())) {
+                String error = "Update VNF: Configuration error: VNF=" + vnfType;
+                LOGGER.error (MessageEnum.RA_CONFIG_EXC, " VNF=" + vnfType, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Update VNF: Configuration error");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+                // Alarm on this error, configuration must be fixed
+                alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+                throw new VnfException (error, MsoExceptionCategory.INTERNAL);
+            }
+            
+            //1604 - Need to handle an updateVolume request. 
+            VnfComponent vnfComponent = null;
+            if (requestTypeString != null && !requestTypeString.equals("")) {
+               LOGGER.debug("About to query for vnfComponent id = " + vnf.getId() + ", type = " + requestTypeString.toUpperCase());
+               vnfComponent = db.getVnfComponent(vnf.getId(), requestTypeString.toUpperCase());
+               if (vnfComponent == null) {
+                       String error = "Update VNF: Cannot find VNF Component entry for: " + vnfType + ", type = " + requestTypeString.toUpperCase();
+                       LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "VNF Type", vnfType, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Update VNF: Cannot find VNF Component entry");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                       throw new VnfException (error, MsoExceptionCategory.USERDATA);
+               }
+               LOGGER.debug("FOUND VnfComponent: " + vnfComponent.toString());
+            }
+
+            HeatTemplate heatTemplate = db.getHeatTemplate (vnf.getTemplateId ());
+            if (heatTemplate == null) {
+                String error = "Update VNF: undefined Heat Template. VNF=" + vnfType;
+                LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "Heat Template ID", String.valueOf(vnf.getTemplateId ()), "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Update VNF: undefined Heat Template");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                // Alarm on this error, configuration must be fixed
+                alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+
+                throw new VnfException (error, MsoExceptionCategory.INTERNAL);
+            }
+
+            // If this is a component request - get the template associated for volumes
+            // May change this - for now get both templates - but volume will be 2nd, which makes sense
+            // for the rest of the code. Same with envt later
+                       if (vnfComponent != null) {
+                               LOGGER.debug("Querying db to find component template " + vnfComponent.getHeatTemplateId());
+                               heatTemplate = db.getHeatTemplate(vnfComponent
+                                               .getHeatTemplateId());
+                               if (heatTemplate == null) {
+                                       String error = "Update VNF: undefined Heat Template for Volume Component. VNF="
+                                                       + vnfType;
+                                       LOGGER.error(MessageEnum.RA_VNF_UNKNOWN_PARAM,
+                                                       "Heat Template ID",
+                                                       String.valueOf(vnfComponent.getHeatTemplateId()), "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Update VNF: undefined Heat Template for Volume Component");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                                       alarmLogger.sendAlarm(MSO_CONFIGURATION_ERROR,
+                                                       MsoAlarmLogger.CRITICAL, error);
+                                       throw new VnfException(error, MsoExceptionCategory.INTERNAL);
+                               }
+                       }
+
+            LOGGER.debug ("Got HEAT Template from DB: " + heatTemplate.toString ());
+            
+            // Add check for any Environment variable
+            HeatEnvironment heatEnvironment = null;
+            String heatEnvironmentString = null;
+
+            if (vnf.getEnvironmentId () != null) {
+                LOGGER.debug ("about to call getHeatEnvironment with :" + vnf.getEnvironmentId () + ":");
+                heatEnvironment = db.getHeatEnvironment (vnf.getEnvironmentId ());
+                if (heatEnvironment == null) {
+
+                    String error = "Create VNF: undefined Heat Environment. VNF=" + vnfType
+                                   + ", Environment ID="
+                                   + vnf.getEnvironmentId ();
+                    LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "Heat Environment ID", String.valueOf(vnf.getEnvironmentId ()), "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Create VNF: undefined Heat Environment");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                    // Alarm on this error, configuration must be fixed
+                    alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+
+                    throw new VnfException (error, MsoExceptionCategory.INTERNAL);
+                } else {
+                    LOGGER.debug ("Got Heat Environment from DB: " + heatEnvironment.toString ());
+                    heatEnvironmentString = heatEnvironment.getEnvironment (); //this.parseEnvironment (heatEnvironment.getEnvironment ());
+                    LOGGER.debug ("After parsing: " + heatEnvironmentString);
+                }
+            } else {
+                LOGGER.debug ("no environment parameter for this VNF " + vnfType);
+            }
+            
+            //1604 - override the VNF environment with the one for the component
+            if(vnfComponent != null) {
+                if (vnfComponent.getHeatEnvironmentId () != null) {
+                    LOGGER.debug ("about to call getHeatEnvironment with :" + vnfComponent.getHeatEnvironmentId () + ":");
+                    heatEnvironment = db.getHeatEnvironment (vnfComponent.getHeatEnvironmentId ());
+                    if (heatEnvironment == null) {
+                        String error = "Update VNF: undefined Heat Environment. VNF=" + vnfType
+                                       + ", Environment ID="
+                                       + vnfComponent.getHeatEnvironmentId ();
+                        LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "Heat Environment ID", String.valueOf(vnfComponent.getHeatEnvironmentId ()), "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Update VNF: undefined Heat Environment");
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                        // Alarm on this error, configuration must be fixed
+                        alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+
+                        throw new VnfException (error, MsoExceptionCategory.INTERNAL);
+                    } else {
+                        LOGGER.debug ("Got Heat Environment from DB: " + heatEnvironment.toString ());
+                        heatEnvironmentString = heatEnvironment.getEnvironment (); //this.parseEnvironment (heatEnvironment.getEnvironment ());
+                        LOGGER.debug ("after parsing: " + heatEnvironmentString);
+                    }
+                } else {
+                    LOGGER.debug ("no environment parameter for this VNF VOLUME component " + vnfType);
+                }
+            }
+            // End 1604
+            
+            
+            LOGGER.debug ("In MsoVnfAdapterImpl, about to call db.getNestedTemplates avec templateId="
+                          + heatTemplate.getId ());
+            Map <String, Object> nestedTemplates = db.getNestedTemplates (heatTemplate.getId ());
+            Map <String, Object> nestedTemplatesChecked = new HashMap <String, Object> ();
+            if (nestedTemplates != null) {
+                // for debugging print them out
+                LOGGER.debug ("Contents of nestedTemplates - to be added to files: on stack:");
+                for (String providerResourceFile : nestedTemplates.keySet ()) {
+                    String providerResourceFileChecked = providerResourceFile; //this.enforceFilePrefix (providerResourceFile);
+                    String childTemplateBody = (String) nestedTemplates.get (providerResourceFile);
+                    nestedTemplatesChecked.put (providerResourceFileChecked, childTemplateBody);
+                    LOGGER.debug (providerResourceFileChecked + " -> " + childTemplateBody);
+                }
+            } else {
+                LOGGER.debug ("No nested templates found - nothing to do here");
+                nestedTemplatesChecked = null;
+            }
+
+            // Also add the files: for any get_files associated with this vnf_resource_id
+            // *if* there are any
+            LOGGER.debug ("In MsoVnfAdapterImpl.updateVnf, about to call db.getHeatFiles avec vnfResourceId="
+                          + vnf.getId ());
+            Map <String, HeatFiles> heatFiles = db.getHeatFiles (vnf.getId ());
+            Map <String, Object> heatFilesObjects = new HashMap <String, Object> ();
+            if (heatFiles != null) {
+                // add these to stack - to be done in createStack
+                // here, we will map them to Map<String, Object> from Map<String, HeatFiles>
+                // this will match the nested templates format
+                LOGGER.debug ("Contents of heatFiles - to be added to files: on stack:");
+
+                for (String heatFileName : heatFiles.keySet ()) {
+                    String heatFileBody = heatFiles.get (heatFileName).getFileBody ();
+                    // Remove the file:/// enforcement for get_file:
+                    //String heatFileNameChecked = this.enforceFilePrefix (heatFileName);
+                    String heatFileNameChecked = heatFileName;
+                    LOGGER.debug (heatFileNameChecked + " -> " + heatFileBody);
+                    heatFilesObjects.put (heatFileNameChecked, heatFileBody);
+                }
+            } else {
+                LOGGER.debug ("No heat files found -nothing to do here");
+                heatFilesObjects = null;
+            }
+
+            // Check that required parameters have been supplied
+            String missingParams = null;
+            List <String> paramList = new ArrayList <String> ();
+
+            // New for 1510 - consult the PARAM_ALIAS field to see if we've been
+            // supplied an alias. Only check if we don't find it initially.
+            // Also new in 1510 - don't flag missing parameters if there's an environment - because they might be there.
+            // And also new - add parameter to turn off checking all together if we find we're blocking orders we
+            // shouldn't
+            boolean haveEnvironmentParameters = false;
+            boolean checkRequiredParameters = true;
+            try {
+                String propertyString = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_VNF_ADAPTER)
+                                                     .getProperty (MsoVnfAdapterImpl.CHECK_REQD_PARAMS,null);
+                if ("false".equalsIgnoreCase (propertyString) || "n".equalsIgnoreCase (propertyString)) {
+                    checkRequiredParameters = false;
+                    LOGGER.debug ("CheckRequiredParameters is FALSE. Will still check but then skip blocking..."
+                                  + MsoVnfAdapterImpl.CHECK_REQD_PARAMS);
+                }
+            } catch (Exception e) {
+                // No problem - default is true
+                LOGGER.debug ("An exception occured trying to get property " + MsoVnfAdapterImpl.CHECK_REQD_PARAMS, e);
+            }
+            // 1604 - Add enhanced environment & parameter checking
+            // Part 1: parse envt entries to see if reqd parameter is there (before used a simple grep
+            // Part 2: only submit to openstack the parameters in the envt that are in the heat template
+            // Note this also removes any comments
+            MsoHeatEnvironmentEntry mhee = null;
+            if (heatEnvironmentString != null && heatEnvironmentString.toLowerCase ().contains ("parameters:")) {
+               LOGGER.debug("Enhanced environment checking enabled - 1604");
+                haveEnvironmentParameters = true;
+                StringBuilder sb = new StringBuilder(heatEnvironmentString);
+                //LOGGER.debug("About to create MHEE with " + sb);
+                mhee = new MsoHeatEnvironmentEntry(sb);
+                StringBuilder sb2 = new StringBuilder("\nHeat Template Parameters:\n");
+                for (HeatTemplateParam parm : heatTemplate.getParameters()) {
+                       sb2.append("\t" + parm.getParamName() + ", required=" + parm.isRequired());
+                }
+                if (!mhee.isValid()) {
+                       sb2.append("Environment says it's not valid! " + mhee.getErrorString());
+                } else {
+                       sb2.append("\nEnvironment:");
+                       sb2.append(mhee.toFullString());
+                }
+                LOGGER.debug(sb2.toString());
+            } else {
+               LOGGER.debug("NO ENVIRONMENT for this entry");
+            }
+
+            for (HeatTemplateParam parm : heatTemplate.getParameters ()) {
+                LOGGER.debug ("Parameter:'" + parm.getParamName ()
+                              + "', isRequired="
+                              + parm.isRequired ()
+                              + ", alias="
+                              + parm.getParamAlias ());
+                if (parm.isRequired () && (inputs == null || !inputs.containsKey (parm.getParamName ()))) {
+                    if (inputs.containsKey (parm.getParamAlias ())) {
+                        // They've submitted using an alias name. Remove that from inputs, and add back using real name.
+                        String realParamName = parm.getParamName ();
+                        String alias = parm.getParamAlias ();
+                        String value = inputs.get (alias);
+                        LOGGER.debug ("*Found an Alias: paramName=" + realParamName
+                                      + ",alias="
+                                      + alias
+                                      + ",value="
+                                      + value);
+                        inputs.remove (alias);
+                        inputs.put (realParamName, value);
+                        LOGGER.debug (alias + " entry removed from inputs, added back using " + realParamName);
+                    } 
+                    // enhanced - check if it's in the Environment (note: that method 
+                    else if (mhee != null && mhee.containsParameter(parm.getParamName())) {
+
+                        LOGGER.debug ("Required parameter " + parm.getParamName ()
+                                      + " appears to be in environment - do not count as missing");
+                    }
+                    else {
+                        LOGGER.debug ("adding to missing parameters list: " + parm.getParamName ());
+                        if (missingParams == null) {
+                            missingParams = parm.getParamName ();
+                        } else {
+                            missingParams += "," + parm.getParamName ();
+                        }
+                    }
+                }
+                paramList.add (parm.getParamName ());
+            }
+            if (missingParams != null) {
+                // Problem - missing one or more required parameters
+               if (checkRequiredParameters) {
+                String error = "Update VNF: Missing Required inputs: " + missingParams;
+                LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Update VNF: Missing Required inputs");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, error);
+                throw new VnfException (error, MsoExceptionCategory.USERDATA);
+               } else {
+                       LOGGER.debug ("found missing parameters - but checkRequiredParameters is false - will not block");
+               }
+            } else {
+                LOGGER.debug ("No missing parameters found - ok to proceed");
+            }
+            
+            // Here - modify heatEnvironmentString
+            StringBuilder parsedEnvironmentString = null; 
+            String newEnvironmentString = null;
+            if (mhee != null) {
+               LOGGER.debug("Environment before:\n" + heatEnvironmentString);
+               parsedEnvironmentString = mhee.toFullStringExcludeNonParams(heatTemplate.getParameters());
+               LOGGER.debug("Environment after:\n" + parsedEnvironmentString.toString());
+               newEnvironmentString = parsedEnvironmentString.toString();
+            }
+
+            // Remove any extraneous parameters (don't throw an error)
+            if (inputs != null) {
+                List <String> extraParams = new ArrayList <String> ();
+                extraParams.addAll (inputs.keySet ());
+                // This is not a valid parameter for this template
+                extraParams.removeAll (paramList);
+                if (!extraParams.isEmpty ()) {
+                       LOGGER.warn (MessageEnum.RA_VNF_EXTRA_PARAM, vnfType, extraParams.toString(), "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "VNF Extra params");
+                    inputs.keySet ().removeAll (extraParams);
+                }
+            }
+
+            // "Fix" the template if it has CR/LF (getting this from Oracle)
+            String template = heatTemplate.getHeatTemplate ();
+            template = template.replaceAll ("\r\n", "\n");
+
+            // Have the tenant. Now deploy the stack itself
+            // Ignore MsoTenantNotFound and MsoStackAlreadyExists exceptions
+            // because we already checked for those.
+            long updateStackStarttime = System.currentTimeMillis ();
+            try {
+                heatStack = heatU.updateStack (cloudSiteId,
+                                               tenantId,
+                                               vnfName,
+                                               template,
+                                               copyStringInputs (inputs),
+                                               true,
+                                               heatTemplate.getTimeoutMinutes (),
+                                               newEnvironmentString,
+                                               //heatEnvironmentString,
+                                               nestedTemplatesChecked,
+                                               heatFilesObjects);
+                LOGGER.recordMetricEvent (updateStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "UpdateStack", vnfName);
+            } catch (MsoException me) {
+                me.addContext ("UpdateVNF");
+                String error = "Update VNF " + vnfType + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+                LOGGER.recordMetricEvent (updateStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "UpdateStack", vnfName);
+                LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR, vnfType, cloudSiteId, tenantId, "OpenStack", "updateStack", MsoLogger.ErrorCode.DataError, "Exception - updateStack", me);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                throw new VnfException (me);
+            }
+        }
+
+        // Reach this point if updateStack is successful.
+        // Populate remaining rollback info and response parameters.
+        vnfRollback.setVnfId (heatStack.getCanonicalName ());
+        vnfRollback.setVnfCreated (true);
+
+        outputs.value = copyStringOutputs (heatStack.getOutputs ());
+        rollback.value = vnfRollback;
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully update VNF");
+        return;
+    }
+
+    /**
+     * This is the "Query VNF" web service implementation.
+     * It will look up a VNF by name or ID in the specified cloud and tenant.
+     *
+     * The method returns an indicator that the VNF exists, its Openstack internal
+     * ID, its status, and the set of outputs (from when the stack was created).
+     *
+     * @param cloudSiteId CLLI code of the cloud site in which to query
+     * @param tenantId Openstack tenant identifier
+     * @param vnfName VNF Name or Openstack ID
+     * @param msoRequest Request tracking information for logs
+     * @param vnfExists Flag reporting the result of the query
+     * @param vnfId Holder for output VNF Openstack ID
+     * @param outputs Holder for Map of VNF outputs from heat (assigned IPs, etc)
+     */
+    @Override
+    public void queryVnf (String cloudSiteId,
+                          String tenantId,
+                          String vnfName,
+                          MsoRequest msoRequest,
+                          Holder <Boolean> vnfExists,
+                          Holder <String> vnfId,
+                          Holder <VnfStatus> status,
+                          Holder <Map <String, String>> outputs) throws VnfException {
+        MsoLogger.setLogContext (msoRequest);
+       MsoLogger.setServiceName ("QueryVnf");
+        LOGGER.debug ("Querying VNF " + vnfName + " in " + cloudSiteId + "/" + tenantId);
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+        StackInfo heatStack = null;
+        long subStartTime = System.currentTimeMillis ();
+        try {
+            heatStack = heat.queryStack (cloudSiteId, tenantId, vnfName);
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryStack", vnfName);
+        } catch (MsoException me) {
+            me.addContext ("QueryVNF");
+            // Failed to query the Stack due to an openstack exception.
+            // Convert to a generic VnfException
+            String error = "Query VNF: " + vnfName + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", vnfName);
+            LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, "OpenStack", "QueryVNF", MsoLogger.ErrorCode.DataError, "Exception - queryStack", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new VnfException (me);
+        }
+
+        // Populate the outputs based on the returned Stack information
+        //
+        if (heatStack == null || heatStack.getStatus () == HeatStatus.NOTFOUND) {
+            // Not Found
+            vnfExists.value = Boolean.FALSE;
+            status.value = VnfStatus.NOTFOUND;
+            vnfId.value = null;
+            outputs.value = new HashMap <String, String> (); // Return as an empty map
+
+            LOGGER.debug ("VNF " + vnfName + " not found");
+        } else {
+            vnfExists.value = Boolean.TRUE;
+            status.value = stackStatusToVnfStatus (heatStack.getStatus ());
+            vnfId.value = heatStack.getCanonicalName ();
+            outputs.value = copyStringOutputs (heatStack.getOutputs ());
+
+            LOGGER.debug ("VNF " + vnfName + " found, ID = " + vnfId.value);
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully query VNF");
+        return;
+    }
+
+    /**
+     * This is the "Delete VNF" web service implementation.
+     * It will delete a VNF by name or ID in the specified cloud and tenant.
+     *
+     * The method has no outputs.
+     *
+     * @param cloudSiteId CLLI code of the cloud site in which to delete
+     * @param tenantId Openstack tenant identifier
+     * @param vnfName VNF Name or Openstack ID
+     * @param msoRequest Request tracking information for logs
+     */
+    @Override
+    public void deleteVnf (String cloudSiteId,
+                           String tenantId,
+                           String vnfName,
+                           MsoRequest msoRequest) throws VnfException {
+        MsoLogger.setLogContext (msoRequest);
+       MsoLogger.setServiceName ("DeleteVnf");
+        LOGGER.debug ("Deleting VNF " + vnfName + " in " + cloudSiteId + "/" + tenantId);
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+        // Use the MsoHeatUtils to delete the stack. Set the polling flag to true.
+        // The possible outcomes of deleteStack are a StackInfo object with status
+        // of NOTFOUND (on success) or FAILED (on error). Also, MsoOpenstackException
+        // could be thrown.
+        long subStartTime = System.currentTimeMillis ();
+        try {
+            heat.deleteStack (tenantId, cloudSiteId, vnfName, true);
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "DeleteStack", vnfName);
+        } catch (MsoException me) {
+            me.addContext ("DeleteVNF");
+            // Failed to query the Stack due to an openstack exception.
+            // Convert to a generic VnfException
+            String error = "Delete VNF: " + vnfName + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "DeleteStack", vnfName);
+            LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR, vnfName, cloudSiteId, tenantId, "OpenStack", "DeleteVNF", MsoLogger.ErrorCode.DataError, "Exception - DeleteVNF", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new VnfException (me);
+        }
+
+        // On success, nothing is returned.
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully delete VNF");
+        return;
+    }
+
+    /**
+     * This web service endpoint will rollback a previous Create VNF operation.
+     * A rollback object is returned to the client in a successful creation
+     * response. The client can pass that object as-is back to the rollbackVnf
+     * operation to undo the creation.
+     */
+    @Override
+    public void rollbackVnf (VnfRollback rollback) throws VnfException {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("RollbackVnf");
+       // rollback may be null (e.g. if stack already existed when Create was called)
+        if (rollback == null) {
+            LOGGER.info (MessageEnum.RA_ROLLBACK_NULL, "OpenStack", "rollbackVnf");
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "Rollback request content is null");
+            return;
+        }
+
+        // Get the elements of the VnfRollback object for easier access
+        String cloudSiteId = rollback.getCloudSiteId ();
+        String tenantId = rollback.getTenantId ();
+        String vnfId = rollback.getVnfId ();
+
+        MsoLogger.setLogContext (rollback.getMsoRequest());
+
+        LOGGER.debug ("Rolling Back VNF " + vnfId + " in " + cloudSiteId + "/" + tenantId);
+
+        MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+        // Use the MsoHeatUtils to delete the stack. Set the polling flag to true.
+        // The possible outcomes of deleteStack are a StackInfo object with status
+        // of NOTFOUND (on success) or FAILED (on error). Also, MsoOpenstackException
+        // could be thrown.
+        long subStartTime = System.currentTimeMillis ();
+        try {
+            heat.deleteStack (tenantId, cloudSiteId, vnfId, true);
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "DeleteStack", null);
+        } catch (MsoException me) {
+            // Failed to rollback the Stack due to an openstack exception.
+            // Convert to a generic VnfException
+            me.addContext ("RollbackVNF");
+            String error = "Rollback VNF: " + vnfId + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "DeleteStack", null);
+            LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR, vnfId, cloudSiteId, tenantId, "OpenStack", "DeleteStack", MsoLogger.ErrorCode.DataError, "Exception - DeleteStack", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new VnfException (me);
+        }
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully roll back VNF");
+        return;
+    }
+
+    private VnfStatus stackStatusToVnfStatus (HeatStatus stackStatus) {
+        switch (stackStatus) {
+            case CREATED:
+                return VnfStatus.ACTIVE;
+            case UPDATED:
+                return VnfStatus.ACTIVE;
+            case FAILED:
+                return VnfStatus.FAILED;
+            default:
+                return VnfStatus.UNKNOWN;
+        }
+    }
+
+    private Map <String, String> copyStringOutputs (Map <String, Object> stackOutputs) {
+        Map <String, String> stringOutputs = new HashMap <String, String> ();
+        for (String key : stackOutputs.keySet ()) {
+            if (stackOutputs.get (key) instanceof String) {
+                stringOutputs.put (key, (String) stackOutputs.get (key));
+            }
+        }
+        return stringOutputs;
+    }
+
+    private Map <String, Object> copyStringInputs (Map <String, String> stringInputs) {
+        return new HashMap <String, Object> (stringInputs);
+    }
+
+    /*
+     * a helper method to make sure that any resource_registry entry of the format
+     * "xx::xx" : yyy.yaml (or yyy.template)
+     * has the file name prepended with "file:///"
+     * Return a String of the environment body that's passed in.
+     * Have to be careful not to mess up the original formatting.
+     */
+    private String parseEnvironment (String environment) {
+        StringBuilder sb = new StringBuilder ();
+        try (Scanner scanner = new Scanner (environment)) {
+            scanner.useDelimiter ("\n");
+            String line = null;
+            Pattern resource = Pattern.compile ("\\s*\"\\w+::\\S+\"\\s*:");
+            LOGGER.debug ("regex pattern for finding a resource_registry: \\s*\"\\w+::\\S+\"\\s*:");
+            while (scanner.hasNextLine ()) {
+                line = scanner.nextLine ();
+                if (line.toLowerCase ().contains ("resource_registry")) {
+                    sb.append (line + "\n");
+                    boolean done = false;
+                    // basically keep scanning until EOF or parameters: section
+                    while (scanner.hasNextLine () && !done) {
+                        line = scanner.nextLine ();
+                        if ("parameters:".equalsIgnoreCase (line.trim ())) {
+                            sb.append (line + "\n");
+                            done = true;
+                            break;
+                        }
+                        Matcher m = resource.matcher (line);
+                        if (m.find ()) {
+                            sb.append (m.group ());
+                            String secondPart = line.substring (m.end ()).trim ();
+                            String output = secondPart;
+                            if (secondPart.endsWith (".yaml")
+                                || secondPart.endsWith (".template") && !secondPart.startsWith ("file:///")) {
+                                output = "file:///" + secondPart;
+                                LOGGER.debug ("changed " + secondPart + " to " + output);
+                            } // don't do anything if it's not .yaml or .template
+                            sb.append (" " + output + "\n");
+                        } else {
+                            sb.append (line + "\n");
+                        }
+                    }
+                } else {
+                    sb.append (line + "\n");
+                    continue;
+                }
+            }
+            scanner.close ();
+        } catch (Exception e) {
+            LOGGER.debug ("Error trying to scan " + environment, e);
+            return environment;
+        }
+        return sb.toString ();
+    }
+
+    /*
+     * helper class to add file:/// to the Provider_Resource_File entry in HEAT_NESTED_TEMPLATE
+     * and the File_Name entry in HEAT_FILES if the file:/// part is missing.
+     */
+    private String enforceFilePrefix (String string) {
+        if (string.trim ().startsWith ("file:///")) {
+            // just leave it
+            return string;
+        }
+        if (string.trim ().endsWith (".yaml") || string.trim ().endsWith (".template")) {
+            // only .yaml or .template are valid anyway - otherwise don't bother
+            return "file:///" + string.trim ();
+        } else {
+            LOGGER.debug (string + " is NOT a .yaml or .template file");
+        }
+        return string;
+    }
+    
+    private void sendMapToDebug(Map<String, String> inputs) {
+       int i = 0;
+       StringBuilder sb = new StringBuilder("inputs:");
+       if (inputs == null) {
+               sb.append("\tNULL");
+       }
+       else if (inputs.size() < 1) {
+               sb.append("\tEMPTY");
+       } else {
+               for (String str : inputs.keySet()) {
+                       sb.append("\titem " + i++ + ": " + str + "=" + inputs.get(str));
+               }
+       }
+       LOGGER.debug(sb.toString());
+       return;
+    }
+
+    public void createVfModule(String cloudSiteId,
+            String tenantId,
+            String vnfType,
+            String vnfVersion,
+            String vnfName,
+            String requestType,
+            String volumeGroupHeatStackId,
+            String baseVfHeatStackId,
+            Map <String, String> inputs,
+            Boolean failIfExists,
+            Boolean backout,
+            MsoRequest msoRequest,
+            Holder <String> vnfId,
+            Holder <Map <String, String>> outputs,
+            Holder <VnfRollback> rollback) throws VnfException {
+       String vfModuleName = vnfName;
+       String vfModuleType = vnfType;
+       String vfVersion = vnfVersion;
+       MsoLogger.setLogContext (msoRequest);
+       MsoLogger.setServiceName ("CreateVfModule");
+       String requestTypeString = "";
+        if (requestType != null && !requestType.equals("")) {
+               requestTypeString = requestType;
+        }
+        String nestedStackId = null;
+        if (volumeGroupHeatStackId != null && !volumeGroupHeatStackId.equals("")) {
+               if (!volumeGroupHeatStackId.equalsIgnoreCase("null")) {
+                       nestedStackId = volumeGroupHeatStackId;
+               }
+        }
+        String nestedBaseStackId = null;
+        if (baseVfHeatStackId != null && !baseVfHeatStackId.equals("")) {
+               if (!baseVfHeatStackId.equalsIgnoreCase("null")) {
+                       nestedBaseStackId = baseVfHeatStackId;
+               }
+        }
+        
+        if (inputs == null) {
+               // Create an empty set of inputs
+               inputs = new HashMap<String,String>();
+               LOGGER.debug("inputs == null - setting to empty");
+        } else {
+               this.sendMapToDebug(inputs);
+        }
+        //This method will also handle doing things the "old" way - i.e., just orchestrate a VNF
+        boolean oldWay = false;
+        if (requestTypeString.startsWith("X")) {
+               oldWay = true;
+               LOGGER.debug("orchestrating a VNF - *NOT* a module!");
+               requestTypeString = requestTypeString.substring(1);
+        }
+        
+        // 1607 - let's parse out the request type we're being sent
+        boolean isBaseRequest = false;
+        boolean isVolumeRequest = false;
+        if (requestTypeString.startsWith("VOLUME")) {
+               isVolumeRequest = true;
+        } 
+
+        LOGGER.debug("requestTypeString = " + requestTypeString + ", nestedStackId = " + nestedStackId + ", nestedBaseStackId = " + nestedBaseStackId);
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        // Build a default rollback object (no actions performed)
+        VnfRollback vfRollback = new VnfRollback();
+        vfRollback.setCloudSiteId(cloudSiteId);
+        vfRollback.setTenantId(tenantId);
+        vfRollback.setMsoRequest(msoRequest);
+        vfRollback.setRequestType(requestTypeString);
+        vfRollback.setVolumeGroupHeatStackId(volumeGroupHeatStackId);
+        vfRollback.setBaseGroupHeatStackId(baseVfHeatStackId);
+        vfRollback.setIsBase(isBaseRequest);
+        
+        // First, look up to see if the VF already exists.
+        MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+        StackInfo heatStack = null;
+        long subStartTime1 = System.currentTimeMillis ();
+        try {
+            heatStack = heat.queryStack (cloudSiteId, tenantId, vfModuleName);
+            LOGGER.recordMetricEvent (subStartTime1, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryStack", vfModuleName);
+        } catch (MsoException me) {
+            String error = "Create VF Module: Query " + vfModuleName + " in " + cloudSiteId + "/" + tenantId + ": " + me ;
+            LOGGER.recordMetricEvent (subStartTime1, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", vfModuleName);
+            LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, "OpenStack", "queryStack", MsoLogger.ErrorCode.DataError, "Exception - queryStack", me);
+            // Failed to query the Stack due to an openstack exception.
+            // Convert to a generic VnfException
+            me.addContext ("CreateVFModule");
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new VnfException (me);
+        }
+        // New with 1607 - more precise handling/messaging if the stack already exists 
+        if (heatStack != null && !(heatStack.getStatus () == HeatStatus.NOTFOUND)) {
+               // INIT, CREATED, NOTFOUND, FAILED, BUILDING, DELETING, UNKNOWN, UPDATING, UPDATED
+               HeatStatus status = heatStack.getStatus();
+               if (status == HeatStatus.INIT || status == HeatStatus.BUILDING || status == HeatStatus.DELETING || status == HeatStatus.UPDATING) {
+                       // fail - it's in progress - return meaningful error
+                String error = "Create VF: Stack " + 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, "OpenStack", "queryStack", MsoLogger.ErrorCode.DataError, "Stack " + vfModuleName + " already exists");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error);
+                throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, heatStack.getCanonicalName ());
+               }
+               if (status == HeatStatus.FAILED) {
+                       // fail - it exists and is in a FAILED state
+                String error = "Create VF: Stack " + vfModuleName + " already exists and is in FAILED state in " + cloudSiteId + "/" + tenantId + "; requires manual intervention.";
+                LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, "OpenStack", "queryStack", MsoLogger.ErrorCode.DataError, "Stack " + vfModuleName + " already exists and is in FAILED state");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error);
+                throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, heatStack.getCanonicalName ());       
+               }
+               if (status == HeatStatus.UNKNOWN || status == HeatStatus.UPDATED) {
+                       // fail - it exists and is in a FAILED state
+                String error = "Create VF: Stack " + vfModuleName + " already exists and has status " + status.toString() + " in " + cloudSiteId + "/" + tenantId + "; requires manual intervention.";
+                LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, "OpenStack", "queryStack", MsoLogger.ErrorCode.DataError, "Stack " + vfModuleName + " already exists and is in UPDATED or UNKNOWN state");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error);
+                throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, heatStack.getCanonicalName ());       
+               }
+               if (status == HeatStatus.CREATED) {
+                       // fail - it exists 
+                       if (failIfExists != null && failIfExists) {
+                               String error = "Create VF: Stack " + vfModuleName + " already exists in " + cloudSiteId + "/" + tenantId;
+                               LOGGER.error (MessageEnum.RA_VNF_ALREADY_EXIST, vfModuleName, cloudSiteId, tenantId, "OpenStack", "queryStack", MsoLogger.ErrorCode.DataError, "Stack " + vfModuleName + " already exists");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error);
+                               throw new VnfAlreadyExists (vfModuleName, cloudSiteId, tenantId, heatStack.getCanonicalName ());        
+                       } else {
+                               LOGGER.debug ("Found Existing stack, status=" + heatStack.getStatus ());
+                               // Populate the outputs from the existing stack.
+                               vnfId.value = heatStack.getCanonicalName ();
+                               outputs.value = copyStringOutputs (heatStack.getOutputs ());
+                               rollback.value = vfRollback; // Default rollback - no updates performed
+                       }
+               }
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully create VF Module");
+            return;
+               
+        }
+        
+        // handle a nestedStackId if sent- this one would be for the volume - so applies to both Vf and Vnf
+        StackInfo nestedHeatStack = null;
+        long subStartTime2 = System.currentTimeMillis ();
+        if (nestedStackId != null) {
+               try {
+                       LOGGER.debug("Querying for nestedStackId = " + nestedStackId);
+                       nestedHeatStack = heat.queryStack(cloudSiteId, tenantId, nestedStackId);
+                LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryStack", vfModuleName);
+               } catch (MsoException me) {
+                   // Failed to query the Stack due to an openstack exception.
+                   // Convert to a generic VnfException
+                   me.addContext ("CreateVFModule");
+                   String error = "Create VFModule: Attached heatStack ID Query " + nestedStackId + " in " + cloudSiteId + "/" + tenantId + ": " + me ;
+                LOGGER.recordMetricEvent (subStartTime2, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", vfModuleName);
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, "OpenStack", "queryStack", MsoLogger.ErrorCode.BusinessProcesssError, "MsoException trying to query nested stack", me);
+                       LOGGER.debug("ERROR trying to query nested stack= " + error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                   throw new VnfException (me);
+               }
+               if (nestedHeatStack == null || nestedHeatStack.getStatus() == HeatStatus.NOTFOUND) {
+                   String error = "Create VFModule: Attached heatStack ID DOES NOT EXIST " + nestedStackId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR"  ;
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, error, "OpenStack", "queryStack", MsoLogger.ErrorCode.BusinessProcesssError, "Create VFModule: Attached heatStack ID DOES NOT EXIST");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error);
+                   LOGGER.debug(error);
+                   throw new VnfException (error, MsoExceptionCategory.USERDATA);
+               } else {
+                       LOGGER.debug("Found nested volume heat stack - copying values to inputs");
+                       this.sendMapToDebug(inputs);
+                       heat.copyStringOutputsToInputs(inputs, nestedHeatStack.getOutputs(), false);      
+                       this.sendMapToDebug(inputs);
+               }
+        }
+        
+        // handle a nestedBaseStackId if sent- this is the stack ID of the base. Should be null for VNF requests
+        StackInfo nestedBaseHeatStack = null;
+        long subStartTime3 = System.currentTimeMillis ();
+        if (nestedBaseStackId != null) {
+               try {
+                       LOGGER.debug("Querying for nestedBaseStackId = " + nestedBaseStackId);
+                       nestedBaseHeatStack = heat.queryStack(cloudSiteId, tenantId, nestedBaseStackId);
+                LOGGER.recordMetricEvent (subStartTime3, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "QueryStack", vfModuleName);
+               } catch (MsoException me) {
+                   // Failed to query the Stack due to an openstack exception.
+                   // Convert to a generic VnfException
+                   me.addContext ("CreateVFModule");
+                   String error = "Create VFModule: Attached baseHeatStack ID Query " + nestedBaseStackId + " in " + cloudSiteId + "/" + tenantId + ": " + me ;
+                LOGGER.recordMetricEvent (subStartTime3, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", vfModuleName);
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, "OpenStack", "QueryStack", MsoLogger.ErrorCode.BusinessProcesssError, "MsoException trying to query nested base stack", me);
+                       LOGGER.debug("ERROR trying to query nested base stack= " + error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                   throw new VnfException (me);
+               }
+               if (nestedBaseHeatStack == null || nestedBaseHeatStack.getStatus() == HeatStatus.NOTFOUND) {
+                   String error = "Create VFModule: Attached base heatStack ID DOES NOT EXIST " + nestedBaseStackId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR"  ;
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, error, "OpenStack", "QueryStack", MsoLogger.ErrorCode.BusinessProcesssError, "Create VFModule: Attached base heatStack ID DOES NOT EXIST");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, error);
+                   LOGGER.debug(error);
+                   throw new VnfException (error, MsoExceptionCategory.USERDATA);
+               } else {
+                       LOGGER.debug("Found nested base heat stack - copying values to inputs");
+                       this.sendMapToDebug(inputs);
+                       heat.copyStringOutputsToInputs(inputs, nestedBaseHeatStack.getOutputs(), false);      
+                       this.sendMapToDebug(inputs);
+               }
+        }
+        
+        // Ready to deploy the new VNF
+        
+        try (CatalogDatabase db = new CatalogDatabase()) {
+            // Retrieve the VF 
+               VfModule vf = null;
+               VnfResource vnfResource = null;
+               LOGGER.debug("version: " + vfVersion);
+                       if (!oldWay) {
+                               // Need to handle old and new schema methods - for a time. Try the new way first.
+                               if (vfVersion != null && !vfVersion.isEmpty()) {
+                                       vf = db.getVfModuleType(vfModuleType, vfVersion);
+                                       if (vf == null) {
+                                               LOGGER.debug("Unable to find " + vfModuleType + " and version=" + vfVersion + " in the TYPE column - will try in MODEL_NAME");
+                                               vf = db.getVfModuleModelName(vfModuleType, vfVersion);
+                                               if (vf == null) {
+                                                       LOGGER.debug("Unable to find " + vfModuleType + " and version=" + vfVersion + " in the MODEL_NAME field either - ERROR");
+                                               }
+                                       }
+                               } else {
+                                       vf = db.getVfModuleType(vfModuleType);
+                                       if (vf == null) {
+                                               LOGGER.debug("Unable to find " + vfModuleType + " in the TYPE column - will try in MODEL_NAME");
+                                               vf = db.getVfModuleModelName(vfModuleType);
+                                               if (vf == null) {
+                                                       LOGGER.debug("Unable to find " + vfModuleType + " in the MODEL_NAME field either - ERROR");
+                                               }
+                                       }
+                               }
+                               if (vf == null) {
+                                       String error = "Create VF Module: Unable to determine specific VF Module Type: "
+                                                       + vfModuleType;
+                                       if (vfVersion != null && !vfVersion.isEmpty()) {
+                                               error += " with version = " + vfVersion;
+                                       }
+                                       LOGGER.error(MessageEnum.RA_VNF_UNKNOWN_PARAM,
+                                                       "VF Module Type", vfModuleType, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Create VF Module: Unable to determine specific VF Module Type");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                                       throw new VnfException(error, MsoExceptionCategory.USERDATA);
+                               }
+                               LOGGER.debug("Got VF module definition from Catalog: "
+                                               + vf.toString());
+
+                               if (vf.isBase()) {
+                                       isBaseRequest = true;
+                                       LOGGER.debug("This is a BASE VF request!");
+                               } else {
+                                       LOGGER.debug("This is *not* a BASE VF request!");
+                                       if (!isVolumeRequest && nestedBaseStackId == null) {
+                                               LOGGER.debug("DANGER WILL ROBINSON! This is unexpected - no nestedBaseStackId with this non-base request");
+                                       }
+                               }
+                       } else {
+                               if (vfVersion != null && !vfVersion.isEmpty()) {
+                                       vnfResource = db.getVnfResource(vnfType, vnfVersion);
+                               } else {
+                                       vnfResource = db.getVnfResource(vnfType);
+                               }
+                               if (vnfResource == null) {
+                                       String error = "Create VNF: Unknown VNF Type: " + vnfType;
+                                       LOGGER.error(MessageEnum.RA_VNF_UNKNOWN_PARAM, "VNF Type",
+                                                       vnfType, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Create VNF: Unknown VNF Type");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                                       throw new VnfException(error, MsoExceptionCategory.USERDATA);
+                               }
+                               LOGGER.debug("Got VNF module definition from Catalog: "
+                                               + vnfResource.toString());
+                       }
+                       // By here - we have either a vf or vnfResource
+
+            //1607 - Add version check
+            // First - see if it's in the VnfResource record
+            // if we have a vf Module - then we have to query to get the VnfResource record.
+            if (!oldWay) {
+               if (vf.getVnfResourceId() != null) { 
+                       int vnfResourceId = vf.getVnfResourceId();
+                       vnfResource = db.getVnfResourceById(vnfResourceId);
+                       if (vnfResource == null) {
+                               LOGGER.debug("Unable to find vnfResource at " + vnfResourceId + " will not error for now...");
+                       }
+               }
+            } 
+            String minVersionVnf = null;
+            String maxVersionVnf = null;
+            if (vnfResource != null) {
+               try {
+                       minVersionVnf = vnfResource.getAicVersionMin();
+                       maxVersionVnf = vnfResource.getAicVersionMax();
+               } catch (Exception e) {
+                       LOGGER.debug("Unable to pull min/max version for this VNF Resource entry");
+                       minVersionVnf = null;
+                       maxVersionVnf = null;
+               }
+               if (minVersionVnf != null && minVersionVnf.equals("")) {
+                       minVersionVnf = null;
+               }
+               if (maxVersionVnf != null && maxVersionVnf.equals("")) {
+                       maxVersionVnf = null;
+               }
+            }
+                       if (minVersionVnf != null && maxVersionVnf != null) {
+                               MavenLikeVersioning aicV = new MavenLikeVersioning();
+                               CloudSite cloudSite = null;
+                               String aicVersion = "";
+                               if (this.cloudConfig == null) {
+                                       this.cloudConfig = this.cloudConfigFactory.getCloudConfig();
+                               }
+                               // double check
+                               if (this.cloudConfig != null) {
+                                       cloudSite = this.cloudConfig.getCloudSite(cloudSiteId);
+                                       if (cloudSite != null) {
+                                               aicV.setVersion(cloudSite.getAic_version());
+                                               if ((aicV.isMoreRecentThan(minVersionVnf) || aicV.isTheSameVersion(minVersionVnf)) // aic >= min
+                                                               && (aicV.isTheSameVersion(maxVersionVnf) || !(aicV.isMoreRecentThan(maxVersionVnf)))) { //aic <= max
+                                                       LOGGER.debug("VNF Resource " + vnfResource.getVnfType() + " VersionMin=" + minVersionVnf + " VersionMax:" + maxVersionVnf + " supported on Cloud: " + cloudSite.getId() + " with AIC_Version:" + cloudSite.getAic_version());
+                                               } else {
+                                                       // ERROR
+                                                       String error = "VNF Resource type: " + vnfResource.getVnfType() + " VersionMin=" + minVersionVnf + " VersionMax:" + maxVersionVnf + " NOT supported on Cloud: " + cloudSite.getId() + " with AIC_Version:" + cloudSite.getAic_version();
+                                                       LOGGER.error(MessageEnum.RA_CONFIG_EXC, error, "OpenStack", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - setVersion");
+                                                       LOGGER.debug(error);
+                                                       throw new VnfException(error, MsoExceptionCategory.USERDATA);
+                                               }
+                                       } // let this error out downstream to avoid introducing uncertainty at this stage
+                               } else {
+                                       LOGGER.debug("cloudConfig is NULL - cannot check cloud site version");
+                               }
+
+                       } else {
+                               LOGGER.debug("AIC Version not set in VNF_Resource - this is expected thru 1607 - do not error here - not checked.");
+                       }
+                       // End Version check 1607
+
+            // with VF_MODULE - we have both the non-vol and vol template/envs in that object
+            // with VNF_RESOURCE - we use the old methods. 
+            Integer heatTemplateId = null;
+            Integer heatEnvtId = null;
+            
+                       if (!oldWay) {
+                               if (isVolumeRequest) {
+                                       heatTemplateId = vf.getVolTemplateId();
+                                       heatEnvtId = vf.getVolEnvironmentId();
+                               } else {
+                                       heatTemplateId = vf.getTemplateId();
+                                       heatEnvtId = vf.getEnvironmentId();
+                               }
+                       } else {
+                               if (isVolumeRequest) {
+                                       VnfComponent vnfComponent = null;
+                                       vnfComponent = db.getVnfComponent(vnfResource.getId(), "VOLUME");
+                       if (vnfComponent == null) {
+                               String error = "Create VNF: Cannot find VNF Component entry for: " + vnfType + ", type = VOLUME";
+                               LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "VNF Type", vnfType, "OpenStack", "getVnfComponent", MsoLogger.ErrorCode.DataError, "Create VNF: Cannot find VNF Component entry");
+                        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                               throw new VnfException (error, MsoExceptionCategory.USERDATA);
+                       } else {
+                               heatTemplateId = vnfComponent.getHeatTemplateId();
+                               heatEnvtId = vnfComponent.getHeatEnvironmentId();
+                       }
+                               } else {
+                                       heatTemplateId = vnfResource.getTemplateId();
+                                       heatEnvtId = vnfResource.getEnvironmentId();
+                               }
+                       }
+                       // By the time we get here - heatTemplateId and heatEnvtId should be populated (or null)
+                       HeatTemplate heatTemplate = null;
+                       if (heatTemplateId == null) {
+                               String error = "Create: No Heat Template ID defined in catalog database for " + vnfType + ", reqType=" + requestTypeString;
+                               LOGGER.error(MessageEnum.RA_VNF_UNKNOWN_PARAM, "Heat Template ID", vnfType, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Create: No Heat Template ID defined in catalog database");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                               alarmLogger.sendAlarm(MSO_CONFIGURATION_ERROR,
+                                               MsoAlarmLogger.CRITICAL, error);
+                               throw new VnfException(error, MsoExceptionCategory.INTERNAL);
+                       } else {
+                               heatTemplate = db.getHeatTemplate(heatTemplateId);
+                       }
+                       if (heatTemplate == null) {
+                               String error = "Create VF/VNF: no entry found for heat template ID = " + heatTemplateId;
+                               LOGGER.error(MessageEnum.RA_VNF_UNKNOWN_PARAM,
+                                               "Heat Template ID",
+                                               String.valueOf(heatTemplateId), "OpenStack", "", MsoLogger.ErrorCode.BusinessProcesssError, "Create VF/VNF: no entry found for heat template ID = " + heatTemplateId);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                               alarmLogger.sendAlarm(MSO_CONFIGURATION_ERROR,
+                                               MsoAlarmLogger.CRITICAL, error);
+                               throw new VnfException(error, MsoExceptionCategory.INTERNAL);
+                       }
+                       LOGGER.debug("Got HEAT Template from DB");
+            
+            HeatEnvironment heatEnvironment = null;
+            String heatEnvironmentString = null;
+
+            if (heatEnvtId != null && heatEnvtId != 0) {
+                LOGGER.debug ("about to call getHeatEnvironment with :" + heatEnvtId + ":");
+                heatEnvironment = db.getHeatEnvironment (heatEnvtId);
+                if (heatEnvironment == null) {
+                    String error = "Create VFModule: undefined Heat Environment. VFModule=" + vfModuleType
+                                   + ", Environment ID="
+                                   + heatEnvtId;
+                    LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "Heat Environment ID", String.valueOf(heatEnvtId), "OpenStack", "getHeatEnvironment", MsoLogger.ErrorCode.BusinessProcesssError, "Create VFModule: undefined Heat Environment");
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                    // Alarm on this error, configuration must be fixed
+                    alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+
+                    throw new VnfException (error, MsoExceptionCategory.INTERNAL);
+                } else {
+                    LOGGER.debug ("Got Heat Environment from DB: " + heatEnvironment.toString ());
+                    heatEnvironmentString = heatEnvironment.getEnvironment (); //this.parseEnvironment (heatEnvironment.getEnvironment ());
+                    LOGGER.debug ("after parsing: " + heatEnvironmentString);
+                }
+            } else {
+                LOGGER.debug ("no environment parameter found for this Type " + vfModuleType);
+            }
+            
+            // 1510 - Add the files: for nested templates *if* there are any
+            LOGGER.debug ("In MsoVnfAdapterImpl, createVfModule about to call db.getNestedTemplates avec templateId="
+                          + heatTemplate.getId ());
+            Map <String, Object> nestedTemplates = db.getNestedTemplates (heatTemplate.getId ());
+            Map <String, Object> nestedTemplatesChecked = new HashMap <String, Object> ();
+            if (nestedTemplates != null) {
+                // for debugging print them out
+                LOGGER.debug ("Contents of nestedTemplates - to be added to files: on stack:");
+                for (String providerResourceFile : nestedTemplates.keySet ()) {
+                    String providerResourceFileChecked = providerResourceFile; //this.enforceFilePrefix (providerResourceFile);
+                    String childTemplateBody = (String) nestedTemplates.get (providerResourceFile);
+                    LOGGER.debug (providerResourceFileChecked + " -> " + childTemplateBody);
+                    nestedTemplatesChecked.put (providerResourceFileChecked, childTemplateBody);
+                }
+            } else {
+                LOGGER.debug ("No nested templates found - nothing to do here");
+                nestedTemplatesChecked = null; // just to make sure
+            }
+
+            // 1510 - Also add the files: for any get_files associated with this vnf_resource_id
+            // *if* there are any
+            Map<String, HeatFiles> heatFiles = null;
+                       Map<String, Object> heatFilesObjects = new HashMap<String, Object>();
+
+            // Add ability to turn on adding get_files with volume requests (by property).
+            boolean addGetFilesOnVolumeReq = false;
+            try {
+               String propertyString = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_VNF_ADAPTER).getProperty(MsoVnfAdapterImpl.ADD_GET_FILES_ON_VOLUME_REQ, null);
+               if ("true".equalsIgnoreCase(propertyString) || "y".equalsIgnoreCase(propertyString)) {
+                       addGetFilesOnVolumeReq = true;
+                       LOGGER.debug("AddGetFilesOnVolumeReq - setting to true! " + propertyString);
+               }
+            } catch (Exception e) {
+               LOGGER.debug("An error occured trying to get property " + MsoVnfAdapterImpl.ADD_GET_FILES_ON_VOLUME_REQ + " - default to false", e);
+            }
+
+                       if (!isVolumeRequest || addGetFilesOnVolumeReq) {
+                               if (oldWay) {
+                                       LOGGER.debug("In MsoVnfAdapterImpl createVfModule, about to call db.getHeatFiles avec vnfResourceId="
+                                                       + vnfResource.getId());
+                                       heatFiles = db.getHeatFiles(vnfResource.getId());
+                               } else {
+                                       // 1607 - now use VF_MODULE_TO_HEAT_FILES table
+                                       LOGGER.debug("In MsoVnfAdapterImpl createVfModule, about to call db.getHeatFilesForVfModule avec vfModuleId="
+                                                       + vf.getId());
+                                       heatFiles = db
+                                                       .getHeatFilesForVfModule(vf.getId());
+                               }
+                               if (heatFiles != null) {
+                                       // add these to stack - to be done in createStack
+                                       // here, we will map them to Map<String, Object> from
+                                       // Map<String, HeatFiles>
+                                       // this will match the nested templates format
+                                       LOGGER.debug("Contents of heatFiles - to be added to files: on stack:");
+
+                                       for (String heatFileName : heatFiles.keySet()) {
+                                               if (heatFileName.startsWith("_ERROR|")) {
+                                                       // This means there was an invalid entry in VF_MODULE_TO_HEAT_FILES table - the heat file it pointed to could not be found.
+                                                       String heatFileId = heatFileName.substring(heatFileName.lastIndexOf("|")+1);
+                                                       String error = "Create: No HEAT_FILES entry in catalog database for " + vfModuleType + " at HEAT_FILES index=" + heatFileId;
+                                                       LOGGER.debug(error);
+                                                       LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "HEAT_FILES entry not found at " + heatFileId, vfModuleType, "OpenStack", "", MsoLogger.ErrorCode.BusinessProcesssError, "HEAT_FILES entry not found");
+                            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                                                       // Alarm on this error, configuration must be fixed
+                                                       alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+                                                       throw new VnfException (error, MsoExceptionCategory.INTERNAL);
+                                               }
+                                               String heatFileBody = heatFiles.get(heatFileName)
+                                                               .getFileBody();
+                                               String heatFileNameChecked = heatFileName;
+                                               LOGGER.debug(heatFileNameChecked + " -> "
+                                                               + heatFileBody);
+                                               heatFilesObjects.put(heatFileNameChecked, heatFileBody);
+                                       }
+                               } else {
+                                       LOGGER.debug("No heat files found -nothing to do here");
+                                       heatFilesObjects = null;
+                               }
+                       } else {
+                                       LOGGER.debug("Volume request - DO NOT CHECK for HEAT_FILES");
+                       }
+
+            // Check that required parameters have been supplied
+            String missingParams = null;
+            List <String> paramList = new ArrayList <String> ();
+
+            // New for 1510 - consult the PARAM_ALIAS field to see if we've been
+            // supplied an alias. Only check if we don't find it initially.
+            // Also new in 1510 - don't flag missing parameters if there's an environment - because they might be there.
+            // And also new - add parameter to turn off checking all together if we find we're blocking orders we
+            // shouldn't
+            boolean haveEnvironmentParameters = false;
+            boolean checkRequiredParameters = true;
+            try {
+                String propertyString = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_VNF_ADAPTER)
+                                                     .getProperty (MsoVnfAdapterImpl.CHECK_REQD_PARAMS,null);
+                if ("false".equalsIgnoreCase (propertyString) || "n".equalsIgnoreCase (propertyString)) {
+                    checkRequiredParameters = false;
+                    LOGGER.debug ("CheckRequiredParameters is FALSE. Will still check but then skip blocking..."
+                                  + MsoVnfAdapterImpl.CHECK_REQD_PARAMS);
+                }
+            } catch (Exception e) {
+                // No problem - default is true
+                LOGGER.debug ("An exception occured trying to get property " + MsoVnfAdapterImpl.CHECK_REQD_PARAMS, e);
+            }
+            // 1604 - Add enhanced environment & parameter checking
+            // Part 1: parse envt entries to see if reqd parameter is there (before used a simple grep
+            // Part 2: only submit to openstack the parameters in the envt that are in the heat template
+            // Note this also removes any comments
+            MsoHeatEnvironmentEntry mhee = null;
+            if (heatEnvironmentString != null && heatEnvironmentString.contains ("parameters:")) {
+                //LOGGER.debug ("Have an Environment argument with a parameters: section - will bypass checking for valid params - but will still check for aliases");
+               LOGGER.debug("Enhanced environment checking enabled - 1604");
+                haveEnvironmentParameters = true;
+                StringBuilder sb = new StringBuilder(heatEnvironmentString);
+                //LOGGER.debug("About to create MHEE with " + sb);
+                mhee = new MsoHeatEnvironmentEntry(sb);
+                StringBuilder sb2 = new StringBuilder("\nHeat Template Parameters:\n");
+                for (HeatTemplateParam parm : heatTemplate.getParameters()) {
+                       sb2.append("\t" + parm.getParamName() + ", required=" + parm.isRequired());
+                }
+                if (!mhee.isValid()) {
+                       sb2.append("Environment says it's not valid! " + mhee.getErrorString());
+                } else {
+                       sb2.append("\nEnvironment:");
+                       sb2.append(mhee.toFullString());
+                }
+                LOGGER.debug(sb2.toString());
+            } else {
+               LOGGER.debug("NO ENVIRONMENT for this entry");
+            }
+            // This is kind of a mess. inputs is a Map<String, String> --
+            // if one of the parameters is json - we need to pass String, JsonNode -
+            // so we will store off the parameters that are json in its own HashMap
+            // if there are any json params - then we convert inputs to a Map<String, Object>
+            // and pass that to createStack
+            HashMap<String, JsonNode> jsonParams = new HashMap<String, JsonNode>();
+            boolean hasJson = false;
+
+            for (HeatTemplateParam parm : heatTemplate.getParameters ()) {
+                LOGGER.debug ("Parameter:'" + parm.getParamName ()
+                              + "', isRequired="
+                              + parm.isRequired ()
+                              + ", alias="
+                              + parm.getParamAlias ());
+                // New 1607 - support json type
+                String parameterType = parm.getParamType();
+                if (parameterType == null || parameterType.trim().equals("")) {
+                       parameterType = "String";
+                }
+                JsonNode jsonNode = null;
+                if (parameterType.equalsIgnoreCase("json") && inputs != null) {
+                       if (inputs.containsKey(parm.getParamName()) ) {
+                               hasJson = true;
+                               String jsonString = null;
+                               try {
+                                       jsonString = inputs.get(parm.getParamName());
+                                       jsonNode = new ObjectMapper().readTree(jsonString);
+                               } catch (JsonParseException jpe) {
+                                       //TODO - what to do here?
+                                       //for now - send the error to debug, but just leave it as a String
+                                       String errorMessage = jpe.getMessage();
+                                       LOGGER.debug("Json Error Converting " + parm.getParamName() + " - " + errorMessage);
+                                       hasJson = false;
+                                       jsonNode = null;
+                               } catch (Exception e) {
+                                       // or here?
+                                       LOGGER.debug("Json Error Converting " + parm.getParamName() + " " + e.getMessage());
+                                       hasJson = false;
+                                       jsonNode = null;
+                               }
+                               if (jsonNode != null) {
+                                       jsonParams.put(parm.getParamName(), jsonNode);
+                               }
+                       } else if (inputs.containsKey(parm.getParamAlias())) {
+                               hasJson = true;
+                               String jsonString = null;
+                               try {
+                                       jsonString = inputs.get(parm.getParamAlias());
+                                       jsonNode = new ObjectMapper().readTree(jsonString);
+                               } catch (JsonParseException jpe) {
+                                       //TODO - what to do here?
+                                       //for now - send the error to debug, but just leave it as a String
+                                       String errorMessage = jpe.getMessage();
+                                       LOGGER.debug("Json Error Converting " + parm.getParamName() + " - " + errorMessage);
+                                       hasJson = false;
+                                       jsonNode = null;
+                               } catch (Exception e) {
+                                       // or here?
+                                       LOGGER.debug("Json Error Converting " + parm.getParamName() + " " + e.getMessage());
+                                       hasJson = false;
+                                       jsonNode = null;
+                               }
+                               if (jsonNode != null) {
+                                       // Notice here - we add it to the jsonParams hashMap with the actual name -
+                                       // then manipulate the inputs so when we check for aliases below - it will not
+                                       // get flagged.
+                                       jsonParams.put(parm.getParamName(), jsonNode);
+                                       inputs.remove(parm.getParamAlias());
+                                       inputs.put(parm.getParamName(), jsonString);
+                               }
+                       } //TODO add a check for the parameter in the env file
+                }
+                if (parm.isRequired () && (inputs == null || !inputs.containsKey (parm.getParamName ()))) {
+                       // Check if they have an alias
+                       LOGGER.debug("**Parameter " + parm.getParamName() + " is required and not in the inputs...");
+                    if (inputs.containsKey (parm.getParamAlias ())) {
+                        // They've submitted using an alias name. Remove that from inputs, and add back using real name.
+                        String realParamName = parm.getParamName ();
+                        String alias = parm.getParamAlias ();
+                        String value = inputs.get (alias);
+                        LOGGER.debug ("*Found an Alias: paramName=" + realParamName
+                                      + ",alias="
+                                      + alias
+                                      + ",value="
+                                      + value);
+                        inputs.remove (alias);
+                        inputs.put (realParamName, value);
+                        LOGGER.debug (alias + " entry removed from inputs, added back using " + realParamName);
+                    } 
+                    // enhanced - check if it's in the Environment (note: that method 
+                    else if (mhee != null && mhee.containsParameter(parm.getParamName())) {
+
+                        LOGGER.debug ("Required parameter " + parm.getParamName ()
+                                      + " appears to be in environment - do not count as missing");
+                    } else {
+                        LOGGER.debug ("adding to missing parameters list: " + parm.getParamName ());
+                        if (missingParams == null) {
+                            missingParams = parm.getParamName ();
+                        } else {
+                            missingParams += "," + parm.getParamName ();
+                        }
+                    }
+                }
+                paramList.add (parm.getParamName ());
+            }
+            if (missingParams != null) {
+               if (checkRequiredParameters) {
+                       // Problem - missing one or more required parameters
+                       String error = "Create VFModule: Missing Required inputs: " + missingParams;
+                       LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, "OpenStack", "", 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 {
+                       LOGGER.debug ("found missing parameters - but checkRequiredParameters is false - will not block");
+               }
+            } else {
+                LOGGER.debug ("No missing parameters found - ok to proceed");
+            }
+            
+            // Here - modify heatEnvironmentString
+            StringBuilder parsedEnvironmentString = null; 
+            String newEnvironmentString = null;
+            if (mhee != null) {
+               LOGGER.debug("Environment before:\n" + heatEnvironmentString);
+               parsedEnvironmentString = mhee.toFullStringExcludeNonParams(heatTemplate.getParameters());
+               LOGGER.debug("Environment after:\n" + parsedEnvironmentString.toString());
+               newEnvironmentString = parsedEnvironmentString.toString();
+            }
+
+            // Remove any extraneous parameters (don't throw an error)
+            if (inputs != null) {
+                List <String> extraParams = new ArrayList <String> ();
+                extraParams.addAll (inputs.keySet ());
+                extraParams.removeAll (paramList);
+                if (!extraParams.isEmpty ()) {
+                    LOGGER.warn (MessageEnum.RA_VNF_EXTRA_PARAM, vnfType, extraParams.toString(), "OpenStack", "", MsoLogger.ErrorCode.DataError, "Extra params");
+                    inputs.keySet ().removeAll (extraParams);
+                }
+            }
+            // 1607 - when we get here - we have clean inputs. Check if we have
+            Map<String, Object> inputsTwo = null;
+            if (hasJson && jsonParams.size() > 0) {
+               inputsTwo = new HashMap<String, Object>();
+               for (String keyParamName : inputs.keySet()) {
+                       if (jsonParams.containsKey(keyParamName)) {
+                               inputsTwo.put(keyParamName, jsonParams.get(keyParamName));
+                       } else {
+                               inputsTwo.put(keyParamName, inputs.get(keyParamName));
+                       }
+               }
+            }
+
+            // "Fix" the template if it has CR/LF (getting this from Oracle)
+            String template = heatTemplate.getHeatTemplate ();
+            template = template.replaceAll ("\r\n", "\n");
+
+            // Have the tenant. Now deploy the stack itself
+            // Ignore MsoTenantNotFound and MsoStackAlreadyExists exceptions
+            // because we already checked for those.
+            long createStackStarttime = System.currentTimeMillis ();
+            try {
+                // heatStack = heat.createStack(cloudSiteId, tenantId, vnfName, template, inputs, true,
+                // heatTemplate.getTimeoutMinutes());
+               if (backout == null) {
+                       backout = true;
+               }
+               if (heat != null) {
+                       LOGGER.debug("heat is not null!!");
+               }
+
+               if (!hasJson) {
+                       heatStack = heat.createStack (cloudSiteId,
+                                              tenantId,
+                                              vfModuleName,
+                                              template,
+                                              inputs,
+                                              true,
+                                              heatTemplate.getTimeoutMinutes (),
+                                              newEnvironmentString,
+                                              //heatEnvironmentString,
+                                              nestedTemplatesChecked,
+                                              heatFilesObjects,
+                                              backout.booleanValue());
+                LOGGER.recordMetricEvent (createStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "CreateStack", vfModuleName);
+               } else {
+                       heatStack = heat.createStack (cloudSiteId,
+                                              tenantId,
+                                              vfModuleName,
+                                              template,
+                                              inputsTwo,
+                                              true,
+                                              heatTemplate.getTimeoutMinutes (),
+                                              newEnvironmentString,
+                                              //heatEnvironmentString,
+                                              nestedTemplatesChecked,
+                                              heatFilesObjects,
+                                              backout.booleanValue());
+
+               }
+                LOGGER.recordMetricEvent (createStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "CreateStack", vfModuleName);
+            } catch (MsoException me) {
+                me.addContext ("CreateVFModule");
+                String error = "Create VF Module " + vfModuleType + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+                LOGGER.recordMetricEvent (createStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "CreateStack", vfModuleName);
+                LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "MsoException - createStack", 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 (createStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "CreateStack", vfModuleName);
+                LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "NullPointerException - createStack", npe);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                LOGGER.debug("NULL POINTER EXCEPTION at heat.createStack");
+                //npe.addContext ("CreateVNF");
+                throw new VnfException ("NullPointerException during heat.createStack");
+            } catch (Exception e) {
+                LOGGER.recordMetricEvent (createStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while creating stack with OpenStack", "OpenStack", "CreateStack", vfModuleName);
+                LOGGER.debug("unhandled exception at heat.createStack");
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while creating stack with OpenStack");
+               throw new VnfException("Exception during heat.createStack! " + e.getMessage());
+            }
+        } catch (Exception e) {
+               LOGGER.debug("unhandled exception in create VF");
+               throw new VnfException("Exception during create VF " + e.getMessage());
+               
+        }
+
+        // Reach this point if createStack is successful.
+        // Populate remaining rollback info and response parameters.
+        vfRollback.setVnfId (heatStack.getCanonicalName ());
+        vfRollback.setVnfCreated (true);
+
+        vnfId.value = heatStack.getCanonicalName ();
+        outputs.value = copyStringOutputs (heatStack.getOutputs ());
+        rollback.value = vfRollback;
+
+        LOGGER.debug ("VF Module " + vfModuleName + " successfully created");
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully create VF Module");
+        return;
+
+       
+    }
+    
+    public void deleteVfModule (String cloudSiteId,
+                           String tenantId,
+                           String vnfName,
+                           MsoRequest msoRequest) throws VnfException {
+        MsoLogger.setLogContext (msoRequest);
+       MsoLogger.setServiceName ("DeleteVf");
+        LOGGER.debug ("Deleting VF " + vnfName + " in " + cloudSiteId + "/" + tenantId);
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+        // Use the MsoHeatUtils to delete the stack. Set the polling flag to true.
+        // The possible outcomes of deleteStack are a StackInfo object with status
+        // of NOTFOUND (on success) or FAILED (on error). Also, MsoOpenstackException
+        // could be thrown.
+        long subStartTime = System.currentTimeMillis ();
+        try {
+            heat.deleteStack (tenantId, cloudSiteId, vnfName, true);
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", "OpenStack", "DeleteStack", vnfName);
+        } catch (MsoException me) {
+            me.addContext ("DeleteVNF");
+            // Failed to query the Stack due to an openstack exception.
+            // Convert to a generic VnfException
+            String error = "Delete VF: " + vnfName + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+            LOGGER.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "DeleteStack", vnfName);
+            LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR, vnfName, cloudSiteId, tenantId, "OpenStack", "DeleteStack", MsoLogger.ErrorCode.DataError, "Exception - deleteStack", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new VnfException (me);
+        }
+
+        // On success, nothing is returned.
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully delete VF");
+        return;
+    }
+
+    @Override
+    public void updateVfModule (String cloudSiteId,
+                           String tenantId,
+                           String vnfType,
+                           String vnfVersion,
+                           String vnfName,
+                           String requestType,
+                           String volumeGroupHeatStackId,
+                           String baseVfHeatStackId,
+                           String vfModuleStackId,
+                           Map <String, String> inputs,
+                           MsoRequest msoRequest,
+                           Holder <Map <String, String>> outputs,
+                           Holder <VnfRollback> rollback) throws VnfException {
+       String vfModuleName = vnfName;
+       String vfModuleType = vnfType;
+       String vfVersion = vnfVersion;
+       String methodName = "updateVfModule";
+       MsoLogger.setLogContext (msoRequest.getRequestId (), msoRequest.getServiceInstanceId ());
+       String serviceName = VNF_ADAPTER_SERVICE_NAME + methodName;
+       MsoLogger.setServiceName (serviceName);
+
+       String requestTypeString = "";
+        if (requestType != null && !requestType.equals("")) {
+               requestTypeString = requestType;
+        }
+        String nestedStackId = null;
+        if (volumeGroupHeatStackId != null && !volumeGroupHeatStackId.equals("")) {
+               if (!volumeGroupHeatStackId.equalsIgnoreCase("null")) {
+                       nestedStackId = volumeGroupHeatStackId;
+               }
+        }
+        String nestedBaseStackId = null;
+        if (baseVfHeatStackId != null && !baseVfHeatStackId.equals("")) {
+               if (!baseVfHeatStackId.equalsIgnoreCase("null")) {
+                       nestedBaseStackId = baseVfHeatStackId;
+               }
+        }
+
+        if (inputs == null) {
+               // Create an empty set of inputs
+               inputs = new HashMap<String,String>();
+               LOGGER.debug("inputs == null - setting to empty");
+        } else {
+               this.sendMapToDebug(inputs);
+        }
+        boolean isBaseRequest = false;
+        boolean isVolumeRequest = false;
+        if (requestTypeString.startsWith("VOLUME")) {
+               isVolumeRequest = true;
+        }
+        if (vfModuleName == null || vfModuleName.trim().equals("")) {
+               if (vfModuleStackId != null) {
+                       vfModuleName = this.getVfModuleNameFromModuleStackId(vfModuleStackId);
+               }
+        }
+
+        LOGGER.debug ("Updating VFModule: " + vfModuleName + " of type " + vfModuleType + "in " + cloudSiteId + "/" + tenantId);
+        LOGGER.debug("requestTypeString = " + requestTypeString + ", nestedStackId = " + nestedStackId + ", nestedBaseStackId = " + nestedBaseStackId);
+
+        // Will capture execution time for metrics
+        long startTime = System.currentTimeMillis ();
+
+        // Build a default rollback object (no actions performed)
+        VnfRollback vfRollback = new VnfRollback ();
+        vfRollback.setCloudSiteId (cloudSiteId);
+        vfRollback.setTenantId (tenantId);
+        vfRollback.setMsoRequest (msoRequest);
+        vfRollback.setRequestType(requestTypeString);
+        vfRollback.setVolumeGroupHeatStackId(volumeGroupHeatStackId);
+        vfRollback.setBaseGroupHeatStackId(baseVfHeatStackId);
+        vfRollback.setIsBase(isBaseRequest);
+        vfRollback.setVfModuleStackId(vfModuleStackId);
+
+        // First, look up to see if the VNF already exists.
+        MsoHeatUtils heat = new MsoHeatUtils (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+        MsoHeatUtilsWithUpdate heatU = new MsoHeatUtilsWithUpdate (MSO_PROP_VNF_ADAPTER, msoPropertiesFactory,cloudConfigFactory);
+
+        StackInfo heatStack = null;
+        long queryStackStarttime = System.currentTimeMillis ();
+        LOGGER.debug("UpdateVfModule - querying for " + vfModuleName);
+        try {
+            heatStack = heat.queryStack (cloudSiteId, tenantId, vfModuleName);
+            LOGGER.recordMetricEvent (queryStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully receive response from Open Stack", "OpenStack", "QueryStack", null);
+        } catch (MsoException me) {
+            // Failed to query the Stack due to an openstack exception.
+            // Convert to a generic VnfException
+            me.addContext ("UpdateVFModule");
+            String error = "Update VFModule: Query " + vfModuleName + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+            LOGGER.recordMetricEvent (queryStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", null);
+            LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Exception - QueryStack", me);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+            throw new VnfException (me);
+        }
+
+        //TODO - do we need to check for the other status possibilities?
+        if (heatStack == null || heatStack.getStatus () == HeatStatus.NOTFOUND) {
+            // Not Found
+            String error = "Update VF: Stack " + vfModuleName + " does not exist in " + cloudSiteId + "/" + tenantId;
+            LOGGER.error (MessageEnum.RA_VNF_NOT_EXIST, vfModuleName, cloudSiteId, tenantId, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, error);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+            throw new VnfNotFound (cloudSiteId, tenantId, vfModuleName);
+        } else {
+            LOGGER.debug ("Found Existing stack, status=" + heatStack.getStatus ());
+            // Populate the outputs from the existing stack.
+            outputs.value = copyStringOutputs (heatStack.getOutputs ());
+            rollback.value = vfRollback; // Default rollback - no updates performed
+        }
+
+        // 1604 Cinder Volume support - handle a nestedStackId if sent (volumeGroupHeatStackId):
+        StackInfo nestedHeatStack = null;
+        long queryStackStarttime2 = System.currentTimeMillis ();
+        if (nestedStackId != null) {
+               try {
+                       LOGGER.debug("Querying for nestedStackId = " + nestedStackId);
+                       nestedHeatStack = heat.queryStack(cloudSiteId, tenantId, nestedStackId);
+                LOGGER.recordMetricEvent (queryStackStarttime2, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully receive response from Open Stack", "OpenStack", "QueryStack", null);
+               } catch (MsoException me) {
+                   // Failed to query the Stack due to an openstack exception.
+                   // Convert to a generic VnfException
+                   me.addContext ("UpdateVFModule");
+                   String error = "Update VF: Attached heatStack ID Query " + nestedStackId + " in " + cloudSiteId + "/" + tenantId + ": " + me ;
+                LOGGER.recordMetricEvent (queryStackStarttime2, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", null);
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Exception - " + error, me);
+                       LOGGER.debug("ERROR trying to query nested stack= " + error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                   throw new VnfException (me);
+               }
+               if (nestedHeatStack == null || nestedHeatStack.getStatus() == HeatStatus.NOTFOUND) {
+                       MsoLogger.setServiceName (serviceName);
+                   String error = "Update VFModule: Attached volume heatStack ID DOES NOT EXIST " + nestedStackId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR"  ;
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vnfName, cloudSiteId, tenantId, error, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, error);
+                   LOGGER.debug(error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                   throw new VnfException (error, MsoExceptionCategory.USERDATA);
+               } else {
+                       LOGGER.debug("Found nested heat stack - copying values to inputs");
+                       this.sendMapToDebug(inputs);
+                       heat.copyStringOutputsToInputs(inputs, nestedHeatStack.getOutputs(), false);
+                       this.sendMapToDebug(inputs);
+               }
+        }
+        // handle a nestedBaseStackId if sent - this is the stack ID of the base.
+        StackInfo nestedBaseHeatStack = null;
+        if (nestedBaseStackId != null) {
+            long queryStackStarttime3 = System.currentTimeMillis ();
+               try {
+                       LOGGER.debug("Querying for nestedBaseStackId = " + nestedBaseStackId);
+                       nestedBaseHeatStack = heat.queryStack(cloudSiteId, tenantId, nestedBaseStackId);
+                LOGGER.recordMetricEvent (queryStackStarttime3, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully receive response from Open Stack", "OpenStack", "QueryStack", null);
+               } catch (MsoException me) {
+                   // Failed to query the Stack due to an openstack exception.
+                   // Convert to a generic VnfException
+                   me.addContext ("UpdateVfModule");
+                   String error = "Update VFModule: Attached baseHeatStack ID Query " + nestedBaseStackId + " in " + cloudSiteId + "/" + tenantId + ": " + me ;
+                LOGGER.recordMetricEvent (queryStackStarttime3, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "QueryStack", null);
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, "Exception - " + error, me);
+                       LOGGER.debug("ERROR trying to query nested base stack= " + error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                   throw new VnfException (me);
+               }
+               if (nestedBaseHeatStack == null || nestedBaseHeatStack.getStatus() == HeatStatus.NOTFOUND) {
+                       MsoLogger.setServiceName (serviceName);
+                   String error = "Update VFModule: Attached base heatStack ID DOES NOT EXIST " + nestedBaseStackId + " in " + cloudSiteId + "/" + tenantId + " USER ERROR"  ;
+                   LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, vfModuleName, cloudSiteId, tenantId, error, "OpenStack", "QueryStack", MsoLogger.ErrorCode.DataError, error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                   LOGGER.debug(error);
+                   throw new VnfException (error, MsoExceptionCategory.USERDATA);
+               } else {
+                       LOGGER.debug("Found nested base heat stack - copying values to inputs");
+                       this.sendMapToDebug(inputs);
+                       heat.copyStringOutputsToInputs(inputs, nestedBaseHeatStack.getOutputs(), false);
+                       this.sendMapToDebug(inputs);
+               }
+        }
+
+        // Ready to deploy the new VNF
+
+        try (CatalogDatabase db = new CatalogDatabase ()) {
+            // Retrieve the VF definition
+            //VnfResource vnf;
+               VfModule vf = null;
+            if (vfVersion != null && !vfVersion.isEmpty ()) {
+               vf = db.getVfModuleType(vfModuleType, vfVersion);
+               if (vf == null) {
+                       LOGGER.debug("Unable to find " + vfModuleType + " and version = " + vfVersion + " in the TYPE column - will try in MODEL_NAME");
+                       vf = db.getVfModuleModelName(vfModuleType, vfVersion);
+                       if (vf == null) {
+                               LOGGER.debug("Unable to find " + vfModuleType + " and version = " + vfVersion + " in the MODEL_NAME field either - ERROR");
+                       }
+               }
+            } else {
+                vf = db.getVfModuleType(vfModuleType);
+               if (vf == null) {
+                       LOGGER.debug("Unable to find " + vfModuleType + " in the TYPE column - will try in MODEL_NAME");
+                       vf = db.getVfModuleModelName(vfModuleType);
+                       if (vf == null) {
+                               LOGGER.debug("Unable to find " + vfModuleType + " in the MODEL_NAME field either - ERROR");
+                       }
+               }
+            }
+            if (vf == null) {
+                String error = "Update VFModule: Unknown VF Module Type: " + vfModuleType;
+                if (vfVersion != null && !vfVersion.isEmpty()) {
+                       error += " with version = " + vfVersion;
+                }
+                LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "VF Module Type", vfModuleType, "OpenStack", "", MsoLogger.ErrorCode.DataError, error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, error);
+                throw new VnfException (error, MsoExceptionCategory.USERDATA);
+            }
+            LOGGER.debug ("Got VF module definition from Catalog: " + vf.toString ());
+            
+            HeatTemplate heatTemplate = null;
+            Integer heatTemplateId = null;
+            Integer heatEnvtId = null;
+                       if (!isVolumeRequest) {
+                               heatTemplateId = vf.getTemplateId();
+                               heatEnvtId = vf.getEnvironmentId();
+                       } else {
+                               heatTemplateId = vf.getVolTemplateId();
+                               heatEnvtId = vf.getVolEnvironmentId();
+                       }
+                       if (heatTemplateId == null) {
+                               String error = "UpdateVF: No Heat Template ID defined in catalog database for " + vfModuleType + ", reqType=" + requestTypeString;
+                               LOGGER.error(MessageEnum.RA_VNF_UNKNOWN_PARAM, "Heat Template ID", vfModuleType, "OpenStack", "", MsoLogger.ErrorCode.DataError, error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                               alarmLogger.sendAlarm(MSO_CONFIGURATION_ERROR,
+                                               MsoAlarmLogger.CRITICAL, error);
+                               throw new VnfException(error, MsoExceptionCategory.INTERNAL);
+                       } else {
+                               heatTemplate = db.getHeatTemplate(heatTemplateId);
+                       }
+
+                       if (heatTemplate == null) {
+                               String error = "Update VNF: undefined Heat Template. VF="
+                                               + vfModuleType + ", heat template id = " + heatTemplateId;
+                               LOGGER.error(MessageEnum.RA_VNF_UNKNOWN_PARAM,
+                                               "Heat Template ID",
+                                               String.valueOf(heatTemplateId), "OpenStack", "", MsoLogger.ErrorCode.DataError, error);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                               // Alarm on this error, configuration must be fixed
+                               alarmLogger.sendAlarm(MSO_CONFIGURATION_ERROR,
+                                               MsoAlarmLogger.CRITICAL, error);
+
+                               throw new VnfException(error, MsoExceptionCategory.INTERNAL);
+                       }
+
+            LOGGER.debug ("Got HEAT Template from DB: " + heatTemplate.toString ());
+
+            // Add check for any Environment variable
+            HeatEnvironment heatEnvironment = null;
+            String heatEnvironmentString = null;
+
+            if (heatEnvtId != null) {
+                LOGGER.debug ("about to call getHeatEnvironment with :" + heatEnvtId + ":");
+                heatEnvironment = db.getHeatEnvironment (heatEnvtId);
+                if (heatEnvironment == null) {
+
+                    String error = "Update VNF: undefined Heat Environment. VF=" + vfModuleType
+                                   + ", Environment ID="
+                                   + heatEnvtId;
+                    LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "Heat Environment ID", String.valueOf(heatEnvtId), "OpenStack", "", MsoLogger.ErrorCode.DataError, error);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                    // Alarm on this error, configuration must be fixed
+                    alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+
+                    throw new VnfException (error, MsoExceptionCategory.INTERNAL);
+                } else {
+                    LOGGER.debug ("Got Heat Environment from DB: " + heatEnvironment.toString ());
+                    heatEnvironmentString = heatEnvironment.getEnvironment (); //this.parseEnvironment (heatEnvironment.getEnvironment ());
+                    LOGGER.debug ("After parsing: " + heatEnvironmentString);
+                }
+            } else {
+                LOGGER.debug ("no environment parameter for this VFModuleType " + vfModuleType);
+            }
+
+
+            LOGGER.debug ("In MsoVnfAdapterImpl, about to call db.getNestedTemplates avec templateId="
+                          + heatTemplate.getId ());
+            Map <String, Object> nestedTemplates = db.getNestedTemplates (heatTemplate.getId ());
+            Map <String, Object> nestedTemplatesChecked = new HashMap <String, Object> ();
+            if (nestedTemplates != null) {
+                // for debugging print them out
+                LOGGER.debug ("Contents of nestedTemplates - to be added to files: on stack:");
+                for (String providerResourceFile : nestedTemplates.keySet ()) {
+                    String providerResourceFileChecked = providerResourceFile; //this.enforceFilePrefix (providerResourceFile);
+                    String childTemplateBody = (String) nestedTemplates.get (providerResourceFile);
+                    nestedTemplatesChecked.put (providerResourceFileChecked, childTemplateBody);
+                    LOGGER.debug (providerResourceFileChecked + " -> " + childTemplateBody);
+                }
+            } else {
+                LOGGER.debug ("No nested templates found - nothing to do here");
+                nestedTemplatesChecked = null;
+            }
+
+            // Also add the files: for any get_files associated with this VfModule
+            // *if* there are any
+            LOGGER.debug ("In MsoVnfAdapterImpl.updateVfModule, about to call db.getHeatFiles avec vfModuleId="
+                          + vf.getId ());
+
+            Map <String, HeatFiles> heatFiles = null;
+//            Map <String, HeatFiles> heatFiles = db.getHeatFiles (vnf.getId ());
+            Map <String, Object> heatFilesObjects = new HashMap <String, Object> ();
+
+            // Add ability to turn on adding get_files with volume requests (by property).
+            boolean addGetFilesOnVolumeReq = false;
+            try {
+               String propertyString = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_VNF_ADAPTER).getProperty(MsoVnfAdapterImpl.ADD_GET_FILES_ON_VOLUME_REQ, null);
+               if ("true".equalsIgnoreCase(propertyString) || "y".equalsIgnoreCase(propertyString)) {
+                       addGetFilesOnVolumeReq = true;
+                       LOGGER.debug("AddGetFilesOnVolumeReq - setting to true! " + propertyString);
+               }
+            } catch (Exception e) {
+               LOGGER.debug("An error occured trying to get property " + MsoVnfAdapterImpl.ADD_GET_FILES_ON_VOLUME_REQ + " - default to false", e);
+            }
+            if (!isVolumeRequest || addGetFilesOnVolumeReq) {
+               heatFiles = db.getHeatFilesForVfModule(vf.getId());
+                if (heatFiles != null) {
+                    // add these to stack - to be done in createStack
+                    // here, we will map them to Map<String, Object> from Map<String, HeatFiles>
+                    // this will match the nested templates format
+                    LOGGER.debug ("Contents of heatFiles - to be added to files: on stack:");
+
+                    for (String heatFileName : heatFiles.keySet ()) {
+                                               if (heatFileName.startsWith("_ERROR|")) {
+                                                       // This means there was an invalid entry in VF_MODULE_TO_HEAT_FILES table - the heat file it pointed to could not be found.
+                                                       String heatFileId = heatFileName.substring(heatFileName.lastIndexOf("|")+1);
+                                                       String error = "Create: No HEAT_FILES entry in catalog database for " + vfModuleType + " at HEAT_FILES index=" + heatFileId;
+                                                       LOGGER.debug(error);
+                                                       LOGGER.error (MessageEnum.RA_VNF_UNKNOWN_PARAM, "HEAT_FILES entry not found at " + heatFileId, vfModuleType, "OpenStack", "", MsoLogger.ErrorCode.DataError, error);
+                            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
+                                                       // Alarm on this error, configuration must be fixed
+                                                       alarmLogger.sendAlarm (MSO_CONFIGURATION_ERROR, MsoAlarmLogger.CRITICAL, error);
+                                                       throw new VnfException (error, MsoExceptionCategory.INTERNAL);
+                                               }
+                        String heatFileBody = heatFiles.get (heatFileName).getFileBody ();
+                        LOGGER.debug (heatFileName + " -> " + heatFileBody);
+                        heatFilesObjects.put (heatFileName, heatFileBody);
+                    }
+                } else {
+                    LOGGER.debug ("No heat files found -nothing to do here");
+                    heatFilesObjects = null;
+                }
+            }
+
+            // Check that required parameters have been supplied
+            String missingParams = null;
+            List <String> paramList = new ArrayList <String> ();
+
+            // New for 1510 - consult the PARAM_ALIAS field to see if we've been
+            // supplied an alias. Only check if we don't find it initially.
+            // Also new in 1510 - don't flag missing parameters if there's an environment - because they might be there.
+            // And also new - add parameter to turn off checking all together if we find we're blocking orders we
+            // shouldn't
+            boolean haveEnvironmentParameters = false;
+            boolean checkRequiredParameters = true;
+            try {
+                String propertyString = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_VNF_ADAPTER)
+                                                     .getProperty (MsoVnfAdapterImpl.CHECK_REQD_PARAMS,null);
+                if ("false".equalsIgnoreCase (propertyString) || "n".equalsIgnoreCase (propertyString)) {
+                    checkRequiredParameters = false;
+                    LOGGER.debug ("CheckRequiredParameters is FALSE. Will still check but then skip blocking..."
+                                  + MsoVnfAdapterImpl.CHECK_REQD_PARAMS);
+                }
+            } catch (Exception e) {
+                // No problem - default is true
+                LOGGER.debug ("An exception occured trying to get property " + MsoVnfAdapterImpl.CHECK_REQD_PARAMS, e);
+            }
+            // 1604 - Add enhanced environment & parameter checking
+            // Part 1: parse envt entries to see if reqd parameter is there (before used a simple grep
+            // Part 2: only submit to openstack the parameters in the envt that are in the heat template
+            // Note this also removes any comments
+            MsoHeatEnvironmentEntry mhee = null;
+            if (heatEnvironmentString != null && heatEnvironmentString.toLowerCase ().contains ("parameters:")) {
+               LOGGER.debug("Enhanced environment checking enabled - 1604");
+                haveEnvironmentParameters = true;
+                StringBuilder sb = new StringBuilder(heatEnvironmentString);
+                //LOGGER.debug("About to create MHEE with " + sb);
+                mhee = new MsoHeatEnvironmentEntry(sb);
+                StringBuilder sb2 = new StringBuilder("\nHeat Template Parameters:\n");
+                for (HeatTemplateParam parm : heatTemplate.getParameters()) {
+                       sb2.append("\t" + parm.getParamName() + ", required=" + parm.isRequired());
+                }
+                if (!mhee.isValid()) {
+                       sb2.append("Environment says it's not valid! " + mhee.getErrorString());
+                } else {
+                       sb2.append("\nEnvironment:");
+                       sb2.append(mhee.toFullString());
+                }
+                LOGGER.debug(sb2.toString());
+            } else {
+               LOGGER.debug("NO ENVIRONMENT for this entry");
+            }
+
+            // New for 1607 - support params of json type
+            HashMap<String, JsonNode> jsonParams = new HashMap<String, JsonNode>();
+            boolean hasJson = false;
+            
+            for (HeatTemplateParam parm : heatTemplate.getParameters ()) {
+                LOGGER.debug ("Parameter:'" + parm.getParamName ()
+                              + "', isRequired="
+                              + parm.isRequired ()
+                              + ", alias="
+                              + parm.getParamAlias ());
+                // handle json
+                String parameterType = parm.getParamType();
+                if (parameterType == null || parameterType.trim().equals("")) {
+                       parameterType = "String";
+                }
+                JsonNode jsonNode = null;
+                if (parameterType.equalsIgnoreCase("json") && inputs != null) {
+                       if (inputs.containsKey(parm.getParamName()) ) {
+                               hasJson = true;
+                               String jsonString = null;
+                               try {
+                                       jsonString = inputs.get(parm.getParamName());
+                                       jsonNode = new ObjectMapper().readTree(jsonString);
+                               } catch (JsonParseException jpe) {
+                                       //TODO - what to do here?
+                                       //for now - send the error to debug, but just leave it as a String
+                                       String errorMessage = jpe.getMessage();
+                                       LOGGER.debug("Json Error Converting " + parm.getParamName() + " - " + errorMessage);
+                                       hasJson = false;
+                                       jsonNode = null;
+                               } catch (Exception e) {
+                                       // or here?
+                                       LOGGER.debug("Json Error Converting " + parm.getParamName() + " " + e.getMessage());
+                                       hasJson = false;
+                                       jsonNode = null;
+                               }
+                               if (jsonNode != null) {
+                                       jsonParams.put(parm.getParamName(), jsonNode);
+                               }
+                       } else if (inputs.containsKey(parm.getParamAlias())) {
+                               hasJson = true;
+                               String jsonString = null;
+                               try {
+                                       jsonString = inputs.get(parm.getParamAlias());
+                                       jsonNode = new ObjectMapper().readTree(jsonString);
+                               } catch (JsonParseException jpe) {
+                                       //TODO - what to do here?
+                                       //for now - send the error to debug, but just leave it as a String
+                                       String errorMessage = jpe.getMessage();
+                                       LOGGER.debug("Json Error Converting " + parm.getParamName() + " - " + errorMessage);
+                                       hasJson = false;
+                                       jsonNode = null;
+                               } catch (Exception e) {
+                                       // or here?
+                                       LOGGER.debug("Json Error Converting " + parm.getParamName() + " " + e.getMessage());
+                                       hasJson = false;
+                                       jsonNode = null;
+                               }
+                               if (jsonNode != null) {
+                                       // Notice here - we add it to the jsonParams hashMap with the actual name -
+                                       // then manipulate the inputs so when we check for aliases below - it will not
+                                       // get flagged.
+                                       jsonParams.put(parm.getParamName(), jsonNode);
+                                       inputs.remove(parm.getParamAlias());
+                                       inputs.put(parm.getParamName(), jsonString);
+                               }
+                       } //TODO add a check for the parameter in the env file
+                }
+
+                if (parm.isRequired () && (inputs == null || !inputs.containsKey (parm.getParamName ()))) {
+                    if (inputs.containsKey (parm.getParamAlias ())) {
+                        // They've submitted using an alias name. Remove that from inputs, and add back using real name.
+                        String realParamName = parm.getParamName ();
+                        String alias = parm.getParamAlias ();
+                        String value = inputs.get (alias);
+                        LOGGER.debug ("*Found an Alias: paramName=" + realParamName
+                                      + ",alias="
+                                      + alias
+                                      + ",value="
+                                      + value);
+                        inputs.remove (alias);
+                        inputs.put (realParamName, value);
+                        LOGGER.debug (alias + " entry removed from inputs, added back using " + realParamName);
+                    }
+                    // enhanced - check if it's in the Environment (note: that method
+                    else if (mhee != null && mhee.containsParameter(parm.getParamName())) {
+
+                        LOGGER.debug ("Required parameter " + parm.getParamName ()
+                                      + " appears to be in environment - do not count as missing");
+                    }
+                    else {
+                        LOGGER.debug ("adding to missing parameters list: " + parm.getParamName ());
+                        if (missingParams == null) {
+                            missingParams = parm.getParamName ();
+                        } else {
+                            missingParams += "," + parm.getParamName ();
+                        }
+                    }
+                }
+                paramList.add (parm.getParamName ());
+            }
+            if (missingParams != null) {
+                // Problem - missing one or more required parameters
+               if (checkRequiredParameters) {
+                String error = "Update VNF: Missing Required inputs: " + missingParams;
+                LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, "OpenStack", "", MsoLogger.ErrorCode.DataError, error);
+                    LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error);
+                throw new VnfException (error, MsoExceptionCategory.USERDATA);
+               } else {
+                       LOGGER.debug ("found missing parameters - but checkRequiredParameters is false - will not block");
+               }
+            } else {
+                LOGGER.debug ("No missing parameters found - ok to proceed");
+            }
+
+            // Here - modify heatEnvironmentString
+            StringBuilder parsedEnvironmentString = null;
+            String newEnvironmentString = null;
+            if (mhee != null) {
+               LOGGER.debug("Environment before:\n" + heatEnvironmentString);
+               parsedEnvironmentString = mhee.toFullStringExcludeNonParams(heatTemplate.getParameters());
+               LOGGER.debug("Environment after:\n" + parsedEnvironmentString.toString());
+               newEnvironmentString = parsedEnvironmentString.toString();
+            }
+
+            // Remove any extraneous parameters (don't throw an error)
+            if (inputs != null) {
+                List <String> extraParams = new ArrayList <String> ();
+                extraParams.addAll (inputs.keySet ());
+                // This is not a valid parameter for this template
+                extraParams.removeAll (paramList);
+                if (!extraParams.isEmpty ()) {
+                       LOGGER.warn (MessageEnum.RA_VNF_EXTRA_PARAM, vnfType, extraParams.toString(), "OpenStack", "", MsoLogger.ErrorCode.DataError, "Extra params");
+                    inputs.keySet ().removeAll (extraParams);
+                }
+            }
+            // 1607 - when we get here - we have clean inputs. Create inputsTwo in case we have json
+            Map<String, Object> inputsTwo = null;
+            if (hasJson && jsonParams.size() > 0) {
+               inputsTwo = new HashMap<String, Object>();
+               for (String keyParamName : inputs.keySet()) {
+                       if (jsonParams.containsKey(keyParamName)) {
+                               inputsTwo.put(keyParamName, jsonParams.get(keyParamName));
+                       } else {
+                               inputsTwo.put(keyParamName, inputs.get(keyParamName));
+                       }
+               }
+            }
+
+            // "Fix" the template if it has CR/LF (getting this from Oracle)
+            String template = heatTemplate.getHeatTemplate ();
+            template = template.replaceAll ("\r\n", "\n");
+
+            // Have the tenant. Now deploy the stack itself
+            // Ignore MsoTenantNotFound and MsoStackAlreadyExists exceptions
+            // because we already checked for those.
+            long updateStackStarttime = System.currentTimeMillis ();
+            try {
+               if (!hasJson) {
+                       heatStack = heatU.updateStack (cloudSiteId,
+                                               tenantId,
+                                               vfModuleName,
+                                               template,
+                                               copyStringInputs (inputs),
+                                               true,
+                                               heatTemplate.getTimeoutMinutes (),
+                                               newEnvironmentString,
+                                               //heatEnvironmentString,
+                                               nestedTemplatesChecked,
+                                               heatFilesObjects);
+                       LOGGER.recordMetricEvent (updateStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully receive response from Open Stack", "OpenStack", "UpdateStack", null);
+               } else {
+                       heatStack = heatU.updateStack (cloudSiteId,
+                                               tenantId,
+                                               vfModuleName,
+                                               template,
+                                               inputsTwo,
+                                               true,
+                                               heatTemplate.getTimeoutMinutes (),
+                                               newEnvironmentString,
+                                               //heatEnvironmentString,
+                                               nestedTemplatesChecked,
+                                               heatFilesObjects);
+                       LOGGER.recordMetricEvent (updateStackStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully receive response from Open Stack", "OpenStack", "UpdateStack", null);
+                       
+               }
+            } catch (MsoException me) {
+                me.addContext ("UpdateVFModule");
+                String error = "Update VFModule " + vfModuleType + " in " + cloudSiteId + "/" + tenantId + ": " + me;
+                LOGGER.recordMetricEvent (updateStackStarttime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error, "OpenStack", "UpdateStack", null);
+                LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR, vfModuleType, cloudSiteId, tenantId, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Exception - " + error, me);
+                LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
+                throw new VnfException (me);
+            }
+        }
+
+        // Reach this point if updateStack is successful.
+        // Populate remaining rollback info and response parameters.
+        vfRollback.setVnfId (heatStack.getCanonicalName ());
+        vfRollback.setVnfCreated (true);
+
+        outputs.value = copyStringOutputs (heatStack.getOutputs ());
+        rollback.value = vfRollback;
+        LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully update VF Module");
+        return;
+    }
+
+    private String getVfModuleNameFromModuleStackId(String vfModuleStackId) {
+       // expected format of vfModuleStackId is "MSOTEST51-vSAMP3_base_module-0/1fc1f86c-7b35-447f-99a6-c23ec176ae24"
+       // before the "/" is the vfModuleName and after the "/" is the heat stack id in Openstack
+       if (vfModuleStackId == null)
+               return null;
+       int index = vfModuleStackId.lastIndexOf('/');
+       if (index <= 0) 
+               return null;
+       String vfModuleName = null;
+       try {
+               vfModuleName = vfModuleStackId.substring(0, index);
+       } catch (Exception e) {
+               vfModuleName = null;
+       }
+       return vfModuleName;
+    }
+
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VfRollback.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VfRollback.java
new file mode 100644 (file)
index 0000000..90ab01b
--- /dev/null
@@ -0,0 +1,137 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+
+import org.openecomp.mso.entity.MsoRequest;
+
+public class VfRollback {
+       private String vnfId;
+       private String tenantId;
+       private String cloudSiteId;
+       private boolean tenantCreated = false;
+       private boolean vnfCreated = false;
+       private MsoRequest msoRequest;
+       private String volumeGroupName;
+       private String volumeGroupId;
+       private String requestType;
+       private String volumeGroupHeatStackId;
+       private String baseGroupHeatStackId;
+       private boolean isBase = false;
+       private String vfModuleStackId;
+
+
+       public String getVnfId() {
+               return vnfId;
+       }
+       public void setVnfId(String vnfId) {
+               this.vnfId = vnfId;
+       }
+       public String getTenantId() {
+               return tenantId;
+       }
+
+       public void setTenantId(String tenantId) {
+               this.tenantId = tenantId;
+       }
+       public String getCloudSiteId() {
+               return cloudSiteId;
+       }
+       public void setCloudSiteId(String cloudId) {
+               this.cloudSiteId = cloudId;
+       }
+       public boolean getTenantCreated() {
+               return tenantCreated;
+       }
+       public void setTenantCreated(boolean tenantCreated) {
+               this.tenantCreated = tenantCreated;
+       }
+       public boolean getVnfCreated() {
+               return vnfCreated;
+       }
+       public void setVnfCreated(boolean vnfCreated) {
+               this.vnfCreated = vnfCreated;
+       }
+       public MsoRequest getMsoRequest() {
+               return msoRequest;
+       }
+       public void setMsoRequest (MsoRequest msoRequest) {
+               this.msoRequest = msoRequest;
+       }
+       public String getVolumeGroupName() {
+               return this.volumeGroupName;
+       }
+       public void setVolumeGroupName(String volumeGroupName) {
+               this.volumeGroupName = volumeGroupName;
+       }
+       public String getVolumeGroupId() {
+               return this.volumeGroupId;
+       }
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+       public String getRequestType() {
+               return this.requestType;
+       }
+       public void setRequestType(String requestType) {
+               this.requestType = requestType;
+       }
+       /*
+       private String volumeGroupHeatStackId;
+       private String baseGroupHeatStackId;
+       private boolean isBase = false;
+       */
+       public String getVolumeGroupHeatStackId() {
+               return this.volumeGroupHeatStackId;
+       }
+       public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
+               this.volumeGroupHeatStackId = volumeGroupHeatStackId;
+       }
+       
+       public String getBaseGroupHeatStackId() {
+               return this.baseGroupHeatStackId;
+       }
+       public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
+               this.baseGroupHeatStackId = baseGroupHeatStackId;
+       }
+       
+       public boolean isBase() {
+               return this.isBase;
+       }
+       public void setIsBase(boolean isBase) {
+               this.isBase = isBase;
+       }
+       public String getVfModuleStackId() {
+               return this.vfModuleStackId;
+       }
+       public void setVfModuleStackId(String vfModuleStackId) {
+               this.vfModuleStackId = vfModuleStackId;
+       }
+
+       @Override
+    public String toString() {
+               return "VfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
+                               ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
+                               ", vnfCreated=" + vnfCreated + ", requestType = " + requestType +
+                               ", volumeGroupHeatStackId = " + this.volumeGroupHeatStackId;
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VnfAdapterRest.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VnfAdapterRest.java
new file mode 100644 (file)
index 0000000..6906f81
--- /dev/null
@@ -0,0 +1,628 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+import java.util.Map;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+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.QueryParam;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.GenericEntity;
+import javax.ws.rs.core.MediaType;
+import javax.xml.ws.Holder;
+
+import org.apache.http.HttpStatus;
+
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.adapters.vnfrest.*;
+
+/**
+ * This class services calls to the REST interface for VF Modules (http://host:port/vnfs/rest/v1/vnfs)
+ * Both XML and JSON can be produced/consumed.  Set Accept: and Content-Type: headers appropriately.  XML is the default.
+ * For testing, call with cloudSiteId = ___TESTING___
+ * To test exceptions, also set tenantId = ___TESTING___
+ */
+@Path("/v1/vnfs")
+public class VnfAdapterRest {
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+       private static final String TESTING_KEYWORD = "___TESTING___";
+       private final CloudConfigFactory cloudConfigFactory = new CloudConfigFactory();
+       private final MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       private final MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl (msoPropertiesFactory, cloudConfigFactory);
+       //TODO Logging, SkipAAI, CREATED flags, Integrate with BPEL, Auth,
+
+       @HEAD
+       @GET
+       @Path("/healthcheck")
+       @Produces(MediaType.TEXT_HTML)
+       public Response healthcheck () {
+               String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
+               return Response.ok().entity(CHECK_HTML).build();
+       }
+
+   /*
+       * URL:http://localhost:8080/vnfs/rest/v1/vnfs/<aaivnfid>/vf-modules/<aaimodid>
+       * REQUEST:
+       * {"deleteVfModuleRequest":
+               {"cloudSiteId": "DAN",
+               "tenantId": "214b428a1f554c02935e66330f6a5409",
+               "vnfId": "somevnfid",
+               "vfModuleId": "somemodid",
+               "vfModuleStackId": "4e567676-e266-4594-a3a6-131c8a2baf73",
+               "messageId": "ra.1",
+               "notificationUrl": "http://localhost:8089/vnfmock",
+               "skipAAI": true,
+               "msoRequest": {
+               "requestId": "ra1",
+               "serviceInstanceId": "sa1"
+               }}
+               }
+       */
+       @DELETE
+       @Path("{aaiVnfId}/vf-modules/{aaiVfModuleId}")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response deleteVfModule (
+               @PathParam("aaiVnfId") String aaiVnfId,
+               @PathParam("aaiVfModuleId") String aaiVfModuleId,
+               final DeleteVfModuleRequest req)
+       {
+               LOGGER.debug("Delete VfModule enter: " + req.toJsonString());
+               if (aaiVnfId == null || !aaiVnfId.equals(req.getVnfId())) {
+                       LOGGER.debug("Req rejected - aaiVnfId not provided or doesn't match URL");
+                       return Response
+                               .status(HttpStatus.SC_BAD_REQUEST)
+                               .type(MediaType.TEXT_PLAIN)
+                               .entity("vnfid in URL does not match content")
+                               .build();
+               }
+               if (aaiVfModuleId == null || !aaiVfModuleId.equals(req.getVfModuleId())) {
+                       LOGGER.debug("Req rejected - aaiVfModuleId not provided or doesn't match URL");
+                       return Response
+                               .status(HttpStatus.SC_BAD_REQUEST)
+                               .type(MediaType.TEXT_PLAIN)
+                               .entity("vfModuleId in URL does not match content")
+                               .build();
+               }
+               DeleteVfModuleTask task = new DeleteVfModuleTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+                       try {
+                               Thread t1 = new Thread(task);
+                               t1.start();
+                       } catch (Exception e) {
+                               // problem handling delete, send generic failure as sync resp to caller
+                               LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR, "", "deleteVfModule", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in deleteVfModule", e);
+                               return Response.serverError().build();
+                       }
+                       // send sync response (ACK) to caller
+                       LOGGER.debug ("deleteVNFVolumes exit");
+                       return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class DeleteVfModuleTask implements Runnable {
+               private final DeleteVfModuleRequest req;
+               private DeleteVfModuleResponse response = null;
+               private VfModuleExceptionResponse eresp = null;
+               private boolean sendxml;
+
+               public DeleteVfModuleTask(DeleteVfModuleRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<DeleteVfModuleResponse>(response) {}
+                               : new GenericEntity<VfModuleExceptionResponse>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+
+               @Override
+               public void run() {
+                       try {
+                               String cloudsite = req.getCloudSiteId();
+                               if (cloudsite != null && !cloudsite.equals(TESTING_KEYWORD)) {
+                                       //vnfAdapter.deleteVnf (req.getCloudSiteId(), req.getTenantId(), req.getVfModuleStackId(), req.getMsoRequest());
+                                       vnfAdapter.deleteVfModule (req.getCloudSiteId(), req.getTenantId(), req.getVfModuleStackId(), req.getMsoRequest());
+                               }
+                               response = new DeleteVfModuleResponse(req.getVnfId(), req.getVfModuleId(), Boolean.TRUE, req.getMessageId());
+                       } catch (VnfException e) {
+                               LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "VnfException - Delete VNF Module", e);
+                               eresp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug ("Delete vfModule exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       /*
+        * URL:http://localhost:8080/vnfs/rest/v1/vnfs/<aaiVnfId>/vf-modules/<aaiVfModuleId>?cloudSiteId=DAN&tenantId=vfModule?&skipAAI=TRUE&msoRequest.requestId=ra1&msoRequest.serviceInstanceId=si1&vfModuleName=T2N2S1
+        * RESP:
+        * {"queryVfModuleResponse": {
+                  "vfModuleId": "AvfmodId",
+                  "vfModuleOutputs": {"entry": {
+                         "key": "server_private_ip_1",
+                         "value": "10.100.1.25"
+                  }},
+                  "vfModuleStackId": "RaaVnf1/abfa8a6d-feb1-40af-aea3-109403b1cf6b",
+                  "vnfId": "AvnfID",
+                  "vnfStatus": "ACTIVE"
+               }}
+        */
+       @GET
+       @Path("{aaiVnfId}/vf-modules/{aaiVfModuleId}")
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response queryVfModule(
+               @PathParam("aaiVnfId") String aaiVnfId,
+               @PathParam("aaiVfModuleId") String aaiVfModuleId,
+               @QueryParam("cloudSiteId") String cloudSiteId,
+               @QueryParam("tenantId") String tenantId,
+               @QueryParam("vfModuleName") String vfModuleName, //RAA? Id in doc
+               @QueryParam("skipAAI") Boolean skipAAI,
+               @QueryParam("msoRequest.requestId") String requestId,
+               @QueryParam("msoRequest.serviceInstanceId") String serviceInstanceId)
+       {
+               //This request responds synchronously only
+               LOGGER.debug ("Query vfModule enter:" + vfModuleName);
+               MsoRequest msoRequest = new MsoRequest(requestId, serviceInstanceId);
+
+               try {
+                       int respStatus = HttpStatus.SC_OK;
+                       QueryVfModuleResponse qryResp = new QueryVfModuleResponse(aaiVnfId, aaiVfModuleId, null, null, null);
+                       Holder<Boolean> vnfExists = new Holder<Boolean>();
+                       Holder<String> vfModuleId = new Holder<String>();
+                       Holder<VnfStatus> status  = new Holder<VnfStatus>();
+                       Holder<Map<String, String>> outputs = new Holder <Map <String, String>> ();
+                       vnfAdapter.queryVnf (cloudSiteId, tenantId, vfModuleName, msoRequest, vnfExists, vfModuleId, status, outputs);
+                       if (!vnfExists.value) {
+                               LOGGER.debug ("vfModule not found");
+                               respStatus = HttpStatus.SC_NOT_FOUND;
+                       } else {
+                               LOGGER.debug ("vfModule found" + vfModuleId.value + ", status=" + status.value);
+                               qryResp.setVfModuleId(vfModuleId.value);
+                               qryResp.setVnfStatus(status.value);
+                               qryResp.setVfModuleOutputs(outputs.value);
+                       }
+                       LOGGER.debug ("Query vfModule exit");
+                       return Response
+                               .status(respStatus)
+                               .entity(new GenericEntity<QueryVfModuleResponse>(qryResp) {})
+                               .build();
+               } catch (VnfException e) {
+                       LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR,  vfModuleName, "", "queryVfModule", MsoLogger.ErrorCode.BusinessProcesssError, "VnfException - queryVfModule", e);
+                       VfModuleExceptionResponse excResp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.FALSE, null);
+                       return Response
+                               .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
+                               .entity(new GenericEntity<VfModuleExceptionResponse>(excResp) {})
+                               .build();
+               }
+       }
+
+       /*URL: http://localhost:8080/vnfs/rest/v1/vnfs/<aaivnfid>/vf-modules
+        *REQUEST:
+        * {"createVfModuleRequest":
+               {"cloudSiteId": "DAN",
+               "tenantId": "214b428a1f554c02935e66330f6a5409",
+               "vnfId": "somevnfid",
+               "vfModuleId": "somemodid",
+               "vfModuleName": "RaaVnf1",
+               "vnfType": "ApacheVnf",
+               "vfModuleParams": {"entry": [
+                       {"key": "network_id",
+                       "value": "59ed7b41-2983-413f-ba93-e7d437433916"},
+                       {"key": "subnet_id",
+                       "value": "086c9298-5c57-49b7-bb2b-6fd5730c5d92"},
+                       {"key": "server_name_0",
+                       "value": "RaaVnf1"}
+                       ]},
+               "failIfExists": true,
+               "messageId": "ra.1",
+               "notificationUrl": "http://localhost:8089/vnfmock",
+               "skipAAI": true,
+               "msoRequest": {
+               "requestId": "ra1",
+               "serviceInstanceId": "sa1"
+               }}
+               }
+        */
+       @POST
+       @Path("{aaiVnfId}/vf-modules")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response createVfModule(
+               @PathParam("aaiVnfId") String aaiVnfId,
+               final CreateVfModuleRequest req)
+       {
+               LOGGER.debug("Create VfModule enter inside VnfAdapterRest: " + req.toJsonString());
+               if (aaiVnfId == null || !aaiVnfId.equals(req.getVnfId())) {
+                       LOGGER.debug("Req rejected - aaiVnfId not provided or doesn't match URL");
+                       return Response
+                               .status(HttpStatus.SC_BAD_REQUEST)
+                               .type(MediaType.TEXT_PLAIN)
+                               .entity("vnfid in URL does not match content")
+                               .build();
+               }
+               CreateVfModuleTask task = new CreateVfModuleTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+                       try {
+                               Thread t1 = new Thread(task);
+                               t1.start();
+                       } catch (Exception e) {
+                               // problem handling create, send generic failure as sync resp to caller
+                               LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, "", "createVfModule", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - createVfModule", e);
+                               return Response.serverError().build();
+                       }
+                       // send sync response (ACK) to caller
+                       LOGGER.debug ("createVfModule exit");
+                       return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class CreateVfModuleTask implements Runnable {
+               private final CreateVfModuleRequest req;
+               private CreateVfModuleResponse response = null;
+               private VfModuleExceptionResponse eresp = null;
+               private boolean sendxml;
+
+               public CreateVfModuleTask(CreateVfModuleRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<CreateVfModuleResponse>(response) {}
+                               : new GenericEntity<VfModuleExceptionResponse>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+
+               @Override
+               public void run() {
+                       LOGGER.debug ("CreateVfModuleTask start");
+                       try {
+                               // Synchronous Web Service Outputs
+                               Holder <String> vfModuleStackId = new Holder <String> ();
+                               Holder <Map <String, String>> outputs = new Holder <Map <String, String>> ();
+                               Holder <VnfRollback> vnfRollback = new Holder <VnfRollback> ();
+                               String completeVnfVfModuleType = req.getVnfType() + "::" + req.getVfModuleType();
+                               LOGGER.debug("completeVnfVfModuleType=" + completeVnfVfModuleType);
+                               String cloudsite = req.getCloudSiteId();
+                               if (cloudsite != null && cloudsite.equals(TESTING_KEYWORD)) {
+                                       String tenant = req.getTenantId();
+                                       if (tenant != null && tenant.equals(TESTING_KEYWORD)) {
+                                               throw new VnfException("testing.");
+                                       }
+                                       vnfRollback.value = new VnfRollback(req.getVnfId(), tenant, cloudsite,
+                                                       true, false, new MsoRequest("reqid", "svcid"),
+                                                       req.getVolumeGroupId(), req.getVolumeGroupId(), req.getRequestType());
+                                       vfModuleStackId.value = "479D3D8B-6360-47BC-AB75-21CC91981484";
+                                       outputs.value = VolumeAdapterRest.testMap();
+                               } else {
+//                                     vnfAdapter.createVnf (createReq.getCloudSiteId(),
+//                                             createReq.getTenantId(),
+//                                             createReq.getVnfType(),
+//                                             createReq.getVnfVersion(),
+//                                             createReq.getVfModuleName(),
+//                                             createReq.getRequestType(),
+//                                             createReq.getVolumeGroupStackId(),
+//                                             createReq.getVfModuleParams(),
+//                                             createReq.getFailIfExists(),
+//                                             createReq.getBackout(),
+//                                             createReq.getMsoRequest(),
+//                                             vfModuleStackId,
+//                                             outputs,
+//                                             vnfRollback);
+                                       vnfAdapter.createVfModule(req.getCloudSiteId(),
+                                               req.getTenantId(),
+                                               //req.getVnfType(),
+                                               completeVnfVfModuleType,
+                                               req.getVnfVersion(),
+                                               req.getVfModuleName(),
+                                               req.getRequestType(),
+                                               req.getVolumeGroupStackId(),
+                                               req.getBaseVfModuleStackId(),
+                                               req.getVfModuleParams(),
+                                               req.getFailIfExists(),
+                                               req.getBackout(),
+                                               req.getMsoRequest(),
+                                               vfModuleStackId,
+                                               outputs,
+                                               vnfRollback);
+                               }
+                               VfModuleRollback modRollback = new VfModuleRollback(vnfRollback.value, req.getVfModuleId(), vfModuleStackId.value, req.getMessageId());
+                               response = new CreateVfModuleResponse(req.getVnfId(), req.getVfModuleId(),
+                                               vfModuleStackId.value, Boolean.TRUE, outputs.value, modRollback, req.getMessageId());
+                       } catch (VnfException e) {
+                               eresp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug ("CreateVfModuleTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       @PUT
+       @Path("{aaiVnfId}/vf-modules/{aaiVfModuleId}")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response updateVfModule(
+                       @PathParam("aaiVnfId") String aaiVnfId,
+                       @PathParam("aaiVfModuleId") String aaiVfModuleId,
+                       final UpdateVfModuleRequest req)
+       {
+               LOGGER.debug("Update VfModule enter: " + req.toJsonString());
+               UpdateVfModulesTask task = new UpdateVfModulesTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+               try {
+                       Thread t1 = new Thread(task);
+                       t1.start();
+               } catch (Exception e) {
+                       // problem handling create, send generic failure as sync resp to caller
+                       LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR, "", "updateVfModule", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - updateVfModule", e);
+                       return Response.serverError().build();
+               }
+               // send sync response (ACK) to caller
+               LOGGER.debug ("updateVfModules exit");
+               return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class UpdateVfModulesTask implements Runnable {
+               private final UpdateVfModuleRequest req;
+               private UpdateVfModuleResponse response = null;
+               private VfModuleExceptionResponse eresp = null;
+               private boolean sendxml;
+
+               public UpdateVfModulesTask(UpdateVfModuleRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<UpdateVfModuleResponse>(response) {}
+                               : new GenericEntity<VfModuleExceptionResponse>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       try {
+                               //MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl (msoPropertiesFactory, cloudConfigFactory);
+
+                               // Synchronous Web Service Outputs
+                               Holder <String> vfModuleStackId = new Holder <String> ();
+                               Holder <Map <String, String>> outputs = new Holder <Map <String, String>> ();
+                               Holder <VnfRollback> vnfRollback = new Holder <VnfRollback> ();
+                               String completeVnfVfModuleType = req.getVnfType() + "::" + req.getVfModuleType();
+                               LOGGER.debug("in updateVf - completeVnfVfModuleType=" + completeVnfVfModuleType);
+
+                               /*
+                               vnfAdapter.updateVnf (updateReq.getCloudSiteId(),
+                                               updateReq.getTenantId(),
+                                               updateReq.getVnfType(),
+                                               updateReq.getVnfVersion(),
+                                               updateReq.getVfModuleName(),
+                                               updateReq.getRequestType(),
+                                               updateReq.getVolumeGroupStackId(),
+                                               updateReq.getVfModuleParams(),
+                                               updateReq.getMsoRequest(),
+                                               outputs,
+                                               vnfRollback); 
+                                               */
+                               vnfAdapter.updateVfModule (req.getCloudSiteId(),
+                                               req.getTenantId(),
+                                               //req.getVnfType(),
+                                               completeVnfVfModuleType,
+                                               req.getVnfVersion(),
+                                               req.getVfModuleName(),
+                                               req.getRequestType(),
+                                               req.getVolumeGroupStackId(),
+                                               req.getBaseVfModuleId(),
+                                               req.getVfModuleStackId(),
+                                               req.getVfModuleParams(),
+                                               req.getMsoRequest(),
+                                               outputs,
+                                               vnfRollback); 
+
+                               response = new UpdateVfModuleResponse(req.getVnfId(), req.getVfModuleId(),
+                                               vfModuleStackId.value, outputs.value, req.getMessageId());
+                       } catch (VnfException e) {
+                               eresp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient ();
+                               bpelClient.bpelPost (getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug ("Update VfModule exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+       /*
+        * URL:http://localhost:8080/vnfs/rest/v1/vnfs/<aaivnfid>/vf-modules/<aaimodid>/rollback
+        * REQUEST:
+        * {"deleteVfModuleRequest":
+               {"cloudSiteId": "DAN",
+               "tenantId": "214b428a1f554c02935e66330f6a5409",
+               "vnfId": "somevnfid",
+               "vfModuleId": "somemodid",
+               "vfModuleStackId": "4e567676-e266-4594-a3a6-131c8a2baf73",
+               "messageId": "ra.1",
+               "notificationUrl": "http://localhost:8089/vnfmock",
+               "skipAAI": true,
+               "msoRequest": {
+               "requestId": "ra1",
+               "serviceInstanceId": "sa1"
+               }}
+               }
+        */
+       @DELETE
+       @Path("{aaiVnfId}/vf-modules/{aaiVfModuleId}/rollback")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response rollbackVfModule (
+                       @PathParam("aaiVnfId") String aaiVnfId,
+                       @PathParam("aaiVfModuleId") String aaiVfModuleId,
+                       //@QueryParam("rollback") String rollback,
+                       final RollbackVfModuleRequest req)
+       {
+               LOGGER.debug("Rollback VfModule enter: " + req.toJsonString());
+               RollbackVfModulesTask task = new RollbackVfModulesTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+               try {
+                       Thread t1 = new Thread(task);
+                       t1.start();
+               } catch (Exception e) {
+                       // problem handling create, send generic failure as sync resp to caller
+                       LOGGER.error (MessageEnum.RA_ROLLBACK_VNF_ERR, "", "rollbackVfModule", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - rollbackVfModule", e);
+                       return Response.serverError().build();
+               }
+               // send sync response (ACK) to caller
+               LOGGER.debug ("rollbackVfModule exit");
+               return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class RollbackVfModulesTask implements Runnable {
+               private final RollbackVfModuleRequest req;
+               private RollbackVfModuleResponse response = null;
+               private VfModuleExceptionResponse eresp = null;
+               private boolean sendxml;
+
+               public RollbackVfModulesTask(RollbackVfModuleRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<RollbackVfModuleResponse>(response) {}
+                               : new GenericEntity<VfModuleExceptionResponse>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       try {
+                               VfModuleRollback vmr = req.getVfModuleRollback();
+                               VnfRollback vrb = new VnfRollback(
+                                               vmr.getVfModuleStackId(), vmr.getTenantId(), vmr.getCloudSiteId(), true, true,
+                                               vmr.getMsoRequest(), null, null, null);
+                               vnfAdapter.rollbackVnf (vrb);
+                               response = new RollbackVfModuleResponse(Boolean.TRUE, req.getMessageId());
+                       } catch (VnfException e) {
+                               LOGGER.error (MessageEnum.RA_ROLLBACK_VNF_ERR, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - rollbackVfModule", e);
+                               eresp = new VfModuleExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, false, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient ();
+                               bpelClient.bpelPost (getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug ("RollbackVfModulesTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VolumeAdapterRest.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/VolumeAdapterRest.java
new file mode 100644 (file)
index 0000000..8fa1552
--- /dev/null
@@ -0,0 +1,576 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+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.QueryParam;
+import javax.ws.rs.core.GenericEntity;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.xml.ws.Holder;
+
+import org.apache.http.HttpStatus;
+
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+import org.openecomp.mso.adapters.vnfrest.CreateVolumeGroupRequest;
+import org.openecomp.mso.adapters.vnfrest.CreateVolumeGroupResponse;
+import org.openecomp.mso.adapters.vnfrest.DeleteVolumeGroupRequest;
+import org.openecomp.mso.adapters.vnfrest.DeleteVolumeGroupResponse;
+import org.openecomp.mso.adapters.vnfrest.QueryVolumeGroupResponse;
+import org.openecomp.mso.adapters.vnfrest.RollbackVolumeGroupRequest;
+import org.openecomp.mso.adapters.vnfrest.RollbackVolumeGroupResponse;
+import org.openecomp.mso.adapters.vnfrest.UpdateVolumeGroupRequest;
+import org.openecomp.mso.adapters.vnfrest.UpdateVolumeGroupResponse;
+import org.openecomp.mso.adapters.vnfrest.VolumeGroupExceptionResponse;
+import org.openecomp.mso.adapters.vnfrest.VolumeGroupRollback;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+/**
+ * This class services calls to the REST interface for VNF Volumes (http://host:port/vnfs/rest/v1/volume-groups)
+ * Both XML and JSON can be produced/consumed.  Set Accept: and Content-Type: headers appropriately.  XML is the default.
+ * For testing, call with cloudSiteId = ___TESTING___
+ * To test exceptions, also set tenantId = ___TESTING___
+ */
+@Path("/v1/volume-groups")
+public class VolumeAdapterRest {
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+       private static final String TESTING_KEYWORD = "___TESTING___";
+       private final CloudConfigFactory cloudConfigFactory = new CloudConfigFactory();
+       private final MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       private final MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl(msoPropertiesFactory, cloudConfigFactory);
+
+       @POST
+       @Path("")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response createVNFVolumes(final CreateVolumeGroupRequest req) {
+               LOGGER.debug("createVNFVolumes enter: " + req.toJsonString());
+               CreateVNFVolumesTask task = new CreateVNFVolumesTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+                       try {
+                               Thread t1 = new Thread(task);
+                               t1.start();
+                       } catch (Exception e) {
+                               // problem handling create, send generic failure as sync resp to caller
+                               LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR, "", "createVNFVolumes", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - createVNFVolumes", e);
+                               return Response.serverError().build();
+                       }
+                       // send sync response (ACK) to caller
+                       LOGGER.debug ("createVNFVolumes exit");
+                       return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class CreateVNFVolumesTask implements Runnable {
+               private final CreateVolumeGroupRequest req;
+               private CreateVolumeGroupResponse response = null;
+               private VolumeGroupExceptionResponse eresp = null;
+               private boolean sendxml;
+
+               public CreateVNFVolumesTask(CreateVolumeGroupRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<CreateVolumeGroupResponse>(response) {}
+                               : new GenericEntity<VolumeGroupExceptionResponse>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       LOGGER.debug ("CreateVFModule VolumesTask start");
+                       try {
+                               // Synchronous Web Service Outputs
+                               Holder<String> stackId = new Holder<String>();
+                               Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
+                               Holder<VnfRollback> vnfRollback = new Holder<VnfRollback>();
+                               String completeVnfVfModuleType = req.getVnfType() + "::" + req.getVfModuleType();
+                               LOGGER.debug("in createVfModuleVolumes - completeVnfVfModuleType=" + completeVnfVfModuleType);
+
+                               String cloudsite = req.getCloudSiteId();
+                               if (cloudsite != null && cloudsite.equals(TESTING_KEYWORD)) {
+                                       String tenant = req.getTenantId();
+                                       if (tenant != null && tenant.equals(TESTING_KEYWORD)) {
+                                               throw new VnfException("testing.");
+                                       }
+                                       stackId.value = "479D3D8B-6360-47BC-AB75-21CC91981484";
+                                       outputs.value = testMap();
+                               } else {
+//                                     vnfAdapter.createVnf(
+//                                                     req.getCloudSiteId(),
+//                                                     req.getTenantId(),
+//                                                     req.getVnfType(),
+//                                                     req.getVnfVersion(),
+//                                                     req.getVolumeGroupName(),
+//                                                     "VOLUME",                       // request type is VOLUME
+//                                                     null,                           // not sure about this
+//                                                     req.getVolumeGroupParams(),
+//                                                     req.getFailIfExists(),
+//                                                     req.getSuppressBackout(),
+//                                                     req.getMsoRequest(),
+//                                                     stackId,
+//                                                     outputs,
+//                                                     vnfRollback);
+                                       vnfAdapter.createVfModule(
+                                                       req.getCloudSiteId(), //cloudSiteId, 
+                                                       req.getTenantId(), //tenantId, 
+                                                       //req.getVnfType(), //vnfType, 
+                                                       completeVnfVfModuleType,
+                                                       req.getVnfVersion(), //vnfVersion, 
+                                                       req.getVolumeGroupName(), //vnfName, 
+                                                       "VOLUME", //requestType, 
+                                                       null, //volumeGroupHeatStackId, 
+                                                       null, //baseVfHeatStackId, 
+                                                       req.getVolumeGroupParams(), //inputs, 
+                                                       req.getFailIfExists(), //failIfExists, 
+                                                       req.getSuppressBackout(), //backout, 
+                                                       req.getMsoRequest(), // msoRequest, 
+                                                       stackId, 
+                                                       outputs, 
+                                                       vnfRollback);
+                               }
+                               VolumeGroupRollback rb = new VolumeGroupRollback(
+                                               req.getVolumeGroupId(),
+                                               stackId.value,
+                                               true,                                           // TODO boolean volumeGroupCreated, when would it be false?
+                                               req.getTenantId(),
+                                               req.getCloudSiteId(),
+                                               req.getMsoRequest(),
+                                               req.getMessageId());
+                               response = new CreateVolumeGroupResponse(
+                                               req.getVolumeGroupId(),
+                                               stackId.value,
+                                               true,                                           // TODO boolean volumeGroupCreated, when would it be false?
+                                               outputs.value,
+                                               rb,
+                                               req.getMessageId());
+                       } catch (VnfException e) {
+                               eresp = new VolumeGroupExceptionResponse(
+                                       e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug ("CreateVFModule VolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       @DELETE
+       @Path("{aaiVolumeGroupId}")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response deleteVNFVolumes(
+               @PathParam("aaiVolumeGroupId") String aaiVolumeGroupId,
+               final DeleteVolumeGroupRequest req
+               )
+       {
+               LOGGER.debug("deleteVNFVolumes enter: " + req.toJsonString());
+               if (aaiVolumeGroupId == null || !aaiVolumeGroupId.equals(req.getVolumeGroupId())) {
+                       return Response
+                               .status(HttpStatus.SC_BAD_REQUEST)
+                               .type(MediaType.TEXT_PLAIN)
+                               .entity("VolumeGroupId in URL does not match content")
+                               .build();
+               }
+               DeleteVNFVolumesTask task = new DeleteVNFVolumesTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+                       try {
+                               Thread t1 = new Thread(task);
+                               t1.start();
+                       } catch (Exception e) {
+                               // problem handling create, send generic failure as sync resp to caller
+                               LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR, "", "deleteVNFVolumes", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - deleteVNFVolumes", e);
+                               return Response.serverError().build();
+                       }
+                       // send sync response (ACK) to caller
+                       LOGGER.debug ("deleteVNFVolumes exit");
+                       return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class DeleteVNFVolumesTask implements Runnable {
+               private final DeleteVolumeGroupRequest req;
+               private DeleteVolumeGroupResponse response = null;
+               private VolumeGroupExceptionResponse eresp = null;
+               private boolean sendxml;
+
+               public DeleteVNFVolumesTask(DeleteVolumeGroupRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<DeleteVolumeGroupResponse>(response) {}
+                               : new GenericEntity<VolumeGroupExceptionResponse>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       LOGGER.debug("DeleteVNFVolumesTask start");
+                       try {
+                               if (!req.getCloudSiteId().equals(TESTING_KEYWORD)) {
+                                       vnfAdapter.deleteVnf(req.getCloudSiteId(), req.getTenantId(), req.getVolumeGroupStackId(), req.getMsoRequest());
+                               }
+                               response = new DeleteVolumeGroupResponse(true, req.getMessageId());
+                       } catch (VnfException e) {
+                               eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug("DeleteVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       @DELETE
+       @Path("{aaiVolumeGroupId}/rollback")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response rollbackVNFVolumes(
+               @PathParam("aaiVolumeGroupId") String aaiVolumeGroupId,
+               final RollbackVolumeGroupRequest req
+               )
+       {
+               LOGGER.debug("rollbackVNFVolumes enter: " + req.toJsonString());
+               if (aaiVolumeGroupId == null || req.getVolumeGroupRollback() == null || !aaiVolumeGroupId.equals(req.getVolumeGroupRollback().getVolumeGroupId())) {
+                       return Response
+                               .status(HttpStatus.SC_BAD_REQUEST)
+                               .type(MediaType.TEXT_PLAIN)
+                               .entity("VolumeGroupId in URL does not match content")
+                               .build();
+               }
+               RollbackVNFVolumesTask task = new RollbackVNFVolumesTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+                       try {
+                               Thread t1 = new Thread(task);
+                               t1.start();
+                       } catch (Exception e) {
+                               // problem handling create, send generic failure as sync resp to caller
+                               LOGGER.error (MessageEnum.RA_ROLLBACK_VNF_ERR, "", "rollbackVNFVolumes", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - rollbackVNFVolumes", e);
+                               return Response.serverError().build();
+                       }
+                       // send sync response (ACK) to caller
+                       LOGGER.debug("rollbackVNFVolumes exit");
+                       return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class RollbackVNFVolumesTask implements Runnable {
+               private final RollbackVolumeGroupRequest req;
+               private RollbackVolumeGroupResponse response = null;
+               private VolumeGroupExceptionResponse eresp = null;
+               private boolean sendxml;
+
+               public RollbackVNFVolumesTask(RollbackVolumeGroupRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<RollbackVolumeGroupResponse>(response) {}
+                               : new GenericEntity<VolumeGroupExceptionResponse>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       LOGGER.debug("DeleteVNFVolumesTask start");
+                       try {
+                               VolumeGroupRollback vgr = req.getVolumeGroupRollback();
+                               VnfRollback vrb = new VnfRollback(
+                                               vgr.getVolumeGroupStackId(), vgr.getTenantId(), vgr.getCloudSiteId(), true, true,
+                                               vgr.getMsoRequest(), null, null, null);
+                               vnfAdapter.rollbackVnf(vrb);
+                               response = new RollbackVolumeGroupResponse(true, req.getMessageId());
+                       } catch (VnfException e) {
+                               eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug("DeleteVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       @PUT
+       @Path("{aaiVolumeGroupId}")
+       @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response updateVNFVolumes(
+               @PathParam("aaiVolumeGroupId") String aaiVolumeGroupId,
+               final UpdateVolumeGroupRequest req
+               )
+       {
+               LOGGER.debug("updateVNFVolumes enter: " + req.toJsonString());
+               if (aaiVolumeGroupId == null || !aaiVolumeGroupId.equals(req.getVolumeGroupId())) {
+                       return Response
+                               .status(HttpStatus.SC_BAD_REQUEST)
+                               .type(MediaType.TEXT_PLAIN)
+                               .entity("VolumeGroupId in URL does not match content")
+                               .build();
+               }
+               UpdateVNFVolumesTask task = new UpdateVNFVolumesTask(req);
+               if (req.isSynchronous()) {
+                       // This is a synchronous request
+                       task.run();
+                       return Response
+                               .status(task.getStatusCode())
+                               .entity(task.getGenericEntityResponse())
+                               .build();
+               } else {
+                       // This is an asynchronous request
+               try {
+                       Thread t1 = new Thread(task);
+                       t1.start();
+               } catch (Exception e) {
+                       // problem handling create, send generic failure as sync resp to caller
+                       LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR, "", "updateVNFVolumes", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - updateVNFVolumes", e);
+                       return Response.serverError().build();
+               }
+               // send sync response (ACK) to caller
+               LOGGER.debug ("updateVNFVolumes exit");
+               return Response.status(HttpStatus.SC_ACCEPTED).build();
+               }
+       }
+
+       public class UpdateVNFVolumesTask implements Runnable {
+               private final UpdateVolumeGroupRequest req;
+               private UpdateVolumeGroupResponse response = null;
+               private VolumeGroupExceptionResponse eresp = null;
+               private boolean sendxml;
+
+               public UpdateVNFVolumesTask(UpdateVolumeGroupRequest req) {
+                       this.req = req;
+                       this.sendxml = true; // can be set with a field or header later
+               }
+               public int getStatusCode() {
+                       return (response != null) ? HttpStatus.SC_OK : HttpStatus.SC_BAD_REQUEST;
+               }
+               public Object getGenericEntityResponse() {
+                       return (response != null)
+                               ? new GenericEntity<UpdateVolumeGroupResponse>(response) {}
+                               : new GenericEntity<VolumeGroupExceptionResponse>(eresp) {};
+               }
+               private String getResponse() {
+                       if (response != null) {
+                               return sendxml ? response.toXmlString() : response.toJsonString();
+                       } else {
+                               return sendxml ? eresp.toXmlString() : eresp.toJsonString();
+                       }
+               }
+               @Override
+               public void run() {
+                       LOGGER.debug("UpdateVNFVolumesTask start");
+                       try {
+                               @SuppressWarnings("unused")
+                               Holder<String> stackId = new Holder<String> ();
+                               Holder<Map<String, String>> outputs = new Holder<Map <String, String>> ();
+                               Holder<VnfRollback> vnfRollback = new Holder<VnfRollback> ();
+                               String completeVnfVfModuleType = req.getVnfType() + "::" + req.getVfModuleType();
+                               LOGGER.debug("in updateVfModuleVolume - completeVnfVfModuleType=" + completeVnfVfModuleType);
+
+                               if (req.getCloudSiteId().equals(TESTING_KEYWORD)) {
+                                       outputs.value = testMap();
+                               } else {
+                                       //vnfAdapter.updateVnf(
+                                       //              req.getCloudSiteId(),
+                                       //              req.getTenantId(),
+                                       //              req.getVnfType(),
+                                       //              req.getVnfVersion(),
+                                       //              req.getVfModuleType(),
+                                       //              "VOLUME",                       // request type is VOLUME
+                                       //              req.getVolumeGroupStackId(),
+                                       //              req.getVolumeGroupParams(),
+                                       //              req.getMsoRequest(),
+                                       //              outputs,
+                                       //              vnfRollback);
+                                       vnfAdapter.updateVfModule (req.getCloudSiteId(),
+                                                       req.getTenantId(),
+                                                       //req.getVnfType(),
+                                                       completeVnfVfModuleType,
+                                                       req.getVnfVersion(),
+                                                       req.getVolumeGroupStackId(),
+                                                       "VOLUME",
+                                                       null,
+                                                       null,
+                                                       req.getVolumeGroupStackId(),
+                                                       req.getVolumeGroupParams(),
+                                                       req.getMsoRequest(),
+                                                       outputs,
+                                                       vnfRollback); 
+                               }
+                               response = new UpdateVolumeGroupResponse(
+                                               req.getVolumeGroupId(), req.getVolumeGroupStackId(),
+                                               outputs.value, req.getMessageId());
+                       } catch (VnfException e) {
+                               eresp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, true, req.getMessageId());
+                       }
+                       if (!req.isSynchronous()) {
+                               // This is asynch, so POST response back to caller
+                               BpelRestClient bpelClient = new BpelRestClient();
+                               bpelClient.bpelPost(getResponse(), req.getNotificationUrl(), sendxml);
+                       }
+                       LOGGER.debug("UpdateVNFVolumesTask exit: code=" + getStatusCode() + ", resp="+ getResponse());
+               }
+       }
+
+       @GET
+       @Path("{aaiVolumeGroupId}")
+       @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+       public Response queryVNFVolumes(
+               @PathParam("aaiVolumeGroupId") String aaiVolumeGroupId,
+               @QueryParam("cloudSiteId") String cloudSiteId,
+               @QueryParam("tenantId") String tenantId,
+               @QueryParam("volumeGroupStackId") String volumeGroupStackId,
+               @QueryParam("skipAAI") Boolean skipAAI,
+               @QueryParam("msoRequest.requestId") String requestId,
+               @QueryParam("msoRequest.serviceInstanceId") String serviceInstanceId
+               )
+       {
+       //This request responds synchronously only
+       LOGGER.debug ("queryVNFVolumes enter:" + aaiVolumeGroupId + " " + volumeGroupStackId);
+       MsoRequest msoRequest = new MsoRequest(requestId, serviceInstanceId);
+
+       try {
+               int respStatus = HttpStatus.SC_OK;
+               QueryVolumeGroupResponse qryResp = new QueryVolumeGroupResponse(aaiVolumeGroupId, volumeGroupStackId, null, null);
+               Holder<Boolean> vnfExists = new Holder<Boolean>();
+               Holder<String> vfModuleId = new Holder<String>();
+               Holder<VnfStatus> status = new Holder<VnfStatus>();
+               Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
+                       if (cloudSiteId != null && cloudSiteId.equals(TESTING_KEYWORD)) {
+                               if (tenantId != null && tenantId.equals(TESTING_KEYWORD)) {
+                                       throw new VnfException("testing.");
+                               }
+                               vnfExists.value = true;
+                               vfModuleId.value = TESTING_KEYWORD;
+                               status.value = VnfStatus.ACTIVE;
+                               outputs.value = testMap();
+                       } else {
+                               vnfAdapter.queryVnf(cloudSiteId, tenantId, volumeGroupStackId, msoRequest, vnfExists, vfModuleId, status, outputs);
+                       }
+               if (!vnfExists.value) {
+                       LOGGER.debug ("VNFVolumes not found");
+                       qryResp.setVolumeGroupStatus(status.value);
+                       respStatus = HttpStatus.SC_NOT_FOUND;
+               } else {
+                       LOGGER.debug ("VNFVolumes found " + vfModuleId.value + ", status=" + status.value);
+                       qryResp.setVolumeGroupStatus(status.value);
+                       qryResp.setVolumeGroupOutputs(outputs.value);
+               }
+               LOGGER.debug("Query queryVNFVolumes exit");
+               return Response
+                       .status(respStatus)
+                       .entity(new GenericEntity<QueryVolumeGroupResponse>(qryResp) {})
+                       .build();
+       } catch (VnfException e) {
+               LOGGER.error(MessageEnum.RA_QUERY_VNF_ERR,  aaiVolumeGroupId, "", "queryVNFVolumes", MsoLogger.ErrorCode.BusinessProcesssError, "VnfException - queryVNFVolumes", e);
+               VolumeGroupExceptionResponse excResp = new VolumeGroupExceptionResponse(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.FALSE, null);
+               LOGGER.debug("Query queryVNFVolumes exit");
+               return Response
+                       .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
+                       .entity(new GenericEntity<VolumeGroupExceptionResponse>(excResp) {})
+                       .build();
+               }
+       }
+    public static Map<String, String> testMap() {
+               Map<String, String> m = new HashMap<String, String>();
+               m.put("mickey", "7");
+               m.put("clyde", "10");
+               m.put("wayne", "99");
+               return m;
+    }
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfAlreadyExists.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfAlreadyExists.java
new file mode 100644 (file)
index 0000000..7cec0cd
--- /dev/null
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf.exceptions;
+
+
+
+import javax.xml.ws.WebFault;
+
+/**
+ * This class reports an exception when trying to create a VNF when another
+ * VNF of the same name already exists in the target cloud/tenant.  Note that
+ * the createVnf method suppresses this exception by default.
+ * 
+ *
+ */
+@WebFault (name="VnfAlreadyExists", faultBean="org.openecomp.mso.adapters.vnf.exceptions.VnfExceptionBean", targetNamespace="http://com.att.mso/vnf")
+public class VnfAlreadyExists extends VnfException {
+
+       private static final long serialVersionUID = 1L;
+
+       public VnfAlreadyExists (String name, String cloudId, String tenantId, String vnfId) {
+               super("VNF " + name + " already exists in cloud/tenant " + cloudId + "/" + tenantId + " with ID " + vnfId);
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfException.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfException.java
new file mode 100644 (file)
index 0000000..ceef76b
--- /dev/null
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf.exceptions;
+
+
+
+import javax.xml.ws.WebFault;
+
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+/**
+ * This class simply extends Exception (without addition additional functionality)
+ * to provide an identifier for VNF related exceptions on create, delete, query.
+ * 
+ *
+ */
+@WebFault (name="VnfException", faultBean="org.openecomp.mso.adapters.vnf.exceptions.VnfExceptionBean", targetNamespace="http://com.att.mso/vnf")
+public class VnfException extends Exception {
+
+       private static final long serialVersionUID = 1L;
+
+       private VnfExceptionBean faultInfo;
+       
+       public VnfException (String msg) {
+               super(msg);
+               faultInfo = new VnfExceptionBean (msg);
+       }
+       
+       public VnfException (Throwable e) {
+               super(e);
+               faultInfo = new VnfExceptionBean (e.getMessage());
+       }
+       
+       public VnfException (String msg, Throwable e) {
+               super (msg, e);
+               faultInfo = new VnfExceptionBean (msg);
+       }
+
+       public VnfException (String msg, MsoExceptionCategory category) {
+               super(msg);
+               faultInfo = new VnfExceptionBean (msg, category);
+       }
+       
+       public VnfException (String msg, MsoExceptionCategory category, Throwable e) {
+               super (msg, e);
+               faultInfo = new VnfExceptionBean (msg, category);
+       }
+       
+       public VnfException (MsoException e) {
+               super (e);
+               faultInfo = new VnfExceptionBean (e.getContextMessage(), e.getCategory());
+       }
+       
+       public VnfExceptionBean getFaultInfo() {
+               return faultInfo;
+       }
+
+       public void setFaultInfo(VnfExceptionBean faultInfo) {
+               this.faultInfo = faultInfo;
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfExceptionBean.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfExceptionBean.java
new file mode 100644 (file)
index 0000000..15918ea
--- /dev/null
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf.exceptions;
+
+
+import java.io.Serializable;
+
+import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+/**
+ * Jax-WS Fault Bean for Vnf Exception
+ */
+public class VnfExceptionBean implements Serializable {
+
+    private static final long serialVersionUID = -5699310749783790095L;
+
+    private String message;
+       private MsoExceptionCategory category;
+       private Boolean rolledBack;
+
+       public VnfExceptionBean () {}
+
+       public VnfExceptionBean (String message) {
+               this.message = message;
+       }
+
+       public VnfExceptionBean (String message, MsoExceptionCategory category) {
+               this.message = message;
+               this.category = category;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public MsoExceptionCategory getCategory () {
+               return category;
+       }
+
+       public void setCategory (MsoExceptionCategory category) {
+               this.category = category;
+       }
+
+       public Boolean isRolledBack() {
+               return rolledBack;
+       }
+
+       public void setRolledBack(Boolean rolledBack) {
+               this.rolledBack = rolledBack;
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfNotFound.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/exceptions/VnfNotFound.java
new file mode 100644 (file)
index 0000000..3c27d03
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf.exceptions;
+
+
+import javax.xml.ws.WebFault;
+
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+
+/**
+ * This class reports an exception when trying to update a Network that does
+ * not exist in the target cloud/tenant.  Note that deleteNetwork suppresses
+ * this exception (deletion of non-existent network is considered a success).
+ * 
+ *
+ */
+@WebFault (name="VnfNotFound", faultBean="org.openecomp.mso.adapters.vnf.exceptions.VnfExceptionBean", targetNamespace="http://com.att.mso/vnf")
+public class VnfNotFound extends VnfException {
+
+       private static final long serialVersionUID = 1L;
+
+       public VnfNotFound (String cloudId, String tenantId, String vnfName) {
+               super("VNF " + vnfName + " not found in cloud/tenant " + cloudId + "/" + tenantId);
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java
new file mode 100644 (file)
index 0000000..96e50d0
--- /dev/null
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf.test;
+
+
+import java.util.Map;
+
+import javax.xml.ws.Holder;
+
+import org.openecomp.mso.adapters.vnf.MsoVnfAdapter;
+import org.openecomp.mso.adapters.vnf.MsoVnfAdapterImpl;
+import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+
+public class QueryTest {
+       public final static void main (String args[])
+       {
+               MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl();
+               log ("Got a VnfAdapter");
+               
+               String cloudId = "MT";
+               String tenantId = "MSO_Test";
+               String vnfName = "VNF_TEST1";
+               Holder<Boolean> vnfExists = new Holder<Boolean>();
+               Holder<String> vnfId = new Holder<String>();
+               Holder<VnfStatus> status = new Holder<VnfStatus>();
+               Holder<Map<String,String>> outputs = new Holder<Map<String,String>>();
+               
+               try {
+                       vnfAdapter.queryVnf(cloudId, tenantId, vnfName, null,
+                                               vnfExists, vnfId, status, outputs);
+               } catch (VnfException e) {
+                       log ("Got an Exception: " + e);
+               }
+               
+               if (! vnfExists.value){
+                       log ("VNF Not Found");
+               } else {
+                       log ("Found VNF, ID = " + vnfId.value + ", status=" + status.value);
+               }
+       }
+       
+       private static void log (String msg) {
+               System.out.println (msg);
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfCreateTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfCreateTest.java
new file mode 100644 (file)
index 0000000..0269172
--- /dev/null
@@ -0,0 +1,87 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf.test;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.ws.Holder;
+
+import org.openecomp.mso.adapters.vnf.MsoVnfAdapter;
+import org.openecomp.mso.adapters.vnf.MsoVnfAdapterImpl;
+import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+
+public class VnfCreateTest {
+       public final static void main (String args[])
+       {
+               MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl();
+               log ("Got a VnfAdapter");
+               
+               // Web Service Inputs
+               String cloudId = "MT";
+               String tenantName = "John_Test";
+               String vnfType = "ApacheDemo";
+               String vnfName = "AdapterTest";
+               Map<String,String> inputs = new HashMap<String,String>();
+               inputs.put("vnf_id", "abc");
+               inputs.put("extra", "whocares");
+               inputs.put("private_subnet_gateway", "10.4.1.1");
+               inputs.put("private_subnet_cidr", "10.4.1.0/29");
+               
+               // Web Service Outputs
+               Holder<String> vnfId = new Holder<String>();
+               Holder<Map<String,String>> outputs = new Holder<Map<String,String>>();
+               Holder<VnfRollback> vnfRollback = new Holder<VnfRollback>();
+
+               try {
+                       vnfAdapter.createVnf(cloudId, tenantName, vnfType,null, vnfName, null, null, inputs, false, true, null,
+                                       vnfId, outputs, vnfRollback);
+               } catch (VnfException e) {
+                       log ("Got a Create Exception: " + e);
+                       System.exit(1);
+               }
+               
+               log ("Created VNF, ID = " + vnfId.value);
+               for (String key : outputs.value.keySet()) {
+                       log ("   " + key + " = " + outputs.value.get(key));
+               }
+               if (vnfRollback.value != null)
+                       log (vnfRollback.value.toString());
+               
+               try {
+                       Thread.sleep(5000);
+               } catch (InterruptedException e) {}
+               
+               log ("Rolling Back VNF");
+               try {
+                       vnfAdapter.rollbackVnf(vnfRollback.value);
+               } catch (VnfException e) {
+                       log ("Got a Rollback Exception: " + e);
+               }
+               log ("VNF Rolled Back");
+       }
+       
+       private static void log (String msg) {
+               System.out.println (msg);
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfDeleteTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfDeleteTest.java
new file mode 100644 (file)
index 0000000..0c35da7
--- /dev/null
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf.test;
+
+
+
+import org.openecomp.mso.adapters.vnf.MsoVnfAdapter;
+import org.openecomp.mso.adapters.vnf.MsoVnfAdapterImpl;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+
+public class VnfDeleteTest {
+       public final static void main (String args[])
+       {
+               MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl();
+               log ("Got a VnfAdapter");
+               
+               // Web Service Inputs
+               String cloudId = "MT";
+               String tenantName = "MSO_Test";
+               String vnfName = "AdapterTest";
+
+               try {
+                       vnfAdapter.deleteVnf(cloudId, tenantName, vnfName, null);
+               } catch (VnfException e) {
+                       log ("Got an Exception: " + e);
+               }
+               
+               log ("Deleted VNF");
+       }
+       
+       private static void log (String msg) {
+               System.out.println (msg);
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfQueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfQueryTest.java
new file mode 100644 (file)
index 0000000..923c222
--- /dev/null
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapters.vnf.test;
+
+
+import java.util.Map;
+
+import javax.xml.ws.Holder;
+
+import org.openecomp.mso.adapters.vnf.MsoVnfAdapter;
+import org.openecomp.mso.adapters.vnf.MsoVnfAdapterImpl;
+import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.openecomp.mso.adapters.vnf.exceptions.VnfException;
+
+public class VnfQueryTest {
+       public final static void main (String args[])
+       {
+               MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl();
+               log ("Got a VnfAdapter");
+               
+               String cloudId = "MT";
+               String tenantId = "MSO_Test";
+               String vnfName = "VNF_TEST1";
+               Holder<Boolean> vnfExists = new Holder<Boolean>();
+               Holder<String> vnfId = new Holder<String>();
+               Holder<VnfStatus> status = new Holder<VnfStatus>();
+               Holder<Map<String,String>> outputs = new Holder<Map<String,String>>();
+               
+               try {
+                       vnfAdapter.queryVnf(cloudId, tenantId, vnfName, null,
+                                               vnfExists, vnfId, status, outputs);
+               } catch (VnfException e) {
+                       log ("Got an Exception: " + e);
+               }
+               
+               if (! vnfExists.value){
+                       log ("VNF Not Found");
+               } else {
+                       log ("Found VNF, ID = " + vnfId.value + ", status=" + status.value);
+               }
+       }
+       
+       private static void log (String msg) {
+               System.out.println (msg);
+       }
+}
diff --git a/adapters/mso-vnf-adapter/src/test/resources/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector b/adapters/mso-vnf-adapter/src/test/resources/META-INF/services/com.woorea.openstack.base.client.OpenStackClientConnector
new file mode 100644 (file)
index 0000000..1281d32
--- /dev/null
@@ -0,0 +1 @@
+com.woorea.openstack.connector.HttpClientConnector
\ No newline at end of file
diff --git a/adapters/mso-vnf-adapter/src/test/resources/logback-test.xml b/adapters/mso-vnf-adapter/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..238980e
--- /dev/null
@@ -0,0 +1,48 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+
+  
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/adapters/pom.xml b/adapters/pom.xml
new file mode 100644 (file)
index 0000000..d75fd57
--- /dev/null
@@ -0,0 +1,39 @@
+<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.openecomp</groupId>
+               <artifactId>mso</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>adapters</artifactId>
+       <name>MSO Adapters</name>
+       <description>Adapters for MSO</description>
+       <packaging>pom</packaging>
+
+       <modules>
+               <module>mso-adapter-utils</module>
+               <module>mso-adapters-rest-interface</module>
+               <module>mso-network-adapter</module>
+               <module>mso-network-adapter-async-client</module>
+               <module>mso-sdnc-adapter</module>
+               <!--<module>mso-appc-adapter</module>-->
+               <module>mso-tenant-adapter</module>
+               <module>mso-vnf-adapter</module>
+               <module>mso-vnf-adapter-async-client</module>
+               <module>mso-requests-db-adapter</module>
+       </modules>
+       
+       <dependencies>
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpclient</artifactId>
+               </dependency>
+               <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+        </dependency>
+       </dependencies>
+</project>
diff --git a/asdc-controller/README b/asdc-controller/README
new file mode 100644 (file)
index 0000000..cc34288
--- /dev/null
@@ -0,0 +1 @@
+This package contains the Catalog Database hibernate configuration and supporting classes.\r
diff --git a/asdc-controller/WebContent/WEB-INF/ejb-jar.xml b/asdc-controller/WebContent/WEB-INF/ejb-jar.xml
new file mode 100644 (file)
index 0000000..c103a40
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar version="3.1" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
+  <display-name>ASDCController</display-name> 
+ </ejb-jar>
\ No newline at end of file
diff --git a/asdc-controller/WebContent/WEB-INF/jboss-deployment-structure.xml b/asdc-controller/WebContent/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..9a24bfc
--- /dev/null
@@ -0,0 +1,17 @@
+<jboss-deployment-structure>
+       <deployment>
+               <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
+               <exclusions>
+                       <module name="org.apache.log4j" />
+                       <module name="org.slf4j" />
+                       <module name="org.slf4j.impl" />
+               </exclusions>
+               <dependencies>
+                           <module name="org.jboss.jandex" slot="main" />
+                <module name="org.javassist" slot="main" />
+                <module name="org.antlr" slot="main" />
+                <module name="org.dom4j" slot="main" />
+               </dependencies>
+       </deployment>
+</jboss-deployment-structure>
+
diff --git a/asdc-controller/WebContent/WEB-INF/jboss-web.xml b/asdc-controller/WebContent/WEB-INF/jboss-web.xml
new file mode 100644 (file)
index 0000000..2a1f26f
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<jboss-web>\r
+    <context-root>asdc</context-root>\r
+    <security-domain>other</security-domain>\r
+</jboss-web>
\ No newline at end of file
diff --git a/asdc-controller/WebContent/WEB-INF/web.xml b/asdc-controller/WebContent/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..a8ccd17
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">\r
+  <display-name>ASDC Controller</display-name>\r
\r
\r
+   <!-- enable the Asynchronous Job Service -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.enabled</param-name>\r
+        <param-value>true</param-value>\r
+    </context-param>\r
+\r
+        <context-param>\r
+               <param-name>resteasy.jndi.resources</param-name>\r
+               <param-value>java:module/MsoPropertiesFactory</param-value>\r
+        </context-param>\r
+\r
+    <!-- The next context parameters are all optional.  \r
+         Their default values are shown as example param-values -->\r
+\r
+    <!-- How many jobs results can be held in memory at once? -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.max.job.results</param-name>\r
+        <param-value>100</param-value>\r
+    </context-param>\r
+\r
+    <!-- Maximum wait time on a job when a client is querying for it -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.max.wait</param-name>\r
+        <param-value>300000</param-value>\r
+    </context-param>\r
+\r
+    <!-- Thread pool size of background threads that run the job -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.thread.pool.size</param-name>\r
+        <param-value>100</param-value>\r
+    </context-param>\r
+\r
+    <!-- Set the base path for the Job uris -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.base.path</param-name>\r
+        <param-value>/asynch/jobs</param-value>\r
+    </context-param>\r
+  <context-param>\r
+    <param-name>resteasy.scan</param-name>\r
+    <param-value>true</param-value>\r
+  </context-param>\r
\r
+  <!--  \r
+  <context-param>\r
+    <param-name>resteasy.servlet.mapping.prefix</param-name>\r
+    <param-value>/v1</param-value>\r
+  </context-param>\r
+  -->\r
+   <context-param>\r
+       <param-name>log.configuration</param-name>\r
+       <param-value>logback.asdc.xml</param-value>\r
+  </context-param>\r
+  \r
+  <context-param>\r
+       <param-name>mso.configuration</param-name>\r
+       <param-value>MSO_PROP_ASDC=mso.asdc.json,MSO_PROP_TOPOLOGY=topology.properties</param-value>\r
+\r
+  </context-param>\r
+  \r
+  <context-param>\r
+    <param-name>resteasy.resources</param-name>\r
+    <param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.asdc.healthcheck.HealthCheckHandler</param-value>\r
+  </context-param>\r
+  \r
+  <listener>\r
+    <listener-class>\r
+                       org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap\r
+       </listener-class>\r
+  </listener>\r
+  <servlet>\r
+    <servlet-name>asdccontroller-servlet</servlet-name>\r
+    <servlet-class>\r
+                       org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher\r
+               </servlet-class>\r
+  </servlet>\r
+  <servlet-mapping>\r
+    <servlet-name>asdccontroller-servlet</servlet-name>\r
+    <url-pattern>/*</url-pattern>\r
+  </servlet-mapping>\r
+\r
+    <filter>\r
+               <filter-name>LogFilter</filter-name>\r
+               <filter-class>org.openecomp.mso.logger.LogFilter</filter-class> \r
+       </filter>\r
+      <filter-mapping>\r
+               <filter-name>LogFilter</filter-name>\r
+               <url-pattern>/*</url-pattern>\r
+       </filter-mapping>\r
+\r
+    <security-constraint>\r
+        <web-resource-collection>\r
+            <web-resource-name>SiteStatus</web-resource-name>\r
+            <description>SiteStatus APIs</description>\r
+            <url-pattern>/setStatus/*</url-pattern>\r
+            <http-method>POST</http-method>\r
+        </web-resource-collection>\r
+        <auth-constraint>\r
+            <role-name>SiteControl-Client</role-name>\r
+        </auth-constraint>\r
+    </security-constraint>\r
+    <login-config>\r
+        <auth-method>BASIC</auth-method>\r
+        <realm-name>ApplicationRealm</realm-name>\r
+    </login-config>\r
+    <security-role>\r
+        <role-name>SiteControl-Client</role-name>\r
+    </security-role>\r
+</web-app>
\ No newline at end of file
diff --git a/asdc-controller/notif.txt b/asdc-controller/notif.txt
new file mode 100644 (file)
index 0000000..3472d9a
--- /dev/null
@@ -0,0 +1,140 @@
+{
+    "distributionID" : "5v1234d8-5b6d-42c4-7t54-47v95n58qb7",
+    “distributionVersion” : “1607”,
+    "serviceName" : "Nimbus",
+    “serviceInvariantUUID” : “c66232fe-d7b0-40f0-8e5e-9128e694c28b”,
+    “serviceVersion” : “2.0”,
+    "serviceUUID" : "4e0697d8-5b6d-42c4-8c74-46c33d46624c",
+    "serviceDescription" : "Nimbus service description",
+    "serviceArtifacts":[
+        {
+            "artifactName" : "vnf_catalog.xml",
+            "artifactType" : "VNF_CATALOG",
+            "artifactUUID" :"4e1444d8-5b6d-42c4-8c74-46c55d43425b",
+            "artifactVersion" : "1" , 
+            "artifactURL" : "/asdc/v1/catalog/services/Nimbus/2.0/artifacts/vnf_catalog.xml" ,
+            "artifactDescription" : "VNF Catalog Artifact" ,
+            "artifactChecksum" : "14e389rnbvq6tf=="
+        }
+      ],
+    "resources":[
+        {
+            "resourceInstanceName" : "PCRF1",
+            "resourceName" : "PCRF",
+            "resourceInvariantUUID" : "ff420d27-4585-445a-8a86-a6f64333b337",
+            "resourceVersion": "1.0",
+            "resourceUUID" : "4e5555d8-5b6d-42c4-8c74-46c33d8904f",
+            "resourceType" : "VF",
+            "artifacts" : [
+                {
+                    "artifactName" : "license.xml",
+                    "artifactType" : "VF_LICENSE",
+                    "artifactUUID" :"4e1111d8-5b6d-42c4-8c74-46c12d43424c",
+                    "artifactVersion" : "1" , 
+                    "artifactURL" : "/asdc/v1/catalog/services/Nimbus/2.0/resourceInstances/ PCRF1/artifacts/license.xml" ,
+                    "artifactDescription" : "VF License Model Artifact" ,
+                    "artifactChecksum" : "14e389rnbvq8vq=="
+                }
+            ],
+            "vfModules": [
+                {
+                    "vfModuleModelName": "PCRF-module-0",
+                    "vfModuleModelInvariantUUID" : "7ebcc262-2d4a-4131-bfed-32cb92d251ce",
+                    "vfModuleModelVersion": "1",
+                    "vfModuleModelUUID": "9g6666d8-5b6d-42c4-8c74-46c33d8904f",
+                    "vfModuleModelDescription": "PCRF VF Module",
+                    "isBase": TRUE,
+                    "artifacts": [
+                        {
+                            "artifactName": "pcrf-base-module.yaml",
+                            "artifactLabel": "PCRF::base::module-0",
+                            "artifactType": "HEAT",
+                            "artifactUUID": "d1dc0ac0-0b07-11e6-b512-3e1d05defe78",
+                            "artifactVersion": "1",
+                            "artifactURL": "/asdc/v1/catalog/services/Nimbus/2.0/resourceInstances/PCRF1/artifacts/pcrf-base-module.yaml",
+                            "artifactDescription": "PCRF VF Module HEAT base template artifact",
+                            "artifactTimeout": 60,
+                            "artifactChecksum": "dy6389rnbvq8vq=="
+                        },
+                        {
+                            "artifactName": "pcrf-nested.yaml",
+                            "artifactLabel": "PCRF::nested-1",
+                            "artifactType": "HEAT_NESTED",
+                            "artifactUUID": "4e1111d8-5b6d-42c4-8c74-46c12d43424c",
+                            "artifactVersion": "2",
+                            "artifactURL": "/asdc/v1/catalog/services/Nimbus/2.0/resourceInstances/PCRF1/artifacts/pcrf-nested.yaml",
+                            "artifactDescription": "PCRF VF Module HEAT nested template artifact",
+                            "artifactChecksum": "76hd389rnbvq8vq=="
+                        },
+                        {
+                            "artifactName": "pcrf-base-module.env",
+                            "artifactLabel": "PCRF::base::module-0-env",
+                            "artifactType": "HEAT_ENV",
+                            "artifactUUID": "2636916f-aa37-4c79-b3ea-0e68d6e139e6",
+                            "artifactVersion": "3",
+                            "artifactURL": "/asdc/v1/catalog/services/Nimbus/2.0/resourceInstances/PCRF1/pcrf-base-module.env",
+                            "artifactDescription": "PCRF VF Module HEAT environment artifact",
+                            "generatedFromUUID" : “d1dc0ac0-0b07-11e6-b512-3e1d05defe78”,
+                            "artifactChecksum": "3d6555rnbvq3tq=="
+                        },
+                        {
+                            "artifactName": "pcrf-getfile.sh",
+                            "artifactLabel": "PCRF::getfile-1",
+                            "artifactType": "HEAT_ARTIFACT",
+                            "artifactUUID": "c1492a80-0b07-11e6-b512-3e1d05defe78",
+                            "artifactVersion": "3",
+                            "artifactURL": "/asdc/v1/catalog/services/Nimbus/2.0/resourceInstances/PCRF1/artifacts/pcrf-getfile.sh",
+                            "artifactDescription": "HEAT getfile artifact",
+                            "artifactChecksum": "fds3555rnbvq3tq=="
+                        },
+                    ]
+                },                  
+                {
+                    "vfModuleModelName": "PCRF-module-0-vol",
+                    "vfModuleModelInvariantUUID" : "7ebcc262-2d4a-4131-cfed-32cb92d25222",
+                    "vfModuleModelVersion": "1",
+                    "vfModuleModelUUID": "9g6446d8-5b6d-42c4-8c74-46c33d89f50",
+                    "vfModuleModelDescription": "PCRF volume VF Module",
+                    "artifacts": [
+                        {
+                            "artifactName": "pcrf-ppd-pcm-module-volume.yaml",
+                            "artifactLabel": "PCRF::PPD_PCM::module-0-vol",
+                            "artifactType": "HEAT_VOL",
+                            "artifactUUID": "48a0b856-22b9-4362-875c-3c960ee2a336",
+                            "artifactVersion": "1",
+                            "artifactURL": "/asdc/v1/catalog/services/Nimbus/2.0/resourceInstances/PCRF1/artifacts/pcrf-ppd-pcm-module-volume.yaml",
+                            "artifactDescription": "VF Module HEAT Volume base template artifact",
+                            "artifactTimeout": 60,
+                            "artifactChecksum": "zsc389rnbvq8vq=="
+                        },
+                        {
+                            "artifactName": "pcrf-ppd-pcm-module-volume.env",
+                            "artifactLabel": "PCRF::PPD_PCM::module-0-vol-env",
+                            "artifactType": "HEAT_VOL_ENV",
+                            "artifactUUID": "3d6eea53-58f1-4434-aabe-1c92cbaa6936",
+                            "artifactVersion": "1",
+                            "artifactURL": "/asdc/v1/catalog/services/Nimbus/2.0/resourceInstances/PCRF1/artifacts/pcrf-ppd-pcm-module-volume.env",
+                            "artifactDescription": "VF Module HEAT Volume env artifact",
+                            "generatedFromUUID": "48a0b856-22b9-4362-875c-3c960ee2a336",
+                            "artifactChecksum": "g8m389rnbvq8vq=="
+                        }           
+                    ]
+                },
+            ]
+        },  
+        {
+            "resourceInstanceName" : "aaa_2",
+            "resourceName" : "aaa",
+            "resourceInvariantUUID" : "ff420d27-5555-335a-8a77-a6f64999b337",
+            "resourceVersion": "1.0",
+            "resourceUUID" : "4e5555d8-5b6d-42c4-8c74-46c33d8904f",
+            "resourceType" : "VF",
+            "artifacts": [
+                ...
+            ],
+            "vfModules": [
+                ...
+            ]
+        }                     
+    ]
+}
diff --git a/asdc-controller/pom.xml b/asdc-controller/pom.xml
new file mode 100644 (file)
index 0000000..61bb3ea
--- /dev/null
@@ -0,0 +1,111 @@
+<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.openecomp</groupId>
+               <artifactId>mso</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>asdc-controller</artifactId>
+       <name>asdc-controller</name>
+       <description>ASDC CLient and Controller</description>
+       <packaging>war</packaging>
+       
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.3</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                                       <attachClasses>true</attachClasses>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-all</artifactId>
+                       <version>1.10.19</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-catalog-db</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.jboss.spec.javax.ejb</groupId>
+                       <artifactId>jboss-ejb-api_3.2_spec</artifactId>
+                       <version>1.0.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.ejb3</groupId>
+                       <artifactId>jboss-ejb3-ext-api</artifactId>
+                       <version>2.2.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <dependency>
+                               <groupId>javax.servlet</groupId>
+                               <artifactId>javax.servlet-api</artifactId>
+                               <version>3.1.0</version>
+                               <scope>test</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.openecomp.sdc</groupId>
+            <artifactId>sdc-distribution-client</artifactId>
+            <version>1.1.2</version>
+                       <exclusions>
+                        <exclusion>  <!-- declare the exclusion here -->
+                        <groupId>org.slf4j</groupId>
+                        <artifactId>slf4j-log4j12</artifactId>
+                        </exclusion>
+         </exclusions> 
+               </dependency>
+
+               <dependency>
+                   <groupId>org.apache.httpcomponents</groupId>
+                   <artifactId>httpmime</artifactId>
+                   <version>4.5</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>common</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.yaml</groupId>
+                       <artifactId>snakeyaml</artifactId>
+                       <version>1.15</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>javax</groupId>
+                       <artifactId>javaee-web-api</artifactId>
+                       <version>6.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>status-control</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>commons-io</groupId>
+                       <artifactId>commons-io</artifactId>
+               </dependency>
+       </dependencies>
+
+</project>
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/ASDCControllerSingleton.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/ASDCControllerSingleton.java
new file mode 100644 (file)
index 0000000..d8ac7d6
--- /dev/null
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc;
+
+
+import javax.annotation.PreDestroy;
+import javax.ejb.ConcurrencyManagement;
+import javax.ejb.ConcurrencyManagementType;
+import javax.ejb.Lock;
+import javax.ejb.LockType;
+import javax.ejb.Schedule;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+
+import org.openecomp.mso.asdc.client.ASDCGlobalController;
+import org.openecomp.mso.logger.MsoLogger;
+
+@Singleton(name = "ASDCController")
+@Lock(LockType.READ)
+@Startup
+@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
+public class ASDCControllerSingleton {
+
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.ASDC);
+    private static boolean working = false;
+
+    private ASDCGlobalController globalController = new ASDCGlobalController ();
+
+    /**
+     * Main Constructor of the ASDC Singleton
+     */
+    public ASDCControllerSingleton () {
+    }
+
+    @Schedule(second ="30", minute = "*", hour = "*", persistent = false)
+    public void periodicControllerTask () {
+        if (isWorking ()) {
+            LOGGER.debug ("Another thread is already trying to init ASDC, cancel this periodic call");
+            return;
+        }
+        try {
+            setWorking (true);
+            
+            globalController.updateControllersConfigIfNeeded();
+            globalController.checkInStoppedState();
+
+        } finally {
+            setWorking (false);
+        }
+    }
+
+    @PreDestroy
+    private void terminate () {
+        globalController.closeASDC ();
+    }
+
+    private static synchronized boolean isWorking () {
+        return ASDCControllerSingleton.working;
+    }
+
+    private static synchronized void setWorking (boolean working) {
+        ASDCControllerSingleton.working = working;
+    }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCConfiguration.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCConfiguration.java
new file mode 100644 (file)
index 0000000..1d87ccb
--- /dev/null
@@ -0,0 +1,418 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Properties;
+
+import org.codehaus.jackson.JsonNode;
+
+import org.openecomp.sdc.api.consumer.IConfiguration;
+import org.openecomp.mso.asdc.client.exceptions.ASDCParametersException;
+import org.openecomp.mso.properties.MsoJsonProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+public class ASDCConfiguration implements IConfiguration {
+
+    private MsoPropertiesFactory msoPropertiesFactory;
+
+    // SHell command to obtain the same encryption, 128 bits key, key must be HEX
+    // echo -n "This is a test string" | openssl aes-128-ecb -e -K 546573746F736973546573746F736973 -nosalt | xxd
+
+    private String configKey;
+
+    private MsoJsonProperties msoProperties;
+
+    private String asdcControllerName;
+
+    public static final String MSO_PROP_ASDC = "MSO_PROP_ASDC";
+    public static final String PARAMETER_PATTERN = "asdc-connections";
+
+    public static final String CONSUMER_GROUP_ATTRIBUTE_NAME = "consumerGroup";
+    public static final String CONSUMER_ID_ATTRIBUTE_NAME = "consumerId";
+    public static final String ENVIRONMENT_NAME_ATTRIBUTE_NAME = "environmentName";
+    public static final String PASSWORD_ATTRIBUTE_NAME = "password";
+    public static final String POLLING_INTERVAL_ATTRIBUTE_NAME = "pollingInterval";
+    public static final String RELEVANT_ARTIFACT_TYPES_ATTRIBUTE_NAME = "relevantArtifactTypes";
+    public static final String USER_ATTRIBUTE_NAME = "user";
+    public static final String ASDC_ADDRESS_ATTRIBUTE_NAME = "asdcAddress";
+    public static final String POLLING_TIMEOUT_ATTRIBUTE_NAME = "pollingTimeout";
+    public static final String ACTIVATE_SERVER_TLS_AUTH = "activateServerTLSAuth";
+    public static final String KEY_STORE_PASSWORD = "keyStorePassword";
+    public static final String KEY_STORE_PATH = "keyStorePath";
+
+    public static final String HEAT="HEAT";
+    public static final String HEAT_ARTIFACT="HEAT_ARTIFACT";
+    public static final String HEAT_ENV="HEAT_ENV";
+    public static final String HEAT_NESTED="HEAT_NESTED";
+    public static final String HEAT_NET="HEAT_NET";
+    public static final String HEAT_VOL="HEAT_VOL";
+    public static final String OTHER="OTHER";
+    public static final String VF_MODULES_METADATA="VF_MODULES_METADATA";
+    
+    
+    private static final String[] SUPPORTED_ARTIFACT_TYPES = {HEAT,
+               HEAT_ARTIFACT,
+               HEAT_ENV,
+               HEAT_NESTED,
+               HEAT_NET,
+               HEAT_VOL,
+               OTHER,
+               VF_MODULES_METADATA};   
+    
+    public static final List<String>  SUPPORTED_ARTIFACT_TYPES_LIST =  Collections.unmodifiableList(Arrays.asList(SUPPORTED_ARTIFACT_TYPES));   
+    
+    /**
+     * Default constructor, the mso.properties is searched in the classpath (for testing)
+     * Or in /etc/ecomp/mso/config/mso.properties
+     *
+     * @param controllerName The controllerName of the config JSON tree
+     * @throws ASDCParametersException in case of issues with the parameters
+     * @throws IOException If the key file has not been loaded properly
+     */
+    public ASDCConfiguration (String controllerName) throws ASDCParametersException, IOException {
+       
+        Properties keyProp = new Properties ();
+        this.asdcControllerName = controllerName;
+
+        keyProp.load (Thread.currentThread ().getContextClassLoader ().getResourceAsStream ("config-key.properties"));
+        configKey = (String) keyProp.get ("asdc.config.key");
+
+        // This structure contains static values initialized by servlet initializer
+        this.msoPropertiesFactory = new MsoPropertiesFactory ();
+
+        refreshASDCConfig ();
+
+    }
+
+    public String getAsdcControllerName () {
+        return asdcControllerName;
+    }
+
+    private JsonNode getASDCControllerConfigJsonNode () {
+        if (this.msoProperties.getJsonRootNode ().get (PARAMETER_PATTERN) != null) {
+            return this.msoProperties.getJsonRootNode ().get (PARAMETER_PATTERN).get (this.asdcControllerName);
+        } else {
+            return null;
+        }
+
+    }
+
+    /**
+     * This method reload the config if needed.
+     *
+     * @return true if config has been reloaded, false otherwise
+     * @throws ASDCParametersException In case the parameters validation fails
+     * @throws MsoPropertiesException
+     */
+    public boolean refreshASDCConfig () throws ASDCParametersException {
+
+        try {
+            if (msoPropertiesFactory.propertiesHaveChanged (MSO_PROP_ASDC, msoProperties)) {
+                msoProperties = msoPropertiesFactory.getMsoJsonProperties (MSO_PROP_ASDC);
+
+                this.testAllParameters ();
+                return true;
+            } else {
+                return false;
+            }
+        } catch (MsoPropertiesException e) {
+            throw new ASDCParametersException ("mso.asdc.json not initialized properly, ASDC config cannot be reloaded",
+                                               e);
+        }
+    }
+
+    /**
+     * This method is useful to check whether a mso properties config has been changed.
+     *
+     * @return true is a new config is availabe, false otherwise
+     * @throws ASDCParametersException
+     * @throws MsoPropertiesException
+     */
+    public boolean hasASDCConfigChanged () throws ASDCParametersException {
+        try {
+            return msoPropertiesFactory.propertiesHaveChanged (MSO_PROP_ASDC, msoProperties);
+        } catch (MsoPropertiesException e) {
+            throw new ASDCParametersException ("mso.asdc.json not initialized properly, ASDC config cannot be read", e);
+        }
+    }
+
+    @Override
+    public String getConsumerGroup () {
+        JsonNode masterConfigNode = getASDCControllerConfigJsonNode ();
+        if (masterConfigNode != null && masterConfigNode.get (CONSUMER_GROUP_ATTRIBUTE_NAME) != null) {
+            String config = masterConfigNode.get (CONSUMER_GROUP_ATTRIBUTE_NAME).asText ();
+
+            if ("NULL".equals (config) || config.isEmpty ()) {
+                return null;
+            } else {
+                return config;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public String getConsumerID () {
+
+        JsonNode masterConfigNode = getASDCControllerConfigJsonNode ();
+        if (masterConfigNode != null && masterConfigNode.get (CONSUMER_ID_ATTRIBUTE_NAME) != null) {
+            String config = masterConfigNode.get (CONSUMER_ID_ATTRIBUTE_NAME).asText ();
+
+            if (config.isEmpty ()) {
+                return null;
+            } else {
+                return config;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public String getEnvironmentName () {
+        JsonNode masterConfigNode = getASDCControllerConfigJsonNode ();
+        if (masterConfigNode != null && masterConfigNode.get (ENVIRONMENT_NAME_ATTRIBUTE_NAME) != null) {
+            String config = masterConfigNode.get (ENVIRONMENT_NAME_ATTRIBUTE_NAME).asText ();
+
+            if (config.isEmpty ()) {
+                return null;
+            } else {
+                return config;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public String getPassword () {
+        JsonNode masterConfigNode = getASDCControllerConfigJsonNode ();
+        if (masterConfigNode != null && masterConfigNode.get (PASSWORD_ATTRIBUTE_NAME) != null) {
+            String config = this.msoProperties.getEncryptedProperty (masterConfigNode.get (PASSWORD_ATTRIBUTE_NAME),
+                                                                     null,
+                                                                     this.configKey);
+
+            if (config.isEmpty ()) {
+                return null;
+            } else {
+                return config;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public int getPollingInterval () {
+        JsonNode masterConfigNode = getASDCControllerConfigJsonNode ();
+        if (masterConfigNode != null && masterConfigNode.get (POLLING_INTERVAL_ATTRIBUTE_NAME) != null) {
+            return masterConfigNode.get (POLLING_INTERVAL_ATTRIBUTE_NAME).asInt ();
+        } else {
+            return 0;
+        }
+    }
+
+    @Override
+    public List <String> getRelevantArtifactTypes () {
+       // DO not return the Static List SUPPORTED_ARTIFACT_TYPES_LIST because the ASDC Client will try to modify it !!!
+       return Arrays.asList(SUPPORTED_ARTIFACT_TYPES);
+    }
+
+    @Override
+    public String getUser () {
+        JsonNode masterConfigNode = getASDCControllerConfigJsonNode ();
+        if (masterConfigNode != null && masterConfigNode.get (USER_ATTRIBUTE_NAME) != null) {
+            String config = masterConfigNode.get (USER_ATTRIBUTE_NAME).asText ();
+
+            if (config.isEmpty ()) {
+                return null;
+            } else {
+                return config;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public String getAsdcAddress () {
+        JsonNode masterConfigNode = getASDCControllerConfigJsonNode ();
+        if (masterConfigNode != null && masterConfigNode.get (ASDC_ADDRESS_ATTRIBUTE_NAME) != null) {
+            String config = masterConfigNode.get (ASDC_ADDRESS_ATTRIBUTE_NAME).asText ();
+
+            if (config.isEmpty ()) {
+                return null;
+            } else {
+                return config;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public int getPollingTimeout () {
+        JsonNode masterConfigNode = getASDCControllerConfigJsonNode ();
+        if (masterConfigNode != null && masterConfigNode.get (POLLING_TIMEOUT_ATTRIBUTE_NAME) != null) {
+            return masterConfigNode.get (POLLING_TIMEOUT_ATTRIBUTE_NAME).asInt ();
+        } else {
+            return 0;
+        }
+    }
+    
+       @Override
+       public boolean activateServerTLSAuth() {
+               JsonNode masterConfigNode = getASDCControllerConfigJsonNode();
+               if (masterConfigNode != null && masterConfigNode.get(ACTIVATE_SERVER_TLS_AUTH) != null) {
+                       return masterConfigNode.get(ACTIVATE_SERVER_TLS_AUTH).asBoolean(false);
+               } else {
+                       return false;
+               }
+       }
+
+       @Override
+       public String getKeyStorePassword() {
+               JsonNode masterConfigNode = getASDCControllerConfigJsonNode();
+               if (masterConfigNode != null && masterConfigNode.get(KEY_STORE_PASSWORD) != null) {
+                       String config = this.msoProperties.getEncryptedProperty(masterConfigNode.get(KEY_STORE_PASSWORD), null,
+                                       this.configKey);
+
+                       if (config.isEmpty()) {
+                               return null;
+                       } else {
+                               return config;
+                       }
+               } else {
+                       return null;
+               }
+       }
+
+       @Override
+       public String getKeyStorePath() {
+               JsonNode masterConfigNode = getASDCControllerConfigJsonNode();
+               if (masterConfigNode != null && masterConfigNode.get(KEY_STORE_PATH) != null) {
+                       String config = masterConfigNode.get(KEY_STORE_PATH).asText();
+
+                       if (config.isEmpty()) {
+                               return null;
+                       } else {
+                               return config;
+                       }
+               } else {
+                       return null;
+               }
+       }
+
+    public void testAllParameters () throws ASDCParametersException {
+
+        // Special case for this attribute that can be null from getConsumerGroup
+        if (this.getConsumerGroup () == null
+            && (getASDCControllerConfigJsonNode () == null
+                || !"NULL".equals (getASDCControllerConfigJsonNode ().get (CONSUMER_GROUP_ATTRIBUTE_NAME).asText ()))) {
+            throw new ASDCParametersException (CONSUMER_GROUP_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+
+        if (this.getConsumerID () == null || this.getConsumerID ().isEmpty ()) {
+            throw new ASDCParametersException (CONSUMER_ID_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+
+        if (this.getEnvironmentName () == null || this.getEnvironmentName ().isEmpty ()) {
+            throw new ASDCParametersException (ENVIRONMENT_NAME_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+
+        if (this.getAsdcAddress () == null || this.getAsdcAddress ().isEmpty ()) {
+            throw new ASDCParametersException (ASDC_ADDRESS_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+
+        if (this.getPassword () == null || this.getPassword ().isEmpty ()) {
+            throw new ASDCParametersException (PASSWORD_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+
+        if (this.getPollingInterval () == 0) {
+            throw new ASDCParametersException (POLLING_INTERVAL_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+
+        if (this.getPollingTimeout () == 0) {
+            throw new ASDCParametersException (POLLING_TIMEOUT_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+
+        if (this.getRelevantArtifactTypes () == null || this.getRelevantArtifactTypes ().isEmpty ()) {
+            throw new ASDCParametersException (RELEVANT_ARTIFACT_TYPES_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+
+        if (this.getUser () == null || this.getUser ().isEmpty ()) {
+            throw new ASDCParametersException (USER_ATTRIBUTE_NAME
+                                               + " parameter cannot be found in config mso.properties");
+        }
+    }
+
+    /**
+     * This method triggers the MsoPropertiesFactory to get the ASDC config from the cache and extracts all controllers
+     * defined.
+     *
+     * @return A list of controller Names defined in the cache config
+     * @throws ASDCParametersException In cas of issues with the cache
+     */
+    public static List <String> getAllDefinedControllers () throws ASDCParametersException {
+
+        MsoJsonProperties msoProp;
+        try {
+            List <String> result = new ArrayList <String> ();
+            msoProp = new MsoPropertiesFactory ().getMsoJsonProperties (MSO_PROP_ASDC);
+
+            if (msoProp.getJsonRootNode ().get (PARAMETER_PATTERN) != null) {
+                Iterator <Entry <String, JsonNode>> it = msoProp.getJsonRootNode ()
+                                                                .get (PARAMETER_PATTERN)
+                                                                .getFields ();
+
+                Entry <String, JsonNode> entry;
+                while (it.hasNext ()) {
+                    entry = it.next ();
+                    result.add (entry.getKey ());
+
+                }
+            }
+            return result;
+        } catch (MsoPropertiesException e) {
+            throw new ASDCParametersException ("Unable to get the JSON Properties in cache:" + MSO_PROP_ASDC, e);
+        }
+
+    }
+
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCController.java
new file mode 100644 (file)
index 0000000..b553100
--- /dev/null
@@ -0,0 +1,570 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client;
+
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import org.openecomp.sdc.api.IDistributionClient;
+import org.openecomp.sdc.api.consumer.IDistributionStatusMessage;
+import org.openecomp.sdc.api.consumer.INotificationCallback;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
+import org.openecomp.sdc.api.results.IDistributionClientResult;
+import org.openecomp.sdc.impl.DistributionClientFactory;
+import org.openecomp.sdc.utils.DistributionActionResultEnum;
+import org.openecomp.sdc.utils.DistributionStatusEnum;
+import org.openecomp.mso.asdc.client.exceptions.ASDCControllerException;
+import org.openecomp.mso.asdc.client.exceptions.ASDCDownloadException;
+import org.openecomp.mso.asdc.client.exceptions.ASDCParametersException;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+import org.openecomp.mso.asdc.installer.IVfResourceInstaller;
+import org.openecomp.mso.asdc.installer.VfResourceStructure;
+import org.openecomp.mso.asdc.installer.heat.VfResourceInstaller;
+import org.openecomp.mso.asdc.util.ASDCNotificationLogging;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.utils.UUIDChecker;
+
+public class ASDCController {
+
+    protected static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.ASDC);
+
+    protected static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+
+    protected boolean isAsdcClientAutoManaged = false;
+
+    protected String controllerName;
+
+    /**
+     * Inner class for Notification callback
+     *
+     *
+     */
+    private final class ASDCNotificationCallBack implements INotificationCallback {
+
+        private ASDCController asdcController;
+
+        ASDCNotificationCallBack (ASDCController controller) {
+            asdcController = controller;
+        }
+
+        /**
+         * This method can be called multiple times at the same moment.
+         * The controller must be thread safe !
+         */
+        @Override
+        public void activateCallback (INotificationData iNotif) {
+            long startTime = System.currentTimeMillis ();
+            UUIDChecker.generateUUID (LOGGER);
+            MsoLogger.setServiceName ("NotificationHandler");
+            MsoLogger.setLogContext (iNotif.getDistributionID (), iNotif.getServiceUUID ());
+            String event = "Receive a callback notification in ASDC, nb of resources: " + iNotif.getResources ().size ();
+            LOGGER.debug(event);
+            asdcController.treatNotification (iNotif);
+            LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Completed the treatment of the notification");
+        }
+    }
+
+    // ***** Controller STATUS code
+
+    protected int nbOfNotificationsOngoing = 0;
+
+    public int getNbOfNotificationsOngoing () {
+        return nbOfNotificationsOngoing;
+    }
+
+    private ASDCControllerStatus controllerStatus = ASDCControllerStatus.STOPPED;
+
+    protected synchronized final void changeControllerStatus (ASDCControllerStatus newControllerStatus) {
+        switch (newControllerStatus) {
+
+            case BUSY:
+                ++this.nbOfNotificationsOngoing;
+                this.controllerStatus = newControllerStatus;
+                break;
+
+            case IDLE:
+                if (this.nbOfNotificationsOngoing > 1) {
+                    --this.nbOfNotificationsOngoing;
+                } else {
+                    this.nbOfNotificationsOngoing = 0;
+                    this.controllerStatus = newControllerStatus;
+                }
+
+                break;
+            default:
+                this.controllerStatus = newControllerStatus;
+                break;
+
+        }
+    }
+
+    public synchronized final ASDCControllerStatus getControllerStatus () {
+        return this.controllerStatus;
+    }
+
+    // ***** END of Controller STATUS code
+
+    protected ASDCConfiguration asdcConfig;
+    private IDistributionClient distributionClient;
+    private IVfResourceInstaller resourceInstaller;
+
+    public ASDCController (String controllerConfigName) {
+        isAsdcClientAutoManaged = true;
+        this.controllerName = controllerConfigName;
+        this.resourceInstaller = new VfResourceInstaller();
+    }
+
+    public ASDCController (String controllerConfigName, IDistributionClient asdcClient, IVfResourceInstaller resourceinstaller) {
+
+        distributionClient = asdcClient;
+        this.resourceInstaller = resourceinstaller;
+        this.controllerName = controllerConfigName;
+    }
+
+    public ASDCController (String controllerConfigName,IDistributionClient asdcClient) {
+        distributionClient = asdcClient;
+        this.controllerName = controllerConfigName;
+        this.resourceInstaller = new VfResourceInstaller();
+    }
+
+    /**
+     * This method refresh the ASDC Controller config and restart the client.
+     *
+     * @return true if config has been reloaded, false otherwise
+     * @throws ASDCControllerException If case of issue with the init or close called during the config reload
+     * @throws ASDCParametersException If there is an issue with the parameters
+     * @throws IOException In case of the key file could not be loaded properly
+     */
+    public boolean updateConfigIfNeeded () throws ASDCParametersException, ASDCControllerException, IOException {
+        LOGGER.debug ("Checking whether ASDC config must be reloaded");
+
+        try {
+            if (this.asdcConfig != null && this.asdcConfig.hasASDCConfigChanged ()) {
+                LOGGER.debug ("ASDC Config must be reloaded");
+                this.closeASDC ();
+                this.asdcConfig.refreshASDCConfig ();
+                this.initASDC ();
+                return true;
+            } else {
+                LOGGER.debug ("ASDC Config must NOT be reloaded");
+                return false;
+            }
+        } catch (ASDCParametersException ep) {
+            // Try to close it at least to make it consistent with the file specified
+            // We cannot let it run with a different config file, even if it's bad.
+            // This call could potentially throw a ASDCController exception if the controller is currently BUSY.
+            this.closeASDC ();
+
+            throw ep;
+        }
+    }
+
+    /**
+     * This method initializes the ASDC Controller and the ASDC Client.
+     *
+     * @throws ASDCControllerException It throws an exception if the ASDC Client cannot be instantiated or if an init
+     *         attempt is done when already initialized
+     * @throws ASDCParametersException If there is an issue with the parameters provided
+     * @throws IOException In case of issues when trying to load the key file
+     */
+    public void initASDC () throws ASDCControllerException, ASDCParametersException, IOException {
+        String event = "Initialize the ASDC Controller";
+        MsoLogger.setServiceName ("InitASDC");
+        LOGGER.debug (event);
+        if (this.getControllerStatus () != ASDCControllerStatus.STOPPED) {
+            String endEvent = "The controller is already initialized, call the closeASDC method first";
+            throw new ASDCControllerException (endEvent);
+        }
+
+        if (asdcConfig == null) {
+            asdcConfig = new ASDCConfiguration (this.controllerName);
+
+        }
+        // attempt to refresh during init as MsoProperties is may be pointing to an old file
+        // Be careful this is static in MsoProperties
+        asdcConfig.refreshASDCConfig ();
+
+        if (this.distributionClient == null) {
+            distributionClient = DistributionClientFactory.createDistributionClient ();
+        }
+        long initStartTime = System.currentTimeMillis ();
+        IDistributionClientResult result = this.distributionClient.init (asdcConfig,
+                                                                         new ASDCNotificationCallBack (this));
+        if (!result.getDistributionActionResult ().equals (DistributionActionResultEnum.SUCCESS)) {
+            String endEvent = "ASDC distribution client init failed with reason:"
+                              + result.getDistributionMessageResult ();
+            LOGGER.recordMetricEvent (initStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.UnknownError, "Initialization of the ASDC Controller failed with reason:" + result.getDistributionMessageResult (), "ASDC", "init", null);
+            LOGGER.debug (endEvent);
+            asdcConfig = null;
+
+            this.changeControllerStatus (ASDCControllerStatus.STOPPED);
+            throw new ASDCControllerException ("Initialization of the ASDC Controller failed with reason: "
+                                               + result.getDistributionMessageResult ());
+        }
+        LOGGER.recordMetricEvent (initStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully initialize ASDC Controller", "ASDC", "init", null);
+
+        long clientstartStartTime = System.currentTimeMillis ();
+        result = this.distributionClient.start ();
+        if (!result.getDistributionActionResult ().equals (DistributionActionResultEnum.SUCCESS)) {
+            String endEvent = "ASDC distribution client start failed with reason:"
+                              + result.getDistributionMessageResult ();
+            LOGGER.recordMetricEvent (clientstartStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.UnknownError, endEvent, "ASDC", "start", null);
+            LOGGER.debug (endEvent);
+            asdcConfig = null;
+            this.changeControllerStatus (ASDCControllerStatus.STOPPED);
+            throw new ASDCControllerException ("Startup of the ASDC Controller failed with reason: "
+                                               + result.getDistributionMessageResult ());
+        }
+        LOGGER.recordMetricEvent (clientstartStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully start ASDC distribution client", "ASDC", "start", null);
+
+
+        this.changeControllerStatus (ASDCControllerStatus.IDLE);
+        LOGGER.info (MessageEnum.ASDC_INIT_ASDC_CLIENT_SUC, "ASDC", "changeControllerStatus");
+    }
+
+    /**
+     * This method closes the ASDC Controller and the ASDC Client.
+     *
+     * @throws ASDCControllerException It throws an exception if the ASDC Client cannot be closed because
+     *         it's currently BUSY in processing notifications.
+     */
+    public void closeASDC () throws ASDCControllerException {
+
+        MsoLogger.setServiceName ("CloseController");
+        if (this.getControllerStatus () == ASDCControllerStatus.BUSY) {
+            throw new ASDCControllerException ("Cannot close the ASDC controller as it's currently in BUSY state");
+        }
+        if (this.distributionClient != null) {
+            this.distributionClient.stop ();
+            // If auto managed we can set it to Null, ASDCController controls it.
+            // In the other case the client of this class has specified it, so we can't reset it
+            if (isAsdcClientAutoManaged) {
+                // Next init will initialize it with a new ASDC Client
+                this.distributionClient = null;
+            }
+
+        }
+        this.changeControllerStatus (ASDCControllerStatus.STOPPED);
+    }
+
+    private boolean checkResourceAlreadyDeployed (VfResourceStructure vfResource) throws ArtifactInstallerException {
+
+       if (this.resourceInstaller.isResourceAlreadyDeployed (vfResource)) {
+            LOGGER.info (MessageEnum.ASDC_ARTIFACT_ALREADY_EXIST,
+                               vfResource.getResourceInstance().getResourceInstanceName(),
+                               vfResource.getResourceInstance().getResourceUUID(),
+                               vfResource.getResourceInstance().getResourceName(), "", "");
+            
+            this.sendDeployNotificationsForResource(vfResource,DistributionStatusEnum.ALREADY_DOWNLOADED,null);
+            this.sendDeployNotificationsForResource(vfResource,DistributionStatusEnum.ALREADY_DEPLOYED,null);
+           
+            return true;
+        } else {
+            return false;
+        }
+
+    }
+
+    private final static String UUID_PARAM = "(UUID:";
+    
+    private IDistributionClientDownloadResult downloadTheArtifact (IArtifactInfo artifact,
+                                                                   String distributionId) throws ASDCDownloadException {
+
+        LOGGER.debug ("Trying to download the artifact : " + artifact.getArtifactURL ()
+                      + UUID_PARAM
+                      + artifact.getArtifactUUID ()
+                      + ")");
+        IDistributionClientDownloadResult downloadResult;
+
+       
+        try {
+            downloadResult = distributionClient.download (artifact);
+            if (null == downloadResult) {
+               LOGGER.info (MessageEnum.ASDC_ARTIFACT_NULL, artifact.getArtifactUUID (), "", "");
+               return downloadResult;
+            }
+        } catch (RuntimeException e) {
+            LOGGER.debug ("Not able to download the artifact due to an exception: " + artifact.getArtifactURL ());
+            this.sendASDCNotification (NotificationType.DOWNLOAD,
+                                       artifact.getArtifactURL (),
+                                       asdcConfig.getConsumerID (),
+                                       distributionId,
+                                       DistributionStatusEnum.DOWNLOAD_ERROR,
+                                       e.getMessage (),
+                                       System.currentTimeMillis ());
+
+            throw new ASDCDownloadException ("Exception caught when downloading the artifact", e);
+        }
+
+        if (DistributionActionResultEnum.SUCCESS.equals(downloadResult.getDistributionActionResult ())) {
+
+            LOGGER.info (MessageEnum.ASDC_ARTIFACT_DOWNLOAD_SUC,
+                         artifact.getArtifactURL (),
+                         artifact.getArtifactUUID (),
+                         String.valueOf (downloadResult.getArtifactPayload ().length), "", "");
+
+        } else {
+
+            LOGGER.error (MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL,
+                          artifact.getArtifactName (),
+                          artifact.getArtifactURL (),
+                          artifact.getArtifactUUID (),
+                          downloadResult.getDistributionMessageResult (), "", "", MsoLogger.ErrorCode.DataError, "ASDC artifact download fail");
+
+            this.sendASDCNotification (NotificationType.DOWNLOAD,
+                                       artifact.getArtifactURL (),
+                                       asdcConfig.getConsumerID (),
+                                       distributionId,
+                                       DistributionStatusEnum.DOWNLOAD_ERROR,
+                                       downloadResult.getDistributionMessageResult (),
+                                       System.currentTimeMillis ());
+
+            throw new ASDCDownloadException ("Artifact " + artifact.getArtifactName ()
+                                             + " could not be downloaded from ASDC URL "
+                                             + artifact.getArtifactURL ()
+                                             + UUID_PARAM
+                                             + artifact.getArtifactUUID ()
+                                             + ")"
+                                             + System.lineSeparator ()
+                                             + "Error message is "
+                                             + downloadResult.getDistributionMessageResult ()
+                                             + System.lineSeparator ());
+
+        }
+
+        this.sendASDCNotification (NotificationType.DOWNLOAD,
+                                   artifact.getArtifactURL (),
+                                   asdcConfig.getConsumerID (),
+                                   distributionId,
+                                   DistributionStatusEnum.DOWNLOAD_OK,
+                                   null,
+                                   System.currentTimeMillis ());
+        return downloadResult;
+
+    }
+
+   
+    private void sendDeployNotificationsForResource(VfResourceStructure vfResourceStructure,DistributionStatusEnum distribStatus, String errorReason) {
+    
+       for (IArtifactInfo artifactInfo : vfResourceStructure.getResourceInstance().getArtifacts()) {
+       
+               if (DistributionStatusEnum.DEPLOY_OK.equals(distribStatus) 
+                               // This could be NULL if the artifact is a VF module artifact, this won't be present in the MAP
+                               && vfResourceStructure.getArtifactsMapByUUID().get(artifactInfo.getArtifactUUID()) != null 
+                               && vfResourceStructure.getArtifactsMapByUUID().get(artifactInfo.getArtifactUUID()).getDeployedInDb() == 0) {
+                       this.sendASDCNotification (NotificationType.DEPLOY,
+                                       artifactInfo.getArtifactURL (),
+                         asdcConfig.getConsumerID (),
+                         vfResourceStructure.getNotification().getDistributionID(),
+                         DistributionStatusEnum.DEPLOY_ERROR,
+                         "The artifact has not been used by the modules defined in the resource",
+                         System.currentTimeMillis ());
+               } else {
+                       this.sendASDCNotification (NotificationType.DEPLOY,
+                                       artifactInfo.getArtifactURL (),
+                         asdcConfig.getConsumerID (),
+                         vfResourceStructure.getNotification().getDistributionID(),
+                         distribStatus,
+                         errorReason,
+                         System.currentTimeMillis ());
+               }
+       }
+    }
+    
+    private void deployResourceStructure (VfResourceStructure vfResourceStructure) throws ArtifactInstallerException {
+
+       LOGGER.info (MessageEnum.ASDC_START_DEPLOY_ARTIFACT, vfResourceStructure.getResourceInstance().getResourceInstanceName(), vfResourceStructure.getResourceInstance().getResourceUUID(), "ASDC", "deployResourceStructure");
+        try {
+               vfResourceStructure.createVfModuleStructures();
+               resourceInstaller.installTheResource (vfResourceStructure);
+               
+        } catch (ArtifactInstallerException e) {
+               
+               sendDeployNotificationsForResource(vfResourceStructure,DistributionStatusEnum.DEPLOY_ERROR,e.getMessage());
+               throw e;
+        }
+
+        if (vfResourceStructure.isDeployedSuccessfully()) {
+               LOGGER.info (MessageEnum.ASDC_ARTIFACT_DEPLOY_SUC,
+                               vfResourceStructure.getResourceInstance().getResourceName(),
+                               vfResourceStructure.getResourceInstance().getResourceUUID(),
+                       String.valueOf (vfResourceStructure.getVfModuleStructure().size()), "ASDC", "deployResourceStructure");
+               sendDeployNotificationsForResource(vfResourceStructure,DistributionStatusEnum.DEPLOY_OK ,null);
+        }
+
+    }
+
+    private enum NotificationType {
+       DOWNLOAD, DEPLOY
+    }
+
+    private void sendASDCNotification (NotificationType notificationType,
+                                       String artifactURL,
+                                       String consumerID,
+                                       String distributionID,
+                                       DistributionStatusEnum status,
+                                       String errorReason,
+                                       long timestamp) {
+       
+        String event = "Sending " + notificationType.name ()
+                       + "("
+                       + status.name ()
+                       + ")"
+                       + " notification to ASDC for artifact:"
+                       + artifactURL;
+        
+        if (errorReason != null) {
+               event=event+"("+errorReason+")";
+        }
+        LOGGER.info (MessageEnum.ASDC_SEND_NOTIF_ASDC, notificationType.name (), status.name (), artifactURL, "ASDC", "sendASDCNotification");
+        LOGGER.debug (event);
+
+        long subStarttime = System.currentTimeMillis ();
+        String action = "";
+        try {
+            IDistributionStatusMessage message = new DistributionStatusMessage (artifactURL,
+                                                                                consumerID,
+                                                                                distributionID,
+                                                                                status,
+                                                                                timestamp);
+
+            switch (notificationType) {
+                case DOWNLOAD:
+                    if (errorReason != null) {
+                        this.distributionClient.sendDownloadStatus (message, errorReason);
+                    } else {
+                        this.distributionClient.sendDownloadStatus (message);
+                    }
+                    action = "sendDownloadStatus";
+                    break;
+                case DEPLOY:
+                    if (errorReason != null) {
+                        this.distributionClient.sendDeploymentStatus (message, errorReason);
+                    } else {
+                        this.distributionClient.sendDeploymentStatus (message);
+                    }
+                    action = "sendDeploymentdStatus";
+                    break;
+                default:
+                       break;
+            }
+        } catch (RuntimeException e) {
+            // TODO: May be a list containing the unsent notification should be
+            // kept
+            LOGGER.warn (MessageEnum.ASDC_SEND_NOTIF_ASDC_EXEC, "ASDC", "sendASDCNotification", MsoLogger.ErrorCode.SchemaError, "RuntimeException - sendASDCNotification", e);
+        }
+        LOGGER.recordMetricEvent (subStarttime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully sent notification to ASDC", "ASDC", action, null);
+    }
+
+    public void treatNotification (INotificationData iNotif) {
+       
+       int noOfArtifacts = 0;
+       for (IResourceInstance resource : iNotif.getResources ()) {
+               noOfArtifacts += resource.getArtifacts ().size ();
+       }
+        LOGGER.info (MessageEnum.ASDC_RECEIVE_CALLBACK_NOTIF,
+                     String.valueOf (noOfArtifacts),
+                     iNotif.getServiceUUID (), "ASDC", "treatNotification");
+        
+        try {
+               LOGGER.debug(ASDCNotificationLogging.dumpASDCNotification(iNotif));
+                       LOGGER.info(MessageEnum.ASDC_RECEIVE_SERVICE_NOTIF, iNotif.getServiceUUID(), "ASDC", "treatNotification");
+                       this.changeControllerStatus(ASDCControllerStatus.BUSY);
+                       // Process only the Resource artifacts in MSO
+                       for (IResourceInstance resource : iNotif.getResources()) {
+
+                               // We process only VNF resource on MSO Side
+                               if ("VF".equals(resource.getResourceType())) {
+                                       this.processResourceNotification(iNotif,resource);              
+                               }
+                       }
+                                       
+                                       
+                               
+        } catch (RuntimeException e) {
+            LOGGER.error (MessageEnum.ASDC_GENERAL_EXCEPTION_ARG,
+                          "Unexpected exception caught during the notification processing", "ASDC", "treatNotification", MsoLogger.ErrorCode.SchemaError, "RuntimeException in treatNotification",
+                          e);
+        } finally {
+            this.changeControllerStatus (ASDCControllerStatus.IDLE);
+        }
+    }
+
+        
+    private void processResourceNotification (INotificationData iNotif,IResourceInstance resource) {
+               // For each artifact, create a structure describing the VFModule in a ordered flat level
+               VfResourceStructure vfResourceStructure = new VfResourceStructure(iNotif,resource);
+               try {
+                       
+                       if (!this.checkResourceAlreadyDeployed(vfResourceStructure)) {
+                               for (IArtifactInfo artifact : resource.getArtifacts()) {
+                                       
+                                               IDistributionClientDownloadResult resultArtifact = this.downloadTheArtifact(artifact, 
+                                                               iNotif.getDistributionID());
+
+                                               if (resultArtifact != null) {
+                                                       if (ASDCConfiguration.VF_MODULES_METADATA.equals(artifact.getArtifactType())) {
+                                                               LOGGER.debug("VF_MODULE_ARTIFACT: "+new String(resultArtifact.getArtifactPayload(),"UTF-8"));
+                                                               LOGGER.debug(ASDCNotificationLogging.dumpVfModuleMetaDataList(distributionClient.decodeVfModuleArtifact(resultArtifact.getArtifactPayload())));
+                                                       }
+                                                       vfResourceStructure.addArtifactToStructure(distributionClient,artifact, resultArtifact);
+                               
+                                               } 
+
+                               }
+                               
+                               this.deployResourceStructure(vfResourceStructure);
+                               
+                       } 
+               } catch (ArtifactInstallerException | ASDCDownloadException | UnsupportedEncodingException e) {
+                       LOGGER.error(MessageEnum.ASDC_GENERAL_EXCEPTION_ARG,
+                                       "Exception caught during Installation of artifact", "ASDC", "processResourceNotification", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in processResourceNotification", e);
+               }
+    }
+    
+    private static final String UNKNOWN="Unknown";
+    
+    /**
+     * @return the address of the ASDC we are connected to.
+     */
+    public String getAddress () {
+        if (asdcConfig != null) {
+            return asdcConfig.getAsdcAddress ();
+        }
+        return UNKNOWN;
+    }
+
+    /**
+     * @return the environment name of the ASDC we are connected to.
+     */
+    public String getEnvironment () {
+        if (asdcConfig != null) {
+            return asdcConfig.getEnvironmentName ();
+        }
+        return UNKNOWN;
+    }
+
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCControllerStatus.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCControllerStatus.java
new file mode 100644 (file)
index 0000000..53de5fc
--- /dev/null
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client;
+
+
+
+public enum ASDCControllerStatus {
+                                  STOPPED, IDLE, BUSY
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCGlobalController.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCGlobalController.java
new file mode 100644 (file)
index 0000000..4e10953
--- /dev/null
@@ -0,0 +1,217 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client;
+
+
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.mso.asdc.client.exceptions.ASDCControllerException;
+import org.openecomp.mso.asdc.client.exceptions.ASDCParametersException;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJsonProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+
+
+public class ASDCGlobalController {
+
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.ASDC);
+    private Map <String,ASDCController> controllers = new HashMap <String,ASDCController> ();
+        
+    private MsoJsonProperties msoProp= null;
+    
+    private void loadControllers () throws ASDCParametersException {
+       
+               List<String> controllerNames = ASDCConfiguration.getAllDefinedControllers();
+
+               StringBuffer controllerListLog = new StringBuffer("List of controllers loaded:");
+               for (String controllerName : controllerNames) {
+                       controllers.put(controllerName, new ASDCController(controllerName));
+                       controllerListLog.append(controllerName);
+                       controllerListLog.append(";");
+               }
+               LOGGER.debug(controllerListLog.toString());
+    }
+    
+    private boolean sameControllersDefined() throws ASDCParametersException {
+       List<String> controllerNames = ASDCConfiguration.getAllDefinedControllers();
+       if (controllerNames.size() == controllers.size()) {
+               boolean areIdentical = true;
+               
+               for (String name:controllerNames) {
+                       if (!controllers.containsKey(name)) {
+                               areIdentical = false;
+                               break;
+                       }
+               }
+               return areIdentical;
+               
+       } else {
+               return false;
+       }
+    }
+    
+    /**
+     * Check that controllers list needs to be updated or not.
+     * @param return true if the list has been updated
+     */
+    private boolean updateControllersListIfNeeded ()  {
+       boolean updateNeeded=false;
+       try {
+       
+                       MsoPropertiesFactory msoPropFactory = new MsoPropertiesFactory();
+                       MsoJsonProperties newMsoProp;
+       
+                       newMsoProp = msoPropFactory.getMsoJsonProperties(ASDCConfiguration.MSO_PROP_ASDC);
+       
+                       if (msoPropFactory.propertiesHaveChanged(ASDCConfiguration.MSO_PROP_ASDC, msoProp) && !sameControllersDefined()) {
+                               updateNeeded = true;
+                               LOGGER.debug("List of ASDC controllers has been changed, trying to kill them");
+                               this.closeASDC();
+                               
+                               // Wait that all controllers are down before restarting, next pass will kill them all
+                               if (this.controllers.size() == 0) {
+                                       msoProp = newMsoProp;
+                                       this.loadControllers();
+                               }
+                       }                       
+               
+       } catch (ASDCParametersException e) {
+                        LOGGER.warn (MessageEnum.ASDC_LOAD_ASDC_CLIENT_EXC,
+                     "All ASDC Hosts",
+                     "All ASDC Envs", "ASDC", "", MsoLogger.ErrorCode.BusinessProcesssError, "ASDCParametersException in updateControllersListIfNeeded",
+                     e);
+               } catch (MsoPropertiesException e) {
+                        LOGGER.warn (MessageEnum.ASDC_LOAD_ASDC_CLIENT_EXC,
+                    "All ASDC Hosts",
+                    "All ASDC Envs", "ASDC", "", MsoLogger.ErrorCode.BusinessProcesssError, "MsoPropertiesException in updateControllersListIfNeeded",
+                    e);
+               }
+       return updateNeeded;
+               
+
+    }
+    
+    /**
+     * Checks for each controller if it is STOPPED and restart if it is the case.
+     */
+    public void checkInStoppedState () {
+
+        for (ASDCController controller : controllers.values()) {
+            if (ASDCControllerStatus.STOPPED.equals (controller.getControllerStatus ())) {
+
+                // Try to restart just in case of issues
+                try {
+                    controller.initASDC ();
+                } catch (ASDCControllerException ec) {
+                    LOGGER.warn (MessageEnum.ASDC_INIT_ASDC_CLIENT_EXC,
+                                 controller.getAddress (),
+                                 controller.getEnvironment (), "ASDC", "", MsoLogger.ErrorCode.BusinessProcesssError, "ASDCControllerException in checkInStoppedState",
+                                 ec);
+                } catch (ASDCParametersException ep) {
+                    LOGGER.warn (MessageEnum.ASDC_LOAD_ASDC_CLIENT_EXC,
+                                 controller.getAddress (),
+                                 controller.getEnvironment (), "ASDC", "", MsoLogger.ErrorCode.BusinessProcesssError, "ASDCParametersException in checkInStoppedState",
+                                 ep);
+                } catch (RuntimeException | IOException e) {
+                    LOGGER.error (MessageEnum.ASDC_SINGLETON_CHECKT_EXC,
+                                  controller.getAddress (),
+                                  controller.getEnvironment (), "ASDC", "", MsoLogger.ErrorCode.BusinessProcesssError, "RuntimeException in checkInStoppedState",
+                                  e);
+                }
+            }
+        }
+    }
+
+    public void closeASDC () {
+       List<String> controllerToRemove = new LinkedList<String>();
+       
+        for (ASDCController controller : controllers.values()) {
+            try {
+                controller.closeASDC ();
+                controllerToRemove.add(controller.controllerName);
+                
+            } catch (RuntimeException e) {
+                LOGGER.warn (MessageEnum.ASDC_SHUTDOWN_ASDC_CLIENT_EXC,
+                             "RuntimeException",
+                             controller.getAddress (),
+                             controller.getEnvironment (), "ASDC", "closeASDC", MsoLogger.ErrorCode.BusinessProcesssError, "RuntimeException in closeASDC",
+                             e);
+            } catch (ASDCControllerException e) {
+                LOGGER.warn (MessageEnum.ASDC_SHUTDOWN_ASDC_CLIENT_EXC,
+                             "ASDCControllerException",
+                             controller.getAddress (),
+                             controller.getEnvironment (), "ASDC", "closeASDC", MsoLogger.ErrorCode.BusinessProcesssError, "ASDCControllerException in closeASDC",
+                             e);
+            }
+        }
+        
+        // Now remove the ones properly closed
+        for (String toRemove:controllerToRemove) {
+               controllers.remove(toRemove);
+        }
+        
+    }
+
+    /**
+     * Check whether the config has been changed
+     */
+    public boolean updateControllersConfigIfNeeded () {
+       boolean listUpdated=updateControllersListIfNeeded();
+       if (!listUpdated) {
+       
+               for (ASDCController controller : controllers.values()) {
+                   try {
+                       controller.updateConfigIfNeeded ();
+                   } catch (ASDCControllerException ec) {
+                       LOGGER.warn (MessageEnum.ASDC_INIT_ASDC_CLIENT_EXC,
+                                    controller.getAddress (),
+                                    controller.getEnvironment (), "ASDC", "closeASDC", MsoLogger.ErrorCode.BusinessProcesssError, "ASDCControllerException in updateControllersConfigIfNeeded",
+                                    ec);
+                   } catch (ASDCParametersException ep) {
+                       LOGGER.warn (MessageEnum.ASDC_LOAD_ASDC_CLIENT_EXC,
+                                    controller.getAddress (),
+                                    controller.getEnvironment (), "ASDC", "closeASDC", MsoLogger.ErrorCode.BusinessProcesssError, "ASDCParametersException in updateControllersConfigIfNeeded",
+                                    ep);
+                   } catch (RuntimeException | IOException e) {
+                       LOGGER.error (MessageEnum.ASDC_SINGLETON_CHECKT_EXC,
+                                     controller.getAddress (),
+                                     controller.getEnvironment (), "ASDC", "closeASDC", MsoLogger.ErrorCode.BusinessProcesssError, "RuntimeException in updateControllersConfigIfNeeded",
+                                     e);
+                   }
+               }
+       }
+       return listUpdated;
+    }
+
+       public Map<String, ASDCController> getControllers() {
+               return controllers;
+       }
+    
+    
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/DistributionStatusMessage.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/DistributionStatusMessage.java
new file mode 100644 (file)
index 0000000..dddcaff
--- /dev/null
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client;
+
+
+import org.openecomp.sdc.api.consumer.IDistributionStatusMessage;
+import org.openecomp.sdc.utils.DistributionStatusEnum;
+
+public class DistributionStatusMessage implements IDistributionStatusMessage {
+
+       private String artifactURL;
+       
+       private String consumerID;
+       
+       private String distributionID;
+       
+       private DistributionStatusEnum distributionStatus;
+       
+       private long timestamp;
+       
+       public DistributionStatusMessage (final String artifactUrl, final String consumerId,final String distributionId, final DistributionStatusEnum distributionStatusEnum, final long timestampL) {
+               artifactURL = artifactUrl;
+               consumerID = consumerId;
+               distributionID = distributionId;
+               distributionStatus = distributionStatusEnum;
+               timestamp = timestampL;
+       }
+       
+       @Override
+       public String getArtifactURL() {
+               
+               return artifactURL;
+       }
+
+       @Override
+       public String getConsumerID() {
+       
+               return consumerID;
+       }
+
+       @Override
+       public String getDistributionID() {
+               
+               return distributionID;
+       }
+
+       @Override
+       public DistributionStatusEnum getStatus() {
+       
+               return distributionStatus;
+       }
+
+       @Override
+       public long getTimestamp() {
+               
+               return timestamp;
+       }
+
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerException.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerException.java
new file mode 100644 (file)
index 0000000..72c5a5a
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+
+/**
+ * Exception of the ASDC controller.
+ */
+public class ASDCControllerException extends Exception {
+
+       /**
+     * serialization id.
+        */
+       private static final long serialVersionUID = -4236006447255525130L;
+
+       /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public ASDCControllerException (final String message) {
+        super (message);
+       
+    }
+       
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public ASDCControllerException (final String message, final Throwable cause) {
+        super (message, cause);
+       
+    }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadException.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadException.java
new file mode 100644 (file)
index 0000000..59d3223
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+
+/**
+ * Exception during download from ASDC.
+ */
+public class ASDCDownloadException extends Exception {
+
+       /**
+     * serialization id.
+        */
+       private static final long serialVersionUID = -5276848693231134901L;
+
+       /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public ASDCDownloadException (final String message) {
+        super (message);
+       
+    }
+       
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public ASDCDownloadException (final String message, final Throwable cause) {
+        super (message, cause);
+       
+    }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersException.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersException.java
new file mode 100644 (file)
index 0000000..fdedd40
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+
+/**
+ * Exception of the ASDC controller.
+ */
+public class ASDCParametersException extends Exception {
+
+       /**
+     * serialization id.
+        */
+       private static final long serialVersionUID = 8425657297510362736L;
+
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public ASDCParametersException (final String message) {
+        super (message);
+       
+    }
+       
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public ASDCParametersException (final String message, final Throwable cause) {
+        super (message, cause);
+       
+    }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerException.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerException.java
new file mode 100644 (file)
index 0000000..af698ad
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+
+/**
+ * Exception during artifact installation.
+ */
+public class ArtifactInstallerException extends Exception {
+
+       /**
+     * serialization id.
+        */
+       private static final long serialVersionUID = 4095937499475915021L;
+
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public ArtifactInstallerException (final String message) {
+        super (message);
+       
+    }
+       
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public ArtifactInstallerException (final String message, final Throwable cause) {
+        super (message, cause);
+       
+    }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/healthcheck/HealthCheckHandler.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/healthcheck/HealthCheckHandler.java
new file mode 100644 (file)
index 0000000..f0b6ec4
--- /dev/null
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.healthcheck;
+
+
+import org.openecomp.mso.MsoStatusUtil;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJsonProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.HealthCheckUtils;
+import org.openecomp.mso.utils.UUIDChecker;
+import org.apache.http.HttpStatus;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+
+
+@Path("/")
+       public class HealthCheckHandler {
+               
+               private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.ASDC);
+               private static final String MSO_PROP_ASDC = "MSO_PROP_ASDC";
+               private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+               private static final String SUC_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
+               private static final String NOT_FOUND = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Ready</title></head><body>Application Not Ready. Properties file missing or invalid or database Connection failed</body></html>";
+
+               private static final Response OK_RESPONSE = Response.status (HttpStatus.SC_OK).entity (SUC_HTML).build ();
+               private static final Response NOK_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE).entity (NOT_FOUND).build ();
+
+               @HEAD
+           @GET
+           @Path("/healthcheck")
+           @Produces("text/html")
+           public Response healthcheck (@QueryParam("requestId") String requestId) {
+                       long startTime = System.currentTimeMillis ();
+                       MsoLogger.setServiceName ("Healthcheck");
+                       UUIDChecker.verifyOldUUID(requestId, msoLogger);
+                       HealthCheckUtils healthCheck = new HealthCheckUtils ();
+                       if (!healthCheck.siteStatusCheck(msoLogger, startTime)) {
+                               return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+                       }
+
+                       MsoJsonProperties props = loadMsoProperties ();
+                       if (props == null) {
+                               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Application Not Ready");
+                               return HealthCheckUtils.NOT_STARTED_RESPONSE;
+                       }
+
+                       if (!healthCheck.catalogDBCheck (msoLogger, startTime)) {
+                               return HealthCheckUtils.NOT_STARTED_RESPONSE;
+                       }
+                       msoLogger.debug("healthcheck - Successful");
+                       return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+           }
+
+               private MsoJsonProperties loadMsoProperties () {
+                       MsoJsonProperties msoProperties;
+                       try {
+                               msoProperties = msoPropertiesFactory.getMsoJsonProperties(MSO_PROP_ASDC);
+                       } catch (Exception e) {
+                               msoLogger.error (MessageEnum.ASDC_PROPERTIES_NOT_FOUND, MSO_PROP_ASDC, "", "", MsoLogger.ErrorCode.DataError, "Exception - getMsoJsonProperties", e);
+                               return null;
+                       }
+
+                       if (msoProperties !=null && msoProperties.getJsonRootNode().getElements().hasNext()) {
+                               return msoProperties;
+                       } else {
+                               msoLogger.error (MessageEnum.ASDC_PROPERTIES_NOT_FOUND , MSO_PROP_ASDC, "", "", MsoLogger.ErrorCode.DataError, "ASDC properties not found");
+                               return  null;
+                       }
+               }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ASDCElementInfo.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ASDCElementInfo.java
new file mode 100644 (file)
index 0000000..5e59be5
--- /dev/null
@@ -0,0 +1,212 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+
+/**
+ * A class representing a generic element whose information can be used for example to log artifacts, resource... data.
+ */
+public class ASDCElementInfo {
+       
+       /**
+        * A default, empty instance used in case a source element was not correctly provided.
+        */
+       public static final ASDCElementInfo EMPTY_INSTANCE = new ASDCElementInfo();
+       
+       /**
+        * Used to define the other possible ASDC Element types (usually in addition to existing artifact types, etc.).<br/>
+        * <br/>
+        * Possible types allowed:<br/>
+        * <ul>
+        * <li>{@link ASDCElementTypeEnum#VNF_RESOURCE}</li>
+        * <ul>
+        */
+       public static enum ASDCElementTypeEnum {
+               /**
+                * The type VNF_RESOURCE. Represents a VNF_RESOURCE element.
+                */
+               VNF_RESOURCE
+       };
+
+       /**
+        * The map of element information fields useful for logging. The complete contents of this list will be concatenated.
+        */
+       private final Map<String, String> elementInfoMap = new HashMap<>();
+       
+       /**
+        * The type of this element.
+        */
+       private final String type;
+       
+       private ASDCElementInfo () {
+               // Private parameterless constructor. Not visible, only used for EMPTY_INSTANCE.
+               this.type = "";
+       }
+       
+       /**
+        * Artifact-type based constructor. Requires a valid artifact type.
+        * @param artifactType The artifact type
+        */
+       private ASDCElementInfo (String artifactType) {
+               // We need the exact type name here...
+               this.type = artifactType;
+       }
+       
+       /**
+        * 'Other element type'-based constructor. Requires a valid element type.
+        * @param elementType An ASDCElementTypeEnum entry. This will usually contain enumerated types not in the existing
+        */
+       private ASDCElementInfo (ASDCElementTypeEnum elementType) {
+               // We need the exact type name here...
+               this.type = elementType.name();
+       }
+       
+       /**
+        * Add an information entry (name, UUID, etc.) from an artifact/resource/..., once a at time.
+        * 
+        * @param key The key (name) of the information entry (Artifact UUID, Resource Name, etc.)
+        * @param value The value bound to the information entry.
+        */
+       public final void addElementInfo(String key, String value) {
+               if ((key != null) && (value != null)) {
+                       this.getElementInfoMap().put(key, value);
+               }
+       }
+       
+       /**
+        * Returns an aggregated, formatted list of the expected details about an ASDC element.
+        * (non-Javadoc)
+        * @return An aggregated list of element information entries, comma-separated.
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public final String toString() {
+               StringBuffer sb = new StringBuffer();
+               List<String> aggregatedElements = new ArrayList<>();
+               for (Entry<String, String> entry : this.getElementInfoMap().entrySet()) {
+                       aggregatedElements.add(entry.getKey() + ": " + entry.getValue());
+               }
+               sb.append(aggregatedElements.size() > 0 ? aggregatedElements.get(0) : "");
+               if (aggregatedElements.size() > 1) {
+                       for (int i = 1; i < aggregatedElements.size(); ++i) {
+                               sb.append (", ");
+                               sb.append(aggregatedElements.get(i));
+                       }
+               }
+               return sb.toString();
+       }
+       
+       /**
+        * The type that was defined at creation time. This is typically VNF_RESOURCE, VF_MODULE_METADATA, HEAT_ENV, etc.
+        * @return The type of this element information type. This will usually be either an ArtifactTypeEnum entry name or an ASDCElementTypeEnum entry name.
+        * @see ASDCElementInfo.ASDCElementTypeEnum
+        */
+       public String getType() {
+               return type;
+       }
+
+       /**
+        * Provides the map of all element information entries for this type.
+        * @return A map of all element information entries which will be used by the toString() method.
+        * @see ASDCElementInfo#toString()
+        */
+       protected Map<String, String> getElementInfoMap() {
+               return elementInfoMap;
+       }
+
+       /**
+        * Create an ASDCElementInfo object from a VNF Resource.<br/>
+        * <br/>
+        * <b>Used information:</b><br/>
+        * <ul>
+        * <li>Resource Instance Name</li>
+        * <li>Resource Instance UUID</li>
+        * </ul>
+        * 
+        * @param vfResourceStructure The VfResourceStructure to use as source of information (see {@link VfResourceStructure}).
+        * @return an ASDCElementInfo using the information held in the VNF Resource.
+        */
+       public static final ASDCElementInfo createElementFromVfResourceStructure (VfResourceStructure vfResourceStructure) {
+               if (vfResourceStructure == null) {
+                       return EMPTY_INSTANCE;
+               }
+               ASDCElementInfo elementInfo = new ASDCElementInfo(ASDCElementTypeEnum.VNF_RESOURCE);
+               IResourceInstance resourceInstance = vfResourceStructure.getResourceInstance();
+               elementInfo.addElementInfo("Resource Instance Name", resourceInstance.getResourceInstanceName());
+               elementInfo.addElementInfo("Resource Instance Invariant UUID", resourceInstance.getResourceInvariantUUID());
+               return elementInfo;
+       }
+
+       /**
+        * Create an ASDCElementInfo object from a VF Module.<br/>
+        * <br/>
+        * <b>Used information:</b><br/>
+        * <ul>
+        * <li>Module Model Name</li>
+        * <li>Module Model UUID</li>
+        * </ul>
+        * 
+        * @param vfModuleStructure The VfModuleStructure to use as source of information (see {@link VfModuleStructure}).
+        * @return an ASDCElementInfo using the information held in the VF Module.
+        */
+       public static final ASDCElementInfo createElementFromVfModuleStructure (VfModuleStructure vfModuleStructure) {
+               if (vfModuleStructure == null) {
+                       return EMPTY_INSTANCE;
+               }
+               ASDCElementInfo elementInfo = new ASDCElementInfo(ASDCConfiguration.VF_MODULES_METADATA);
+               IVfModuleMetadata moduleMetadata = vfModuleStructure.getVfModuleMetadata();
+               elementInfo.addElementInfo("Module Model Name", moduleMetadata.getVfModuleModelName());
+               elementInfo.addElementInfo("Module Model Invariant UUID", moduleMetadata.getVfModuleModelInvariantUUID());
+               return elementInfo;
+       }
+       
+       /**
+        * Create an ASDCElementInfo object from an IArtfiactInfo instance.<br/>
+        * <br/>
+        * <b>Used information:</b><br/>
+        * <ul>
+        * <li>IArtifactInfo Name</li>
+        * <li>IArtifactInfo UUID</li>
+        * </ul>
+        * 
+        * @param artifactInfo The VfModuleStructure to use as source of information (see {@link IArtifactInfo}).
+        * @return an ASDCElementInfo using the information held in the IArtifactInfo instance.
+        */
+       public static final ASDCElementInfo createElementFromVfArtifactInfo (IArtifactInfo artifactInfo) {
+               if (artifactInfo == null) {
+                       return EMPTY_INSTANCE;
+               }
+               ASDCElementInfo elementInfo = new ASDCElementInfo(artifactInfo.getArtifactType());
+               elementInfo.addElementInfo(elementInfo.getType() + " Name", artifactInfo.getArtifactName());
+               elementInfo.addElementInfo(elementInfo.getType() + " UUID", artifactInfo.getArtifactUUID());
+               return elementInfo;
+       }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/BigDecimalVersion.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/BigDecimalVersion.java
new file mode 100644 (file)
index 0000000..a0932ed
--- /dev/null
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+
+import java.math.BigDecimal;
+
+public class BigDecimalVersion {
+         
+       /**
+     * This method truncates and convert the version String provided in the notification.
+     * 
+     * @param version The version to check
+     * @return A BigDecimal value checked and truncated
+     */
+    public static BigDecimal castAndCheckNotificationVersion(String version) {
+       // Truncate the version if bad type
+       String[] splitVersion = version.split("\\.");
+       StringBuffer newVersion = new StringBuffer();
+       if (splitVersion.length > 1) {
+               newVersion.append(splitVersion[0]);
+               newVersion.append(".");
+               newVersion.append(splitVersion[1]);
+       } else {
+               return new BigDecimal(splitVersion[0]);
+       }
+       
+       for (int i=2;i<splitVersion.length;i++) {
+               newVersion.append(splitVersion[i]);
+       }
+       
+       return new BigDecimal(newVersion.toString());
+    }
+    
+    /**
+     * This method truncates and convert the version String provided in the notification.
+     * 
+     * @param version The version to check
+     * @return A String value checked and truncated to Decimal format
+     */
+    public static String castAndCheckNotificationVersionToString (String version) {
+       return castAndCheckNotificationVersion(version).toString();
+    }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/IArtifactOrchestrator.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/IArtifactOrchestrator.java
new file mode 100644 (file)
index 0000000..25c3b9c
--- /dev/null
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+
+public interface IArtifactOrchestrator {
+
+       void installTheArtifact (INotificationData iNotif, IResourceInstance resource, IArtifactInfo artifact, IDistributionClientDownloadResult downloadResult) throws ArtifactInstallerException;
+
+       boolean isArtifactAlreadyDeployed (INotificationData iNotif,IResourceInstance resource,IArtifactInfo artifact) throws ArtifactInstallerException;
+
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/IVfResourceInstaller.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/IVfResourceInstaller.java
new file mode 100644 (file)
index 0000000..5f0f930
--- /dev/null
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+
+
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+
+public interface IVfResourceInstaller {
+
+       boolean isResourceAlreadyDeployed (VfResourceStructure vfResourceStructure) throws ArtifactInstallerException;
+
+       public void installTheResource (VfResourceStructure vfResourceStructure) throws ArtifactInstallerException;
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfModuleArtifact.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfModuleArtifact.java
new file mode 100644 (file)
index 0000000..c7f19ea
--- /dev/null
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+
+import java.io.UnsupportedEncodingException;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
+
+/**
+ * The structure that contains the artifactInfo and its associated DownloadedResult. 
+ *
+ */
+public final class VfModuleArtifact {
+       private final IArtifactInfo artifactInfo;
+       private int deployedInDb=0;
+       private final String result;
+               
+       private Object catalogObject;   
+               
+       public VfModuleArtifact(IArtifactInfo artifactinfo,IDistributionClientDownloadResult clientResult) throws UnsupportedEncodingException {
+               artifactInfo=artifactinfo;
+               result = new String(clientResult.getArtifactPayload(), "UTF-8");
+               
+       }
+
+       public Object getCatalogObject() {
+               return catalogObject;
+       }
+
+       public void setCatalogObject(Object catalogObject) {
+               this.catalogObject = catalogObject;
+       }
+
+       public IArtifactInfo getArtifactInfo() {
+               return artifactInfo;
+       }
+
+       public String getResult() {
+               return result;
+       }
+
+       public int getDeployedInDb() {
+               return deployedInDb;
+       }
+
+       public void incrementDeployedInDB() {
+               ++deployedInDb;
+       }
+       
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfModuleStructure.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfModuleStructure.java
new file mode 100644 (file)
index 0000000..239bc8a
--- /dev/null
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+
+public final class VfModuleStructure {
+       
+       private final IVfModuleMetadata vfModuleMetadata;
+       
+       private final VfResourceStructure parentVfResource;
+       
+       private VfModule catalogVfModule;
+       /**
+        * The list of artifact existing in this resource hashed by artifactType.
+        */
+       private final Map<String, List<VfModuleArtifact>> artifactsMap;
+       
+       public VfModuleStructure(VfResourceStructure vfParentResource,IVfModuleMetadata vfmoduleMetadata) throws ArtifactInstallerException {
+               
+               vfModuleMetadata = vfmoduleMetadata;
+               parentVfResource = vfParentResource;
+               
+               artifactsMap = new HashMap<String, List<VfModuleArtifact>>();
+                               
+               for (String artifactUUID:this.vfModuleMetadata.getArtifacts()) {
+                       if (vfParentResource.getArtifactsMapByUUID().containsKey(artifactUUID)) {
+                               this.addToStructure(vfParentResource.getArtifactsMapByUUID().get(artifactUUID));
+                       } else {
+                               throw new ArtifactInstallerException("Artifact (UUID:"+artifactUUID+ ") referenced in the VFModule UUID list has not been downloaded, cancelling the Resource deployment");
+                       }
+               }
+       }
+       
+       private void addToStructure(VfModuleArtifact vfModuleArtifact) {
+               
+               if (artifactsMap.containsKey(vfModuleArtifact.getArtifactInfo().getArtifactType())) {
+                       artifactsMap.get(vfModuleArtifact.getArtifactInfo().getArtifactType()).add(vfModuleArtifact);
+                       
+               } else {
+                       List<VfModuleArtifact> nestedList = new LinkedList<VfModuleArtifact>();
+                       nestedList.add(vfModuleArtifact);
+                       
+                       artifactsMap.put(vfModuleArtifact.getArtifactInfo().getArtifactType(), nestedList);
+               }
+       }
+       
+       public List<VfModuleArtifact> getOrderedArtifactList() {
+               
+               List <VfModuleArtifact> artifactsList = new LinkedList <VfModuleArtifact>();
+               
+               artifactsList.addAll(artifactsMap.get(ASDCConfiguration.HEAT));
+               artifactsList.addAll(artifactsMap.get(ASDCConfiguration.HEAT_ENV));
+               artifactsList.addAll(artifactsMap.get(ASDCConfiguration.HEAT_VOL));
+               
+               for (VfModuleArtifact artifact:(artifactsMap.get(ASDCConfiguration.HEAT_NESTED))) {
+                       artifactsList.add(artifact);
+               }
+               
+               for (VfModuleArtifact artifact:(artifactsMap.get(ASDCConfiguration.HEAT_ARTIFACT))) {
+                       artifactsList.add(artifact);
+               }
+               
+               artifactsList.addAll(artifactsMap.get(ASDCConfiguration.HEAT_VOL));
+               
+               return null;
+       }
+
+       public IVfModuleMetadata getVfModuleMetadata() {
+               return vfModuleMetadata;
+       }
+
+       public VfResourceStructure getParentVfResource() {
+               return parentVfResource;
+       }
+
+       public Map<String, List<VfModuleArtifact>> getArtifactsMap() {
+               return artifactsMap;
+       }
+
+
+       public VfModule getCatalogVfModule() {
+               return catalogVfModule;
+       }
+
+       public void setCatalogVfModule(VfModule catalogVfModule) {
+               this.catalogVfModule = catalogVfModule;
+       }
+       
+       
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfResourceStructure.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/VfResourceStructure.java
new file mode 100644 (file)
index 0000000..7be5e70
--- /dev/null
@@ -0,0 +1,165 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.sdc.api.IDistributionClient;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+
+/**
+ * This structure exists to avoid having issues if the order of the vfResource/vfmodule artifact is not good (tree structure).
+ * 
+ *
+ */
+public final class VfResourceStructure {
+       
+       private boolean isDeployedSuccessfully=false;
+       /**
+        * The Raw notification data. 
+        */
+       private final INotificationData notification;
+       
+       /**
+        * The resource we will try to deploy.
+        */
+       private final IResourceInstance resourceInstance;
+       
+       /**
+        * The list of VfModules defined for this resource.
+        */
+       private final List<VfModuleStructure> vfModulesStructureList;
+       
+       /**
+        * The list of VfModulesMetadata defined for this resource.
+        */
+       private List<IVfModuleMetadata> vfModulesMetadataList;
+       
+       private VnfResource catalogVnfResource;
+       
+       private Service catalogService;
+       
+       /**
+        * The list of artifacts existing in this resource hashed by UUID.
+        */
+       private final Map<String, VfModuleArtifact> artifactsMapByUUID; 
+       
+               
+       public VfResourceStructure(INotificationData notificationdata, IResourceInstance resourceinstance) {
+               notification=notificationdata;
+               resourceInstance=resourceinstance;
+               
+
+               vfModulesStructureList = new LinkedList<VfModuleStructure>();
+               artifactsMapByUUID =  new HashMap<String, VfModuleArtifact>();
+       }
+       
+       public void addArtifactToStructure(IDistributionClient distributionClient,IArtifactInfo artifactinfo,IDistributionClientDownloadResult clientResult) throws UnsupportedEncodingException {
+               VfModuleArtifact vfModuleArtifact = new VfModuleArtifact(artifactinfo,clientResult);
+               
+               switch(artifactinfo.getArtifactType()) {
+                       case ASDCConfiguration.HEAT:
+                       case ASDCConfiguration.HEAT_ENV:
+                       case ASDCConfiguration.HEAT_VOL:
+                       case ASDCConfiguration.HEAT_NESTED:    // For 1607 only 1 level tree is supported
+                       case ASDCConfiguration.HEAT_ARTIFACT: 
+                       case ASDCConfiguration.HEAT_NET:
+                       case ASDCConfiguration.OTHER:
+                               artifactsMapByUUID.put(artifactinfo.getArtifactUUID(), vfModuleArtifact);
+                               break;
+
+                       case ASDCConfiguration.VF_MODULES_METADATA:
+                               vfModulesMetadataList = distributionClient.decodeVfModuleArtifact(clientResult.getArtifactPayload());
+                               break;
+
+                       default:
+                               break;
+
+               }
+       }
+
+       public void createVfModuleStructures() throws ArtifactInstallerException {
+               
+               if (vfModulesMetadataList == null) {
+                       throw new ArtifactInstallerException("VfModule Meta DATA could not be decoded properly or was not present in the notification");
+               }
+               for (IVfModuleMetadata vfModuleMeta:vfModulesMetadataList) {
+                       vfModulesStructureList.add(new VfModuleStructure(this,vfModuleMeta));
+               }
+       }
+       
+       public INotificationData getNotification() {
+               return notification;
+       }
+
+       public IResourceInstance getResourceInstance() {
+               return resourceInstance;
+       }
+
+       public List<VfModuleStructure> getVfModuleStructure() {
+               return vfModulesStructureList;
+       }
+
+       public boolean isDeployedSuccessfully() {
+               return isDeployedSuccessfully;
+       }
+       
+       public void setSuccessfulDeployment() {
+               isDeployedSuccessfully = true;
+       }
+
+       public Map<String, VfModuleArtifact> getArtifactsMapByUUID() {
+               return artifactsMapByUUID;
+       }
+
+       public List<VfModuleStructure> getVfModulesStructureList() {
+               return vfModulesStructureList;
+       }
+
+       public VnfResource getCatalogVnfResource() {
+               return catalogVnfResource;
+       }
+
+       public void setCatalogVnfResource(VnfResource catalogVnfResource) {
+               this.catalogVnfResource = catalogVnfResource;
+       }
+
+       public Service getCatalogService() {
+               return catalogService;
+       }
+
+       public void setCatalogService(Service catalogService) {
+               this.catalogService = catalogService;
+       }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java
new file mode 100644 (file)
index 0000000..4cef0f1
--- /dev/null
@@ -0,0 +1,596 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.installer.heat;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.exception.ConstraintViolationException;
+import org.hibernate.exception.LockAcquisitionException;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+import org.openecomp.mso.asdc.installer.ASDCElementInfo;
+import org.openecomp.mso.asdc.installer.BigDecimalVersion;
+import org.openecomp.mso.asdc.installer.IVfResourceInstaller;
+import org.openecomp.mso.asdc.installer.VfModuleArtifact;
+import org.openecomp.mso.asdc.installer.VfModuleStructure;
+import org.openecomp.mso.asdc.installer.VfResourceStructure;
+import org.openecomp.mso.asdc.util.YamlEditor;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.HeatEnvironment;
+import org.openecomp.mso.db.catalog.beans.HeatFiles;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+public class VfResourceInstaller implements IVfResourceInstaller {
+
+       private MsoLogger logger;
+
+       public VfResourceInstaller() {
+               logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.ASDC);
+       }
+
+       @Override
+       public boolean isResourceAlreadyDeployed(VfResourceStructure vfResourceStructure)
+                       throws ArtifactInstallerException {
+               boolean status = false;
+
+               try (CatalogDatabase db = new CatalogDatabase()) {
+
+                       logger.info(MessageEnum.ASDC_CHECK_HEAT_TEMPLATE, "VNFResource",
+                                       VfResourceInstaller.createVNFName(vfResourceStructure),
+                                       BigDecimalVersion.castAndCheckNotificationVersionToString(
+                                                       vfResourceStructure.getNotification().getServiceVersion()), "", "");
+
+                       VnfResource vnfResource = db.getVnfResource(
+                                       VfResourceInstaller.createVNFName(vfResourceStructure),
+                                       BigDecimalVersion.castAndCheckNotificationVersionToString(
+                                                       vfResourceStructure.getNotification().getServiceVersion()));
+
+                       if (vnfResource != null) {
+                               status = true;
+
+                       }
+
+                       if (status) {
+                               logger.info(MessageEnum.ASDC_ARTIFACT_ALREADY_DEPLOYED_DETAIL,
+                                               vfResourceStructure.getResourceInstance().getResourceInstanceName(),
+                                               vfResourceStructure.getResourceInstance().getResourceUUID(),
+                                               vfResourceStructure.getNotification().getServiceName(),
+                                               BigDecimalVersion.castAndCheckNotificationVersionToString(
+                                                               vfResourceStructure.getNotification().getServiceVersion()),
+                                               vfResourceStructure.getNotification().getServiceUUID(),
+                                               vfResourceStructure.getResourceInstance().getResourceName(), "", "");
+                       } else {
+                               logger.info(MessageEnum.ASDC_ARTIFACT_NOT_DEPLOYED_DETAIL,
+                                               vfResourceStructure.getResourceInstance().getResourceInstanceName(),
+                                               vfResourceStructure.getResourceInstance().getResourceUUID(),
+                                               vfResourceStructure.getNotification().getServiceName(),
+                                               BigDecimalVersion.castAndCheckNotificationVersionToString(
+                                                               vfResourceStructure.getNotification().getServiceVersion()),
+                                               vfResourceStructure.getNotification().getServiceUUID(), 
+                                               vfResourceStructure.getResourceInstance().getResourceName(),"", "");
+                       }
+
+                       return status;
+
+               } catch (Exception e) {
+                       logger.error(MessageEnum.ASDC_ARTIFACT_CHECK_EXC, "", "", MsoLogger.ErrorCode.SchemaError, "Exception - isResourceAlreadyDeployed");
+                       throw new ArtifactInstallerException("Exception caught during checking existence of the VNF Resource.", e);
+               }
+       }
+
+       @Override
+       public void installTheResource(VfResourceStructure vfResourceStructure) throws ArtifactInstallerException {
+
+               // 1. Add the DB object list (Hashed) to be created from the HashMap
+               // UUID
+               // The DB objects will be stored in each VfModuleArtifact objects
+               // Those objects could be reused by different VfModule
+
+               for (VfModuleArtifact vfModuleArtifact : vfResourceStructure.getArtifactsMapByUUID().values()) {
+
+                       switch (vfModuleArtifact.getArtifactInfo().getArtifactType()) {
+                       case ASDCConfiguration.HEAT:
+                       case ASDCConfiguration.HEAT_VOL:
+                       case ASDCConfiguration.HEAT_NESTED:
+                               VfResourceInstaller.createHeatTemplateFromArtifact(vfResourceStructure, vfModuleArtifact);
+                               break;
+                       case ASDCConfiguration.HEAT_ENV:
+                               VfResourceInstaller.createHeatEnvFromArtifact(vfResourceStructure, vfModuleArtifact);
+                               break;
+                       case ASDCConfiguration.HEAT_ARTIFACT:
+                               VfResourceInstaller.createHeatFileFromArtifact(vfResourceStructure, vfModuleArtifact);
+                               break;
+                       case ASDCConfiguration.HEAT_NET:
+                       case ASDCConfiguration.OTHER:
+                               logger.warn(MessageEnum.ASDC_ARTIFACT_TYPE_NOT_SUPPORT, vfModuleArtifact.getArtifactInfo().getArtifactType()+"(Artifact Name:"+vfModuleArtifact.getArtifactInfo().getArtifactName()+")", "", "", MsoLogger.ErrorCode.DataError, "Artifact type not supported");
+                               break;
+                       default:
+                               break;
+
+                       }
+               }
+               
+               // in case of deployment failure, use a string that will represent the type of artifact that failed...
+               List<ASDCElementInfo> artifactListForLogging = new ArrayList<>();
+               
+               CatalogDatabase catalogDB = new CatalogDatabase();
+               // 2. Create the VFModules/VNFResource objects by linking them to the
+               // objects created before and store them in Resource/module structure
+               // Opening a DB transaction, starting from here
+               try {
+                       
+                       VfResourceInstaller.createService(vfResourceStructure);
+                       
+                       VfResourceInstaller.createVnfResource(vfResourceStructure);
+
+                       // Add this one for logging
+                       artifactListForLogging.add(ASDCElementInfo.createElementFromVfResourceStructure(vfResourceStructure));
+                       
+                       catalogDB.saveOrUpdateVnfResource(vfResourceStructure.getCatalogVnfResource());
+                       catalogDB.saveService(vfResourceStructure.getCatalogService());
+                       
+                       for (VfModuleStructure vfModuleStructure : vfResourceStructure.getVfModuleStructure()) {
+
+                               // Here we set the right db structure according to the Catalog
+                               // DB
+
+                               // We expect only one MAIN HEAT per VFMODULE
+                               // we can also obtain from it the Env ArtifactInfo, that's why
+                               // we
+                               // get the Main IArtifactInfo
+
+                               HeatTemplate heatMainTemplate = null;
+                               HeatEnvironment heatEnv = null;
+                               
+                               HeatTemplate heatVolumeTemplate = null;
+                               HeatEnvironment heatVolumeEnv = null;
+                               
+                               if (vfModuleStructure.getArtifactsMap().containsKey(ASDCConfiguration.HEAT)) {
+                                       IArtifactInfo mainEnvArtifactInfo = vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT)
+                                                       .get(0).getArtifactInfo().getGeneratedArtifact();
+                                       
+                                       // MAIN HEAT
+                                       heatMainTemplate = (HeatTemplate) vfModuleStructure.getArtifactsMap()
+                                                       .get(ASDCConfiguration.HEAT).get(0).getCatalogObject();
+
+                                       // Add this one for logging
+                                       artifactListForLogging.add(ASDCElementInfo
+                                                       .createElementFromVfArtifactInfo(vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT).get(0).getArtifactInfo()));
+                                       
+                                       catalogDB.saveHeatTemplate(heatMainTemplate, heatMainTemplate.getParameters());
+                                       // Indicate we have deployed it in the DB
+                                       vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT).get(0).incrementDeployedInDB();
+                                       
+                                       
+                                       // VOLUME HEAT
+                                       // We expect only one VOL HEAT per VFMODULE
+                                       // we can also obtain from it the Env ArtifactInfo, that's why
+                                       // we get the Volume IArtifactInfo
+                               
+                                       if (vfModuleStructure.getArtifactsMap().containsKey(ASDCConfiguration.HEAT_VOL)) {
+                                               IArtifactInfo volEnvArtifactInfo = vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT_VOL).get(0)
+                                                               .getArtifactInfo().getGeneratedArtifact();
+               
+                                               heatVolumeTemplate = (HeatTemplate) vfModuleStructure.getArtifactsMap()
+                                                               .get(ASDCConfiguration.HEAT_VOL).get(0).getCatalogObject();
+                                       
+                                               // Add this one for logging
+                                               artifactListForLogging.add(ASDCElementInfo.createElementFromVfArtifactInfo(vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT_VOL).get(0).getArtifactInfo()));
+
+                                               catalogDB.saveHeatTemplate(heatVolumeTemplate, heatVolumeTemplate.getParameters());
+                                               // Indicate we have deployed it in the DB
+                                               vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT_VOL).get(0).incrementDeployedInDB();
+                                               
+                                               if (volEnvArtifactInfo != null) {
+                                                       heatVolumeEnv = (HeatEnvironment) vfResourceStructure.getArtifactsMapByUUID()
+                                                                       .get(volEnvArtifactInfo.getArtifactUUID()).getCatalogObject();
+
+                                                       // Add this one for logging
+                                                       artifactListForLogging.add(ASDCElementInfo.createElementFromVfArtifactInfo(volEnvArtifactInfo));
+                                                                                                               
+                                                       catalogDB.saveHeatEnvironment(heatVolumeEnv);
+                                                       // Indicate we have deployed it in the DB
+                                                       vfResourceStructure.getArtifactsMapByUUID().get(volEnvArtifactInfo.getArtifactUUID()).incrementDeployedInDB();
+                                               }
+                                               
+                                       }
+                                       
+                                       // NESTED HEAT
+                                       // Here we expect many HEAT_NESTED template to be there
+                                       // check first if we really have nested heat templates
+                                       if (vfModuleStructure.getArtifactsMap().containsKey(ASDCConfiguration.HEAT_NESTED)) {
+                                               for (VfModuleArtifact heatNestedArtifact : vfModuleStructure.getArtifactsMap()
+                                                               .get(ASDCConfiguration.HEAT_NESTED)) {
+       
+                                                       // Check if this nested is well referenced by the MAIN HEAT
+                                                       String parentArtifactType = VfResourceInstaller.identifyParentOfNestedTemplate(vfModuleStructure,heatNestedArtifact);
+                                                       HeatTemplate heatNestedTemplate = (HeatTemplate) heatNestedArtifact.getCatalogObject();
+                                                       
+                                                       if (parentArtifactType != null) {
+                                                                                                               
+                                                               switch (parentArtifactType) {
+                                                                       case ASDCConfiguration.HEAT:
+                                                                               
+                                                                               // Add this one for logging
+                                                                               artifactListForLogging.add(ASDCElementInfo.createElementFromVfArtifactInfo(heatNestedArtifact.getArtifactInfo()));
+                                                               
+                                                                               catalogDB.saveNestedHeatTemplate (heatMainTemplate.getId(), heatNestedTemplate, heatNestedTemplate.getTemplateName());
+                                                                               // Indicate we have deployed it in the DB
+                                                                               heatNestedArtifact.incrementDeployedInDB();
+                                                                               break;
+                                                                       case ASDCConfiguration.HEAT_VOL:
+                                                                               
+                                                                               // Add this one for logging
+                                                                               artifactListForLogging.add(ASDCElementInfo.createElementFromVfArtifactInfo(heatNestedArtifact.getArtifactInfo()));
+                                                                               catalogDB.saveNestedHeatTemplate (heatVolumeTemplate.getId(), heatNestedTemplate, heatNestedTemplate.getTemplateName());
+                                                                               // Indicate we have deployed it in the DB
+                                                                               heatNestedArtifact.incrementDeployedInDB();
+                                                                               break;
+                                                                               
+                                                                       default:
+                                                                               break;
+
+                                                               }
+                                                       } else { // Assume it belongs to HEAT MAIN
+                                                               // Add this one for logging
+                                                               artifactListForLogging.add(ASDCElementInfo.createElementFromVfArtifactInfo(heatNestedArtifact.getArtifactInfo()));
+                                               
+                                                               catalogDB.saveNestedHeatTemplate (heatMainTemplate.getId(), heatNestedTemplate, heatNestedTemplate.getTemplateName());
+                                                               // Indicate we have deployed it in the DB
+                                                               heatNestedArtifact.incrementDeployedInDB();
+                                                       }
+                                               }
+                                       }
+                                       
+                                       if (mainEnvArtifactInfo != null) {
+                                               heatEnv = (HeatEnvironment) vfResourceStructure.getArtifactsMapByUUID()
+                                                               .get(mainEnvArtifactInfo.getArtifactUUID()).getCatalogObject();
+
+                                               // Add this one for logging
+                                               artifactListForLogging.add(ASDCElementInfo.createElementFromVfArtifactInfo(mainEnvArtifactInfo));
+                                                                                               
+                                               catalogDB.saveHeatEnvironment(heatEnv);
+                                               // Indicate we have deployed it in the DB
+                                               vfResourceStructure.getArtifactsMapByUUID().get(mainEnvArtifactInfo.getArtifactUUID()).incrementDeployedInDB();
+                                       }
+                                       
+                               }
+               
+                                       
+                               // here we expect one VFModule to be there
+                               VfResourceInstaller.createVfModule(vfModuleStructure,heatMainTemplate, heatVolumeTemplate, heatEnv, heatVolumeEnv);
+                               VfModule vfModule = vfModuleStructure.getCatalogVfModule();
+
+                               // Add this one for logging
+                               artifactListForLogging.add(ASDCElementInfo.createElementFromVfModuleStructure(vfModuleStructure));
+                               
+                               catalogDB.saveOrUpdateVfModule(vfModule);
+
+                               // Here we expect many HEAT_TEMPLATE files to be there
+                               if (vfModuleStructure.getArtifactsMap().containsKey(ASDCConfiguration.HEAT_ARTIFACT)) {
+                                       for (VfModuleArtifact heatArtifact : vfModuleStructure.getArtifactsMap()
+                                                       .get(ASDCConfiguration.HEAT_ARTIFACT)) {
+       
+                                               HeatFiles heatFile = (HeatFiles) heatArtifact.getCatalogObject();
+                                                                                       
+                                               // Add this one for logging
+                                               artifactListForLogging.add(ASDCElementInfo.createElementFromVfArtifactInfo(heatArtifact.getArtifactInfo()));
+                                       
+                                               
+                                               catalogDB.saveVfModuleToHeatFiles (vfModule.getId(), heatFile);
+                                               // Indicate we will deploy it in the DB
+                                               heatArtifact.incrementDeployedInDB();
+                                       }
+                               }
+
+                       }
+                       
+                       catalogDB.commit();
+                       vfResourceStructure.setSuccessfulDeployment();
+                       
+               } catch (Exception e) {
+
+                       Throwable dbExceptionToCapture = e;
+                       while (!(dbExceptionToCapture instanceof ConstraintViolationException || dbExceptionToCapture instanceof LockAcquisitionException)
+                                       && (dbExceptionToCapture.getCause() != null)) {
+                               dbExceptionToCapture = dbExceptionToCapture.getCause();
+                       }
+
+                       if (dbExceptionToCapture instanceof ConstraintViolationException || dbExceptionToCapture instanceof LockAcquisitionException) {
+                               logger.warn(MessageEnum.ASDC_ARTIFACT_ALREADY_DEPLOYED, vfResourceStructure.getResourceInstance().getResourceName(),
+                                               vfResourceStructure.getNotification().getServiceVersion(), "", "", MsoLogger.ErrorCode.DataError, "Exception - ASCDC Artifact already deployed", e);
+                       } else {
+                               String endEvent = "Exception caught during installation of the VFResource. Transaction rollback.";
+                               String elementToLog = (artifactListForLogging.size() > 0 ? artifactListForLogging.get(artifactListForLogging.size()-1).toString() : "No element listed");
+                               logger.error(MessageEnum.ASDC_ARTIFACT_INSTALL_EXC, elementToLog, "", "", MsoLogger.ErrorCode.DataError, "Exception caught during installation of the VFResource. Transaction rollback", e);
+                               catalogDB.rollback();
+                               throw new ArtifactInstallerException(
+                                               "Exception caught during installation of the VFResource. Transaction rollback.", e);
+                       }
+
+               } finally {
+                       catalogDB.close();
+                       // Debug log the whole collection...
+                       logger.debug(artifactListForLogging.toString());
+               }
+
+       }
+       
+       private static String identifyParentOfNestedTemplate(VfModuleStructure vfModuleStructure,VfModuleArtifact heatNestedArtifact) {
+
+               if (vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT) != null 
+                               && vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT).get(0).getArtifactInfo().getRelatedArtifacts() != null) {
+                       for (IArtifactInfo unknownArtifact : vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT).get(0)
+                                       .getArtifactInfo().getRelatedArtifacts()) {
+                               if (heatNestedArtifact.getArtifactInfo().getArtifactUUID().equals(unknownArtifact.getArtifactUUID())) {
+                                       return ASDCConfiguration.HEAT;
+                               }
+
+                       }
+               } 
+               
+               if (vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT_VOL) != null 
+                               && vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT_VOL).get(0).getArtifactInfo().getRelatedArtifacts() != null) {
+                       for (IArtifactInfo unknownArtifact:vfModuleStructure.getArtifactsMap().get(ASDCConfiguration.HEAT_VOL).get(0).getArtifactInfo().getRelatedArtifacts()) {
+                               if (heatNestedArtifact.getArtifactInfo().getArtifactUUID().equals(unknownArtifact.getArtifactUUID())) {
+                                       return ASDCConfiguration.HEAT_VOL;
+                               }
+                       
+                       }
+               }
+               
+               // Does not belong to anything
+               return null;
+                       
+       }
+       
+       private static void createVnfResource(VfResourceStructure vfResourceStructure) {
+               VnfResource vnfResource = new VnfResource();
+               
+               vnfResource.setAsdcUuid(vfResourceStructure.getResourceInstance().getResourceUUID());
+               vnfResource.setDescription(vfResourceStructure.getNotification().getServiceDescription());
+               
+               vnfResource.setOrchestrationMode("HEAT");
+               // Set the version but Version is stored into ASDC_SERVICE_MODEL_VERSION
+               vnfResource.setVersion(BigDecimalVersion
+                               .castAndCheckNotificationVersionToString(vfResourceStructure.getNotification().getServiceVersion()));
+               vnfResource.setVnfType(VfResourceInstaller.createVNFName(vfResourceStructure));
+               vnfResource.setModelVersion(BigDecimalVersion
+                               .castAndCheckNotificationVersionToString(vfResourceStructure.getResourceInstance().getResourceVersion()));
+               
+               vnfResource.setModelInvariantUuid(vfResourceStructure.getResourceInstance().getResourceInvariantUUID());
+               vnfResource.setModelCustomizationName(vfResourceStructure.getResourceInstance().getResourceInstanceName());
+               vnfResource.setModelName(vfResourceStructure.getResourceInstance().getResourceName());
+               vnfResource.setServiceModelInvariantUUID(vfResourceStructure.getNotification().getServiceInvariantUUID());
+       
+               vfResourceStructure.setCatalogVnfResource(vnfResource);
+       }
+
+       private static void createVfModule(VfModuleStructure vfModuleStructure,HeatTemplate heatMain, HeatTemplate heatVolume,HeatEnvironment heatEnv, HeatEnvironment heatVolumeEnv) {
+               VfModule vfModule = new VfModule();
+               vfModule.setType(createVfModuleName(vfModuleStructure));
+               vfModule.setAsdcUuid(vfModuleStructure.getVfModuleMetadata().getVfModuleModelUUID());
+               vfModule.setDescription(vfModuleStructure.getVfModuleMetadata().getVfModuleModelDescription());
+
+               if (vfModuleStructure.getVfModuleMetadata().isBase()) {
+                       vfModule.setIsBase(1);
+               } else {
+                       vfModule.setIsBase(0);
+               }
+
+               vfModule.setModelInvariantUuid(vfModuleStructure.getVfModuleMetadata().getVfModuleModelInvariantUUID());
+               vfModule.setModelName(vfModuleStructure.getVfModuleMetadata().getVfModuleModelName());
+               
+               vfModule.setVersion(BigDecimalVersion.castAndCheckNotificationVersionToString(vfModuleStructure.getParentVfResource().getNotification().getServiceVersion()));
+               vfModule.setModelVersion(BigDecimalVersion.castAndCheckNotificationVersionToString(
+                               vfModuleStructure.getVfModuleMetadata().getVfModuleModelVersion()));
+       
+               vfModuleStructure.setCatalogVfModule(vfModule);
+               
+               VfResourceInstaller.createVfModuleLinks(vfModule, vfModuleStructure.getParentVfResource().getCatalogVnfResource(), heatMain,heatVolume, heatEnv,heatVolumeEnv);
+       }
+
+       private static void createVfModuleLinks(VfModule vfModule, VnfResource vnfResource, HeatTemplate heatMain,
+                       HeatTemplate heatVolume, HeatEnvironment heatEnv, HeatEnvironment heatVolumeEnv) {
+               
+               if (heatMain !=null) {
+                       vfModule.setTemplateId(heatMain.getId());
+               }
+               if (heatEnv != null) {
+                       vfModule.setEnvironmentId(heatEnv.getId());
+               }
+               if (heatVolume != null) {
+                       vfModule.setVolTemplateId(heatVolume.getId());
+               }
+               if (heatVolumeEnv != null) {
+                       vfModule.setVolEnvironmentId(heatVolumeEnv.getId());
+               }
+               
+               vfModule.setVnfResourceId(vnfResource.getId());
+
+       }
+
+       private static Set<HeatTemplateParam> extractHeatTemplateParameters(String yamlFile) {
+
+               // Scan the payload downloadResult and extract the HeatTemplate
+               // parameters
+               YamlEditor yamlEditor = new YamlEditor(yamlFile.getBytes());
+               return yamlEditor.getParameterList();
+
+       }
+
+       
+       public static String verifyTheFilePrefixInArtifacts(String filebody, VfResourceStructure vfResourceStructure, List<String> listTypes) {
+               String newFileBody = filebody;
+               for (VfModuleArtifact moduleArtifact:vfResourceStructure.getArtifactsMapByUUID().values()) {
+                       
+                       if (listTypes.contains(moduleArtifact.getArtifactInfo().getArtifactType())) {
+                               
+                               newFileBody = verifyTheFilePrefixInString(newFileBody,moduleArtifact.getArtifactInfo().getArtifactName());
+                       }
+               }
+               return newFileBody;
+       }
+       
+       public static String verifyTheFilePrefixInString(final String body, final String filenameToVerify) {
+               
+               String needlePrefix = "file:///";
+               String prefixedFilenameToVerify = needlePrefix+filenameToVerify;
+               
+               if ((body == null) || (body.length() == 0) || (filenameToVerify == null) || (filenameToVerify.length() == 0)) { 
+                       return body; 
+               } 
+               StringBuffer sb = new StringBuffer(body.length()); 
+               int currentIndex = 0; 
+               int startIndex = 0; 
+               while (currentIndex != -1) { 
+                       startIndex = currentIndex; 
+                       currentIndex = body.indexOf(prefixedFilenameToVerify, startIndex); 
+                       if (currentIndex == -1) { 
+                               break; 
+                       } 
+                       // We append from the startIndex up to currentIndex (start of File Name) 
+                       sb.append(body.substring(startIndex, currentIndex)); 
+                       sb.append(filenameToVerify); 
+                       currentIndex += prefixedFilenameToVerify.length(); 
+               } 
+               sb.append(body.substring(startIndex)); 
+               return sb.toString();
+       }
+       
+       private static void createHeatTemplateFromArtifact(VfResourceStructure vfResourceStructure,
+                       VfModuleArtifact vfModuleArtifact) {
+               HeatTemplate heatTemplate = new HeatTemplate();
+
+               // TODO Set the label
+               heatTemplate.setAsdcLabel("label");
+               // Use the ResourceName of the ASDC template because the HEAT could be
+               // reused
+               heatTemplate.setAsdcResourceName(vfResourceStructure.getResourceInstance().getResourceName());
+               heatTemplate.setAsdcUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+               
+               List<String> typeList = new ArrayList<String>();
+               typeList.add(ASDCConfiguration.HEAT_NESTED);
+               typeList.add(ASDCConfiguration.HEAT_ARTIFACT);
+               
+               heatTemplate.setTemplateBody(verifyTheFilePrefixInArtifacts(vfModuleArtifact.getResult(),vfResourceStructure,typeList));
+               heatTemplate.setTemplateName(vfModuleArtifact.getArtifactInfo().getArtifactName());
+
+               if (vfModuleArtifact.getArtifactInfo().getArtifactTimeout() != null) {
+                       heatTemplate.setTimeoutMinutes(vfModuleArtifact.getArtifactInfo().getArtifactTimeout());
+               } else {
+                       heatTemplate.setTimeoutMinutes(240);
+               }
+
+               heatTemplate.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
+               heatTemplate.setVersion(BigDecimalVersion
+                               .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
+               Set<HeatTemplateParam> heatParam = VfResourceInstaller
+                               .extractHeatTemplateParameters(vfModuleArtifact.getResult());
+               heatTemplate.setParameters(heatParam);
+
+               vfModuleArtifact.setCatalogObject(heatTemplate);
+       }
+
+       private static void createHeatEnvFromArtifact(VfResourceStructure vfResourceStructure,
+                       VfModuleArtifact vfModuleArtifact) {
+               HeatEnvironment heatEnvironment = new HeatEnvironment();
+
+               heatEnvironment.setName(vfModuleArtifact.getArtifactInfo().getArtifactName());
+               // TODO Set the label
+               heatEnvironment.setAsdcLabel("Label");
+               
+               List<String> typeList = new ArrayList<String>();
+               typeList.add(ASDCConfiguration.HEAT);
+               typeList.add(ASDCConfiguration.HEAT_VOL);
+               
+               heatEnvironment.setEnvironment(verifyTheFilePrefixInArtifacts(vfModuleArtifact.getResult(),vfResourceStructure,typeList));
+               heatEnvironment.setAsdcUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+               heatEnvironment.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
+               heatEnvironment.setVersion(BigDecimalVersion
+                               .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
+               heatEnvironment.setAsdcResourceName(VfResourceInstaller.createVNFName(vfResourceStructure));
+
+               vfModuleArtifact.setCatalogObject(heatEnvironment);
+               
+       }
+
+       private static void createHeatFileFromArtifact(VfResourceStructure vfResourceStructure,
+                       VfModuleArtifact vfModuleArtifact) {
+
+               HeatFiles heatFile = new HeatFiles();
+               // TODO Set the label
+               heatFile.setAsdcLabel("Label");
+               heatFile.setAsdcUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+               heatFile.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
+               heatFile.setFileBody(vfModuleArtifact.getResult());
+               heatFile.setFileName(vfModuleArtifact.getArtifactInfo().getArtifactName());
+               heatFile.setVersion(BigDecimalVersion
+                               .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
+
+               heatFile.setAsdcResourceName(vfResourceStructure.getResourceInstance().getResourceName());
+               vfModuleArtifact.setCatalogObject(heatFile);
+               
+       }
+
+       private static void createService(VfResourceStructure vfResourceStructure) {
+               
+               Service service = new Service();
+               service.setDescription(vfResourceStructure.getNotification().getServiceDescription());
+               service.setServiceName(vfResourceStructure.getNotification().getServiceName());
+               service.setServiceNameVersionId(vfResourceStructure.getNotification().getServiceUUID());
+               service.setVersion(vfResourceStructure.getNotification().getServiceVersion());
+               service.setModelInvariantUUID(vfResourceStructure.getNotification().getServiceInvariantUUID());
+                               
+               vfResourceStructure.setCatalogService(service);
+       }
+       
+       
+       private static String createVNFName(VfResourceStructure vfResourceStructure) {
+
+               return vfResourceStructure.getNotification().getServiceName() + "/" + vfResourceStructure.getResourceInstance().getResourceInstanceName();
+       }
+
+       private static String createVfModuleName(VfModuleStructure vfModuleStructure) {
+               
+               return createVNFName(vfModuleStructure.getParentVfResource())+"::"+vfModuleStructure.getVfModuleMetadata().getVfModuleModelName();
+       }
+
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java
new file mode 100644 (file)
index 0000000..312613d
--- /dev/null
@@ -0,0 +1,335 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.util;
+
+
+import java.util.List;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+
+public class ASDCNotificationLogging {
+
+       public static String dumpASDCNotification(INotificationData asdcNotification) {
+               
+               if (asdcNotification == null) {
+                       return "NULL";
+               }
+               StringBuffer buffer = new StringBuffer("ASDC Notification:");
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("DistributionID:");
+               buffer.append(testNull(asdcNotification.getDistributionID()));
+               buffer.append(System.lineSeparator());
+               
+               
+               buffer.append("ServiceName:");
+               buffer.append(testNull(asdcNotification.getServiceName()));
+               buffer.append(System.lineSeparator());
+               
+               
+               buffer.append("ServiceVersion:");
+               buffer.append(testNull(asdcNotification.getServiceVersion()));
+               buffer.append(System.lineSeparator());
+               
+               
+               buffer.append("ServiceUUID:");
+               buffer.append(testNull(asdcNotification.getServiceUUID()));
+               buffer.append(System.lineSeparator());
+       
+               
+               buffer.append("ServiceInvariantUUID:");
+               buffer.append(testNull(asdcNotification.getServiceInvariantUUID()));
+               buffer.append(System.lineSeparator());
+               
+               
+               buffer.append("ServiceDescription:");
+               buffer.append(testNull(asdcNotification.getServiceDescription()));
+               buffer.append(System.lineSeparator());
+       
+               
+               buffer.append("Service Artifacts List:");
+               buffer.append(System.lineSeparator());
+               buffer.append(testNull(dumpArtifactInfoList(asdcNotification.getServiceArtifacts())));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("Resource Instances List:");
+               buffer.append(System.lineSeparator());
+               buffer.append(testNull(dumpASDCResourcesList(asdcNotification)));
+               buffer.append(System.lineSeparator());
+               
+               
+               return buffer.toString();
+       }
+       
+       public static String dumpVfModuleMetaDataList(List<IVfModuleMetadata> moduleMetaDataList) {
+               if (moduleMetaDataList == null ) {
+                       return null;
+               }
+               
+               StringBuffer buffer = new StringBuffer();               
+               buffer.append("{");
+               
+               for (IVfModuleMetadata moduleMetaData:moduleMetaDataList) {
+                       buffer.append(System.lineSeparator());
+                       buffer.append(testNull(dumpVfModuleMetaData(moduleMetaData)));
+                       buffer.append(System.lineSeparator());
+                       buffer.append(",");
+                       
+               }
+               buffer.replace(buffer.length()-1,buffer.length(), System.lineSeparator());
+               buffer.append("}");
+               buffer.append(System.lineSeparator());
+               
+               return buffer.toString();
+       }
+       
+       private static String dumpVfModuleMetaData(IVfModuleMetadata moduleMetaData) {
+                               
+               if (moduleMetaData == null ) {
+                       return "NULL";
+               }
+               
+               StringBuffer buffer = new StringBuffer("VfModuleMetaData:");
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("VfModuleModelName:");
+               buffer.append(testNull(moduleMetaData.getVfModuleModelName()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("VfModuleModelVersion:");
+               buffer.append(testNull(moduleMetaData.getVfModuleModelVersion()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("VfModuleModelUUID:");
+               buffer.append(testNull(moduleMetaData.getVfModuleModelUUID()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("VfModuleModelInvariantUUID:");
+               buffer.append(testNull(moduleMetaData.getVfModuleModelInvariantUUID()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("VfModuleModelDescription:");
+               buffer.append(testNull(moduleMetaData.getVfModuleModelDescription()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("Artifacts UUID List:");
+               
+               if (moduleMetaData.getArtifacts() != null) {
+                       buffer.append("{");
+                       
+                       for (String artifactUUID:moduleMetaData.getArtifacts()) {
+                               buffer.append(System.lineSeparator());
+                               buffer.append(testNull(artifactUUID));
+                               buffer.append(System.lineSeparator());
+                               buffer.append(",");
+                       }
+                       buffer.replace(buffer.length()-1,buffer.length(), System.lineSeparator());
+                       buffer.append("}");
+                       buffer.append(System.lineSeparator());
+               } else {
+                       buffer.append("NULL");
+               }
+               
+               
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("isBase:");
+               buffer.append(moduleMetaData.isBase());
+               buffer.append(System.lineSeparator());
+               
+               return buffer.toString();
+       }
+       
+       private static String testNull(Object object) {
+               if (object == null) {
+                       return "NULL";
+               } else if (object instanceof Integer) {
+                       return object.toString();
+               } else if (object instanceof String) {
+                       return (String)object;
+               } else {
+                       return "Type not recognized";
+               }
+       }
+       
+       private static String dumpASDCResourcesList(INotificationData asdcNotification) {
+               if (asdcNotification == null || asdcNotification.getResources() == null) {
+                       return null;
+               }
+               
+               StringBuffer buffer = new StringBuffer();               
+               buffer.append("{");
+               
+               for (IResourceInstance resourceInstanceElem:asdcNotification.getResources()) {
+                       buffer.append(System.lineSeparator());
+                       buffer.append(testNull(dumpASDCResourceInstance(resourceInstanceElem)));
+                       buffer.append(System.lineSeparator());
+                       buffer.append(",");
+               }
+               buffer.replace(buffer.length()-1,buffer.length(), System.lineSeparator());
+               buffer.append("}");
+               buffer.append(System.lineSeparator());
+               
+               return buffer.toString();
+               
+       }
+       
+       private static String dumpASDCResourceInstance(IResourceInstance resourceInstance) {
+               
+               if (resourceInstance == null) {
+                       return null;
+               }
+               
+               StringBuffer buffer = new StringBuffer("Resource Instance Info:");
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ResourceInstanceName:");
+               buffer.append(testNull(resourceInstance.getResourceInstanceName()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ResourceInvariantUUID:");
+               buffer.append(testNull(resourceInstance.getResourceInvariantUUID()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ResourceName:");
+               buffer.append(testNull(resourceInstance.getResourceName()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ResourceType:");
+               buffer.append(testNull(resourceInstance.getResourceType()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ResourceUUID:");
+               buffer.append(testNull(resourceInstance.getResourceUUID()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ResourceVersion:");
+               buffer.append(testNull(resourceInstance.getResourceVersion()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("Resource Artifacts List:");
+               buffer.append(System.lineSeparator());
+               buffer.append(testNull(dumpArtifactInfoList(resourceInstance.getArtifacts())));
+               buffer.append(System.lineSeparator());
+               
+               return buffer.toString();
+               
+       }
+       
+       
+       private static String dumpArtifactInfoList(List<IArtifactInfo> artifactsList) {
+               
+               if (artifactsList == null || artifactsList.isEmpty()) {
+                       return null;
+               }
+               
+               StringBuffer buffer = new StringBuffer();               
+               buffer.append("{");
+               for (IArtifactInfo artifactInfoElem:artifactsList) {
+                       buffer.append(System.lineSeparator());
+                       buffer.append(testNull(dumpASDCArtifactInfo(artifactInfoElem)));
+                       buffer.append(System.lineSeparator());
+                       buffer.append(",");
+                       
+               }
+               buffer.replace(buffer.length()-1,buffer.length(), System.lineSeparator());
+               buffer.append("}");
+               buffer.append(System.lineSeparator());
+               
+               return buffer.toString();
+       }
+       
+       private static String dumpASDCArtifactInfo(IArtifactInfo artifactInfo) {
+               
+               if (artifactInfo == null) {
+                       return null;
+               }
+               
+               StringBuffer buffer = new StringBuffer("Service Artifacts Info:");
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ArtifactName:");
+               buffer.append(testNull(artifactInfo.getArtifactName()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ArtifactVersion:");
+               buffer.append(testNull(artifactInfo.getArtifactVersion()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ArtifactType:");
+               buffer.append(testNull(artifactInfo.getArtifactType()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ArtifactDescription:");
+               buffer.append(testNull(artifactInfo.getArtifactDescription()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ArtifactTimeout:");
+               buffer.append(testNull(artifactInfo.getArtifactTimeout()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ArtifactURL:");
+               buffer.append(testNull(artifactInfo.getArtifactURL()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ArtifactUUID:");
+               buffer.append(testNull(artifactInfo.getArtifactUUID()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("ArtifactChecksum:");
+               buffer.append(testNull(artifactInfo.getArtifactChecksum()));
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("GeneratedArtifact:");
+               buffer.append("{");
+               buffer.append(testNull(dumpASDCArtifactInfo(artifactInfo.getGeneratedArtifact())));
+               buffer.append(System.lineSeparator());
+               buffer.append("}");
+               buffer.append(System.lineSeparator());
+               
+               buffer.append("RelatedArtifacts:");
+               
+               
+               if (artifactInfo.getRelatedArtifacts() != null) {
+                       buffer.append("{");
+                       buffer.append(System.lineSeparator());
+                       for (IArtifactInfo artifactInfoElem:artifactInfo.getRelatedArtifacts()) {
+                                                       
+                               buffer.append(testNull(dumpASDCArtifactInfo(artifactInfoElem)));
+                               buffer.append(System.lineSeparator());
+                               buffer.append(",");
+                       
+                       }
+                       buffer.replace(buffer.length()-1,buffer.length(), System.lineSeparator());
+                       buffer.append("}");
+                       buffer.append(System.lineSeparator());
+               } else {
+                       buffer.append("NULL");
+               }
+               
+               buffer.append(System.lineSeparator());
+               
+               return buffer.toString();
+       }
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
new file mode 100644 (file)
index 0000000..b45cf06
--- /dev/null
@@ -0,0 +1,168 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+
+package org.openecomp.mso.asdc.util;
+
+
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.sdc.api.notification.INotificationData;
+
+
+public class NotificationLogging implements InvocationHandler {
+       
+       private static Map<Object, List<Method>> objectMethodsToLog = new HashMap<>();
+
+       private static InvocationHandler handler = new InvocationHandler() {
+               @Override
+               public Object invoke(Object arg0, Method arg1, Object[] arg2)
+                               throws Throwable {
+                       List<Method> methods = objectMethodsToLog.get(arg0);
+                       if ((methods == null) || (methods.isEmpty())) {
+                               // Do nothing for now...
+                               return null;
+                       }
+                       methods.add(arg1);
+                       return arg1.invoke(arg0, arg2);
+               }
+       };
+       
+       public static InvocationHandler getHandler() {
+               return handler;
+       }
+       
+       /**
+        * 
+        */
+       private NotificationLogging() {}
+       
+       private static final String[] GETTER_PREFIXES = { "get", "is" };
+       
+       public static String logNotification(INotificationData iNotif) {
+               if (iNotif == null) {
+                       return "NULL";
+               }
+
+               Class<? extends INotificationData> clazz = iNotif.getClass();
+               
+               Method[] declaredMethods = clazz.getDeclaredMethods();
+               
+               if (declaredMethods == null || declaredMethods.length == 0) {
+                       return "EMPTY"; // No declared methods in this class !!!
+               }
+               
+               StringBuffer buffer = new StringBuffer("ASDC Notification:");
+               buffer.append(System.lineSeparator());
+               
+               for (Method m : declaredMethods) {
+                       if ((m != null) && isGetter(m)) {
+                               for (String prefix : GETTER_PREFIXES) {
+                                       if (m.getName().startsWith(prefix)) {
+                                               buffer.append(m.getName().substring(prefix.length()));
+                                               break;
+                                       }
+                               }
+                               try {
+                                       buffer.append(testNull(m.invoke(iNotif, (Object[])null)));
+                               } catch (IllegalAccessException | IllegalArgumentException
+                                               | InvocationTargetException e) {
+                                       buffer.append("UNREADABLE");
+                               }
+                               buffer.append(System.lineSeparator());
+                       }
+               }
+               
+               return buffer.toString();
+       }
+       
+       private static final boolean isGetter(Method method) {
+
+               // Must start with a valid (and known) prefix
+               boolean prefixFound = false;
+               for (String prefix : GETTER_PREFIXES) {
+                       if (method.getName().startsWith(prefix)) {
+                               prefixFound = true;
+                               break;
+                       }
+               }
+               if (!prefixFound) {
+                       return false;
+               }
+
+               // Must not take any input arguments
+               if (method.getParameterTypes().length != 0) {
+                       return false;  
+               }
+               
+               // Must not have return type 'void'
+               if (void.class.equals(method.getReturnType())) {
+                       return false;
+               }
+               
+               // Must be public
+               if (!Modifier.isPublic(method.getModifiers())) {
+                       return false;
+               }
+               
+               return true;
+       }
+       
+       private static String testNull(Object object) {
+               if (object == null) {
+                       return "NULL";
+               } else if (object instanceof Integer) {
+                       return object.toString();
+               } else if (object instanceof String) {
+                       return (String) object;
+               } else {
+                       return "Type not recognized";
+               }
+       }
+       
+       private static void registerForLog(INotificationData objectToLog) {
+               INotificationData proxy = (INotificationData) Proxy.newProxyInstance(
+                               INotificationData.class.getClassLoader(),
+                               new Class[] { INotificationData.class },
+                               NotificationLogging.getHandler());
+               objectMethodsToLog.put(proxy, new ArrayList<Method>());
+       }
+       
+       private static <T> void methodToLog(T methodCall) {
+               //
+       }
+
+       @Override
+       public Object invoke(Object proxy, Method method, Object[] args)
+                       throws Throwable {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ToLog.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ToLog.java
new file mode 100644 (file)
index 0000000..524cc97
--- /dev/null
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+
+package org.openecomp.mso.asdc.util;
+
+
+
+
+public @interface ToLog {
+
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/YamlEditor.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/YamlEditor.java
new file mode 100644 (file)
index 0000000..773ff86
--- /dev/null
@@ -0,0 +1,177 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.util;
+
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.yaml.snakeyaml.Yaml;
+
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+
+public class YamlEditor {
+
+    private static final String REFER_PATTERN = "file:///";
+    private Map <String, Object> yml;
+    private Yaml yaml = new Yaml ();
+
+    public YamlEditor () {
+
+    }
+
+    public YamlEditor (byte[] body) {
+        init (body);
+    }
+
+    @SuppressWarnings("unchecked")
+    private synchronized void init (byte[] body) {
+        InputStream input = new ByteArrayInputStream (body);
+        yml = (Map <String, Object>) yaml.load (input);
+    }
+
+    public synchronized List <String> getYamlNestedFileResourceTypeList () {
+        List <String> typeList = new ArrayList <String> ();
+
+        @SuppressWarnings("unchecked")
+        Map <String, Object> resourceMap = (Map <String, Object>) yml.get ("resources");
+        Iterator <Entry <String, Object>> it = resourceMap.entrySet ().iterator ();
+        while (it.hasNext ()) {
+            Map.Entry <String, Object> pair = it.next ();
+            @SuppressWarnings("unchecked")
+            Map <String, String> resourceEntry = (Map <String, String>) pair.getValue ();
+            String type = resourceEntry.get ("type");
+
+            if (type.contains (REFER_PATTERN)) {
+                typeList.add (type);
+            }
+            it.remove (); // avoids a ConcurrentModificationException
+        }
+        return typeList;
+    }
+    
+    public synchronized List <String> getYamlResourceTypeList () {
+        List <String> typeList = new ArrayList <String> ();
+
+        @SuppressWarnings("unchecked")
+        Map <String, Object> resourceMap = (Map <String, Object>) yml.get ("resources");
+        Iterator <Entry <String, Object>> it = resourceMap.entrySet ().iterator ();
+        while (it.hasNext ()) {
+            Map.Entry <String, Object> pair = it.next ();
+            @SuppressWarnings("unchecked")
+            Map <String, String> resourceEntry = (Map <String, String>) pair.getValue ();
+            typeList.add (resourceEntry.get ("type"));
+        }
+        return typeList;
+    }    
+
+    // Generate the parameter list based on the Heat Template
+    // Based on the email from Ella Kvetny:
+    // Within Heat Template, under parameters catalog, it might indicate the default value of the parameter
+    // If default value exist, the parameter is not mandatory, otherwise its value should be set
+    public synchronized Set <HeatTemplateParam> getParameterList () {
+        Set <HeatTemplateParam> paramSet = new HashSet <HeatTemplateParam> ();
+        @SuppressWarnings("unchecked")
+        Map <String, Object> resourceMap = (Map <String, Object>) yml.get ("parameters");
+        Iterator <Entry <String, Object>> it = resourceMap.entrySet ().iterator ();
+
+        while (it.hasNext ()) {
+            HeatTemplateParam param = new HeatTemplateParam ();
+            Map.Entry <String, Object> pair = it.next ();
+            @SuppressWarnings("unchecked")
+            Map <String, String> resourceEntry = (Map <String, String>) pair.getValue ();
+            
+            param.setParamName (pair.getKey ());
+            // System.out.println(pair.getKey()+":"+type);
+            if (resourceEntry.containsKey("default")) {
+                param.setRequired (false);
+            } else {
+                param.setRequired (true);
+            }
+            // Now set the type
+            String value = resourceEntry.get ("type");
+            param.setParamType (value);
+
+            paramSet.add (param);
+
+        }
+        return paramSet;
+
+    }
+
+    public synchronized void addParameterList (Set <HeatTemplateParam> heatSet) {
+
+        @SuppressWarnings("unchecked")
+        Map <String, Object> resourceMap = (Map <String, Object>) yml.get ("parameters");
+        if (resourceMap == null) {
+            resourceMap = new LinkedHashMap <String, Object> ();
+            this.yml.put ("parameters", resourceMap);
+        }
+        for (HeatTemplateParam heatParam : heatSet) {
+            Map <String, Object> paramInfo = new HashMap <String, Object> ();
+            paramInfo.put ("type", heatParam.getParamType ());
+
+            resourceMap.put (heatParam.getParamName (), paramInfo);
+        }
+
+        // this.yml.put("parameters", resourceMap);
+
+    }
+
+    public boolean isParentTemplate (String templateBody) {
+        return templateBody.contains (REFER_PATTERN);
+    }
+
+    public boolean verifyTemplate () {
+        // Verify whether the heat template is for Vnf Resource
+        // We don't support other template installation yet
+
+        return true;
+    }
+
+    public String encode (Map <String, Object> content) {
+        return yaml.dump (content);
+    }
+
+    public synchronized String encode () {
+        return this.yaml.dump (this.yml);
+    }
+
+    /**
+     * This method return the YAml file as a string.
+     * 
+     */
+    @Override
+    public String toString () {
+
+        return encode ();
+    }
+
+}
diff --git a/asdc-controller/src/main/resources/config-key.properties b/asdc-controller/src/main/resources/config-key.properties
new file mode 100644 (file)
index 0000000..b6a0cde
--- /dev/null
@@ -0,0 +1,21 @@
+###
+# ============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=========================================================
+###
+
+asdc.config.key=566B754875657232314F5548556D3665
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/ASDCControllerSingletonESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/ASDCControllerSingletonESTest.java
new file mode 100644 (file)
index 0000000..9ca02e2
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:38:29 GMT 2016
+ */
+
+package org.openecomp.mso.asdc;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ASDCControllerSingletonESTest extends ASDCControllerSingletonESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ASDCControllerSingleton aSDCControllerSingleton0 = new ASDCControllerSingleton();
+      PrivateAccess.callMethod((Class<ASDCControllerSingleton>) ASDCControllerSingleton.class, aSDCControllerSingleton0, "setWorking", (Object) true, (Class<?>) boolean.class);
+      aSDCControllerSingleton0.periodicControllerTask();
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      ASDCControllerSingleton aSDCControllerSingleton0 = new ASDCControllerSingleton();
+      Object object0 = PrivateAccess.callMethod((Class<ASDCControllerSingleton>) ASDCControllerSingleton.class, aSDCControllerSingleton0, "terminate");
+      assertNull(object0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      ASDCControllerSingleton aSDCControllerSingleton0 = new ASDCControllerSingleton();
+      aSDCControllerSingleton0.periodicControllerTask();
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/ASDCControllerSingletonESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/ASDCControllerSingletonESTestscaffolding.java
new file mode 100644 (file)
index 0000000..e099e9c
--- /dev/null
@@ -0,0 +1,120 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:38:29 GMT 2016
+ */
+
+package org.openecomp.mso.asdc;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ASDCControllerSingletonESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.ASDCControllerSingleton"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+ private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ASDCControllerSingletonESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.properties.AbstractMsoProperties",
+      "org.openecomp.mso.properties.MsoPropertiesParameters$MsoPropertiesType",
+      "org.openecomp.mso.properties.MsoPropertiesParameters",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.openecomp.mso.properties.MsoJavaProperties",
+      "org.openecomp.mso.asdc.client.exceptions.ASDCParametersException",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.properties.MsoPropertiesException",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.properties.MsoJsonProperties",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.asdc.ASDCControllerSingleton",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.configuration.EELFManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.openecomp.mso.properties.MsoPropertiesFactory",
+      "org.openecomp.mso.asdc.client.ASDCGlobalController",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.asdc.client.exceptions.ASDCControllerException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ASDCControllerSingletonESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.asdc.ASDCControllerSingleton",
+      "org.openecomp.mso.asdc.client.ASDCGlobalController",
+      "org.openecomp.mso.properties.MsoPropertiesFactory",
+      "org.openecomp.mso.properties.MsoPropertiesParameters$MsoPropertiesType",
+      "org.openecomp.mso.properties.MsoPropertiesException",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTest.java
new file mode 100644 (file)
index 0000000..e2112ce
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:39:00 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+import org.openecomp.sdc.utils.DistributionStatusEnum;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class DistributionStatusMessageESTest extends DistributionStatusMessageESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED;
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, distributionStatusEnum0, 1L);
+      long long0 = distributionStatusMessage0.getTimestamp();
+      assertEquals(1L, long0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DEPLOYED;
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage("n*lho0\"NQ4azb%8]KN", "n*lho0\"NQ4azb%8]KN", "BMWmXl2i-B", distributionStatusEnum0, (-58L));
+      long long0 = distributionStatusMessage0.getTimestamp();
+      assertEquals("BMWmXl2i-B", distributionStatusMessage0.getDistributionID());
+      assertEquals((-58L), long0);
+      assertEquals("n*lho0\"NQ4azb%8]KN", distributionStatusMessage0.getConsumerID());
+      assertEquals("n*lho0\"NQ4azb%8]KN", distributionStatusMessage0.getArtifactURL());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED;
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, distributionStatusEnum0, 1L);
+      DistributionStatusEnum distributionStatusEnum1 = distributionStatusMessage0.getStatus();
+      DistributionStatusMessage distributionStatusMessage1 = new DistributionStatusMessage("", (String) null, "*? q^M(_q^3$ZQ", distributionStatusEnum1, (-833L));
+      String string0 = distributionStatusMessage1.getDistributionID();
+      assertNotNull(string0);
+      assertEquals((-833L), distributionStatusMessage1.getTimestamp());
+      assertEquals("", distributionStatusMessage1.getArtifactURL());
+      assertEquals("*? q^M(_q^3$ZQ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED;
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage("", "", "", distributionStatusEnum0, 1L);
+      distributionStatusMessage0.getDistributionID();
+      assertEquals(1L, distributionStatusMessage0.getTimestamp());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED;
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage("ALREADY_DEPLOYED", "ALREADY_DEPLOYED", "ALREADY_DEPLOYED", distributionStatusEnum0, 0L);
+      String string0 = distributionStatusMessage0.getConsumerID();
+      assertEquals("ALREADY_DEPLOYED", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED;
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, distributionStatusEnum0, 1L);
+      DistributionStatusEnum distributionStatusEnum1 = distributionStatusMessage0.getStatus();
+      DistributionStatusMessage distributionStatusMessage1 = new DistributionStatusMessage((String) null, "", "Qcuo3~gd})vsI*", distributionStatusEnum1, 0L);
+      String string0 = distributionStatusMessage1.getConsumerID();
+      assertNotNull(string0);
+      assertEquals(1L, distributionStatusMessage0.getTimestamp());
+      assertEquals("", string0);
+      assertEquals("Qcuo3~gd})vsI*", distributionStatusMessage1.getDistributionID());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED;
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage("ALREADY_DEPLOYED", "ALREADY_DEPLOYED", "ALREADY_DEPLOYED", distributionStatusEnum0, 0L);
+      String string0 = distributionStatusMessage0.getArtifactURL();
+      assertEquals("ALREADY_DEPLOYED", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED;
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, distributionStatusEnum0, 1L);
+      DistributionStatusEnum distributionStatusEnum1 = distributionStatusMessage0.getStatus();
+      DistributionStatusMessage distributionStatusMessage1 = new DistributionStatusMessage("", (String) null, "*? q^M(_q^3$ZQ", distributionStatusEnum1, (-833L));
+      String string0 = distributionStatusMessage1.getArtifactURL();
+      assertEquals("", string0);
+      assertEquals("*? q^M(_q^3$ZQ", distributionStatusMessage1.getDistributionID());
+      assertNotNull(string0);
+      assertEquals((-833L), distributionStatusMessage1.getTimestamp());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L);
+      long long0 = distributionStatusMessage0.getTimestamp();
+      assertEquals(0L, long0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L);
+      String string0 = distributionStatusMessage0.getDistributionID();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L);
+      distributionStatusMessage0.getStatus();
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L);
+      String string0 = distributionStatusMessage0.getConsumerID();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L);
+      String string0 = distributionStatusMessage0.getArtifactURL();
+      assertNull(string0);
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTestscaffolding.java
new file mode 100644 (file)
index 0000000..f234ca6
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:39:00 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class DistributionStatusMessageESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.client.DistributionStatusMessage"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DistributionStatusMessageESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.sdc.utils.DistributionStatusEnum",
+      "org.openecomp.mso.asdc.client.DistributionStatusMessage",
+      "org.openecomp.sdc.api.consumer.IDistributionStatusMessage"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTest.java
new file mode 100644 (file)
index 0000000..37af59c
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:39:27 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.mock.java.lang.MockThrowable;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ASDCControllerExceptionESTest extends ASDCControllerExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ASDCControllerException aSDCControllerException0 = new ASDCControllerException("org.openecomp.mso.asdc.client.exceptions.ASDCControllerException");
+      MockThrowable mockThrowable0 = new MockThrowable("B+;:\"w4^M(-Y:e~=", (Throwable) aSDCControllerException0);
+      ASDCControllerException aSDCControllerException1 = new ASDCControllerException("The list of prefixes must not be null", (Throwable) mockThrowable0);
+      assertFalse(aSDCControllerException1.equals((Object)aSDCControllerException0));
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..d6041c2
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:39:27 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ASDCControllerExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.client.exceptions.ASDCControllerException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ASDCControllerExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.asdc.client.exceptions.ASDCControllerException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ASDCControllerExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.asdc.client.exceptions.ASDCControllerException"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTest.java
new file mode 100644 (file)
index 0000000..75f4b5d
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:38:49 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ASDCDownloadExceptionESTest extends ASDCDownloadExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ASDCDownloadException aSDCDownloadException0 = new ASDCDownloadException("");
+      ASDCDownloadException aSDCDownloadException1 = new ASDCDownloadException("", (Throwable) aSDCDownloadException0);
+      assertFalse(aSDCDownloadException1.equals((Object)aSDCDownloadException0));
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..5db3c20
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:38:49 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ASDCDownloadExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.client.exceptions.ASDCDownloadException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ASDCDownloadExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.asdc.client.exceptions.ASDCDownloadException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ASDCDownloadExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.asdc.client.exceptions.ASDCDownloadException"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTest.java
new file mode 100644 (file)
index 0000000..afc2834
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:39:10 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ASDCParametersExceptionESTest extends ASDCParametersExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ASDCParametersException aSDCParametersException0 = new ASDCParametersException("4vI_{2b<h&iIy");
+      ASDCParametersException aSDCParametersException1 = new ASDCParametersException((String) null, (Throwable) aSDCParametersException0);
+      assertFalse(aSDCParametersException1.equals((Object)aSDCParametersException0));
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..ce3afc9
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:39:10 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ASDCParametersExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.client.exceptions.ASDCParametersException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ASDCParametersExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.asdc.client.exceptions.ASDCParametersException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ASDCParametersExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.asdc.client.exceptions.ASDCParametersException"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTest.java
new file mode 100644 (file)
index 0000000..2a1c817
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:38:39 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ArtifactInstallerExceptionESTest extends ArtifactInstallerExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ArtifactInstallerException artifactInstallerException0 = new ArtifactInstallerException("kD=Ua3[");
+      ArtifactInstallerException artifactInstallerException1 = new ArtifactInstallerException("kD=Ua3[", (Throwable) artifactInstallerException0);
+      assertFalse(artifactInstallerException1.equals((Object)artifactInstallerException0));
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..0bd3d65
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:38:39 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.client.exceptions;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ArtifactInstallerExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ArtifactInstallerExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ArtifactInstallerExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCConfigurationTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCConfigurationTest.java
new file mode 100644 (file)
index 0000000..168f830
--- /dev/null
@@ -0,0 +1,356 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.tests;
+
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+import org.openecomp.mso.asdc.client.exceptions.ASDCParametersException;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+/**
+ * THis class tests the ASDC Controller by using the ASDC Mock CLient
+ * 
+ *
+ */
+public class ASDCConfigurationTest {
+       
+       public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       public final String ASDC_PROP = ASDCConfigurationTest.class.getClassLoader().getResource("mso.json").toString().substring(5);
+       public final String ASDC_PROP2 = ASDCConfigurationTest.class.getClassLoader().getResource("mso2.json").toString().substring(5);
+       public final String ASDC_PROP3 = ASDCConfigurationTest.class.getClassLoader().getResource("mso3.json").toString().substring(5);
+       public final String ASDC_PROP_BAD = ASDCConfigurationTest.class.getClassLoader().getResource("mso-bad.json").toString().substring(5);
+       public final String ASDC_PROP_WITH_NULL = ASDCConfigurationTest.class.getClassLoader().getResource("mso-with-NULL.json").toString().substring(5);
+       public final String ASDC_PROP_DOUBLE_CONFIG = ASDCConfigurationTest.class.getClassLoader().getResource("mso-two-configs.json").toString().substring(5);
+       public final String ASDC_PROP4_WITH_TLS = ASDCConfigurationTest.class.getClassLoader().getResource("mso4-with-TLS.json").toString().substring(5);
+       
+       @BeforeClass
+       public static final void prepareBeforeAllTests() {
+               msoPropertiesFactory.removeAllMsoProperties();
+       }
+       
+       @Before
+       public final void prepareBeforeEachTest () throws MsoPropertiesException {
+               msoPropertiesFactory.initializeMsoProperties(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+       }
+       
+       @After
+       public final void cleanAfterEachTest () {
+               msoPropertiesFactory.removeAllMsoProperties();
+       }
+       
+       @Test
+       public final void testTheInit() throws ASDCParametersException, IOException {
+               ASDCConfiguration asdcConfig = new ASDCConfiguration("asdc-controller1");
+               assertNotNull(asdcConfig.getUser());
+               assertTrue("User".equals(asdcConfig.getUser()));
+               
+               assertNotNull(asdcConfig.getPassword());
+               assertTrue("ThePassword".equals(asdcConfig.getPassword()));
+               
+               assertNotNull(asdcConfig.getConsumerGroup());
+               assertTrue("consumerGroup".equals(asdcConfig.getConsumerGroup()));
+               
+               assertNotNull(asdcConfig.getConsumerID());
+               assertTrue("consumerId".equals(asdcConfig.getConsumerID()));
+               
+               assertNotNull(asdcConfig.getEnvironmentName());
+               assertTrue("environmentName".equals(asdcConfig.getEnvironmentName()));
+               
+               assertNotNull(asdcConfig.getAsdcAddress());
+               assertTrue("hostname".equals(asdcConfig.getAsdcAddress()));
+               
+               assertNotNull(asdcConfig.getPollingInterval());
+               assertTrue(asdcConfig.getPollingInterval() == 10);
+               
+               assertNotNull(asdcConfig.getPollingTimeout());
+               assertTrue(asdcConfig.getPollingTimeout() == 30);
+               
+               assertNotNull(asdcConfig.getRelevantArtifactTypes());
+               assertTrue(asdcConfig.getRelevantArtifactTypes().size() == ASDCConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST.size());
+               
+               assertFalse(asdcConfig.activateServerTLSAuth());
+               
+       }
+       
+       @Test
+       public final void testAllParametersMethod() throws ASDCParametersException, IOException {
+               ASDCConfiguration asdcConfig = new ASDCConfiguration("asdc-controller1");
+               
+               // No exception should be raised
+               asdcConfig.testAllParameters();
+       }
+
+       @Test
+       public final void testTheRefreshConfigFalseCase() throws ASDCParametersException, IOException {
+               ASDCConfiguration asdcConfig = new ASDCConfiguration("asdc-controller1");
+               
+               // No update should be done as we use the mso.properties located in the resource folder for testing
+               assertFalse(asdcConfig.hasASDCConfigChanged());
+               assertFalse(asdcConfig.refreshASDCConfig());
+               
+               assertNotNull(asdcConfig.getUser());
+               assertTrue("User".equals(asdcConfig.getUser()));
+               
+               assertNotNull(asdcConfig.getPassword());
+               assertTrue("ThePassword".equals(asdcConfig.getPassword()));
+               
+               assertNotNull(asdcConfig.getConsumerGroup());
+               assertTrue("consumerGroup".equals(asdcConfig.getConsumerGroup()));
+               
+               assertNotNull(asdcConfig.getConsumerID());
+               assertTrue("consumerId".equals(asdcConfig.getConsumerID()));
+               
+               assertNotNull(asdcConfig.getEnvironmentName());
+               assertTrue("environmentName".equals(asdcConfig.getEnvironmentName()));
+               
+               assertNotNull(asdcConfig.getAsdcAddress());
+               assertTrue("hostname".equals(asdcConfig.getAsdcAddress()));
+               
+               assertNotNull(asdcConfig.getPollingInterval());
+               assertTrue(asdcConfig.getPollingInterval() == 10);
+               
+               assertNotNull(asdcConfig.getPollingTimeout());
+               assertTrue(asdcConfig.getPollingTimeout() == 30);
+               
+               assertNotNull(asdcConfig.getRelevantArtifactTypes());
+               assertTrue(asdcConfig.getRelevantArtifactTypes().size() == ASDCConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST.size());
+               
+               msoPropertiesFactory.removeAllMsoProperties();
+               
+               try {
+                       asdcConfig.refreshASDCConfig();
+                       fail("Should have thrown an ASDCParametersException because config does not exist anymore!");
+               } catch (ASDCParametersException e) {
+                       assertTrue(e.getMessage().contains(("mso.asdc.json not initialized properly, ASDC config cannot be reloaded")));
+               }
+               
+               try {
+                       asdcConfig.hasASDCConfigChanged();
+                       fail("Should have thrown an ASDCParametersException because config does not exist anymore!");
+               } catch (ASDCParametersException e) {
+                       assertTrue(e.getMessage().contains(("mso.asdc.json not initialized properly, ASDC config cannot be read")));
+               }
+               
+       }       
+       
+       
+       @Test
+       public final void testToChangeTheFileAndRefresh () throws ASDCParametersException, IOException, MsoPropertiesException  {
+               ASDCConfiguration asdcConfig = new ASDCConfiguration("asdc-controller1");
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP2);
+               msoPropertiesFactory.reloadMsoProperties();
+               
+               // SHould be the same file untouched just a different file name, there should be no difference between them
+               // In a normal case a different Filename should force the system to reload the config but not here as we have changed the filename by reflection
+               assertFalse(asdcConfig.hasASDCConfigChanged());
+               assertFalse(asdcConfig.refreshASDCConfig());
+
+               assertNotNull(asdcConfig.getUser());
+               assertTrue("User".equals(asdcConfig.getUser()));
+
+               assertNotNull(asdcConfig.getPassword());
+               assertTrue("ThePassword".equals(asdcConfig.getPassword()));
+
+               assertNotNull(asdcConfig.getConsumerGroup());
+               assertTrue("consumerGroup".equals(asdcConfig.getConsumerGroup()));
+
+               assertNotNull(asdcConfig.getConsumerID());
+               assertTrue("consumerId".equals(asdcConfig.getConsumerID()));
+
+               assertNotNull(asdcConfig.getEnvironmentName());
+               assertTrue("environmentName".equals(asdcConfig.getEnvironmentName()));
+
+               assertNotNull(asdcConfig.getAsdcAddress());
+               assertTrue("hostname".equals(asdcConfig.getAsdcAddress()));
+
+               assertNotNull(asdcConfig.getPollingInterval());
+               assertTrue(asdcConfig.getPollingInterval() == 10);
+
+               assertNotNull(asdcConfig.getPollingTimeout());
+               assertTrue(asdcConfig.getPollingTimeout() == 30);
+
+               assertNotNull(asdcConfig.getRelevantArtifactTypes());
+               assertTrue(asdcConfig.getRelevantArtifactTypes().size() == ASDCConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST.size());
+
+               // Set another file that has some attributes changed
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP3);
+               msoPropertiesFactory.reloadMsoProperties();
+               
+               // SHould be the same file untouched just a different file name, so new config
+               assertTrue(asdcConfig.hasASDCConfigChanged());
+               assertTrue(asdcConfig.refreshASDCConfig());
+
+               assertNotNull(asdcConfig.getUser());
+               assertTrue("User".equals(asdcConfig.getUser()));
+
+               assertNotNull(asdcConfig.getPassword());
+               assertTrue("ThePassword".equals(asdcConfig.getPassword()));
+
+               assertNotNull(asdcConfig.getConsumerGroup());
+               assertTrue("consumerGroup".equals(asdcConfig.getConsumerGroup()));
+
+               assertNotNull(asdcConfig.getConsumerID());
+               assertTrue("consumerId".equals(asdcConfig.getConsumerID()));
+
+               assertNotNull(asdcConfig.getEnvironmentName());
+               assertTrue("environmentName".equals(asdcConfig.getEnvironmentName()));
+
+               // only this field has been changed
+               assertNotNull(asdcConfig.getAsdcAddress());
+               assertTrue("hostname1".equals(asdcConfig.getAsdcAddress()));
+
+               assertNotNull(asdcConfig.getPollingInterval());
+               assertTrue(asdcConfig.getPollingInterval() == 10);
+
+               assertNotNull(asdcConfig.getPollingTimeout());
+               assertTrue(asdcConfig.getPollingTimeout() == 30);
+
+               assertNotNull(asdcConfig.getRelevantArtifactTypes());
+               assertTrue(asdcConfig.getRelevantArtifactTypes().size() == ASDCConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST.size());
+
+
+               // reload the good property file for other test cases
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+               msoPropertiesFactory.reloadMsoProperties();
+
+       }
+       
+       @Test
+       public final void testAllParametersCheck () throws ASDCParametersException, IOException, MsoPropertiesException  {
+               ASDCConfiguration asdcConfig = new ASDCConfiguration("asdc-controller1");
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP_BAD);
+               msoPropertiesFactory.reloadMsoProperties();
+               // SHould be a bad file, it should raise an exception
+               try {
+                       asdcConfig.refreshASDCConfig();
+                       fail("Should have thrown an ASDCControllerException because one param is missing!");
+               } catch (ASDCParametersException e) {
+                       assertTrue(e.getMessage().contains(("consumerGroup parameter cannot be found in config mso.properties")));
+               }
+
+
+               // reload the good property file for other test cases
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+               msoPropertiesFactory.reloadMsoProperties();
+               
+               assertTrue(asdcConfig.refreshASDCConfig());
+       }
+       
+       @Test
+       public final void testConsumerGroupWithNULL () throws MsoPropertiesException, ASDCParametersException, IOException {
+               ASDCConfiguration asdcConfig = new ASDCConfiguration("asdc-controller1");
+               
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP_WITH_NULL);
+               msoPropertiesFactory.reloadMsoProperties();
+
+               asdcConfig.refreshASDCConfig();
+               assertTrue(asdcConfig.getConsumerGroup()==null);
+
+               // reload the good property file for other test cases
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+               msoPropertiesFactory.reloadMsoProperties();
+               
+               assertTrue(asdcConfig.refreshASDCConfig());
+
+
+       }
+
+       @Test
+       public final void testGetAllDefinedControllers() throws MsoPropertiesException, ASDCParametersException, IOException {
+               List<String> listControllers = ASDCConfiguration.getAllDefinedControllers();
+               
+               assertTrue(listControllers.size()==1);
+               assertTrue("asdc-controller1".equals(listControllers.get(0)));
+               
+               ASDCConfiguration asdcConfiguration = new ASDCConfiguration("asdc-controller1");
+               assertTrue(asdcConfiguration.getAsdcControllerName().equals("asdc-controller1"));
+               
+               
+               // Try to reload a wrong Json file
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP_BAD);
+               msoPropertiesFactory.reloadMsoProperties();
+               
+               listControllers = ASDCConfiguration.getAllDefinedControllers();
+               assertTrue(listControllers.size()==0);
+
+       }
+       
+       @Test
+       public final void testABadInit() throws MsoPropertiesException {
+               msoPropertiesFactory.removeAllMsoProperties();          
+               
+               try {
+                       ASDCConfiguration asdcConfiguration = new ASDCConfiguration("asdc-controller1");
+                       fail("Should have thrown an ASDCParametersException because prop factory is empty!");
+               } catch (ASDCParametersException e) {
+                       assertTrue(e.getMessage().contains(("mso.asdc.json not initialized properly, ASDC config cannot be reloaded")));
+               } catch (IOException e) {
+                       fail("Should have thrown an ASDCParametersException, not IOException because file is corrupted!");
+               }
+       }
+       
+       @Test
+       public final void testFileDoesNotExist() throws MsoPropertiesException, ASDCParametersException, IOException {
+                               
+                       ASDCConfiguration asdcConfiguration = new ASDCConfiguration("asdc-controller1");
+               
+                       msoPropertiesFactory.removeAllMsoProperties();
+                       
+               try {   
+                       asdcConfiguration.refreshASDCConfig();
+                       fail("Should have thrown an ASDCParametersException because factory is empty!");
+               } catch (ASDCParametersException e) {
+                       assertTrue(e.getMessage().contains(("mso.asdc.json not initialized properly, ASDC config cannot be reloaded")));
+               } 
+       }
+
+       @Test
+       public final void testWithTLS () throws ASDCParametersException, IOException, MsoPropertiesException {
+               ASDCConfiguration asdcConfiguration = new ASDCConfiguration("asdc-controller1");
+               
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP4_WITH_TLS);
+               msoPropertiesFactory.reloadMsoProperties();
+
+               asdcConfiguration.refreshASDCConfig();
+               
+               assertTrue(asdcConfiguration.activateServerTLSAuth());
+               assertTrue("/test".equals(asdcConfiguration.getKeyStorePath()));
+               assertTrue("ThePassword".equals(asdcConfiguration.getKeyStorePassword()));
+       }
+       
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCControllerTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCControllerTest.java
new file mode 100644 (file)
index 0000000..b6c5577
--- /dev/null
@@ -0,0 +1,412 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.tests;
+
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Matchers.any;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.net.URISyntaxException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.codec.binary.Base64;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import org.openecomp.sdc.api.IDistributionClient;
+import org.openecomp.sdc.api.consumer.INotificationCallback;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
+import org.openecomp.sdc.api.results.IDistributionClientResult;
+import org.openecomp.sdc.impl.mock.DistributionClientStubImpl;
+import org.openecomp.sdc.utils.DistributionActionResultEnum;
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+import org.openecomp.mso.asdc.client.ASDCController;
+import org.openecomp.mso.asdc.client.ASDCControllerStatus;
+import org.openecomp.mso.asdc.client.exceptions.ASDCControllerException;
+import org.openecomp.mso.asdc.client.exceptions.ASDCParametersException;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+import org.openecomp.mso.asdc.installer.heat.VfResourceInstaller;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+
+
+/**
+ * THis class tests the ASDC Controller by using the ASDC Mock CLient
+ *
+ *
+ */
+public class ASDCControllerTest {
+
+       private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+       private static String heatExample;
+       private static String heatExampleMD5HashBase64;
+
+       private static INotificationData iNotif;
+
+       private static IDistributionClientDownloadResult downloadResult;
+       private static IDistributionClientDownloadResult downloadCorruptedResult;
+
+       private static IDistributionClientResult successfulClientInitResult;
+       private static IDistributionClientResult unsuccessfulClientInitResult;
+
+       private static IArtifactInfo artifactInfo1;
+
+       private static IResourceInstance resource1;
+
+       private static VfResourceInstaller vnfInstaller;
+       
+       public static final String ASDC_PROP = MsoJavaProperties.class.getClassLoader().getResource("mso.json").toString().substring(5);
+       public static final String ASDC_PROP2 = MsoJavaProperties.class.getClassLoader().getResource("mso2.json").toString().substring(5);
+       public static final String ASDC_PROP3 = MsoJavaProperties.class.getClassLoader().getResource("mso3.json").toString().substring(5);
+       public static final String ASDC_PROP_BAD = MsoJavaProperties.class.getClassLoader().getResource("mso-bad.json").toString().substring(5);
+       public static final String ASDC_PROP_WITH_NULL = MsoJavaProperties.class.getClassLoader().getResource("mso-with-NULL.json").toString().substring(5);
+
+       @BeforeClass
+       public static final void prepareMockNotification() throws MsoPropertiesException, IOException, URISyntaxException, NoSuchAlgorithmException, ArtifactInstallerException  {
+
+               heatExample = new String(Files.readAllBytes(Paths.get(ASDCControllerTest.class.getClassLoader().getResource("resource-examples/autoscaling.yaml").toURI())));
+               MessageDigest md = MessageDigest.getInstance("MD5");
+               byte[] md5Hash = md.digest(heatExample.getBytes());
+               heatExampleMD5HashBase64 = Base64.encodeBase64String(md5Hash);
+
+               iNotif= Mockito.mock(INotificationData.class);
+
+               // Create fake ArtifactInfo
+               artifactInfo1 = Mockito.mock(IArtifactInfo.class);
+               Mockito.when(artifactInfo1.getArtifactChecksum()).thenReturn(ASDCControllerTest.heatExampleMD5HashBase64);
+
+               Mockito.when(artifactInfo1.getArtifactName()).thenReturn("artifact1");
+               Mockito.when(artifactInfo1.getArtifactType()).thenReturn(ASDCConfiguration.HEAT);
+               Mockito.when(artifactInfo1.getArtifactURL()).thenReturn("https://localhost:8080/v1/catalog/services/srv1/2.0/resources/aaa/1.0/artifacts/aaa.yml");
+               Mockito.when(artifactInfo1.getArtifactUUID()).thenReturn("UUID1");
+               Mockito.when(artifactInfo1.getArtifactDescription()).thenReturn("testos artifact1");
+
+               // Now provision the NotificationData mock
+               List<IArtifactInfo> listArtifact = new ArrayList<IArtifactInfo>();
+               listArtifact.add(artifactInfo1);
+
+               // Create fake resource Instance
+        resource1 = Mockito.mock (IResourceInstance.class);
+        Mockito.when (resource1.getResourceType ()).thenReturn ("VF");
+        Mockito.when (resource1.getResourceName ()).thenReturn ("resourceName");
+        Mockito.when (resource1.getArtifacts ()).thenReturn (listArtifact);
+
+        List<IResourceInstance> resources = new ArrayList<> ();
+        resources.add (resource1);
+
+               Mockito.when(iNotif.getResources()).thenReturn(resources);
+               Mockito.when(iNotif.getDistributionID()).thenReturn("distributionID1");
+               Mockito.when(iNotif.getServiceName()).thenReturn("serviceName1");
+               Mockito.when(iNotif.getServiceUUID()).thenReturn("serviceNameUUID1");
+               Mockito.when(iNotif.getServiceVersion()).thenReturn("1.0");
+
+               downloadResult = Mockito.mock(IDistributionClientDownloadResult.class);
+               Mockito.when(downloadResult.getArtifactPayload()).thenReturn(heatExample.getBytes());
+               Mockito.when(downloadResult.getDistributionActionResult()).thenReturn(DistributionActionResultEnum.SUCCESS);
+               Mockito.when(downloadResult.getDistributionMessageResult()).thenReturn("Success");
+
+               downloadCorruptedResult = Mockito.mock(IDistributionClientDownloadResult.class);
+               Mockito.when(downloadCorruptedResult.getArtifactPayload()).thenReturn((heatExample+"badone").getBytes());
+               Mockito.when(downloadCorruptedResult.getDistributionActionResult()).thenReturn(DistributionActionResultEnum.SUCCESS);
+               Mockito.when(downloadCorruptedResult.getDistributionMessageResult()).thenReturn("Success");
+
+               vnfInstaller = Mockito.mock(VfResourceInstaller.class);
+               
+               // Mock now the ASDC distribution client behavior
+               successfulClientInitResult = Mockito.mock(IDistributionClientResult.class);
+               Mockito.when(successfulClientInitResult.getDistributionActionResult ()).thenReturn(DistributionActionResultEnum.SUCCESS);
+
+               unsuccessfulClientInitResult = Mockito.mock(IDistributionClientResult.class);
+               Mockito.when(unsuccessfulClientInitResult.getDistributionActionResult ()).thenReturn(DistributionActionResultEnum.GENERAL_ERROR);
+
+       }
+       
+       @Before
+       public final void initBeforeEachTest() throws MsoPropertiesException {
+               // load the config
+               msoPropertiesFactory.removeAllMsoProperties();
+               msoPropertiesFactory.initializeMsoProperties(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+       }
+
+       @AfterClass
+       public static final void kill () throws MsoPropertiesException {
+
+               msoPropertiesFactory.removeMsoProperties(ASDCConfiguration.MSO_PROP_ASDC);
+
+       }
+
+       @Test
+       public final void testTheInitWithASDCStub() throws ASDCControllerException, ASDCParametersException, IOException {
+
+               ASDCController asdcController = new ASDCController("asdc-controller1",new DistributionClientStubImpl());
+               asdcController.initASDC();
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+               assertTrue(asdcController.getNbOfNotificationsOngoing()== 0);
+       }
+
+       @Test
+       public final void testTheNotificationWithASDCStub() throws ASDCControllerException, ASDCParametersException, IOException {
+
+               ASDCController asdcController = new ASDCController("asdc-controller1",new DistributionClientStubImpl(),vnfInstaller);
+               asdcController.initASDC();
+               // try to send a notif, this should fail internally, we just want to ensure that in case of crash, controller status goes to IDLE
+               asdcController.treatNotification(iNotif);
+
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+               assertTrue(asdcController.getNbOfNotificationsOngoing()== 0);
+
+       }
+
+       @Test
+       public final void testASecondInit() throws ASDCControllerException, ASDCParametersException, IOException {
+               ASDCController asdcController = new ASDCController("asdc-controller1",new DistributionClientStubImpl(),vnfInstaller);
+               asdcController.initASDC();
+               // try to send a notif, this should fail internally, we just want to ensure that in case of crash, controller status goes to IDLE
+
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+               assertTrue(asdcController.getNbOfNotificationsOngoing()== 0);
+
+               try {
+                       asdcController.initASDC();
+                       fail("ASDCControllerException should have been raised for the init");
+               } catch (ASDCControllerException e) {
+                       assertTrue("The controller is already initialized, call the closeASDC method first".equals(e.getMessage()));
+               }
+
+               // No changes expected on the controller state
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+               assertTrue(asdcController.getNbOfNotificationsOngoing()== 0);
+       }
+
+       @Test
+       public final void testInitCrashWithMockitoClient() throws ASDCParametersException, IOException {
+
+               IDistributionClient distributionClient;
+               // First case for init method
+               distributionClient = Mockito.mock(IDistributionClient.class);
+               Mockito.when(distributionClient.download(artifactInfo1)).thenThrow(new RuntimeException("ASDC Client not initialized"));
+               Mockito.when(distributionClient.init(any(ASDCConfiguration.class),any(INotificationCallback.class))).thenReturn(unsuccessfulClientInitResult);
+               Mockito.when(distributionClient.start()).thenReturn(unsuccessfulClientInitResult);
+
+               ASDCController asdcController = new ASDCController("asdc-controller1",distributionClient,vnfInstaller);
+
+               // This should return an exception
+               try {
+                       asdcController.initASDC();
+                       fail("ASDCControllerException should have been raised for the init");
+               } catch (ASDCControllerException e) {
+                       assertTrue("Initialization of the ASDC Controller failed with reason: null".equals(e.getMessage()));
+               }
+
+               assertTrue(asdcController.getControllerStatus() == ASDCControllerStatus.STOPPED);
+               assertTrue(asdcController.getNbOfNotificationsOngoing()== 0);
+
+               // Second case for start method
+
+               Mockito.when(distributionClient.init(any(ASDCConfiguration.class),any(INotificationCallback.class))).thenReturn(successfulClientInitResult);
+               Mockito.when(distributionClient.start()).thenReturn(unsuccessfulClientInitResult);
+
+               // This should return an exception
+               try {
+                       asdcController.initASDC();
+                       fail("ASDCControllerException should have been raised for the init");
+               } catch (ASDCControllerException e) {
+                       assertTrue("Startup of the ASDC Controller failed with reason: null".equals(e.getMessage()));
+               }
+
+               assertTrue(asdcController.getControllerStatus() == ASDCControllerStatus.STOPPED);
+               assertTrue(asdcController.getNbOfNotificationsOngoing()== 0);
+       }
+
+       @Test
+       public final void testTheStop() throws ASDCControllerException, ASDCParametersException, IOException {
+
+               ASDCController asdcController = new ASDCController("asdc-controller1",new DistributionClientStubImpl(),vnfInstaller);
+
+               asdcController.closeASDC();
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.STOPPED);
+
+
+               asdcController = new ASDCController("asdc-controller1",new DistributionClientStubImpl(),vnfInstaller);
+               asdcController.initASDC();
+               asdcController.closeASDC();
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.STOPPED);
+       }
+
+       @Test
+       public final void testConfigRefresh () throws ASDCParametersException, ASDCControllerException, IOException, MsoPropertiesException {
+               IDistributionClient distributionClient;
+               distributionClient = Mockito.mock(IDistributionClient.class);
+               Mockito.when(distributionClient.download(artifactInfo1)).thenReturn(downloadResult);
+               Mockito.when(distributionClient.init(any(ASDCConfiguration.class),any(INotificationCallback.class))).thenReturn(successfulClientInitResult);
+               Mockito.when(distributionClient.start()).thenReturn(successfulClientInitResult);
+
+
+               ASDCController asdcController = new ASDCController("asdc-controller1",distributionClient,vnfInstaller);
+
+               // it should not raise any exception even if controller is not yet initialized
+               asdcController.updateConfigIfNeeded();
+
+               asdcController.initASDC();
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+               assertFalse(asdcController.updateConfigIfNeeded());
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP3);
+               msoPropertiesFactory.reloadMsoProperties();
+               // It should fail if it tries to refresh the config as the init will now fail
+               assertTrue(asdcController.updateConfigIfNeeded());
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+               msoPropertiesFactory.reloadMsoProperties();
+       }
+
+       @Test
+       public final void testConfigRefreshWhenBusy () throws  IOException, MsoPropertiesException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, ASDCParametersException, ASDCControllerException {
+               IDistributionClient distributionClient;
+               distributionClient = Mockito.mock(IDistributionClient.class);
+               Mockito.when(distributionClient.download(artifactInfo1)).thenReturn(downloadResult);
+               Mockito.when(distributionClient.init(any(ASDCConfiguration.class),any(INotificationCallback.class))).thenReturn(successfulClientInitResult);
+               Mockito.when(distributionClient.start()).thenReturn(successfulClientInitResult);
+
+               ASDCController asdcController = new ASDCController("asdc-controller1",distributionClient,vnfInstaller);
+
+               // it should not raise any exception even if controller is not yet initialized
+               asdcController.updateConfigIfNeeded();
+
+               asdcController.initASDC();
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+               assertFalse(asdcController.updateConfigIfNeeded());
+
+               // Simulate a BUSY case by reflection
+               Field controllerStatus;
+               controllerStatus = ASDCController.class.getDeclaredField("controllerStatus");
+               controllerStatus.setAccessible(true);
+               controllerStatus.set(asdcController,ASDCControllerStatus.BUSY);
+
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP3);
+               msoPropertiesFactory.reloadMsoProperties();
+               // It should fail if it tries to refresh the config as the init will now fail
+               try {
+                       asdcController.updateConfigIfNeeded();
+                       fail ("ASDCControllerException should have been raised");
+               } catch (ASDCControllerException e) {
+                       assertTrue("Cannot close the ASDC controller as it's currently in BUSY state".equals(e.getMessage()));
+               }
+
+               // Try it a second time to see if we still see the changes
+               try {
+                       asdcController.updateConfigIfNeeded();
+                       fail ("ASDCControllerException should have been raised");
+               } catch (ASDCControllerException e) {
+                       assertTrue("Cannot close the ASDC controller as it's currently in BUSY state".equals(e.getMessage()));
+               }
+
+               // Revert to Idle by reflection
+               controllerStatus.set(asdcController,ASDCControllerStatus.IDLE);
+               controllerStatus.setAccessible(false);
+
+               // This should work now, controller should be restarted
+               assertTrue(asdcController.updateConfigIfNeeded());
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+               msoPropertiesFactory.reloadMsoProperties();
+       }
+
+
+       @Test
+       public final void testBadConfigRefresh () throws ASDCParametersException, ASDCControllerException, IOException, MsoPropertiesException {
+               IDistributionClient distributionClient;
+               distributionClient = Mockito.mock(IDistributionClient.class);
+               Mockito.when(distributionClient.download(artifactInfo1)).thenReturn(downloadResult);
+               Mockito.when(distributionClient.init(any(ASDCConfiguration.class),any(INotificationCallback.class))).thenReturn(successfulClientInitResult);
+               Mockito.when(distributionClient.start()).thenReturn(successfulClientInitResult);
+
+
+               ASDCController asdcController = new ASDCController("asdc-controller1",distributionClient,vnfInstaller);
+
+               // it should not raise any exception even if controller is not yet initialized
+               asdcController.updateConfigIfNeeded();
+
+               asdcController.initASDC();
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.IDLE);
+               assertFalse(asdcController.updateConfigIfNeeded());
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP_BAD);
+               msoPropertiesFactory.reloadMsoProperties();
+               // It should fail if it tries to refresh the config as the init will now fail
+               try {
+                       asdcController.updateConfigIfNeeded();
+                       fail ("ASDCParametersException should have been raised");
+               } catch (ASDCParametersException ep) {
+                       assertTrue("consumerGroup parameter cannot be found in config mso.properties".equals(ep.getMessage()));
+               }
+
+               // This should stop the controller, as it can't work with a bad config file
+               assertTrue(asdcController.getControllerStatus()== ASDCControllerStatus.STOPPED);
+
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+               msoPropertiesFactory.reloadMsoProperties();
+       }
+
+       @Test
+       public final void testConfigAccess () throws ASDCControllerException, ASDCParametersException, IOException {
+               IDistributionClient distributionClient;
+               distributionClient = Mockito.mock(IDistributionClient.class);
+               Mockito.when(distributionClient.download(artifactInfo1)).thenReturn(downloadResult);
+               Mockito.when(distributionClient.init(any(ASDCConfiguration.class),any(INotificationCallback.class))).thenReturn(successfulClientInitResult);
+               Mockito.when(distributionClient.start()).thenReturn(successfulClientInitResult);
+
+               
+               ASDCController asdcController = new ASDCController("asdc-controller1",distributionClient,vnfInstaller);
+               
+               assertTrue("Unknown".equals(asdcController.getAddress()));
+               assertTrue("Unknown".equals(asdcController.getEnvironment()));
+               
+               asdcController.initASDC();
+               
+               assertTrue("hostname".equals(asdcController.getAddress()));
+               assertTrue("environmentName".equals(asdcController.getEnvironment()));
+               
+       }
+
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCElementInfoTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCElementInfoTest.java
new file mode 100644 (file)
index 0000000..23b7a80
--- /dev/null
@@ -0,0 +1,175 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+
+package org.openecomp.mso.asdc.client.tests;
+
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+import java.util.UUID;
+
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+import org.openecomp.mso.asdc.installer.ASDCElementInfo;
+import org.openecomp.mso.asdc.installer.VfModuleStructure;
+import org.openecomp.mso.asdc.installer.VfResourceStructure;
+
+
+public class ASDCElementInfoTest {
+       
+       @Test
+       public void createASDCElementInfoWithNullParameterTest() {
+               ASDCElementInfo elementInfoFromNullVfArtifact = ASDCElementInfo.createElementFromVfArtifactInfo(null);
+               ASDCElementInfo elementInfoFromNullVfModuleStructure = ASDCElementInfo.createElementFromVfModuleStructure(null);
+               ASDCElementInfo elementInfoFromNullVfResourceStructure = ASDCElementInfo.createElementFromVfResourceStructure(null);
+               
+               elementInfoFromNullVfArtifact.addElementInfo(null, null);
+               elementInfoFromNullVfModuleStructure.addElementInfo(null, "someValue");
+               elementInfoFromNullVfResourceStructure.addElementInfo("someKey", null);
+               
+               assertEquals(elementInfoFromNullVfArtifact.toString(), "");
+               assertEquals(elementInfoFromNullVfModuleStructure.toString(), "");
+               assertEquals(elementInfoFromNullVfResourceStructure.toString(), "");
+
+               assertNotNull(elementInfoFromNullVfArtifact);
+               assertNotNull(elementInfoFromNullVfModuleStructure);
+               assertNotNull(elementInfoFromNullVfResourceStructure);
+
+               assertNotNull(ASDCElementInfo.EMPTY_INSTANCE);
+               
+               assertEquals(elementInfoFromNullVfArtifact, ASDCElementInfo.EMPTY_INSTANCE);
+               assertEquals(elementInfoFromNullVfModuleStructure, ASDCElementInfo.EMPTY_INSTANCE);
+               assertEquals(elementInfoFromNullVfResourceStructure, ASDCElementInfo.EMPTY_INSTANCE);
+               
+               assertEquals(ASDCElementInfo.EMPTY_INSTANCE.getType(), "");
+               assertEquals(ASDCElementInfo.EMPTY_INSTANCE.toString(), "");
+               
+               assertEquals(elementInfoFromNullVfArtifact.getType(), ASDCElementInfo.EMPTY_INSTANCE.getType());
+               assertEquals(elementInfoFromNullVfModuleStructure.getType(), ASDCElementInfo.EMPTY_INSTANCE.getType());
+               assertEquals(elementInfoFromNullVfResourceStructure.getType(), ASDCElementInfo.EMPTY_INSTANCE.getType());
+       }
+       
+       @Test
+       public void createASDCElementInfoFromVfResourceTest() {
+               
+               String resourceInstanceName = "Resource 1";
+               
+               UUID generatedUUID = UUID.randomUUID();
+               
+               INotificationData notificationData = Mockito.mock(INotificationData.class);
+               IResourceInstance resourceInstance = Mockito.mock(IResourceInstance.class);
+               
+               Mockito.when(resourceInstance.getResourceInstanceName()).thenReturn(resourceInstanceName);
+               Mockito.when(resourceInstance.getResourceInvariantUUID()).thenReturn(generatedUUID.toString());
+               
+               VfResourceStructure vfResourceStructure = new VfResourceStructure(notificationData, resourceInstance);
+               
+               ASDCElementInfo elementInfoFromVfResource = ASDCElementInfo.createElementFromVfResourceStructure(vfResourceStructure);
+               
+               assertTrue(elementInfoFromVfResource.toString().contains(resourceInstanceName));
+               assertTrue(elementInfoFromVfResource.toString().contains(generatedUUID.toString()));
+               
+               assertFalse(ASDCConfiguration.VF_MODULES_METADATA.equals(elementInfoFromVfResource.getType()));
+               assertEquals(ASDCElementInfo.ASDCElementTypeEnum.VNF_RESOURCE.name(), elementInfoFromVfResource.getType());
+               
+               assertFalse(elementInfoFromVfResource.toString().contains("MyInfo1: someValue"));
+               elementInfoFromVfResource.addElementInfo("MyInfo1", "someValue");
+               assertTrue(elementInfoFromVfResource.toString().contains("MyInfo1: someValue"));
+       }
+       
+       @Test
+       public void createASDCElementInfoFromVfModuleTest() throws ArtifactInstallerException {
+               
+               String resourceInstanceName = "Resource 1";
+               
+               UUID generatedUUID = UUID.randomUUID();
+               
+               INotificationData notificationData = Mockito.mock(INotificationData.class);
+               IResourceInstance resourceInstance = Mockito.mock(IResourceInstance.class);
+               
+               Mockito.when(resourceInstance.getResourceInstanceName()).thenReturn(resourceInstanceName);
+               Mockito.when(resourceInstance.getResourceInvariantUUID()).thenReturn(generatedUUID.toString());
+               
+               VfResourceStructure vfResourceStructure = new VfResourceStructure(notificationData, resourceInstance);
+               
+               // Create module structure now
+               
+               String vfModuleModelName = "Module Model XYZ";
+               
+               UUID generatedUUIDForModule = UUID.randomUUID();
+               
+               IVfModuleMetadata moduleMetadata = Mockito.mock(IVfModuleMetadata.class);
+               Mockito.when(moduleMetadata.getVfModuleModelName()).thenReturn(vfModuleModelName);
+               Mockito.when(moduleMetadata.getVfModuleModelInvariantUUID()).thenReturn(generatedUUIDForModule.toString());
+               Mockito.when(moduleMetadata.getArtifacts()).thenReturn(Collections.<String> emptyList());
+               
+               VfModuleStructure vfModuleStructure = new VfModuleStructure(vfResourceStructure, moduleMetadata);
+               
+               ASDCElementInfo elementInfoFromVfModule = ASDCElementInfo.createElementFromVfModuleStructure(vfModuleStructure);
+               
+               assertTrue(elementInfoFromVfModule.toString().contains(vfModuleModelName));
+               assertTrue(elementInfoFromVfModule.toString().contains(generatedUUIDForModule.toString()));
+               
+               assertFalse(ASDCElementInfo.ASDCElementTypeEnum.VNF_RESOURCE.name().equals(elementInfoFromVfModule.getType()));
+               assertEquals(ASDCConfiguration.VF_MODULES_METADATA, elementInfoFromVfModule.getType());
+               
+               assertFalse(elementInfoFromVfModule.toString().contains("MyInfo2: someValue"));
+               elementInfoFromVfModule.addElementInfo("MyInfo2", "someValue");
+               assertTrue(elementInfoFromVfModule.toString().contains("MyInfo2: someValue"));
+       }
+       
+       @Test
+       public void createASDCElementInfoFromArtifact() {
+               for (String eVal : ASDCConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST) {
+                       String generatedArtifactName = eVal + " 1";
+                       UUID generatedUUIDForArtifact = UUID.randomUUID();
+                       
+                       IArtifactInfo artifactInfo = Mockito.mock(IArtifactInfo.class);
+                       Mockito.when(artifactInfo.getArtifactType()).thenReturn(eVal);
+                       Mockito.when(artifactInfo.getArtifactName()).thenReturn(generatedArtifactName);
+                       Mockito.when(artifactInfo.getArtifactUUID()).thenReturn(generatedUUIDForArtifact.toString());
+                       
+                       ASDCElementInfo elementInfoFromArtifact = ASDCElementInfo.createElementFromVfArtifactInfo(artifactInfo);
+
+                       assertTrue(elementInfoFromArtifact.toString().contains(generatedArtifactName));
+                       assertTrue(elementInfoFromArtifact.toString().contains(generatedUUIDForArtifact.toString()));
+                       
+                       assertFalse(ASDCElementInfo.ASDCElementTypeEnum.VNF_RESOURCE.name().equals(elementInfoFromArtifact.getType()));
+                       assertEquals(eVal, elementInfoFromArtifact.getType());
+                       
+                       assertFalse(elementInfoFromArtifact.toString().contains("MyInfo3: someValue"));
+                       elementInfoFromArtifact.addElementInfo("MyInfo3", "someValue");
+                       assertTrue(elementInfoFromArtifact.toString().contains("MyInfo3: someValue"));
+               }
+       }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCGlobalControllerTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/ASDCGlobalControllerTest.java
new file mode 100644 (file)
index 0000000..9ac50c4
--- /dev/null
@@ -0,0 +1,213 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.tests;
+
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.codec.binary.Base64;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
+import org.openecomp.sdc.api.results.IDistributionClientResult;
+import org.openecomp.sdc.utils.DistributionActionResultEnum;
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+import org.openecomp.mso.asdc.client.ASDCGlobalController;
+import org.openecomp.mso.asdc.client.exceptions.ASDCControllerException;
+import org.openecomp.mso.asdc.client.exceptions.ASDCParametersException;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+
+
+/**
+ * THis class tests the ASDC Controller by using the ASDC Mock CLient
+ *
+ *
+ */
+public class ASDCGlobalControllerTest {
+
+       private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+       private static String heatExample;
+       private static String heatExampleMD5HashBase64;
+
+       private static INotificationData iNotif;
+
+       private static IDistributionClientDownloadResult downloadResult;
+       private static IDistributionClientDownloadResult downloadCorruptedResult;
+
+       private static IDistributionClientResult successfulClientInitResult;
+       private static IDistributionClientResult unsuccessfulClientInitResult;
+
+       private static IArtifactInfo artifactInfo1;
+
+       private static IResourceInstance resource1;
+
+       public static final String ASDC_PROP = MsoJavaProperties.class.getClassLoader().getResource("mso.json").toString().substring(5);
+       public static final String ASDC_PROP2 = MsoJavaProperties.class.getClassLoader().getResource("mso2.json").toString().substring(5);
+       public static final String ASDC_PROP3 = MsoJavaProperties.class.getClassLoader().getResource("mso3.json").toString().substring(5);
+       public static final String ASDC_PROP_BAD = MsoJavaProperties.class.getClassLoader().getResource("mso-bad.json").toString().substring(5);
+       public static final String ASDC_PROP_WITH_NULL = MsoJavaProperties.class.getClassLoader().getResource("mso-with-NULL.json").toString().substring(5);
+       public static final String ASDC_PROP_WITH_DOUBLE = MsoJavaProperties.class.getClassLoader().getResource("mso-two-configs.json").toString().substring(5);
+       public static final String ASDC_PROP_WITH_DOUBLE2 = MsoJavaProperties.class.getClassLoader().getResource("mso-two-configs2.json").toString().substring(5);
+
+       @BeforeClass
+       public static final void prepareMockNotification() throws MsoPropertiesException, IOException, URISyntaxException, NoSuchAlgorithmException, ArtifactInstallerException  {
+
+               heatExample = new String(Files.readAllBytes(Paths.get(ASDCGlobalControllerTest.class.getClassLoader().getResource("resource-examples/autoscaling.yaml").toURI())));
+               MessageDigest md = MessageDigest.getInstance("MD5");
+               byte[] md5Hash = md.digest(heatExample.getBytes());
+               heatExampleMD5HashBase64 = Base64.encodeBase64String(md5Hash);
+
+               iNotif= Mockito.mock(INotificationData.class);
+
+               // Create fake ArtifactInfo
+               artifactInfo1 = Mockito.mock(IArtifactInfo.class);
+               Mockito.when(artifactInfo1.getArtifactChecksum()).thenReturn(ASDCGlobalControllerTest.heatExampleMD5HashBase64);
+
+               Mockito.when(artifactInfo1.getArtifactName()).thenReturn("artifact1");
+               Mockito.when(artifactInfo1.getArtifactType()).thenReturn(ASDCConfiguration.HEAT);
+               Mockito.when(artifactInfo1.getArtifactURL()).thenReturn("https://localhost:8080/v1/catalog/services/srv1/2.0/resources/aaa/1.0/artifacts/aaa.yml");
+               Mockito.when(artifactInfo1.getArtifactUUID()).thenReturn("UUID1");
+               Mockito.when(artifactInfo1.getArtifactDescription()).thenReturn("testos artifact1");
+
+               // Now provision the NotificationData mock
+               List<IArtifactInfo> listArtifact = new ArrayList<IArtifactInfo>();
+               listArtifact.add(artifactInfo1);
+
+               // Create fake resource Instance
+        resource1 = Mockito.mock (IResourceInstance.class);
+        Mockito.when (resource1.getResourceType ()).thenReturn ("VF");
+        Mockito.when (resource1.getResourceName ()).thenReturn ("resourceName");
+        Mockito.when (resource1.getArtifacts ()).thenReturn (listArtifact);
+
+        List<IResourceInstance> resources = new ArrayList<> ();
+        resources.add (resource1);
+
+               Mockito.when(iNotif.getResources()).thenReturn(resources);
+               Mockito.when(iNotif.getDistributionID()).thenReturn("distributionID1");
+               Mockito.when(iNotif.getServiceName()).thenReturn("serviceName1");
+               Mockito.when(iNotif.getServiceUUID()).thenReturn("serviceNameUUID1");
+               Mockito.when(iNotif.getServiceVersion()).thenReturn("1.0");
+
+               downloadResult = Mockito.mock(IDistributionClientDownloadResult.class);
+               Mockito.when(downloadResult.getArtifactPayload()).thenReturn(heatExample.getBytes());
+               Mockito.when(downloadResult.getDistributionActionResult()).thenReturn(DistributionActionResultEnum.SUCCESS);
+               Mockito.when(downloadResult.getDistributionMessageResult()).thenReturn("Success");
+
+               downloadCorruptedResult = Mockito.mock(IDistributionClientDownloadResult.class);
+               Mockito.when(downloadCorruptedResult.getArtifactPayload()).thenReturn((heatExample+"badone").getBytes());
+               Mockito.when(downloadCorruptedResult.getDistributionActionResult()).thenReturn(DistributionActionResultEnum.SUCCESS);
+               Mockito.when(downloadCorruptedResult.getDistributionMessageResult()).thenReturn("Success");
+
+
+               // Mock now the ASDC distribution client behavior
+               successfulClientInitResult = Mockito.mock(IDistributionClientResult.class);
+               Mockito.when(successfulClientInitResult.getDistributionActionResult ()).thenReturn(DistributionActionResultEnum.SUCCESS);
+
+               unsuccessfulClientInitResult = Mockito.mock(IDistributionClientResult.class);
+               Mockito.when(unsuccessfulClientInitResult.getDistributionActionResult ()).thenReturn(DistributionActionResultEnum.GENERAL_ERROR);
+
+       }
+       
+       @Before
+       public final void initBeforeEachTest() throws MsoPropertiesException {
+               // load the config
+               msoPropertiesFactory.removeAllMsoProperties();
+               msoPropertiesFactory.initializeMsoProperties(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP);
+       }
+
+       @AfterClass
+       public static final void kill () throws MsoPropertiesException {
+
+               msoPropertiesFactory.removeMsoProperties(ASDCConfiguration.MSO_PROP_ASDC);
+       }
+
+       @Test
+       public final void testUpdateControllersConfigIfNeeded() throws ASDCControllerException, ASDCParametersException, IOException, MsoPropertiesException {
+
+               ASDCGlobalController asdcGlobalController = new ASDCGlobalController();
+               assertTrue(asdcGlobalController.getControllers().size()==0);
+               
+               // first init
+               assertTrue(asdcGlobalController.updateControllersConfigIfNeeded());
+               assertTrue(asdcGlobalController.getControllers().size()==1);
+               assertTrue(asdcGlobalController.getControllers().get("asdc-controller1") != null);
+               
+               // Add a second one
+               msoPropertiesFactory.removeAllMsoProperties();
+               msoPropertiesFactory.initializeMsoProperties(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP_WITH_DOUBLE);
+               assertTrue(asdcGlobalController.updateControllersConfigIfNeeded());
+               assertTrue(asdcGlobalController.getControllers().size()==2);
+               assertTrue(asdcGlobalController.getControllers().get("asdc-controller1") != null);
+               assertTrue(asdcGlobalController.getControllers().get("asdc-controller2") != null);
+               // Check that update does nothing
+               assertFalse(asdcGlobalController.updateControllersConfigIfNeeded());
+               assertTrue(asdcGlobalController.getControllers().size()==2);
+               
+               // Change the second one name
+               msoPropertiesFactory.removeAllMsoProperties();
+               msoPropertiesFactory.initializeMsoProperties(ASDCConfiguration.MSO_PROP_ASDC, ASDC_PROP_WITH_DOUBLE2);
+               assertTrue(asdcGlobalController.updateControllersConfigIfNeeded());
+               assertTrue(asdcGlobalController.getControllers().size()==2);
+               assertTrue(asdcGlobalController.getControllers().get("asdc-controller1") != null);
+               assertTrue(asdcGlobalController.getControllers().get("asdc-controller2B") != null);
+               
+               
+       }
+       
+       @Test
+       public final void testCloseASDC()  {
+
+               ASDCGlobalController asdcGlobalController = new ASDCGlobalController();
+               assertTrue(asdcGlobalController.getControllers().size()==0);
+               
+               // first init
+               assertTrue(asdcGlobalController.updateControllersConfigIfNeeded());
+               assertTrue(asdcGlobalController.getControllers().size()==1);
+               assertTrue(asdcGlobalController.getControllers().get("asdc-controller1") != null);
+               
+               asdcGlobalController.closeASDC();
+               assertTrue(asdcGlobalController.getControllers().size()==0);
+               
+               
+       }
+
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/BigDecimalVersionTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/BigDecimalVersionTest.java
new file mode 100644 (file)
index 0000000..7decaff
--- /dev/null
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.tests;
+
+
+import static org.junit.Assert.assertTrue;
+import java.math.BigDecimal;
+import org.junit.Test;
+
+import org.openecomp.mso.asdc.installer.BigDecimalVersion;
+
+
+public class BigDecimalVersionTest {
+
+    @Test
+    public final void versionCastTest () {
+
+       BigDecimal versionDecimal = BigDecimalVersion.castAndCheckNotificationVersion("12.0");
+       assertTrue(versionDecimal.equals(new BigDecimal("12.0")));
+       assertTrue("12.0".equals(BigDecimalVersion.castAndCheckNotificationVersionToString("12.0")));
+
+       versionDecimal = BigDecimalVersion.castAndCheckNotificationVersion("12.0.2");
+       assertTrue(versionDecimal.equals(new BigDecimal("12.02")));
+       assertTrue("12.02".equals(BigDecimalVersion.castAndCheckNotificationVersionToString("12.0.2")));
+
+       versionDecimal = BigDecimalVersion.castAndCheckNotificationVersion("10");
+       assertTrue(versionDecimal.equals(new BigDecimal("10")));
+       assertTrue("10".equals(BigDecimalVersion.castAndCheckNotificationVersionToString("10")));
+
+       versionDecimal = BigDecimalVersion.castAndCheckNotificationVersion("10.1.2.6");
+       assertTrue(versionDecimal.equals(new BigDecimal("10.126")));
+       assertTrue("10.126".equals(BigDecimalVersion.castAndCheckNotificationVersionToString("10.1.2.6")));
+
+    }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/YamlTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/YamlTest.java
new file mode 100644 (file)
index 0000000..bce9324
--- /dev/null
@@ -0,0 +1,165 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.asdc.client.tests;
+
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
+
+import org.openecomp.mso.asdc.installer.heat.VfResourceInstaller;
+import org.openecomp.mso.asdc.util.YamlEditor;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+
+
+public class YamlTest {
+       @Test
+       public void getYamlResourceTypeTestList() throws Exception {
+  
+                       InputStream input = new FileInputStream(new File("src/test/resources/resource-examples/simpleTest.yaml"));
+                       YamlEditor decoder = new YamlEditor (IOUtils.toByteArray(input));
+                       List<String> typeList = decoder.getYamlNestedFileResourceTypeList();
+                           
+                       assertTrue(typeList.size() == 1 && typeList.get(0).equals("file:///my_test.yaml"));
+       }
+
+       @Test
+       public void getParameterListTest() throws Exception {
+  
+                       InputStream input = new FileInputStream(new File("src/test/resources/resource-examples/simpleTest.yaml"));
+                       YamlEditor decoder = new YamlEditor (IOUtils.toByteArray(input));
+                       Set <HeatTemplateParam> paramSet = decoder.getParameterList();
+                           
+                       assertTrue(paramSet.size() == 5);
+
+                       for (HeatTemplateParam param : paramSet) {
+                               if ("ip_port_snmp_manager".equals(param.getParamName()) || "cor_direct_net_name".equals(param.getParamName()) || "cor_direct_net_RT".equals(param.getParamName())) {
+                                       
+                                       assertTrue(param.isRequired()==false);
+                               } else {
+                                       
+                                       assertTrue(param.isRequired()==true);
+                               }
+                               
+                               assertTrue("string".equals(param.getParamType()));
+                       }
+       }
+       
+       @Test
+       public void addParameterListWhenEmptyTest() throws Exception {
+  
+                       InputStream input = new FileInputStream(new File("src/test/resources/resource-examples/simpleTestWithoutParam.yaml"));
+                       YamlEditor decoder = new YamlEditor (IOUtils.toByteArray(input));
+                       
+                       Set <HeatTemplateParam> newParamSet = new HashSet <HeatTemplateParam> (); 
+                       
+                       HeatTemplateParam heatParam1 = new HeatTemplateParam();
+                       heatParam1.setId(1);
+                       heatParam1.setParamName("testos1");
+                       heatParam1.setParamType("string");
+                       
+                       HeatTemplateParam heatParam2 = new HeatTemplateParam();
+                       heatParam2.setId(2);
+                       heatParam2.setParamName("testos2");
+                       heatParam2.setParamType("number");
+                       
+                       newParamSet.add(heatParam1);
+                       newParamSet.add(heatParam2);
+                       
+                       decoder.addParameterList(newParamSet);
+                           
+                       Set <HeatTemplateParam> paramSet = decoder.getParameterList();
+                       assertTrue(paramSet.size() == 2);
+                       
+                       assertTrue(decoder.encode().contains("testos1"));
+                       assertTrue(decoder.encode().contains("string"));
+                       assertTrue(decoder.encode().contains("testos2"));
+                       assertTrue(decoder.encode().contains("number"));
+       }
+       
+       @Test
+       public void addParameterListTest() throws Exception {
+  
+                       InputStream input = new FileInputStream(new File("src/test/resources/resource-examples/simpleTest.yaml"));
+                       YamlEditor decoder = new YamlEditor (IOUtils.toByteArray(input));
+                       
+                       Set <HeatTemplateParam> newParamSet = new HashSet <HeatTemplateParam> (); 
+                       
+                       HeatTemplateParam heatParam1 = new HeatTemplateParam();
+                       heatParam1.setId(1);
+                       heatParam1.setParamName("testos1");
+                       heatParam1.setParamType("string");
+                       
+                       HeatTemplateParam heatParam2 = new HeatTemplateParam();
+                       heatParam2.setId(2);
+                       heatParam2.setParamName("testos2");
+                       heatParam2.setParamType("number");
+                       
+                       newParamSet.add(heatParam1);
+                       newParamSet.add(heatParam2);
+                       
+                       decoder.addParameterList(newParamSet);
+                           
+                       Set <HeatTemplateParam> paramSet = decoder.getParameterList();
+                       
+                       assertTrue(paramSet.size() == 7);
+                       
+                       Boolean check1 = Boolean.FALSE;
+                       Boolean check2 = Boolean.FALSE;
+                       
+                       for (HeatTemplateParam param : paramSet) {
+                               if ("ip_port_snmp_manager".equals(param.getParamName()) || "cor_direct_net_name".equals(param.getParamName()) || "cor_direct_net_RT".equals(param.getParamName())) {
+                                       assertFalse(param.isRequired());
+                               } else {
+                                       assertTrue(param.isRequired());
+                               }
+                               
+                               if ("testos1".equals(param.getParamName()) && "string".equals(param.getParamType())) {
+                                       check1=Boolean.TRUE;
+                               }
+
+                               if ("testos2".equals(param.getParamName()) && "number".equals(param.getParamType())) {
+                                       check2=Boolean.TRUE;
+                               }
+
+                       }
+                       
+                       assertTrue(check1);
+                       assertTrue(check2);
+       }
+       
+       @Test
+       public void VfResourceInstallerTest() throws Exception {
+               
+               assertTrue("mon ami toto, est dans le bois: toto ici".equals(VfResourceInstaller.verifyTheFilePrefixInString("mon ami toto, est dans le bois: toto ici","toto")));
+               assertTrue("mon ami toto, est dans le bois: toto ici".equals(VfResourceInstaller.verifyTheFilePrefixInString("mon ami file:///toto, est dans le bois: file:///toto ici","toto")));
+               assertTrue("mon ami toto, est dans le bois: toto ici".equals(VfResourceInstaller.verifyTheFilePrefixInString("mon ami file:///toto, est dans le bois: toto ici","toto")));
+               assertTrue("mon ami toto, est dans le bois: toto ici".equals(VfResourceInstaller.verifyTheFilePrefixInString("mon ami toto, est dans le bois: file:///toto ici","toto")));
+               
+       }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/ASDCElementInfoESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/ASDCElementInfoESTest.java
new file mode 100644 (file)
index 0000000..8dd5afe
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:35:55 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.util.List;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ASDCElementInfoESTest extends ASDCElementInfoESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iResourceInstance0).getResourceInstanceName();
+      doReturn((String) null).when(iResourceInstance0).getResourceInvariantUUID();
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      ASDCElementInfo aSDCElementInfo0 = ASDCElementInfo.createElementFromVfResourceStructure(vfResourceStructure0);
+      String string0 = aSDCElementInfo0.getType();
+      assertEquals("VNF_RESOURCE", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      ASDCElementInfo aSDCElementInfo0 = ASDCElementInfo.createElementFromVfModuleStructure((VfModuleStructure) null);
+      Map<String, String> map0 = aSDCElementInfo0.getElementInfoMap();
+      assertTrue(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      Map<String, String> map0 = ASDCElementInfo.EMPTY_INSTANCE.getElementInfoMap();
+      assertTrue(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      ASDCElementInfo aSDCElementInfo0 = ASDCElementInfo.EMPTY_INSTANCE;
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iArtifactInfo0).getArtifactName();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactType();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactUUID();
+      ASDCElementInfo aSDCElementInfo1 = ASDCElementInfo.createElementFromVfArtifactInfo(iArtifactInfo0);
+      aSDCElementInfo0.toString();
+      PrivateAccess.setVariable((Class<ASDCElementInfo>) ASDCElementInfo.class, aSDCElementInfo1, "elementInfoMap", (Object) null);
+      aSDCElementInfo0.toString();
+      // Undeclared exception!
+      try { 
+        aSDCElementInfo1.toString();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.ASDCElementInfo", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      ASDCElementInfo aSDCElementInfo0 = ASDCElementInfo.EMPTY_INSTANCE;
+      aSDCElementInfo0.addElementInfo("V$", (String) null);
+      assertEquals("", aSDCElementInfo0.getType());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      ASDCElementInfo aSDCElementInfo0 = ASDCElementInfo.createElementFromVfModuleStructure((VfModuleStructure) null);
+      String string0 = aSDCElementInfo0.EMPTY_INSTANCE.getType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, (IResourceInstance) null);
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(iVfModuleMetadata0).getArtifacts();
+      VfModuleStructure vfModuleStructure0 = null;
+      try {
+        vfModuleStructure0 = new VfModuleStructure(vfResourceStructure0, iVfModuleMetadata0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfModuleStructure", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      doReturn(" Name").when(iResourceInstance0).getResourceInstanceName();
+      doReturn(" Name").when(iResourceInstance0).getResourceInvariantUUID();
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      ASDCElementInfo aSDCElementInfo0 = ASDCElementInfo.createElementFromVfResourceStructure(vfResourceStructure0);
+      String string0 = aSDCElementInfo0.toString();
+      assertEquals("Resource Instance Invariant UUID:  Name, Resource Instance Name:  Name", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      ASDCElementInfo aSDCElementInfo0 = ASDCElementInfo.createElementFromVfArtifactInfo((IArtifactInfo) null);
+      aSDCElementInfo0.addElementInfo((String) null, "");
+      assertEquals("", aSDCElementInfo0.getType());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iArtifactInfo0).getArtifactName();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactType();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactUUID();
+      ASDCElementInfo aSDCElementInfo0 = ASDCElementInfo.createElementFromVfArtifactInfo(iArtifactInfo0);
+      String string0 = aSDCElementInfo0.getType();
+      assertNull(string0);
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/ASDCElementInfoESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/ASDCElementInfoESTestscaffolding.java
new file mode 100644 (file)
index 0000000..075970b
--- /dev/null
@@ -0,0 +1,100 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:35:55 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ASDCElementInfoESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.installer.ASDCElementInfo"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ASDCElementInfoESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.sdc.api.IDistributionClient",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.asdc.installer.VfResourceStructure",
+      "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException",
+      "org.openecomp.mso.db.catalog.beans.VnfResource",
+      "org.openecomp.sdc.api.notification.IVfModuleMetadata",
+      "org.openecomp.mso.db.catalog.beans.VfModule",
+      "org.openecomp.sdc.api.results.IDistributionClientResult",
+      "org.openecomp.sdc.api.notification.IArtifactInfo",
+      "org.openecomp.mso.db.catalog.beans.Service",
+      "org.openecomp.mso.asdc.installer.VfModuleStructure",
+      "org.openecomp.sdc.api.notification.INotificationData",
+      "org.openecomp.mso.asdc.installer.VfModuleArtifact",
+      "org.openecomp.sdc.api.notification.IResourceInstance",
+      "org.openecomp.mso.asdc.installer.ASDCElementInfo",
+      "org.openecomp.sdc.api.results.IDistributionClientDownloadResult",
+      "org.openecomp.mso.asdc.installer.ASDCElementInfo$ASDCElementTypeEnum"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ASDCElementInfoESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.asdc.installer.ASDCElementInfo$ASDCElementTypeEnum",
+      "org.openecomp.mso.asdc.installer.ASDCElementInfo",
+      "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTest.java
new file mode 100644 (file)
index 0000000..4675f05
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:37:47 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.math.BigDecimal;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class BigDecimalVersionESTest extends BigDecimalVersionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      String string0 = BigDecimalVersion.castAndCheckNotificationVersionToString("9");
+      assertEquals("9", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      BigDecimal bigDecimal0 = BigDecimalVersion.castAndCheckNotificationVersion("0");
+      assertEquals(0, bigDecimal0.shortValue());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      BigDecimal bigDecimal0 = BigDecimalVersion.castAndCheckNotificationVersion("9");
+      assertEquals(9, bigDecimal0.byteValue());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      BigDecimal bigDecimal0 = BigDecimalVersion.castAndCheckNotificationVersion("-1");
+      assertEquals(-1, bigDecimal0.byteValue());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        BigDecimalVersion.castAndCheckNotificationVersionToString("fgt+&6@pL9`5EE}.!.,");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.math.BigDecimal", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        BigDecimalVersion.castAndCheckNotificationVersionToString((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.BigDecimalVersion", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        BigDecimalVersion.castAndCheckNotificationVersion((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.BigDecimalVersion", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        BigDecimalVersion.castAndCheckNotificationVersion(".");
+        fail("Expecting exception: ArrayIndexOutOfBoundsException");
+      
+      } catch(ArrayIndexOutOfBoundsException e) {
+         //
+         // 0
+         //
+         verifyException("org.openecomp.mso.asdc.installer.BigDecimalVersion", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        BigDecimalVersion.castAndCheckNotificationVersion("Mf**K`5E.~Fu.,q");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.math.BigDecimal", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      BigDecimalVersion bigDecimalVersion0 = new BigDecimalVersion();
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        BigDecimalVersion.castAndCheckNotificationVersionToString(".");
+        fail("Expecting exception: ArrayIndexOutOfBoundsException");
+      
+      } catch(ArrayIndexOutOfBoundsException e) {
+         //
+         // 0
+         //
+         verifyException("org.openecomp.mso.asdc.installer.BigDecimalVersion", e);
+      }
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c04ada8
--- /dev/null
@@ -0,0 +1,77 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:37:47 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class BigDecimalVersionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.installer.BigDecimalVersion"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BigDecimalVersionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.asdc.installer.BigDecimalVersion"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTest.java
new file mode 100644 (file)
index 0000000..c9b29ae
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:20:32 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
+import org.openecomp.sdc.impl.DistributionClientDownloadResultImpl;
+import org.openecomp.sdc.utils.DistributionActionResultEnum;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VfModuleArtifactESTest extends VfModuleArtifactESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.CONF_MISSING_ARTIFACT_TYPES;
+      byte[] byteArray0 = new byte[1];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "7pKd8", "7pKd8", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      PrivateAccess.setVariable((Class<VfModuleArtifact>) VfModuleArtifact.class, vfModuleArtifact0, "result", (Object) null);
+      vfModuleArtifact0.getResult();
+      assertEquals(0, vfModuleArtifact0.getDeployedInDb());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED;
+      byte[] byteArray0 = new byte[0];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      vfModuleArtifact0.getResult();
+      assertEquals(0, vfModuleArtifact0.getDeployedInDb());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED;
+      byte[] byteArray0 = new byte[0];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      vfModuleArtifact0.incrementDeployedInDB();
+      int int0 = vfModuleArtifact0.getDeployedInDb();
+      assertEquals(1, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.CONF_MISSING_ASDC_FQDN;
+      byte[] byteArray0 = new byte[2];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "qZr'D", "qZr'D", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      PrivateAccess.setVariable((Class<VfModuleArtifact>) VfModuleArtifact.class, vfModuleArtifact0, "deployedInDb", (Object) (-40));
+      int int0 = vfModuleArtifact0.getDeployedInDb();
+      assertEquals((-40), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED;
+      byte[] byteArray0 = new byte[0];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      vfModuleArtifact0.setCatalogObject(byteArray0);
+      vfModuleArtifact0.getCatalogObject();
+      assertEquals(0, vfModuleArtifact0.getDeployedInDb());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("o<Q").when(iArtifactInfo0).toString();
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED;
+      byte[] byteArray0 = new byte[0];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      vfModuleArtifact0.getArtifactInfo();
+      assertEquals(0, vfModuleArtifact0.getDeployedInDb());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VfModuleArtifact vfModuleArtifact0 = null;
+      try {
+        vfModuleArtifact0 = new VfModuleArtifact((IArtifactInfo) null, (IDistributionClientDownloadResult) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfModuleArtifact", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED;
+      byte[] byteArray0 = new byte[0];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      vfModuleArtifact0.getCatalogObject();
+      assertEquals(0, vfModuleArtifact0.getDeployedInDb());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.CONF_MISSING_ARTIFACT_TYPES;
+      byte[] byteArray0 = new byte[1];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "7pKd8", "7pKd8", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      vfModuleArtifact0.getResult();
+      assertEquals(0, vfModuleArtifact0.getDeployedInDb());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.CONF_MISSING_ASDC_FQDN;
+      byte[] byteArray0 = new byte[2];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "qZr'D", "qZr'D", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      int int0 = vfModuleArtifact0.getDeployedInDb();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_IS_TERMINATED;
+      byte[] byteArray0 = new byte[5];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "", "", byteArray0);
+      VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact((IArtifactInfo) null, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0);
+      vfModuleArtifact0.getArtifactInfo();
+      assertEquals(0, vfModuleArtifact0.getDeployedInDb());
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTestscaffolding.java
new file mode 100644 (file)
index 0000000..75c5f15
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:20:32 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VfModuleArtifactESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.installer.VfModuleArtifact"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleArtifactESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.asdc.installer.VfModuleArtifact",
+      "org.openecomp.sdc.utils.DistributionActionResultEnum",
+      "org.openecomp.sdc.impl.DistributionClientResultImpl",
+      "org.openecomp.sdc.impl.DistributionClientDownloadResultImpl",
+      "org.openecomp.sdc.api.results.IDistributionClientResult",
+      "org.openecomp.sdc.api.results.IDistributionClientDownloadResult",
+      "org.openecomp.sdc.api.notification.IArtifactInfo"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTest.java
new file mode 100644 (file)
index 0000000..f3c20c5
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:37:00 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.evosuite.runtime.EvoAssertions.verifyException;
+import static org.evosuite.shaded.org.mockito.Mockito.doReturn;
+import static org.evosuite.shaded.org.mockito.Mockito.mock;
+import static org.junit.Assert.fail;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VfModuleStructureESTest extends VfModuleStructureESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(iVfModuleMetadata0).getArtifacts();
+      VfModuleStructure vfModuleStructure0 = null;
+      try {
+        vfModuleStructure0 = new VfModuleStructure(vfResourceStructure0, iVfModuleMetadata0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfModuleStructure", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(iVfModuleMetadata0).getArtifacts();
+      VfModuleStructure vfModuleStructure0 = null;
+      try {
+        vfModuleStructure0 = new VfModuleStructure((VfResourceStructure) null, iVfModuleMetadata0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfModuleStructure", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      LinkedList<String> linkedList0 = new LinkedList<String>();
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn(linkedList0).when(iVfModuleMetadata0).getArtifacts();
+      linkedList0.add("");
+      VfModuleStructure vfModuleStructure0 = null;
+      try {
+        vfModuleStructure0 = new VfModuleStructure(vfResourceStructure0, iVfModuleMetadata0);
+        fail("Expecting exception: Exception");
+      
+      } catch(Exception e) {
+         //
+         // Artifact (UUID:) referenced in the VFModule UUID list has not been downloaded, cancelling the Resource deployment
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfModuleStructure", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      vfResourceStructure0.setSuccessfulDeployment();
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(iVfModuleMetadata0).getArtifacts();
+      vfResourceStructure0.setSuccessfulDeployment();
+      VfModuleStructure vfModuleStructure0 = null;
+      try {
+        vfModuleStructure0 = new VfModuleStructure(vfResourceStructure0, iVfModuleMetadata0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfModuleStructure", e);
+      }
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTestscaffolding.java
new file mode 100644 (file)
index 0000000..f6aa2ab
--- /dev/null
@@ -0,0 +1,96 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:37:00 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VfModuleStructureESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.installer.VfModuleStructure"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleStructureESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.sdc.api.IDistributionClient",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.asdc.installer.VfResourceStructure",
+      "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException",
+      "org.openecomp.mso.db.catalog.beans.VnfResource",
+      "org.openecomp.sdc.api.notification.IVfModuleMetadata",
+      "org.openecomp.mso.db.catalog.beans.VfModule",
+      "org.openecomp.sdc.api.results.IDistributionClientResult",
+      "org.openecomp.sdc.api.notification.IArtifactInfo",
+      "org.openecomp.mso.db.catalog.beans.Service",
+      "org.openecomp.mso.asdc.installer.VfModuleStructure",
+      "org.openecomp.sdc.api.notification.INotificationData",
+      "org.openecomp.mso.asdc.installer.VfModuleArtifact",
+      "org.openecomp.sdc.api.notification.IResourceInstance",
+      "org.openecomp.sdc.api.results.IDistributionClientDownloadResult"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VfModuleStructureESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfResourceStructureESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfResourceStructureESTest.java
new file mode 100644 (file)
index 0000000..4a27df3
--- /dev/null
@@ -0,0 +1,400 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:29:36 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import java.time.chrono.ChronoLocalDate;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.evosuite.runtime.mock.java.time.chrono.MockHijrahDate;
+import org.junit.runner.RunWith;
+import org.openecomp.sdc.api.IDistributionClient;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.impl.DistributionClientDownloadResultImpl;
+import org.openecomp.sdc.impl.mock.DistributionClientDownloadResultStubImpl;
+import org.openecomp.sdc.impl.mock.DistributionClientStubImpl;
+import org.openecomp.sdc.utils.DistributionActionResultEnum;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VfResourceStructureESTest extends VfResourceStructureESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "vfModulesStructureList", (Object) null);
+      vfResourceStructure0.getVfModuleStructure();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      LinkedList<Object> linkedList0 = new LinkedList<Object>();
+      linkedList0.add((Object) vfResourceStructure0);
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "vfModulesStructureList", (Object) linkedList0);
+      vfResourceStructure0.getVfModuleStructure();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure((INotificationData) null, (IResourceInstance) null);
+      vfResourceStructure0.getResourceInstance();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("").when(iNotificationData0).toString();
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      vfResourceStructure0.getNotification();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      Service service0 = new Service();
+      service0.setId(6);
+      vfResourceStructure0.setCatalogService(service0);
+      vfResourceStructure0.getCatalogService();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      Iterator<ChronoLocalDate> iterator0 = (Iterator<ChronoLocalDate>) mock(Iterator.class, new ViolatedAssumptionAnswer());
+      List<ChronoLocalDate> list0 = (List<ChronoLocalDate>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn((Iterator) null).when(list0).iterator();
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "vfModulesMetadataList", (Object) list0);
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "isDeployedSuccessfully", (Object) true);
+      List<MockHijrahDate> list1 = (List<MockHijrahDate>) mock(List.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "isDeployedSuccessfully", (Object) true);
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "vfModulesStructureList", (Object) list1);
+      // Undeclared exception!
+      try { 
+        vfResourceStructure0.createVfModuleStructures();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfResourceStructure", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      Iterator<ChronoLocalDate> iterator0 = (Iterator<ChronoLocalDate>) mock(Iterator.class, new ViolatedAssumptionAnswer());
+      doReturn(false).when(iterator0).hasNext();
+      List<ChronoLocalDate> list0 = (List<ChronoLocalDate>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn(iterator0).when(list0).iterator();
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "vfModulesMetadataList", (Object) list0);
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "isDeployedSuccessfully", (Object) true);
+      List<MockHijrahDate> list1 = (List<MockHijrahDate>) mock(List.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "isDeployedSuccessfully", (Object) true);
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "vfModulesStructureList", (Object) list1);
+      vfResourceStructure0.createVfModuleStructures();
+      IDistributionClient iDistributionClient0 = mock(IDistributionClient.class, new ViolatedAssumptionAnswer());
+      IArtifactInfo iArtifactInfo0 = null;
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.ARTIFACT_NOT_FOUND;
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "");
+      List<Object> list2 = (List<Object>) mock(List.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "vfModulesMetadataList", (Object) list2);
+      // Undeclared exception!
+      try { 
+        vfResourceStructure0.addArtifactToStructure(iDistributionClient0, (IArtifactInfo) null, distributionClientDownloadResultImpl0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      ChronoLocalDate chronoLocalDate0 = mock(ChronoLocalDate.class, new ViolatedAssumptionAnswer());
+      Iterator<ChronoLocalDate> iterator0 = (Iterator<ChronoLocalDate>) mock(Iterator.class, new ViolatedAssumptionAnswer());
+      doReturn(true).when(iterator0).hasNext();
+      doReturn(chronoLocalDate0).when(iterator0).next();
+      List<ChronoLocalDate> list0 = (List<ChronoLocalDate>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn(iterator0).when(list0).iterator();
+      PrivateAccess.setVariable((Class<VfResourceStructure>) VfResourceStructure.class, vfResourceStructure0, "vfModulesMetadataList", (Object) list0);
+      // Undeclared exception!
+      try { 
+        vfResourceStructure0.createVfModuleStructures();
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // $java.time.chrono.ChronoLocalDate$$EnhancerByMockitoWithCGLIB$$27d47344 cannot be cast to org.openecomp.sdc.api.notification.IVfModuleMetadata
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfResourceStructure", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      try { 
+        vfResourceStructure0.createVfModuleStructures();
+        fail("Expecting exception: Exception");
+      
+      } catch(Exception e) {
+         //
+         // VfModule Meta DATA could not be decoded properly or was not present in the notification
+         //
+         verifyException("org.openecomp.mso.asdc.installer.VfResourceStructure", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      DistributionClientStubImpl distributionClientStubImpl0 = new DistributionClientStubImpl();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("%[76").when(iArtifactInfo0).getArtifactType();
+      DistributionClientDownloadResultStubImpl distributionClientDownloadResultStubImpl0 = (DistributionClientDownloadResultStubImpl)distributionClientStubImpl0.download(iArtifactInfo0);
+      vfResourceStructure0.addArtifactToStructure(distributionClientStubImpl0, iArtifactInfo0, distributionClientDownloadResultStubImpl0);
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      DistributionClientStubImpl distributionClientStubImpl0 = new DistributionClientStubImpl();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("HEAT_ARTIFACT").when(iArtifactInfo0).getArtifactType();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactUUID();
+      DistributionClientDownloadResultStubImpl distributionClientDownloadResultStubImpl0 = (DistributionClientDownloadResultStubImpl)distributionClientStubImpl0.download(iArtifactInfo0);
+      vfResourceStructure0.addArtifactToStructure(distributionClientStubImpl0, iArtifactInfo0, distributionClientDownloadResultStubImpl0);
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      DistributionClientStubImpl distributionClientStubImpl0 = new DistributionClientStubImpl();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionClientDownloadResultStubImpl distributionClientDownloadResultStubImpl0 = (DistributionClientDownloadResultStubImpl)distributionClientStubImpl0.download(iArtifactInfo0);
+      IArtifactInfo iArtifactInfo1 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("HEAT").when(iArtifactInfo1).getArtifactType();
+      doReturn("%[76").when(iArtifactInfo1).getArtifactUUID();
+      vfResourceStructure0.addArtifactToStructure(distributionClientStubImpl0, iArtifactInfo1, distributionClientDownloadResultStubImpl0);
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      DistributionClientStubImpl distributionClientStubImpl0 = new DistributionClientStubImpl();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      DistributionClientDownloadResultStubImpl distributionClientDownloadResultStubImpl0 = (DistributionClientDownloadResultStubImpl)distributionClientStubImpl0.download(iArtifactInfo0);
+      IArtifactInfo iArtifactInfo1 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("HEAT_NET").when(iArtifactInfo1).getArtifactType();
+      doReturn("HEAT_ENV").when(iArtifactInfo1).getArtifactUUID();
+      vfResourceStructure0.addArtifactToStructure(distributionClientStubImpl0, iArtifactInfo1, distributionClientDownloadResultStubImpl0);
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure((INotificationData) null, iResourceInstance0);
+      DistributionClientStubImpl distributionClientStubImpl0 = new DistributionClientStubImpl();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("HEAT_ENV").when(iArtifactInfo0).getArtifactType();
+      doReturn("*Z\"P4rvOA+m\7fW").when(iArtifactInfo0).getArtifactUUID();
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.UEB_KEYS_CREATION_FAILED;
+      byte[] byteArray0 = new byte[6];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "]=)|;N.$hV]d^", "s:h+", byteArray0);
+      vfResourceStructure0.addArtifactToStructure(distributionClientStubImpl0, iArtifactInfo0, distributionClientDownloadResultImpl0);
+      Map<String, VfModuleArtifact> map0 = vfResourceStructure0.getArtifactsMapByUUID();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      DistributionClientStubImpl distributionClientStubImpl0 = new DistributionClientStubImpl();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("VF_MODULES_METADATA").when(iArtifactInfo0).getArtifactType();
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.BAD_REQUEST;
+      byte[] byteArray0 = new byte[2];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "<B['", "<B['", byteArray0);
+      vfResourceStructure0.addArtifactToStructure(distributionClientStubImpl0, iArtifactInfo0, distributionClientDownloadResultImpl0);
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      DistributionClientStubImpl distributionClientStubImpl0 = new DistributionClientStubImpl();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("HEAT_NESTED").when(iArtifactInfo0).getArtifactType();
+      doReturn("HEAT_NESTED").when(iArtifactInfo0).getArtifactUUID();
+      DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.BAD_REQUEST;
+      byte[] byteArray0 = new byte[2];
+      DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "<B['", "<B['", byteArray0);
+      vfResourceStructure0.addArtifactToStructure(distributionClientStubImpl0, iArtifactInfo0, distributionClientDownloadResultImpl0);
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      vfResourceStructure0.getCatalogService();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      vfResourceStructure0.getVfModulesStructureList();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      vfResourceStructure0.getArtifactsMapByUUID();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+      
+      vfResourceStructure0.setSuccessfulDeployment();
+      boolean boolean0 = vfResourceStructure0.isDeployedSuccessfully();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      vfResourceStructure0.getCatalogVnfResource();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      vfResourceStructure0.getVfModuleStructure();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      boolean boolean0 = vfResourceStructure0.isDeployedSuccessfully();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure((INotificationData) null, iResourceInstance0);
+      vfResourceStructure0.getNotification();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      VnfResource vnfResource0 = new VnfResource();
+      vfResourceStructure0.setCatalogVnfResource(vnfResource0);
+      vfResourceStructure0.getCatalogVnfResource();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      Service service0 = new Service();
+      vfResourceStructure0.setCatalogService(service0);
+      vfResourceStructure0.getCatalogService();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iResourceInstance0).toString();
+      VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0);
+      vfResourceStructure0.getResourceInstance();
+      assertFalse(vfResourceStructure0.isDeployedSuccessfully());
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfResourceStructureESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfResourceStructureESTestscaffolding.java
new file mode 100644 (file)
index 0000000..f78949e
--- /dev/null
@@ -0,0 +1,105 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:29:36 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.installer;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VfResourceStructureESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.installer.VfResourceStructure"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfResourceStructureESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.sdc.api.IDistributionClient",
+      "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.asdc.installer.VfResourceStructure",
+      "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException",
+      "org.openecomp.mso.db.catalog.beans.VnfResource",
+      "org.openecomp.sdc.utils.DistributionActionResultEnum",
+      "org.openecomp.sdc.impl.DistributionClientResultImpl",
+      "org.openecomp.sdc.impl.mock.DistributionClientStubImpl",
+      "org.openecomp.sdc.impl.DistributionClientDownloadResultImpl",
+      "org.openecomp.sdc.api.consumer.IConfiguration",
+      "org.openecomp.sdc.api.notification.IVfModuleMetadata",
+      "org.openecomp.sdc.api.results.IDistributionClientResult",
+      "org.openecomp.mso.db.catalog.beans.Service",
+      "org.openecomp.sdc.api.notification.IArtifactInfo",
+      "org.openecomp.sdc.impl.mock.DistributionClientDownloadResultStubImpl",
+      "org.openecomp.sdc.api.consumer.INotificationCallback",
+      "org.openecomp.mso.asdc.installer.VfModuleStructure",
+      "org.openecomp.sdc.api.notification.INotificationData",
+      "org.openecomp.mso.asdc.installer.VfModuleArtifact",
+      "org.openecomp.sdc.api.notification.IResourceInstance",
+      "org.openecomp.sdc.impl.mock.DistributionClientResultStubImpl",
+      "org.openecomp.sdc.api.results.IDistributionClientDownloadResult",
+      "org.openecomp.sdc.api.consumer.IDistributionStatusMessage"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VfResourceStructureESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTest.java
new file mode 100644 (file)
index 0000000..77c70e0
--- /dev/null
@@ -0,0 +1,746 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:31:27 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.util;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.ConcurrentModificationException;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.function.Predicate;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ASDCNotificationLoggingESTest extends ASDCNotificationLoggingESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      LinkedList<IResourceInstance> linkedList0 = new LinkedList<IResourceInstance>();
+      LinkedList<IArtifactInfo> linkedList1 = new LinkedList<IArtifactInfo>();
+      Integer integer0 = new Integer(2147483645);
+      Integer integer1 = new Integer(2147483645);
+      Integer integer2 = new Integer(2147483645);
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iArtifactInfo0).getArtifactChecksum();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactDescription();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactName();
+      doReturn((Integer) null).when(iArtifactInfo0).getArtifactTimeout();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactType();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactURL();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactUUID();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactVersion();
+      doReturn((IArtifactInfo) null).when(iArtifactInfo0).getGeneratedArtifact();
+      doReturn((List) null).when(iArtifactInfo0).getRelatedArtifacts();
+      IArtifactInfo iArtifactInfo1 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("Resource Instance Info:").when(iArtifactInfo1).getArtifactChecksum();
+      doReturn("~1xF'ZQr|qhuc{").when(iArtifactInfo1).getArtifactDescription();
+      doReturn("").when(iArtifactInfo1).getArtifactName();
+      doReturn(integer1).when(iArtifactInfo1).getArtifactTimeout();
+      doReturn("7<\"g").when(iArtifactInfo1).getArtifactType();
+      doReturn("").when(iArtifactInfo1).getArtifactURL();
+      doReturn("").when(iArtifactInfo1).getArtifactUUID();
+      doReturn("7<\"g").when(iArtifactInfo1).getArtifactVersion();
+      doReturn(iArtifactInfo0).when(iArtifactInfo1).getGeneratedArtifact();
+      doReturn(linkedList1, linkedList1).when(iArtifactInfo1).getRelatedArtifacts();
+      LinkedList<IArtifactInfo> linkedList2 = new LinkedList<IArtifactInfo>();
+      Integer integer3 = new Integer(1);
+      LinkedList<IArtifactInfo> linkedList3 = new LinkedList<IArtifactInfo>();
+      IArtifactInfo iArtifactInfo2 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn("-X^ og(1=?-*/%4", "%jgpj", (String) null).when(iArtifactInfo2).getArtifactChecksum();
+      doReturn("7<\"g", "", (String) null).when(iArtifactInfo2).getArtifactDescription();
+      doReturn("7 'W{]65Y%Vh_ynFOr", "]+O?<_o+Mx?P@|^<:|/", (String) null).when(iArtifactInfo2).getArtifactName();
+      doReturn(integer0, integer3, (Integer) null).when(iArtifactInfo2).getArtifactTimeout();
+      doReturn("]+O?<_o+Mx?P@|^<:|/", "", (String) null).when(iArtifactInfo2).getArtifactType();
+      doReturn("i]\r7Wr. <gStwjW", "Ns3ZUZX(", (String) null).when(iArtifactInfo2).getArtifactURL();
+      doReturn("7 'W{]65Y%Vh_ynFOr", "7<\"g", (String) null).when(iArtifactInfo2).getArtifactUUID();
+      doReturn("7 'W{]65Y%Vh_ynFOr", "YuS7'", (String) null).when(iArtifactInfo2).getArtifactVersion();
+      doReturn(iArtifactInfo1, (IArtifactInfo) null, (IArtifactInfo) null).when(iArtifactInfo2).getGeneratedArtifact();
+      doReturn(linkedList2, linkedList2, linkedList3, linkedList3, (List) null).when(iArtifactInfo2).getRelatedArtifacts();
+      linkedList1.add(iArtifactInfo2);
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("~1xF'ZQr|qhuc{").when(iNotificationData0).getDistributionID();
+      doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources();
+      doReturn(linkedList1).when(iNotificationData0).getServiceArtifacts();
+      doReturn("").when(iNotificationData0).getServiceDescription();
+      doReturn("").when(iNotificationData0).getServiceInvariantUUID();
+      doReturn("").when(iNotificationData0).getServiceName();
+      doReturn("").when(iNotificationData0).getServiceUUID();
+      doReturn("TvEm!").when(iNotificationData0).getServiceVersion();
+      String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData1).getDistributionID();
+      doReturn(linkedList0, linkedList0).when(iNotificationData1).getResources();
+      doReturn(linkedList1).when(iNotificationData1).getServiceArtifacts();
+      doReturn("").when(iNotificationData1).getServiceDescription();
+      doReturn("Tz)|, ,").when(iNotificationData1).getServiceInvariantUUID();
+      doReturn("").when(iNotificationData1).getServiceName();
+      doReturn("").when(iNotificationData1).getServiceUUID();
+      doReturn("Tz)|, ,").when(iNotificationData1).getServiceVersion();
+      String string1 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData1);
+      assertFalse(string1.equals((Object)string0));
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      LinkedList<IVfModuleMetadata> linkedList0 = new LinkedList<IVfModuleMetadata>();
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      linkedList0.add(iVfModuleMetadata0);
+      LinkedList<Object> linkedList1 = new LinkedList<Object>();
+      Object object0 = new Object();
+      linkedList1.push(object0);
+      linkedList0.spliterator();
+      linkedList0.removeAll(linkedList1);
+      linkedList0.clear();
+      LinkedList<String> linkedList2 = new LinkedList<String>();
+      IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn((List<String>) null, (List<String>) null, linkedList2, (List<String>) null).when(iVfModuleMetadata1).getArtifacts();
+      doReturn("e.tf%6&", "e.tf%6&", "").when(iVfModuleMetadata1).getVfModuleModelDescription();
+      doReturn("", "", "").when(iVfModuleMetadata1).getVfModuleModelInvariantUUID();
+      doReturn("", "", "e.tf%6&").when(iVfModuleMetadata1).getVfModuleModelName();
+      doReturn("VfModuleMetaData:", "e.tf%6&", "BaseArtifactInfoImpl [artifactName=").when(iVfModuleMetadata1).getVfModuleModelUUID();
+      doReturn("e.tf%6&", "e.tf%6&", "e.tf%6&").when(iVfModuleMetadata1).getVfModuleModelVersion();
+      doReturn(false, false).when(iVfModuleMetadata1).isBase();
+      linkedList0.add(iVfModuleMetadata1);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      // Undeclared exception!
+      try { 
+        ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.util.ASDCNotificationLogging", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      ASDCNotificationLogging aSDCNotificationLogging1 = new ASDCNotificationLogging();
+      LinkedList<IVfModuleMetadata> linkedList0 = new LinkedList<IVfModuleMetadata>();
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn((List<String>) null, (List<String>) null).when(iVfModuleMetadata0).getArtifacts();
+      doReturn("TTq", (String) null).when(iVfModuleMetadata0).getVfModuleModelDescription();
+      doReturn("", (String) null).when(iVfModuleMetadata0).getVfModuleModelInvariantUUID();
+      doReturn("w1e~\"rjNBjuq*0HB!3&", (String) null).when(iVfModuleMetadata0).getVfModuleModelName();
+      doReturn("+l", (String) null).when(iVfModuleMetadata0).getVfModuleModelUUID();
+      doReturn("]", (String) null).when(iVfModuleMetadata0).getVfModuleModelVersion();
+      doReturn(true, false).when(iVfModuleMetadata0).isBase();
+      linkedList0.add(iVfModuleMetadata0);
+      IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      linkedList0.removeFirstOccurrence(aSDCNotificationLogging1);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      assertEquals("{\nVfModuleMetaData:\nVfModuleModelName:NULL\nVfModuleModelVersion:NULL\nVfModuleModelUUID:NULL\nVfModuleModelInvariantUUID:NULL\nVfModuleModelDescription:NULL\nArtifacts UUID List:NULL\nisBase:false\n\n\n}\n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      List<IResourceInstance> list0 = (List<IResourceInstance>) mock(List.class, new ViolatedAssumptionAnswer());
+      List<IArtifactInfo> list1 = (List<IArtifactInfo>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn(false).when(list1).isEmpty();
+      doReturn((Iterator) null).when(list1).iterator();
+      doReturn(0).when(list1).size();
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData0).getDistributionID();
+      doReturn(list1).when(iNotificationData0).getServiceArtifacts();
+      doReturn("9").when(iNotificationData0).getServiceDescription();
+      doReturn("9").when(iNotificationData0).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceName();
+      doReturn("Type not recognized").when(iNotificationData0).getServiceUUID();
+      doReturn("").when(iNotificationData0).getServiceVersion();
+      // Undeclared exception!
+      try { 
+        ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.util.ASDCNotificationLogging", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      LinkedList<IResourceInstance> linkedList0 = new LinkedList<IResourceInstance>();
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("(ICU8j3G)Z4Z[GAE").when(iNotificationData0).getDistributionID();
+      doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources();
+      doReturn((List<IArtifactInfo>) null).when(iNotificationData0).getServiceArtifacts();
+      doReturn(")&42fB6dZT&HRAb1a").when(iNotificationData0).getServiceDescription();
+      doReturn("(ICU8j3G)Z4Z[GAE").when(iNotificationData0).getServiceInvariantUUID();
+      doReturn(")&42fB6dZT&HRAb1a").when(iNotificationData0).getServiceName();
+      doReturn(")&42fB6dZT&HRAb1a").when(iNotificationData0).getServiceUUID();
+      doReturn("cHH N9Ha9YUPSpX00i").when(iNotificationData0).getServiceVersion();
+      String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      assertEquals("ASDC Notification:\nDistributionID:(ICU8j3G)Z4Z[GAE\nServiceName:)&42fB6dZT&HRAb1a\nServiceVersion:cHH N9Ha9YUPSpX00i\nServiceUUID:)&42fB6dZT&HRAb1a\nServiceInvariantUUID:(ICU8j3G)Z4Z[GAE\nServiceDescription:)&42fB6dZT&HRAb1a\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      LinkedList<IVfModuleMetadata> linkedList0 = new LinkedList<IVfModuleMetadata>();
+      assertEquals(0, linkedList0.size());
+      
+      LinkedList<String> linkedList1 = new LinkedList<String>();
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn(linkedList1, linkedList1).when(iVfModuleMetadata0).getArtifacts();
+      doReturn(", artifactTimeout=").when(iVfModuleMetadata0).getVfModuleModelDescription();
+      doReturn(", artifactChecksum=").when(iVfModuleMetadata0).getVfModuleModelInvariantUUID();
+      doReturn(", artifactTimeout=").when(iVfModuleMetadata0).getVfModuleModelName();
+      doReturn(", artifactTimeout=").when(iVfModuleMetadata0).getVfModuleModelUUID();
+      doReturn(", artifactTimeout=").when(iVfModuleMetadata0).getVfModuleModelVersion();
+      doReturn(false).when(iVfModuleMetadata0).isBase();
+      IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      linkedList0.add(iVfModuleMetadata1);
+      linkedList1.push("dzjz-zmMzFE");
+      linkedList0.listIterator();
+      linkedList0.toArray();
+      linkedList0.add(iVfModuleMetadata0);
+      linkedList0.pollFirst();
+      String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      assertEquals("{\nVfModuleMetaData:\nVfModuleModelName:, artifactTimeout=\nVfModuleModelVersion:, artifactTimeout=\nVfModuleModelUUID:, artifactTimeout=\nVfModuleModelInvariantUUID:, artifactChecksum=\nVfModuleModelDescription:, artifactTimeout=\nArtifacts UUID List:{\ndzjz-zmMzFE\n\n}\n\nisBase:false\n\n\n}\n", string0);
+      
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      LinkedList<IResourceInstance> linkedList2 = new LinkedList<IResourceInstance>();
+      LinkedList<IResourceInstance> linkedList3 = new LinkedList<IResourceInstance>((Collection<? extends IResourceInstance>) linkedList2);
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData0).getDistributionID();
+      doReturn((List) null).when(iNotificationData0).getResources();
+      doReturn((List) null).when(iNotificationData0).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData0).getServiceDescription();
+      doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceName();
+      doReturn((String) null).when(iNotificationData0).getServiceUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceVersion();
+      String string1 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      assertEquals("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n", string1);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData0).getDistributionID();
+      doReturn((List) null).when(iNotificationData0).getResources();
+      doReturn((List) null).when(iNotificationData0).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData0).getServiceDescription();
+      doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceName();
+      doReturn((String) null).when(iNotificationData0).getServiceUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      LinkedList<IVfModuleMetadata> linkedList0 = new LinkedList<IVfModuleMetadata>();
+      List<IVfModuleMetadata> list0 = linkedList0.subList(0, 0);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      linkedList0.removeAll(list0);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      Comparator<Object> comparator0 = (Comparator<Object>) mock(Comparator.class, new ViolatedAssumptionAnswer());
+      linkedList0.sort(comparator0);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      linkedList0.offerLast(iVfModuleMetadata0);
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData1).getDistributionID();
+      doReturn((List) null).when(iNotificationData1).getResources();
+      doReturn((List) null).when(iNotificationData1).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData1).getServiceDescription();
+      doReturn((String) null).when(iNotificationData1).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData1).getServiceName();
+      doReturn((String) null).when(iNotificationData1).getServiceUUID();
+      doReturn((String) null).when(iNotificationData1).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData1);
+      // Undeclared exception!
+      try { 
+        ASDCNotificationLogging.dumpVfModuleMetaDataList(list0);
+        fail("Expecting exception: ConcurrentModificationException");
+      
+      } catch(ConcurrentModificationException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.util.SubList", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      ASDCNotificationLogging aSDCNotificationLogging1 = new ASDCNotificationLogging();
+      LinkedList<IResourceInstance> linkedList0 = new LinkedList<IResourceInstance>();
+      LinkedList<IArtifactInfo> linkedList1 = new LinkedList<IArtifactInfo>();
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("ResourceInstanceName:").when(iNotificationData0).getDistributionID();
+      doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources();
+      doReturn(linkedList1).when(iNotificationData0).getServiceArtifacts();
+      doReturn("ResourceInstanceName:").when(iNotificationData0).getServiceDescription();
+      doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID();
+      doReturn("ResourceInstanceName:").when(iNotificationData0).getServiceName();
+      doReturn("pr26M0Ud8~n6#j/;g").when(iNotificationData0).getServiceUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      ASDCNotificationLogging aSDCNotificationLogging2 = new ASDCNotificationLogging();
+      INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("ResourceInstanceName:").when(iNotificationData1).getDistributionID();
+      doReturn(linkedList0, linkedList0).when(iNotificationData1).getResources();
+      doReturn(linkedList1).when(iNotificationData1).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData1).getServiceDescription();
+      doReturn("").when(iNotificationData1).getServiceInvariantUUID();
+      doReturn("pr26M0Ud8~n6#j/;g").when(iNotificationData1).getServiceName();
+      doReturn("").when(iNotificationData1).getServiceUUID();
+      doReturn("Resource Artifacts List:").when(iNotificationData1).getServiceVersion();
+      String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData1);
+      assertEquals("ASDC Notification:\nDistributionID:ResourceInstanceName:\nServiceName:pr26M0Ud8~n6#j/;g\nServiceVersion:Resource Artifacts List:\nServiceUUID:\nServiceInvariantUUID:\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n", string0);
+      
+      ASDCNotificationLogging aSDCNotificationLogging3 = new ASDCNotificationLogging();
+      LinkedList<IVfModuleMetadata> linkedList2 = new LinkedList<IVfModuleMetadata>();
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList2);
+      LinkedList<IResourceInstance> linkedList3 = new LinkedList<IResourceInstance>();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactChecksum();
+      doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactDescription();
+      doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactName();
+      doReturn((Integer) null, (Integer) null, (Integer) null).when(iArtifactInfo0).getArtifactTimeout();
+      doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactType();
+      doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactURL();
+      doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactUUID();
+      doReturn((String) null, (String) null, (String) null).when(iArtifactInfo0).getArtifactVersion();
+      doReturn((IArtifactInfo) null, (IArtifactInfo) null, (IArtifactInfo) null).when(iArtifactInfo0).getGeneratedArtifact();
+      doReturn((List) null, (List) null, (List) null).when(iArtifactInfo0).getRelatedArtifacts();
+      linkedList1.add(iArtifactInfo0);
+      INotificationData iNotificationData2 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("tlh7ku").when(iNotificationData2).getDistributionID();
+      doReturn(linkedList3, linkedList0).when(iNotificationData2).getResources();
+      doReturn(linkedList1).when(iNotificationData2).getServiceArtifacts();
+      doReturn("").when(iNotificationData2).getServiceDescription();
+      doReturn("").when(iNotificationData2).getServiceInvariantUUID();
+      doReturn("tlh7ku").when(iNotificationData2).getServiceName();
+      doReturn("_B4BTx//Er%IWM}et0").when(iNotificationData2).getServiceUUID();
+      doReturn("").when(iNotificationData2).getServiceVersion();
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      doReturn(linkedList1).when(iResourceInstance0).getArtifacts();
+      doReturn("").when(iResourceInstance0).getResourceInstanceName();
+      doReturn("Resource Artifacts List:").when(iResourceInstance0).getResourceInvariantUUID();
+      doReturn("Hq^8Xl<>T").when(iResourceInstance0).getResourceName();
+      doReturn((String) null).when(iResourceInstance0).getResourceType();
+      doReturn("ASDC Notification:\nDistributionID:ResourceInstanceName:\nServiceName:ResourceInstanceName:\nServiceVersion:NULL\nServiceUUID:pr26M0Ud8~n6#j/;g\nServiceInvariantUUID:NULL\nServiceDescription:ResourceInstanceName:\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n").when(iResourceInstance0).getResourceUUID();
+      doReturn("zIQ?4(U$K ").when(iResourceInstance0).getResourceVersion();
+      linkedList0.add(iResourceInstance0);
+      IResourceInstance iResourceInstance1 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      doReturn(linkedList1).when(iResourceInstance1).getArtifacts();
+      doReturn("ASDC Notification:\nDistributionID:ResourceInstanceName:\nServiceName:pr26M0Ud8~n6#j/;g\nServiceVersion:Resource Artifacts List:\nServiceUUID:\nServiceInvariantUUID:\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n").when(iResourceInstance1).getResourceInstanceName();
+      doReturn("5yNU;|<:T-ixwLB").when(iResourceInstance1).getResourceInvariantUUID();
+      doReturn("").when(iResourceInstance1).getResourceName();
+      doReturn("xguM[yK-\"").when(iResourceInstance1).getResourceType();
+      doReturn("").when(iResourceInstance1).getResourceUUID();
+      doReturn("ASDC Notification:\nDistributionID:ResourceInstanceName:\nServiceName:pr26M0Ud8~n6#j/;g\nServiceVersion:Resource Artifacts List:\nServiceUUID:\nServiceInvariantUUID:\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n").when(iResourceInstance1).getResourceVersion();
+      linkedList1.removeFirstOccurrence((Object) null);
+      linkedList0.add(iResourceInstance1);
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData2);
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      String string1 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList2);
+      assertEquals("\n}\n", string1);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData0).getDistributionID();
+      doReturn((List) null).when(iNotificationData0).getResources();
+      doReturn((List) null).when(iNotificationData0).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData0).getServiceDescription();
+      doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceName();
+      doReturn((String) null).when(iNotificationData0).getServiceUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData1).getDistributionID();
+      doReturn((List) null).when(iNotificationData1).getResources();
+      doReturn((List) null).when(iNotificationData1).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData1).getServiceDescription();
+      doReturn((String) null).when(iNotificationData1).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData1).getServiceName();
+      doReturn((String) null).when(iNotificationData1).getServiceUUID();
+      doReturn((String) null).when(iNotificationData1).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData1);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      INotificationData iNotificationData2 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData2).getDistributionID();
+      doReturn((List) null).when(iNotificationData2).getResources();
+      doReturn((List) null).when(iNotificationData2).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData2).getServiceDescription();
+      doReturn((String) null).when(iNotificationData2).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData2).getServiceName();
+      doReturn((String) null).when(iNotificationData2).getServiceUUID();
+      doReturn((String) null).when(iNotificationData2).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData2);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      INotificationData iNotificationData3 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData3).getDistributionID();
+      doReturn((List) null).when(iNotificationData3).getResources();
+      doReturn((List) null).when(iNotificationData3).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData3).getServiceDescription();
+      doReturn((String) null).when(iNotificationData3).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData3).getServiceName();
+      doReturn((String) null).when(iNotificationData3).getServiceUUID();
+      doReturn((String) null).when(iNotificationData3).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData3);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      INotificationData iNotificationData4 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData4).getDistributionID();
+      doReturn((List) null).when(iNotificationData4).getResources();
+      doReturn((List) null).when(iNotificationData4).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData4).getServiceDescription();
+      doReturn((String) null).when(iNotificationData4).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData4).getServiceName();
+      doReturn((String) null).when(iNotificationData4).getServiceUUID();
+      doReturn((String) null).when(iNotificationData4).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData4);
+      INotificationData iNotificationData5 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData5).getDistributionID();
+      doReturn((List) null).when(iNotificationData5).getResources();
+      doReturn((List) null).when(iNotificationData5).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData5).getServiceDescription();
+      doReturn((String) null).when(iNotificationData5).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData5).getServiceName();
+      doReturn((String) null).when(iNotificationData5).getServiceUUID();
+      doReturn((String) null).when(iNotificationData5).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData5);
+      INotificationData iNotificationData6 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData6).getDistributionID();
+      doReturn((List) null).when(iNotificationData6).getResources();
+      doReturn((List) null).when(iNotificationData6).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData6).getServiceDescription();
+      doReturn((String) null).when(iNotificationData6).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData6).getServiceName();
+      doReturn((String) null).when(iNotificationData6).getServiceUUID();
+      doReturn((String) null).when(iNotificationData6).getServiceVersion();
+      String string0 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData6);
+      assertEquals("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n", string0);
+      
+      ASDCNotificationLogging.dumpASDCNotification((INotificationData) null);
+      String string1 = ASDCNotificationLogging.dumpASDCNotification((INotificationData) null);
+      assertEquals("NULL", string1);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      LinkedList<IArtifactInfo> linkedList0 = new LinkedList<IArtifactInfo>();
+      IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iArtifactInfo0).getArtifactChecksum();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactDescription();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactName();
+      doReturn((Integer) null).when(iArtifactInfo0).getArtifactTimeout();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactType();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactURL();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactUUID();
+      doReturn((String) null).when(iArtifactInfo0).getArtifactVersion();
+      doReturn((IArtifactInfo) null).when(iArtifactInfo0).getGeneratedArtifact();
+      doReturn((List) null).when(iArtifactInfo0).getRelatedArtifacts();
+      linkedList0.add(iArtifactInfo0);
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData0).getDistributionID();
+      doReturn((List<IResourceInstance>) null).when(iNotificationData0).getResources();
+      doReturn(linkedList0).when(iNotificationData0).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData0).getServiceDescription();
+      doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceName();
+      doReturn((String) null).when(iNotificationData0).getServiceUUID();
+      doReturn("(").when(iNotificationData0).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      LinkedList<IVfModuleMetadata> linkedList0 = new LinkedList<IVfModuleMetadata>();
+      LinkedList<IVfModuleMetadata> linkedList1 = new LinkedList<IVfModuleMetadata>();
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      linkedList1.add(iVfModuleMetadata0);
+      LinkedList<String> linkedList2 = new LinkedList<String>();
+      LinkedList<String> linkedList3 = new LinkedList<String>();
+      linkedList1.removeFirst();
+      linkedList0.addAll((Collection<? extends IVfModuleMetadata>) linkedList1);
+      LinkedList<String> linkedList4 = new LinkedList<String>();
+      LinkedList<String> linkedList5 = new LinkedList<String>();
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      LinkedList<IResourceInstance> linkedList6 = new LinkedList<IResourceInstance>();
+      LinkedList<IArtifactInfo> linkedList7 = new LinkedList<IArtifactInfo>();
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("]=ztki(=]").when(iNotificationData0).getDistributionID();
+      doReturn(linkedList6, linkedList6).when(iNotificationData0).getResources();
+      doReturn(linkedList7).when(iNotificationData0).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData0).getServiceDescription();
+      doReturn("").when(iNotificationData0).getServiceInvariantUUID();
+      doReturn("").when(iNotificationData0).getServiceName();
+      doReturn("VG).").when(iNotificationData0).getServiceUUID();
+      doReturn("").when(iNotificationData0).getServiceVersion();
+      linkedList0.spliterator();
+      linkedList0.containsAll(linkedList1);
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      LinkedList<IResourceInstance> linkedList8 = new LinkedList<IResourceInstance>();
+      INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("C'K").when(iNotificationData1).getDistributionID();
+      doReturn(linkedList6, linkedList8).when(iNotificationData1).getResources();
+      doReturn(linkedList7).when(iNotificationData1).getServiceArtifacts();
+      doReturn("NotificationDataImpl [distributionID=").when(iNotificationData1).getServiceDescription();
+      doReturn((String) null).when(iNotificationData1).getServiceInvariantUUID();
+      doReturn("B.").when(iNotificationData1).getServiceName();
+      doReturn("").when(iNotificationData1).getServiceUUID();
+      doReturn("").when(iNotificationData1).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData1);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      LinkedList<IVfModuleMetadata> linkedList0 = new LinkedList<IVfModuleMetadata>();
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      linkedList0.add(iVfModuleMetadata0);
+      linkedList0.add((IVfModuleMetadata) null);
+      LinkedList<String> linkedList1 = new LinkedList<String>();
+      IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn(linkedList1, linkedList1, linkedList1, linkedList1).when(iVfModuleMetadata1).getArtifacts();
+      doReturn("8u1XbrrMy{J2", "").when(iVfModuleMetadata1).getVfModuleModelDescription();
+      doReturn("YR/UZ7q\7frmvO", "8u1XbrrMy{J2").when(iVfModuleMetadata1).getVfModuleModelInvariantUUID();
+      doReturn("8u1XbrrMy{J2", ".l=(8f`8f}.9>\7fyn").when(iVfModuleMetadata1).getVfModuleModelName();
+      doReturn("", "YR/UZ7q\7frmvO").when(iVfModuleMetadata1).getVfModuleModelUUID();
+      doReturn("[66/OPYLD.B%", ".l=(8f`8f}.9>\7fyn").when(iVfModuleMetadata1).getVfModuleModelVersion();
+      doReturn(false, true).when(iVfModuleMetadata1).isBase();
+      LinkedList<IVfModuleMetadata> linkedList2 = new LinkedList<IVfModuleMetadata>();
+      linkedList2.add((IVfModuleMetadata) null);
+      linkedList2.offer((IVfModuleMetadata) null);
+      Predicate<IVfModuleMetadata> predicate0 = (Predicate<IVfModuleMetadata>) mock(Predicate.class, new ViolatedAssumptionAnswer());
+      doReturn(true, false).when(predicate0).test(any());
+      linkedList2.removeIf(predicate0);
+      linkedList0.retainAll(linkedList2);
+      LinkedList<String> linkedList3 = new LinkedList<String>();
+      IVfModuleMetadata iVfModuleMetadata2 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn(linkedList3, linkedList3, linkedList3, linkedList1).when(iVfModuleMetadata2).getArtifacts();
+      doReturn("YR/UZ7q\7frmvO", "8u1XbrrMy{J2").when(iVfModuleMetadata2).getVfModuleModelDescription();
+      doReturn("", "8u1XbrrMy{J2").when(iVfModuleMetadata2).getVfModuleModelInvariantUUID();
+      doReturn("[66/OPYLD.B%", "").when(iVfModuleMetadata2).getVfModuleModelName();
+      doReturn("", "[66/OPYLD.B%").when(iVfModuleMetadata2).getVfModuleModelUUID();
+      doReturn((String) null, "").when(iVfModuleMetadata2).getVfModuleModelVersion();
+      doReturn(true, false).when(iVfModuleMetadata2).isBase();
+      linkedList0.add(iVfModuleMetadata2);
+      linkedList0.push(iVfModuleMetadata1);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      ASDCNotificationLogging aSDCNotificationLogging1 = new ASDCNotificationLogging();
+      ASDCNotificationLogging aSDCNotificationLogging2 = new ASDCNotificationLogging();
+      ASDCNotificationLogging aSDCNotificationLogging3 = new ASDCNotificationLogging();
+      String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      assertEquals("{\nVfModuleMetaData:\nVfModuleModelName:.l=(8f`8f}.9>\7fyn\nVfModuleModelVersion:.l=(8f`8f}.9>\7fyn\nVfModuleModelUUID:YR/UZ7q\7frmvO\nVfModuleModelInvariantUUID:8u1XbrrMy{J2\nVfModuleModelDescription:\nArtifacts UUID List:\n}\n\nisBase:true\n\n,\nNULL\n,\nVfModuleMetaData:\nVfModuleModelName:\nVfModuleModelVersion:\nVfModuleModelUUID:[66/OPYLD.B%\nVfModuleModelInvariantUUID:8u1XbrrMy{J2\nVfModuleModelDescription:8u1XbrrMy{J2\nArtifacts UUID List:\n}\n\nisBase:false\n\n\n}\n", string0);
+      
+      LinkedList<IResourceInstance> linkedList4 = new LinkedList<IResourceInstance>();
+      LinkedList<IResourceInstance> linkedList5 = new LinkedList<IResourceInstance>((Collection<? extends IResourceInstance>) linkedList4);
+      LinkedList<IArtifactInfo> linkedList6 = new LinkedList<IArtifactInfo>();
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("95y$c-.BW5V()41WR").when(iNotificationData0).getDistributionID();
+      doReturn(linkedList5, linkedList4).when(iNotificationData0).getResources();
+      doReturn(linkedList6).when(iNotificationData0).getServiceArtifacts();
+      doReturn(", artifactTimeout=").when(iNotificationData0).getServiceDescription();
+      doReturn("[66/OPYLD.B%").when(iNotificationData0).getServiceInvariantUUID();
+      doReturn("[66/OPYLD.B%").when(iNotificationData0).getServiceName();
+      doReturn(", artifactChecksum=").when(iNotificationData0).getServiceUUID();
+      doReturn("W1vX^KnIx[x").when(iNotificationData0).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      ASDCNotificationLogging aSDCNotificationLogging4 = new ASDCNotificationLogging();
+      ASDCNotificationLogging aSDCNotificationLogging5 = new ASDCNotificationLogging();
+      LinkedList<IResourceInstance> linkedList7 = new LinkedList<IResourceInstance>();
+      INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("").when(iNotificationData1).getDistributionID();
+      doReturn(linkedList4, linkedList7).when(iNotificationData1).getResources();
+      doReturn(linkedList6).when(iNotificationData1).getServiceArtifacts();
+      doReturn("3l\"ZrTP`IQ-4x]").when(iNotificationData1).getServiceDescription();
+      doReturn("").when(iNotificationData1).getServiceInvariantUUID();
+      doReturn("").when(iNotificationData1).getServiceName();
+      doReturn("").when(iNotificationData1).getServiceUUID();
+      doReturn("").when(iNotificationData1).getServiceVersion();
+      String string1 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData1);
+      assertEquals("ASDC Notification:\nDistributionID:\nServiceName:\nServiceVersion:\nServiceUUID:\nServiceInvariantUUID:\nServiceDescription:3l\"ZrTP`IQ-4x]\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n", string1);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData0).getDistributionID();
+      doReturn((List) null).when(iNotificationData0).getResources();
+      doReturn((List) null).when(iNotificationData0).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData0).getServiceDescription();
+      doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceName();
+      doReturn((String) null).when(iNotificationData0).getServiceUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      INotificationData iNotificationData1 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData1).getDistributionID();
+      doReturn((List) null).when(iNotificationData1).getResources();
+      doReturn((List) null).when(iNotificationData1).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData1).getServiceDescription();
+      doReturn((String) null).when(iNotificationData1).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData1).getServiceName();
+      doReturn((String) null).when(iNotificationData1).getServiceUUID();
+      doReturn((String) null).when(iNotificationData1).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData1);
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      INotificationData iNotificationData2 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData2).getDistributionID();
+      doReturn((List) null).when(iNotificationData2).getResources();
+      doReturn((List) null).when(iNotificationData2).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData2).getServiceDescription();
+      doReturn((String) null).when(iNotificationData2).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData2).getServiceName();
+      doReturn((String) null).when(iNotificationData2).getServiceUUID();
+      doReturn((String) null).when(iNotificationData2).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData2);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      ASDCNotificationLogging aSDCNotificationLogging1 = new ASDCNotificationLogging();
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      INotificationData iNotificationData3 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData3).getDistributionID();
+      doReturn((List) null).when(iNotificationData3).getResources();
+      doReturn((List) null).when(iNotificationData3).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData3).getServiceDescription();
+      doReturn((String) null).when(iNotificationData3).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData3).getServiceName();
+      doReturn((String) null).when(iNotificationData3).getServiceUUID();
+      doReturn((String) null).when(iNotificationData3).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData3);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      ASDCNotificationLogging aSDCNotificationLogging2 = new ASDCNotificationLogging();
+      LinkedList<IVfModuleMetadata> linkedList0 = new LinkedList<IVfModuleMetadata>();
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null, (List) null, (List) null).when(iVfModuleMetadata0).getArtifacts();
+      doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelDescription();
+      doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelInvariantUUID();
+      doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelName();
+      doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelUUID();
+      doReturn((String) null, (String) null, (String) null).when(iVfModuleMetadata0).getVfModuleModelVersion();
+      doReturn(false, false, false).when(iVfModuleMetadata0).isBase();
+      linkedList0.add(iVfModuleMetadata0);
+      linkedList0.removeLastOccurrence("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\n\n}\n\n");
+      linkedList0.remove((Object) null);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      ASDCNotificationLogging aSDCNotificationLogging3 = new ASDCNotificationLogging();
+      String string0 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      String string1 = ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      assertEquals("{\nVfModuleMetaData:\nVfModuleModelName:NULL\nVfModuleModelVersion:NULL\nVfModuleModelUUID:NULL\nVfModuleModelInvariantUUID:NULL\nVfModuleModelDescription:NULL\nArtifacts UUID List:NULL\nisBase:false\n\n\n}\n", string1);
+      assertTrue(string1.equals((Object)string0));
+      
+      ASDCNotificationLogging aSDCNotificationLogging4 = new ASDCNotificationLogging();
+      ASDCNotificationLogging.dumpVfModuleMetaDataList((List<IVfModuleMetadata>) null);
+      INotificationData iNotificationData4 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(iNotificationData4).getDistributionID();
+      doReturn((List) null).when(iNotificationData4).getResources();
+      doReturn((List) null).when(iNotificationData4).getServiceArtifacts();
+      doReturn((String) null).when(iNotificationData4).getServiceDescription();
+      doReturn((String) null).when(iNotificationData4).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData4).getServiceName();
+      doReturn((String) null).when(iNotificationData4).getServiceUUID();
+      doReturn((String) null).when(iNotificationData4).getServiceVersion();
+      String string2 = ASDCNotificationLogging.dumpASDCNotification(iNotificationData4);
+      assertEquals("ASDC Notification:\nDistributionID:NULL\nServiceName:NULL\nServiceVersion:NULL\nServiceUUID:NULL\nServiceInvariantUUID:NULL\nServiceDescription:NULL\nService Artifacts List:\nNULL\nResource Instances List:\nNULL\n", string2);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      ASDCNotificationLogging aSDCNotificationLogging0 = new ASDCNotificationLogging();
+      LinkedList<IResourceInstance> linkedList0 = new LinkedList<IResourceInstance>();
+      IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(iResourceInstance0).getArtifacts();
+      doReturn((String) null).when(iResourceInstance0).getResourceInstanceName();
+      doReturn((String) null).when(iResourceInstance0).getResourceInvariantUUID();
+      doReturn((String) null).when(iResourceInstance0).getResourceName();
+      doReturn((String) null).when(iResourceInstance0).getResourceType();
+      doReturn((String) null).when(iResourceInstance0).getResourceUUID();
+      doReturn((String) null).when(iResourceInstance0).getResourceVersion();
+      linkedList0.add(iResourceInstance0);
+      LinkedList<IArtifactInfo> linkedList1 = new LinkedList<IArtifactInfo>();
+      INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer());
+      doReturn("(n,0").when(iNotificationData0).getDistributionID();
+      doReturn(linkedList0, linkedList0).when(iNotificationData0).getResources();
+      doReturn(linkedList1).when(iNotificationData0).getServiceArtifacts();
+      doReturn("(n,0").when(iNotificationData0).getServiceDescription();
+      doReturn((String) null).when(iNotificationData0).getServiceInvariantUUID();
+      doReturn((String) null).when(iNotificationData0).getServiceName();
+      doReturn("").when(iNotificationData0).getServiceUUID();
+      doReturn("t1N;ZSJsATt:&Ug").when(iNotificationData0).getServiceVersion();
+      ASDCNotificationLogging.dumpASDCNotification(iNotificationData0);
+      LinkedList<IVfModuleMetadata> linkedList2 = new LinkedList<IVfModuleMetadata>();
+      linkedList2.clear();
+      // Undeclared exception!
+      try { 
+        linkedList2.remove();
+        fail("Expecting exception: NoSuchElementException");
+      
+      } catch(NoSuchElementException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.util.LinkedList", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      LinkedList<IVfModuleMetadata> linkedList0 = new LinkedList<IVfModuleMetadata>();
+      ASDCNotificationLogging.dumpVfModuleMetaDataList(linkedList0);
+      IVfModuleMetadata iVfModuleMetadata0 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      linkedList0.add(iVfModuleMetadata0);
+      linkedList0.remove((Object) "\n}\n");
+      IVfModuleMetadata iVfModuleMetadata1 = mock(IVfModuleMetadata.class, new ViolatedAssumptionAnswer());
+      linkedList0.offerLast(iVfModuleMetadata1);
+      // Undeclared exception!
+      try { 
+        linkedList0.subList((-1), (-1));
+        fail("Expecting exception: IndexOutOfBoundsException");
+      
+      } catch(IndexOutOfBoundsException e) {
+         //
+         // fromIndex = -1
+         //
+         verifyException("java.util.SubList", e);
+      }
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/ASDCNotificationLoggingESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1344bbe
--- /dev/null
@@ -0,0 +1,81 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:31:27 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.util;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ASDCNotificationLoggingESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.util.ASDCNotificationLogging"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ASDCNotificationLoggingESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.sdc.api.notification.INotificationData",
+      "org.openecomp.sdc.api.notification.IResourceInstance",
+      "org.openecomp.sdc.api.notification.IVfModuleMetadata",
+      "org.openecomp.mso.asdc.util.ASDCNotificationLogging",
+      "org.openecomp.sdc.api.notification.IArtifactInfo"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/YamlEditorESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/YamlEditorESTest.java
new file mode 100644 (file)
index 0000000..c050a9c
--- /dev/null
@@ -0,0 +1,420 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Fri Nov 25 13:17:51 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.util;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+import org.yaml.snakeyaml.Yaml;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class YamlEditorESTest extends YamlEditorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      boolean boolean0 = yamlEditor0.isParentTemplate("file:///");
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      HashMap<String, Object> hashMap0 = new HashMap<String, Object>();
+      Yaml yaml0 = mock(Yaml.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null, (String) null).when(yaml0).dump(any());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yaml", (Object) yaml0);
+      yamlEditor0.encode((Map<String, Object>) hashMap0);
+      Map<String, Object> map0 = (Map<String, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn((Object) null).when(map0).get(any());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) map0);
+      yamlEditor0.toString();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.getYamlResourceTypeList();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      HashMap<Object, String> hashMap0 = new HashMap<Object, String>();
+      Yaml yaml0 = mock(Yaml.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yaml", (Object) yaml0);
+      Object object0 = new Object();
+      Map<Integer, Object> map0 = (Map<Integer, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn(hashMap0, object0).when(map0).get(any());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) map0);
+      yamlEditor0.getParameterList();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.getYamlResourceTypeList();
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // java.lang.Object cannot be cast to java.util.Map
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.getYamlNestedFileResourceTypeList();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      HashMap<Object, String> hashMap0 = new HashMap<Object, String>();
+      Yaml yaml0 = mock(Yaml.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yaml", (Object) yaml0);
+      Map<Integer, Object> map0 = (Map<Integer, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn(hashMap0, (Object) null).when(map0).get(any());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) map0);
+      yamlEditor0.getYamlNestedFileResourceTypeList();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.getParameterList();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      HashMap<String, Object> hashMap0 = new HashMap<String, Object>();
+      Set<Map.Entry<String, Object>> set0 = (Set<Map.Entry<String, Object>>)hashMap0.entrySet();
+      hashMap0.put("null\n", set0);
+      // Undeclared exception!
+      try { 
+        yamlEditor0.encode((Map<String, Object>) hashMap0);
+        fail("Expecting exception: StackOverflowError");
+      
+      } catch(StackOverflowError e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      Set<Map.Entry<String, Object>> set0 = (Set<Map.Entry<String, Object>>) mock(Set.class, new ViolatedAssumptionAnswer());
+      doReturn((Iterator) null).when(set0).iterator();
+      Map<String, Object> map0 = (Map<String, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn(set0).when(map0).entrySet();
+      doReturn(2655).when(map0).size();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.encode(map0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.yaml.snakeyaml.representer.BaseRepresenter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      Map<String, Object> map0 = (Map<String, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn((-300)).when(map0).size();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.encode(map0);
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal Capacity: -300
+         //
+         verifyException("java.util.ArrayList", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      byte[] byteArray0 = new byte[0];
+      YamlEditor yamlEditor0 = new YamlEditor(byteArray0);
+      Map<HeatTemplateParam, String> map0 = (Map<HeatTemplateParam, String>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn("").when(map0).get(any());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) map0);
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.addParameterList(linkedHashSet0);
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // java.lang.String cannot be cast to java.util.Map
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      byte[] byteArray0 = new byte[1];
+      YamlEditor yamlEditor0 = null;
+      try {
+        yamlEditor0 = new YamlEditor(byteArray0);
+        fail("Expecting exception: RuntimeException");
+      
+      } catch(RuntimeException e) {
+         //
+         // special characters are not allowed
+         //
+         verifyException("org.yaml.snakeyaml.reader.StreamReader", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      byte[] byteArray0 = new byte[1];
+      byteArray0[0] = (byte)37;
+      YamlEditor yamlEditor0 = null;
+      try {
+        yamlEditor0 = new YamlEditor(byteArray0);
+        fail("Expecting exception: RuntimeException");
+      
+      } catch(RuntimeException e) {
+         //
+         // while scanning a directive
+         //  in 'reader', line 1, column 1:
+         //     %
+         //     ^
+         // expected alphabetic or numeric character, but found \u0000(0)
+         //  in 'reader', line 1, column 2:
+         //     %
+         //      ^
+         //
+         verifyException("org.yaml.snakeyaml.scanner.ScannerImpl", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      byte[] byteArray0 = new byte[2];
+      byteArray0[1] = (byte) (-80);
+      YamlEditor yamlEditor0 = null;
+      try {
+        yamlEditor0 = new YamlEditor(byteArray0);
+        fail("Expecting exception: RuntimeException");
+      
+      } catch(RuntimeException e) {
+         //
+         // java.nio.charset.MalformedInputException: Input length = 1
+         //
+         verifyException("org.yaml.snakeyaml.reader.StreamReader", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      byte[] byteArray0 = new byte[1];
+      byteArray0[0] = (byte)110;
+      YamlEditor yamlEditor0 = null;
+      try {
+        yamlEditor0 = new YamlEditor(byteArray0);
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // java.lang.String cannot be cast to java.util.Map
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      String string0 = yamlEditor0.encode();
+      assertEquals("null\n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      HashMap<Object, String> hashMap0 = new HashMap<Object, String>();
+      Map<Integer, Object> map0 = (Map<Integer, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn(hashMap0).when(map0).get(any());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) map0);
+      Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
+      doReturn((Iterator) null).when(set0).iterator();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.addParameterList(set0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      byte[] byteArray0 = new byte[0];
+      YamlEditor yamlEditor0 = new YamlEditor(byteArray0);
+      HashMap<HeatTemplateParam, String> hashMap0 = new HashMap<HeatTemplateParam, String>();
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) hashMap0);
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      HeatTemplateParam heatTemplateParam0 = mock(HeatTemplateParam.class, new ViolatedAssumptionAnswer());
+      doReturn(">!=_`7`2d(").when(heatTemplateParam0).getParamName();
+      doReturn(">!=_`7`2d(").when(heatTemplateParam0).getParamType();
+      linkedHashSet0.add(heatTemplateParam0);
+      yamlEditor0.addParameterList(linkedHashSet0);
+      Set<HeatTemplateParam> set0 = yamlEditor0.getParameterList();
+      assertFalse(set0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      HashMap<Object, String> hashMap0 = new HashMap<Object, String>();
+      Map<Integer, Object> map0 = (Map<Integer, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn(hashMap0).when(map0).get(any());
+      hashMap0.put(yamlEditor0, "V28");
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) map0);
+      // Undeclared exception!
+      try { 
+        yamlEditor0.getParameterList();
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // java.lang.String cannot be cast to java.util.Map
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      HashMap<Object, String> hashMap0 = new HashMap<Object, String>();
+      Map<Integer, Object> map0 = (Map<Integer, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn(hashMap0).when(map0).get(any());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) map0);
+      List<String> list0 = yamlEditor0.getYamlResourceTypeList();
+      assertEquals(0, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      // Undeclared exception!
+      try { 
+        yamlEditor0.isParentTemplate((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      yamlEditor0.verifyTemplate();
+      yamlEditor0.isParentTemplate("\"");
+      Map<String, Object> map0 = (Map<String, Object>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn(yamlEditor0).when(map0).get(any());
+      PrivateAccess.setVariable((Class<YamlEditor>) YamlEditor.class, yamlEditor0, "yml", (Object) map0);
+      // Undeclared exception!
+      try { 
+        yamlEditor0.getYamlNestedFileResourceTypeList();
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // org.openecomp.mso.asdc.util.YamlEditor cannot be cast to java.util.Map
+         //
+         verifyException("org.openecomp.mso.asdc.util.YamlEditor", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      HashMap<String, Object> hashMap0 = new HashMap<String, Object>();
+      String string0 = yamlEditor0.encode((Map<String, Object>) hashMap0);
+      assertEquals("{}\n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      YamlEditor yamlEditor0 = null;
+      try {
+        yamlEditor0 = new YamlEditor((byte[]) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      YamlEditor yamlEditor0 = new YamlEditor();
+      String string0 = yamlEditor0.toString();
+      assertEquals("null\n", string0);
+  }
+}
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/YamlEditorESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/util/YamlEditorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..dca8696
--- /dev/null
@@ -0,0 +1,255 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Fri Nov 25 13:17:51 GMT 2016
+ */
+
+package org.openecomp.mso.asdc.util;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class YamlEditorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.asdc.util.YamlEditor"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(YamlEditorESTestscaffolding.class.getClassLoader() ,
+      "org.yaml.snakeyaml.parser.ParserImpl",
+      "org.yaml.snakeyaml.nodes.SequenceNode",
+      "org.yaml.snakeyaml.composer.ComposerException",
+      "org.yaml.snakeyaml.introspector.BeanAccess",
+      "org.yaml.snakeyaml.representer.Representer$RepresentJavaBean",
+      "org.yaml.snakeyaml.external.com.google.gdata.util.common.base.PercentEscaper",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentNumber",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentBoolean",
+      "org.yaml.snakeyaml.scanner.ScannerImpl$Chomping",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlPairs",
+      "org.yaml.snakeyaml.emitter.Emitter$ExpectNothing",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentList",
+      "org.yaml.snakeyaml.events.Event",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlInt",
+      "org.yaml.snakeyaml.nodes.Node",
+      "org.yaml.snakeyaml.introspector.MissingProperty",
+      "org.yaml.snakeyaml.emitter.Emitable",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlTimestamp",
+      "org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject",
+      "org.yaml.snakeyaml.composer.Composer",
+      "org.yaml.snakeyaml.tokens.FlowMappingStartToken",
+      "org.yaml.snakeyaml.emitter.Emitter$ExpectDocumentStart",
+      "org.yaml.snakeyaml.constructor.SafeConstructor",
+      "org.yaml.snakeyaml.nodes.NodeId",
+      "org.yaml.snakeyaml.events.SequenceEndEvent",
+      "org.yaml.snakeyaml.events.MappingStartEvent",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentArray",
+      "org.yaml.snakeyaml.parser.Parser",
+      "org.yaml.snakeyaml.tokens.AnchorToken",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentDate",
+      "org.yaml.snakeyaml.parser.Production",
+      "org.yaml.snakeyaml.introspector.Property",
+      "org.yaml.snakeyaml.tokens.StreamStartToken",
+      "org.yaml.snakeyaml.DumperOptions$Version",
+      "org.yaml.snakeyaml.constructor.ConstructorException",
+      "org.yaml.snakeyaml.emitter.EmitterException",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlBool",
+      "org.yaml.snakeyaml.error.MarkedYAMLException",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlFloat",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentNull",
+      "org.yaml.snakeyaml.events.DocumentEndEvent",
+      "org.yaml.snakeyaml.error.Mark",
+      "org.yaml.snakeyaml.emitter.Emitter$ExpectFirstFlowMappingKey",
+      "org.yaml.snakeyaml.tokens.DocumentEndToken",
+      "org.yaml.snakeyaml.introspector.PropertyUtils",
+      "org.yaml.snakeyaml.external.com.google.gdata.util.common.base.Escaper",
+      "org.yaml.snakeyaml.events.StreamStartEvent",
+      "org.yaml.snakeyaml.error.YAMLException",
+      "org.yaml.snakeyaml.scanner.ScannerImpl",
+      "org.yaml.snakeyaml.reader.UnicodeReader",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlOmap",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentMap",
+      "org.yaml.snakeyaml.parser.ParserImpl$ParseBlockNode",
+      "org.yaml.snakeyaml.external.com.google.gdata.util.common.base.UnicodeEscaper",
+      "org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlNull",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlStr",
+      "org.yaml.snakeyaml.events.CollectionEndEvent",
+      "org.yaml.snakeyaml.DumperOptions",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentSet",
+      "org.yaml.snakeyaml.resolver.Resolver",
+      "org.yaml.snakeyaml.tokens.Token",
+      "org.yaml.snakeyaml.events.SequenceStartEvent",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap",
+      "org.yaml.snakeyaml.constructor.Constructor$ConstructMapping",
+      "org.yaml.snakeyaml.serializer.Serializer$1",
+      "org.yaml.snakeyaml.constructor.Constructor",
+      "org.yaml.snakeyaml.scanner.ScannerException",
+      "org.yaml.snakeyaml.tokens.ScalarToken",
+      "org.yaml.snakeyaml.resolver.ResolverTuple",
+      "org.yaml.snakeyaml.constructor.AbstractConstruct",
+      "org.yaml.snakeyaml.tokens.TagToken",
+      "org.yaml.snakeyaml.nodes.CollectionNode",
+      "org.yaml.snakeyaml.nodes.ScalarNode",
+      "org.yaml.snakeyaml.TypeDescription",
+      "org.yaml.snakeyaml.events.AliasEvent",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlSet",
+      "org.yaml.snakeyaml.constructor.Constructor$ConstructSequence",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlSeq",
+      "org.yaml.snakeyaml.reader.ReaderException",
+      "org.yaml.snakeyaml.tokens.DocumentStartToken",
+      "org.yaml.snakeyaml.util.UriEncoder",
+      "org.yaml.snakeyaml.serializer.SerializerException",
+      "org.yaml.snakeyaml.external.com.google.gdata.util.common.base.UnicodeEscaper$2",
+      "org.yaml.snakeyaml.events.MappingEndEvent",
+      "org.yaml.snakeyaml.parser.VersionTagsTuple",
+      "org.yaml.snakeyaml.DumperOptions$FlowStyle",
+      "org.yaml.snakeyaml.events.DocumentStartEvent",
+      "org.yaml.snakeyaml.tokens.FlowMappingEndToken",
+      "org.yaml.snakeyaml.emitter.Emitter$ExpectDocumentRoot",
+      "org.yaml.snakeyaml.representer.BaseRepresenter",
+      "org.yaml.snakeyaml.nodes.AnchorNode",
+      "org.yaml.snakeyaml.tokens.FlowSequenceStartToken",
+      "org.yaml.snakeyaml.tokens.FlowSequenceEndToken",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlBinary",
+      "org.openecomp.mso.asdc.util.YamlEditor",
+      "org.yaml.snakeyaml.emitter.EmitterState",
+      "org.yaml.snakeyaml.events.Event$ID",
+      "org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart",
+      "org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder",
+      "org.yaml.snakeyaml.DumperOptions$LineBreak",
+      "org.yaml.snakeyaml.constructor.Construct",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentEnum",
+      "org.yaml.snakeyaml.introspector.PropertyUtils$1",
+      "org.yaml.snakeyaml.serializer.Serializer",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentPrimitiveArray",
+      "org.yaml.snakeyaml.scanner.Constant",
+      "org.yaml.snakeyaml.representer.SafeRepresenter",
+      "org.openecomp.mso.db.catalog.beans.HeatTemplateParam",
+      "org.yaml.snakeyaml.parser.ParserException",
+      "org.yaml.snakeyaml.tokens.AliasToken",
+      "org.yaml.snakeyaml.emitter.ScalarAnalysis",
+      "org.yaml.snakeyaml.constructor.SafeConstructor$ConstructUndefined",
+      "org.yaml.snakeyaml.events.CollectionStartEvent",
+      "org.yaml.snakeyaml.parser.ParserImpl$ParseStreamStart",
+      "org.yaml.snakeyaml.DumperOptions$ScalarStyle",
+      "org.yaml.snakeyaml.tokens.StreamEndToken",
+      "org.yaml.snakeyaml.constructor.BaseConstructor",
+      "org.yaml.snakeyaml.representer.BaseRepresenter$1",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentByteArray",
+      "org.yaml.snakeyaml.nodes.MappingNode",
+      "org.yaml.snakeyaml.Yaml",
+      "org.yaml.snakeyaml.constructor.Constructor$ConstructScalar",
+      "org.yaml.snakeyaml.scanner.SimpleKey",
+      "org.yaml.snakeyaml.resolver.Resolver$1",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentIterator",
+      "org.yaml.snakeyaml.emitter.Emitter$ExpectStreamStart",
+      "org.yaml.snakeyaml.tokens.DirectiveToken",
+      "org.yaml.snakeyaml.representer.Represent",
+      "org.yaml.snakeyaml.events.StreamEndEvent",
+      "org.yaml.snakeyaml.tokens.Token$ID",
+      "org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentEnd",
+      "org.yaml.snakeyaml.nodes.Tag",
+      "org.yaml.snakeyaml.util.ArrayStack",
+      "org.yaml.snakeyaml.representer.SafeRepresenter$RepresentString",
+      "org.yaml.snakeyaml.events.ImplicitTuple",
+      "org.yaml.snakeyaml.scanner.Scanner",
+      "org.yaml.snakeyaml.emitter.Emitter$ExpectFirstDocumentStart",
+      "org.yaml.snakeyaml.events.NodeEvent",
+      "org.yaml.snakeyaml.emitter.Emitter",
+      "org.yaml.snakeyaml.reader.StreamReader",
+      "org.yaml.snakeyaml.representer.Representer",
+      "org.yaml.snakeyaml.emitter.Emitter$ExpectDocumentEnd",
+      "org.yaml.snakeyaml.events.ScalarEvent"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(YamlEditorESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.yaml.snakeyaml.constructor.SafeConstructor",
+      "org.yaml.snakeyaml.nodes.NodeId",
+      "org.yaml.snakeyaml.external.com.google.gdata.util.common.base.UnicodeEscaper",
+      "org.yaml.snakeyaml.external.com.google.gdata.util.common.base.PercentEscaper",
+      "org.yaml.snakeyaml.util.UriEncoder",
+      "org.yaml.snakeyaml.nodes.Tag",
+      "org.yaml.snakeyaml.representer.SafeRepresenter",
+      "org.yaml.snakeyaml.DumperOptions$FlowStyle",
+      "org.yaml.snakeyaml.representer.BaseRepresenter$1",
+      "org.yaml.snakeyaml.DumperOptions$ScalarStyle",
+      "org.yaml.snakeyaml.DumperOptions$LineBreak",
+      "org.yaml.snakeyaml.resolver.Resolver",
+      "org.yaml.snakeyaml.introspector.BeanAccess",
+      "org.yaml.snakeyaml.reader.StreamReader",
+      "org.yaml.snakeyaml.reader.UnicodeReader",
+      "org.yaml.snakeyaml.error.YAMLException",
+      "org.yaml.snakeyaml.reader.ReaderException",
+      "org.yaml.snakeyaml.emitter.Emitter",
+      "org.yaml.snakeyaml.serializer.Serializer$1",
+      "org.yaml.snakeyaml.resolver.Resolver$1",
+      "org.yaml.snakeyaml.scanner.Constant",
+      "org.yaml.snakeyaml.introspector.PropertyUtils$1",
+      "org.yaml.snakeyaml.parser.ParserImpl",
+      "org.yaml.snakeyaml.scanner.ScannerImpl",
+      "org.yaml.snakeyaml.events.Event$ID",
+      "org.yaml.snakeyaml.tokens.Token$ID",
+      "org.yaml.snakeyaml.error.MarkedYAMLException",
+      "org.yaml.snakeyaml.scanner.ScannerException",
+      "org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder",
+      "org.yaml.snakeyaml.parser.ParserException",
+      "org.openecomp.mso.asdc.util.YamlEditor"
+    );
+  }
+}
diff --git a/asdc-controller/src/test/resources/logback-test.xml b/asdc-controller/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..a23395f
--- /dev/null
@@ -0,0 +1,47 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/asdc-controller/src/test/resources/mso-bad.json b/asdc-controller/src/test/resources/mso-bad.json
new file mode 100644 (file)
index 0000000..be372fc
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "asdc-connections":{,
+    "asdc-controller1":{
+        "user": "testuser",
+        "consumerGroup": "consumerGroup",
+        "consumerId": "consumerId",
+        "environmentName": "environmentName",
+        "asdcAddress": "hostname1",
+
+        "pollingInterval":10,
+        "pollingTimeout":30
+        
+    }
+  }
+}
diff --git a/asdc-controller/src/test/resources/mso-two-configs.json b/asdc-controller/src/test/resources/mso-two-configs.json
new file mode 100644 (file)
index 0000000..20c5f31
--- /dev/null
@@ -0,0 +1,26 @@
+{
+  "asdc-connections":{
+    "asdc-controller1":{
+        "user": "User1",
+        "consumerGroup": "consumerGroup1",
+        "consumerId": "consumerId1",
+        "environmentName": "environmentName1",
+        "asdcAddress": "hostname1",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30
+        
+    },
+     "asdc-controller2":{
+        "user": "User2",
+        "consumerGroup": "consumerGroup2",
+        "consumerId": "consumerId2",
+        "environmentName": "environmentName2",
+        "asdcAddress": "hostname2",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30
+        
+    }
+  }
+}
diff --git a/asdc-controller/src/test/resources/mso-two-configs2.json b/asdc-controller/src/test/resources/mso-two-configs2.json
new file mode 100644 (file)
index 0000000..29db2ee
--- /dev/null
@@ -0,0 +1,26 @@
+{
+  "asdc-connections":{
+    "asdc-controller1":{
+        "user": "User1",
+        "consumerGroup": "consumerGroup1",
+        "consumerId": "consumerId1",
+        "environmentName": "environmentName1",
+        "asdcAddress": "hostname1",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30
+        
+    },
+     "asdc-controller2B":{
+        "user": "User2",
+        "consumerGroup": "consumerGroup2",
+        "consumerId": "consumerId2",
+        "environmentName": "environmentName2",
+        "asdcAddress": "hostname2",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30
+        
+    }
+  }
+}
diff --git a/asdc-controller/src/test/resources/mso-with-NULL.json b/asdc-controller/src/test/resources/mso-with-NULL.json
new file mode 100644 (file)
index 0000000..b7ef75b
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "asdc-connections":{
+    "asdc-controller1":{
+        "user": "User",
+        "consumerGroup": "NULL",
+        "consumerId": "consumerId",
+        "environmentName": "environmentName",
+        "asdcAddress": "hostname",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30
+        
+    }
+  }
+}
diff --git a/asdc-controller/src/test/resources/mso.json b/asdc-controller/src/test/resources/mso.json
new file mode 100644 (file)
index 0000000..d74ee07
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "asdc-connections":{
+    "asdc-controller1":{
+        "user": "User",
+        "consumerGroup": "consumerGroup",
+        "consumerId": "consumerId",
+        "environmentName": "environmentName",
+        "asdcAddress": "hostname",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30
+    
+    }
+  }
+}
diff --git a/asdc-controller/src/test/resources/mso2.json b/asdc-controller/src/test/resources/mso2.json
new file mode 100644 (file)
index 0000000..2d31fc4
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "asdc-connections":{
+    "asdc-controller1":{
+        "user": "User",
+        "consumerGroup": "consumerGroup",
+        "consumerId": "consumerId",
+        "environmentName": "environmentName",
+        "asdcAddress": "hostname",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30
+        
+    }
+  }
+}
diff --git a/asdc-controller/src/test/resources/mso3.json b/asdc-controller/src/test/resources/mso3.json
new file mode 100644 (file)
index 0000000..ac84dcf
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "asdc-connections":{
+    "asdc-controller1":{
+        "user": "User",
+        "consumerGroup": "consumerGroup",
+        "consumerId": "consumerId",
+        "environmentName": "environmentName",
+        "asdcAddress": "hostname1",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30
+        
+    }
+  }
+}
diff --git a/asdc-controller/src/test/resources/mso4-with-TLS.json b/asdc-controller/src/test/resources/mso4-with-TLS.json
new file mode 100644 (file)
index 0000000..8e7c506
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "asdc-connections":{
+    "asdc-controller1":{
+        "user": "User",
+        "consumerGroup": "consumerGroup",
+        "consumerId": "consumerId",
+        "environmentName": "environmentName",
+        "asdcAddress": "hostname",
+        "password": "1c551b8b5ab91fcd5a0907b11c304199",
+        "pollingInterval":10,
+        "pollingTimeout":30,
+        "activateServerTLSAuth": true,
+        "keyStorePassword":"1c551b8b5ab91fcd5a0907b11c304199",    
+        "keyStorePath": "/test"
+    }
+  }
+}
diff --git a/asdc-controller/src/test/resources/resource-examples/autoscaling.yaml b/asdc-controller/src/test/resources/resource-examples/autoscaling.yaml
new file mode 100644 (file)
index 0000000..88eabb7
--- /dev/null
@@ -0,0 +1,216 @@
+heat_template_version: 2013-05-23 
+description: AutoScaling Wordpress 
+parameters: 
+ image: 
+   type: string 
+   description: Image used for servers 
+ key: 
+   type: string 
+   description: SSH key to connect to the servers 
+  flavor: 
+    type: string 
+    description: flavor used by the web servers 
+  database_flavor: 
+    type: string 
+    description: flavor used by the db server 
+  network: 
+    type: string 
+    description: Network used by the server 
+  subnet_id: 
+    type: string 
+    description: subnet on which the load balancer will be located 
+  database_name: 
+    type: string 
+    description: Name of the wordpress DB 
+    default: wordpress 
+  database_user: 
+    type: string 
+    description: Name of the wordpress user 
+    default: wordpress 
+  external_network_id: 
+    type: string 
+    description: UUID of a Neutron external network 
+resources: 
+  database_password: 
+    type: OS::Heat::RandomString 
+  database_root_password: 
+    type: OS::Heat::RandomString 
+  db: 
+    type: OS::Nova::Server 
+    properties: 
+      flavor: {get_param: database_flavor} 
+      image: {get_param: image} 
+      key_name: {get_param: key} 
+      networks: [{network: {get_param: network} }] 
+      user_data_format: RAW 
+      user_data: 
+        str_replace: 
+          template: | 
+            #!/bin/bash -v 
+            yum -y install mariadb mariadb-server 
+            systemctl enable mariadb.service 
+            systemctl start mariadb.service 
+            mysqladmin -u root password $db_rootpassword 
+            cat << EOF | mysql -u root --password=$db_rootpassword 
+            CREATE DATABASE $db_name; 
+            GRANT ALL PRIVILEGES ON $db_name.* TO "$db_user"@"%" 
+            IDENTIFIED BY "$db_password"; 
+            FLUSH PRIVILEGES; 
+            EXIT 
+            EOF 
+          params: 
+            $db_rootpassword: {get_attr: [database_root_password, value]} 
+            $db_name: {get_param: database_name} 
+            $db_user: {get_param: database_user} 
+            $db_password: {get_attr: [database_password, value]} 
+  asg: 
+    type: OS::Heat::AutoScalingGroup 
+    properties: 
+      min_size: 1 
+      max_size: 3 
+      resource: 
+        type: lb_server.yaml 
+        properties: 
+          flavor: {get_param: flavor} 
+          image: {get_param: image} 
+          key_name: {get_param: key} 
+          network: {get_param: network} 
+          pool_id: {get_resource: pool} 
+          metadata: {"metering.stack": {get_param: "OS::stack_id"}} 
+          user_data: 
+            str_replace: 
+              template: | 
+                #!/bin/bash -v 
+                yum -y install httpd wordpress 
+                systemctl enable httpd.service 
+                systemctl start httpd.service 
+                setsebool -P httpd_can_network_connect_db=1 
+                sed -i "/Deny from All/d" /etc/httpd/conf.d/wordpress.conf 
+                sed -i "s/Require local/Require all granted/" /etc/httpd/conf.d/wordpress.conf 
+                sed -i s/database_name_here/$db_name/ /etc/wordpress/wp-config.php 
+                sed -i s/username_here/$db_user/ /etc/wordpress/wp-config.php 
+                sed -i s/password_here/$db_password/ /etc/wordpress/wp-config.php 
+                sed -i s/localhost/$db_host/ /etc/wordpress/wp-config.php 
+                systemctl restart httpd.service 
+              params: 
+                $db_name: {get_param: database_name} 
+                $db_user: {get_param: database_user} 
+                 $db_password: {get_attr: [database_password, value]} 
+                 $db_host: {get_attr: [db, first_address]} 
+   web_server_scaleup_policy: 
+     type: OS::Heat::ScalingPolicy 
+     properties: 
+       adjustment_type: change_in_capacity 
+       auto_scaling_group_id: {get_resource: asg} 
+       cooldown: 60 
+       scaling_adjustment: 1 
+   web_server_scaledown_policy: 
+     type: OS::Heat::ScalingPolicy 
+     properties: 
+       adjustment_type: change_in_capacity 
+       auto_scaling_group_id: {get_resource: asg} 
+       cooldown: 60 
+       scaling_adjustment: -1 
+   cpu_alarm_high: 
+     type: OS::Ceilometer::Alarm 
+     properties: 
+       description: Scale-up if the average CPU > 50% for 1 minute 
+       meter_name: cpu_util 
+       statistic: avg 
+       period: 60 
+       evaluation_periods: 1 
+       threshold: 50 
+       alarm_actions: 
+         - {get_attr: [web_server_scaleup_policy, alarm_url]} 
+       matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}} 
+       comparison_operator: gt 
+   cpu_alarm_low: 
+     type: OS::Ceilometer::Alarm 
+     properties: 
+       description: Scale-down if the average CPU < 15% for 10 minutes 
+       meter_name: cpu_util 
+       statistic: avg 
+       period: 600 
+       evaluation_periods: 1 
+       threshold: 15 
+       alarm_actions: 
+         - {get_attr: [web_server_scaledown_policy, alarm_url]} 
+       matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}} 
+       comparison_operator: lt 
+   monitor: 
+     type: OS::Neutron::HealthMonitor 
+     properties: 
+       type: TCP 
+       delay: 5 
+       max_retries: 5 
+       timeout: 5 
+   pool: 
+     type: OS::Neutron::Pool 
+     properties: 
+       protocol: HTTP 
+       monitors: [{get_resource: monitor}] 
+       subnet_id: {get_param: subnet_id} 
+       lb_method: ROUND_ROBIN 
+       vip: 
+         protocol_port: 80 
+   lb: 
+     type: OS::Neutron::LoadBalancer 
+     properties: 
+       protocol_port: 80 
+       pool_id: {get_resource: pool} 
+  
+   # assign a floating ip address to the load balancer 
+   # pool. 
+   lb_floating: 
+     type: OS::Neutron::FloatingIP 
+     properties: 
+       floating_network_id: {get_param: external_network_id} 
+       port_id: {get_attr: [pool, vip, port_id]} 
+  
+ outputs: 
+   scale_up_url: 
+     description: > 
+       This URL is the webhook to scale up the autoscaling group.  You 
+       can invoke the scale-up operation by doing an HTTP POST to this 
+       URL; no body nor extra headers are needed. 
+     value: {get_attr: [web_server_scaleup_policy, alarm_url]} 
+   scale_dn_url: 
+     description: > 
+       This URL is the webhook to scale down the autoscaling group. 
+       You can invoke the scale-down operation by doing an HTTP POST to 
+       this URL; no body nor extra headers are needed. 
+     value: {get_attr: [web_server_scaledown_policy, alarm_url]} 
+   pool_ip_address: 
+     value: {get_attr: [pool, vip, address]} 
+     description: The IP address of the load balancing pool 
+   website_url: 
+     value: 
+       str_replace: 
+         template: http://host/wordpress/ 
+         params: 
+           host: { get_attr: [lb_floating, floating_ip_address] } 
+     description: > 
+       This URL is the "external" URL that can be used to access the 
+       Wordpress site. 
+   ceilometer_query: 
+     value: 
+       str_replace: 
+         template: > 
+           ceilometer statistics -m cpu_util 
+           -q metadata.user_metadata.stack=stackval -p 600 -a avg 
+         params: 
+           stackval: { get_param: "OS::stack_id" } 
+     description: > 
+       This is a Ceilometer query for statistics on the cpu_util meter 
+       Samples about OS::Nova::Server instances in this stack.  The -q 
+       parameter selects Samples according to the subject's metadata. 
+       When a VM's metadata includes an item of the form metering.X=Y, 
+       the corresponding Ceilometer resource has a metadata item of the 
+       form user_metadata.X=Y and samples about resources so tagged can 
+       be queried with a Ceilometer query term of the form 
+       metadata.user_metadata.X=Y.  In this case the nested stacks give 
+       their VMs metadata that is passed as a nested stack parameter, 
+       and this stack passes a metadata of the form metering.stack=Y, 
+       where Y is this stack's ID. 
diff --git a/asdc-controller/src/test/resources/resource-examples/mixed.yaml b/asdc-controller/src/test/resources/resource-examples/mixed.yaml
new file mode 100644 (file)
index 0000000..9dc4a42
--- /dev/null
@@ -0,0 +1,1523 @@
+heat_template_version: 2013-05-23
+
+description: >
+  HOT template that creates internal networks, load balancers and servers for vMMSC.
+
+parameters:
+  oam_net_name:
+    type: string
+    description: UID of OAM network
+  oam_network_netmask:
+    type: string
+    label: oam network netmask
+    description: oam network gateway
+  oam_network_gateway:
+    type: string
+    label: oam network gateway
+    description: oam network gateway
+  oam_network_route_1:
+    type: string
+    label: oam network route 1
+    description: oam network route 1
+  oam_network_route_2:
+    type: string
+    label: oam network route 2
+    description:  oam network route 2
+  external_dns:
+    type: string
+    label: dns server
+    description: dns server for MMSC
+  external_ntp:
+    type: string
+    label: ntp server 
+    description: ntp server for MMSC
+  lb1_oam_net_ip:
+    type: string
+    label: management network ip for mmsc
+    description: the ip of the management network for mmsc
+  lb2_oam_net_ip:
+    type: string
+    label: management network ip for mmsc
+    description: the ip of the management network for mmsc
+  dmz_protected_net:
+    type: string
+    description: UID of dmz_protected network
+  dmz_protected_net_local_ip1:
+    type: string
+    label: mmsc dmz protected network local ip1
+    description: the local ip1 of the mmsc dmz protected network
+  dmz_protected_net_local_ip2:
+    type: string
+    label: mmsc dmz protected network local ip2
+    description: the local ip2 of the mmsc dmz protected network
+  dmz_protected_net_floating_ip:
+    type: string
+    label: mmsc dmz protected floating ip
+    description: mmsc dmz direct floating ip
+  cor_direct_net:
+    type: string
+    label: cor direct net UID
+    description: cor direct net
+  cor_direct_net_local_ip1:
+    type: string  
+    label: mmsc cor direct network local ip1
+    description: the local ip1 of the mmsc cor direct network
+  cor_direct_net_local_ip2:
+    type: string
+    label: mmsc cor direct network local ip2
+    description: the local ip2 of the mmsc cor direct network
+  cor_direct_net_floating_ip:
+    type: string
+    label: mmsc cor direct floating ip
+    description: mmsc cor direct floating ip
+  mms_traffic_net_name:
+    type: string
+    description: Name of MMS traffic network
+  mms_traffic_net_cidr:
+    type: string
+    description: MMS traffic network address (CIDR notation)
+  mms_traffic_netmask:
+    type: string
+    description: MMS traffic network subnet mask  
+  mms_traffic_net_gateway:
+    type: string
+    description: MMS traffic network gateway address
+  mms_traffic_start:
+    type: string
+    label: mmsc traffic start IP
+    description: mmsc traffic start IP
+  mms_traffic_end:
+    type: string
+    label: mmsc traffic end IP
+    description: mmsc traffic end IP
+  mms_traffic_net_cidr:
+    type: string
+    label: mmsc traffic cidr
+    description: mmsc traffic cidr
+  mms_traffic_net_local_ip1:
+    type: string
+    label: mmsc traffic network local ip1
+    description: the local ip1 of the mmsc traffic network
+  mms_traffic_net_local_ip2:
+    type: string
+    label: mmsc traffic network local ip2
+    description: the local ip2 of the mmsc traffic network
+  mms_traffic_net_floating_ip:
+    type: string
+    label: mmsc traffic floating ip
+    description: mmsc traffic floating ip
+  nems_internal_name:
+    type: string
+    label: nems internal network name
+    description: nems internal network name
+  nems_internal_start:
+    type: string
+    label: nems internal start
+    description: nems internal start
+  nems_internal_end:
+    type: string
+    label: nems internal end
+    description: nems internal end
+  nems_internal_cidr:
+    type: string
+    label: nems ineternal cidr
+    description: nems internal cidr
+  nems_internal_netmask:
+    type: string
+    description: NEMS internal network subnet mask
+  nems_internal_gateway:
+    type: string
+    label: nems internal gw
+    description: nems internal gw
+  nems_traffic_name:
+    type: string
+    label: nems traffic name
+    description: nems traffic name
+  nems_traffic_start:
+    type: string
+    label: nems traffic start
+    description: nems traffic start
+  nems_traffic_end:
+    type: string
+    label: nems traffic end
+    description: nems traffic end
+  nems_traffic_cidr:
+    type: string
+    label: nems traffic cidr
+    description: nems traffic cidr
+  nems_traffic_netmask:
+    type: string
+    description: NEMS traffic network subnet mask
+  nems_traffic_gateway:
+    type: string
+    description: NEMS traffic network gateway  
+  nems_traffic_net_local_ip1:
+    type: string
+    label: nems traffic network local ip1
+    description: the local ip1 of the nems traffic network
+  nems_traffic_net_local_ip2:
+    type: string
+    label: nems traffic network local ip2
+    description: the local ip2 of the nems traffic network
+  nems_traffic_net_floating_ip:
+    type: string
+    label: nems traffic floating ip
+    description: nems traffic floating ip
+  nems_user_web_name:
+    type: string
+    label: nems user web name
+    description: nems user web name
+  nems_user_web_start:
+    type: string
+    label: nems user web start
+    description: nems user web end
+  nems_user_web_end:
+    type: string
+    label: nems user web end
+    description: nems user web end
+  nems_user_web_cidr:
+    type: string
+    label: nems user web cidr
+    description: nems user web cidr
+  nems_user_web_netmask:
+    type: string
+    description: NEMS user web network subnet mask
+  nems_user_web_gateway:
+    type: string
+    description: NEMS user web network gateway
+  nems_user_web_net_local_ip1:
+    type: string
+    label: nems user web network local ip1
+    description: the local ip1 of the nems user web network
+  nems_user_web_net_local_ip2:
+    type: string
+    label: nems user web network local ip2
+    description: the local ip2 of the nems user web network
+  nems_user_web_net_floating_ip:
+    type: string
+    label: nems user web floating ip
+    description: nems user web floating ip 
+  nems_imap_name:
+    type: string
+    label: nems imap name
+    description: nems imap name
+  nems_imap_netmask:
+    type: string
+    label: nems imap subnet mask
+    description: nems imap subnet mask  
+  nems_imap_start:
+    type: string
+    label: nems imap start
+    description: nems imap start
+  nems_imap_end:
+    type: string
+    label: nems imap end
+    description: nems imap end
+  nems_imap_cidr:
+    type: string
+    label: nems imap cidr
+    description: nems imap cidr
+  nems_imap_gateway:
+    type: string
+    label: nems imap gateway
+    description: nems imap gateway  
+  eca_traffic_name:
+    type: string
+    label: eca traffic name
+    description: eca traffic name
+  eca_traffic_start:
+    type: string
+    label: eca traffic start
+    description: eca traffic start
+  eca_traffic_end:
+    type: string
+    label: eca traffic end
+    description: eca traffic end
+  eca_traffic_cidr:
+    type: string
+    label: eca traffic cidr
+    description: eca traffic cidr
+  eca_traffic_netmask:
+    type: string
+    description: ECA traffic network subnet mask
+  eca_traffic_net_local_ip1:
+    type: string
+    label: eca traffic network local ip1
+    description: the local ip1 of the eca traffic network
+  eca_traffic_net_local_ip2:
+    type: string
+    label: eca traffic network local ip2
+    description: the local ip2 of the eca traffic network
+  eca_traffic_net_floating_ip:
+    type: string
+    label: eca traffic floating ip
+    description: eca traffic floating ip
+  eca_mgmt_name:
+    type: string
+    label: eca management name
+    description: eca management name
+  eca_mgmt_start:
+    type: string
+    label: eca management start
+    description: eca management start
+  eca_mgmt_end:
+    type: string
+    label: eca management end
+    description: eca management end
+  eca_mgmt_cidr:
+    type: string
+    label: eca management cidr
+    description: eca management cidr
+  eca_mgmt_netmask:
+    type: string
+    description: ECA mgmt network subnet mask
+  ha_net_name:
+    type: string
+    label: ha_failover network name
+    description: ha_failover network name
+  ha_net_start:
+    type: string
+    label: ha net start
+    description: ha net start
+  ha_net_end:
+    type: string
+    label: ha net end
+    description: ha net end
+  ha_net_cidr:
+    type: string
+    label: ha net cidr
+    description: ha net cidr
+  ha_net_local_ip1:
+    type: string
+    label: ha net network local ip1
+    description: the local ip1 of the ha network
+  ha_net_local_ip2:
+    type: string
+    label: ha net network local ip2
+    description: the local ip2 of the ha network
+  lb1_name:
+    type: string
+    label: MMSC load balancer instance name
+    description: MMSC load balancer instance name
+  lb_image_name:
+    type: string
+    label: MMSC load balancer image name
+    description: MMSC load balancer image name
+  lb_flavor_name:
+    type: string
+    label: Load balancer flavor name
+    description: the flavor name of MMSC load balancer instance
+  lb1_name:
+    type: string
+    label: MMSC load balancer1 instance name
+    description: MMSC load balancer1 instance name
+  lb2_name:
+    type: string
+    label: MMSC load balancer2 instance name
+    description: MMSC load balancer2 instance name
+  availabilityzone_name:
+    type: string
+    label: MMSC availabilityzone name
+    description: MMSC availabilityzone name
+  security_group_name:
+    type: string
+    label: MMSC security group name
+    description: MMSC security group name
+  mmsc_image:
+    type: string
+    description: Image for MMSC server
+  mmsc_flavor:
+    type: string
+    description: Flavor for MMSC server
+#  mmsc_cinder_volume_size:
+#    type: number
+#    label: MMSC Cinder volume size
+#    description: the size of the MMSC Cinder volume
+  nems_fe_image:
+    type: string
+    description: Image for NEMS FE server
+  nems_fe_flavor:
+    type: string
+    description: Flavor for NEMS FE server
+  nems_be_image:
+    type: string
+    description: Image for NEMS BE server
+  nems_be_flavor:
+    type: string
+    description: Flavor for NEMS BE server
+  eca_trx_image:
+    type: string
+    description: Image for ECA TRX server
+  eca_trx_flavor:
+    type: string
+    description: Flavor for ECA TRX server
+  eca_oam_image:
+    type: string
+    description: Image for ECA OAM server
+  eca_oam_flavor:
+    type: string
+    description: Flavor for ECA OAM server
+  mmsc1_name:
+    type: string
+    description: MMSC1 server name
+  mmsc1_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC1
+  mmsc1_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC1
+  mmsc2_name:
+    type: string
+    description: MMSC2 server name
+  mmsc2_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC2
+  mmsc2_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC2
+  mmsc3_name:
+    type: string
+    description: MMSC3 server name
+  mmsc3_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC3
+  mmsc3_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC3
+  mmsc4_name:
+    type: string
+    description: MMSC4 server name
+  mmsc4_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC4
+  mmsc4_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC4
+  mmsc5_name:
+    type: string
+    description: MMSC5 server name
+  mmsc5_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC5
+  mmsc5_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC5
+  nems_fe1_name:
+    type: string
+    description: NEMS_FE1 server name
+  nems_fe1_node_role:
+    type: string
+    label: nems node role
+    description: nems node role
+  nems_fe1_oam_net_ip:
+    type: string
+    description: OAM_net IP for NEMS_FE1
+  nems_fe1_nems_traffic_net_ip:
+    type: string
+    description: nems_traffic_net IP for NEMS_FE1
+  nems_fe1_nems_user_web_net_ip:
+    type: string
+    description: nems_web_user_net IP for NEMS_FE1
+  nems_fe1_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_FE1
+  nems_fe1_nems_imap_net_ip:
+    type: string
+    description: nems_imap_net IP for NEMS_FE1  
+  nems_fe2_name:
+    type: string
+    description: NEMS_FE2 server name
+  nems_fe2_node_role:
+    type: string
+    label: nems node role
+    description: nems node role
+  nems_fe2_oam_net_ip:
+    type: string
+    description: OAM_net IP for NEMS_FE2
+  nems_fe2_nems_traffic_net_ip:
+    type: string
+    description: nems_traffic_net IP for NEMS_FE2
+  nems_fe2_nems_user_web_net_ip:
+    type: string
+    description: nems_web_user_net IP for NEMS_FE2
+  nems_fe2_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_FE2
+  nems_fe2_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_FE2
+  nems_fe2_nems_imap_net_ip:
+    type: string
+    description: nems_imap_net IP for NEMS_FE2  
+  nems_be1_name:
+    type: string
+    description: NEMS_BE2 server name
+  nems_be1_node_role:
+    type: string
+    label: nems node role
+    description: nems node role
+  nems_be1_oam_net_ip:
+    type: string
+    description: OAM_net IP for NEMS_BE1
+  nems_be1_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_BE1
+  nems_be1_nems_imap_net_ip:
+    type: string
+    description: nems_imap_net IP for NEMS_BE1  
+  nems_be2_name:
+    type: string
+    description: NEMS_BE2 server name
+  nems_be2_node_role:
+    type: string
+    label: nems node role
+    description: nems node role
+  nems_be2_oam_net_ip:
+    type: string
+    description: OAM_net IP for NEMS_BE2
+  nems_be2_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_BE2
+  nems_be2_nems_imap_net_ip:
+    type: string
+    description: nems_imap_net IP for NEMS_BE2
+  eca_oam1_name:
+    type: string
+    description: ECA_OAM1 server name
+  eca_oam1_oam_net_ip:
+    type: string
+    description: OAM_net IP for ECA_OAM1
+  eca_oam1_eca_mgmt_net_ip:
+    type: string
+    description: eca_mgmt_net IP for ECA_OAM1
+  eca_oam2_name:
+    type: string
+    description: ECA_OAM2 server name
+  eca_oam2_oam_net_ip:
+    type: string
+    description: OAM_net IP for ECA_OAM2
+  eca_oam2_eca_mgmt_net_ip:
+    type: string
+    description: eca_mgmt_net IP for ECA_OAM2
+  eca_trx1_name:
+    type: string
+    description: ECA_TRX1 server name
+  eca_trx1_oam_net_ip:
+    type: string
+    description: OAM_net IP for ECA_TRX1
+  eca_trx1_eca_mgmt_net_ip:
+    type: string
+    description: eca_mgmt_net IP for ECA_TRX1
+  eca_trx1_eca_traffic_net_ip:
+    type: string
+    description: eca_traffic_net IP for ECA_TRX1
+
+resources:
+  mms_security_group:
+    type: OS::Neutron::SecurityGroup
+    properties:
+      description: mmsc security group
+      name: {get_param: security_group_name}
+      rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+              ]
+
+  mms_traffic_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: { get_param: mms_traffic_net_name }
+
+  mms_traffic_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: {get_param: mms_traffic_net_name}      
+      network_id: { get_resource: mms_traffic_net }
+      cidr: { get_param: mms_traffic_net_cidr }
+      allocation_pools: [{"start": {get_param: mms_traffic_start}, "end": {get_param: mms_traffic_end}}]
+      gateway_ip: { get_param: mms_traffic_net_gateway }
+      enable_dhcp: false
+
+  nems_internal_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: {get_param: nems_internal_name}
+
+  nems_internal_network_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: {get_param: nems_internal_name}
+      allocation_pools: [{"start": {get_param: nems_internal_start}, "end": {get_param: nems_internal_end}}]
+      cidr: {get_param: nems_internal_cidr}
+      enable_dhcp: false
+      gateway_ip: null
+      network_id: {get_resource: nems_internal_net}
+
+  nems_traffic_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: {get_param: nems_traffic_name}
+
+  nems_traffic_network_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: {get_param: nems_traffic_name}
+      allocation_pools: [{"start": {get_param: nems_traffic_start}, "end": {get_param: nems_traffic_end}}]
+      cidr: {get_param: nems_traffic_cidr}
+      enable_dhcp: false
+      gateway_ip: null
+      network_id: {get_resource: nems_traffic_net}
+
+  nems_user_web_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: {get_param: nems_user_web_name}
+
+  nems_user_web_network_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: {get_param: nems_user_web_name}
+      allocation_pools: [{"start": {get_param: nems_user_web_start}, "end": {get_param: nems_user_web_end}}]
+      cidr: {get_param: nems_user_web_cidr}
+      enable_dhcp: false
+      gateway_ip: null
+      network_id: {get_resource: nems_user_web_net}
+
+  nems_imap_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: {get_param: nems_imap_name}
+
+  nems_imap_network_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: {get_param: nems_imap_name}
+      allocation_pools: [{"start": {get_param: nems_imap_start}, "end": {get_param: nems_imap_end}}]
+      cidr: {get_param: nems_imap_cidr}
+      enable_dhcp: false
+      gateway_ip: null
+      network_id: {get_resource: nems_imap_net}
+
+  eca_traffic_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: {get_param: eca_traffic_name}
+
+  eca_traffic_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: {get_param: eca_traffic_name}
+      allocation_pools: [{"start": {get_param: eca_traffic_start}, "end": {get_param: eca_traffic_end}}]
+      cidr: {get_param: eca_traffic_cidr}
+      enable_dhcp: false
+      gateway_ip: null
+      network_id: {get_resource: eca_traffic_net}
+
+  ha_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: {get_param: ha_net_name}
+
+  ha_net_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: {get_param: ha_net_name}
+      allocation_pools: [{"start": {get_param: ha_net_start}, "end": {get_param: ha_net_end}}]
+      cidr: {get_param: ha_net_cidr}
+      enable_dhcp: false
+      gateway_ip: null
+      network_id: {get_resource: ha_net}
+
+  eca_mgmt_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: {get_param: eca_mgmt_name}
+
+  eca_mgmt_network_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: {get_param: eca_mgmt_name}
+      allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
+      cidr: {get_param: eca_mgmt_cidr}
+      enable_dhcp: false
+      gateway_ip: null
+      network_id: {get_resource: eca_mgmt_net}
+
+  lb1_instance:
+    type: OS::Nova::Server
+    properties:
+      name: {get_param: lb1_name}
+      image: {get_param: lb_image_name}
+      flavor: {get_param: lb_flavor_name}
+      availability_zone: {get_param: availabilityzone_name}
+      networks:
+        - port: {get_resource: lb1_mgmt_port}
+        - port: {get_resource: lb1_dmz_protected_port}
+        - port: {get_resource: lb1_cor_direct_port}
+        - port: {get_resource: lb1_mms_traffic_port}
+        - port: {get_resource: lb1_nems_traffic_port}
+        - port: {get_resource: lb1_nems_user_web_port}
+        - port: {get_resource: lb1_eca_traffic_port}
+        - port: {get_resource: lb1_ha_net_port}
+
+  lb1_mgmt_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: oam_net_name}
+      fixed_ips: [{"ip_address": {get_param: lb1_oam_net_ip}}]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_mms_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: mms_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_dmz_protected_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: dmz_protected_net}
+      fixed_ips: [{"ip_address": {get_param: dmz_protected_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: dmz_protected_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_cor_direct_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: cor_direct_net}
+      fixed_ips: [{"ip_address": {get_param: cor_direct_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: cor_direct_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_nems_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: nems_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_nems_user_web_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: nems_user_web_net}
+      fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_ha_net_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: ha_net}
+      fixed_ips: [{"ip_address": {get_param: ha_net_local_ip1}}]
+
+  lb1_eca_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: eca_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_instance:
+    type: OS::Nova::Server
+    properties:
+      name: {get_param: lb2_name}
+      image: {get_param: lb_image_name}
+      flavor: {get_param: lb_flavor_name}
+      availability_zone: {get_param: availabilityzone_name}
+      networks:
+        - port: {get_resource: lb2_mgmt_port}
+        - port: {get_resource: lb2_dmz_protected_port}
+        - port: {get_resource: lb2_cor_direct_port}
+        - port: {get_resource: lb2_mms_traffic_port}
+        - port: {get_resource: lb2_nems_traffic_port}
+        - port: {get_resource: lb2_nems_user_web_port}
+        - port: {get_resource: lb2_eca_traffic_port}
+        - port: {get_resource: lb2_ha_net_port}
+
+  lb2_mgmt_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: oam_net_name}
+      fixed_ips: [{"ip_address": {get_param: lb2_oam_net_ip}}]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_mms_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: mms_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_dmz_protected_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: dmz_protected_net}
+      fixed_ips: [{"ip_address": {get_param: dmz_protected_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: dmz_protected_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_cor_direct_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: cor_direct_net}
+      fixed_ips: [{"ip_address": {get_param: cor_direct_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: cor_direct_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_nems_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: nems_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_nems_user_web_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: nems_user_web_net}
+      fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_ha_net_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: ha_net}
+      fixed_ips: [{"ip_address": {get_param: ha_net_local_ip2}}]
+
+  lb2_eca_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: eca_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  server_mmsc1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc1_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc1_port_0 }
+      - port: { get_resource: mmsc1_port_1 }
+      user_data:
+        str_replace:
+          template: |
+            mmsc.mgmt.ip=${mmsc.mgmt.ip}
+            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+            mmsc.traffic.ip=${mmsc.traffic.ip}
+            mmsc.traffic.netmask=${mmsc.traffic.netmask}
+            mmsc.traffic.gateway=${mmsc.traffic.gateway}
+            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+            mmsc.external.dns=${mmsc.external.dns}
+            mmsc.external.ntp=${mmsc.external.ntp}
+          params:
+            ${mmsc.mgmt.ip}: {get_param: mmsc1_oam_net_ip}
+            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${mmsc.traffic.ip}: {get_param:  mmsc1_mms_traffic_net_ip}
+            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${mmsc.external.dns}: {get_param: external_dns}
+            ${mmsc.external.ntp}: {get_param: external_ntp} 
+      user_data_format: RAW
+#  mmsc1_volume:
+#    type: OS::Cinder::Volume
+#    properties:
+#      size: {get_param: mmsc_cinder_volume_size}
+
+#  mmsc1_volume_attachment:
+#    type: OS::Cinder::VolumeAttachment
+#    properties:
+#      volume_id: {get_resource: mmsc1_volume}
+#      instance_uuid: {get_resource: server_mmsc1}
+
+  mmsc1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc1_oam_net_ip }
+      ]
+
+  mmsc1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc1_mms_traffic_net_ip }
+      ]
+
+  server_mmsc2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc2_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc2_port_0 }
+      - port: { get_resource: mmsc2_port_1 }
+      user_data:
+        str_replace:
+          template: |
+            mmsc.mgmt.ip=${mmsc.mgmt.ip}
+            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+            mmsc.traffic.ip=${mmsc.traffic.ip}
+            mmsc.traffic.netmask=${mmsc.traffic.netmask}
+            mmsc.traffic.gateway=${mmsc.traffic.gateway}
+            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+            mmsc.external.dns=${mmsc.external.dns}
+            mmsc.external.ntp=${mmsc.external.ntp}
+          params:
+            ${mmsc.mgmt.ip}: {get_param: mmsc2_oam_net_ip}
+            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${mmsc.traffic.ip}: {get_param: mmsc2_mms_traffic_net_ip}
+            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${mmsc.external.dns}: {get_param: external_dns}
+            ${mmsc.external.ntp}: {get_param: external_ntp} 
+      user_data_format: RAW
+#  mmsc2_volume:
+#    type: OS::Cinder::Volume
+#    properties:
+#      size: {get_param: mmsc_cinder_volume_size}
+
+#  mmsc2_volume_attachment:
+#    type: OS::Cinder::VolumeAttachment
+#    properties:
+#      volume_id: {get_resource: mmsc2_volume}
+#      instance_uuid: {get_resource: server_mmsc2}
+
+  mmsc2_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc2_oam_net_ip }
+      ]
+
+  mmsc2_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc2_mms_traffic_net_ip }
+      ]
+
+  server_mmsc3:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc3_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc3_port_0 }
+      - port: { get_resource: mmsc3_port_1 }
+      user_data:
+        str_replace:
+          template: |
+            mmsc.mgmt.ip=${mmsc.mgmt.ip}
+            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+            mmsc.traffic.ip=${mmsc.traffic.ip}
+            mmsc.traffic.netmask=${mmsc.traffic.netmask}
+            mmsc.traffic.gateway=${mmsc.traffic.gateway}
+            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+            mmsc.external.dns=${mmsc.external.dns}
+            mmsc.external.ntp=${mmsc.external.ntp}
+          params:
+            ${mmsc.mgmt.ip}: {get_param: mmsc3_oam_net_ip}
+            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${mmsc.traffic.ip}: {get_param:  mmsc3_mms_traffic_net_ip}
+            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${mmsc.external.dns}: {get_param: external_dns}
+            ${mmsc.external.ntp}: {get_param: external_ntp}
+      user_data_format: RAW
+
+  mmsc3_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc3_oam_net_ip }
+      ]
+
+  mmsc3_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc3_mms_traffic_net_ip }
+      ]
+
+  server_mmsc4:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc4_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc4_port_0 }
+      - port: { get_resource: mmsc4_port_1 }
+      user_data:
+        str_replace:
+          template: |
+            mmsc.mgmt.ip=${mmsc.mgmt.ip}
+            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+            mmsc.traffic.ip=${mmsc.traffic.ip}
+            mmsc.traffic.netmask=${mmsc.traffic.netmask}
+            mmsc.traffic.gateway=${mmsc.traffic.gateway}
+            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+            mmsc.external.dns=${mmsc.external.dns}
+            mmsc.external.ntp=${mmsc.external.ntp}
+          params:
+            ${mmsc.mgmt.ip}: {get_param: mmsc4_oam_net_ip}
+            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${mmsc.traffic.ip}: {get_param:  mmsc4_mms_traffic_net_ip}
+            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${mmsc.external.dns}: {get_param: external_dns}
+            ${mmsc.external.ntp}: {get_param: external_ntp}
+      user_data_format: RAW
+
+  mmsc4_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc4_oam_net_ip }
+      ]
+
+  mmsc4_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc4_mms_traffic_net_ip }
+      ]
+
+  server_mmsc5:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc5_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc5_port_0 }
+      - port: { get_resource: mmsc5_port_1 }
+
+  mmsc5_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc5_oam_net_ip }
+      ]
+
+  mmsc5_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc5_mms_traffic_net_ip }
+      ]
+
+  server_nems_fe1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: nems_fe1_name }
+      image: { get_param: nems_fe_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: nems_fe_flavor }
+      networks:
+      - port: { get_resource: nems_fe1_port_0 }
+      - port: { get_resource: nems_fe1_port_1 }
+      - port: { get_resource: nems_fe1_port_2 }
+      - port: { get_resource: nems_fe1_port_3 }
+      - port: { get_resource: nems_fe1_port_4 }
+      user_data:
+        str_replace:
+          template: |
+            nems.mgmt.ip=${nems.mgmt.ip}
+            nems.mgmt.netmask=${nems.mgmt.netmask}
+            nems.mgmt.gateway=${nems.mgmt.gateway}
+            nems.traffic.ip=${nems.traffic.ip}
+            nems.traffic.netmask=${nems.traffic.netmask}
+            nems.traffic.gateway=${nems.traffic.gateway}
+            nems.fe0.internal.ip=${nems.fe0.internal.ip}
+            nems.fe1.internal.ip=${nems.fe1.internal.ip}
+            nems.internal.netmask=${nems.internal.netmask}
+            nems.internal.gateway=${nems.internal.gateway}
+            nems.userweb.ip=${nems.userweb.ip}
+            nems.userweb.netmask=${nems.userweb.netmask}
+            nems.userweb.gateway=${nems.userweb.gateway}
+            nems.imap.ip=${nems.imap.ip}
+            nems.imap.netmask=${nems.imap.netmask}
+            nems.imap.gateway=${nems.imap.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.be.imap.ip=${nems.be.imap.ip}
+            nems.mgmt.route.1=${nems.mgmt.route.1}
+            nems.mgmt.route.2=${nems.mgmt.route.2}
+            nems.external.dns=${nems.external.dns}
+            nems.external.ntp=${nems.external.ntp}
+            nems.node=${nems.node}
+          params:
+            ${nems.mgmt.ip}: {get_param: nems_fe1_oam_net_ip}
+            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${nems.traffic.ip}: {get_param: nems_fe1_nems_traffic_net_ip}
+            ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+            ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+            ${nems.fe0.internal.ip}: {get_param: nems_fe1_nems_internal_net_ip}
+            ${nems.fe1.internal.ip}: {get_param: nems_fe2_nems_internal_net_ip}
+            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
+            ${nems.userweb.ip}: {get_param: nems_fe1_nems_user_web_net_ip}
+            ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+            ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+            ${nems.imap.ip}: {get_param: nems_fe1_nems_imap_net_ip}
+            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+            ${nems.imap.gateway}: {get_param: nems_imap_gateway}  
+            ${nems.be.internal.ip}: {get_param: nems_be1_nems_internal_net_ip}
+            ${nems.be.imap.ip}: {get_param: nems_be1_nems_imap_net_ip}
+            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${nems.external.dns}: {get_param: external_dns}
+            ${nems.external.ntp}: {get_param: external_ntp}
+            ${nems.node}: {get_param: nems_fe1_node_role} 
+      user_data_format: RAW
+
+  nems_fe1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_oam_net_ip }
+      ]
+
+  nems_fe_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: {get_param: oam_net_name}
+      port_id: {get_resource: nems_fe1_port_0}
+
+  nems_fe1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_nems_traffic_net_ip }
+      ]
+
+  nems_fe1_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_user_web_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_nems_user_web_net_ip }
+      ]
+
+  nems_fe1_port_3:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_internal_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_nems_internal_net_ip }
+      ]
+
+  nems_fe1_port_4:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_imap_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_nems_imap_net_ip }
+      ]
+
+  server_nems_fe2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: nems_fe2_name }
+      image: { get_param: nems_fe_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: nems_fe_flavor }
+      networks:
+      - port: { get_resource: nems_fe2_port_0 }
+      - port: { get_resource: nems_fe2_port_1 }
+      - port: { get_resource: nems_fe2_port_2 }
+      - port: { get_resource: nems_fe2_port_3 }
+      - port: { get_resource: nems_fe2_port_4 }
+      user_data:
+        str_replace:
+          template: |
+            nems.mgmt.ip=${nems.mgmt.ip}
+            nems.mgmt.netmask=${nems.mgmt.netmask}
+            nems.mgmt.gateway=${nems.mgmt.gateway}
+            nems.traffic.ip=${nems.traffic.ip}
+            nems.traffic.netmask=${nems.traffic.netmask}
+            nems.traffic.gateway=${nems.traffic.gateway}
+            nems.fe0.internal.ip=${nems.fe0.internal.ip}
+            nems.fe1.internal.ip=${nems.fe1.internal.ip}
+            nems.internal.netmask=${nems.internal.netmask}
+            nems.internal.gateway=${nems.internal.gateway}
+            nems.userweb.ip=${nems.userweb.ip}
+            nems.userweb.netmask=${nems.userweb.netmask}
+            nems.userweb.gateway=${nems.userweb.gateway}
+            nems.imap.ip=${nems.imap.ip}
+            nems.imap.netmask=${nems.imap.netmask}
+            nems.imap.gateway=${nems.imap.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.be.imap.ip=${nems.be.imap.ip}
+            nems.mgmt.route.1=${nems.mgmt.route.1}
+            nems.mgmt.route.2=${nems.mgmt.route.2}
+            nems.external.dns=${nems.external.dns}
+            nems.external.ntp=${nems.external.ntp}
+            nems.node=${nems.node}
+          params:
+            ${nems.mgmt.ip}: {get_param: nems_fe2_oam_net_ip}
+            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${nems.traffic.ip}: {get_param: nems_fe2_nems_traffic_net_ip}
+            ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+            ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+            ${nems.fe0.internal.ip}: {get_param: nems_fe1_nems_internal_net_ip}
+            ${nems.fe1.internal.ip}: {get_param: nems_fe2_nems_internal_net_ip}
+            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
+            ${nems.userweb.ip}: {get_param: nems_fe2_nems_user_web_net_ip}
+            ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+            ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+            ${nems.imap.ip}: {get_param: nems_fe2_nems_imap_net_ip}
+            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+            ${nems.imap.gateway}: {get_param: nems_imap_gateway}
+            ${nems.be.internal.ip}: {get_param: nems_be2_nems_internal_net_ip}
+            ${nems.be.imap.ip}: {get_param: nems_be2_nems_imap_net_ip}
+            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${nems.external.dns}: {get_param: external_dns}
+            ${nems.external.ntp}: {get_param: external_ntp}
+            ${nems.node}: {get_param: nems_fe2_node_role}
+      user_data_format: RAW
+
+  nems_fe2_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_oam_net_ip }
+      ]
+
+  nems_fe_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: {get_param: oam_net_name}
+      port_id: {get_resource: nems_fe2_port_0}
+
+  nems_fe2_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_nems_traffic_net_ip }
+      ]
+
+  nems_fe2_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_user_web_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_nems_user_web_net_ip }
+      ]
+
+  nems_fe2_port_3:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_internal_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_nems_internal_net_ip }
+      ]
+
+  nems_fe2_port_4:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_imap_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_nems_imap_net_ip }
+      ]
+
+  server_nems_be1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: nems_be1_name }
+      image: { get_param: nems_be_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: nems_be_flavor }
+      networks:
+      - port: { get_resource: nems_be1_port_0 }
+      - port: { get_resource: nems_be1_port_1 }
+      - port: { get_resource: nems_be1_port_2 }
+      user_data:
+        str_replace:
+          template: |
+            nems.be.mgmt.ip=${nems.be.mgmt.ip}
+            nems.mgmt.netmask=${nems.mgmt.netmask}
+            nems.mgmt.gateway=${nems.mgmt.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.internal.netmask=${nems.internal.netmask}
+            nems.internal.gateway=${nems.internal.gateway}
+            nems.imap.netmask=${nems.imap.netmask}
+            nems.imap.gateway=${nems.imap.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.be.imap.ip=${nems.be.imap.ip}
+            nems.mgmt.route.1=${nems.mgmt.route.1}
+            nems.mgmt.route.2=${nems.mgmt.route.2}
+            nems.external.dns=${nems.external.dns}
+            nems.external.ntp=${nems.external.ntp}
+            nems.node=${nems.node}
+          params:
+            ${nems.be.mgmt.ip}: {get_param: nems_be1_oam_net_ip}
+            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${nems.be.internal.ip}: {get_param: nems_be1_nems_internal_net_ip}
+            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
+            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+            ${nems.imap.gateway}: {get_param: nems_imap_gateway}  
+            ${nems.be.imap.ip}: {get_param: nems_be1_nems_imap_net_ip}
+            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${nems.external.dns}: {get_param: external_dns}
+            ${nems.external.ntp}: {get_param: external_ntp}
+            ${nems.node}: {get_param: nems_be1_node_role} 
+      user_data_format: RAW
+
+  nems_be1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be1_oam_net_ip }
+      ]
+
+  nems_be_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: {get_param: oam_net_name}
+      port_id: {get_resource: nems_be1_port_0}
+
+  nems_be1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_internal_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be1_nems_internal_net_ip }
+      ]
+
+  nems_be1_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_imap_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be1_nems_imap_net_ip }
+      ]
+
+  server_nems_be2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: nems_be2_name }
+      image: { get_param: nems_be_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: nems_be_flavor }
+      networks:
+      - port: { get_resource: nems_be2_port_0 }
+      - port: { get_resource: nems_be2_port_1 }
+      - port: { get_resource: nems_be2_port_2 }
+      user_data:
+        str_replace:
+          template: |
+            nems.be.mgmt.ip=${nems.be.mgmt.ip}
+            nems.mgmt.netmask=${nems.mgmt.netmask}
+            nems.mgmt.gateway=${nems.mgmt.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.internal.netmask=${nems.internal.netmask}
+            nems.internal.gateway=${nems.internal.gateway}
+            nems.imap.netmask=${nems.imap.netmask}
+            nems.imap.gateway=${nems.imap.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.be.imap.ip=${nems.be.imap.ip}
+            nems.mgmt.route.1=${nems.mgmt.route.1}
+            nems.mgmt.route.2=${nems.mgmt.route.2}
+            nems.external.dns=${nems.external.dns}
+            nems.external.ntp=${nems.external.ntp}
+            nems.node=${nems.node}
+          params:
+            ${nems.be.mgmt.ip}: {get_param: nems_be2_oam_net_ip}
+            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${nems.be.internal.ip}: {get_param: nems_be2_nems_internal_net_ip}
+            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
+            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+            ${nems.imap.gateway}: {get_param: nems_imap_gateway}
+            ${nems.be.imap.ip}: {get_param: nems_be2_nems_imap_net_ip}
+            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${nems.external.dns}: {get_param: external_dns}
+            ${nems.external.ntp}: {get_param: external_ntp}
+            ${nems.node}: {get_param: nems_be1_node_role}
+      user_data_format: RAW
+
+  nems_be2_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be2_oam_net_ip }
+      ]
+
+  nems_be_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: {get_param: oam_net_name}
+      port_id: {get_resource: nems_be2_port_0}
+
+  nems_be2_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_internal_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be2_nems_internal_net_ip }
+      ]
+
+  nems_be2_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_imap_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be2_nems_imap_net_ip }
+      ]
+
+  server_eca_oam1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: eca_oam1_name }
+      image: { get_param: eca_oam_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: eca_oam_flavor }
+      networks:
+      - port: { get_resource: eca_oam1_port_0 }
+      - port: { get_resource: eca_oam1_port_1 }
+
+  eca_oam1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: eca_oam1_oam_net_ip }
+      ]
+
+  eca_oam1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: eca_mgmt_net }
+      fixed_ips: [
+        "ip_address": { get_param: eca_oam1_eca_mgmt_net_ip }
+      ]
+
+  server_eca_oam2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: eca_oam2_name }
+      image: { get_param: eca_oam_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: eca_oam_flavor }
+      networks:
+      - port: { get_resource: eca_oam2_port_0 }
+      - port: { get_resource: eca_oam2_port_1 }
+
+  eca_oam2_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: eca_oam2_oam_net_ip }
+      ]
+
+  eca_oam2_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: eca_mgmt_net }
+      fixed_ips: [
+        "ip_address": { get_param: eca_oam2_eca_mgmt_net_ip }
+      ]
+
+  server_eca_trx1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: eca_trx1_name }
+      image: { get_param: eca_trx_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: eca_trx_flavor }
+      networks:
+      - port: { get_resource: eca_trx1_port_0 }
+      - port: { get_resource: eca_trx1_port_1 }
+      - port: { get_resource: eca_trx1_port_2 }
+
+
+  eca_trx1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: eca_trx1_oam_net_ip }
+      ]
+
+  eca_trx1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: eca_mgmt_net }
+      fixed_ips: [
+        "ip_address": { get_param: eca_trx1_eca_mgmt_net_ip }
+      ]
+
+  eca_trx1_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: eca_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: eca_trx1_eca_traffic_net_ip }
+      ]
diff --git a/asdc-controller/src/test/resources/resource-examples/network.yaml b/asdc-controller/src/test/resources/resource-examples/network.yaml
new file mode 100644 (file)
index 0000000..ae10346
--- /dev/null
@@ -0,0 +1,32 @@
+heat_template_version: 2013-05-23
+
+description: >
+  HOT template that creates one COR network (direct).
+
+parameters:
+  cor_direct_net_name:
+    type: string
+    description: Name of COR direct network
+  cor_direct_net_cidr:
+    type: string
+    description: Direct network address (CIDR notation)
+  cor_direct_net_gateway:
+    type: string
+    description: Direct network gateway address
+  cor_direct_net_RT:
+    type: string
+    description: Direct network route-target (RT)
+
+resources:
+  cor_direct_net:
+    type: OS::Contrail::VirtualNetwork
+    properties:
+      name: { get_param: cor_direct_net_name }
+      route_targets: [ get_param: cor_direct_net_RT ]
+
+  cor_direct_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: cor_direct_net }
+      cidr: {get_param: cor_direct_net_cidr}
+      gateway_ip: { get_param: cor_direct_net_gateway }
diff --git a/asdc-controller/src/test/resources/resource-examples/simpleTest.yaml b/asdc-controller/src/test/resources/resource-examples/simpleTest.yaml
new file mode 100644 (file)
index 0000000..8bfda2b
--- /dev/null
@@ -0,0 +1,39 @@
+heat_template_version: 2013-05-23
+
+description: >
+  HOT template that creates one COR network (direct).
+
+parameters:
+  cor_direct_net_name:
+    type: string
+    description: Name of COR direct network
+    default: testCorDirectNet
+  cor_direct_net_cidr:
+    type: string
+    description: Direct network address (CIDR notation)
+  cor_direct_net_gateway:
+    type: string
+    description: Direct network gateway address
+  cor_direct_net_RT:
+    type: string
+    description: Direct network route-target (RT)
+    default: testCorDirectNet
+  ip_port_snmp_manager:
+    type: string
+    default: 162
+    description: SNMP manager IP port
+
+
+resources:
+  cor_direct_net:
+    type: file:///my_test.yaml
+    properties:
+      name: { get_param: cor_direct_net_name }
+      route_targets: [ get_param: cor_direct_net_RT ]
+
+  cor_direct_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: cor_direct_net }
+      cidr: {get_param: cor_direct_net_cidr}
+      gateway_ip: { get_param: cor_direct_net_gateway }
diff --git a/asdc-controller/src/test/resources/resource-examples/simpleTestWithoutParam.yaml b/asdc-controller/src/test/resources/resource-examples/simpleTestWithoutParam.yaml
new file mode 100644 (file)
index 0000000..0a2db2b
--- /dev/null
@@ -0,0 +1,18 @@
+heat_template_version: 2013-05-23
+
+description: >
+  HOT template that creates one COR network (direct).
+
+resources:
+  cor_direct_net:
+    type: file:///my_test.yaml
+    properties:
+      name: { get_param: cor_direct_net_name }
+      route_targets: [ get_param: cor_direct_net_RT ]
+
+  cor_direct_ip_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: cor_direct_net }
+      cidr: {get_param: cor_direct_net_cidr}
+      gateway_ip: { get_param: cor_direct_net_gateway }
diff --git a/asdc-controller/src/test/resources/resource-examples/vnf.yaml b/asdc-controller/src/test/resources/resource-examples/vnf.yaml
new file mode 100644 (file)
index 0000000..d4420de
--- /dev/null
@@ -0,0 +1,1449 @@
+heat_template_version: 2013-05-23
+
+description: >
+  HOT template that creates internal networks, load balancers and servers for vMMSC.
+
+parameters:
+  oam_net_name:
+    type: string
+    description: UID of OAM network
+  oam_network_netmask:
+    type: string
+    label: oam network netmask
+    description: oam network gateway
+  oam_network_gateway:
+    type: string
+    label: oam network gateway
+    description: oam network gateway
+  oam_network_route_1:
+    type: string
+    label: oam network route 1
+    description: oam network route 1
+  oam_network_route_2:
+    type: string
+    label: oam network route 2
+    description:  oam network route 2
+  external_dns:
+    type: string
+    label: dns server
+    description: dns server for MMSC
+  external_ntp:
+    type: string
+    label: ntp server 
+    description: ntp server for MMSC
+  lb1_oam_net_ip:
+    type: string
+    label: management network ip for mmsc
+    description: the ip of the management network for mmsc
+  lb2_oam_net_ip:
+    type: string
+    label: management network ip for mmsc
+    description: the ip of the management network for mmsc
+  dmz_protected_net:
+    type: string
+    description: UID of dmz_protected network
+  dmz_protected_net_local_ip1:
+    type: string
+    label: mmsc dmz protected network local ip1
+    description: the local ip1 of the mmsc dmz protected network
+  dmz_protected_net_local_ip2:
+    type: string
+    label: mmsc dmz protected network local ip2
+    description: the local ip2 of the mmsc dmz protected network
+  dmz_protected_net_floating_ip:
+    type: string
+    label: mmsc dmz protected floating ip
+    description: mmsc dmz direct floating ip
+  cor_direct_net:
+    type: string
+    label: cor direct net UID
+    description: cor direct net
+  cor_direct_net_local_ip1:
+    type: string  
+    label: mmsc cor direct network local ip1
+    description: the local ip1 of the mmsc cor direct network
+  cor_direct_net_local_ip2:
+    type: string
+    label: mmsc cor direct network local ip2
+    description: the local ip2 of the mmsc cor direct network
+  cor_direct_net_floating_ip:
+    type: string
+    label: mmsc cor direct floating ip
+    description: mmsc cor direct floating ip
+  mms_traffic_net_name:
+    type: string
+    description: Name of MMS traffic network
+  mms_traffic_net_cidr:
+    type: string
+    description: MMS traffic network address (CIDR notation)
+  mms_traffic_netmask:
+    type: string
+    description: MMS traffic network subnet mask  
+  mms_traffic_net_gateway:
+    type: string
+    description: MMS traffic network gateway address
+  mms_traffic_start:
+    type: string
+    label: mmsc traffic start IP
+    description: mmsc traffic start IP
+  mms_traffic_end:
+    type: string
+    label: mmsc traffic end IP
+    description: mmsc traffic end IP
+  mms_traffic_net_cidr:
+    type: string
+    label: mmsc traffic cidr
+    description: mmsc traffic cidr
+  mms_traffic_net_local_ip1:
+    type: string
+    label: mmsc traffic network local ip1
+    description: the local ip1 of the mmsc traffic network
+  mms_traffic_net_local_ip2:
+    type: string
+    label: mmsc traffic network local ip2
+    description: the local ip2 of the mmsc traffic network
+  mms_traffic_net_floating_ip:
+    type: string
+    label: mmsc traffic floating ip
+    description: mmsc traffic floating ip
+  nems_internal_name:
+    type: string
+    label: nems internal network name
+    description: nems internal network name
+  nems_internal_start:
+    type: string
+    label: nems internal start
+    description: nems internal start
+  nems_internal_end:
+    type: string
+    label: nems internal end
+    description: nems internal end
+  nems_internal_cidr:
+    type: string
+    label: nems ineternal cidr
+    description: nems internal cidr
+  nems_internal_netmask:
+    type: string
+    description: NEMS internal network subnet mask
+  nems_internal_gateway:
+    type: string
+    label: nems internal gw
+    description: nems internal gw
+  nems_traffic_name:
+    type: string
+    label: nems traffic name
+    description: nems traffic name
+  nems_traffic_start:
+    type: string
+    label: nems traffic start
+    description: nems traffic start
+  nems_traffic_end:
+    type: string
+    label: nems traffic end
+    description: nems traffic end
+  nems_traffic_cidr:
+    type: string
+    label: nems traffic cidr
+    description: nems traffic cidr
+  nems_traffic_netmask:
+    type: string
+    description: NEMS traffic network subnet mask
+  nems_traffic_gateway:
+    type: string
+    description: NEMS traffic network gateway  
+  nems_traffic_net_local_ip1:
+    type: string
+    label: nems traffic network local ip1
+    description: the local ip1 of the nems traffic network
+  nems_traffic_net_local_ip2:
+    type: string
+    label: nems traffic network local ip2
+    description: the local ip2 of the nems traffic network
+  nems_traffic_net_floating_ip:
+    type: string
+    label: nems traffic floating ip
+    description: nems traffic floating ip
+  nems_user_web_name:
+    type: string
+    label: nems user web name
+    description: nems user web name
+  nems_user_web_start:
+    type: string
+    label: nems user web start
+    description: nems user web end
+  nems_user_web_end:
+    type: string
+    label: nems user web end
+    description: nems user web end
+  nems_user_web_cidr:
+    type: string
+    label: nems user web cidr
+    description: nems user web cidr
+  nems_user_web_netmask:
+    type: string
+    description: NEMS user web network subnet mask
+  nems_user_web_gateway:
+    type: string
+    description: NEMS user web network gateway
+  nems_user_web_net_local_ip1:
+    type: string
+    label: nems user web network local ip1
+    description: the local ip1 of the nems user web network
+  nems_user_web_net_local_ip2:
+    type: string
+    label: nems user web network local ip2
+    description: the local ip2 of the nems user web network
+  nems_user_web_net_floating_ip:
+    type: string
+    label: nems user web floating ip
+    description: nems user web floating ip 
+  nems_imap_name:
+    type: string
+    label: nems imap name
+    description: nems imap name
+  nems_imap_netmask:
+    type: string
+    label: nems imap subnet mask
+    description: nems imap subnet mask  
+  nems_imap_start:
+    type: string
+    label: nems imap start
+    description: nems imap start
+  nems_imap_end:
+    type: string
+    label: nems imap end
+    description: nems imap end
+  nems_imap_cidr:
+    type: string
+    label: nems imap cidr
+    description: nems imap cidr
+  nems_imap_gateway:
+    type: string
+    label: nems imap gateway
+    description: nems imap gateway  
+  eca_traffic_name:
+    type: string
+    label: eca traffic name
+    description: eca traffic name
+  eca_traffic_start:
+    type: string
+    label: eca traffic start
+    description: eca traffic start
+  eca_traffic_end:
+    type: string
+    label: eca traffic end
+    description: eca traffic end
+  eca_traffic_cidr:
+    type: string
+    label: eca traffic cidr
+    description: eca traffic cidr
+  eca_traffic_netmask:
+    type: string
+    description: ECA traffic network subnet mask
+  eca_traffic_net_local_ip1:
+    type: string
+    label: eca traffic network local ip1
+    description: the local ip1 of the eca traffic network
+  eca_traffic_net_local_ip2:
+    type: string
+    label: eca traffic network local ip2
+    description: the local ip2 of the eca traffic network
+  eca_traffic_net_floating_ip:
+    type: string
+    label: eca traffic floating ip
+    description: eca traffic floating ip
+  eca_mgmt_name:
+    type: string
+    label: eca management name
+    description: eca management name
+  eca_mgmt_start:
+    type: string
+    label: eca management start
+    description: eca management start
+  eca_mgmt_end:
+    type: string
+    label: eca management end
+    description: eca management end
+  eca_mgmt_cidr:
+    type: string
+    label: eca management cidr
+    description: eca management cidr
+  eca_mgmt_netmask:
+    type: string
+    description: ECA mgmt network subnet mask
+  ha_net_name:
+    type: string
+    label: ha_failover network name
+    description: ha_failover network name
+  ha_net_start:
+    type: string
+    label: ha net start
+    description: ha net start
+  ha_net_end:
+    type: string
+    label: ha net end
+    description: ha net end
+  ha_net_cidr:
+    type: string
+    label: ha net cidr
+    description: ha net cidr
+  ha_net_local_ip1:
+    type: string
+    label: ha net network local ip1
+    description: the local ip1 of the ha network
+  ha_net_local_ip2:
+    type: string
+    label: ha net network local ip2
+    description: the local ip2 of the ha network
+  lb1_name:
+    type: string
+    label: MMSC load balancer instance name
+    description: MMSC load balancer instance name
+  lb_image_name:
+    type: string
+    label: MMSC load balancer image name
+    description: MMSC load balancer image name
+  lb_flavor_name:
+    type: string
+    label: Load balancer flavor name
+    description: the flavor name of MMSC load balancer instance
+  lb1_name:
+    type: string
+    label: MMSC load balancer1 instance name
+    description: MMSC load balancer1 instance name
+  lb2_name:
+    type: string
+    label: MMSC load balancer2 instance name
+    description: MMSC load balancer2 instance name
+  availabilityzone_name:
+    type: string
+    label: MMSC availabilityzone name
+    description: MMSC availabilityzone name
+  security_group_name:
+    type: string
+    label: MMSC security group name
+    description: MMSC security group name
+  mmsc_image:
+    type: string
+    description: Image for MMSC server
+  mmsc_flavor:
+    type: string
+    description: Flavor for MMSC server
+#  mmsc_cinder_volume_size:
+#    type: number
+#    label: MMSC Cinder volume size
+#    description: the size of the MMSC Cinder volume
+  nems_fe_image:
+    type: string
+    description: Image for NEMS FE server
+  nems_fe_flavor:
+    type: string
+    description: Flavor for NEMS FE server
+  nems_be_image:
+    type: string
+    description: Image for NEMS BE server
+  nems_be_flavor:
+    type: string
+    description: Flavor for NEMS BE server
+  eca_trx_image:
+    type: string
+    description: Image for ECA TRX server
+  eca_trx_flavor:
+    type: string
+    description: Flavor for ECA TRX server
+  eca_oam_image:
+    type: string
+    description: Image for ECA OAM server
+  eca_oam_flavor:
+    type: string
+    description: Flavor for ECA OAM server
+  cmaui_name:
+    type: string
+    description: CMAUI server name
+  cmaui_image:
+    type: string
+    description: Image for CMAUI server
+  cmaui_flavor:
+    type: string
+    description: Flavor for CMAUI server  
+#  cmaui_cinder_volume_size:
+#    type: number
+#    label: CMAUI Cinder volume size
+#    description: the size of the CMAUI Cinder volume
+  mmsc1_name:
+    type: string
+    description: MMSC1 server name
+  mmsc1_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC1
+  mmsc1_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC1
+  mmsc2_name:
+    type: string
+    description: MMSC2 server name
+  mmsc2_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC2
+  mmsc2_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC2
+  mmsc3_name:
+    type: string
+    description: MMSC3 server name
+  mmsc3_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC3
+  mmsc3_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC3
+  mmsc4_name:
+    type: string
+    description: MMSC4 server name
+  mmsc4_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC4
+  mmsc4_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC4
+  mmsc5_name:
+    type: string
+    description: MMSC5 server name
+  mmsc5_oam_net_ip:
+    type: string
+    description: OAM_net IP for MMSC5
+  mmsc5_mms_traffic_net_ip:
+    type: string
+    description: mms_traffic_net IP for MMSC5
+  nems_fe1_name:
+    type: string
+    description: NEMS_FE1 server name
+  nems_fe1_node_role:
+    type: string
+    label: nems node role
+    description: nems node role
+  nems_fe1_oam_net_ip:
+    type: string
+    description: OAM_net IP for NEMS_FE1
+  nems_fe1_nems_traffic_net_ip:
+    type: string
+    description: nems_traffic_net IP for NEMS_FE1
+  nems_fe1_nems_user_web_net_ip:
+    type: string
+    description: nems_web_user_net IP for NEMS_FE1
+  nems_fe1_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_FE1
+  nems_fe1_nems_imap_net_ip:
+    type: string
+    description: nems_imap_net IP for NEMS_FE1  
+  nems_fe2_name:
+    type: string
+    description: NEMS_FE2 server name
+  nems_fe2_node_role:
+    type: string
+    label: nems node role
+    description: nems node role
+  nems_fe2_oam_net_ip:
+    type: string
+    description: OAM_net IP for NEMS_FE2
+  nems_fe2_nems_traffic_net_ip:
+    type: string
+    description: nems_traffic_net IP for NEMS_FE2
+  nems_fe2_nems_user_web_net_ip:
+    type: string
+    description: nems_web_user_net IP for NEMS_FE2
+  nems_fe2_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_FE2
+  nems_fe2_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_FE2
+  nems_fe2_nems_imap_net_ip:
+    type: string
+    description: nems_imap_net IP for NEMS_FE2  
+  nems_be1_name:
+    type: string
+    description: NEMS_BE2 server name
+  nems_be1_node_role:
+    type: string
+    label: nems node role
+    description: nems node role
+  nems_be1_oam_net_ip:
+    type: string
+    description: OAM_net IP for NEMS_BE1
+  nems_be1_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_BE1
+  nems_be1_nems_imap_net_ip:
+    type: string
+    description: nems_imap_net IP for NEMS_BE1  
+  nems_be2_name:
+    type: string
+    description: NEMS_BE2 server name
+  nems_be2_node_role:
+    type: string
+    label: nems node role
+    description: nems node role
+  nems_be2_oam_net_ip:
+    type: string
+    description: OAM_net IP for NEMS_BE2
+  nems_be2_nems_internal_net_ip:
+    type: string
+    description: nems_internal_net IP for NEMS_BE2
+  nems_be2_nems_imap_net_ip:
+    type: string
+    description: nems_imap_net IP for NEMS_BE2
+  eca_oam1_name:
+    type: string
+    description: ECA_OAM1 server name
+  eca_oam1_oam_net_ip:
+    type: string
+    description: OAM_net IP for ECA_OAM1
+  eca_oam1_eca_mgmt_net_ip:
+    type: string
+    description: eca_mgmt_net IP for ECA_OAM1
+  eca_oam2_name:
+    type: string
+    description: ECA_OAM2 server name
+  eca_oam2_oam_net_ip:
+    type: string
+    description: OAM_net IP for ECA_OAM2
+  eca_oam2_eca_mgmt_net_ip:
+    type: string
+    description: eca_mgmt_net IP for ECA_OAM2
+  eca_trx1_name:
+    type: string
+    description: ECA_TRX1 server name
+  eca_trx1_oam_net_ip:
+    type: string
+    description: OAM_net IP for ECA_TRX1
+  eca_trx1_eca_mgmt_net_ip:
+    type: string
+    description: eca_mgmt_net IP for ECA_TRX1
+  eca_trx1_eca_traffic_net_ip:
+    type: string
+    description: eca_traffic_net IP for ECA_TRX1
+  cmaui_oam_net_ip:
+    type: string
+    description: eca_mgmt_net IP for CMAUI
+
+resources:
+  mms_security_group:
+    type: OS::Neutron::SecurityGroup
+    properties:
+      description: mmsc security group
+      name: {get_param: security_group_name}
+      rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
+              {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
+              ]
+
+  lb1_instance:
+    type: OS::Nova::Server
+    properties:
+      name: {get_param: lb1_name}
+      image: {get_param: lb_image_name}
+      flavor: {get_param: lb_flavor_name}
+      availability_zone: {get_param: availabilityzone_name}
+      networks:
+        - port: {get_resource: lb1_mgmt_port}
+        - port: {get_resource: lb1_dmz_protected_port}
+        - port: {get_resource: lb1_cor_direct_port}
+        - port: {get_resource: lb1_mms_traffic_port}
+        - port: {get_resource: lb1_nems_traffic_port}
+        - port: {get_resource: lb1_nems_user_web_port}
+        - port: {get_resource: lb1_eca_traffic_port}
+        - port: {get_resource: lb1_ha_net_port}
+
+  lb1_mgmt_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: oam_net_name}
+      fixed_ips: [{"ip_address": {get_param: lb1_oam_net_ip}}]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_mms_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: mms_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_dmz_protected_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: dmz_protected_net}
+      fixed_ips: [{"ip_address": {get_param: dmz_protected_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: dmz_protected_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_cor_direct_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: cor_direct_net}
+      fixed_ips: [{"ip_address": {get_param: cor_direct_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: cor_direct_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_nems_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: nems_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_nems_user_web_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: nems_user_web_net}
+      fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb1_ha_net_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: ha_net}
+      fixed_ips: [{"ip_address": {get_param: ha_net_local_ip1}}]
+
+  lb1_eca_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: eca_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_instance:
+    type: OS::Nova::Server
+    properties:
+      name: {get_param: lb2_name}
+      image: {get_param: lb_image_name}
+      flavor: {get_param: lb_flavor_name}
+      availability_zone: {get_param: availabilityzone_name}
+      networks:
+        - port: {get_resource: lb2_mgmt_port}
+        - port: {get_resource: lb2_dmz_protected_port}
+        - port: {get_resource: lb2_cor_direct_port}
+        - port: {get_resource: lb2_mms_traffic_port}
+        - port: {get_resource: lb2_nems_traffic_port}
+        - port: {get_resource: lb2_nems_user_web_port}
+        - port: {get_resource: lb2_eca_traffic_port}
+        - port: {get_resource: lb2_ha_net_port}
+
+  lb2_mgmt_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: oam_net_name}
+      fixed_ips: [{"ip_address": {get_param: lb2_oam_net_ip}}]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_mms_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: mms_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_dmz_protected_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: dmz_protected_net}
+      fixed_ips: [{"ip_address": {get_param: dmz_protected_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: dmz_protected_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_cor_direct_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_param: cor_direct_net}
+      fixed_ips: [{"ip_address": {get_param: cor_direct_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: cor_direct_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_nems_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: nems_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_nems_user_web_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: nems_user_web_net}
+      fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  lb2_ha_net_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: ha_net}
+      fixed_ips: [{"ip_address": {get_param: ha_net_local_ip2}}]
+
+  lb2_eca_traffic_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: {get_resource: eca_traffic_net}
+      fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip2}}]
+      allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
+      security_groups: [{get_resource: mms_security_group}]
+
+  server_mmsc1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc1_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc1_port_0 }
+      - port: { get_resource: mmsc1_port_1 }
+      user_data:
+        str_replace:
+          template: |
+            mmsc.mgmt.ip=${mmsc.mgmt.ip}
+            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+            mmsc.traffic.ip=${mmsc.traffic.ip}
+            mmsc.traffic.netmask=${mmsc.traffic.netmask}
+            mmsc.traffic.gateway=${mmsc.traffic.gateway}
+            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+            mmsc.external.dns=${mmsc.external.dns}
+            mmsc.external.ntp=${mmsc.external.ntp}
+          params:
+            ${mmsc.mgmt.ip}: {get_param: mmsc1_oam_net_ip}
+            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${mmsc.traffic.ip}: {get_param:  mmsc1_mms_traffic_net_ip}
+            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${mmsc.external.dns}: {get_param: external_dns}
+            ${mmsc.external.ntp}: {get_param: external_ntp} 
+      user_data_format: RAW
+#  mmsc1_volume:
+#    type: OS::Cinder::Volume
+#    properties:
+#      size: {get_param: mmsc_cinder_volume_size}
+
+#  mmsc1_volume_attachment:
+#    type: OS::Cinder::VolumeAttachment
+#    properties:
+#      volume_id: {get_resource: mmsc1_volume}
+#      instance_uuid: {get_resource: server_mmsc1}
+
+  mmsc1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc1_oam_net_ip }
+      ]
+
+  mmsc1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc1_mms_traffic_net_ip }
+      ]
+
+  server_mmsc2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc2_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc2_port_0 }
+      - port: { get_resource: mmsc2_port_1 }
+      user_data:
+        str_replace:
+          template: |
+            mmsc.mgmt.ip=${mmsc.mgmt.ip}
+            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+            mmsc.traffic.ip=${mmsc.traffic.ip}
+            mmsc.traffic.netmask=${mmsc.traffic.netmask}
+            mmsc.traffic.gateway=${mmsc.traffic.gateway}
+            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+            mmsc.external.dns=${mmsc.external.dns}
+            mmsc.external.ntp=${mmsc.external.ntp}
+          params:
+            ${mmsc.mgmt.ip}: {get_param: mmsc2_oam_net_ip}
+            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${mmsc.traffic.ip}: {get_param: mmsc2_mms_traffic_net_ip}
+            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${mmsc.external.dns}: {get_param: external_dns}
+            ${mmsc.external.ntp}: {get_param: external_ntp} 
+      user_data_format: RAW
+#  mmsc2_volume:
+#    type: OS::Cinder::Volume
+#    properties:
+#      size: {get_param: mmsc_cinder_volume_size}
+
+#  mmsc2_volume_attachment:
+#    type: OS::Cinder::VolumeAttachment
+#    properties:
+#      volume_id: {get_resource: mmsc2_volume}
+#      instance_uuid: {get_resource: server_mmsc2}
+
+  mmsc2_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc2_oam_net_ip }
+      ]
+
+  mmsc2_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc2_mms_traffic_net_ip }
+      ]
+
+  server_mmsc3:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc3_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc3_port_0 }
+      - port: { get_resource: mmsc3_port_1 }
+      user_data:
+        str_replace:
+          template: |
+            mmsc.mgmt.ip=${mmsc.mgmt.ip}
+            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+            mmsc.traffic.ip=${mmsc.traffic.ip}
+            mmsc.traffic.netmask=${mmsc.traffic.netmask}
+            mmsc.traffic.gateway=${mmsc.traffic.gateway}
+            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+            mmsc.external.dns=${mmsc.external.dns}
+            mmsc.external.ntp=${mmsc.external.ntp}
+          params:
+            ${mmsc.mgmt.ip}: {get_param: mmsc3_oam_net_ip}
+            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${mmsc.traffic.ip}: {get_param:  mmsc3_mms_traffic_net_ip}
+            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${mmsc.external.dns}: {get_param: external_dns}
+            ${mmsc.external.ntp}: {get_param: external_ntp}
+      user_data_format: RAW
+
+  mmsc3_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc3_oam_net_ip }
+      ]
+
+  mmsc3_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc3_mms_traffic_net_ip }
+      ]
+
+  server_mmsc4:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc4_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc4_port_0 }
+      - port: { get_resource: mmsc4_port_1 }
+      user_data:
+        str_replace:
+          template: |
+            mmsc.mgmt.ip=${mmsc.mgmt.ip}
+            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
+            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
+            mmsc.traffic.ip=${mmsc.traffic.ip}
+            mmsc.traffic.netmask=${mmsc.traffic.netmask}
+            mmsc.traffic.gateway=${mmsc.traffic.gateway}
+            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
+            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
+            mmsc.external.dns=${mmsc.external.dns}
+            mmsc.external.ntp=${mmsc.external.ntp}
+          params:
+            ${mmsc.mgmt.ip}: {get_param: mmsc4_oam_net_ip}
+            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${mmsc.traffic.ip}: {get_param:  mmsc4_mms_traffic_net_ip}
+            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
+            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
+            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${mmsc.external.dns}: {get_param: external_dns}
+            ${mmsc.external.ntp}: {get_param: external_ntp}
+      user_data_format: RAW
+
+  mmsc4_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc4_oam_net_ip }
+      ]
+
+  mmsc4_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc4_mms_traffic_net_ip }
+      ]
+
+  server_mmsc5:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: mmsc5_name }
+      image: { get_param: mmsc_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: mmsc_flavor }
+      networks:
+      - port: { get_resource: mmsc5_port_0 }
+      - port: { get_resource: mmsc5_port_1 }
+
+  mmsc5_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc5_oam_net_ip }
+      ]
+
+  mmsc5_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: mms_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: mmsc5_mms_traffic_net_ip }
+      ]
+
+  server_nems_fe1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: nems_fe1_name }
+      image: { get_param: nems_fe_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: nems_fe_flavor }
+      networks:
+      - port: { get_resource: nems_fe1_port_0 }
+      - port: { get_resource: nems_fe1_port_1 }
+      - port: { get_resource: nems_fe1_port_2 }
+      - port: { get_resource: nems_fe1_port_3 }
+      - port: { get_resource: nems_fe1_port_4 }
+      user_data:
+        str_replace:
+          template: |
+            nems.mgmt.ip=${nems.mgmt.ip}
+            nems.mgmt.netmask=${nems.mgmt.netmask}
+            nems.mgmt.gateway=${nems.mgmt.gateway}
+            nems.traffic.ip=${nems.traffic.ip}
+            nems.traffic.netmask=${nems.traffic.netmask}
+            nems.traffic.gateway=${nems.traffic.gateway}
+            nems.fe0.internal.ip=${nems.fe0.internal.ip}
+            nems.fe1.internal.ip=${nems.fe1.internal.ip}
+            nems.internal.netmask=${nems.internal.netmask}
+            nems.internal.gateway=${nems.internal.gateway}
+            nems.userweb.ip=${nems.userweb.ip}
+            nems.userweb.netmask=${nems.userweb.netmask}
+            nems.userweb.gateway=${nems.userweb.gateway}
+            nems.imap.ip=${nems.imap.ip}
+            nems.imap.netmask=${nems.imap.netmask}
+            nems.imap.gateway=${nems.imap.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.be.imap.ip=${nems.be.imap.ip}
+            nems.mgmt.route.1=${nems.mgmt.route.1}
+            nems.mgmt.route.2=${nems.mgmt.route.2}
+            nems.external.dns=${nems.external.dns}
+            nems.external.ntp=${nems.external.ntp}
+            nems.node=${nems.node}
+          params:
+            ${nems.mgmt.ip}: {get_param: nems_fe1_oam_net_ip}
+            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${nems.traffic.ip}: {get_param: nems_fe1_nems_traffic_net_ip}
+            ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+            ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+            ${nems.fe0.internal.ip}: {get_param: nems_fe1_nems_internal_net_ip}
+            ${nems.fe1.internal.ip}: {get_param: nems_fe2_nems_internal_net_ip}
+            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
+            ${nems.userweb.ip}: {get_param: nems_fe1_nems_user_web_net_ip}
+            ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+            ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+            ${nems.imap.ip}: {get_param: nems_fe1_nems_imap_net_ip}
+            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+            ${nems.imap.gateway}: {get_param: nems_imap_gateway}  
+            ${nems.be.internal.ip}: {get_param: nems_be1_nems_internal_net_ip}
+            ${nems.be.imap.ip}: {get_param: nems_be1_nems_imap_net_ip}
+            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${nems.external.dns}: {get_param: external_dns}
+            ${nems.external.ntp}: {get_param: external_ntp}
+            ${nems.node}: {get_param: nems_fe1_node_role} 
+      user_data_format: RAW
+
+  nems_fe1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_oam_net_ip }
+      ]
+
+  nems_fe_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: {get_param: oam_net_name}
+      port_id: {get_resource: nems_fe1_port_0}
+
+  nems_fe1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_nems_traffic_net_ip }
+      ]
+
+  nems_fe1_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_user_web_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_nems_user_web_net_ip }
+      ]
+
+  nems_fe1_port_3:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_internal_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_nems_internal_net_ip }
+      ]
+
+  nems_fe1_port_4:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_imap_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe1_nems_imap_net_ip }
+      ]
+
+  server_nems_fe2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: nems_fe2_name }
+      image: { get_param: nems_fe_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: nems_fe_flavor }
+      networks:
+      - port: { get_resource: nems_fe2_port_0 }
+      - port: { get_resource: nems_fe2_port_1 }
+      - port: { get_resource: nems_fe2_port_2 }
+      - port: { get_resource: nems_fe2_port_3 }
+      - port: { get_resource: nems_fe2_port_4 }
+      user_data:
+        str_replace:
+          template: |
+            nems.mgmt.ip=${nems.mgmt.ip}
+            nems.mgmt.netmask=${nems.mgmt.netmask}
+            nems.mgmt.gateway=${nems.mgmt.gateway}
+            nems.traffic.ip=${nems.traffic.ip}
+            nems.traffic.netmask=${nems.traffic.netmask}
+            nems.traffic.gateway=${nems.traffic.gateway}
+            nems.fe0.internal.ip=${nems.fe0.internal.ip}
+            nems.fe1.internal.ip=${nems.fe1.internal.ip}
+            nems.internal.netmask=${nems.internal.netmask}
+            nems.internal.gateway=${nems.internal.gateway}
+            nems.userweb.ip=${nems.userweb.ip}
+            nems.userweb.netmask=${nems.userweb.netmask}
+            nems.userweb.gateway=${nems.userweb.gateway}
+            nems.imap.ip=${nems.imap.ip}
+            nems.imap.netmask=${nems.imap.netmask}
+            nems.imap.gateway=${nems.imap.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.be.imap.ip=${nems.be.imap.ip}
+            nems.mgmt.route.1=${nems.mgmt.route.1}
+            nems.mgmt.route.2=${nems.mgmt.route.2}
+            nems.external.dns=${nems.external.dns}
+            nems.external.ntp=${nems.external.ntp}
+            nems.node=${nems.node}
+          params:
+            ${nems.mgmt.ip}: {get_param: nems_fe2_oam_net_ip}
+            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${nems.traffic.ip}: {get_param: nems_fe2_nems_traffic_net_ip}
+            ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
+            ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
+            ${nems.fe0.internal.ip}: {get_param: nems_fe1_nems_internal_net_ip}
+            ${nems.fe1.internal.ip}: {get_param: nems_fe2_nems_internal_net_ip}
+            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
+            ${nems.userweb.ip}: {get_param: nems_fe2_nems_user_web_net_ip}
+            ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
+            ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
+            ${nems.imap.ip}: {get_param: nems_fe2_nems_imap_net_ip}
+            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+            ${nems.imap.gateway}: {get_param: nems_imap_gateway}
+            ${nems.be.internal.ip}: {get_param: nems_be2_nems_internal_net_ip}
+            ${nems.be.imap.ip}: {get_param: nems_be2_nems_imap_net_ip}
+            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${nems.external.dns}: {get_param: external_dns}
+            ${nems.external.ntp}: {get_param: external_ntp}
+            ${nems.node}: {get_param: nems_fe2_node_role}
+      user_data_format: RAW
+
+  nems_fe2_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_oam_net_ip }
+      ]
+
+  nems_fe_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: {get_param: oam_net_name}
+      port_id: {get_resource: nems_fe2_port_0}
+
+  nems_fe2_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_nems_traffic_net_ip }
+      ]
+
+  nems_fe2_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_user_web_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_nems_user_web_net_ip }
+      ]
+
+  nems_fe2_port_3:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_internal_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_nems_internal_net_ip }
+      ]
+
+  nems_fe2_port_4:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_imap_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_fe2_nems_imap_net_ip }
+      ]
+
+  server_nems_be1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: nems_be1_name }
+      image: { get_param: nems_be_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: nems_be_flavor }
+      networks:
+      - port: { get_resource: nems_be1_port_0 }
+      - port: { get_resource: nems_be1_port_1 }
+      - port: { get_resource: nems_be1_port_2 }
+      user_data:
+        str_replace:
+          template: |
+            nems.be.mgmt.ip=${nems.be.mgmt.ip}
+            nems.mgmt.netmask=${nems.mgmt.netmask}
+            nems.mgmt.gateway=${nems.mgmt.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.internal.netmask=${nems.internal.netmask}
+            nems.internal.gateway=${nems.internal.gateway}
+            nems.imap.netmask=${nems.imap.netmask}
+            nems.imap.gateway=${nems.imap.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.be.imap.ip=${nems.be.imap.ip}
+            nems.mgmt.route.1=${nems.mgmt.route.1}
+            nems.mgmt.route.2=${nems.mgmt.route.2}
+            nems.external.dns=${nems.external.dns}
+            nems.external.ntp=${nems.external.ntp}
+            nems.node=${nems.node}
+          params:
+            ${nems.be.mgmt.ip}: {get_param: nems_be1_oam_net_ip}
+            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${nems.be.internal.ip}: {get_param: nems_be1_nems_internal_net_ip}
+            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
+            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+            ${nems.imap.gateway}: {get_param: nems_imap_gateway}  
+            ${nems.be.imap.ip}: {get_param: nems_be1_nems_imap_net_ip}
+            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${nems.external.dns}: {get_param: external_dns}
+            ${nems.external.ntp}: {get_param: external_ntp}
+            ${nems.node}: {get_param: nems_be1_node_role} 
+      user_data_format: RAW
+
+  nems_be1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be1_oam_net_ip }
+      ]
+
+  nems_be_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: {get_param: oam_net_name}
+      port_id: {get_resource: nems_be1_port_0}
+
+  nems_be1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_internal_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be1_nems_internal_net_ip }
+      ]
+
+  nems_be1_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_imap_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be1_nems_imap_net_ip }
+      ]
+
+  server_nems_be2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: nems_be2_name }
+      image: { get_param: nems_be_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: nems_be_flavor }
+      networks:
+      - port: { get_resource: nems_be2_port_0 }
+      - port: { get_resource: nems_be2_port_1 }
+      - port: { get_resource: nems_be2_port_2 }
+      user_data:
+        str_replace:
+          template: |
+            nems.be.mgmt.ip=${nems.be.mgmt.ip}
+            nems.mgmt.netmask=${nems.mgmt.netmask}
+            nems.mgmt.gateway=${nems.mgmt.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.internal.netmask=${nems.internal.netmask}
+            nems.internal.gateway=${nems.internal.gateway}
+            nems.imap.netmask=${nems.imap.netmask}
+            nems.imap.gateway=${nems.imap.gateway}
+            nems.be.internal.ip=${nems.be.internal.ip}
+            nems.be.imap.ip=${nems.be.imap.ip}
+            nems.mgmt.route.1=${nems.mgmt.route.1}
+            nems.mgmt.route.2=${nems.mgmt.route.2}
+            nems.external.dns=${nems.external.dns}
+            nems.external.ntp=${nems.external.ntp}
+            nems.node=${nems.node}
+          params:
+            ${nems.be.mgmt.ip}: {get_param: nems_be2_oam_net_ip}
+            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
+            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
+            ${nems.be.internal.ip}: {get_param: nems_be2_nems_internal_net_ip}
+            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
+            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
+            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
+            ${nems.imap.gateway}: {get_param: nems_imap_gateway}
+            ${nems.be.imap.ip}: {get_param: nems_be2_nems_imap_net_ip}
+            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
+            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
+            ${nems.external.dns}: {get_param: external_dns}
+            ${nems.external.ntp}: {get_param: external_ntp}
+            ${nems.node}: {get_param: nems_be1_node_role}
+      user_data_format: RAW
+
+  nems_be2_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be2_oam_net_ip }
+      ]
+
+  nems_be_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: {get_param: oam_net_name}
+      port_id: {get_resource: nems_be2_port_0}
+
+  nems_be2_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_internal_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be2_nems_internal_net_ip }
+      ]
+
+  nems_be2_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: nems_imap_net }
+      fixed_ips: [
+        "ip_address": { get_param: nems_be2_nems_imap_net_ip }
+      ]
+
+  server_eca_oam1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: eca_oam1_name }
+      image: { get_param: eca_oam_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: eca_oam_flavor }
+      networks:
+      - port: { get_resource: eca_oam1_port_0 }
+      - port: { get_resource: eca_oam1_port_1 }
+
+  eca_oam1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: eca_oam1_oam_net_ip }
+      ]
+
+  eca_oam1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: eca_mgmt_net }
+      fixed_ips: [
+        "ip_address": { get_param: eca_oam1_eca_mgmt_net_ip }
+      ]
+
+  server_eca_oam2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: eca_oam2_name }
+      image: { get_param: eca_oam_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: eca_oam_flavor }
+      networks:
+      - port: { get_resource: eca_oam2_port_0 }
+      - port: { get_resource: eca_oam2_port_1 }
+
+  eca_oam2_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: eca_oam2_oam_net_ip }
+      ]
+
+  eca_oam2_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: eca_mgmt_net }
+      fixed_ips: [
+        "ip_address": { get_param: eca_oam2_eca_mgmt_net_ip }
+      ]
+
+  server_eca_trx1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: eca_trx1_name }
+      image: { get_param: eca_trx_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: eca_trx_flavor }
+      networks:
+      - port: { get_resource: eca_trx1_port_0 }
+      - port: { get_resource: eca_trx1_port_1 }
+      - port: { get_resource: eca_trx1_port_2 }
+
+
+  eca_trx1_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: eca_trx1_oam_net_ip }
+      ]
+
+  eca_trx1_port_1:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: eca_mgmt_net }
+      fixed_ips: [
+        "ip_address": { get_param: eca_trx1_eca_mgmt_net_ip }
+      ]
+
+  eca_trx1_port_2:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: eca_traffic_net }
+      fixed_ips: [
+        "ip_address": { get_param: eca_trx1_eca_traffic_net_ip }
+      ]
+
+  server_cmaui:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: cmaui_name }
+      image: { get_param: cmaui_image }
+      availability_zone: { get_param: availabilityzone_name }
+      flavor: { get_param: cmaui_flavor }
+      networks:
+      - port: { get_resource: cmaui_port_0 }
+
+#  cmaui_volume:
+#    type: OS::Cinder::Volume
+#    properties:
+#      size: {get_param: cmaui_cinder_volume_size}
+
+#  cmaui_volume_attachment:
+#    type: OS::Cinder::VolumeAttachment
+#    properties:
+#      volume_id: {get_resource: cmaui_volume}
+#      instance_uuid: {get_resource: server_cmaui}
+
+  cmaui_port_0:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: oam_net_name }
+      fixed_ips: [
+        "ip_address": { get_param: cmaui_oam_net_ip }
+      ]
+
diff --git a/bpmn/MSOCockpit/pom.xml b/bpmn/MSOCockpit/pom.xml
new file mode 100644 (file)
index 0000000..bac169d
--- /dev/null
@@ -0,0 +1,66 @@
+<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.openecomp.mso</groupId>
+               <artifactId>bpmn</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>MSOCockpit</artifactId>
+       <packaging>pom</packaging>
+       <name>MSOCockpit</name>
+       <description>Builds the Camunda cockpit webapp for MSO</description>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-assembly-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <configuration>
+                                                       <descriptors>
+                                                               <descriptor>src/main/assembly/cockpit-build.xml</descriptor>
+                                                       </descriptors>
+                                                       <appendAssemblyId>false</appendAssemblyId>
+                                               </configuration>
+                                               <id>cockpit-build</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>single</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+       
+       <dependencies>
+               
+               <dependency>
+                       <groupId>org.camunda.bpm.webapp</groupId>
+                       <artifactId>camunda-webapp-jboss-standalone</artifactId>
+                       <version>${camunda.version}</version>
+                       <type>war</type>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>common</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>com.att.camunda.bpm.cockpit.plugin</groupId>
+                       <artifactId>cockpit-urnmap-plugin</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>MSOCoreBPMN</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+       </dependencies>
+       
+</project>
diff --git a/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml b/bpmn/MSOCockpit/src/main/assembly/cockpit-build.xml
new file mode 100644 (file)
index 0000000..d623aa5
--- /dev/null
@@ -0,0 +1,91 @@
+<!--
+  ============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=========================================================
+  -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+       <id>cockpit-build</id>
+
+       <formats>
+               <format>war</format>
+       </formats>
+       
+       <includeBaseDirectory>false</includeBaseDirectory>
+
+       <dependencySets>
+               <dependencySet>
+                       <outputDirectory>/</outputDirectory>
+                       <includes>
+                               <include>org.camunda.bpm.webapp:camunda-webapp-jboss-standalone</include>
+                       </includes>
+                       <unpack>true</unpack>
+                       <unpackOptions>
+                               <excludes>
+                                       <exclude>WEB-INF/applicationContext.xml</exclude>
+                                       <exclude>WEB-INF/web.xml</exclude>
+                                       <exclude>WEB-INF/jboss-deployment-structure.xml</exclude>
+                               </excludes>
+                       </unpackOptions>
+                       <scope>runtime</scope>
+                       <useProjectArtifact>false</useProjectArtifact>
+               </dependencySet>
+
+               <!-- Here is where cockpit plugins are embedded -->
+
+               <dependencySet>
+                       <outputDirectory>/WEB-INF/lib</outputDirectory>
+                       <includes>
+                               <!-- The URN Mapping plugin -->
+                               <!-- <include>com.att.camunda.bpm.cockpit.plugin:cockpit-urnmap-plugin</include> -->
+
+                               <!-- for MSO Logging -->
+                               <include>org.openecomp.mso:logger</include>
+                               <include>ch.qos.logback:logback-core</include>
+                               <include>ch.qos.logback:logback-classic</include>
+                               <include>com.att.eelf:eelf-core</include>
+
+                               <!-- Included so the cockpit can deserialize and display core
+                                    class objects, like MSOWorkflowException -->
+                               <include>org.openecomp.mso:MSOCoreBPMN</include>
+                       </includes>
+                       <unpack>false</unpack>
+                       <scope>runtime</scope>
+                       <useProjectArtifact>false</useProjectArtifact>
+               </dependencySet>
+       </dependencySets>
+
+       <!-- We provide our own versions of the following files -->
+
+       <files>
+               <file>
+                       <source>src/main/resources/WEB-INF/applicationContext.xml</source>
+                       <outputDirectory>/WEB-INF</outputDirectory>
+               </file>
+               <file>
+                       <source>src/main/resources/WEB-INF/web.xml</source>
+                       <outputDirectory>/WEB-INF</outputDirectory>
+               </file>
+               <file>
+                       <source>src/main/resources/WEB-INF/jboss-deployment-structure.xml</source>
+                       <outputDirectory>/WEB-INF</outputDirectory>
+               </file>
+       </files>
+</assembly>
diff --git a/bpmn/MSOCockpit/src/main/resources/WEB-INF/applicationContext.xml b/bpmn/MSOCockpit/src/main/resources/WEB-INF/applicationContext.xml
new file mode 100644 (file)
index 0000000..fd91391
--- /dev/null
@@ -0,0 +1,111 @@
+<!--
+  ============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=========================================================
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:activiti="http://www.activiti.org/schema/spring/components"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+
+  <!--
+  <bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
+    <property name="targetDataSource">
+      <bean class="org.apache.commons.dbcp.BasicDataSource">
+        <property name="driverClassName" value="org.h2.Driver" />
+        <property name="url" value="jdbc:h2:mem:process-engine;MVCC=TRUE;TRACE_LEVEL_FILE=0" />
+        <property name="username" value="sa" />
+        <property name="password" value="" />
+      </bean>
+    </property>
+  </bean>
+  -->
+
+  <!-- Added for MSO: Use the datasource defined in the JBoss configuration  -->
+  <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
+    <property name="jndiName" value="java:jboss/datasources/ProcessEngine"/>
+  </bean>
+
+  <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+    <property name="dataSource" ref="dataSource" />
+  </bean>
+
+  <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
+    <property name="processEngineName" value="default" />
+    <property name="dataSource" ref="dataSource" />
+    <property name="transactionManager" ref="transactionManager" />
+    <property name="databaseSchemaUpdate" value="true" />
+    <property name="jobExecutorActivate" value="false" />
+    <property name="deploymentResources" value="classpath*:bpmn/*.bpmn" />
+    <property name="authorizationEnabled" value="true" />
+    <property name="failedJobCommandFactory">
+      <bean class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
+    </property>
+    <property name="idGenerator">
+      <bean class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" />
+    </property>
+    <property name="processEnginePlugins">
+      <list>
+        <!--<ref bean="ldapIdentityProviderPlugin" />-->
+        <!--<ref bean="administratorAuthorizationPlugin" />-->
+        <bean id="spinPlugin" class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
+        <bean id="connectPlugin" class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
+      </list>
+    </property>
+    <!-- Added for MSO: Set the history level to full -->
+    <property name="historyLevel" value="HISTORY_LEVEL_FULL" />
+  </bean>
+
+  <!-- ldap identity provider (deactivated, uncomment plugin in processEngineConfiguration to activate) -->
+  <bean id="ldapIdentityProviderPlugin" class="org.camunda.bpm.identity.impl.ldap.plugin.LdapIdentityProviderPlugin">
+    <property name="serverUrl" value="ldap://localhost:3433/" />
+    <property name="managerDn" value="uid=daniel,ou=office-berlin,o=camunda,c=org" />
+    <property name="managerPassword" value="daniel" />
+    <property name="baseDn" value="o=camunda,c=org" />
+
+    <property name="userSearchBase" value="" />
+    <property name="userSearchFilter" value="(objectclass=person)" />
+    <property name="userIdAttribute" value="uid" />
+    <property name="userFirstnameAttribute" value="cn" />
+    <property name="userLastnameAttribute" value="sn" />
+    <property name="userEmailAttribute" value="mail" />
+    <property name="userPasswordAttribute" value="userpassword" />
+
+    <property name="groupSearchBase" value="" />
+    <property name="groupSearchFilter" value="(objectclass=groupOfNames)" />
+    <property name="groupIdAttribute" value="ou" />
+    <property name="groupNameAttribute" value="cn" />
+    <property name="groupMemberAttribute" value="member" />
+  </bean>
+
+  <bean id="administratorAuthorizationPlugin" class="org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin">
+    <property name="administratorUserName" value="admin" />
+  </bean>
+
+  <bean id="processEngine" class="org.camunda.bpm.engine.spring.ProcessEngineFactoryBean">
+    <property name="processEngineConfiguration" ref="processEngineConfiguration" />
+  </bean>
+
+  <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
+  <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
+  <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
+  <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
+  <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
+</beans>
diff --git a/bpmn/MSOCockpit/src/main/resources/WEB-INF/jboss-deployment-structure.xml b/bpmn/MSOCockpit/src/main/resources/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..d183019
--- /dev/null
@@ -0,0 +1,34 @@
+<?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=========================================================
+  -->
+
+<jboss-deployment-structure>
+  <deployment>
+    <exclusions>
+      <module name="org.jboss.resteasy.resteasy-jackson-provider" />
+      <module name="org.jboss.resteasy.resteasy-jettison-provider" />
+
+      <!-- Added for MSO: logging -->
+      <module name="org.apache.log4j" />
+      <module name="org.slf4j" />
+      <module name="org.slf4j.impl" />
+    </exclusions>
+  </deployment>
+</jboss-deployment-structure>
diff --git a/bpmn/MSOCockpit/src/main/resources/WEB-INF/web.xml b/bpmn/MSOCockpit/src/main/resources/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..e9a9498
--- /dev/null
@@ -0,0 +1,173 @@
+<?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=========================================================
+  -->
+
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+  <display-name>camunda bpm webapp</display-name>
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>/WEB-INF/applicationContext.xml</param-value>
+  </context-param>
+
+  <!-- Added for MSO: use our log4j configuration file -->
+  <context-param>
+    <param-name>log.configuration</param-name>
+    <param-value>logback.bpmn.xml</param-value>
+  </context-param>
+
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+
+  <!-- cockpit bootstrap listener -->
+  <listener>
+    <listener-class>org.camunda.bpm.cockpit.impl.web.bootstrap.CockpitContainerBootstrap</listener-class>
+  </listener>
+
+  <!-- admin bootstrap listener -->
+  <listener>
+    <listener-class>org.camunda.bpm.admin.impl.web.bootstrap.AdminContainerBootstrap</listener-class>
+  </listener>
+
+  <!-- tasklist bootstrap listener -->
+  <listener>
+    <listener-class>org.camunda.bpm.tasklist.impl.web.bootstrap.TasklistContainerBootstrap</listener-class>
+  </listener>
+
+  <!-- Authentication filter -->
+  <filter>
+    <filter-name>Authentication Filter</filter-name>
+    <filter-class>org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter</filter-class>
+  </filter>
+  <filter-mapping>
+    <filter-name>Authentication Filter</filter-name>
+    <url-pattern>/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+  </filter-mapping>
+
+  <!-- Security filter -->
+  <filter>
+    <filter-name>SecurityFilter</filter-name>
+    <filter-class>org.camunda.bpm.webapp.impl.security.filter.SecurityFilter</filter-class>
+    <init-param>
+      <param-name>configFile</param-name>
+      <param-value>/WEB-INF/securityFilterRules.json</param-value>  
+    </init-param>
+  </filter>
+  <filter-mapping>
+    <filter-name>SecurityFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+  </filter-mapping>
+
+  <!-- engines filter -->
+  <filter>
+    <filter-name>Engines Filter</filter-name>
+    <filter-class>org.camunda.bpm.webapp.impl.engine.ProcessEnginesFilter</filter-class>
+  </filter>
+  <filter-mapping>
+    <filter-name>Engines Filter</filter-name>
+    <url-pattern>/app/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+  </filter-mapping>
+
+  <!-- REST cache control filter -->
+  <filter>
+    <filter-name>CacheControlFilter</filter-name>
+    <filter-class>org.camunda.bpm.engine.rest.filter.CacheControlFilter</filter-class>    
+  </filter>
+  <filter-mapping>
+    <filter-name>CacheControlFilter</filter-name>
+    <url-pattern>/api/*</url-pattern>
+  </filter-mapping>
+
+  <!-- cockpit rest api -->
+  <servlet>
+    <servlet-name>Cockpit Api</servlet-name>
+    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+    <init-param>
+      <param-name>javax.ws.rs.Application</param-name>
+      <param-value>org.camunda.bpm.cockpit.impl.web.CockpitApplication</param-value>
+    </init-param>
+    <init-param>
+      <param-name>resteasy.servlet.mapping.prefix</param-name>
+      <param-value>/api/cockpit</param-value>
+    </init-param>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Cockpit Api</servlet-name>
+    <url-pattern>/api/cockpit/*</url-pattern>
+  </servlet-mapping>
+
+  <!-- admin rest api -->
+  <servlet>
+    <servlet-name>Admin Api</servlet-name>
+    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+    <init-param>
+      <param-name>javax.ws.rs.Application</param-name>
+      <param-value>org.camunda.bpm.admin.impl.web.AdminApplication</param-value>
+    </init-param>
+    <init-param>
+      <param-name>resteasy.servlet.mapping.prefix</param-name>
+      <param-value>/api/admin</param-value>
+    </init-param>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Admin Api</servlet-name>
+    <url-pattern>/api/admin/*</url-pattern>
+  </servlet-mapping>
+
+  <!-- tasklist rest api -->
+  <servlet>
+    <servlet-name>Tasklist Api</servlet-name>
+    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+    <init-param>
+      <param-name>javax.ws.rs.Application</param-name>
+      <param-value>org.camunda.bpm.tasklist.impl.web.TasklistApplication</param-value>
+    </init-param>
+    <init-param>
+      <param-name>resteasy.servlet.mapping.prefix</param-name>
+      <param-value>/api/tasklist</param-value>
+    </init-param>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Tasklist Api</servlet-name>
+    <url-pattern>/api/tasklist/*</url-pattern>
+  </servlet-mapping>
+
+  <!-- engine rest api (embedded) -->
+  <servlet>
+    <servlet-name>Engine Api</servlet-name>
+    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+    <init-param>
+      <param-name>javax.ws.rs.Application</param-name>
+      <param-value>org.camunda.bpm.webapp.impl.engine.EngineRestApplication</param-value>
+    </init-param>
+    <init-param>
+      <param-name>resteasy.servlet.mapping.prefix</param-name>
+      <param-value>/api/engine</param-value>
+    </init-param>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>Engine Api</servlet-name>
+    <url-pattern>/api/engine/*</url-pattern>
+  </servlet-mapping>
+</web-app>
diff --git a/bpmn/MSOCoreBPMN/pom.xml b/bpmn/MSOCoreBPMN/pom.xml
new file mode 100644 (file)
index 0000000..db0f7cf
--- /dev/null
@@ -0,0 +1,181 @@
+<?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.openecomp.mso</groupId>
+               <artifactId>bpmn</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>MSOCoreBPMN</artifactId>
+       <packaging>jar</packaging>
+       
+       <build>
+               <plugins>
+                       <!-- Note: test utilities really ought to exist only in the test scope but -->
+                       <!-- this doesn't seem to work in the jenkins build environment.  When unit -->
+                       <!-- tests are disabled, maven skips building the test scoped jar but then -->
+                       <!-- it inexplicably requires the jar when it is included as a test-scoped -->
+                       <!-- dependency in other projects. There might be something strange in the -->
+                       <!-- jenkins configuration because I don't have this problem on my PC, and -->
+                       <!-- I'm using the same version of maven/surefire -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <version>2.6</version>
+                               <executions>
+                                       <execution>
+                                               <!-- Build MSOCoreBPMN-${version}.jar -->
+                                               <!-- excluding unit test utilities -->
+                                               <id>default-jar</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>jar</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <excludes>
+                                                               <exclude>org/openecomp/mso/bpmn/test/**</exclude>
+                                                       </excludes>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <!-- Build MSOCoreBPMN-${version}-test.jar -->
+                                               <!-- containing only the unit test utilities -->
+                                               <id>test-utilities</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>jar</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <classifier>test</classifier>
+                                                       <includes>
+                                                               <include>org/openecomp/mso/bpmn/test/**</include>
+                                                       </includes>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+
+               </plugins>
+       </build>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine</artifactId>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine-rest</artifactId>
+                       <classifier>classes</classifier>
+                       <!-- exclusion to use latest commons-fileupload -->
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-fileupload</groupId>
+                                       <artifactId>commons-fileupload</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <!-- latest commons-fileupload -->
+               <dependency>
+                       <groupId>commons-fileupload</groupId>
+                       <artifactId>commons-fileupload</artifactId>
+                       <version>1.3.2</version>
+               </dependency>
+               <dependency>
+                       <groupId>javax.servlet</groupId>
+                       <artifactId>javax.servlet-api</artifactId>
+                       <version>3.0.1</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-all</artifactId>
+                       <version>1.10.19</version>
+                       <scope>test</scope>
+               </dependency>
+               <!-- Connectors, in compile scope to include it in the war file -->
+               <dependency>
+                       <groupId>org.camunda.connect</groupId>
+                       <artifactId>camunda-connect-connectors-all</artifactId>
+                       <scope>compile</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.camunda.template-engines</groupId>
+                       <artifactId>camunda-template-engines-freemarker</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine-plugin-spin</artifactId>
+               </dependency>
+               <!-- OPTIONAL: spin dataformats -->
+               <dependency>
+                       <groupId>org.camunda.spin</groupId>
+                       <artifactId>camunda-spin-dataformat-json-jackson</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.camunda.spin</groupId>
+                       <artifactId>camunda-spin-dataformat-xml-dom</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine-plugin-connect</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.codehaus.groovy</groupId>
+                       <artifactId>groovy-all</artifactId>
+                       <scope>compile</scope>
+               </dependency>
+               <dependency>
+                       <groupId>com.h2database</groupId>
+                       <artifactId>h2</artifactId>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>net.sf.saxon</groupId>
+                       <artifactId>Saxon-HE</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>common</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.resteasy</groupId>
+                       <artifactId>resteasy-jaxrs</artifactId>
+                       <version>3.0.19.Final</version>
+                       <scope>provided</scope>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.slf4j</groupId>
+                                       <artifactId>slf4j-api</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.slf4j</groupId>
+                                       <artifactId>slf4j-simple</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.httpcomponents</groupId>
+                                       <artifactId>httpclient</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.json</groupId>
+                       <artifactId>json</artifactId>
+                       <version>20160212</version>
+               </dependency>
+               <dependency>
+                       <groupId>xmlunit</groupId>
+                       <artifactId>xmlunit</artifactId>
+                       <version>1.6</version>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BPMNLogger.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BPMNLogger.java
new file mode 100644 (file)
index 0000000..821380f
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+public class BPMNLogger {
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       
+       public static void debug (String isDebugLogEnabled, String LogText) {
+               if (("true").equalsIgnoreCase(isDebugLogEnabled))
+                       msoLogger.debug(LogText);
+       }
+}      
+
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BadInjectedFieldException.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BadInjectedFieldException.java
new file mode 100644 (file)
index 0000000..84c0954
--- /dev/null
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+public class BadInjectedFieldException extends RuntimeException {
+
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Constructor.
+        *
+        * @param fieldName the field name
+        * @param taskName the task name
+        * @param info additional information, e.g. the field value
+        */
+       public BadInjectedFieldException(String fieldName, String taskName,
+                       Object info) {
+               super(taskName + " injected field '" + fieldName + "' is bad: " + info);
+       }
+
+       /**
+        * Constructor.
+        *
+        * @param fieldName the field name
+        * @param taskName the task name
+        * @param info additional information, e.g. the field value
+        * @param cause the cause
+        */
+       public BadInjectedFieldException(String fieldName,
+                       String taskName, Object info, Throwable cause) {
+                       super(taskName + " injected field '" + fieldName + "' is bad: "
+                                       + info, cause);
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/BaseTask.java
new file mode 100644 (file)
index 0000000..849c8ba
--- /dev/null
@@ -0,0 +1,529 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+
+/**
+ * Base class for service tasks.
+ */
+public abstract class BaseTask implements JavaDelegate {
+
+       /**
+        * Get the value of a required field.  This method throws
+        * MissingInjectedFieldException if the expression is null, and
+        * BadInjectedFieldException if the expression evaluates to a null
+        * value.
+        *
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the field value
+        */
+       protected Object getField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               return getFieldImpl(expression, execution, fieldName, false);
+       }
+       
+       /**
+        * Gets the value of an optional field.  There are three conditions
+        * in which this method returns null:
+        * <p>
+        * <ol>
+        * <li> The expression itself is null (i.e. the field is missing
+        * altogether.</li>
+        * <li>The expression evaluates to a null value.</li>
+        * <li>The expression references a single variable which has not
+        * been set.</li>
+        * </ol>
+        * <p>
+        * Examples:<br>
+        * Expression ${x} when x is null: return null<br>
+        * Expression ${x} when x is unset: return null<br>
+        * Expression ${x+y} when x and/or y are unset: exception<br>
+        * 
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the field value, possibly null
+        */
+       protected Object getOptionalField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               return getFieldImpl(expression, execution, fieldName, true);
+       }
+       
+       /**
+        * Get the value of a required output variable field. This method
+        * throws MissingInjectedFieldException if the expression is null, and
+        * BadInjectedFieldException if the expression produces a null or
+        * illegal variable name.  Legal variable names contain only letters,
+        * numbers, and the underscore character ('_').
+        *
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the output variable name
+        */
+       protected String getOutputField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               Object o = getFieldImpl(expression, execution, fieldName, false);
+               if (o instanceof String) {
+                       String variable = (String) o;
+                       if (!isLegalVariable(variable)) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), "'" + variable
+                                               + "' is not a legal variable name");
+                       }
+                       return variable;
+               } else {
+                       throw new BadInjectedFieldException(
+                               fieldName, getTaskName(), "expected a variable name string"
+                                       + ", got object of type " + o.getClass().getName());
+               }
+       }
+       
+       /**
+        * Get the value of an optional output variable field. This method
+        * throws BadInjectedFieldException if the expression produces an illegal
+        * variable name.  Legal variable names contain only letters, numbers,
+        * and the underscore character ('_').
+        * 
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the output variable name, possibly null
+        */
+       protected String getOptionalOutputField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               Object o = getFieldImpl(expression, execution, fieldName, true);
+               if (o instanceof String) {
+                       String variable = (String) o;
+                       if (!isLegalVariable(variable)) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), "'" + variable
+                                               + "' is not a legal variable name");
+                       }
+                       return variable;
+               } else if (o == null) {
+                       return null;
+               } else {
+                       throw new BadInjectedFieldException(
+                               fieldName, getTaskName(), "expected a variable name string"
+                                       + ", got object of type " + o.getClass().getName());
+               }
+       }
+
+       /**
+        * Get the value of a required string field.  This method throws
+        * MissingInjectedFieldException if the expression is null, and
+        * BadInjectedFieldException if the expression evaluates to a null
+        * value.
+        * <p>
+        * Note: the result is coerced to a string value, if necessary.
+        *
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the field value
+        */
+       protected String getStringField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               Object o = getFieldImpl(expression, execution, fieldName, false);
+               if (o instanceof String) {
+                       return (String) o;
+               } else {
+                       throw new BadInjectedFieldException(
+                               fieldName, getTaskName(), "cannot convert '" + o.toString()
+                               + "' to Integer");
+               }
+       }
+       
+       /**
+        * Gets the value of an optional string field.  There are three conditions
+        * in which this method returns null:
+        * <p>
+        * <ol>
+        * <li> The expression itself is null (i.e. the field is missing
+        * altogether.</li>
+        * <li>The expression evaluates to a null value.</li>
+        * <li>The expression references a single variable which has not
+        * been set.</li>
+        * </ol>
+        * <p>
+        * Examples:<br>
+        * Expression ${x} when x is null: return null<br>
+        * Expression ${x} when x is unset: return null<br>
+        * Expression ${x+y} when x and/or y are unset: exception<br>
+        * <p>
+        * Note: the result is coerced to a string value, if necessary.
+        * 
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the field value, possibly null
+        */
+       protected String getOptionalStringField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               Object o = getFieldImpl(expression, execution, fieldName, true);
+               if (o instanceof String) {
+                       return (String) o;
+               } else if (o == null) {
+                       return null;
+               } else {
+                       return o.toString();
+               }
+       }
+       
+       /**
+        * Get the value of a required integer field. This method throws
+        * MissingInjectedFieldException if the expression is null, and
+        * BadInjectedFieldException if the expression evaluates to a null
+        * value or a value that cannot be coerced to an integer.
+        *
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the field value
+        */
+       protected Integer getIntegerField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               Object o = getFieldImpl(expression, execution, fieldName, false);
+               if (o instanceof Integer) {
+                       return (Integer) o;
+               } else {
+                       try {
+                               return Integer.parseInt(o.toString());
+                       } catch (NumberFormatException e) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), "cannot convert '" + o.toString()
+                                       + "' to Integer");
+                       }
+               }
+       }
+       
+       /**
+        * Gets the value of an optional integer field.  There are three conditions
+        * in which this method returns null:
+        * <p>
+        * <ol>
+        * <li> The expression itself is null (i.e. the field is missing
+        * altogether.</li>
+        * <li>The expression evaluates to a null value.</li>
+        * <li>The expression references a single variable which has not
+        * been set.</li>
+        * </ol>
+        * <p>
+        * Examples:<br>
+        * Expression ${x} when x is null: return null<br>
+        * Expression ${x} when x is unset: return null<br>
+        * Expression ${x+y} when x and/or y are unset: exception<br>
+        * <p>
+        * Note: the result is coerced to an integer value, if necessary. This
+        * method throws BadInjectedFieldException if the result cannot be coerced
+        * to an integer.
+        * 
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the field value, possibly null
+        */
+       protected Integer getOptionalIntegerField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               Object o = getFieldImpl(expression, execution, fieldName, true);
+               if (o instanceof Integer) {
+                       return (Integer) o;
+               } else if (o == null) {
+                       return null;
+               } else {
+                       try {
+                               return Integer.parseInt(o.toString());
+                       } catch (NumberFormatException e) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), "cannot convert '" + o.toString()
+                                       + "' to Integer");
+                       }
+               }
+       }
+       
+       /**
+        * Gets the value of an optional long field.  There are three conditions
+        * in which this method returns null:
+        * <p>
+        * <ol>
+        * <li> The expression itself is null (i.e. the field is missing
+        * altogether.</li>
+        * <li>The expression evaluates to a null value.</li>
+        * <li>The expression references a single variable which has not
+        * been set.</li>
+        * </ol>
+        * <p>
+        * Examples:<br>
+        * Expression ${x} when x is null: return null<br>
+        * Expression ${x} when x is unset: return null<br>
+        * Expression ${x+y} when x and/or y are unset: exception<br>
+        * <p>
+        * Note: the result is coerced to a long value, if necessary. This
+        * method throws BadInjectedFieldException if the result cannot be coerced
+        * to a long.
+        * 
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the field value, possibly null
+        */
+       protected Long getOptionalLongField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               Object o = getFieldImpl(expression, execution, fieldName, true);
+               if (o instanceof Long) {
+                       return (Long) o;
+               } else if (o == null) {
+                       return null;
+               } else {
+                       try {
+                               return Long.parseLong(o.toString());
+                       } catch (NumberFormatException e) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), "cannot convert '" + o.toString()
+                                       + "' to Long");
+                       }
+               }
+       }
+       
+       /**
+        * Get the value of a required long field. This method throws
+        * MissingInjectedFieldException if the expression is null, and
+        * BadInjectedFieldException if the expression evaluates to a null
+        * value or a value that cannot be coerced to a long.
+        *
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @return the field value
+        */
+       protected Long getLongField(Expression expression,
+                       DelegateExecution execution, String fieldName) {
+               Object o = getFieldImpl(expression, execution, fieldName, false);
+               if (o instanceof Long) {
+                       return (Long) o;
+               } else {
+                       try {
+                               return Long.parseLong(o.toString());
+                       } catch (NumberFormatException e) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), "cannot convert '" + o.toString()
+                                       + "' to Long");
+                       }
+               }
+       }
+
+       /**
+        * Common implementation for field "getter" methods.
+        * @param expression the expression
+        * @param execution the execution
+        * @param fieldName the field name (for logging and exceptions)
+        * @param optional true if the field is optional
+        * @return the field value, possibly null
+        */
+       private Object getFieldImpl(Expression expression,
+                       DelegateExecution execution, String fieldName, boolean optional) {
+               if (expression == null) {
+                       if (!optional) {
+                               throw new MissingInjectedFieldException(
+                                       fieldName, getTaskName());
+                       }
+                       return null;
+               }
+
+               Object value;
+
+               try {
+                       value = expression.getValue(execution);
+               } catch (Exception e) {
+                       if (!optional) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+                       }
+
+                       // At this point, we have an exception that occurred while
+                       // evaluating an expression for an optional field. A common 
+                       // problem is that the expression is a simple reference to a
+                       // variable which has never been set, e.g. the expression is
+                       // ${x}. The normal activiti behavior is to throw an exception,
+                       // but we don't like that, so we have the following workaround,
+                       // which parses the expression text to see if it is a "simple"
+                       // variable reference, and if so, returns null.  If the
+                       // expression is anything other than a single variable
+                       // reference, then an exception is thrown, as it would have
+                       // been without this workaround.
+
+                       // Get the expression text so we can parse it
+                       String s = expression.getExpressionText();
+
+//                     if (isDebugEnabled(execution)) {
+//                             logDebug(execution, getTaskName() + " field '" + fieldName
+//                                     + "' expression evaluation failed: " + s);
+//                     }
+
+                       int len = s.length();
+                       int i = 0;
+
+                       // Skip whitespace
+                       while (i < len && Character.isWhitespace(s.charAt(i))) {
+                               i++;
+                       }
+
+                       // Next character must be '$'
+                       if (i == len || s.charAt(i++) != '$') {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+                       }
+
+                       // Skip whitespace
+                       while (i < len && Character.isWhitespace(s.charAt(i))) {
+                               i++;
+                       }
+
+                       // Next character must be '{'
+                       if (i == len || s.charAt(i++) != '{') {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+                       }
+
+                       // Skip whitespace
+                       while (i < len && Character.isWhitespace(s.charAt(i))) {
+                               i++;
+                       }
+
+                       // Collect the variable name
+                       StringBuilder variable = new StringBuilder();
+                       while (i < len && isWordCharacter(s.charAt(i))) {
+                               variable.append(s.charAt(i));
+                               i++;
+                       }
+
+                       if (variable.length() == 0) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+                       }
+
+                       // Skip whitespace
+                       while (i < len && Character.isWhitespace(s.charAt(i))) {
+                               i++;
+                       }
+
+                       // Next character must be '}'
+                       if (i == len || s.charAt(i++) != '}') {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+                       }
+
+                       // Skip whitespace
+                       while (i < len && Character.isWhitespace(s.charAt(i))) {
+                               i++;
+                       }
+
+                       // Must be at end of string
+                       if (i != len) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+                       }
+
+//                     if (isDebugEnabled(execution)) {
+//                             logDebug(execution, "Checking if variable '"
+//                                     + variable.toString() + "' exists");
+//                     }
+
+                       // If the variable exists then the problem was
+                       // something else...
+                       if (execution.hasVariable(variable.toString())) {
+                               throw new BadInjectedFieldException(
+                                       fieldName, getTaskName(), e.getClass().getSimpleName(), e);
+                       }
+
+                       // The variable doesn't exist.
+
+//                     if (isDebugEnabled(execution)) {
+//                             logDebug(execution, "Variable '" + variable.toString()
+//                                     + "' does not exist [ok]");
+//                     }
+
+                       value = null;
+               }
+
+               if (value == null && !optional) {
+                       throw new BadInjectedFieldException(
+                               fieldName, getTaskName(), "required field has null value");
+               }
+       
+               return value;
+       }
+       
+       /**
+        * Tests if a character is a "word" character.
+        * @param c the character
+        * @return true if the character is a "word" character.
+        */
+       private boolean isWordCharacter(char c) {
+               return (Character.isLetterOrDigit(c) || c == '_');
+       }
+       
+       /**
+        * Tests if the specified string is a legal flow variable name.
+        * @param name the string
+        * @return true if the string is a legal flow variable name
+        */
+       private boolean isLegalVariable(String name) {
+               if (name == null) {
+                       return false;
+               }
+
+               int len = name.length();
+
+               if (len == 0) {
+                       return false;
+               }
+
+               char c = name.charAt(0);
+
+               if (!Character.isLetter(c) && c != '_') {
+                       return false;
+               }
+
+               for (int i = 1; i < len; i++) {
+                       c = name.charAt(i);
+                       if (!Character.isLetterOrDigit(c) && c != '_') {
+                               return false;
+                       }
+               }
+
+               return true;
+       }
+       
+       /**
+        * Returns the name of the task (normally the java class name).
+        * @return the name of the task
+        */
+       public String getTaskName() {
+               return getClass().getSimpleName();
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
new file mode 100644 (file)
index 0000000..df62132
--- /dev/null
@@ -0,0 +1,203 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+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.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.util.Map;
+import java.util.UUID;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+
+import org.camunda.bpm.engine.ProcessEngines;
+
+@Path("/")
+public class HealthCheckHandler  {
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+    private static final String SITENAME = "mso.sitename";
+    private static final String ADPTER_ENDPOINT = "mso.adapters.db.endpoint";
+    private static final String CONFIG = "mso.bpmn.urn.properties";
+
+    private static final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
+    private static final String NOT_FOUND = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not started. Properties file missing or invalid or database Connection failed</body></html>";
+    private static final String NOT_HEALTHY = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not available or at least one of the sub-modules is not available.</body></html>";
+    public static final Response HEALTH_CHECK_RESPONSE = Response.status (HttpStatus.SC_OK)
+            .entity (CHECK_HTML)
+            .build ();
+    public static final Response HEALTH_CHECK_NOK_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+            .entity (NOT_HEALTHY)
+            .  build ();
+    public static final Response NOT_STARTED_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+            .entity (NOT_FOUND)
+            .build ();
+
+    @HEAD
+    @GET
+    @Path("/healthcheck")
+    @Produces("text/html")
+    public Response healthcheck (@QueryParam("requestId") String requestId) {
+        MsoLogger.setServiceName ("Healthcheck");
+        verifyOldUUID(requestId);
+
+        PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+        Map<String,String> props = propertyConfiguration.getProperties(CONFIG);
+
+        if (props == null) {
+
+            msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),  MsoLogger.ErrorCode.AvailabilityError, "Unable to load " + CONFIG);
+
+            return NOT_STARTED_RESPONSE;
+        }
+
+        String siteName = props.get(SITENAME);
+        String endpoint = props.get(ADPTER_ENDPOINT);
+
+        if (null == siteName || siteName.length () == 0 || null == endpoint || endpoint.length () == 0) {
+
+            msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, "Unable to load key attributes (" + SITENAME + " or " + ADPTER_ENDPOINT + ") from the config file:" + CONFIG);
+
+            return NOT_STARTED_RESPONSE;
+        }
+
+        try {
+            if (!this.getSiteStatus (endpoint, siteName)) {
+                msoLogger.debug("This site is currently disabled for maintenance.");
+                return HEALTH_CHECK_NOK_RESPONSE;
+            }
+        } catch (Exception e) {
+
+            msoLogger.error(MessageEnum.GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception while getting SiteStatus", e);
+
+            msoLogger.debug("Exception while getting SiteStatus");
+            return NOT_STARTED_RESPONSE;
+        }
+
+        try {
+            ProcessEngines.getDefaultProcessEngine().getIdentityService().createGroupQuery().list();
+        } catch (final Exception e) {
+
+            msoLogger.error(MessageEnum.GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "Exception while verifying Camunda engine", e);
+
+            msoLogger.debug("Exception while verifying Camunda engine");
+            return NOT_STARTED_RESPONSE;
+        }
+
+        return HEALTH_CHECK_RESPONSE;
+    }
+
+
+    private String verifyOldUUID (String oldId) {
+        if (!isValidUUID(oldId)) {
+            String newId = UUID.randomUUID().toString();
+            MsoLogger.setLogContext(newId, null);
+            return newId;
+        }
+        MsoLogger.setLogContext(oldId, null);
+        return oldId;
+    }
+
+
+    private boolean isValidUUID (String id) {
+        try {
+            if (null == id) {
+                return false;
+            }
+            UUID uuid = UUID.fromString(id);
+            return uuid.toString().equalsIgnoreCase(id);
+        } catch (IllegalArgumentException iae) {
+            return false;
+        }
+    }
+
+    private boolean getSiteStatus (String url, String site) throws Exception {
+        HttpResponse response;
+        // set the connection timeout value to 30 seconds (30000 milliseconds)
+        RequestConfig.Builder requestBuilder = RequestConfig.custom();
+        requestBuilder = requestBuilder.setConnectTimeout(30000);
+        requestBuilder = requestBuilder.setConnectionRequestTimeout(30000);
+        HttpClientBuilder builder = HttpClientBuilder.create ();
+        builder.setDefaultRequestConfig (requestBuilder.build ());
+
+        HttpPost post = new HttpPost(url);
+        msoLogger.debug("Post url is: " + url);
+
+        //now create a soap request message as follows:
+        final StringBuffer payload = new StringBuffer();
+        payload.append("\n");
+        payload.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"http://com.att.mso/requestsdb\">\n");
+        payload.append("<soapenv:Header/>\n");
+        payload.append("<soapenv:Body>\n");
+        payload.append("<req:getSiteStatus>\n");
+        payload.append("<siteName>" + site + "</siteName>\n");
+        payload.append("</req:getSiteStatus>\n");
+        payload.append("</soapenv:Body>\n");
+        payload.append("</soapenv:Envelope>\n");
+
+        msoLogger.debug ("Initialize SOAP request to url:" + url);
+        msoLogger.debug ("The payload of the request is:" + payload);
+        HttpEntity entity = new StringEntity(payload.toString(),"UTF-8");
+        post.setEntity(entity);
+
+        try (CloseableHttpClient client = builder.build()) {
+            response = client.execute(post);
+            msoLogger.debug("Response received is:" + response);
+
+            int statusCode = response.getStatusLine().getStatusCode();
+            if (statusCode != 200) {
+
+                msoLogger.error(MessageEnum.GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError,
+                        "Communication with DB Adapter failed, The response received from DB Adapter is with failed status code:" + statusCode);
+
+                Exception e = new Exception("Communication with DB Adapter failed");
+                throw e;
+            }
+            BufferedReader rd = new BufferedReader(
+                    new InputStreamReader(response.getEntity().getContent()));
+
+            StringBuffer result = new StringBuffer();
+            String line = "";
+            while ((line = rd.readLine()) != null) {
+                result.append(line);
+            }
+            msoLogger.debug("Content of the response is:" + result);
+            String status = result.substring(result.indexOf("<return>") + 8, result.indexOf("</return>"));
+
+            return Boolean.valueOf(status);
+        }
+    }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/LogTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/LogTask.java
new file mode 100644 (file)
index 0000000..41033d9
--- /dev/null
@@ -0,0 +1,98 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Logs a text message.  The text may contain variable references.
+ * For example:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;name=$name, address=$address
+ * <p>
+ * Required fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;text: The text to log<br/>
+ * Optional fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;level: The log level (TRACE, DEBUG, INFO, WARN, ERROR)<br/>
+ */
+public class LogTask extends BaseTask {
+       
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger();
+
+       private Expression text;
+       private Expression level;
+       
+       public void execute(DelegateExecution execution) throws Exception {
+               String theText = getStringField(text, execution, "text");
+                               
+
+               
+                       StringBuilder out = new StringBuilder();
+                       StringBuilder var = new StringBuilder();
+                       boolean inVar = false;
+
+                       int pos = 0;
+                       int len = theText.length();
+
+                       while (pos < len) {
+                               char c = theText.charAt(pos++);
+
+                               if (inVar && !Character.isLetterOrDigit(c) && c != '_') {
+                                       if (var.length() > 0) {
+                                               Object value = execution.getVariable(var.toString());
+
+                                               if (value != null) {
+                                                       out.append(value.toString());
+                                               }
+
+                                               var.setLength(0);
+                                       }
+
+                                       inVar = false;
+                               }
+
+                               if (c == '$') {
+                                       inVar = true;
+                               } else {
+                                       if (inVar) {
+                                               var.append(c);
+                                       } else {
+                                               out.append(c);
+                                       }
+                               }
+                       }
+
+                       if (inVar && var.length() > 0) {
+                               Object value = execution.getVariable(var.toString());
+                               if (value != null) {
+                                       out.append(value.toString());
+                               }
+                       }
+
+                       
+               
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldException.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldException.java
new file mode 100644 (file)
index 0000000..589a111
--- /dev/null
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+/**
+ * A BadInjectedFieldException that indicates a required field is missing.
+ */
+public class MissingInjectedFieldException extends BadInjectedFieldException {
+
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Constructor.
+        *
+        * @param fieldName the field name
+        * @param taskName the task name
+        */
+       public MissingInjectedFieldException(String fieldName, String taskName) {
+                       super(fieldName, taskName, "missing required field");
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
new file mode 100644 (file)
index 0000000..90df1da
--- /dev/null
@@ -0,0 +1,440 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.file.ClosedWatchServiceException;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.slf4j.MDC;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Loads the property configuration from file system and refreshes the
+ * properties when the property gets changed.
+ * 
+ * WARNING: automatic refreshes might not work on network filesystems.
+ */
+public class PropertyConfiguration {
+       
+       /**
+        * The base name of the MSO BPMN properties file (mso.bpmn.properties).
+        */
+       public static final String MSO_BPMN_PROPERTIES = "mso.bpmn.properties";
+
+       /**
+        * The base name of the MSO BPMN URN-Mappings properties file (mso.bpmn.urn.properties).
+        */
+       public static final String MSO_BPMN_URN_PROPERTIES = "mso.bpmn.urn.properties";
+       
+       /**
+        * The name of the meta-property holding the time the properties were loaded
+        * from the file.
+        */
+       public static final String TIMESTAMP_PROPERTY = "mso.properties.timestamp";
+
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+       private static final List<String> SUPPORTED_FILES =
+               Arrays.asList(MSO_BPMN_PROPERTIES, MSO_BPMN_URN_PROPERTIES);
+
+       private volatile String msoConfigPath = null;
+
+       private final ConcurrentHashMap<String, Map<String, String>> propFileCache =
+               new ConcurrentHashMap<String, Map<String, String>>();
+
+       private final Object CACHELOCK = new Object();
+       private FileWatcherThread fileWatcherThread = null;
+
+       // The key is the file name
+       private Map<String, TimerTask> timerTaskMap = new HashMap<String, TimerTask>();
+       
+       /**
+        * Singleton holder pattern eliminates locking when accessing the instance
+        * and still provides for lazy initialization.
+        */
+       private static class PropertyConfigurationInstanceHolder {
+               private static PropertyConfiguration instance = new PropertyConfiguration();
+       }
+
+       /**
+        * Gets the one and only instance of this class.
+        */
+       public static PropertyConfiguration getInstance() {
+               return PropertyConfigurationInstanceHolder.instance;
+       }
+
+       /**
+        * Returns the list of supported files.
+        */
+       public static List<String> supportedFiles() {
+               return new ArrayList<String>(SUPPORTED_FILES);
+       }
+
+       /**
+        * Private Constructor.
+        */
+       private PropertyConfiguration() {
+               startUp();
+       }
+       
+       /**
+        * May be called to restart the PropertyConfiguration if it was previously shut down.
+        */
+       public synchronized void startUp() {
+               msoConfigPath = System.getProperty("mso.config.path");
+
+               if (msoConfigPath == null) {
+                       LOGGER.debug("mso.config.path JVM system property is not set");
+                       return;
+               }
+
+               try {
+                       Path directory = FileSystems.getDefault().getPath(msoConfigPath);
+                       WatchService watchService = FileSystems.getDefault().newWatchService();
+                       directory.register(watchService, ENTRY_MODIFY);
+
+                       LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN", "Starting FileWatcherThread");
+                       LOGGER.debug("Starting FileWatcherThread");
+                       fileWatcherThread = new FileWatcherThread(watchService);
+                       fileWatcherThread.start();
+               } catch (Exception e) {
+                       LOGGER.debug("Error occurred while starting FileWatcherThread:", e);
+                       LOGGER.error(
+                               MessageEnum.BPMN_GENERAL_EXCEPTION,
+                               "BPMN",
+                               "Property Configuration",
+                               MsoLogger.ErrorCode.UnknownError,
+                               "Error occurred while starting FileWatcherThread:" + e);
+               }
+       }
+
+       /**
+        * May be called to shut down the PropertyConfiguration.  A shutDown followed
+        * by a startUp will reset the PropertyConfiguration to its initial state.
+        */
+       public synchronized void shutDown() {
+               if (fileWatcherThread != null) {
+                       LOGGER.debug("Shutting down FileWatcherThread " + System.identityHashCode(fileWatcherThread));
+                       fileWatcherThread.shutdown();
+
+                       long waitInSeconds = 10;
+
+                       try {
+                               fileWatcherThread.join(waitInSeconds * 1000);
+                       } catch (InterruptedException e) {
+                               LOGGER.debug("FileWatcherThread " + System.identityHashCode(fileWatcherThread)
+                                       + " shutdown did not occur within " + waitInSeconds + " seconds");
+                       }
+
+                       LOGGER.debug("Finished shutting down FileWatcherThread " + System.identityHashCode(fileWatcherThread));
+                       fileWatcherThread = null;
+               }
+
+               clearCache();
+               msoConfigPath = null;
+       }
+
+       public synchronized boolean isFileWatcherRunning() {
+               return fileWatcherThread != null;
+       }
+
+       public void clearCache() {
+               synchronized(CACHELOCK) {
+                       propFileCache.clear();
+               }
+       }
+
+       public int cacheSize() {
+               return propFileCache.size();
+       }
+
+       // TODO: throw IOException?
+       public Map<String, String> getProperties(String fileName) {
+               Map<String, String> properties = propFileCache.get(fileName);
+
+               if (properties == null) {
+                       if (!SUPPORTED_FILES.contains(fileName)) {
+                               throw new IllegalArgumentException("Not a supported property file: " + fileName);
+                       }
+
+                       if (msoConfigPath == null) {
+                               LOGGER.debug("mso.config.path JVM system property must be set to load " + fileName);
+
+                               LOGGER.error(
+                                               MessageEnum.BPMN_GENERAL_EXCEPTION,
+                                               "BPMN",
+                                               MDC.get(fileName),
+                                               MsoLogger.ErrorCode.UnknownError,
+                                               "mso.config.path JVM system property must be set to load " + fileName);
+
+                               return null;
+                       }
+
+                       try {
+                               properties = readProperties(new File(msoConfigPath, fileName));
+                       } catch (Exception e) {
+                               LOGGER.debug("Error loading " + fileName);
+
+                               LOGGER.error(
+                                               MessageEnum.BPMN_GENERAL_EXCEPTION,
+                                               "BPMN",
+                                               MDC.get(fileName),
+                                               MsoLogger.ErrorCode.UnknownError,
+                                               "Error loading " + fileName, e);
+
+                               return null;
+                       }
+               }
+
+               return Collections.unmodifiableMap(properties);
+       }
+       
+       /**
+        * Reads properties from the specified file, updates the property file cache, and
+        * returns the properties in a map.
+        * @param file the file to read
+        * @param reload true if this is a reload event
+        * @return a map of properties
+        */
+       private Map<String, String> readProperties(File file) throws IOException {
+               String fileName = file.getName();
+               LOGGER.debug("Reading " + fileName);
+
+               Map<String, String> properties = new HashMap<String, String>();
+               Properties newProperties = new Properties();
+
+               FileReader reader = null;
+               try {
+                       reader = new FileReader(file);
+                       newProperties.load(reader);
+               } finally {
+                       if (reader != null) {
+                               try {
+                                       reader.close();
+                                       LOGGER.debug("Closed " + fileName);
+                               } catch (Exception e) {
+                                       // Ignore
+                               }
+                       }
+               }
+
+               for (Entry<Object, Object> entry : newProperties.entrySet()) {
+                       properties.put(entry.getKey().toString(), entry.getValue().toString());
+               }
+
+               properties.put(TIMESTAMP_PROPERTY, String.valueOf(System.currentTimeMillis()));
+
+               synchronized(CACHELOCK) {
+                       propFileCache.put(fileName, properties);
+               }
+
+               return properties;
+       }
+       
+       /**
+        * File watcher thread which monitors a directory for file modification.
+        */
+       private class FileWatcherThread extends Thread {
+               private final WatchService watchService;
+               private final Timer timer = new Timer("FileWatcherTimer");
+
+               public FileWatcherThread(WatchService service) {
+                       this.watchService = service;
+               }
+
+               public void shutdown() {
+                       interrupt();
+               }
+
+               public void run() {
+                       LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN",
+                               "FileWatcherThread started");
+
+                       LOGGER.debug("Started FileWatcherThread " + System.identityHashCode(fileWatcherThread));
+
+                       try {
+                               WatchKey watchKey = null;
+
+                               while (!isInterrupted()) {
+                                       try {
+                                               if (watchKey != null) {
+                                                       watchKey.reset();
+                                               }
+
+                                               watchKey = watchService.take();
+
+                                               for (WatchEvent<?> event : watchKey.pollEvents()) {
+                                                       @SuppressWarnings("unchecked")
+                                                       WatchEvent<Path> pathEvent = (WatchEvent<Path>) event;
+
+                                                       if ("EVENT_OVERFLOW".equals(pathEvent.kind())) {
+                                                               LOGGER.debug("Ignored overflow event for " + msoConfigPath);
+                                                               continue;
+                                                       }
+
+                                                       String fileName = pathEvent.context().getFileName().toString();
+
+                                                       if (!SUPPORTED_FILES.contains(fileName)) {
+                                                               LOGGER.debug("Ignored modify event for " + fileName);
+                                                               continue;
+                                                       }
+
+                                                       LOGGER.debug("Configuration file has changed: " + fileName);
+
+                                                       LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN",
+                                                                       "Configuation file has changed: " + fileName);
+
+                                                       // There's a potential problem here. The MODIFY event is
+                                                       // triggered as soon as somebody starts writing the file but
+                                                       // there's no obvious way to know when the write is done.  If we
+                                                       // read the file while the write is still in progress, then the
+                                                       // cache can really be messed up. As a workaround, we use a timer
+                                                       // to sleep for at least one second, and then we sleep for as long
+                                                       // as it takes for the file's lastModified time to stop changing.
+                                                       // The timer has another benefit: it consolidates multiple events
+                                                       // that we seem to receive when a file is modified.
+
+                                                       synchronized(timerTaskMap) {
+                                                               TimerTask task = timerTaskMap.get(fileName);
+
+                                                               if (task != null) {
+                                                                       task.cancel();
+                                                               }
+
+                                                               File file = new File(msoConfigPath, fileName);
+                                                               task = new DelayTimerTask(timer, file, 1000);
+                                                               timerTaskMap.put(fileName, task);
+                                                       }
+                                               }
+                                       } catch (InterruptedException e) {
+                                               break;
+                                       } catch (ClosedWatchServiceException e) {
+                                               LOGGER.info(
+                                                               MessageEnum.BPMN_GENERAL_INFO,
+                                                               "BPMN",
+                                                               "FileWatcherThread shut down because the watch service was closed");
+                                               break;
+                                       } catch (Exception e) {
+                                               LOGGER.error(
+                                                               MessageEnum.BPMN_GENERAL_EXCEPTION,
+                                                               "BPMN",
+                                                               "Property Configuration",
+                                                               MsoLogger.ErrorCode.UnknownError,
+                                                               "FileWatcherThread caught unexpected " + e.getClass().getSimpleName(), e);
+                                       }
+
+                               }
+                       } finally {
+                               timer.cancel();
+
+                               synchronized(timerTaskMap) {
+                                       timerTaskMap.clear();
+                               }
+
+                               try {
+                                       watchService.close();
+                               } catch (IOException e) {
+                                       LOGGER.debug("FileWatcherThread caught " + e.getClass().getSimpleName()
+                                               + " while closing the watch service");
+                               }
+
+                               LOGGER.info(MessageEnum.BPMN_GENERAL_INFO, "BPMN",
+                                       "FileWatcherThread stopped");
+                       }
+               }
+       }
+
+       private class DelayTimerTask extends TimerTask {
+               private final File file;
+               private final long lastModifiedTime;
+               private final Timer timer;
+
+               public DelayTimerTask(Timer timer, File file, long delay) {
+                       this.timer = timer;
+                       this.file = file;
+                       this.lastModifiedTime = file.lastModified();
+                       timer.schedule(this, delay);
+               }
+
+               @Override
+               public void run() {
+                       try {
+                               long newLastModifiedTime = file.lastModified();
+
+                               if (newLastModifiedTime == lastModifiedTime) {
+                                       try {
+                                               readProperties(file);
+                                       } catch (Exception e) {
+                                               LOGGER.error(
+                                                       MessageEnum.BPMN_GENERAL_EXCEPTION,
+                                                       "BPMN",
+                                                       "Property Configuration",
+                                                       MsoLogger.ErrorCode.UnknownError,
+                                                       "Unable to reload " + file, e);
+                                       }
+                               } else {
+                                       LOGGER.debug("Delaying reload of " + file + " by 1 second");
+
+                                       synchronized(timerTaskMap) {
+                                               TimerTask task = timerTaskMap.get(file.getName());
+
+                                               if (task != null && task != this) {
+                                                       task.cancel();
+                                               }
+
+                                               task = new DelayTimerTask(timer, file, 1000);
+                                               timerTaskMap.put(file.getName(), task);
+                                       }
+                               }
+                       } finally {
+                               synchronized(timerTaskMap) {
+                                       TimerTask task = timerTaskMap.get(file.getName());
+
+                                       if (task == this) {
+                                               timerTaskMap.remove(file.getName());
+                                       }
+                               }
+                       }
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadConfigTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadConfigTask.java
new file mode 100644 (file)
index 0000000..b46ffcd
--- /dev/null
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Reads the contents of a resource file as a string and stores it in an
+ * execution variable.
+ * <p>
+ * Required fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;file: the resource file path<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;outputVariable: the output variable name<br/>
+ */
+public class ReadConfigTask extends BaseTask {
+       
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       private static Properties properties = null;
+
+       private Expression propertiesFile;
+
+       public void execute(DelegateExecution execution) throws Exception {
+               if (msoLogger.isDebugEnabled()) {
+                       msoLogger.debug("Started Executing " + getTaskName());
+               }
+
+               String thePropertiesFile =
+                       getStringField(propertiesFile, execution, "propertiesFile");
+
+               if (msoLogger.isDebugEnabled()) {
+                       msoLogger.debug("propertiesFile = " + thePropertiesFile);
+               }
+
+               Boolean shouldFail = (Boolean) execution.getVariable("shouldFail");
+
+               if (shouldFail != null && shouldFail) {
+                       throw new ProcessEngineException(getClass().getSimpleName() + " Failed");
+               }
+
+               synchronized (ReadConfigTask.class) {
+                       if (properties == null) {
+                               properties = new Properties();
+
+                               InputStream stream = null;
+
+                               try {
+                                       stream = getClass().getResourceAsStream(thePropertiesFile);
+
+                                       if (stream == null) {
+                                               throw new IOException("Resource not found: " + thePropertiesFile);
+                                       }
+
+                                       properties.load(stream);
+
+                                       stream.close();
+                                       stream = null;
+
+                               } finally {
+                                       if (stream != null) {
+                                               try {
+                                                       stream.close();
+                                               } catch (Exception e) {
+                                                       // Do nothing
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               for (Object objectKey : properties.keySet()) {
+                       String key = (String) objectKey;
+                       String value = properties.getProperty(key);
+
+                       if (msoLogger.isDebugEnabled()) {
+                               msoLogger.debug("Setting variable '" + key + "' to '" + value + "'");
+                       }
+
+                       execution.setVariable(key, value);
+               }
+
+               if (msoLogger.isDebugEnabled()) {
+                       msoLogger.debug("Done Executing " + getTaskName());
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadFileTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ReadFileTask.java
new file mode 100644 (file)
index 0000000..389fdc0
--- /dev/null
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Conditionally reads the contents of a resource file as a string and stores it
+ * in an execution variable.  The file is read only if the value of the input
+ * variable is null.
+ * <p>
+ * Required fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;file: the resource file path<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;inputVariable: the input variable name<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;outputVariable: the output variable name<br/>
+ */
+public class ReadFileTask extends BaseTask {
+       
+       private Expression file;
+       private Expression inputVariable;
+       private Expression outputVariable;
+       
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+       public void execute(DelegateExecution execution) throws Exception {
+               if (msoLogger.isDebugEnabled()) {
+                       msoLogger.debug("Started Executing " + getTaskName());
+               }
+
+               String theInputVariable =
+                       getStringField(inputVariable, execution, "inputVariable");
+               String theOutputVariable =
+                       getOutputField(outputVariable, execution, "outputVariable");
+               String theFile =getStringField(file, execution, "file");
+
+               if (msoLogger.isDebugEnabled()) {
+                       msoLogger.debug("inputVariable = " + theInputVariable
+                               + " outputVariable = " + theOutputVariable
+                               + "file = " + theFile);
+               }
+
+               Boolean shouldFail = (Boolean) execution.getVariable("shouldFail");
+
+               if (shouldFail != null && shouldFail) {
+                       throw new ProcessEngineException(getClass().getSimpleName() + " Failed");
+               }
+
+               Object value = execution.getVariable(theInputVariable);
+
+               if (value == null) {
+                       InputStream xmlStream = null;
+
+                       try {
+                               xmlStream = getClass().getResourceAsStream(theFile);
+
+                               if (xmlStream == null) {
+                                       throw new IOException("Resource not found: " + theFile);
+                               }
+
+                               BufferedReader reader = new BufferedReader(new InputStreamReader(xmlStream));
+                               StringBuilder output = new StringBuilder();
+                               String line;
+
+                               while ((line = reader.readLine()) != null) {
+                                       output.append(line);
+                               }
+
+                               xmlStream.close();
+                               xmlStream = null;
+
+                               value = output.toString();
+
+                       } finally {
+                               if (xmlStream != null) {
+                                       try {
+                                               xmlStream.close();
+                                       } catch (Exception e) {
+                                               // Do nothing
+                                       }
+                               }
+                       }
+               }
+               execution.setVariable(theInputVariable, value);
+               execution.setVariable(theOutputVariable, value);
+               System.out.println("ServiceInput - " + execution.getVariable("gServiceInput"));
+               if (msoLogger.isDebugEnabled()) {
+                       msoLogger.debug("Done Executing " + getTaskName());
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ResponseBuilder.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/ResponseBuilder.java
new file mode 100644 (file)
index 0000000..632933d
--- /dev/null
@@ -0,0 +1,297 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+
+/**
+ * Used in the output variable mapping configuration of subflow call activity
+ * tasks to normalize subflow responses.  The output mapping is normally set up
+ * as follows.  Note that the order of these mappings is important!
+ * <p>
+ * OUTPUT MAPPING
+ * <pre>
+ *   SOURCE EXPRESSION                                      TARGET
+ *   ${ResponseBuilder.buildWorkflowException(execution)}   WorkflowException
+ *   ${ResponseBuilder.buildWorkflowResponse(execution)}    SomeResponseVariable
+ * </pre>
+ */
+public class ResponseBuilder implements java.io.Serializable {
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Creates a WorkflowException using data from the execution variables.
+        * If the variables do not indicate that there was an error, null
+        * is returned.
+        * @param execution the execution
+        */
+       public WorkflowException buildWorkflowException(DelegateExecution execution) {
+
+               String method = getClass().getSimpleName() + ".buildWorkflowException(" +
+                       "execution=" + execution.getId() +
+                       ")";
+               String isDebugLogEnabled = (String) execution.getVariable("isDebugLogEnabled");
+               logDebug("Entered " + method, isDebugLogEnabled);
+       
+               String prefix = (String) execution.getVariable("prefix");
+               String processKey = getProcessKey(execution);
+
+               logDebug("processKey=" + processKey, isDebugLogEnabled);
+
+               // See if there"s already a WorkflowException object in the execution.
+               WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
+
+               if (theException != null) {
+                       logDebug("Exited " + method + " - propagated " + theException, isDebugLogEnabled);
+                       return theException;
+               }
+               
+               // Look in the legacy variables: ErrorResponse and ResponseCode
+
+               String errorResponse = trimString(execution.getVariable(prefix + "ErrorResponse"), null);
+               String responseCode = trimString(execution.getVariable(prefix + "ResponseCode"), null);
+               logDebug("errorResponse=" + errorResponse, isDebugLogEnabled);
+               logDebug("responseCode=" + responseCode, isDebugLogEnabled);
+               if (errorResponse != null || !isOneOf(responseCode, null, "0", "200", "201", "202", "204")) {
+                       // This is an error condition.  We need to return a WorkflowExcpetion
+
+                       if (errorResponse == null) {
+                               // No errorResponse string.  See if there"s something in the Response variable
+                               String response = trimString(execution.getVariable(processKey + "Response"), null);
+                               if (response == null) {
+                                       errorResponse = "Received response code " + responseCode + " from " + processKey;
+                               } else {
+                                       errorResponse = response;
+                               }
+                       }
+
+                       // Some subflows may try to return a WorkflowException as XML in the
+                       // errorResponse. If provided, use the errorCode and errorMessage
+                       // from the XML
+
+                       String maybeXML = removeXMLNamespaces(errorResponse);
+
+                       String xmlErrorMessage = trimString(getXMLTextElement(maybeXML, "ErrorMessage"), null);
+                       String xmlErrorCode = trimString(getXMLTextElement(maybeXML, "ErrorCode"), null);
+
+                       if (xmlErrorMessage != null || xmlErrorCode != null) {
+                               logDebug("xmlErrorMessage=" + xmlErrorMessage, isDebugLogEnabled);
+                               logDebug("xmlErrorCode=" + xmlErrorCode, isDebugLogEnabled);
+
+                               if (xmlErrorMessage == null) {
+                                       errorResponse = "Received error code " + xmlErrorCode + " from " + processKey;
+                               } else {
+                                       errorResponse = xmlErrorMessage;
+                               }
+
+                               if (xmlErrorCode != null) {
+                                       responseCode = xmlErrorCode;
+                               }
+                       }
+
+                       // Convert the responseCode to an integer
+
+                       int intResponseCode;
+
+                       try {
+                               intResponseCode = Integer.valueOf(responseCode);
+                       } catch (NumberFormatException e) {
+                               // Internal Error
+                               intResponseCode = 2000;
+                       }
+
+                       // Convert 3-digit HTTP response codes (we should not be using them here)
+                       // to appropriate 4-digit response codes
+
+                       if (intResponseCode < 1000) {
+                               if (intResponseCode >= 400 && intResponseCode <= 499) {
+                                       // Invalid Message
+                                       intResponseCode = 1002;
+                               } else {
+                                       // Internal Error
+                                       intResponseCode = 2000;
+                               }
+                       }
+
+                       // Create a new WorkflowException object
+
+                       theException = new WorkflowException(processKey, intResponseCode, errorResponse);
+                       execution.setVariable("WorkflowException", theException);
+                       logDebug("Exited " + method + " - created " + theException, isDebugLogEnabled);
+                       return theException;
+               }
+
+               logDebug("Exited " + method + " - no WorkflowException", isDebugLogEnabled);
+               return null;
+       }
+       
+       /**
+        * Returns the "Response" variable, unless the execution variables
+        * indicate there was an error. In that case, null is returned.
+        * @param execution the execution
+        */
+       public Object buildWorkflowResponse(DelegateExecution execution) {
+       
+               String method = getClass().getSimpleName() + ".buildWorkflowResponse(" +
+                       "execution=" + execution.getId() +
+                       ")";
+               String isDebugLogEnabled = (String) execution.getVariable("isDebugLogEnabled");
+               logDebug("Entered " + method, isDebugLogEnabled);
+       
+               String prefix = (String) execution.getVariable("prefix");
+               String processKey = getProcessKey(execution);
+
+               Object theResponse = null;
+
+               WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
+               String errorResponse = trimString(execution.getVariable(prefix + "ErrorResponse"), null);
+               String responseCode = trimString(execution.getVariable(prefix + "ResponseCode"), null);
+
+               if (theException == null && errorResponse == null &&
+                               isOneOf(responseCode, null, "0", "200", "201", "202", "204")) {
+
+                       theResponse = execution.getVariable("WorkflowResponse");
+       
+                       if (theResponse == null) {
+                               theResponse = execution.getVariable(processKey + "Response");
+                       }
+               }
+
+               logDebug("Exited " + method, isDebugLogEnabled);
+               return theResponse;
+       }
+       
+       /**
+        * Checks if the specified item is one of the specified values.
+        * @param item the item
+        * @param values the list of values
+        * @return true if the item is in the list of values
+        */
+       private boolean isOneOf(Object item, Object ... values) {
+               if (values == null) {
+                       return item == null;
+               }
+
+               for (Object value : values) {
+                       if (value == null) {
+                               if (item == null) {
+                                       return true;
+                               }
+                       } else {
+                               if (value.equals(item)) {
+                                       return true;
+                               }
+                       }
+               }
+               
+               return false;
+       }
+       
+       /**
+        * Creates a string value of the specified object, trimming whitespace in
+        * the process.  If the result is null or empty, the specified empty string
+        * value is returned.  Otherwise the trimmed value is returned.  This method
+        * helps ensure consistent treatment of empty and null strings.
+        * @param object the object to convert (possibly null)
+        * @param emptyStringValue the desired value for empty results
+        */
+       private String trimString(Object object, String emptyStringValue) {
+               if (object == null) {
+                       return emptyStringValue;
+               }
+
+               String s = String.valueOf(object).trim();
+               return s.equals("") ? emptyStringValue : s;
+       }
+       
+       /**
+        * Returns the process definition key (i.e. the process name) from the
+        * execution.
+        * @param execution the execution
+        */
+       private String getProcessKey(DelegateExecution execution) {
+               Object testKey = execution.getVariable("testProcessKey");
+
+               if (testKey instanceof String) {
+                       return (String) testKey;
+               }
+
+               return execution.getProcessEngineServices().getRepositoryService()
+                       .getProcessDefinition(execution.getProcessDefinitionId()).getKey();
+       }
+       
+       /**
+        * Logs a message at the DEBUG level.
+        * @param message the message
+        * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
+        */
+       private void logDebug(String message, String isDebugLogEnabled) {
+               BPMNLogger.debug(isDebugLogEnabled, message);
+       }
+       
+       /**
+        * Removes namespace definitions and prefixes from XML, if any.
+        */
+       private String removeXMLNamespaces(String xml) {
+               // remove xmlns declaration
+               xml = xml.replaceAll("xmlns.*?(\"|\').*?(\"|\')", "");
+
+               // remove opening tag prefix
+               xml = xml.replaceAll("(<)(\\w+:)(.*?>)", "$1$3");
+
+               // remove closing tags prefix
+               xml = xml.replaceAll("(</)(\\w+:)(.*?>)", "$1$3");
+
+               // remove extra spaces left when xmlns declarations are removed
+               xml = xml.replaceAll("\\s+>", ">");
+
+               return xml;
+       }
+
+       /**
+        * Extracts text from an XML element. This method is not namespace aware
+        * (namespaces are ignored).  The first matching element is selected.
+        * @param xml the XML document or fragment
+        * @param tag the desired element, e.g. "<name>"
+        * @return the element text, or null if the element was not found
+        */
+       private String getXMLTextElement(String xml, String tag) {
+               xml = removeXMLNamespaces(xml);
+
+               if (!tag.startsWith("<")) {
+                       tag = "<" + tag + ">";
+               }
+
+               int start = xml.indexOf(tag);
+
+               if (start == -1) {
+                       return null;
+               }
+
+               int end = xml.indexOf('<', start + tag.length());
+
+               if (end == -1) {
+                       return null;
+               }
+
+               return xml.substring(start + tag.length(), end);
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
new file mode 100644 (file)
index 0000000..1b2bb87
--- /dev/null
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * An object that stores data for rollbacks.  Data is organized by type.  A
+ * type is simply a string identifier.  Multiple types of data may be stored
+ * in the same object for separate rollback operations.
+ */
+public class RollbackData implements Serializable {
+       private static final long serialVersionUID = 1L;
+
+       private Map<String, Map<String, Serializable>> dictionary =
+               new HashMap<String, Map<String, Serializable>>();
+       
+       /**
+        * Returns true if the specified type is stored in this object.
+        * @param type the data type
+        */
+       public boolean hasType(String type) {
+               return dictionary.containsKey(type);
+       }
+
+       /**
+        * Stores a single item.
+        * @param type the data type
+        * @param key the key
+        * @param value the value
+        */
+       public void put(String type, String key, String value) {
+               Map<String, Serializable> mapForType = dictionary.get(type);
+
+               if (mapForType == null) {
+                       mapForType = new HashMap<String, Serializable>();
+                       dictionary.put(type, mapForType);
+               }
+
+               mapForType.put(key, value);
+       }
+
+       /**
+        * Gets a single item.
+        * @param type the data type
+        * @param key the key
+        * @return the item or null if there is no item for the specified type and key
+        */
+       public Serializable get(String type, String key) {
+               Map<String, Serializable> mapForType = dictionary.get(type);
+
+               if (mapForType == null) {
+                       return null;
+               }
+
+               return mapForType.get(key);
+       }
+
+       /**
+        * Gets a map containing all items associated with the specified data type.
+        * @param type the data type
+        * @return a map, or null if there are no items associated with the specified
+        *         data type
+        */
+       public Map<String, Serializable> get(String type) {
+               return dictionary.get(type);
+       }
+
+       /**
+        * Returns a string representation of this object.
+        */
+       public String toString() {
+               StringBuilder out = new StringBuilder();
+               out.append(getClass().getSimpleName());
+               out.append('[');
+               boolean hasOne = false;
+               for (String type : dictionary.keySet()) {
+                       if (hasOne) {
+                               out.append(',');
+                       }
+                       out.append(type);
+                       out.append(dictionary.get(type));
+                       hasOne = true;
+               }
+               out.append(']');
+               return out.toString();
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/URNMappingsTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/URNMappingsTask.java
new file mode 100644 (file)
index 0000000..6c6d96a
--- /dev/null
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+
+/**
+ * DEPRECATION WARNING: setting of URN mappings is now done by a plugin.
+ */
+@Deprecated
+public class URNMappingsTask extends BaseTask {
+       public void execute(DelegateExecution execution) throws Exception {
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
new file mode 100644 (file)
index 0000000..559ec6d
--- /dev/null
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.io.Serializable;
+
+/**
+ * An object that represents a workflow exception.
+ */
+public class WorkflowException implements Serializable {
+       private static final long serialVersionUID = 1L;
+
+       private final String processKey;
+       private final int errorCode;
+       private final String errorMessage;
+       
+       /**
+        * Constructor
+        * @param processKey the process key for the process that generated the exception
+        * @param errorCode the numeric error code (normally 1xxx or greater)
+        * @param errorMessage a short error message
+        */
+       public WorkflowException(String processKey, int errorCode,
+                       String errorMessage) {
+               this.processKey = processKey;
+               this.errorCode = errorCode;
+               this.errorMessage = errorMessage;
+       }
+                       
+       /**
+        * Returns the process key.
+        */
+       public String getProcessKey() {
+               return processKey;
+       }
+       
+       /**
+        * Returns the error code.
+        */
+       public int getErrorCode() {
+               return errorCode;
+       }
+       
+       /**
+        * Returns the error message.
+        */
+       public String getErrorMessage() {
+               return errorMessage;
+       }
+       
+       /**
+        * Returns a string representation of this object.
+        */
+       public String toString() {
+               StringBuilder out = new StringBuilder();
+               out.append(getClass().getSimpleName());
+               out.append("[processKey=");
+               out.append(getProcessKey());
+               out.append(",errorCode=");
+               out.append(getErrorCode());
+               out.append(",errorMessage=");
+               out.append(getErrorMessage());
+               out.append("]");
+               return out.toString();
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/XQueryScriptTask.java
new file mode 100644 (file)
index 0000000..8a7b200
--- /dev/null
@@ -0,0 +1,243 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.Iterator;
+
+import javax.xml.transform.stream.StreamSource;
+
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+//import java.util.logging.Logger;
+import org.camunda.bpm.engine.delegate.Expression;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+import net.sf.saxon.Configuration;
+import net.sf.saxon.s9api.DocumentBuilder;
+import net.sf.saxon.s9api.Processor;
+import net.sf.saxon.s9api.QName;
+import net.sf.saxon.s9api.XQueryCompiler;
+import net.sf.saxon.s9api.XQueryEvaluator;
+import net.sf.saxon.s9api.XQueryExecutable;
+import net.sf.saxon.s9api.XdmAtomicValue;
+import net.sf.saxon.s9api.XdmItem;
+import net.sf.saxon.s9api.XdmNode;
+
+/**
+ * Executes an XQuery script.
+ * <p>
+ * Required fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;scriptFile: the XQuery script file path<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;outputVariable: the output variable name<br/>
+ * <p>
+ * Optional fields:<br/><br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;xmlInputVariables: CSV list of variables containing
+ *             XML data to be injected into the script<br/>
+ * &nbsp;&nbsp;&nbsp;&nbsp;atomicInputVariables: CSV list of variables containing
+ *             atomic data to be injected into the script<br/>
+ */
+public class XQueryScriptTask extends BaseTask {
+       
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+       private Expression scriptFile;
+       private Expression xmlInputVariables;
+       private Expression atomicInputVariables;
+       private Expression outputVariable;
+
+       public void execute(DelegateExecution execution) throws Exception {
+               if (msoLogger.isDebugEnabled()) {
+                       msoLogger.debug("Started Executing " + getTaskName());
+               }
+
+               String theScriptFile =
+                       getStringField(scriptFile, execution, "scriptFile");
+               String theXmlInputVariables =
+                       getOptionalStringField(xmlInputVariables, execution, "xmlInputVariables");
+               String theAtomicInputVariables =
+                       getOptionalStringField(atomicInputVariables, execution, "atomicInputVariables");
+               String theOutputVariable =
+                       getStringField(outputVariable, execution, "outputVariable");
+
+               if (msoLogger.isDebugEnabled()) {
+                       System.out.println("scriptFile = " + theScriptFile
+                               + " xmlInputVariables = " + theXmlInputVariables
+                               + " atomicInputVariables = " + theAtomicInputVariables
+                               + "outputVariable = " + theOutputVariable);
+               }
+
+               String[] xmlInputVariableArray = (theXmlInputVariables == null)
+                       ? new String[0] : theXmlInputVariables.split(",[ ]*");
+
+               String[] atomicInputVariableArray = (theAtomicInputVariables == null)
+                       ? new String[0] : theAtomicInputVariables.split(",[ ]*");
+
+               Boolean shouldFail = (Boolean) execution.getVariable("shouldFail");
+
+               if (shouldFail != null && shouldFail) {
+                       throw new ProcessEngineException(getClass().getSimpleName() + " Failed");
+               }
+
+               // The script could be compiled once and reused, but we are reading it
+               // and compiling it every time.
+               Configuration configuration = new Configuration();
+               Processor processor = new Processor(configuration);
+               XQueryCompiler compiler = processor.newXQueryCompiler();
+               XQueryExecutable executable = compile(compiler, theScriptFile);
+
+               // The evaluator must not be shared by multiple threads.  Here is where
+               // the initial context may be set, as well as values of external variables.
+               XQueryEvaluator evaluator = executable.load();
+
+               // Convert XML string variable content to document-node objects and inject
+               // these into the evaluator.  Note: the script must accept the document-node
+               // type.  Most MSO scripts today expect element() input, not document-node
+               // input.  TODO: figure out how to pass the variable data as element() types.
+
+               for (String xmlInputVariable : xmlInputVariableArray) {
+                       if (msoLogger.isDebugEnabled()) {
+                               msoLogger.debug("Injecting XML variable '" + xmlInputVariable + "'");
+                               msoLogger.debug("printing the variable content>>'" + execution.getVariable(xmlInputVariable) +"'");
+                       }
+
+                       String xml = (String) execution.getVariable(xmlInputVariable);
+                       DocumentBuilder documentBuilder = processor.newDocumentBuilder();
+                       StreamSource source = new StreamSource(new ByteArrayInputStream(xml.getBytes("UTF-8")));
+                       XdmNode xdmNode = documentBuilder.build(source);
+
+                       // Inject the document-node object into the XQueryEvaluator.
+                       // TODO: transform it to an element()
+                       QName variable = new QName(xmlInputVariable);
+                       evaluator.setExternalVariable(variable, xdmNode);
+               }
+
+               // Inject atomic variables into the evaluator.
+
+               for (String atomicInputVariable : atomicInputVariableArray) {
+                       
+                       if (msoLogger.isDebugEnabled()) {
+                               System.out.println("Injecting object variable '"
+                                       + atomicInputVariable + "'");
+                       }
+
+                       QName variable = new QName(atomicInputVariable);
+                       Object value = execution.getVariable(atomicInputVariable);
+
+                       if (value == null) {
+                               // The variable value is null, so we have no way to know what
+                               // type it is.  I don't know how to deal with this, so for
+                               // now, just skip it.
+                               
+                               msoLogger.warn (MessageEnum.BPMN_VARIABLE_NULL, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, atomicInputVariable);
+                               
+                               continue;
+                       }
+
+                       // There might be a better way to do this...
+                       if (value instanceof BigDecimal) {
+                               evaluator.setExternalVariable(variable,
+                                       new XdmAtomicValue((BigDecimal) value));
+                       } else if (value instanceof Boolean) {
+                               evaluator.setExternalVariable(variable,
+                                       new XdmAtomicValue((Boolean) value));
+                       } else if (value instanceof Double) {
+                               evaluator.setExternalVariable(variable,
+                                       new XdmAtomicValue((Double) value));
+                       } else if (value instanceof Float) {
+                               evaluator.setExternalVariable(variable,
+                                       new XdmAtomicValue((Float) value));
+                       } else if (value instanceof Long) {
+                               evaluator.setExternalVariable(variable,
+                                       new XdmAtomicValue((Long) value));
+                       } else if (value instanceof String) {
+                               evaluator.setExternalVariable(variable,
+                                       new XdmAtomicValue((String) value));
+                       } else if (value instanceof URI) {
+                               evaluator.setExternalVariable(variable,
+                                       new XdmAtomicValue((URI) value));
+                       } else {
+                               throw new BadInjectedFieldException(
+                                       "atomicInputVariables", getTaskName(),
+                                       "'" + atomicInputVariable + "' type is not supported: "
+                                               + value.getClass());
+                       }
+               }
+
+               // Evaluate the query and collect the output.
+               StringBuilder output = new StringBuilder();
+               Iterator<XdmItem> xdmItems = evaluator.iterator();
+               while (xdmItems.hasNext()) {
+                       XdmItem item = xdmItems.next();
+                       
+                       if (msoLogger.isDebugEnabled()) {
+                               msoLogger.debug("XQuery result item = " + item);
+                       }
+
+                       output.append(item.toString());
+               }
+
+               // Set the output variable.
+               execution.setVariable(theOutputVariable, output.toString());
+
+               if (msoLogger.isDebugEnabled()) {
+                       msoLogger.debug("Done Executing " + getTaskName());
+               }
+       }
+       
+       /**
+        * Compiles an XQuery script contained in a resource (file).
+        * @param compiler the XQueryCompiler
+        * @param resource the resource path
+        * @return an XQueryExecutable
+        * @throws Exception on error
+        */
+       private XQueryExecutable compile(XQueryCompiler compiler, String resource)
+                       throws Exception {
+               InputStream xqStream = null;
+               try {
+                       xqStream = getClass().getResourceAsStream(resource);
+
+                       if (xqStream == null) {
+                               throw new IOException("Resource not found: " + resource);
+                       }
+
+                       XQueryExecutable executable = compiler.compile(xqStream);
+                       xqStream.close();
+                       xqStream = null;
+                       return executable;
+               } finally {
+                       if (xqStream != null) {
+                               try {
+                                       xqStream.close();
+                               } catch (Exception e) {
+                                       // Do nothing
+                               }
+                       }
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
new file mode 100644 (file)
index 0000000..8329746
--- /dev/null
@@ -0,0 +1,443 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core.json;
+
+import java.util.Iterator;
+import java.util.StringTokenizer;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.json.XML;
+
+//import org.openecomp.mso.bpmn.core.BPMNLogger;
+import org.openecomp.mso.bpmn.core.xml.XmlTool;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Utility class for JSON processing
+ * 
+ * @version 1.0
+ */
+
+public class JsonUtils {
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       private static int MSOJsonIndentFactor = 3;
+
+       /**
+        * Uses the JSONObject static method to convert a XML doc to JSON.
+        *
+        * @param  xml          String containing the XML doc
+        * @param  pretty       flag to determine if the output should be formatted
+        * @return String containing the JSON translation
+        */
+       public static String xml2json(String xml, Boolean pretty) {
+//             String isDebugLogEnabled = "true";
+               try {
+                       // name spaces cause problems, so just remove them
+                       JSONObject jsonObj = XML.toJSONObject(XmlTool.removeNamespaces(xml));
+                       if (!pretty) {
+                               return jsonObj.toString();
+                       } else {
+                               // add an indent to make it 'pretty'
+                               return jsonObj.toString(MSOJsonIndentFactor);
+                       }
+               } catch (Exception e){
+                               msoLogger.debug("xml2json(): unable to parse xml and convert to json. Exception was: " + e.toString());
+                               return null;
+               }
+       }
+
+       /**
+        * Invokes xml2json(String, Boolean) defaulting to 'pretty' output.
+        *
+        * @param  xml  String containing the XML doc
+        * @return String containing the JSON translation
+        */
+       public static String xml2json(String xml) {
+               return xml2json(xml, true);
+       }
+
+       /**
+        * Uses the JSONObject static method to convert a JSON doc to XML.
+        * Note: this method will not generate valid XML if the JSONObject
+        * contains JSONArrays which are used to represent XML attributes
+        * in the JSON doc.
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  pretty       flag to determine if the output should be formatted
+        * @return String containing the XML translation
+        */
+       public static String json2xml(String jsonStr, Boolean pretty) {
+//             String isDebugLogEnabled = "true";
+               try {
+                       JSONObject jsonObj = new JSONObject(jsonStr);
+                       if (pretty) {
+                               return XmlTool.normalize(XML.toString(jsonObj));
+                       } else {
+                               return XML.toString(jsonObj);
+                       }
+               } catch (Exception e){
+                               msoLogger.debug("json2xml(): unable to parse json and convert to xml. Exception was: " + e.toString());
+                               return null;
+               }
+       }
+       
+       /**
+        * Invokes json2xml(String, Boolean) defaulting to 'pretty' output.
+        *
+        * @param  jsonStr      String containing the XML doc
+        * @return String containing the JSON translation
+        */
+       public static String json2xml(String jsonStr) {
+               return json2xml(jsonStr, true);
+       }
+
+       /**
+        * Uses the JSONObject static method to convert a JSON doc to XML.
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @return Iterator over the JSON keys
+        */
+       public static Iterator <String> getJsonIterator(String jsonStr) {
+//             String isDebugLogEnabled = "true";
+               try {
+                       JSONObject json = new JSONObject(jsonStr);
+                       return json.keys();
+                       
+               } catch (Exception e){
+                               msoLogger.debug("getJsonIterator(): unable to parse json to retrieve the keys iterator. Exception was: " + e.toString());
+                               return null;
+               }
+       }
+
+       /**
+        * Invokes the getJsonRawValue() method and returns the String equivalent of
+        * the object returned.
+        * 
+        * TBD: May need separate methods for boolean, float, and integer fields if the
+        * String representation is not sufficient to meet client needs.
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  keys         full key path to the target value in the format of "key1.key2.key3..."
+        * @return String field value associated with keys
+        */
+       public static String getJsonValue(String jsonStr, String keys) {
+//             String isDebugLogEnabled = "true";
+               try {
+                               Object rawValue = getJsonRawValue(jsonStr, keys);
+                               if (rawValue == null) {
+                                       return null;
+                               } else {
+                                       if (rawValue instanceof String) {
+                                               msoLogger.debug("getJsonValue(): the raw value is a String Object=" + ((String) rawValue).toString());
+                                               return (String) rawValue;
+                                       } else {
+                                               msoLogger.debug("getJsonValue(): the raw value is NOT a String Object=" + rawValue.toString());
+                                               return rawValue.toString();
+                                       }
+                               }
+               } catch (Exception e) {
+                               msoLogger.debug("getJsonValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
+               }
+               return null;
+       }
+
+       /**
+        * Invokes the getJsonRawValue() method to obtain the JSONArray associated with
+        * the specified keys. The JSONArray is then walked to retrieve the content value of
+        * the specified field name.
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  keys         full key path to the target value in the format of "key1.key2.key3..."
+        * @param  name         field name for the param to be retrieved
+        * @return String param value associated with field name
+        */
+       public static String getJsonParamValue(String jsonStr, String keys, String name) {
+//             String isDebugLogEnabled = "true";
+               try {
+                       Object rawValue = getJsonRawValue(jsonStr, keys);
+                       if (rawValue == null) {
+                               return null;
+                       } else {
+                               if (rawValue instanceof JSONArray) {
+                                       msoLogger.debug("getJsonParamValue(): keys=" + keys + " points to JSONArray: " + ((JSONArray) rawValue).toString());
+                                       for (int i = 0; i < ((JSONArray) rawValue).length(); i++) {
+                                               msoLogger.debug("getJsonParamValue(): index: " + i + ", value: " + ((JSONArray) rawValue).get(i).toString());
+                                               if (((JSONArray) rawValue).get(i) instanceof JSONObject) {
+                                                       msoLogger.debug("getJsonParamValue(): index: " + i + " is a JSONObject");
+                                                       JSONObject jsonObj = (JSONObject)((JSONArray) rawValue).get(i);
+                                                       if (jsonObj.get("name").equals(name)) {
+                                                               msoLogger.debug("getJsonParamValue(): found value: " + (String) jsonObj.get("content") + " for name: " + name);
+                                                               return (String) jsonObj.get("content");
+                                                       }
+                                               } else {
+                                                       msoLogger.debug("getJsonParamValue(): the JSONArray element is NOT a JSONObject=" + rawValue.toString());
+                                                       return null;
+                                               }
+                                       }
+                                       msoLogger.debug("getJsonParamValue(): content value NOT found for name: " + name);
+                                       return null;
+                               } else {
+                                       msoLogger.debug("getJsonParamValue(): the raw value is NOT a JSONArray Object=" + rawValue.toString());
+                                       return null;
+                               }
+                       }
+               } catch (JSONException je) {
+                               // JSONObject::get() throws this exception if one of the specified keys is not found
+                               msoLogger.debug("getJsonParamValue(): caught JSONException attempting to retrieve param value for keys:" + keys + ", name=" + name);
+               } catch (Exception e) {
+                               msoLogger.debug("getJsonParamValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
+               }
+               return null;
+       }
+
+       /**
+        * Wrapper to generate the JSONObject to pass to the getJsonValueForKey(JSONObject, String)
+        * method so that recursion over the subobjects can be supported there
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  key          key to the target value
+        * @return String field value associated with key
+        */
+       public static String getJsonValueForKey(String jsonStr, String key) {
+//             String isDebugLogEnabled = "true";
+               try {
+                       JSONObject jsonObj = new JSONObject(jsonStr);
+                       if (jsonObj != null) {
+                               return getJsonValueForKey(jsonObj, key);
+                       }
+               } catch (Exception e) {
+                               msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());
+               }
+               return null;
+       }
+
+       /**
+        * Walks the JSONObject (and sub-objects recursively), searching for the first value associated with the
+        * single key/field name specified. Returns the associated value if found or null if the key is not found
+        *
+        * @param  jsonObj      JSONObject representation of the the JSON doc
+        * @param  key          key to the target value
+        * @return String field value associated with key
+        */
+       public static String getJsonValueForKey(JSONObject jsonObj, String key) {
+//             String isDebugLogEnabled = "true";
+               String keyValue = null;
+               try {
+                       if (jsonObj.has(key)) {
+                               msoLogger.debug("getJsonValueForKey(): found value for key=" + key);
+                               return ((String) jsonObj.get(key));
+                       } else {
+                               msoLogger.debug("getJsonValueForKey(): iterating over the keys");
+                               Iterator <String> itr = jsonObj.keys();
+                               while (itr.hasNext()) {
+                                       String nextKey = (String) itr.next();
+                                       Object obj = jsonObj.get(nextKey);
+                                       if (obj instanceof JSONObject) {
+                                               msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", points to JSONObject, recursive call");
+                                               keyValue = getJsonValueForKey((JSONObject) obj, key);
+                                               if (keyValue != null) {
+                                                       msoLogger.debug("getJsonValueForKey(): found value=" + keyValue + ", for key=" + key);
+                                                       break;
+                                               }
+                                       } else {
+                                               msoLogger.debug("getJsonValueForKey(): key=" + nextKey + ", does not point to a JSONObject, next key");
+                                       }
+                               }
+                       }
+               } catch (JSONException je) {
+                               // JSONObject::get() throws this exception if one of the specified keys is not found
+                               msoLogger.debug("getJsonValueForKey(): caught JSONException attempting to retrieve value for key=" + key);
+                               keyValue = null;
+               } catch (Exception e) {
+                               msoLogger.debug("getJsonValueForKey(): unable to parse json to retrieve value for field=" + key + ". Exception was: " + e.toString());
+               }
+               return keyValue;
+       }
+       
+       /**
+        * Boolean method to determine if a key path is valid for the JSON doc. Invokes
+        * getJsonValue().
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  keys         full key path to the target value in the format of "key1.key2.key3..."
+        * @return Boolean true if keys points to value in the JSON doc
+        */
+       public static Boolean jsonValueExists(String jsonStr, String keys) {
+               if (getJsonRawValue(jsonStr, keys) == null) {
+                       return false;
+               } else {
+                       return true;
+               }
+       }
+       
+       /**
+        * Inserts the new key/value pair at the appropriate location in the JSON
+        * document after first determining if keyed field already exists. If
+        * it does exist, return the JSON unmodified, otherwise return the new JSON
+        * Note: this method currently only supports String value inserts.
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  keys         full key path to the value to be added in the format of "key1.key2.key3..."
+        * @return String containing the updated JSON doc
+        */
+       public static String addJsonValue(String jsonStr, String keys, String value) {
+//             String isDebugLogEnabled = "true";
+               // only attempt to insert the key/value pair if it does not exist
+               if (!jsonValueExists(jsonStr, keys)) {
+                       return putJsonValue(jsonStr, keys, value);
+               } else {
+                       msoLogger.debug("addJsonValue(): JSON add failed, key=" + keys + "/value=" + (String) value + " already exists");
+                       return jsonStr;
+               }
+       }
+
+       /**
+        * Updates the value for the specified key in the JSON document
+        * after first determining if keyed field exists. If it does
+        * not exist, return the JSON unmodified, otherwise return the updated JSON.
+        * Note: this method currently only supports String value updates.
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  keys         full key path to the value to be updated in the format of "key1.key2.key3..."
+        * @return String containing the updated JSON doc
+        */
+       public static String updJsonValue(String jsonStr, String keys, String newValue) {
+//             String isDebugLogEnabled = "true";
+               // only attempt to modify the key/value pair if it exists
+               if (jsonValueExists(jsonStr, keys)) {
+                       return putJsonValue(jsonStr, keys, newValue);
+               } else {
+                       msoLogger.debug("updJsonValue(): JSON update failed, no value exists for key=" + keys);
+                       return jsonStr;
+               }
+       }
+
+       /**
+        * Deletes the value for the specified key in the JSON document
+        * after first determining if keyed field exists. If it does
+        * not exist, return the JSON unmodified, otherwise return the updated JSON
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  keys         full key path to the value to be deleted in the format of "key1.key2.key3..."
+        * @return String containing the updated JSON doc
+        */
+       public static String delJsonValue(String jsonStr, String keys) {
+//             String isDebugLogEnabled = "true";
+               // only attempt to remove the key/value pair if it exists
+               if (jsonValueExists(jsonStr, keys)) {
+                       // passing a null value results in a delete
+                       return putJsonValue(jsonStr, keys, null);
+               } else {
+                       msoLogger.debug("delJsonValue(): JSON delete failed, no value exists for key=" + keys);
+                       return jsonStr;
+               }
+       }
+
+       /**
+        * Walks the JSON doc using the full key path to retrieve the associated
+        * value. All but the last key points to the 'parent' object name(s) in order
+        * in the JSON hierarchy with the last key pointing to the target value.
+        * The value returned is a Java object.
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  keys         full key path to the target value in the format of "key1.key2.key3..."
+        * @return Object field value associated with keys
+        */
+       private static Object getJsonRawValue(String jsonStr, String keys) {
+//             String isDebugLogEnabled = "true";
+               String keyStr = "";
+               try {
+                       JSONObject jsonObj = new JSONObject(jsonStr);
+                       StringTokenizer keyTokens = new StringTokenizer(keys, ".");
+                       while (keyTokens.hasMoreElements()) {
+                               keyStr = keyTokens.nextToken();
+                               Object keyValue = jsonObj.get(keyStr);
+                               if (keyValue instanceof JSONObject) {
+                                       msoLogger.debug("getJsonRawValue(): key=" + keyStr + " points to json object");
+                                       jsonObj = (JSONObject) keyValue;
+                               } else {
+                                       if (keyTokens.hasMoreElements()) {
+                                               msoLogger.debug("getJsonRawValue(): value found prior to last key for key=" + keyStr);
+                                       }
+                                       return keyValue;
+                               }
+                       }
+                       // we should not hit this point: either the key points to a valid value and
+                       // we return it above or the key is invalid and we handle the JSONException
+                       // below and return null
+                       return null;
+                       
+               } catch (JSONException je) {
+                               // JSONObject::get() throws this exception if one of the specified keys is not found
+                               msoLogger.debug("getJsonRawValue(): caught JSONException attempting to retrieve raw value for key=" + keyStr);
+               } catch (Exception e) {
+                               msoLogger.debug("getJsonRawValue(): unable to parse json to retrieve value for field=" + keys + ". Exception was: " + e.toString());
+               }
+               return null;
+       }
+
+       /**
+        * Private method invoked by the public add, update, and delete methods.
+        *
+        * @param  jsonStr      String containing the JSON doc
+        * @param  keys         full key path to the value to be deleted in the format of "key1.key2.key3..."
+        * @return String containing the updated JSON doc
+        */
+       private static String putJsonValue(String jsonStr, String keys, String value) {         
+//             String isDebugLogEnabled = "true";
+               String keyStr = "";
+               try {
+                       JSONObject jsonObj = new JSONObject(jsonStr);
+                       JSONObject jsonObjOut = jsonObj;
+                       StringTokenizer keyTokens = new StringTokenizer(keys, ".");
+                       while (keyTokens.hasMoreElements()) {
+                               keyStr = keyTokens.nextToken();
+                               if (keyTokens.hasMoreElements()) {
+                                       Object keyValue = jsonObj.get(keyStr);
+                                       if (keyValue instanceof JSONObject) {
+                                               msoLogger.debug("putJsonValue(): key=" + keyStr + " points to json object");
+                                               jsonObj = (JSONObject) keyValue;
+                                       } else {
+                                               msoLogger.debug("putJsonValue(): key=" + keyStr + " not the last key but points to non-json object: " + (String) keyValue);
+                                               return null;
+                                       }
+                               } else { // at the last/new key value
+                                       jsonObj.put(keyStr, value);
+                                       return jsonObjOut.toString(3);
+                               }
+                       }
+                       // should not hit this point if the key points to a valid key value
+                       return null;
+                       
+               } catch (JSONException je) {
+                               // JSONObject::get() throws this exception if one of the specified keys is not found
+                               msoLogger.debug("putJsonValue(): caught JSONException attempting to retrieve value for key=" + keyStr);
+                               return null;
+               } catch (Exception e) {
+                               msoLogger.debug("putJsonValue(): unable to parse json to put value for key=" + keys + ". Exception was: " + e.toString());
+               }
+               return null;
+       }
+}
+
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
new file mode 100644 (file)
index 0000000..3a73155
--- /dev/null
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core.mybatis;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration;
+import org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor;
+import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor;
+import org.camunda.bpm.engine.impl.interceptor.LogInterceptor;
+import org.camunda.bpm.engine.impl.util.ReflectUtil;
+
+
+/**
+ * A special process engine that provides access to MyBatis mappings.
+ * @version 1.0
+ */
+public class CustomMyBatisSessionFactory extends
+               StandaloneProcessEngineConfiguration {
+
+       private String resourceName;
+
+       /**
+        * Overridden to ensure nobody ever tries to initialize this process engine
+        * in the normal way.  We are using this process engine only for MyBatis
+        * access.
+        */
+       @Override
+       protected void init() {
+               throw new UnsupportedOperationException("init");
+       }
+
+       /**
+        * Initialize the ProcessEngineConfiguration from an existing one, just
+        * using the database settings to initialize the database / MyBatis stuff.
+        */
+       public void initFromProcessEngineConfiguration(
+                       ProcessEngineConfigurationImpl processEngineConfiguration,
+                       String resourceName) {
+               this.resourceName = resourceName;
+
+               setDatabaseType(processEngineConfiguration.getDatabaseType());
+               setDataSource(processEngineConfiguration.getDataSource());
+               setDatabaseTablePrefix(processEngineConfiguration
+                               .getDatabaseTablePrefix());
+
+               initDataSource();
+               // initVariableTypes();
+               initCommandContextFactory();
+               initTransactionFactory();
+               initTransactionContextFactory();
+               initCommandExecutors();
+               initSqlSessionFactory();
+               initIncidentHandlers();
+               initIdentityProviderSessionFactory();
+               initSessionFactories();
+       }
+
+       /**
+        * In order to always open a new command context set the property
+        * "alwaysOpenNew" to true inside the CommandContextInterceptor.
+        * 
+        * If you execute the custom queries inside the process engine (for example
+        * in a service task), you have to do this.
+        */
+       @Override
+       protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() {
+               List<CommandInterceptor> defaultCommandInterceptorsTxRequired =
+                               new ArrayList<CommandInterceptor>();
+               defaultCommandInterceptorsTxRequired.add(new LogInterceptor());
+               defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(
+                               commandContextFactory, this, true));
+               return defaultCommandInterceptorsTxRequired;
+       }
+
+       @Override
+       protected InputStream getMyBatisXmlConfigurationSteam() {
+               return ReflectUtil.getResourceAsStream(resourceName);
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java
new file mode 100644 (file)
index 0000000..07959cb
--- /dev/null
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core.mybatis;
+
+/**
+ * A bean that represents a single URN mapping.
+ */
+public class URNMapping {
+       private String name;
+       private String value;
+       private String rev;
+
+       /**
+        * Get the name.
+        * @return the name
+        */
+       public String getName() {
+               return name;
+       }
+
+       /**
+        * Set the name.
+        * @param name the name
+        */
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       /**
+        * Get the value mapped to the name.
+        * @return the value mapped to the name
+        */
+       public String getValue() {
+               return value;
+       }
+
+       /**
+        * Set the value mapped to the name.
+        * @param value the value mapped to the name
+        */
+       public void setValue(String value) {
+               this.value = value;
+       }
+
+       /**
+        * Get the revision attribute (currently unused).
+        * @return the revision attribute
+        */
+       public String getRev() {
+               return rev;
+       }
+
+       /**
+        * Set the revision attribute (currently unused).
+        * @param rev the revision attribute
+        */
+       public void setRev(String rev) {
+               this.rev = rev;
+       }
+       
+       /**
+        * Converts a URN to "normal" form so it can used as a java or groovy
+        * variable identifier.  This is done in a way that makes the identifier
+        * as readable as possible, but note that it might result in a loss of
+        * uniqueness.
+        * <ol>
+        * <li> URN_ is prepended </li>
+        * <li> All characters that are not letters or digits are converted to
+        *      underscore characters </li>
+        * <li> Sequences of multiple underscores are collapsed to a single
+        *      underscore character </li>
+        * </ol>
+        * Examples:
+        * <p>
+        * aai:endpoint becomes URN_aai_endpoint <br/>
+        * ae:internal-reporting becomes URN_ae_internal_reporting <br/>
+        * 
+        * @param name the URN
+        * @return a normalized identifier
+        */
+       public static String createIdentifierFromURN(String urn) {
+               StringBuilder builder = new StringBuilder();
+               builder.append("URN_");
+               char last = builder.charAt(builder.length() - 1);
+
+               int len = urn.length();
+
+               for (int i = 0; i < len; i++) {
+                       char c = urn.charAt(i);
+
+                       if (!Character.isLetterOrDigit(c) && c != '_') {
+                               c = '_';
+                       }
+
+                       if (!(c == '_' && last == '_')) {
+                               builder.append(c);
+                       }
+
+                       last = c;
+               }
+
+               return builder.toString();
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
new file mode 100644 (file)
index 0000000..8e3f254
--- /dev/null
@@ -0,0 +1,424 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core.plugins;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
+import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.context.Context;
+import org.camunda.bpm.engine.impl.interceptor.Command;
+import org.camunda.bpm.engine.impl.interceptor.CommandContext;
+import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
+import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
+import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl;
+import org.camunda.bpm.engine.impl.pvm.process.TransitionImpl;
+import org.camunda.bpm.engine.impl.util.xml.Element;
+import org.camunda.bpm.engine.impl.variable.VariableDeclaration;
+
+import org.openecomp.mso.bpmn.core.BPMNLogger;
+import org.openecomp.mso.bpmn.core.PropertyConfiguration;
+import org.openecomp.mso.bpmn.core.mybatis.CustomMyBatisSessionFactory;
+import org.openecomp.mso.bpmn.core.mybatis.URNMapping;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Plugin for MSO logging and URN mapping.
+ */
+public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
+       private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       private static final String FSPROPKEY = "URNMapping.FileSystemLoading.Enabled";
+
+       @Override
+       public void preInit(
+                       ProcessEngineConfigurationImpl processEngineConfiguration) {
+               List<BpmnParseListener> preParseListeners = processEngineConfiguration
+                               .getCustomPreBPMNParseListeners();
+               if (preParseListeners == null) {
+                       preParseListeners = new ArrayList<BpmnParseListener>();
+                       processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
+               }
+               preParseListeners.add(new LoggingParseListener());
+       }
+       
+       /**
+        * Called when a process flow is parsed so we can inject listeners.
+        */
+       public static class LoggingParseListener extends AbstractBpmnParseListener {
+               private void injectLogExecutionListener(ActivityImpl activity) {
+                       activity.addListener(
+                                       ExecutionListener.EVENTNAME_END,
+                                       new LoggingExecutionListener("END"));
+
+                       activity.addListener(
+                                       ExecutionListener.EVENTNAME_START,
+                                       new LoggingExecutionListener("START"));
+
+                       activity.addListener(
+                                       ExecutionListener.EVENTNAME_TAKE,
+                                       new LoggingExecutionListener("TAKE"));
+               }
+
+               public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
+               }
+
+               public void parseStartEvent(Element startEventElement, ScopeImpl scope, ActivityImpl startEventActivity) {
+                       // Inject these listeners only on the main start event for the flow, not on any embedded subflow start events
+                       if (scope instanceof ProcessDefinitionEntity) {
+                               startEventActivity.addListener(ExecutionListener.EVENTNAME_START, new URNMappingInitializerListener("START"));
+                               startEventActivity.addListener(ExecutionListener.EVENTNAME_START, new LoggingInitializerListener("START"));
+                       }
+
+                       injectLogExecutionListener(startEventActivity);
+               }
+
+               public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseExclusiveGateway(Element exclusiveGwElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseInclusiveGateway(Element inclusiveGwElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseParallelGateway(Element parallelGwElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseScriptTask(Element scriptTaskElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseBusinessRuleTask(Element businessRuleTaskElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseTask(Element taskElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseManualTask(Element manualTaskElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseEndEvent(Element endEventElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseBoundaryTimerEventDefinition(Element timerEventDefinition, boolean interrupting, ActivityImpl timerActivity) {
+                       injectLogExecutionListener(timerActivity);
+               }
+
+               public void parseBoundaryErrorEventDefinition(Element errorEventDefinition, boolean interrupting, ActivityImpl activity, ActivityImpl nestedErrorEventActivity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseSubProcess(Element subProcessElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseCallActivity(Element callActivityElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseProperty(Element propertyElement, VariableDeclaration variableDeclaration, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseSequenceFlow(Element sequenceFlowElement, ScopeImpl scopeElement, TransitionImpl transition) {
+                       //injectLogExecutionListener(activity);
+               }
+
+               public void parseSendTask(Element sendTaskElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseMultiInstanceLoopCharacteristics(Element activityElement, Element multiInstanceLoopCharacteristicsElement, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseIntermediateTimerEventDefinition(Element timerEventDefinition, ActivityImpl timerActivity) {
+                       injectLogExecutionListener(timerActivity);
+               }
+
+               public void parseRootElement(Element rootElement, List<ProcessDefinitionEntity> processDefinitions) {
+                       //injectLogExecutionListener(activity);
+               }
+
+               public void parseReceiveTask(Element receiveTaskElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseIntermediateSignalCatchEventDefinition(Element signalEventDefinition, ActivityImpl signalActivity) {
+                       injectLogExecutionListener(signalActivity);
+               }
+
+               public void parseBoundarySignalEventDefinition(Element signalEventDefinition, boolean interrupting, ActivityImpl signalActivity) {
+                       injectLogExecutionListener(signalActivity);
+               }
+
+               public void parseEventBasedGateway(Element eventBasedGwElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseTransaction(Element transactionElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseCompensateEventDefinition(Element compensateEventDefinition, ActivityImpl compensationActivity) {
+                       injectLogExecutionListener(compensationActivity);
+               }
+
+               public void parseIntermediateThrowEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseIntermediateCatchEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) {
+                       injectLogExecutionListener(activity);
+               }
+
+               public void parseBoundaryEvent(Element boundaryEventElement, ScopeImpl scopeElement, ActivityImpl nestedActivity) {
+                       injectLogExecutionListener(nestedActivity);
+               }
+
+               public void parseIntermediateMessageCatchEventDefinition(Element messageEventDefinition, ActivityImpl nestedActivity) {
+                       injectLogExecutionListener(nestedActivity);
+               }
+
+               public void parseBoundaryMessageEventDefinition(Element element, boolean interrupting, ActivityImpl messageActivity) {
+                       injectLogExecutionListener(messageActivity);
+               }
+       }
+
+       /**
+        * Initializes URN mapping variables on process entry.
+        */
+       public static class URNMappingInitializerListener implements ExecutionListener {
+               private String event;
+
+               public URNMappingInitializerListener(String eventData) {
+                       this.event = eventData;
+               }
+
+               public String getEvent() {
+                       return event;
+               }
+
+               public void notify(DelegateExecution execution) throws Exception {
+                       ProcessEngineConfigurationImpl processEngineConfiguration =
+                               Context.getProcessEngineConfiguration();
+                       loadURNProperties(execution, processEngineConfiguration);
+               }
+
+               private void loadURNProperties(DelegateExecution execution,
+                               ProcessEngineConfigurationImpl processEngineConfiguration) {
+                       Map<String,String> bpmnProps = PropertyConfiguration.getInstance().getProperties("mso.bpmn.properties");
+                       if (bpmnProps == null) {
+                               LOGGER.debug("Unable to load mso.bpmn.properties; loading URN Mapping from DB");
+                               
+                               LOGGER.error (MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, 
+                                       "Unable to load mso.bpmn.properties; loading URN Mapping from DB");
+                               
+                               loadFromDB(execution, processEngineConfiguration);
+                       } else {
+                               String fsEnabled = bpmnProps.get(FSPROPKEY);
+                               if (fsEnabled != null) {
+                                       if (Boolean.parseBoolean(fsEnabled)) {
+                                               LOGGER.debug("File system loading is enabled; loading URN properties from File system");
+                                               LOGGER.info(MessageEnum.BPMN_GENERAL_INFO,  "BPMN",  "File system loading is enabled; loading URN properties from File System");
+                                               loadFromFileSystem(execution);
+                                       } else {
+                                               LOGGER.debug("File system loading is disabled; loading URN properties from DB");
+                                               LOGGER.info (MessageEnum.BPMN_GENERAL_INFO, "BPMN", "File system loading is disabled; loading URN properties from DB");
+                                               
+                                               loadFromDB(execution, processEngineConfiguration);
+                                       }
+                               } else {
+                                       
+                                       LOGGER.error (MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, 
+                                               "Unable to retrieve URNMapping.FileSystemLoading.Enabled from mso.bpmn.properties; loading URN Mapping from DB");
+                                       
+                                       loadFromDB(execution, processEngineConfiguration);
+                               }
+                       }
+               }
+
+               private void loadFromFileSystem(DelegateExecution execution) {
+                       PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+                       Map<String,String> props = propertyConfiguration.getProperties("mso.bpmn.urn.properties");
+                       for (String key : props.keySet()) {
+                               String varName = URNMapping.createIdentifierFromURN(key);
+                               String varValue = props.get(key);
+                               execution.setVariable(varName, varValue);
+                       }
+               }
+
+               private void loadFromDB(DelegateExecution execution, ProcessEngineConfigurationImpl processEngineConfiguration) {
+                       Command<List<URNMapping>> command = new Command<List<URNMapping>>() {
+                               @SuppressWarnings("unchecked")
+                               public List<URNMapping> execute(CommandContext commandContext) {
+                                       return (List<URNMapping>) commandContext.getDbSqlSession().selectList(
+                                               "mso.urnMapping.selectAll", null);
+                               }
+                       };
+
+                       CustomMyBatisSessionFactory sessionFactory = new CustomMyBatisSessionFactory();
+                       sessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration,
+                               "customMyBatisConfiguration.xml");
+
+                       List<URNMapping> mappings = sessionFactory.getCommandExecutorTxRequired().execute(command);
+
+                       if (mappings != null && mappings.size() > 0) {
+                               for (URNMapping mapping : mappings) {
+                                       String varName = URNMapping.createIdentifierFromURN(mapping.getName());
+                                       String varValue = mapping.getValue();
+
+                                       LOGGER.debug("URN Mapping = '" + mapping.getName()
+                                               + "', setting variable '" + varName + "' to '" + varValue + "'");
+
+                                       execution.setVariable(varName, varValue);
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Sets the isDebugLogEnabled variable on process entry.
+        */
+       public static class LoggingInitializerListener implements ExecutionListener {
+               private String event;
+
+               public LoggingInitializerListener(String eventData) {
+                       this.event = eventData;
+               }
+
+               public String getEvent() {
+                       return event;
+               }
+
+               public void notify(DelegateExecution execution) throws Exception {
+                       String processKey = execution.getProcessEngineServices().getRepositoryService()
+                               .getProcessDefinition(execution.getProcessDefinitionId()).getKey();
+
+                       // If a "true" value is already injected, e.g. from a top-level flow, it SHOULD NOT be
+                       // overridden by the value in the URN mapping. This allows a top-level flow and all
+                       // invoked subflows to be debugged by turning on the debug flag for just the top-level
+                       // flow, assuming the isDebugEnabled flag variable is passed from the top-level flow to
+                       // its subflows.
+
+                       // If a "false" value is already injected, e.g. from a top-level flow, it SHOULD be
+                       // overridden by the value in the URN mapping.  This allows a subflow to be debugged
+                       // without turning on the the debug flag for the top-level flow.
+
+                       String injectedValue = (String) execution.getVariable("isDebugLogEnabled");
+                       String urnValue = "true".equals(execution.getVariable("URN_log_debug_" + processKey)) ? "true" : "false";
+
+                       if ("true".equals(injectedValue)) {
+                               LOGGER.debug("Setting isDebugLogEnabled to \"" + injectedValue + "\" for process: " + processKey + " (injected value)");
+                               execution.setVariable("isDebugLogEnabled", injectedValue);
+                       } else {
+                               LOGGER.debug("Setting isDebugLogEnabled to \"" + urnValue + "\" for process: " + processKey + " (from URN mapping)");
+                               execution.setVariable("isDebugLogEnabled", urnValue);
+                       }
+               }
+       }
+       
+       /**
+        * Logs details about the current activity.
+        */
+       public static class LoggingExecutionListener implements ExecutionListener {
+               private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+               private static ConcurrentHashMap<String, Long> startTimes = new ConcurrentHashMap<String, Long>();
+
+               private String event;
+
+               public LoggingExecutionListener(String event) {
+                       this.event = event;
+               }
+
+               public String getEvent() {
+                       return event;
+               }
+
+               public void notify(DelegateExecution execution) throws Exception {
+                       BPMNLogger.debug(
+                               (String) execution.getVariable("isDebugLogEnabled"),
+                               "Logging for activity---------------:" + event + ":"
+                                               + execution.getCurrentActivityName()
+                                               + ", processDefinitionId="
+                                               + execution.getProcessDefinitionId() + ", activtyId="
+                                               + execution.getCurrentActivityId() + ", activtyName='"
+                                               + execution.getCurrentActivityName() + "'"
+                                               + ", processInstanceId="
+                                               + execution.getProcessInstanceId() + ", businessKey="
+                                               + execution.getProcessBusinessKey() + ", executionId="
+                                               + execution.getId());
+
+                       if (!isBlank(execution.getCurrentActivityName())) {
+                               try {
+                                       String id = execution.getId();
+                                       if ("START".equals(event) && id != null ) {
+                                               startTimes.put(id, (Long)System.currentTimeMillis());
+                                       } else if ("END".equals(event) && id != null) {
+                                               String prefix = (String) execution.getVariable("prefix");
+
+                                               if (prefix != null ) {
+                                                       MsoLogger.setServiceName("MSO." + prefix.substring(0,prefix.length()-1));
+                                               }
+
+                                               String requestId = (String) execution.getVariable("att-mso-request-id");
+                                               String svcid = (String) execution.getVariable("att-mso-service-instance-id");
+                                               MsoLogger.setLogContext(requestId, svcid);
+                                               long startTime = startTimes.remove(id);
+
+                                               if (startTime != 0) {
+                                                       
+                                                       LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                                                                       event + ": " + execution.getCurrentActivityName(), "BPMN", execution.getCurrentActivityName(), null);
+                                                       
+                                               }
+                                       }
+                               } catch(Exception e) {
+                                       // Do nothing
+                               }
+                       }
+               }
+
+               private boolean isBlank(Object object) {
+                       return object == null || object.toString().trim().equals("");
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
new file mode 100644 (file)
index 0000000..10386d7
--- /dev/null
@@ -0,0 +1,170 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core.plugins;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior;
+import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.FieldDeclaration;
+import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
+import org.camunda.bpm.engine.impl.pvm.PvmTransition;
+import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
+import org.camunda.bpm.engine.impl.pvm.process.TransitionImpl;
+import org.camunda.bpm.engine.impl.util.xml.Element;
+
+import org.openecomp.mso.bpmn.core.BPMNLogger;
+import org.openecomp.mso.bpmn.core.WorkflowException;
+
+/**
+ * This plugin does the following:
+ * <ol>
+ * <li>
+ * Adds logic at the start of every Call Activity to remove any existing
+ * WorkflowException object from the execution (saving a copy of it in a
+ * different variable).
+ * </li>
+ * <li>
+ * Adds logic at the end of every Call Activity to generate a MSOWorkflowException
+ * event if there is a WorkflowException object in the execution.
+ * </li>
+ * </ol>
+ */
+public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
+       
+       @Override
+       public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
+               List<BpmnParseListener> preParseListeners =
+                       processEngineConfiguration.getCustomPreBPMNParseListeners();
+
+               if (preParseListeners == null) {
+                       preParseListeners = new ArrayList<BpmnParseListener>();
+                       processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
+               }
+
+               preParseListeners.add(new WorkflowExceptionParseListener());
+       }
+       
+       public static class WorkflowExceptionParseListener extends AbstractBpmnParseListener {
+               @Override
+               public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
+                       AtomicInteger triggerTaskIndex = new AtomicInteger(1);
+                       List<ActivityImpl> activities = new ArrayList<ActivityImpl>(processDefinition.getActivities());
+                       recurse(activities, triggerTaskIndex);
+               }
+
+               /**
+                * Helper method that recurses (into subprocesses) over all the listed activities.
+                * @param activities a list of workflow activities
+                * @param triggerTaskIndex the index of the next trigger task (mutable)
+                */
+               private void recurse(List<ActivityImpl> activities, AtomicInteger triggerTaskIndex) {
+                       for (ActivityImpl activity : activities) {
+                               String type = (String) activity.getProperty("type");
+
+                               if ("callActivity".equals(type)) {
+                                       // Add a WorkflowExceptionResetListener to clear the WorkflowException
+                                       // variable when each Call Activity starts.
+
+                                       activity.addListener(
+                                               ExecutionListener.EVENTNAME_START,
+                                               new WorkflowExceptionResetListener());
+
+                                       // Add a WorkflowExceptionTriggerTask after the call activity.
+                                       // It must be a task because a listener cannot be used to generate
+                                       // an event.  Throwing BpmnError from an execution listener will
+                                       // cause the process to die.
+
+                                       List<PvmTransition> outTransitions =
+                                               new ArrayList<PvmTransition>(activity.getOutgoingTransitions());
+
+                                       for (PvmTransition transition : outTransitions) {
+                                               String triggerTaskId = "WorkflowExceptionTriggerTask_" + triggerTaskIndex;
+
+                                               ActivityImpl triggerTask = activity.getFlowScope().createActivity(triggerTaskId);
+
+                                               ClassDelegateActivityBehavior behavior = new  ClassDelegateActivityBehavior(
+                                                               WorkflowExceptionTriggerTask.class.getName(),
+                                                               new ArrayList<FieldDeclaration>(0));
+
+                                               triggerTask.setActivityBehavior(behavior);
+                                               triggerTask.setName("Workflow Exception Trigger Task " + triggerTaskIndex);
+                                               triggerTaskIndex.getAndIncrement();
+
+                                               TransitionImpl transitionImpl = (TransitionImpl) transition;
+                                               TransitionImpl triggerTaskOutTransition = triggerTask.createOutgoingTransition();
+                                               triggerTaskOutTransition.setDestination((ActivityImpl)transitionImpl.getDestination());
+                                               transitionImpl.setDestination(triggerTask);
+                                       }
+                               } else if ("subProcess".equals(type)) {
+                                       recurse(new ArrayList<ActivityImpl>(activity.getActivities()), triggerTaskIndex);
+                               }
+                       }
+               }
+       }
+       
+    /**
+     * If there is a WorkflowException object in the execution, this method
+     * removes it (saving a copy of it in a different variable).
+     */
+       public static class WorkflowExceptionResetListener implements ExecutionListener {
+               public void notify(DelegateExecution execution) throws Exception {
+                       Object workflowException = execution.getVariable("WorkflowException");
+
+                       if (workflowException instanceof WorkflowException) {
+                               int index = 1;
+                               String saveName = "SavedWorkflowException" + index;
+                               while (execution.getVariable(saveName) != null) {
+                                       saveName = "SavedWorkflowException" + (++index);
+                               }
+
+                               BPMNLogger.debug((String)execution.getVariable("isDebugLogEnabled"),
+                                       "WorkflowExceptionResetTask is moving WorkflowException to " + saveName);
+
+                               execution.setVariable(saveName, workflowException);
+                               execution.setVariable("WorkflowException", null);
+                       }
+               }
+       }
+
+    /**
+     * Generates an MSOWorkflowException event if there is a WorkflowException
+     * object in the execution.
+     */
+       public static class WorkflowExceptionTriggerTask implements JavaDelegate {
+               public void execute(DelegateExecution execution) throws Exception {
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               BPMNLogger.debug((String)execution.getVariable("isDebugLogEnabled"),
+                                       "WorkflowExceptionTriggerTask is generating a MSOWorkflowException event");
+                               throw new BpmnError("MSOWorkflowException");
+                       }
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java
new file mode 100644 (file)
index 0000000..4211475
--- /dev/null
@@ -0,0 +1,340 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core.xml;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * XML transformation methods and other useful functions.
+ */
+public final class XmlTool {
+
+       private static final Map<String, Integer> ENTITIES = new HashMap<String, Integer>();
+
+       static {
+               ENTITIES.put("amp", new Integer(38));
+               ENTITIES.put("quot", new Integer(34));
+               ENTITIES.put("lt", new Integer(60));
+               ENTITIES.put("gt", new Integer(62));
+       }
+
+       /**
+        * Normalizes and formats XML.  This method consolidates and moves all namespace
+        * declarations to the root element.  The result will not have an XML prolog or
+        * a trailing newline.
+        * @param xml the XML to normalize
+        * @throws IOException 
+        * @throws TransformerException 
+        * @throws ParserConfigurationException 
+        * @throws SAXException 
+        * @throws XPathExpressionException 
+        */
+       public static String normalize(Object xml) throws IOException, TransformerException,
+                       ParserConfigurationException, SAXException, XPathExpressionException {
+               
+               if (xml == null) {
+                       return null;
+               }
+
+               Source xsltSource = new StreamSource(new StringReader(
+                       readResourceFile("normalize-namespaces.xsl")));
+
+               DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+               dbFactory.setNamespaceAware(true);
+               DocumentBuilder db = dbFactory.newDocumentBuilder();
+               InputSource source = new InputSource(new StringReader(String.valueOf(xml)));
+               Document doc = db.parse(source);
+
+               // Start of code to remove whitespace outside of tags
+               XPath xPath = XPathFactory.newInstance().newXPath();
+               NodeList nodeList = (NodeList) xPath.evaluate(
+                       "//text()[normalize-space()='']", doc, XPathConstants.NODESET);
+
+               for (int i = 0; i < nodeList.getLength(); ++i) {
+                       Node node = nodeList.item(i);
+                       node.getParentNode().removeChild(node);
+               }
+               // End of code to remove whitespace outside of tags
+
+               // the factory pattern supports different XSLT processors
+               TransformerFactory transformerFactory = TransformerFactory.newInstance();
+               Transformer transformer = transformerFactory.newTransformer(xsltSource);
+
+               transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+               transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+               transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+               transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
+
+               StringWriter writer = new StringWriter();
+               transformer.transform(new DOMSource(doc), new StreamResult(writer));
+               return writer.toString().trim();
+       }
+
+       /**
+        * Encodes a value so it can be used inside an XML text element.
+        * @param s the string to encode
+        * @return the encoded string
+        */
+       public static String encode(Object value) {
+               if (value == null) {
+                       return null;
+               }
+
+               String s = String.valueOf(value);
+               StringBuilder out = new StringBuilder();
+               boolean modified = false;
+
+               for (int i = 0; i < s.length(); i++) {
+                       char c = s.charAt(i);
+
+                       if (c == '<') {
+                               out.append("&lt;");
+                               modified = true;
+                       } else if (c == '>') {
+                               out.append("&gt;");
+                               modified = true;
+                       } else if (c == '&') {
+                               out.append("&amp;");
+                               modified = true;
+                       } else if (c < 32 || c > 126) {
+                               out.append("&#" + (int)c + ";");
+                               modified = true;
+                       } else {
+                               out.append(c);
+                       }
+               }
+
+               if (modified) {
+                       return out.toString();
+               } else {
+                       return s;
+               }
+       }
+       
+       /**
+        * Encodes a value so it can be used inside an XML attribute.
+        * @param s the string to encode
+        * @return the encoded string
+        */
+       public static String encodeAttr(Object value) {
+               if (value == null) {
+                       return null;
+               }
+
+               String s = String.valueOf(value);
+               StringBuilder out = new StringBuilder();
+               boolean modified = false;
+
+               for (int i = 0; i < s.length(); i++) {
+                       char c = s.charAt(i);
+
+                       if (c == '<') {
+                               out.append("&lt;");
+                               modified = true;
+                       } else if (c == '>') {
+                               out.append("&gt;");
+                               modified = true;
+                       } else if (c == '"') {
+                               out.append("&quot;");
+                               modified = true;
+                       } else if (c == '&') {
+                               out.append("&amp;");
+                               modified = true;
+                       } else if (c < 32 || c > 126) {
+                               out.append("&#" + (int)c + ";");
+                               modified = true;
+                       } else {
+                               out.append(c);
+                       }
+               }
+
+               if (modified) {
+                       return out.toString();
+               } else {
+                       return s;
+               }
+       }
+       
+       /**
+        * Decodes XML entities in a string value
+        * @param value a value with embedded XML entities
+        * @return the decoded string
+        */
+       public static String decode(Object value) {
+               if (value == null) {
+                       return null;
+               }
+               
+               String s = String.valueOf(value);
+
+               StringBuilder out = new StringBuilder(s.length());
+               int ampIndex = s.indexOf("&");
+               int lastEnd = 0;
+
+               while (ampIndex >= 0) {
+                       int nextAmpIndex = s.indexOf("&", ampIndex + 1);
+                       int nextSemiIndex = s.indexOf(";", ampIndex + 1);
+                       if (nextSemiIndex != -1 && (nextAmpIndex == -1 || nextSemiIndex < nextAmpIndex)) {
+                               int code = -1;
+                               String entity = s.substring(ampIndex + 1, nextSemiIndex);
+
+                               try {
+                                       if (entity.startsWith("#")) {
+                                               code = Integer.parseInt(entity.substring(1), 10);
+                                       } else {
+                                               if (ENTITIES.containsKey(entity)) {
+                                                       code = ENTITIES.get(entity);
+                                               }
+                                       }
+                               } catch (NumberFormatException x) {
+                                       // Do nothing
+                               }
+
+                               out.append(s.substring(lastEnd, ampIndex));
+                               lastEnd = nextSemiIndex + 1;
+                               if (code >= 0 && code <= 0xffff) {
+                                       out.append((char) code);
+                               } else {
+                                       out.append("&");
+                                       out.append(entity);
+                                       out.append(";");
+                               }
+                       }
+
+                       ampIndex = nextAmpIndex;
+               }
+
+               out.append(s.substring(lastEnd));
+               return out.toString();
+       }
+
+       /**
+        * Removes the preamble, if present, from an XML document.
+        * @param xml the XML document
+        * @return a possibly modified document
+        */
+       public static String removePreamble(Object xml) {
+               if (xml == null) {
+                       return null;
+               }
+
+               return String.valueOf(xml).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "");
+       }
+
+       /**
+        * Removes namespaces and namespace declarations from an XML document.
+        * @param xml the XML document
+        * @return a possibly modified document
+        */
+       public static String removeNamespaces(Object xml) {
+               if (xml == null) {
+                       return null;
+               }
+
+               String text = String.valueOf(xml);
+
+               // remove xmlns declaration
+               text = text.replaceAll("xmlns.*?(\"|\').*?(\"|\')", "");
+               // remove opening tag prefix
+               text = text.replaceAll("(<)(\\w+:)(.*?>)", "$1$3");
+               // remove closing tags prefix
+               text = text.replaceAll("(</)(\\w+:)(.*?>)", "$1$3");
+               // remove extra spaces left when xmlns declarations are removed
+               text = text.replaceAll("\\s+>", ">");
+
+               return text;
+       }
+
+
+       /**
+        * Reads the specified resource file and return the contents as a string.
+        * @param file Name of the resource file
+        * @return the contents of the resource file as a String
+        * @throws IOException if there is a problem reading the file
+        */
+       private static String readResourceFile(String file) throws IOException {
+               InputStream stream = null;
+               try {
+                       stream = XmlTool.class.getClassLoader().getResourceAsStream(file);
+
+                       if (stream == null) {
+                               throw new FileNotFoundException("No such resource file: " + file);
+                       }
+
+                       Reader reader = new InputStreamReader(stream, "UTF-8");
+                       StringBuilder out = new StringBuilder();
+                       char[] buf = new char[1024];
+                       int n;
+
+                       while ((n = reader.read(buf)) >= 0) {
+                               out.append(buf, 0, n);
+                       }
+
+                       stream.close();
+                       stream = null;
+                       return out.toString();
+               } finally {
+                       if (stream != null) {
+                               try {
+                                       stream.close();
+                               } catch (Exception e) {
+                                       // Ignore
+                               }
+                       }
+               }
+       }
+       
+       /**
+        * Instantiation is not allowed.
+        */
+       private XmlTool() {
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/CamundaDBSetup.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/CamundaDBSetup.java
new file mode 100644 (file)
index 0000000..13eed2d
--- /dev/null
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+/**
+ * Sets up the unit test (H2) database for Camunda.
+ */
+public class CamundaDBSetup {
+       private static boolean isDBConfigured = false;
+
+       public static synchronized void configure() throws SQLException {
+               if (isDBConfigured) {
+                       return;
+               }
+
+               System.out.println("Configuring the Camunda H2 database for MSO");
+
+               Connection connection = null;
+               PreparedStatement stmt = null;
+
+               try {
+                       connection = DriverManager.getConnection(
+                               "jdbc:h2:mem:camunda;DB_CLOSE_DELAY=-1", "sa", "");
+
+                       stmt = connection.prepareStatement("delete from ACT_HI_VARINST");
+                       stmt.executeUpdate();
+                       stmt.close();
+                       stmt = null;
+
+                       stmt = connection.prepareStatement("ALTER TABLE ACT_HI_VARINST alter column TEXT_ clob");
+                       stmt.executeUpdate();
+                       stmt.close();
+                       stmt = null;
+                       
+                       stmt = connection.prepareStatement("ALTER TABLE ACT_HI_VARINST alter column NAME_ clob");
+                       stmt.executeUpdate();
+                       stmt.close();
+                       stmt = null;
+
+                       stmt = connection.prepareStatement("delete from ACT_HI_DETAIL");
+                       stmt.executeUpdate();
+                       stmt.close();
+                       stmt = null;
+
+                       stmt = connection.prepareStatement("ALTER TABLE ACT_HI_DETAIL alter column TEXT_ clob");
+                       stmt.executeUpdate();
+                       stmt.close();
+                       stmt = null;
+
+                       stmt = connection.prepareStatement("ALTER TABLE ACT_HI_DETAIL alter column NAME_ clob");
+                       stmt.executeUpdate();
+                       stmt.close();
+                       stmt = null;
+
+                       stmt = connection.prepareStatement("ALTER TABLE ACT_RU_VARIABLE alter column TEXT_ clob");
+                       stmt.executeUpdate();
+                       stmt.close();
+                       stmt = null;
+
+                       connection.close();
+                       connection = null;
+
+                       isDBConfigured = true;
+               } catch (SQLException e) {
+                       System.out.println("CamundaDBSetup caught " + e.getClass().getSimpleName());
+                       e.printStackTrace();
+               } finally {
+                       if (stmt != null) {
+                               try {
+                                       stmt.close();
+                               } catch (Exception e) {
+                                       // Ignore
+                               }
+                       }
+
+                       if (connection != null) {
+                               try {
+                                       connection.close();
+                               } catch (Exception e) {
+                                       // Ignore
+                               }
+                       }
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/PropertyConfigurationSetup.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/test/PropertyConfigurationSetup.java
new file mode 100644 (file)
index 0000000..6f1cd7d
--- /dev/null
@@ -0,0 +1,315 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.test;
+
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.openecomp.mso.bpmn.core.PropertyConfiguration;
+
+/**
+ * Sets up mso.bpmn.properties and mso.bpmn.urn.properties for unit tests.
+ */
+public class PropertyConfigurationSetup {
+
+       private static Path msoConfigPath = null;
+       private static Path bpmnPropertiesPath = null;
+       private static Path bpmnUrnPropertiesPath = null;
+       private static boolean modifiedConfiguration = false;
+
+       /**
+        * Ensures that the the PropertyConfiguration is initialized and that the
+        * property data is reset to initial values.  Any extra properties that are
+        * specified will be merged with the initial values.  The following example
+        * shows how a test can specify a replacement URN mapping property.
+        * <pre>
+        *     Map<String, String> urnProperties =
+        *         PropertyConfigurationSetup.createBpmnUrnProperties();
+        *     urnProperties.add("mso.po.timeout", "PT1M");
+        *     PropertyConfiguration.init(urnProperties);
+        * </pre>
+        * @param args one or more maps created with createBpmnProperties()
+        *        and/or createBpmnUrnProperties()
+        */
+       public static synchronized void init(Object ... args) throws IOException {
+
+               Map<String, String> extraBpmnProperties = null;
+               Map<String, String> extraBpmnUrnProperties = null;
+               
+               boolean propertiesSpecified = false;
+
+               for (Object arg : args) {
+                       @SuppressWarnings("unchecked")
+                       Map<String, String> properties = (Map<String, String>) arg;
+
+                       String type = properties.get("PROPERTIES-TYPE");
+
+                       if (PropertyConfiguration.MSO_BPMN_PROPERTIES.equals(type)) {
+                               if (properties.size() > 1) {
+                                       extraBpmnProperties = properties;
+                                       propertiesSpecified = false;
+                               }
+                       } else if (PropertyConfiguration.MSO_BPMN_URN_PROPERTIES.equals(type)) {
+                               if (properties.size() > 1) {
+                                       extraBpmnUrnProperties = properties;
+                                       propertiesSpecified = false;
+                               }
+                       } else {
+                               throw new IllegalArgumentException("Not a supported PROPERTIES-TYPE map");
+                       }
+               }
+
+               // There are three cases in which we need to change the existing configuration:
+               //     1) There is no existing configuration, i.e. first time setup
+               //     2) The existing configuration was modified, i.e. it has non-default values
+               //     3) Non-default values are specified for this initialization
+
+               if (msoConfigPath == null || modifiedConfiguration || propertiesSpecified) {
+                       modifiedConfiguration = propertiesSpecified;
+
+                       Path bpmnPropertiesSourcePath = Paths.get("src", "test", "resources", "mso.bpmn.properties");
+                       Path bpmnUrnPropertiesSourcePath = Paths.get("src", "test", "resources", "mso.bpmn.urn.properties");
+
+                       if (msoConfigPath == null) {
+                               // Initialize from scratch.
+                               msoConfigPath = Files.createTempDirectory("mso-config-path-");
+                               System.setProperty("mso.config.path", msoConfigPath.toString());
+                               msoConfigPath.toFile().deleteOnExit();
+
+                               bpmnPropertiesPath = msoConfigPath.resolve("mso.bpmn.properties");
+                               mergeCopy(bpmnPropertiesSourcePath, extraBpmnProperties, bpmnPropertiesPath);
+                               bpmnPropertiesPath.toFile().deleteOnExit();
+
+                               bpmnUrnPropertiesPath = msoConfigPath.resolve("mso.bpmn.urn.properties");
+                               mergeCopy(bpmnUrnPropertiesSourcePath, extraBpmnUrnProperties, bpmnUrnPropertiesPath);
+                               bpmnUrnPropertiesPath.toFile().deleteOnExit();
+
+                               PropertyConfiguration.getInstance();
+                       } else {
+                               // Just reset the data.
+                               PropertyConfiguration.getInstance().clearCache();
+                               mergeCopy(bpmnPropertiesSourcePath, extraBpmnProperties, bpmnPropertiesPath);
+                               mergeCopy(bpmnUrnPropertiesSourcePath, extraBpmnUrnProperties, bpmnUrnPropertiesPath);
+                       }
+               }
+       }
+
+       /**
+        * Resets the PropertyConfiguration to its initial state, as if it had never
+        * been started. Note that this is a very expensive option and should not
+        * be needed by most unit tests.
+        * @throws IOException
+        */
+       public static synchronized void nuke() throws IOException {
+               if (msoConfigPath == null) {
+                       return;
+               }
+
+               PropertyConfiguration.getInstance().shutDown();
+
+               bpmnUrnPropertiesPath.toFile().delete();
+               bpmnUrnPropertiesPath = null;
+               
+               bpmnPropertiesPath.toFile().delete();
+               bpmnPropertiesPath = null;
+
+               msoConfigPath.toFile().delete();
+               msoConfigPath = null;
+               
+               System.setProperty("mso.config.path", null);
+
+               modifiedConfiguration = false;
+       }
+       
+       /**
+        * Create a map to hold properties to be added to mso.bpmn.properties.
+        */
+       public static Map<String, String> createBpmnProperties() {
+               Map<String, String> properties = new HashMap<String, String>();
+               properties.put("PROPERTIES-TYPE", PropertyConfiguration.MSO_BPMN_PROPERTIES);
+               return properties;
+       }
+
+       /**
+        * Create a map to hold properties to be added to mso.bpmn.urn.properties.
+        */
+       public static Map<String, String> createBpmnUrnProperties() {
+               Map<String, String> properties = new HashMap<String, String>();
+               properties.put("PROPERTIES-TYPE", PropertyConfiguration.MSO_BPMN_URN_PROPERTIES);
+               return properties;
+       }
+
+       /**
+        * Adds (or replaces) the specified values in the mso.bpmn.urn.properties file.
+        * Note that properties added this way may take some time to be loaded by the
+        * PropertyConfiguration, just like they do when a property file is updated on
+        * a real MSO system. This method will optionally wait for the new properties
+        * to be loaded.  Timeout results in an IOException.
+        * @param values new properties
+        * @param wait maximum amount of time to wait for new properties to be loaded,
+        *             in milliseconds.  A value of zero means, "Do not wait."
+        * @throws IOException
+        */
+       public static synchronized void addProperties(Map<String, String> properties, long wait)
+                       throws IOException, InterruptedException {
+
+               if (msoConfigPath == null) {
+                       throw new IllegalStateException();
+               }
+
+               String type = properties.get("PROPERTIES-TYPE");
+               Path path;
+
+               if (PropertyConfiguration.MSO_BPMN_PROPERTIES.equals(type)) {
+                       path = bpmnPropertiesPath;
+               } else if (PropertyConfiguration.MSO_BPMN_URN_PROPERTIES.equals(type)) {
+                       path = bpmnUrnPropertiesPath;
+               } else {
+                       throw new IllegalArgumentException("Not a supported PROPERTIES-TYPE map");
+               }
+
+               String oldTimestamp = PropertyConfiguration.getInstance().getProperties(type)
+                       .get(PropertyConfiguration.TIMESTAMP_PROPERTY);
+
+               modifiedConfiguration = true;
+               addProperties(properties, path);
+
+               if (wait <= 0) {
+                       return;
+               }
+
+               long endTime = System.currentTimeMillis() + wait;
+
+               while (true) {
+                       Thread.sleep(250);
+
+                       String newTimestamp = PropertyConfiguration.getInstance().getProperties(type)
+                               .get(PropertyConfiguration.TIMESTAMP_PROPERTY);
+
+                       if (newTimestamp != oldTimestamp) {
+                               return;
+                       }
+
+                       long now = System.currentTimeMillis();
+
+                       if (now >= endTime) {
+                               throw new IOException("Timed out after " + wait
+                                       + "ms waiting for PropertyConfiguration change");
+                       }
+               }
+       }
+
+       /**
+        * Helper method that adds properties to the specified file.
+        */
+       private static void addProperties(Map<String, String> values, Path path)
+                       throws IOException {
+
+               FileReader fileReader = null;
+               FileOutputStream outputStream = null;
+
+               try {
+                       fileReader = new FileReader(path.toFile());
+                       Properties properties = new Properties();
+                       properties.load(fileReader);
+
+                       for (String key : values.keySet()) {
+                               if (!key.equals("PROPERTIES-TYPE")) {
+                                       properties.setProperty(key, values.get(key));
+                               }
+                       }
+
+                       outputStream = new FileOutputStream(path.toFile());
+                       properties.store(outputStream, "Custom Test Properties");
+               } finally {
+                       if (fileReader != null) {
+                               try {
+                                       fileReader.close();
+                               } catch (IOException e) {
+                                       // Ignore
+                               }
+                       }
+
+                       if (outputStream != null) {
+                               try {
+                                       outputStream.close();
+                               } catch (IOException e) {
+                                       // Ignore
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Helper method that copies properties from the specified source file, and
+        * optionally merges them with the specified extra values, then writes the
+        * whole mess to the destination file.
+        */
+       private static void mergeCopy(Path sourcePath, Map<String, String> extraValues, Path destPath)
+                       throws IOException {
+               if (extraValues == null || extraValues.isEmpty()) {
+                       Files.copy(sourcePath, destPath, StandardCopyOption.REPLACE_EXISTING);
+                       return;
+               }
+
+               FileReader fileReader = null;
+               FileOutputStream outputStream = null;
+
+               try {
+                       fileReader = new FileReader(sourcePath.toFile());
+                       Properties properties = new Properties();
+                       properties.load(fileReader);
+
+                       for (String key : extraValues.keySet()) {
+                               if (!key.equals("PROPERTIES-TYPE")) {
+                                       properties.setProperty(key, extraValues.get(key));
+                               }
+                       }
+
+                       outputStream = new FileOutputStream(destPath.toFile());
+                       properties.store(outputStream, "Custom Test Properties");
+               } finally {
+                       if (fileReader != null) {
+                               try {
+                                       fileReader.close();
+                               } catch (IOException e) {
+                                       // Ignore
+                               }
+                       }
+
+                       if (outputStream != null) {
+                               try {
+                                       outputStream.close();
+                               } catch (IOException e) {
+                                       // Ignore
+                               }
+                       }
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/main/resources/customMyBatisConfiguration.xml b/bpmn/MSOCoreBPMN/src/main/resources/customMyBatisConfiguration.xml
new file mode 100644 (file)
index 0000000..2c3d5da
--- /dev/null
@@ -0,0 +1,32 @@
+<?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 configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
+
+<configuration>
+       <settings>
+               <setting name="lazyLoadingEnabled" value="false" />
+       </settings>
+       <mappers>
+        <mapper resource="urnMapping.xml" />
+       </mappers>
+</configuration>
diff --git a/bpmn/MSOCoreBPMN/src/main/resources/normalize-namespaces.xsl b/bpmn/MSOCoreBPMN/src/main/resources/normalize-namespaces.xsl
new file mode 100644 (file)
index 0000000..56c8a00
--- /dev/null
@@ -0,0 +1,185 @@
+<?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=========================================================
+  -->
+
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" extension-element-prefixes="exsl">
+  <!--
+   Select one namespace node for each unique URI (almost), excluding
+   the implicit "xml" namespace. This does not filter out namespace
+   nodes declared on the same element with the same URI (thanks to
+   limitations of XPath 1.0); we take care of that later... Note that if
+   we had a distinct() function, this would be much, much simpler,
+   e.g. distinct(//namespace::*)
+  -->
+  <xsl:variable name="almost-unique-uri-namespace-nodes" select="//namespace::*[name()!='xml'][not(.=../preceding::*/namespace::* or .=ancestor::*[position()&gt;1]/namespace::*)]"/>
+  
+  <!-- EXSLT functions are not supported by Saxon HE.  Define the function we need here -->
+  <xsl:function name="exsl:node-set" as="node()">
+    <xsl:param name="n" as="node()"/>
+    <xsl:sequence select="$n"/>
+  </xsl:function>
+
+  <!-- Create a table of URI-prefix bindings -->
+  <xsl:variable name="almost-unique-uri-bindings-tree">
+    <xsl:for-each select="$almost-unique-uri-namespace-nodes">
+      <binding>
+        <prefix>
+          <xsl:choose>
+            <!--
+             If there are any unqualified element names or
+             attributes in this namespace in our document,
+             then force default namespaces to use an arbitrary
+             prefix, because we want to guarantee that the
+             only namespace declarations in our result will
+             be attached to the root element.
+            -->
+            <xsl:when test="not(name()) and (//*[namespace-uri()=''] or //@*[namespace-uri()=current()])">
+              <xsl:variable name="alternate-prefix-candidate" select="//namespace::*[count(.|current())!=1][.=current()][name()!=''][1]"/>
+              <xsl:choose>
+                <xsl:when test="$alternate-prefix-candidate">
+                  <xsl:value-of select="name($alternate-prefix-candidate)"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <!--
+                   If no alternative candidates exist, then generate a
+                   "random" one.
+                  -->
+                  <xsl:value-of select="generate-id()"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="name()"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </prefix>
+        <uri>
+          <xsl:value-of select="."/>
+        </uri>
+      </binding>
+    </xsl:for-each>
+  </xsl:variable>
+
+  <!-- Select the first binding from the table for each unique URI -->
+  <xsl:variable name="unique-uri-bindings" select="exsl:node-set($almost-unique-uri-bindings-tree)/binding[not(uri=preceding::uri)]"/>
+
+  <!--
+   Since there is no <xsl:namespace/> instruction, the only way we
+   can create the namespace nodes we want is to create elements in
+   a certain namespace and with a certain (prefixed) name.
+  -->
+  <xsl:variable name="created-namespace-nodes-tree">
+    <xsl:for-each select="$unique-uri-bindings">
+      <xsl:variable name="prefix">
+        <xsl:choose>
+          <!-- Replace a duplicated prefix with a different prefix. -->
+          <xsl:when test="prefix=preceding::prefix">
+            <xsl:value-of select="generate-id()"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="prefix"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="maybe-colon">
+        <xsl:if test="string($prefix)">:</xsl:if>
+      </xsl:variable>
+      <xsl:element name="{$prefix}{$maybe-colon}temporary" namespace="{uri}"/>
+    </xsl:for-each>
+  </xsl:variable>
+
+  <!--
+   Select all the namespace nodes from our temporary tree
+   of namespace-decorated elements.
+  -->
+  <xsl:variable name="created-namespace-nodes" select="exsl:node-set($created-namespace-nodes-tree)//namespace::*"/>
+
+  <!--
+   Do for the root element the same thing we do for every element,
+   except that we explicitly copy all of our namespace nodes onto
+   the root element, eliminating the need for namespace declarations
+   to appear anywhere else in the output.
+  -->
+  <xsl:template match="/*">
+    <xsl:call-template name="copy">
+      <xsl:with-param name="insert-namespace-declarations" select="true()"/>
+    </xsl:call-template>
+    <!-- <xsl:call-template name="do-xsl-message-diagnostics"/> -->
+  </xsl:template>
+
+  <!--
+   For each element, create a new element with the same expanded name,
+   but not necessarily the same QName. We create a new element instead
+   of copying the original, because, besides potentially having a
+   QName we don't want, a copy would include with it all of the
+   namespace nodes attached to the original, and we don't necessarily
+   want that.
+  -->
+  <xsl:template match="*" name="copy">
+    <xsl:param name="insert-namespace-declarations"/>
+    <xsl:variable name="prefix" select="name($created-namespace-nodes[.=namespace-uri(current())])"/>
+    <xsl:variable name="maybe-colon">
+      <xsl:if test="$prefix">:</xsl:if>
+    </xsl:variable>
+    <xsl:element name="{$prefix}{$maybe-colon}{local-name()}" namespace="{namespace-uri()}">
+      <xsl:if test="$insert-namespace-declarations">
+        <xsl:copy-of select="$created-namespace-nodes"/>
+      </xsl:if>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:element>
+  </xsl:template>
+
+  <!--
+   For each attribute, create a new attribute with the same expanded
+   name, but not necessarily the same QName.
+  -->
+  <xsl:template match="@*">
+    <xsl:variable name="prefix" select="name($created-namespace-nodes[.=namespace-uri(current())])"/>
+    <xsl:variable name="maybe-colon">
+      <xsl:if test="$prefix">:</xsl:if>
+    </xsl:variable>
+    <xsl:attribute name="{$prefix}{$maybe-colon}{local-name()}" namespace="{namespace-uri()}">
+      <xsl:value-of select="."/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <!-- Do a simple copy of text, comments, and processing instructions -->
+  <xsl:template match="text()|comment()|processing-instruction()">
+    <xsl:copy/>
+  </xsl:template>
+
+  <!-- Print out some diagnostics to show what's going on beneath the covers. -->
+  <xsl:template name="do-xsl-message-diagnostics">
+    <xsl:message>
+      <diagnostics xml:space="preserve">
+        <diagnostic name="almost-unique-uri-bindings-tree">
+          <xsl:copy-of select="$almost-unique-uri-bindings-tree"/>
+        </diagnostic>
+        <diagnostic name="unique-uri-bindings">
+          <xsl:copy-of select="$unique-uri-bindings"/>
+        </diagnostic>
+        <diagnostic name="created-namespace-nodes-tree">
+          <xsl:copy-of select="$created-namespace-nodes-tree"/>
+        </diagnostic>
+      </diagnostics>
+    </xsl:message>
+  </xsl:template>
+
+</xsl:transform>
diff --git a/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml b/bpmn/MSOCoreBPMN/src/main/resources/urnMapping.xml
new file mode 100644 (file)
index 0000000..fd5d586
--- /dev/null
@@ -0,0 +1,44 @@
+<?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 mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="mso.urnMapping">
+
+       <resultMap id="urnMapping" type="org.openecomp.mso.bpmn.core.mybatis.URNMapping">
+               <result property="name" column="NAME_" jdbcType="VARCHAR"/>
+               <result property="value" column="VALUE_" jdbcType="VARCHAR" />
+               <result property="rev" column="REV_" jdbcType="INTEGER" />
+       </resultMap>
+
+       <select id="selectAll" resultMap="urnMapping">
+               select NAME_, VALUE_, REV_
+               from ATT_URN_MAPPING
+       </select>
+
+       <select id="selectOne" resultMap="urnMapping">
+               select NAME_, VALUE_, REV_
+               from ATT_URN_MAPPING
+               where name = #{name}
+       </select>
+
+</mapper>
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTest.java
new file mode 100644 (file)
index 0000000..71b9e08
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:35:04 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class BPMNLoggerESTest extends BPMNLoggerESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      BPMNLogger.debug("true", "<,A1M\"[ K3\\u");
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      BPMNLogger.debug("trud", (String) null);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      BPMNLogger bPMNLogger0 = new BPMNLogger();
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BPMNLoggerESTestscaffolding.java
new file mode 100644 (file)
index 0000000..2449157
--- /dev/null
@@ -0,0 +1,106 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:35:04 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class BPMNLoggerESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.BPMNLogger"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BPMNLoggerESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.openecomp.mso.bpmn.core.BPMNLogger",
+      "com.att.eelf.i18n.EELFResourceManager"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(BPMNLoggerESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.bpmn.core.BPMNLogger"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTest.java
new file mode 100644 (file)
index 0000000..113c819
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:35:23 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class BadInjectedFieldExceptionESTest extends BadInjectedFieldExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      BadInjectedFieldException badInjectedFieldException0 = new BadInjectedFieldException("", "", "");
+      BadInjectedFieldException badInjectedFieldException1 = new BadInjectedFieldException("y#,,", "4tX0!<", (Object) badInjectedFieldException0, (Throwable) badInjectedFieldException0);
+      assertFalse(badInjectedFieldException1.equals((Object)badInjectedFieldException0));
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/BadInjectedFieldExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..69ee3dc
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:35:23 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class BadInjectedFieldExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.BadInjectedFieldException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BadInjectedFieldExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(BadInjectedFieldExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java
new file mode 100644 (file)
index 0000000..6176029
--- /dev/null
@@ -0,0 +1,255 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.xml.sax.SAXException;
+import org.custommonkey.xmlunit.Diff;
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.bpmn.core.xml.XmlTool;
+
+/**
+ * @version 1.0
+ */
+public class JsonUtilsTest {
+
+       private static final String EOL = "\n";
+       private String xmlReq =
+                       "<vnf-request xmlns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\">" + EOL +
+                       "  <request-info>" + EOL +
+                       "    <request-id>DEV-VF-0021</request-id>" + EOL +
+                       "    <action>CREATE_VF_MODULE</action>" + EOL +
+                       "    <source>PORTAL</source>" + EOL +
+                       "  </request-info>" + EOL +
+                       "  <vnf-inputs>" + EOL +
+                       "    <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+                       "    <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+                       "    <vnf-type>asc_heat-int</vnf-type>" + EOL +
+                       "    <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+                       "    <vf-module-model-name>STMTN5MMSC21-MMSC::model-1-0</vf-module-model-name>" + EOL +
+                       "    <is-base-module>true</is-base-module>" + EOL +
+                       "    <persona-model-id>00000000-0000-0000-0000-000000000000</persona-model-id>" + EOL +
+                       "    <persona-model-version>1.0</persona-model-version>" + EOL +
+                       "    <vnf-persona-model-id>999999999-0000-0000-0000-000000000000</vnf-persona-model-id>" + EOL +
+                       "    <vnf-persona-model-version>1.5</vnf-persona-model-version>" + EOL +
+                       "    <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+                       "    <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+                       "    <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+                       "    <orchestration-status>pending-delete</orchestration-status>" + EOL +
+                       "    <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+                       "    <asdc-service-model-version>1</asdc-service-model-version>" + EOL +
+                       "  </vnf-inputs>" + EOL +
+                       "  <vnf-params xmlns:tns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\">" + EOL +
+                       "    <param name=\"network\">network1111</param>" + EOL +
+                       "    <param name=\"server\">server1111</param>" + EOL +
+                       "  </vnf-params> " + EOL +
+                       "</vnf-request>" + EOL;
+       
+       private String xmlReqNoAttrs =
+                       "<vnf-request xmlns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\">" + EOL +
+                       "  <request-info>" + EOL +
+                       "    <action>DELETE_VF_MODULE</action>" + EOL +
+                       "    <source>PORTAL</source>" + EOL +
+                       "  </request-info>" + EOL +
+                       "  <vnf-inputs>" + EOL +
+                       "    <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+                       "    <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+                       "    <vnf-type>asc_heat-int</vnf-type>" + EOL +
+                       "    <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+                       "    <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+                       "    <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+                       "    <service-type>SDN-ETHERNET-INTERNET</service-type>" + EOL +
+                       "    <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+                       "    <orchestration-status>pending-delete</orchestration-status>" + EOL +
+                       "    <aic-cloud-region>RDM2WAGPLCP</aic-cloud-region>" + EOL +
+                       "  </vnf-inputs>" + EOL +
+                       "  <vnf-params xmlns:tns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\"/>" + EOL +
+                       "</vnf-request>" + EOL;
+
+       // JSON request w/ embedded XML will be read from a file
+       private String jsonReq = null;
+       
+       @Before
+       public void initialize() {
+               File file = new File("src/test/resources/request.json");
+               FileInputStream fis = null;
+
+               try {
+                       fis = new FileInputStream(file);
+                       BufferedReader br = new BufferedReader(new InputStreamReader(fis));
+                       jsonReq = br.readLine();
+                       if (jsonReq != null) {
+                               System.out.println("initialize(): json request: " + jsonReq);                           
+                       } else {
+                               System.out.println("initialize(): failed to read json request from src/test/resources/request.json");
+                       }
+               } catch (IOException e) {
+                       e.printStackTrace();
+               } finally {
+                       try {
+                               if (fis != null)
+                                       fis.close();
+                       } catch (IOException ex) {
+                               ex.printStackTrace();
+                       }
+               }
+       }
+       
+       @After
+       public void cleanup(){
+       }
+
+       @Test
+       public void testConversion() {
+               // Note: the current version of the JsonUtils.json2xml() method
+               // does not support converting the JSONObject representation
+               // of XML attributes (JSONArray) back to XML. So this test will
+               // only succeed if the original XML does not contain attributes
+               
+               // save a copy of the xml with the namespaces removed
+               String xmlIn = XmlTool.removeNamespaces(xmlReqNoAttrs);
+               // strip all the whitespace
+               xmlIn = xmlIn.replaceAll("\\s+","");
+               String json = JsonUtils.xml2json(xmlReqNoAttrs);
+               System.out.println("testConversion(): xml request to json: " + json);
+               String xmlOut = JsonUtils.json2xml(json);
+               System.out.println("testConversion(): json request back to xml: " + xmlOut);
+               
+               // strip all the whitespace
+               xmlOut = xmlOut.replaceAll("\\s+","");
+//             System.out.println("testConversion(): xml in: " + xmlIn);
+//             System.out.println("testConversion(): xml out: " + xmlOut);
+
+               Diff diffXml;
+               try {
+                       diffXml = new Diff(xmlIn, xmlOut);
+                       Assert.assertTrue(diffXml.similar());
+//                     Assert.assertTrue(diffXml.identical());
+               } catch (SAXException e) {
+                       e.printStackTrace();
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+       }
+
+       @Test
+       public void testRetrieval() {
+               String json = JsonUtils.xml2json(xmlReq);
+               System.out.println("testRetrieval(): xml request to json: " + json);
+               // full JSON path
+               String value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.vnf-name");
+               Assert.assertEquals(value, "STMTN5MMSC21");
+               value = JsonUtils.getJsonValue(json, "vnf-request.request-info.action");
+               Assert.assertEquals(value, "CREATE_VF_MODULE");
+               // retrieving an integer
+               value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.persona-model-version");
+               Assert.assertEquals(value, "1");
+               // retrieving a float
+               value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.vnf-persona-model-version");
+               Assert.assertEquals(value, "1.5");
+               // retrieving a boolean
+               value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.is-base-module");
+               Assert.assertEquals(value, "true");
+               // attempt to retrieve a value for a non-existent field
+               value = JsonUtils.getJsonValue(json, "vnf-request.vnf-inputs.bad");
+               Assert.assertEquals(value, null);
+               // retrieving a parameter value (originally a XML attribute)
+               value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "server");
+//             Assert.assertEquals(value, "[{\"content\":\"network1111\",\"name\":\"network\"},{\"content\":\"server1111\",\"name\":\"server\"}]");
+               Assert.assertEquals(value, "server1111");
+               value = JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "badParam");
+               Assert.assertEquals(value, null);
+               // by field name/key
+               value = JsonUtils.getJsonValueForKey(json, "source");
+               Assert.assertEquals(value, "PORTAL");
+               value = JsonUtils.getJsonValueForKey(json, "vnf-module");
+               Assert.assertEquals(value, null);       
+       }
+
+       @Test
+       public void testUpdate() {
+               String json = JsonUtils.xml2json(xmlReq);
+               System.out.println("testUpdate(): xml request to json: " + json);
+               // the add should be successful
+               String jsonUpd = JsonUtils.addJsonValue(json, "vnf-request.request-info.comment", "Some comment");
+//             System.out.println("testUpdate(): post add json request: " + jsonUpd);
+               String value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.request-info.comment");
+               Assert.assertEquals(value, "Some comment");
+               // the add should be ignored as the field already exists
+               jsonUpd = JsonUtils.addJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name", "STMTN5MMSC22");
+               value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name");
+               Assert.assertEquals(value, "STMTN5MMSC21");
+               // the update should be successful
+               jsonUpd = JsonUtils.updJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name", "STMTN5MMSC22");
+//             System.out.println("testUpdate(): post update json request: " + jsonUpd);
+               value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-name");
+               Assert.assertEquals(value, "STMTN5MMSC22");
+               // the delete should be successful
+               jsonUpd = JsonUtils.delJsonValue(jsonUpd, "vnf-request.request-info.comment");
+//             System.out.println("testUpdate(): post delete json request: " + jsonUpd);
+               value = JsonUtils.getJsonValue(jsonUpd, "vnf-request.request-info.comment");
+               Assert.assertEquals(value, null);
+               // the delete should fail as field 'vnf-model' does not exist
+               String jsonCur = jsonUpd;
+               jsonUpd = JsonUtils.delJsonValue(jsonUpd, "vnf-request.vnf-inputs.vnf-module");
+               Assert.assertEquals(jsonCur, jsonUpd);          
+       }
+       
+       @Test
+       public void testEmbededXmlRetrievalConversion() {
+               try {
+                       // extract the embedded XML from the request
+                       String value = JsonUtils.getJsonValue(jsonReq, "variables.bpmnRequest.value");
+                       String xmlReq = XmlTool.removeNamespaces(XmlTool.normalize(value));
+                       System.out.println("testEmbededXmlRetrievalConversion(): xml payload: " + xmlReq);
+                       // strip all the whitespace
+//                     xmlIn = xmlIn.replaceAll("\\s+","");
+                       String json = JsonUtils.xml2json(xmlReq);
+                       System.out.println("testEmbededXmlRetrievalConversion(): xml request to json: " + json);
+                       String xmlOut = JsonUtils.json2xml(json);
+                       System.out.println("testEmbededXmlRetrievalConversion(): json request back to xml: " + xmlOut);
+                       Diff diffXml;
+                       try {
+                               // compare the XML before and after
+                               diffXml = new Diff(xmlReq, xmlOut);
+                               Assert.assertTrue(diffXml.similar());
+                       } catch (SAXException e) {
+                               e.printStackTrace();
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+                       
+               } catch (Exception e) {
+                       e.printStackTrace();
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTest.java
new file mode 100644 (file)
index 0000000..70e5050
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:29:34 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class LogTaskESTest extends LogTaskESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      LogTask logTask0 = null;
+      try {
+        logTask0 = new LogTask();
+        fail("Expecting exception: NoClassDefFoundError");
+      
+      } catch(NoClassDefFoundError e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      ExecutionImpl executionImpl0 = new ExecutionImpl();
+      LogTask logTask0 = null;
+      try {
+        logTask0 = new LogTask();
+        fail("Expecting exception: NoClassDefFoundError");
+      
+      } catch(NoClassDefFoundError e) {
+      }
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/LogTaskESTestscaffolding.java
new file mode 100644 (file)
index 0000000..ab7ee56
--- /dev/null
@@ -0,0 +1,342 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:29:34 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class LogTaskESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.LogTask"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(LogTaskESTestscaffolding.class.getClassLoader() ,
+      "org.camunda.bpm.engine.impl.persistence.entity.IdentityLinkEntity",
+      "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
+      "org.camunda.bpm.engine.impl.context.CaseExecutionContext",
+      "org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformFactory",
+      "org.camunda.bpm.engine.impl.pvm.PvmScope",
+      "org.camunda.bpm.engine.delegate.JavaDelegate",
+      "org.camunda.bpm.engine.runtime.ProcessInstance",
+      "org.camunda.bpm.engine.impl.tree.TreeWalker$WalkCondition",
+      "org.camunda.bpm.application.ProcessApplicationReference",
+      "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
+      "org.camunda.bpm.engine.impl.jobexecutor.FailedJobCommandFactory",
+      "org.camunda.bpm.engine.delegate.DelegateExecution",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration",
+      "org.camunda.bpm.engine.delegate.CmmnModelExecutionContext",
+      "org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.camunda.bpm.engine.impl.javax.el.ELContext",
+      "org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher",
+      "org.camunda.bpm.engine.variable.type.ValueType",
+      "org.camunda.bpm.engine.impl.interceptor.CommandContextListener",
+      "org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnCaseInstance",
+      "org.camunda.bpm.engine.repository.CaseDefinition",
+      "org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity",
+      "org.camunda.bpm.engine.impl.db.HasDbRevision",
+      "org.camunda.bpm.model.bpmn.instance.FlowElement",
+      "org.camunda.bpm.engine.delegate.Expression",
+      "org.camunda.bpm.engine.variable.type.SerializableValueType",
+      "org.camunda.bpm.engine.impl.pvm.PvmActivity",
+      "org.camunda.bpm.engine.impl.cfg.BpmnParseFactory",
+      "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
+      "org.camunda.bpm.model.cmmn.instance.CmmnModelElementInstance",
+      "org.camunda.bpm.engine.impl.pvm.PvmException",
+      "org.camunda.bpm.engine.task.DelegationState",
+      "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
+      "org.camunda.bpm.application.ProcessApplicationUnavailableException",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
+      "org.camunda.bpm.engine.delegate.DelegateCaseExecution",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration",
+      "org.camunda.bpm.engine.runtime.CaseExecution",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
+      "org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore",
+      "org.camunda.bpm.engine.repository.ProcessDefinition",
+      "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
+      "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperation",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.camunda.bpm.engine.task.IdentityLink",
+      "org.camunda.bpm.engine.impl.interceptor.SessionFactory",
+      "org.camunda.bpm.engine.delegate.DelegateTask",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
+      "org.camunda.bpm.engine.impl.core.model.CoreActivity",
+      "org.camunda.bpm.model.bpmn.BpmnModelInstance",
+      "org.camunda.bpm.engine.delegate.VariableScope",
+      "org.camunda.bpm.engine.ProcessEngine",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
+      "org.camunda.bpm.engine.impl.interceptor.CommandContext",
+      "org.camunda.bpm.engine.impl.variable.listener.CaseVariableListenerInvocation",
+      "org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.camunda.bpm.engine.BadUserRequestException",
+      "org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity",
+      "org.camunda.bpm.engine.impl.context.ExecutionContext",
+      "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.authorization.Authorization",
+      "org.camunda.bpm.engine.ProcessEngineServices",
+      "org.camunda.bpm.engine.runtime.Execution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.Lane",
+      "org.camunda.bpm.engine.impl.pvm.process.ParticipantProcess",
+      "org.camunda.bpm.engine.impl.interceptor.CommandExecutor",
+      "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
+      "org.camunda.bpm.engine.ProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
+      "org.camunda.bpm.engine.impl.util.BitMaskUtil",
+      "org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition",
+      "org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior",
+      "org.camunda.bpm.engine.impl.core.variable.event.VariableEvent",
+      "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
+      "org.camunda.bpm.engine.impl.pvm.PvmExecution",
+      "org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity",
+      "org.camunda.bpm.engine.runtime.VariableInstance",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableStore",
+      "org.camunda.bpm.engine.runtime.Job",
+      "org.camunda.bpm.engine.runtime.Incident",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState$CaseExecutionStateImpl",
+      "org.camunda.bpm.model.xml.ModelInstance",
+      "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.camunda.bpm.engine.impl.core.variable.value.NullValueImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
+      "org.camunda.bpm.model.bpmn.instance.UserTask",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.engine.impl.variable.serializer.ValueFields",
+      "org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation",
+      "org.camunda.bpm.engine.impl.task.TaskDecorator",
+      "org.camunda.bpm.engine.impl.jobexecutor.JobExecutorContext",
+      "org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation",
+      "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
+      "org.camunda.bpm.model.xml.instance.ModelElementInstance",
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState$SuspensionStateImpl",
+      "org.camunda.bpm.engine.impl.db.DbEntity",
+      "org.camunda.bpm.model.bpmn.instance.InteractionNode",
+      "org.camunda.bpm.engine.impl.task.TaskDefinition",
+      "org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution",
+      "org.camunda.bpm.engine.runtime.EventSubscription",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
+      "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
+      "org.camunda.bpm.model.bpmn.instance.Activity",
+      "org.camunda.bpm.engine.management.JobDefinition",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior",
+      "org.camunda.bpm.engine.impl.core.variable.scope.MapBasedVariableStore",
+      "org.camunda.bpm.engine.impl.javax.el.ValueReference",
+      "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
+      "org.camunda.bpm.engine.impl.persistence.entity.ByteArrayEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext",
+      "org.camunda.bpm.engine.delegate.DelegateCaseVariableInstance",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessElement",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.camunda.bpm.engine.impl.delegate.DelegateInvocation",
+      "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireProcessStart",
+      "org.camunda.bpm.engine.runtime.CaseInstance",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
+      "org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
+      "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
+      "org.camunda.bpm.engine.impl.interceptor.CommandInterceptor",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseSentryPartImpl",
+      "org.camunda.bpm.engine.variable.value.TypedValue",
+      "org.openecomp.mso.logger.MsoAlarmLogger",
+      "org.apache.ibatis.transaction.TransactionFactory",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnSentryPart",
+      "org.camunda.bpm.engine.impl.pvm.process.LaneSet",
+      "org.camunda.bpm.engine.delegate.DelegateListener",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnActivityExecution",
+      "org.camunda.bpm.engine.impl.persistence.entity.TaskEntityVariableStore",
+      "org.camunda.bpm.engine.delegate.ExecutionListener",
+      "org.camunda.bpm.engine.exception.NotAllowedException",
+      "org.camunda.bpm.engine.impl.history.event.HistoryEventType",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "org.openecomp.mso.bpmn.core.LogTask",
+      "org.camunda.bpm.engine.impl.pvm.process.HasDIBounds",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.camunda.bpm.engine.task.Task",
+      "org.camunda.bpm.engine.impl.javax.el.Expression",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmEventAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
+      "org.camunda.bpm.engine.impl.context.CoreExecutionContext",
+      "org.camunda.bpm.engine.delegate.DelegateVariableInstance",
+      "org.camunda.bpm.model.bpmn.instance.FlowNode",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
+      "org.camunda.bpm.model.cmmn.CmmnModelInstance",
+      "org.camunda.bpm.model.bpmn.instance.Task",
+      "org.camunda.bpm.engine.variable.VariableMap",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState$ActivityInstanceStateImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
+      "org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl",
+      "org.camunda.bpm.model.bpmn.instance.BaseElement",
+      "org.camunda.bpm.engine.exception.NullValueException",
+      "org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore",
+      "org.camunda.bpm.engine.impl.context.BpmnExecutionContext",
+      "org.openecomp.mso.bpmn.core.BaseTask",
+      "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
+      "org.apache.ibatis.session.SqlSessionFactory",
+      "org.camunda.bpm.engine.impl.variable.AbstractPersistentVariableStore",
+      "org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.camunda.bpm.engine.impl.el.FixedValue",
+      "org.camunda.bpm.engine.impl.core.delegate.CoreActivityBehavior",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.camunda.bpm.engine.SuspendedEntityInteractionException",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.camunda.bpm.engine.impl.db.HasDbReferences",
+      "org.camunda.bpm.engine.impl.tree.Collector",
+      "com.att.eelf.configuration.EELFManager",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionStartContext",
+      "org.camunda.bpm.engine.impl.core.operation.CoreAtomicOperation",
+      "org.camunda.bpm.engine.impl.el.Expression",
+      "org.camunda.bpm.engine.impl.pvm.PvmTransition",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
+      "org.camunda.bpm.model.cmmn.instance.CmmnElement",
+      "org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart",
+      "org.camunda.bpm.engine.impl.jobexecutor.JobHandler",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
+      "org.camunda.bpm.engine.impl.core.variable.CoreVariableInstance",
+      "org.camunda.bpm.engine.variable.type.PrimitiveValueType",
+      "org.camunda.bpm.engine.delegate.VariableListener",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(LogTaskESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
+      "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.impl.javax.el.Expression",
+      "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
+      "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
+      "org.camunda.bpm.engine.impl.core.model.CoreActivity",
+      "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "org.camunda.bpm.engine.impl.pvm.PvmException",
+      "org.camunda.bpm.engine.exception.NullValueException",
+      "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
+      "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
+      "org.camunda.bpm.engine.impl.util.BitMaskUtil",
+      "org.camunda.bpm.engine.impl.core.variable.value.NullValueImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
+      "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
+      "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
+      "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoAlarmLogger",
+      "org.openecomp.mso.bpmn.core.LogTask"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTest.java
new file mode 100644 (file)
index 0000000..f62d6af
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:35:52 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MissingInjectedFieldExceptionESTest extends MissingInjectedFieldExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MissingInjectedFieldException missingInjectedFieldException0 = new MissingInjectedFieldException("", "");
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/MissingInjectedFieldExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..03cb94f
--- /dev/null
@@ -0,0 +1,85 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:35:52 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MissingInjectedFieldExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.MissingInjectedFieldException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MissingInjectedFieldExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MissingInjectedFieldExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
new file mode 100644 (file)
index 0000000..ff92355
--- /dev/null
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.openecomp.mso.bpmn.test.PropertyConfigurationSetup;
+
+public class PropertyConfigurationTest {
+       @Before
+       public void beforeTest() throws IOException {
+               Map<String, String> defaultProperties = PropertyConfigurationSetup.createBpmnProperties();
+               defaultProperties.put("testValue", "testKey");
+               PropertyConfigurationSetup.init(defaultProperties);
+       }
+       
+       @Test
+       public void testPropertyFileWatcher() throws InterruptedException, IOException {
+               Assert.assertEquals(true, PropertyConfiguration.getInstance().isFileWatcherRunning());
+       }
+       
+       @Test
+       public void testPropertyLoading() throws IOException, InterruptedException {
+               PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+               Map<String,String> props = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+               Assert.assertNotNull(props);
+               Assert.assertEquals("testValue", props.get("testKey"));
+       }
+       
+       @Test
+       public void testPropertyReload() throws IOException, InterruptedException {
+               PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+               Map<String,String> properties = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+               Assert.assertNotNull(properties);
+               Assert.assertEquals("testValue", properties.get("testKey"));
+
+               Map<String, String> newProperties = PropertyConfigurationSetup.createBpmnProperties();
+               newProperties.put("newKey", "newValue");
+               PropertyConfigurationSetup.addProperties(newProperties, 10000);
+
+               // Reload and check for the new value
+               properties = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+               Assert.assertNotNull(properties);
+               Assert.assertEquals("newValue", properties.get("newKey"));
+       }
+       
+       @Test(expected=IllegalArgumentException.class)
+       public void testPropertyFileDoesNotExists_NotIntheList() throws IOException {
+               PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+               propertyConfiguration.getProperties("badfile.properties");
+               Assert.fail("Expected IllegalArgumentException");
+       }
+       
+       @Test(expected=java.lang.UnsupportedOperationException.class)
+       public void testPropertyModificationException() throws IOException {
+               PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+               Map<String,String> props = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+               Assert.assertNotNull(props);
+               Assert.assertEquals("testValue", props.get("testKey"));
+               props.put("newKey", "newvalue");
+       }
+       
+       @Test
+       public void testNotAllowedPropertyReloading() throws IOException {
+               Path msoConfigPath = Paths.get(System.getProperty("mso.config.path"));
+               Path backupPropFilePath = msoConfigPath.resolve("backup-" + PropertyConfiguration.MSO_BPMN_PROPERTIES);
+
+               try {
+                       // Create a new file... a backup file
+                       Files.createFile(backupPropFilePath);
+
+                       // Load properties
+                       PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+                       Map<String,String> props = propertyConfiguration.getProperties(PropertyConfiguration.MSO_BPMN_PROPERTIES);
+                       Assert.assertNotNull(props);
+                       Assert.assertEquals("testValue", props.get("testKey"));
+
+                       // Update the backup file
+                       Path bpmnPropertiesSourcePath = Paths.get("src", "test", "resources", "mso.bpmn.properties");
+                       Files.copy(bpmnPropertiesSourcePath, backupPropFilePath, StandardCopyOption.REPLACE_EXISTING);
+
+                       // Cache size should remain the same
+                       Assert.assertEquals(1, PropertyConfiguration.getInstance().cacheSize());
+               } finally {
+                       backupPropFilePath.toFile().delete();
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTest.java
new file mode 100644 (file)
index 0000000..6422685
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:29:36 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.camunda.bpm.engine.delegate.Expression;
+import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ReadConfigTaskESTest extends ReadConfigTaskESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ReadConfigTask readConfigTask0 = new ReadConfigTask();
+      ExecutionImpl executionImpl0 = new ExecutionImpl();
+      Expression expression0 = mock(Expression.class, new ViolatedAssumptionAnswer());
+      doReturn((Object) null).when(expression0).getValue(any(org.camunda.bpm.engine.delegate.VariableScope.class));
+      PrivateAccess.setVariable((Class<ReadConfigTask>) ReadConfigTask.class, readConfigTask0, "propertiesFile", (Object) expression0);
+      try { 
+        readConfigTask0.execute(executionImpl0);
+        fail("Expecting exception: RuntimeException");
+      
+      } catch(RuntimeException e) {
+         //
+         // ReadConfigTask injected field 'propertiesFile' is bad: required field has null value
+         //
+         verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      ReadConfigTask readConfigTask0 = new ReadConfigTask();
+      ExecutionImpl executionImpl0 = new ExecutionImpl();
+      try { 
+        readConfigTask0.execute(executionImpl0);
+        fail("Expecting exception: RuntimeException");
+      
+      } catch(RuntimeException e) {
+         //
+         // ReadConfigTask injected field 'propertiesFile' is bad: missing required field
+         //
+         verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
+      }
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadConfigTaskESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c134c9c
--- /dev/null
@@ -0,0 +1,331 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:29:36 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ReadConfigTaskESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.ReadConfigTask"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ReadConfigTaskESTestscaffolding.class.getClassLoader() ,
+      "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
+      "org.camunda.bpm.engine.impl.context.CaseExecutionContext",
+      "org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformFactory",
+      "org.camunda.bpm.engine.impl.pvm.PvmScope",
+      "org.camunda.bpm.engine.delegate.JavaDelegate",
+      "org.camunda.bpm.engine.impl.tree.TreeWalker$WalkCondition",
+      "org.camunda.bpm.engine.runtime.ProcessInstance",
+      "org.camunda.bpm.application.ProcessApplicationReference",
+      "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
+      "org.camunda.bpm.engine.impl.jobexecutor.FailedJobCommandFactory",
+      "org.camunda.bpm.engine.delegate.DelegateExecution",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration",
+      "org.camunda.bpm.engine.delegate.CmmnModelExecutionContext",
+      "org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.camunda.bpm.engine.impl.javax.el.ELContext",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceStart",
+      "org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher",
+      "org.camunda.bpm.engine.variable.type.ValueType",
+      "org.camunda.bpm.engine.impl.interceptor.CommandContextListener",
+      "org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationInterruptScope",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnCaseInstance",
+      "org.camunda.bpm.engine.repository.CaseDefinition",
+      "org.camunda.bpm.engine.impl.db.HasDbRevision",
+      "org.camunda.bpm.model.bpmn.instance.FlowElement",
+      "org.camunda.bpm.engine.delegate.Expression",
+      "org.camunda.bpm.engine.variable.type.SerializableValueType",
+      "org.camunda.bpm.engine.impl.pvm.PvmActivity",
+      "org.camunda.bpm.engine.impl.cfg.BpmnParseFactory",
+      "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
+      "org.camunda.bpm.model.cmmn.instance.CmmnModelElementInstance",
+      "org.camunda.bpm.engine.impl.pvm.PvmException",
+      "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
+      "org.camunda.bpm.application.ProcessApplicationUnavailableException",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
+      "org.camunda.bpm.engine.delegate.DelegateCaseExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerTake",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityNotifyListenerEnd",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration",
+      "org.camunda.bpm.engine.runtime.CaseExecution",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
+      "org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore",
+      "org.camunda.bpm.engine.repository.ProcessDefinition",
+      "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartConcurrent",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmAtomicOperationTransitionNotifyListenerTake",
+      "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperation",
+      "org.camunda.bpm.engine.impl.interceptor.SessionFactory",
+      "org.camunda.bpm.engine.delegate.DelegateTask",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
+      "org.camunda.bpm.engine.impl.core.model.CoreActivity",
+      "org.camunda.bpm.model.bpmn.BpmnModelInstance",
+      "org.camunda.bpm.engine.delegate.VariableScope",
+      "org.camunda.bpm.engine.ProcessEngine",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
+      "org.camunda.bpm.engine.impl.interceptor.CommandContext",
+      "org.camunda.bpm.engine.impl.variable.listener.CaseVariableListenerInvocation",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.camunda.bpm.engine.BadUserRequestException",
+      "org.camunda.bpm.engine.impl.context.ExecutionContext",
+      "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.ProcessEngineServices",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
+      "org.camunda.bpm.engine.runtime.Execution",
+      "org.camunda.bpm.engine.impl.pvm.process.Lane",
+      "org.camunda.bpm.engine.impl.pvm.process.ParticipantProcess",
+      "org.camunda.bpm.engine.impl.interceptor.CommandExecutor",
+      "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
+      "org.camunda.bpm.engine.ProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
+      "org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition",
+      "org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior",
+      "org.camunda.bpm.engine.impl.core.variable.event.VariableEvent",
+      "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
+      "org.camunda.bpm.engine.impl.pvm.PvmExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCreateScope",
+      "org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableStore",
+      "org.camunda.bpm.engine.runtime.VariableInstance",
+      "org.camunda.bpm.engine.runtime.Job",
+      "org.camunda.bpm.engine.runtime.Incident",
+      "org.camunda.bpm.model.xml.ModelInstance",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStart",
+      "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.camunda.bpm.engine.impl.core.variable.value.NullValueImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.engine.impl.variable.serializer.ValueFields",
+      "org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation",
+      "org.camunda.bpm.engine.impl.task.TaskDecorator",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInitStackNotifyListenerStart",
+      "org.camunda.bpm.engine.impl.jobexecutor.JobExecutorContext",
+      "org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation",
+      "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationsTransitionInterruptFlowScope",
+      "org.camunda.bpm.model.xml.instance.ModelElementInstance",
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState$SuspensionStateImpl",
+      "org.camunda.bpm.engine.impl.db.DbEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerEnd",
+      "org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireActivityEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationStartTransitionNotifyListenerTake",
+      "org.camunda.bpm.engine.runtime.EventSubscription",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
+      "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
+      "org.camunda.bpm.engine.management.JobDefinition",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior",
+      "org.camunda.bpm.engine.impl.core.variable.scope.MapBasedVariableStore",
+      "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext",
+      "org.camunda.bpm.engine.delegate.DelegateCaseVariableInstance",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessElement",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.camunda.bpm.engine.impl.delegate.DelegateInvocation",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireProcessStart",
+      "org.camunda.bpm.engine.runtime.CaseInstance",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
+      "org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware",
+      "org.openecomp.mso.bpmn.core.ReadConfigTask",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
+      "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
+      "org.camunda.bpm.engine.impl.interceptor.CommandInterceptor",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance",
+      "org.camunda.bpm.engine.variable.value.TypedValue",
+      "org.apache.ibatis.transaction.TransactionFactory",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnSentryPart",
+      "org.camunda.bpm.engine.impl.pvm.process.LaneSet",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInitStack",
+      "org.camunda.bpm.engine.delegate.DelegateListener",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnActivityExecution",
+      "org.camunda.bpm.engine.delegate.ExecutionListener",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationDeleteCascadeFireActivityEnd",
+      "org.camunda.bpm.engine.exception.NotAllowedException",
+      "org.camunda.bpm.engine.impl.history.event.HistoryEventType",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "org.camunda.bpm.engine.impl.pvm.process.HasDIBounds",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.camunda.bpm.engine.task.Task",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmEventAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationDeleteCascade",
+      "org.camunda.bpm.engine.impl.context.CoreExecutionContext",
+      "org.camunda.bpm.engine.delegate.DelegateVariableInstance",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
+      "org.camunda.bpm.engine.variable.VariableMap",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState$ActivityInstanceStateImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
+      "org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl",
+      "org.camunda.bpm.model.bpmn.instance.BaseElement",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateConcurrentExecution",
+      "org.camunda.bpm.engine.exception.NullValueException",
+      "org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore",
+      "org.camunda.bpm.engine.impl.context.BpmnExecutionContext",
+      "org.openecomp.mso.bpmn.core.BaseTask",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartInterruptEventScope",
+      "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCancelScope",
+      "org.apache.ibatis.session.SqlSessionFactory",
+      "org.camunda.bpm.engine.impl.variable.AbstractPersistentVariableStore",
+      "org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.camunda.bpm.engine.impl.core.delegate.CoreActivityBehavior",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionCreateScope",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.camunda.bpm.engine.SuspendedEntityInteractionException",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCancelActivity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.camunda.bpm.engine.impl.db.HasDbReferences",
+      "org.camunda.bpm.engine.impl.tree.Collector",
+      "com.att.eelf.configuration.EELFManager",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionStartContext",
+      "org.camunda.bpm.engine.impl.core.operation.CoreAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.PvmTransition",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
+      "org.camunda.bpm.model.cmmn.instance.CmmnElement",
+      "org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart",
+      "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
+      "org.camunda.bpm.engine.impl.core.variable.CoreVariableInstance",
+      "org.camunda.bpm.engine.variable.type.PrimitiveValueType",
+      "org.camunda.bpm.engine.delegate.VariableListener",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ReadConfigTaskESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.bpmn.core.ReadConfigTask",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
+      "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "org.camunda.bpm.engine.exception.NullValueException",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
+      "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
+      "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.PvmException",
+      "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
+      "org.camunda.bpm.engine.impl.core.model.CoreActivity",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
+      "org.camunda.bpm.engine.impl.core.variable.value.NullValueImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
+      "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTest.java
new file mode 100644 (file)
index 0000000..741872a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:30:51 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.camunda.bpm.engine.delegate.Expression;
+import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ReadFileTaskESTest extends ReadFileTaskESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ReadFileTask readFileTask0 = new ReadFileTask();
+      ExecutionImpl executionImpl0 = new ExecutionImpl();
+      Expression expression0 = mock(Expression.class, new ViolatedAssumptionAnswer());
+      doReturn((Object) null).when(expression0).getValue(any(org.camunda.bpm.engine.delegate.VariableScope.class));
+      PrivateAccess.setVariable((Class<ReadFileTask>) ReadFileTask.class, readFileTask0, "inputVariable", (Object) expression0);
+      try { 
+        readFileTask0.execute(executionImpl0);
+        fail("Expecting exception: RuntimeException");
+      
+      } catch(RuntimeException e) {
+         //
+         // ReadFileTask injected field 'inputVariable' is bad: required field has null value
+         //
+         verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      ReadFileTask readFileTask0 = new ReadFileTask();
+      ExecutionImpl executionImpl0 = new ExecutionImpl();
+      try { 
+        readFileTask0.execute(executionImpl0);
+        fail("Expecting exception: RuntimeException");
+      
+      } catch(RuntimeException e) {
+         //
+         // ReadFileTask injected field 'inputVariable' is bad: missing required field
+         //
+         verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
+      }
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/ReadFileTaskESTestscaffolding.java
new file mode 100644 (file)
index 0000000..4b11c76
--- /dev/null
@@ -0,0 +1,339 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:30:51 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ReadFileTaskESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.ReadFileTask"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ReadFileTaskESTestscaffolding.class.getClassLoader() ,
+      "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
+      "org.camunda.bpm.engine.impl.context.CaseExecutionContext",
+      "org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformFactory",
+      "org.camunda.bpm.engine.impl.pvm.PvmScope",
+      "org.camunda.bpm.engine.delegate.JavaDelegate",
+      "org.camunda.bpm.engine.impl.tree.TreeWalker$WalkCondition",
+      "org.camunda.bpm.engine.runtime.ProcessInstance",
+      "org.camunda.bpm.application.ProcessApplicationReference",
+      "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
+      "org.camunda.bpm.engine.impl.jobexecutor.FailedJobCommandFactory",
+      "org.openecomp.mso.bpmn.core.ReadFileTask",
+      "org.camunda.bpm.engine.delegate.DelegateExecution",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnIfPartDeclaration",
+      "org.camunda.bpm.engine.delegate.CmmnModelExecutionContext",
+      "org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.camunda.bpm.engine.impl.javax.el.ELContext",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceStart",
+      "org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher",
+      "org.camunda.bpm.engine.variable.type.ValueType",
+      "org.camunda.bpm.engine.impl.interceptor.CommandContextListener",
+      "org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationInterruptScope",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnCaseInstance",
+      "org.camunda.bpm.engine.impl.db.HasDbRevision",
+      "org.camunda.bpm.model.bpmn.instance.FlowElement",
+      "org.camunda.bpm.engine.delegate.Expression",
+      "org.camunda.bpm.engine.variable.type.SerializableValueType",
+      "org.camunda.bpm.engine.impl.pvm.PvmActivity",
+      "org.camunda.bpm.engine.impl.cfg.BpmnParseFactory",
+      "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
+      "org.camunda.bpm.model.cmmn.instance.CmmnModelElementInstance",
+      "org.camunda.bpm.engine.impl.pvm.PvmException",
+      "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
+      "org.camunda.bpm.application.ProcessApplicationUnavailableException",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
+      "org.camunda.bpm.engine.delegate.DelegateCaseExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerTake",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityNotifyListenerEnd",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration",
+      "org.camunda.bpm.engine.runtime.CaseExecution",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
+      "org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore",
+      "org.camunda.bpm.engine.repository.ProcessDefinition",
+      "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartConcurrent",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmAtomicOperationTransitionNotifyListenerTake",
+      "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperation",
+      "org.camunda.bpm.engine.impl.interceptor.SessionFactory",
+      "org.camunda.bpm.engine.delegate.DelegateTask",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityStartBehavior",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
+      "org.camunda.bpm.engine.impl.core.model.CoreActivity",
+      "org.camunda.bpm.model.bpmn.BpmnModelInstance",
+      "org.camunda.bpm.engine.delegate.VariableScope",
+      "org.camunda.bpm.engine.ProcessEngine",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
+      "org.camunda.bpm.engine.impl.interceptor.CommandContext",
+      "org.camunda.bpm.engine.impl.variable.listener.CaseVariableListenerInvocation",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.camunda.bpm.engine.BadUserRequestException",
+      "org.camunda.bpm.engine.impl.context.ExecutionContext",
+      "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.ProcessEngineServices",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
+      "org.camunda.bpm.engine.runtime.Execution",
+      "org.camunda.bpm.engine.impl.pvm.process.Lane",
+      "org.camunda.bpm.engine.impl.pvm.process.ParticipantProcess",
+      "org.camunda.bpm.engine.impl.interceptor.CommandExecutor",
+      "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
+      "org.camunda.bpm.engine.ProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
+      "org.camunda.bpm.engine.impl.util.BitMaskUtil",
+      "org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition",
+      "org.camunda.bpm.engine.impl.cmmn.behavior.CmmnActivityBehavior",
+      "org.camunda.bpm.engine.impl.core.variable.event.VariableEvent",
+      "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
+      "org.camunda.bpm.engine.impl.pvm.PvmExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCreateScope",
+      "org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableStore",
+      "org.camunda.bpm.engine.runtime.VariableInstance",
+      "org.camunda.bpm.engine.runtime.Job",
+      "org.camunda.bpm.engine.runtime.Incident",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState$CaseExecutionStateImpl",
+      "org.camunda.bpm.model.xml.ModelInstance",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStart",
+      "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.engine.impl.variable.serializer.ValueFields",
+      "org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation",
+      "org.camunda.bpm.engine.impl.task.TaskDecorator",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInitStackNotifyListenerStart",
+      "org.camunda.bpm.engine.impl.jobexecutor.JobExecutorContext",
+      "org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation",
+      "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationsTransitionInterruptFlowScope",
+      "org.camunda.bpm.model.xml.instance.ModelElementInstance",
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState$SuspensionStateImpl",
+      "org.camunda.bpm.engine.impl.db.DbEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerEnd",
+      "org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireActivityEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationStartTransitionNotifyListenerTake",
+      "org.camunda.bpm.engine.runtime.EventSubscription",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
+      "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl",
+      "org.camunda.bpm.engine.management.JobDefinition",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior",
+      "org.camunda.bpm.engine.impl.core.variable.scope.MapBasedVariableStore",
+      "org.camunda.bpm.engine.impl.javax.el.ValueReference",
+      "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext",
+      "org.camunda.bpm.engine.delegate.DelegateCaseVariableInstance",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessElement",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.camunda.bpm.engine.impl.delegate.DelegateInvocation",
+      "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationFireProcessStart",
+      "org.camunda.bpm.engine.runtime.CaseInstance",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
+      "org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
+      "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
+      "org.camunda.bpm.engine.impl.interceptor.CommandInterceptor",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseSentryPartImpl",
+      "org.camunda.bpm.engine.variable.value.TypedValue",
+      "org.apache.ibatis.transaction.TransactionFactory",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnSentryPart",
+      "org.camunda.bpm.engine.impl.pvm.process.LaneSet",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInitStack",
+      "org.camunda.bpm.engine.delegate.DelegateListener",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnActivityExecution",
+      "org.camunda.bpm.engine.delegate.ExecutionListener",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationDeleteCascadeFireActivityEnd",
+      "org.camunda.bpm.engine.exception.NotAllowedException",
+      "org.camunda.bpm.engine.impl.history.event.HistoryEventType",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "org.camunda.bpm.engine.impl.pvm.process.HasDIBounds",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.camunda.bpm.engine.task.Task",
+      "org.camunda.bpm.engine.impl.javax.el.Expression",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmEventAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationDeleteCascade",
+      "org.camunda.bpm.engine.impl.context.CoreExecutionContext",
+      "org.camunda.bpm.engine.delegate.DelegateVariableInstance",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
+      "org.camunda.bpm.model.cmmn.CmmnModelInstance",
+      "org.camunda.bpm.engine.variable.VariableMap",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState$ActivityInstanceStateImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
+      "org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl",
+      "org.camunda.bpm.model.bpmn.instance.BaseElement",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateConcurrentExecution",
+      "org.camunda.bpm.engine.exception.NullValueException",
+      "org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore",
+      "org.camunda.bpm.engine.impl.context.BpmnExecutionContext",
+      "org.openecomp.mso.bpmn.core.BaseTask",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartInterruptEventScope",
+      "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCancelScope",
+      "org.apache.ibatis.session.SqlSessionFactory",
+      "org.camunda.bpm.engine.impl.variable.AbstractPersistentVariableStore",
+      "org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.camunda.bpm.engine.impl.core.delegate.CoreActivityBehavior",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionCreateScope",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.camunda.bpm.engine.SuspendedEntityInteractionException",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCancelActivity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.camunda.bpm.engine.impl.db.HasDbReferences",
+      "org.camunda.bpm.engine.impl.tree.Collector",
+      "com.att.eelf.configuration.EELFManager",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionStartContext",
+      "org.camunda.bpm.engine.impl.core.operation.CoreAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.PvmTransition",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
+      "org.camunda.bpm.model.cmmn.instance.CmmnElement",
+      "org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart",
+      "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
+      "org.camunda.bpm.engine.impl.core.variable.CoreVariableInstance",
+      "org.camunda.bpm.engine.variable.type.PrimitiveValueType",
+      "org.camunda.bpm.engine.delegate.VariableListener",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnSentryDeclaration",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ReadFileTaskESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.bpmn.core.ReadFileTask",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
+      "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
+      "org.camunda.bpm.engine.impl.javax.el.Expression",
+      "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.engine.exception.NullValueException",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
+      "org.camunda.bpm.engine.impl.core.model.CoreActivity",
+      "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
+      "org.camunda.bpm.engine.impl.pvm.PvmException",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionState",
+      "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityInstanceEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessEnd",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$1",
+      "org.camunda.bpm.engine.impl.util.BitMaskUtil",
+      "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
+      "org.camunda.bpm.engine.impl.core.variable.value.UntypedValueImpl"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTest.java
new file mode 100644 (file)
index 0000000..e26f5a9
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:33:44 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RollbackDataESTest extends RollbackDataESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      rollbackData0.put("", "", "");
+      String string0 = (String)rollbackData0.get("", "\7f0-0|Ox?");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      Serializable serializable0 = rollbackData0.get("", "\7f0-0|Ox?");
+      assertNull(serializable0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      rollbackData0.put("", "", "");
+      String string0 = (String)rollbackData0.get("", "");
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      HashMap<String, Object> hashMap0 = new HashMap<String, Object>();
+      HashMap<Serializable, Integer> hashMap1 = new HashMap<Serializable, Integer>();
+      hashMap0.put("/0H\"wnR=^l|l$+qQDi", hashMap1);
+      PrivateAccess.setVariable((Class<RollbackData>) RollbackData.class, rollbackData0, "dictionary", (Object) hashMap0);
+      Map<String, Serializable> map0 = rollbackData0.get("/0H\"wnR=^l|l$+qQDi");
+      assertEquals(0, map0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      rollbackData0.put("RollbackData[]", "$", "RollbackData[]");
+      Map<String, Serializable> map0 = rollbackData0.get("RollbackData[]");
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      rollbackData0.put("org.openecomp.mso.bpmn.core.RollbackData", "org.openecomp.mso.bpmn.core.RollbackData", "!{=|?cluq? yk]).");
+      rollbackData0.get("");
+      PrivateAccess.setVariable((Class<RollbackData>) RollbackData.class, rollbackData0, "dictionary", (Object) null);
+      // Undeclared exception!
+      try { 
+        rollbackData0.get("org.openecomp.mso.bpmn.core.RollbackData");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.bpmn.core.RollbackData", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      rollbackData0.put("$", "$", "RollbackData[]");
+      rollbackData0.put("RollbackData[]", "$", "RollbackData[]");
+      String string0 = rollbackData0.toString();
+      assertEquals("RollbackData[${$=RollbackData[]},RollbackData[]{$=RollbackData[]}]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      rollbackData0.put("$", "$", "RollbackData[]");
+      rollbackData0.put("$", "RollbackData[]", "RollbackData[]");
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      HashMap<String, Object> hashMap0 = new HashMap<String, Object>();
+      HashMap<Serializable, Integer> hashMap1 = new HashMap<Serializable, Integer>();
+      hashMap0.put("/0H\"wnR=^l|l$+qQDi", hashMap1);
+      PrivateAccess.setVariable((Class<RollbackData>) RollbackData.class, rollbackData0, "dictionary", (Object) hashMap0);
+      boolean boolean0 = rollbackData0.hasType("/0H\"wnR=^l|l$+qQDi");
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test9()  throws Throwable  {
+      RollbackData rollbackData0 = new RollbackData();
+      boolean boolean0 = rollbackData0.hasType("RollbackData[]");
+      assertFalse(boolean0);
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/RollbackDataESTestscaffolding.java
new file mode 100644 (file)
index 0000000..7dc6ca1
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:33:44 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RollbackDataESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.RollbackData"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackDataESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.bpmn.core.RollbackData"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RollbackDataESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.bpmn.core.RollbackData"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
new file mode 100644 (file)
index 0000000..3f2f74d
--- /dev/null
@@ -0,0 +1,262 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.Expression;
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.test.ProcessEngineRule;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.openecomp.mso.bpmn.test.CamundaDBSetup;
+import org.openecomp.mso.bpmn.test.PropertyConfigurationSetup;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Unit test for BaseTask class.
+ */
+public class TestBaseTask {
+
+       @Rule
+       public ProcessEngineRule processEngineRule = new ProcessEngineRule();
+       
+       @Before
+       public void beforeTest() throws Exception {
+               CamundaDBSetup.configure();
+               PropertyConfigurationSetup.init();
+       }
+       
+       @Test
+       @Deployment(resources={"BaseTaskTest.bpmn"})
+       public void shouldInvokeService() {
+               Map<String, Object> variables = new HashMap<String, Object>();
+               variables.put("firstName", "Jane");
+               variables.put("lastName", "Doe");
+               variables.put("age", (Integer)25);
+               variables.put("lastVisit", (Long)1438270117000L);
+
+               RuntimeService runtimeService = processEngineRule.getRuntimeService();
+               processEngineRule.getTaskService();
+               runtimeService.startProcessInstanceByKey("BaseTaskTest", variables);
+       }
+       
+       /**
+        * Unit test code for BaseTask.
+        */
+       public static class TestTask extends BaseTask {
+               private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+               private Expression existingString;
+               private Expression nonExistingString;
+               private Expression existingStringFromVar;
+               private Expression nonExistingStringFromVar;
+               
+               private Expression existingInteger;
+               private Expression nonExistingInteger;
+               private Expression existingIntegerFromVar;
+               private Expression nonExistingIntegerFromVar;
+               
+               private Expression existingLong;
+               private Expression nonExistingLong;
+               private Expression existingLongFromVar;
+               private Expression nonExistingLongFromVar;
+               
+               private Expression existingOutputVar;
+               private Expression nonExistingOutputVar;
+               private Expression existingBadOutputVar;
+               
+               public void execute(DelegateExecution execution) throws Exception {
+                       msoLogger.debug("Started executing " + getClass().getSimpleName());
+
+                       /*********************************************************************/
+                       msoLogger.debug("Running String Field Tests");
+                       /*********************************************************************/
+
+                       String s = getStringField(existingString, execution, "existingString");
+                       Assert.assertEquals("Hello World", s);
+
+                       try {
+                               s = getStringField(nonExistingString, execution, "nonExistingString");
+                               Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+                       } catch (Exception e) {
+                               if (!(e instanceof BadInjectedFieldException)) {
+                                       Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+                               }
+                       }
+
+                       s = getOptionalStringField(existingString, execution, "existingString");
+                       Assert.assertEquals("Hello World", s);
+
+                       s = getOptionalStringField(nonExistingString, execution, "nonExistingString");
+                       Assert.assertEquals(null, s);
+
+                       /*********************************************************************/
+                       msoLogger.debug("Running String Expression Tests");
+                       /*********************************************************************/
+
+                       s = getStringField(existingStringFromVar, execution, "existingStringFromVar");
+                       Assert.assertEquals("Jane", s);
+
+                       try {
+                               s = getStringField(nonExistingStringFromVar, execution, "nonExistingStringFromVar");
+                               Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+                       } catch (Exception e) {
+                               if (!(e instanceof BadInjectedFieldException)) {
+                                       Assert.fail("Expected BadInjectedFieldException for nonExistingStringFromVar");
+                               }
+                       }
+
+                       s = getOptionalStringField(existingStringFromVar, execution, "existingStringFromVar");
+                       Assert.assertEquals("Jane", s);
+
+                       s = getOptionalStringField(nonExistingStringFromVar, execution, "nonExistingStringFromVar");
+                       Assert.assertEquals(null, s);
+
+                       /*********************************************************************/
+                       msoLogger.debug("Running Integer Field Tests");
+                       /*********************************************************************/
+
+                       Integer i = getIntegerField(existingInteger, execution, "existingInteger");
+                       Assert.assertEquals((Integer)42, i);
+
+                       try {
+                               i = getIntegerField(nonExistingInteger, execution, "nonExistingInteger");
+                               Assert.fail("Expected BadInjectedFieldException for nonExistingInteger");
+                       } catch (Exception e) {
+                               if (!(e instanceof BadInjectedFieldException)) {
+                                       Assert.fail("Expected BadInjectedFieldException for nonExistingInteger");
+                               }
+                       }
+
+                       i = getOptionalIntegerField(existingInteger, execution, "existingInteger");
+                       Assert.assertEquals((Integer)42, i);
+
+                       i = getOptionalIntegerField(nonExistingInteger, execution, "nonExistingInteger");
+                       Assert.assertEquals(null, i);
+
+                       /*********************************************************************/
+                       msoLogger.debug("Running Integer Expression Tests");
+                       /*********************************************************************/
+
+                       i = getIntegerField(existingIntegerFromVar, execution, "existingIntegerFromVar");
+                       Assert.assertEquals((Integer)25, i);
+
+                       try {
+                               i = getIntegerField(nonExistingIntegerFromVar, execution, "nonExistingIntegerFromVar");
+                               Assert.fail("Expected BadInjectedFieldException for nonExistingInteger");
+                       } catch (Exception e) {
+                               if (!(e instanceof BadInjectedFieldException)) {
+                                       Assert.fail("Expected BadInjectedFieldException for nonExistingIntegerFromVar");
+                               }
+                       }
+
+                       i = getOptionalIntegerField(existingIntegerFromVar, execution, "existingIntegerFromVar");
+                       Assert.assertEquals((Integer)25, i);
+
+                       i = getOptionalIntegerField(nonExistingIntegerFromVar, execution, "nonExistingIntegerFromVar");
+                       Assert.assertEquals(null, i);
+
+                       /*********************************************************************/
+                       msoLogger.debug("Running Long Field Tests");
+                       /*********************************************************************/
+
+                       Long l = getLongField(existingLong, execution, "existingLong");
+                       Assert.assertEquals((Long)123456789L, l);
+
+                       try {
+                               l = getLongField(nonExistingLong, execution, "nonExistingLong");
+                               Assert.fail("Expected BadInjectedFieldException for nonExistingLong");
+                       } catch (Exception e) {
+                               if (!(e instanceof BadInjectedFieldException)) {
+                                       Assert.fail("Expected BadInjectedFieldException for nonExistingLong");
+                               }
+                       }
+
+                       l = getOptionalLongField(existingLong, execution, "existingLong");
+                       Assert.assertEquals((Long)123456789L, l);
+
+                       l = getOptionalLongField(nonExistingLong, execution, "nonExistingLong");
+                       Assert.assertEquals(null, l);
+
+                       /*********************************************************************/
+                       msoLogger.debug("Running Long Expression Tests");
+                       /*********************************************************************/
+
+                       l = getLongField(existingLongFromVar, execution, "existingLongFromVar");
+                       Assert.assertEquals((Long)1438270117000L, l);
+
+                       try {
+                               l = getLongField(nonExistingLongFromVar, execution, "nonExistingLongFromVar");
+                               Assert.fail("Expected BadInjectedFieldException for nonExistingLong");
+                       } catch (Exception e) {
+                               if (!(e instanceof BadInjectedFieldException)) {
+                                       Assert.fail("Expected BadInjectedFieldException for nonExistingLongFromVar");
+                               }
+                       }
+
+                       l = getOptionalLongField(existingLongFromVar, execution, "existingLongFromVar");
+                       Assert.assertEquals((Long)1438270117000L, l);
+
+                       l = getOptionalLongField(nonExistingLongFromVar, execution, "nonExistingLongFromVar");
+                       Assert.assertEquals(null, i);
+
+                       /*********************************************************************/
+                       msoLogger.debug("Running Output Variable Field Tests");
+                       /*********************************************************************/
+
+                       String var = getOutputField(existingOutputVar, execution, "existingOutputVar");
+                       Assert.assertEquals("goodVariable", var);
+
+                       try {
+                               var = getOutputField(nonExistingOutputVar, execution, "nonExistingOutputVar");
+                               Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+                       } catch (Exception e) {
+                               if (!(e instanceof BadInjectedFieldException)) {
+                                       Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+                               }
+                       }
+
+                       var = getOptionalOutputField(existingOutputVar, execution, "existingOutputVar");
+                       Assert.assertEquals("goodVariable", var);
+
+                       var = getOptionalOutputField(nonExistingOutputVar, execution, "nonExistingOutputVar");
+                       Assert.assertEquals(null, var);
+
+                       try {
+                               var = getOutputField(existingBadOutputVar, execution, "existingBadOutputVar");
+                               Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+                       } catch (Exception e) {
+                               if (!(e instanceof BadInjectedFieldException)) {
+                                       Assert.fail("Expected BadInjectedFieldException for nonExistingString");
+                               }
+                       }
+
+                       msoLogger.debug("Finished executing " + getClass().getSimpleName());
+               }
+       }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTest.java
new file mode 100644 (file)
index 0000000..64220f0
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:35:51 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class URNMappingsTaskESTest extends URNMappingsTaskESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      URNMappingsTask uRNMappingsTask0 = new URNMappingsTask();
+      DelegateExecution delegateExecution0 = mock(DelegateExecution.class, new ViolatedAssumptionAnswer());
+      uRNMappingsTask0.execute(delegateExecution0);
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/URNMappingsTaskESTestscaffolding.java
new file mode 100644 (file)
index 0000000..93151d3
--- /dev/null
@@ -0,0 +1,103 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:35:51 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNMappingsTaskESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.URNMappingsTask"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMappingsTaskESTestscaffolding.class.getClassLoader() ,
+      "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
+      "org.camunda.bpm.model.xml.instance.ModelElementInstance",
+      "org.camunda.bpm.engine.delegate.VariableScope",
+      "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
+      "org.camunda.bpm.engine.variable.value.TypedValue",
+      "org.camunda.bpm.engine.delegate.DelegateExecution",
+      "org.camunda.bpm.engine.delegate.Expression",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
+      "org.openecomp.mso.bpmn.core.URNMappingsTask",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "org.openecomp.mso.bpmn.core.BaseTask",
+      "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
+      "org.camunda.bpm.engine.variable.VariableMap",
+      "org.camunda.bpm.engine.delegate.JavaDelegate",
+      "org.camunda.bpm.engine.ProcessEngineServices",
+      "org.camunda.bpm.model.bpmn.BpmnModelInstance",
+      "org.camunda.bpm.model.bpmn.instance.BaseElement",
+      "org.camunda.bpm.model.xml.ModelInstance",
+      "org.camunda.bpm.model.bpmn.instance.FlowElement"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMappingsTaskESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTest.java
new file mode 100644 (file)
index 0000000..1891c8d
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:35:37 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class WorkflowExceptionESTest extends WorkflowExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException("(YdK~.N3;c2C", 336, "(YdK~.N3;c2C");
+      workflowException0.getProcessKey();
+      assertEquals(336, workflowException0.getErrorCode());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException("", 0, "");
+      workflowException0.getProcessKey();
+      assertEquals(0, workflowException0.getErrorCode());
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException((String) null, 0, "^Y:");
+      String string0 = workflowException0.getErrorMessage();
+      assertEquals(0, workflowException0.getErrorCode());
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException("", 1216, "");
+      workflowException0.getErrorMessage();
+      assertEquals(1216, workflowException0.getErrorCode());
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException("", 0, "");
+      int int0 = workflowException0.getErrorCode();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException((String) null, (-1911), (String) null);
+      int int0 = workflowException0.getErrorCode();
+      assertEquals((-1911), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException((String) null, 336, (String) null);
+      workflowException0.getErrorMessage();
+      assertEquals(336, workflowException0.getErrorCode());
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException((String) null, 336, (String) null);
+      int int0 = workflowException0.getErrorCode();
+      assertEquals(336, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException((String) null, 336, (String) null);
+      workflowException0.getProcessKey();
+      assertEquals(336, workflowException0.getErrorCode());
+  }
+
+  @Test(timeout = 4000)
+  public void test9()  throws Throwable  {
+      WorkflowException workflowException0 = new WorkflowException((String) null, 336, (String) null);
+      String string0 = workflowException0.toString();
+      assertEquals("WorkflowException[processKey=null,errorCode=336,errorMessage=null]", string0);
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/WorkflowExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..88e0e0f
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:35:37 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class WorkflowExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.WorkflowException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(WorkflowExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.bpmn.core.WorkflowException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(WorkflowExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.bpmn.core.WorkflowException"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTest.java
new file mode 100644 (file)
index 0000000..a149341
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:28:14 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.io.IOException;
+import net.sf.saxon.s9api.XQueryCompiler;
+import net.sf.saxon.s9api.XQueryExecutable;
+import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class XQueryScriptTaskESTest extends XQueryScriptTaskESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      XQueryScriptTask xQueryScriptTask0 = new XQueryScriptTask();
+      XQueryCompiler xQueryCompiler0 = mock(XQueryCompiler.class, new ViolatedAssumptionAnswer());
+      doReturn((XQueryExecutable) null).when(xQueryCompiler0).compile(any(java.io.InputStream.class));
+      Object object0 = PrivateAccess.callMethod((Class<XQueryScriptTask>) XQueryScriptTask.class, xQueryScriptTask0, "compile", (Object) xQueryCompiler0, (Class<?>) XQueryCompiler.class, (Object) "", (Class<?>) String.class);
+      assertNull(object0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      XQueryScriptTask xQueryScriptTask0 = new XQueryScriptTask();
+      XQueryCompiler xQueryCompiler0 = mock(XQueryCompiler.class, new ViolatedAssumptionAnswer());
+      try { 
+        PrivateAccess.callMethod((Class<XQueryScriptTask>) XQueryScriptTask.class, xQueryScriptTask0, "compile", (Object) xQueryCompiler0, (Class<?>) XQueryCompiler.class, (Object) "Sk##N$V^.", (Class<?>) String.class);
+        fail("Expecting exception: IOException");
+      
+      } catch(IOException e) {
+         //
+         // Resource not found: Sk##N$V^.
+         //
+         verifyException("org.openecomp.mso.bpmn.core.XQueryScriptTask", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      XQueryScriptTask xQueryScriptTask0 = new XQueryScriptTask();
+      try { 
+        PrivateAccess.callMethod((Class<XQueryScriptTask>) XQueryScriptTask.class, xQueryScriptTask0, "compile", (Object) null, (Class<?>) XQueryCompiler.class, (Object) "", (Class<?>) String.class);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.bpmn.core.XQueryScriptTask", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      XQueryScriptTask xQueryScriptTask0 = new XQueryScriptTask();
+      ExecutionImpl executionImpl0 = new ExecutionImpl();
+      try { 
+        xQueryScriptTask0.execute(executionImpl0);
+        fail("Expecting exception: RuntimeException");
+      
+      } catch(RuntimeException e) {
+         //
+         // XQueryScriptTask injected field 'scriptFile' is bad: missing required field
+         //
+         verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
+      }
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/XQueryScriptTaskESTestscaffolding.java
new file mode 100644 (file)
index 0000000..b0c1585
--- /dev/null
@@ -0,0 +1,533 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:28:14 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class XQueryScriptTaskESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.XQueryScriptTask"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(XQueryScriptTaskESTestscaffolding.class.getClassLoader() ,
+      "net.sf.saxon.pattern.PatternFinder",
+      "net.sf.saxon.pattern.AnyNodeTest",
+      "net.sf.saxon.tree.linked.TextImpl",
+      "net.sf.saxon.tree.linked.ElementImpl",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution",
+      "org.camunda.bpm.engine.impl.context.CaseExecutionContext",
+      "org.camunda.bpm.engine.impl.cmmn.transformer.CmmnTransformFactory",
+      "org.camunda.bpm.engine.impl.pvm.PvmScope",
+      "net.sf.saxon.type.TypeHierarchy",
+      "net.sf.saxon.trans.Mode",
+      "org.camunda.bpm.engine.impl.tree.TreeWalker$WalkCondition",
+      "org.camunda.bpm.engine.runtime.ProcessInstance",
+      "net.sf.saxon.trans.CompilerInfo",
+      "net.sf.saxon.type.ConversionResult",
+      "net.sf.saxon.type.ItemType",
+      "net.sf.saxon.om.NamePool",
+      "net.sf.saxon.value.NumericValue",
+      "org.camunda.bpm.engine.impl.jobexecutor.FailedJobCommandFactory",
+      "net.sf.saxon.s9api.Processor",
+      "net.sf.saxon.om.NameChecker",
+      "org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext",
+      "net.sf.saxon.expr.sort.SimpleCollation",
+      "net.sf.saxon.z.IntIterator",
+      "net.sf.saxon.expr.PendingUpdateList",
+      "net.sf.saxon.om.NamespaceBinding",
+      "net.sf.saxon.lib.StaticQueryContextFactory",
+      "net.sf.saxon.serialize.charcode.CharacterSet",
+      "net.sf.saxon.event.Receiver",
+      "org.camunda.bpm.model.bpmn.instance.FlowElement",
+      "net.sf.saxon.om.AbstractItem",
+      "net.sf.saxon.lib.ExternalObjectModel",
+      "net.sf.saxon.event.LocationProvider",
+      "org.camunda.bpm.engine.delegate.Expression",
+      "net.sf.saxon.value.QualifiedNameValue",
+      "net.sf.saxon.om.MutableDocumentInfo",
+      "org.camunda.bpm.engine.impl.pvm.PvmActivity",
+      "org.camunda.bpm.engine.impl.cfg.BpmnParseFactory",
+      "org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance",
+      "net.sf.saxon.pattern.NodeTest",
+      "net.sf.saxon.om.NamespaceException",
+      "net.sf.saxon.lib.EnvironmentVariableResolver",
+      "org.camunda.bpm.application.ProcessApplicationUnavailableException",
+      "net.sf.saxon.expr.instruct.Procedure",
+      "net.sf.saxon.om.Sequence",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
+      "net.sf.saxon.type.ValidationFailure",
+      "org.camunda.bpm.engine.delegate.DelegateCaseExecution",
+      "net.sf.saxon.tree.iter.UnfailingIterator",
+      "net.sf.saxon.type.AnySimpleType",
+      "org.camunda.bpm.engine.runtime.CaseExecution",
+      "net.sf.saxon.event.ProxyReceiver",
+      "net.sf.saxon.lib.ConversionRules",
+      "net.sf.saxon.lib.OutputURIResolver",
+      "net.sf.saxon.expr.instruct.ValidatingInstruction",
+      "net.sf.saxon.om.FunctionItem",
+      "net.sf.saxon.om.MutableNodeInfo",
+      "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl",
+      "net.sf.saxon.pattern.PatternWithPredicate",
+      "net.sf.saxon.expr.ErrorExpression",
+      "net.sf.saxon.om.Name10Checker",
+      "net.sf.saxon.event.ComplexContentOutputter",
+      "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperation",
+      "org.camunda.bpm.engine.delegate.DelegateTask",
+      "net.sf.saxon.style.LiteralResultElement",
+      "org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation",
+      "org.camunda.bpm.engine.impl.core.model.CoreActivity",
+      "net.sf.saxon.tree.iter.LookaheadIterator",
+      "net.sf.saxon.om.AtomicSequence",
+      "net.sf.saxon.s9api.XQueryCompiler",
+      "net.sf.saxon.pattern.LocalNameTest",
+      "net.sf.saxon.pattern.PatternParser",
+      "net.sf.saxon.expr.instruct.SlotManager",
+      "net.sf.saxon.PreparedStylesheet",
+      "org.camunda.bpm.engine.impl.interceptor.CommandContext",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "net.sf.saxon.lib.ParseOptions",
+      "net.sf.saxon.expr.ItemMappingIterator",
+      "net.sf.saxon.tree.iter.EmptyIterator",
+      "org.camunda.bpm.engine.impl.persistence.entity.TaskEntity",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "net.sf.saxon.lib.LocalizerFactory",
+      "org.camunda.bpm.engine.ProcessEngineServices",
+      "org.camunda.bpm.engine.runtime.Execution",
+      "org.camunda.bpm.engine.impl.interceptor.CommandExecutor",
+      "net.sf.saxon.s9api.ItemType$1",
+      "org.camunda.bpm.engine.delegate.ProcessEngineServicesAware",
+      "org.camunda.bpm.engine.ProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity",
+      "net.sf.saxon.s9api.ItemType$2",
+      "net.sf.saxon.s9api.ItemType$3",
+      "org.camunda.bpm.engine.impl.pvm.ReadOnlyProcessDefinition",
+      "net.sf.saxon.pattern.NodeKindTest",
+      "org.camunda.bpm.engine.impl.core.variable.event.VariableEvent",
+      "net.sf.saxon.expr.LetExpression",
+      "org.camunda.bpm.engine.delegate.BaseDelegateExecution",
+      "net.sf.saxon.s9api.XdmItem",
+      "net.sf.saxon.expr.Binding",
+      "net.sf.saxon.expr.instruct.ParentNodeConstructor",
+      "org.camunda.bpm.engine.runtime.VariableInstance",
+      "org.camunda.bpm.engine.runtime.Incident",
+      "net.sf.saxon.om.NamespaceResolver",
+      "net.sf.saxon.expr.instruct.AnalyzeString",
+      "net.sf.saxon.z.IntHashMap",
+      "org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity",
+      "net.sf.saxon.expr.instruct.ResultDocument",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.engine.impl.variable.serializer.ValueFields",
+      "net.sf.saxon.type.StringToDouble",
+      "net.sf.saxon.value.SequenceType",
+      "net.sf.saxon.type.ComplexType",
+      "org.camunda.bpm.engine.impl.jobexecutor.JobExecutorContext",
+      "net.sf.saxon.type.AnyType",
+      "org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity",
+      "net.sf.saxon.expr.StaticContext",
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState$SuspensionStateImpl",
+      "net.sf.saxon.lib.SerializerFactory",
+      "net.sf.saxon.tree.util.SteppingNode",
+      "net.sf.saxon.functions.IntegratedFunctionLibrary",
+      "net.sf.saxon.evpull.PullEvent",
+      "net.sf.saxon.expr.XPathContextMinor",
+      "org.camunda.bpm.engine.management.JobDefinition",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "net.sf.saxon.om.DocumentInfo",
+      "net.sf.saxon.om.QNameException",
+      "org.camunda.bpm.engine.impl.javax.el.ValueReference",
+      "org.camunda.bpm.engine.impl.persistence.entity.JobEntity",
+      "net.sf.saxon.type.SchemaComponentVisitor",
+      "net.sf.saxon.z.AbstractIntSet",
+      "net.sf.saxon.tree.iter.AxisIterator",
+      "net.sf.saxon.s9api.XdmValue",
+      "net.sf.saxon.lib.CollationURIResolver",
+      "org.openecomp.mso.bpmn.core.XQueryScriptTask",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.camunda.bpm.engine.impl.delegate.DelegateInvocation",
+      "net.sf.saxon.tree.tiny.AppendableCharSequence",
+      "net.sf.saxon.om.GroundedValue",
+      "net.sf.saxon.tree.linked.NodeFactory",
+      "net.sf.saxon.type.SchemaDeclaration",
+      "net.sf.saxon.tree.linked.CommentImpl",
+      "org.camunda.bpm.engine.impl.interceptor.CommandInterceptor",
+      "org.camunda.bpm.engine.variable.value.TypedValue",
+      "net.sf.saxon.trans.BuiltInRuleSet",
+      "org.apache.ibatis.transaction.TransactionFactory",
+      "net.sf.saxon.value.AtomicValue",
+      "net.sf.saxon.trans.NonDelegatingURIResolver",
+      "net.sf.saxon.functions.VendorFunctionLibrary",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnActivityExecution",
+      "net.sf.saxon.pattern.PatternParser20",
+      "net.sf.saxon.expr.instruct.TraceExpression",
+      "org.camunda.bpm.engine.exception.NotAllowedException",
+      "net.sf.saxon.Configuration",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "net.sf.saxon.tree.util.FastStringBuffer",
+      "net.sf.saxon.tree.linked.NodeImpl",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.camunda.bpm.engine.task.Task",
+      "org.camunda.bpm.engine.impl.javax.el.Expression",
+      "net.sf.saxon.type.Type",
+      "net.sf.saxon.s9api.XdmNode",
+      "net.sf.saxon.value.QNameValue",
+      "org.camunda.bpm.engine.impl.context.CoreExecutionContext",
+      "org.openecomp.mso.logger.MsoLogger",
+      "net.sf.saxon.type.SchemaType",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
+      "net.sf.saxon.java.JavaPlatform$1",
+      "net.sf.saxon.expr.instruct.ElementCreator",
+      "net.sf.saxon.om.Item",
+      "org.camunda.bpm.engine.variable.VariableMap",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState$ActivityInstanceStateImpl",
+      "net.sf.saxon.lib.SchemaURIResolver",
+      "org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl",
+      "org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore",
+      "net.sf.saxon.lib.ModuleURIResolver",
+      "org.camunda.bpm.engine.impl.context.BpmnExecutionContext",
+      "net.sf.saxon.expr.parser.ExpressionVisitor",
+      "net.sf.saxon.om.SequenceIterator",
+      "net.sf.saxon.z.IntHashSet",
+      "net.sf.saxon.type.BuiltInType",
+      "org.apache.ibatis.session.SqlSessionFactory",
+      "net.sf.saxon.expr.instruct.Executable",
+      "net.sf.saxon.om.DocumentPool",
+      "net.sf.saxon.expr.LastPositionFinder",
+      "net.sf.saxon.expr.instruct.TailCallReturner",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "net.sf.saxon.type.BuiltInAtomicType",
+      "org.camunda.bpm.engine.SuspendedEntityInteractionException",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.configuration.EELFManager",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionStartContext",
+      "org.camunda.bpm.engine.impl.core.operation.CoreAtomicOperation",
+      "org.camunda.bpm.engine.impl.pvm.PvmTransition",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
+      "org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity",
+      "org.camunda.bpm.engine.impl.core.variable.CoreVariableInstance",
+      "net.sf.saxon.pattern.ContentTypeTest",
+      "net.sf.saxon.query.QueryParser",
+      "net.sf.saxon.om.NodeName",
+      "net.sf.saxon.value.Closure",
+      "net.sf.saxon.expr.instruct.FixedElement",
+      "org.camunda.bpm.engine.impl.pvm.process.TransitionImpl",
+      "net.sf.saxon.s9api.ConstructedItemType",
+      "net.sf.saxon.lib.Numberer",
+      "org.camunda.bpm.engine.delegate.JavaDelegate",
+      "net.sf.saxon.om.IdentityComparable",
+      "net.sf.saxon.z.IntSet",
+      "org.camunda.bpm.application.ProcessApplicationReference",
+      "net.sf.saxon.pattern.QNameTest",
+      "org.camunda.bpm.engine.delegate.BpmnModelExecutionContext",
+      "net.sf.saxon.expr.sort.SortKeyDefinition",
+      "net.sf.saxon.style.XSLAnalyzeString",
+      "org.camunda.bpm.engine.delegate.DelegateExecution",
+      "org.camunda.bpm.engine.delegate.CmmnModelExecutionContext",
+      "net.sf.saxon.expr.instruct.ValueOf",
+      "net.sf.saxon.type.AnyItemType",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.camunda.bpm.engine.impl.javax.el.ELContext",
+      "net.sf.saxon.expr.instruct.WithParam",
+      "org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher",
+      "net.sf.saxon.expr.Assignation",
+      "net.sf.saxon.value.StringToDouble11",
+      "org.camunda.bpm.engine.variable.type.ValueType",
+      "net.sf.saxon.style.StylesheetModule",
+      "net.sf.saxon.value.EmptySequence",
+      "org.camunda.bpm.engine.impl.interceptor.CommandContextListener",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CmmnCaseInstance",
+      "net.sf.saxon.style.PrincipalStylesheetModule",
+      "net.sf.saxon.type.PlainType",
+      "org.camunda.bpm.engine.repository.CaseDefinition",
+      "org.camunda.bpm.engine.impl.db.HasDbRevision",
+      "net.sf.saxon.query.StaticQueryContext",
+      "net.sf.saxon.expr.instruct.SimpleNodeConstructor",
+      "net.sf.saxon.trans.DynamicLoader",
+      "net.sf.saxon.s9api.ItemType$BuiltInAtomicItemType",
+      "org.camunda.bpm.engine.variable.type.SerializableValueType",
+      "net.sf.saxon.event.SaxonLocator",
+      "net.sf.saxon.expr.parser.Optimizer",
+      "org.camunda.bpm.engine.impl.pvm.PvmException",
+      "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
+      "net.sf.saxon.expr.sort.Sortable",
+      "net.sf.saxon.type.ExternalObjectType",
+      "net.sf.saxon.expr.Literal",
+      "net.sf.saxon.style.StyleElement",
+      "org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition",
+      "org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore",
+      "net.sf.saxon.type.ValidationException",
+      "org.camunda.bpm.engine.repository.ProcessDefinition",
+      "net.sf.saxon.style.AbsentExtensionElement",
+      "net.sf.saxon.style.XSLStylesheet",
+      "net.sf.saxon.query.XQueryFunctionBinder",
+      "net.sf.saxon.Platform",
+      "net.sf.saxon.om.AbsolutePath",
+      "net.sf.saxon.style.SourceBinding",
+      "org.camunda.bpm.engine.impl.interceptor.SessionFactory",
+      "net.sf.saxon.trace.InstructionInfo",
+      "net.sf.saxon.pattern.NameTest",
+      "net.sf.saxon.trans.XPathException",
+      "net.sf.saxon.pattern.ItemTypePattern",
+      "org.camunda.bpm.model.bpmn.BpmnModelInstance",
+      "net.sf.saxon.type.SimpleType",
+      "net.sf.saxon.tree.linked.ProcInstImpl",
+      "net.sf.saxon.expr.instruct.UserFunction",
+      "net.sf.saxon.event.SequenceReceiver",
+      "org.camunda.bpm.engine.delegate.VariableScope",
+      "net.sf.saxon.event.FilterFactory",
+      "org.camunda.bpm.engine.ProcessEngine",
+      "org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl",
+      "org.camunda.bpm.engine.impl.variable.listener.CaseVariableListenerInvocation",
+      "org.camunda.bpm.engine.BadUserRequestException",
+      "net.sf.saxon.expr.Callable",
+      "org.camunda.bpm.engine.impl.context.ExecutionContext",
+      "net.sf.saxon.tree.tiny.TinyTree",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
+      "net.sf.saxon.tree.iter.EmptyAxisIterator",
+      "net.sf.saxon.om.NotationSet",
+      "net.sf.saxon.expr.CollationMap",
+      "net.sf.saxon.tree.util.AttributeCollectionImpl",
+      "net.sf.saxon.type.UnionType",
+      "net.sf.saxon.expr.instruct.GeneralVariable",
+      "net.sf.saxon.trans.LicenseException",
+      "org.camunda.bpm.engine.impl.pvm.PvmExecution",
+      "net.sf.saxon.functions.FunctionLibrary",
+      "net.sf.saxon.lib.StandardURIResolver",
+      "org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableStore",
+      "net.sf.saxon.type.TypeHierarchy$2",
+      "net.sf.saxon.trans.Mode$RuleAction",
+      "org.camunda.bpm.engine.runtime.Job",
+      "net.sf.saxon.type.TypeHierarchy$1",
+      "org.camunda.bpm.model.xml.ModelInstance",
+      "net.sf.saxon.om.FingerprintedNode",
+      "org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl",
+      "net.sf.saxon.tree.linked.ParentNodeImpl",
+      "net.sf.saxon.type.ErrorType",
+      "org.openecomp.mso.entity.MsoRequest",
+      "net.sf.saxon.value.NotationValue",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
+      "net.sf.saxon.s9api.ItemType",
+      "net.sf.saxon.type.Untyped",
+      "net.sf.saxon.expr.parser.PathMap$PathMapRoot",
+      "net.sf.saxon.expr.instruct.AttributeCreator",
+      "org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation",
+      "net.sf.saxon.expr.instruct.AttributeSet",
+      "net.sf.saxon.trans.Mode$RuleFilter",
+      "net.sf.saxon.s9api.XdmAtomicValue",
+      "net.sf.saxon.om.AttributeCollection",
+      "org.camunda.bpm.model.xml.instance.ModelElementInstance",
+      "net.sf.saxon.expr.sort.RuleBasedSubstringMatcher",
+      "org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration",
+      "org.camunda.bpm.engine.impl.db.DbEntity",
+      "net.sf.saxon.java.JavaPlatform",
+      "org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution",
+      "org.camunda.bpm.engine.runtime.EventSubscription",
+      "net.sf.saxon.lib.URIChecker",
+      "net.sf.saxon.tree.linked.DocumentImpl",
+      "net.sf.saxon.s9api.XQueryExecutable",
+      "net.sf.saxon.expr.instruct.FixedAttribute",
+      "net.sf.saxon.expr.XPathContextMajor",
+      "net.sf.saxon.type.AtomicType",
+      "net.sf.saxon.expr.instruct.DocumentInstr",
+      "net.sf.saxon.expr.Expression",
+      "net.sf.saxon.serialize.charcode.CharacterSetFactory",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.camunda.bpm.engine.impl.core.variable.scope.MapBasedVariableStore",
+      "net.sf.saxon.tree.util.Navigator",
+      "net.sf.saxon.pattern.NamespaceTest",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext",
+      "org.camunda.bpm.engine.delegate.DelegateCaseVariableInstance",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessElement",
+      "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
+      "net.sf.saxon.tree.iter.ReversibleIterator",
+      "com.att.eelf.configuration.EELFLogger",
+      "net.sf.saxon.event.Builder",
+      "org.camunda.bpm.engine.runtime.CaseInstance",
+      "net.sf.saxon.s9api.SaxonApiException",
+      "org.camunda.bpm.engine.impl.db.DbEntityLifecycleAware",
+      "net.sf.saxon.om.StructuredQName",
+      "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl",
+      "org.camunda.bpm.engine.impl.core.model.CoreModelElement",
+      "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance",
+      "net.sf.saxon.style.StyleNodeFactory",
+      "net.sf.saxon.expr.instruct.Instruction",
+      "net.sf.saxon.functions.FunctionLibraryList",
+      "org.camunda.bpm.engine.delegate.DelegateListener",
+      "net.sf.saxon.event.TeeOutputter",
+      "net.sf.saxon.lib.CollectionURIResolver",
+      "net.sf.saxon.type.SchemaException",
+      "net.sf.saxon.serialize.CDATAFilter",
+      "net.sf.saxon.lib.StringCollator",
+      "net.sf.saxon.expr.XPathContext",
+      "net.sf.saxon.lib.SourceResolver",
+      "net.sf.saxon.expr.MappingFunction",
+      "net.sf.saxon.expr.Container",
+      "net.sf.saxon.type.SchemaComponent",
+      "net.sf.saxon.om.Name11Checker",
+      "net.sf.saxon.expr.parser.ExpressionParser",
+      "org.camunda.bpm.engine.impl.history.event.HistoryEventType",
+      "net.sf.saxon.event.PipelineConfiguration",
+      "net.sf.saxon.tree.wrapper.SiblingCountingNode",
+      "org.camunda.bpm.engine.impl.pvm.process.HasDIBounds",
+      "net.sf.saxon.value.MemoClosure",
+      "net.sf.saxon.value.DecimalValue",
+      "org.camunda.bpm.engine.delegate.DelegateVariableInstance",
+      "net.sf.saxon.TypeCheckerEnvironment",
+      "net.sf.saxon.serialize.AttributeSorter",
+      "net.sf.saxon.regex.RegularExpression",
+      "net.sf.saxon.style.DataElement",
+      "net.sf.saxon.lib.ExtensionFunctionDefinition",
+      "net.sf.saxon.lib.SubstringMatcher",
+      "net.sf.saxon.lib.TraceListener",
+      "org.camunda.bpm.model.bpmn.instance.BaseElement",
+      "net.sf.saxon.style.Declaration",
+      "net.sf.saxon.value.BooleanValue",
+      "net.sf.saxon.expr.parser.CodeInjector",
+      "net.sf.saxon.tree.util.DocumentNumberAllocator",
+      "net.sf.saxon.pattern.PatternThatSetsCurrent",
+      "net.sf.saxon.expr.instruct.Debugger",
+      "org.openecomp.mso.bpmn.core.BaseTask",
+      "net.sf.saxon.pattern.Pattern",
+      "net.sf.saxon.expr.parser.PathMap$PathMapNode",
+      "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity",
+      "net.sf.saxon.expr.instruct.SavedNamespaceContext",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
+      "org.camunda.bpm.engine.impl.variable.AbstractPersistentVariableStore",
+      "org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.camunda.bpm.engine.impl.core.delegate.CoreActivityBehavior",
+      "net.sf.saxon.om.NodeInfo",
+      "net.sf.saxon.event.NamespaceReducer",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
+      "org.camunda.bpm.engine.impl.db.HasDbReferences",
+      "org.camunda.bpm.engine.impl.tree.Collector",
+      "net.sf.saxon.expr.StringLiteral",
+      "org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration",
+      "net.sf.saxon.expr.ItemMappingFunction",
+      "net.sf.saxon.expr.instruct.UseAttributeSets",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
+      "net.sf.saxon.tree.iter.GroundedIterator",
+      "org.camunda.bpm.engine.variable.type.PrimitiveValueType"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(XQueryScriptTaskESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.bpmn.core.XQueryScriptTask",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.camunda.bpm.engine.impl.javax.el.Expression",
+      "org.camunda.bpm.engine.impl.javax.el.ValueExpression",
+      "org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope",
+      "org.camunda.bpm.engine.impl.core.instance.CoreExecution",
+      "org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ActivityInstanceState",
+      "org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntityVariableStore",
+      "org.camunda.bpm.engine.impl.persistence.entity.SuspensionState",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "org.openecomp.mso.bpmn.core.BadInjectedFieldException",
+      "org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl",
+      "org.openecomp.mso.bpmn.core.MissingInjectedFieldException",
+      "net.sf.saxon.java.JavaPlatform",
+      "net.sf.saxon.Configuration",
+      "net.sf.saxon.tree.linked.NodeImpl",
+      "net.sf.saxon.style.StyleElement",
+      "net.sf.saxon.style.LiteralResultElement",
+      "net.sf.saxon.style.AbsentExtensionElement",
+      "org.camunda.bpm.engine.impl.core.variable.VariableMapImpl",
+      "net.sf.saxon.tree.iter.EmptyIterator",
+      "net.sf.saxon.tree.iter.EmptyAxisIterator",
+      "net.sf.saxon.style.XSLAnalyzeString",
+      "net.sf.saxon.tree.util.Navigator",
+      "net.sf.saxon.om.NamespaceBinding",
+      "net.sf.saxon.type.AnySimpleType",
+      "net.sf.saxon.pattern.NodeTest",
+      "net.sf.saxon.pattern.AnyNodeTest",
+      "net.sf.saxon.type.AnyItemType",
+      "net.sf.saxon.type.Type",
+      "net.sf.saxon.z.IntHashMap",
+      "net.sf.saxon.type.AnyType",
+      "net.sf.saxon.type.Untyped",
+      "net.sf.saxon.type.ErrorType",
+      "net.sf.saxon.type.BuiltInType",
+      "net.sf.saxon.type.BuiltInAtomicType",
+      "net.sf.saxon.value.BooleanValue"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTest.java
new file mode 100644 (file)
index 0000000..fec405e
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:28:11 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core.json;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.Iterator;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.json.JSONObject;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class JsonUtilsESTest extends JsonUtilsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      String string0 = JsonUtils.updJsonValue((String) null, "#", "#");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      String string0 = JsonUtils.getJsonValueForKey((JSONObject) null, "LPZc4`q5w]IQMS.^'3");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      String string0 = JsonUtils.getJsonParamValue("", ":bnv,&jl3bK", "");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      String string0 = JsonUtils.getJsonParamValue("", "", "tuw[9j$Sz");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      String string0 = JsonUtils.getJsonValue((String) null, "");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      String string0 = JsonUtils.addJsonValue((String) null, (String) null, (String) null);
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      String string0 = JsonUtils.xml2json("", (Boolean) null);
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      String string0 = JsonUtils.xml2json((String) null);
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      String string0 = JsonUtils.updJsonValue("tV a^wGCAwX", "tV a^wGCAwX", "tV a^wGCAwX");
+      assertEquals("tV a^wGCAwX", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      String string0 = JsonUtils.updJsonValue("", "", "");
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      Boolean boolean0 = Boolean.TRUE;
+      String string0 = JsonUtils.json2xml("", boolean0);
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      String string0 = JsonUtils.getJsonValueForKey("java.io.StringWriter@0000000003", "#");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      Iterator<String> iterator0 = JsonUtils.getJsonIterator((String) null);
+      assertNull(iterator0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      String string0 = JsonUtils.delJsonValue("java.io.StringWriter@0000000003", "java.io.StringWriter@0000000003");
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      String string0 = JsonUtils.delJsonValue("", (String) null);
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      Boolean boolean0 = new Boolean(true);
+      String string0 = JsonUtils.xml2json("Y~N~%]", boolean0);
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      String string0 = JsonUtils.delJsonValue((String) null, "/Y");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      String string0 = JsonUtils.updJsonValue((String) null, (String) null, "/Y");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      String string0 = JsonUtils.addJsonValue("java.io.StringWriter@0000000006", "/Y", (String) null);
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      Boolean boolean0 = JsonUtils.jsonValueExists("getJsonValueForKey(): found value=", "/Y");
+      String string0 = JsonUtils.xml2json("getJsonValueForKey(): found value=", boolean0);
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      String string0 = JsonUtils.json2xml(")?Fx+Bu:)1&$EZEmzoV");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      String string0 = JsonUtils.xml2json("java.io.StringWriter@0000000006");
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      Iterator<String> iterator0 = JsonUtils.getJsonIterator("{+%2:*}\7f4");
+      assertNotNull(iterator0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      JsonUtils jsonUtils0 = new JsonUtils();
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..6d05db0
--- /dev/null
@@ -0,0 +1,120 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:28:11 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core.json;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class JsonUtilsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.json.JsonUtils"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JsonUtilsESTestscaffolding.class.getClassLoader() ,
+      "org.json.JSONObject$Null",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.json.JSONException",
+      "org.openecomp.mso.bpmn.core.xml.XmlTool",
+      "org.json.JSONObject",
+      "org.json.XML",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.json.JSONTokener",
+      "org.openecomp.mso.bpmn.core.json.JsonUtils",
+      "com.att.eelf.configuration.EELFManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.json.JSONArray",
+      "org.json.XMLTokener"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(JsonUtilsESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.bpmn.core.xml.XmlTool",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.json.JSONObject",
+      "org.json.XML",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.bpmn.core.json.JsonUtils",
+      "org.json.JSONException",
+      "org.json.XMLTokener"
+    );
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTest.java
new file mode 100644 (file)
index 0000000..9c17cae
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:33:04 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core.mybatis;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class URNMappingESTest extends URNMappingESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      String string0 = URNMapping.createIdentifierFromURN("!`OYz|WztoeK|A&=&M");
+      assertEquals("URN_OYz_WztoeK_A_M", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      uRNMapping0.setValue("=F'A%");
+      String string0 = uRNMapping0.getValue();
+      assertEquals("=F'A%", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      uRNMapping0.setValue("");
+      String string0 = uRNMapping0.getValue();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      uRNMapping0.setRev("");
+      String string0 = uRNMapping0.getRev();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      uRNMapping0.setName("");
+      String string0 = uRNMapping0.getName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        URNMapping.createIdentifierFromURN((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.bpmn.core.mybatis.URNMapping", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      String string0 = URNMapping.createIdentifierFromURN("mfJ\"%euO;@S_Xm");
+      assertEquals("URN_mfJ_euO_S_Xm", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      uRNMapping0.setRev(":pMWjfl,zq_IA");
+      String string0 = uRNMapping0.getRev();
+      assertEquals(":pMWjfl,zq_IA", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      String string0 = uRNMapping0.getName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      String string0 = uRNMapping0.getRev();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      String string0 = uRNMapping0.getValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      URNMapping uRNMapping0 = new URNMapping();
+      uRNMapping0.setName("c<");
+      String string0 = uRNMapping0.getName();
+      assertEquals("c<", string0);
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTestscaffolding.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/mybatis/URNMappingESTestscaffolding.java
new file mode 100644 (file)
index 0000000..183ea84
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:33:04 GMT 2016
+ */
+
+package org.openecomp.mso.bpmn.core.mybatis;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNMappingESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.bpmn.core.mybatis.URNMapping"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMappingESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.bpmn.core.mybatis.URNMapping"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn b/bpmn/MSOCoreBPMN/src/test/resources/BaseTaskTest.bpmn
new file mode 100644 (file)
index 0000000..d94a0c5
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_IS440DbGEeWouodEI7MXGQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="BaseTaskTest" name="BaseTaskTest" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:serviceTask id="ServiceTask_1" camunda:class="org.openecomp.mso.bpmn.core.TestBaseTask$TestTask" name="TestTask">\r
+      <bpmn2:extensionElements>\r
+        <camunda:field name="existingString">\r
+          <camunda:string>Hello World</camunda:string>\r
+        </camunda:field>\r
+        <camunda:field name="existingStringFromVar">\r
+          <camunda:expression>${firstName}</camunda:expression>\r
+        </camunda:field>\r
+        <camunda:field name="nonExistingStringFromVar">\r
+          <camunda:expression>${undefinedVariable}</camunda:expression>\r
+        </camunda:field>\r
+        <camunda:field name="existingInteger">\r
+          <camunda:string>42</camunda:string>\r
+        </camunda:field>\r
+        <camunda:field name="existingIntegerFromVar">\r
+          <camunda:expression>${age}</camunda:expression>\r
+        </camunda:field>\r
+        <camunda:field name="nonExistingIntegerFromVar">\r
+          <camunda:expression>${undefinedVariable}</camunda:expression>\r
+        </camunda:field>\r
+        <camunda:field name="existingLong">\r
+          <camunda:string>123456789</camunda:string>\r
+        </camunda:field>\r
+        <camunda:field name="existingLongFromVar">\r
+          <camunda:expression>${lastVisit}</camunda:expression>\r
+        </camunda:field>\r
+        <camunda:field name="nonExistingLongFromVar">\r
+          <camunda:expression>${undefinedVariable}</camunda:expression>\r
+        </camunda:field>\r
+        <camunda:field name="existingOutputVar">\r
+          <camunda:string>goodVariable</camunda:string>\r
+        </camunda:field>\r
+        <camunda:field name="existingBadOutputVar">\r
+          <camunda:string>bad Variable</camunda:string>\r
+        </camunda:field>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ServiceTask_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ServiceTask_1" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+  </bpmn2:process>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="BaseTaskTest">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_36" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="55.0" y="38.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_68" bpmnElement="ServiceTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="180.0" y="16.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_36" targetElement="_BPMNShape_ServiceTask_68">\r
+        <di:waypoint xsi:type="dc:Point" x="91.0" y="56.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="180.0" y="56.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_83" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="369.0" y="38.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="387.0" y="79.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ServiceTask_68" targetElement="_BPMNShape_EndEvent_83">\r
+        <di:waypoint xsi:type="dc:Point" x="280.0" y="56.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="369.0" y="56.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="370.0" y="57.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml b/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
new file mode 100644 (file)
index 0000000..4858ea0
--- /dev/null
@@ -0,0 +1,77 @@
+<?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=========================================================
+  -->
+
+
+<beans xmlns="http://www.springframework.org/schema/beans" 
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+  <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
+
+    <property name="jdbcUrl" value="jdbc:h2:mem:camunda;DB_CLOSE_DELAY=1000" />
+    <property name="jdbcDriver" value="org.h2.Driver" />
+    <property name="jdbcUsername" value="sa" />
+    <property name="jdbcPassword" value="" />
+
+    <!-- Database configurations -->
+    <property name="databaseSchemaUpdate" value="true" />
+
+    <!-- job executor configurations -->
+    <property name="jobExecutorActivate" value="false" />
+
+    <property name="history" value="full" />
+
+    <property name="customPostBPMNParseListeners">
+      <list>
+        <bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
+      </list>
+    </property>
+
+    <property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" />
+
+    <!--<property name="idGenerator" ref="uuidGenerator" />-->
+
+    <!-- engine plugins -->
+    <property name="processEnginePlugins">
+      <list>
+        <ref bean="connectProcessEnginePlugin" />
+        <ref bean="spinProcessEnginePlugin" />
+        <ref bean="loggingPlugin" />
+        <ref bean="workflowExceptionPlugin" />
+      </list>
+    </property>
+
+  </bean>
+
+  <bean id="loggingPlugin" class="org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin" />
+
+  <!-- Needed until all subflows generate MSOWorkflowException events -->
+  <bean id="workflowExceptionPlugin" class="org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin" />
+  
+  <bean id="foxFailedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
+
+  <!--<bean id="uuidGenerator" class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" />-->
+
+  <!-- engine plugin beans -->
+  <bean id="connectProcessEnginePlugin" class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
+  <bean id="spinProcessEnginePlugin" class="org.camunda.spin.plugin.impl.SpinProcessEnginePlugin" />
+
+</beans>
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/logback-test.xml b/bpmn/MSOCoreBPMN/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..92876fc
--- /dev/null
@@ -0,0 +1,48 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+  
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.properties b/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.properties
new file mode 100644 (file)
index 0000000..d329dbb
--- /dev/null
@@ -0,0 +1,22 @@
+###
+# ============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=========================================================
+###
+
+URNMapping.FileSystemLoading.Enabled=true
+testKey=testValue
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOCoreBPMN/src/test/resources/mso.bpmn.urn.properties
new file mode 100644 (file)
index 0000000..7fa5873
--- /dev/null
@@ -0,0 +1,21 @@
+###
+# ============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=========================================================
+###
+
+log.debug.TestTask=true
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/request.json b/bpmn/MSOCoreBPMN/src/test/resources/request.json
new file mode 100644 (file)
index 0000000..bdca336
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "variables": {
+    "bpmnRequest": {
+      "value": "<aetgt:service-request xmlns:aetgt=\"http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1\"\n                       xmlns=\"http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1\"\n                       xmlns:msoservtypes=\"http://ecomp.att.com/mso/request/types/v1\"\n                       xmlns:msolayer3=\"http://ecomp.att.com/mso/request/layer3/schema/v1\"\n                       xmlns:rest=\"http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd\">\n  <msoservtypes:request-information>\n    <msoservtypes:request-id>d00eb185-b1d7-429e-aca3-42a61b459535</msoservtypes:request-id>\n    <msoservtypes:request-action>Layer3ServiceActivateRequest</msoservtypes:request-action>\n    <msoservtypes:source>OMX</msoservtypes:source>\n    <msoservtypes:notification-url>http://localhost:8080/simulada/CSI/SendManagedNetworkStatusNotification</msoservtypes:notification-url>\n    <msoservtypes:order-number>19630501</msoservtypes:order-number>\n    <msoservtypes:order-version>1</msoservtypes:order-version>\n  </msoservtypes:request-information>\n  <msoservtypes:service-information>\n    <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>\n    <msoservtypes:service-instance-id>AA01|VLXM|003717||SW_INTERNET</msoservtypes:service-instance-id>\n    <msoservtypes:subscriber-name>TEST_4306301</msoservtypes:subscriber-name>\n  </msoservtypes:service-information>\n  <service-parameters>\n      <msolayer3:internet-service-information>\n      <msolayer3:internet-evc-access-information>\n        <msolayer3:internet-evc-speed-value>10</msolayer3:internet-evc-speed-value>\n        <msolayer3:internet-evc-speed-units>Mbps</msolayer3:internet-evc-speed-units>\n        <msolayer3:ip-version>ds</msolayer3:ip-version>\n      </msolayer3:internet-evc-access-information>\n      <msolayer3:vr-lan>\n        <msolayer3:routing-protocol>none</msolayer3:routing-protocol>\n        <msolayer3:vr-lan-interface>\n          <msolayer3:vr-designation>primary</msolayer3:vr-designation>\n          <msolayer3:v4-public-lan-prefixes>\n            <msolayer3:t-provided-v4-lan-public-prefixes>\n              <msolayer3:request-index>1</msolayer3:request-index>\n              <msolayer3:v4-next-hop-address>32.10.30.116</msolayer3:v4-next-hop-address>\n              <msolayer3:v4-lan-public-prefix-length>32</msolayer3:v4-lan-public-prefix-length>\n            </msolayer3:t-provided-v4-lan-public-prefixes>\n          </msolayer3:v4-public-lan-prefixes>\n          <msolayer3:v6-public-lan-prefixes>\n            <msolayer3:t-provided-v6-lan-public-prefixes>\n              <msolayer3:request-index>1</msolayer3:request-index>\n              <msolayer3:v6-next-hop-address>2507:0CB4:85A5:0030:0000:0000:0000:0010</msolayer3:v6-next-hop-address>\n              <msolayer3:v6-lan-public-prefix-length>48</msolayer3:v6-lan-public-prefix-length>\n            </msolayer3:t-provided-v6-lan-public-prefixes>\n          </msolayer3:v6-public-lan-prefixes>\n          <msolayer3:dhcp>\n            <msolayer3:v4-dhcp-server-enabled>Y</msolayer3:v4-dhcp-server-enabled>\n            <msolayer3:v6-dhcp-server-enabled>Y</msolayer3:v6-dhcp-server-enabled>\n            <msolayer3:use-v4-default-pool>Y</msolayer3:use-v4-default-pool>\n            <msolayer3:use-v6-default-pool>Y</msolayer3:use-v6-default-pool>\n          </msolayer3:dhcp>\n          <msolayer3:pat>\n            <msolayer3:v4-pat-enabled>Y</msolayer3:v4-pat-enabled>\n            <msolayer3:use-v4-default-pool>N</msolayer3:use-v4-default-pool>\n          </msolayer3:pat>\n          <msolayer3:firewall-lite>\n            <msolayer3:stateful-firewall-lite-v4-enabled>Y</msolayer3:stateful-firewall-lite-v4-enabled>\n            <msolayer3:stateful-firewall-lite-v6-enabled>Y</msolayer3:stateful-firewall-lite-v6-enabled>\n          </msolayer3:firewall-lite>\n        </msolayer3:vr-lan-interface>\n      </msolayer3:vr-lan>\n    </msolayer3:internet-service-information>\n  </service-parameters>\n</aetgt:service-request>\n",
+      "type": "String"
+    },
+    "host": {
+      "value": "localhost",
+      "type": "String"
+    },
+    "att-mso-schema-version": {
+      "value": "v1",
+      "type": "String"
+    },
+    "att-mso-request-id": {
+      "value": "d00eb185-b1d7-429e-aca3-42a61b459535",
+      "type": "String"
+    },
+    "att-mso-service-instance-id": {
+      "value": "AA01|VLXM|003717||SW_INTERNET",
+      "type": "String"
+    },
+    "att-mso-service-request-timeout": {
+      "value": "180",
+      "type": "String"
+    }
+  }
+}
diff --git a/bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF b/bpmn/MSOGammaBPMN/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..254272e
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+
diff --git a/bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF b/bpmn/MSOGammaBPMN/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..254272e
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+
diff --git a/bpmn/MSOGammaBPMN/pom.xml b/bpmn/MSOGammaBPMN/pom.xml
new file mode 100644 (file)
index 0000000..fa2055c
--- /dev/null
@@ -0,0 +1,325 @@
+<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.openecomp.mso</groupId>
+               <artifactId>bpmn</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>MSOGammaBPMN</artifactId>
+       <packaging>war</packaging>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.3</version>
+                               <configuration>
+                                       <source>1.7</source>
+                                       <target>1.7</target>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                               </configuration>
+                       </plugin>
+               <plugin>
+                       <groupId>org.apache.maven.plugins</groupId>
+                       <artifactId>maven-compiler-plugin</artifactId>
+                       <version>3.1</version>
+                               <configuration>
+                               <source>1.7</source>
+                               <target>1.7</target>
+                                        </configuration>
+               </plugin>
+                       <plugin>
+                               <groupId>org.apache.cxf</groupId>
+                               <artifactId>cxf-codegen-plugin</artifactId>
+                               <version>2.5.2</version>
+                       </plugin>
+                       <plugin>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-eclipse-plugin</artifactId>
+               <version>2.8</version>
+               <configuration>
+                       <additionalProjectnatures>
+                       <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
+                       </additionalProjectnatures>
+                       <sourceIncludes>
+                       <sourceInclude>**/*.groovy</sourceInclude>
+                       </sourceIncludes>
+               </configuration>
+               </plugin>
+                       <plugin>
+                               <artifactId>maven-antrun-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>compile</id>
+                                               <phase>compile</phase>
+                                               <configuration>
+                                                       <tasks>
+                                                               <mkdir dir="${basedir}/src/main/groovy" />
+                                                               <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
+                                                                       <classpath refid="maven.compile.classpath" />
+                                                               </taskdef>
+                                                               <mkdir dir="${project.build.outputDirectory}" />
+                                                               <groovyc destdir="${project.build.outputDirectory}"
+                                                                       srcdir="${basedir}/src/main/groovy/" listfiles="true">
+                                                                       <classpath refid="maven.compile.classpath" />
+                                                               </groovyc>
+                                                       </tasks>
+                                               </configuration>
+                                               <goals>
+                                                       <goal>run</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>test-compile</id>
+                                               <phase>test-compile</phase>
+                                               <configuration>
+                                                       <tasks>
+                                                               <mkdir dir="${basedir}/src/test/groovy" />
+                                                               <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
+                                                                       <classpath refid="maven.test.classpath" />
+                                                               </taskdef>
+                                                               <mkdir dir="${project.build.testOutputDirectory}" />
+                                                               <groovyc destdir="${project.build.testOutputDirectory}"
+                                                                       srcdir="${basedir}/src/test/groovy/" listfiles="true">
+                                                                       <classpath refid="maven.test.classpath" />
+                                                               </groovyc>
+                                                       </tasks>
+                                               </configuration>
+                                               <goals>
+                                                       <goal>run</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings
+                                       only. It has no influence on the Maven build itself. -->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>
+                                                                                       org.apache.maven.plugins
+                                                                               </groupId>
+                                                                               <artifactId>
+                                                                                       maven-antrun-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [1.3,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>run</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+
+       <dependencies>
+               <dependency>
+                       <!-- process engine, in compile scope to include it in the war file -->
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine</artifactId>
+                       <scope>compile</scope>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.slf4j</groupId>
+                                       <artifactId>slf4j-api</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <!-- Using the `DefaultEjbProcessApplication` result in: `java.sql.SQLException:
+                       You cannot commit during a managed transaction!` -->
+               <dependency>
+                       <!-- CDI integration, needs to be included in WAR, otherwise CDI can not
+                               work correctly -->
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine-cdi</artifactId>
+               </dependency>
+
+               <dependency>
+                       <!-- AssertJ Testing Library -->
+                       <groupId>org.camunda.bpm.extension</groupId>
+                       <artifactId>camunda-bpm-assert</artifactId>
+                       <version>1.2</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-all</artifactId>
+                       <version>1.10.19</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <!-- Optional Plugin for Camunda BPM Workbench -->
+                       <groupId>org.camunda.bpm.workbench</groupId>
+                       <artifactId>camunda-workbench-dist-embeddable</artifactId>
+                       <version>1.0.0-alpha8</version>
+                       <scope>test</scope>
+               </dependency>
+
+               <!-- Spin dataformat support, in compile scope to include it in the war
+                       file -->
+               <dependency>
+                       <groupId>org.camunda.spin</groupId>
+                       <artifactId>camunda-spin-dataformat-all</artifactId>
+                       <scope>compile</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine-plugin-spin</artifactId>
+                       <scope>compile</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine-plugin-connect</artifactId>
+                       <scope>compile</scope>
+               </dependency>
+
+               <dependency>
+                       <!-- Bootstrap for styling via Webjars project -->
+                       <groupId>org.webjars</groupId>
+                       <artifactId>bootstrap</artifactId>
+                       <version>2.3.2</version>
+               </dependency>
+
+               <dependency>
+                   <groupId>org.jboss.resteasy</groupId>
+                   <artifactId>resteasy-client</artifactId>
+                   <version>3.0.19.Final</version>
+                   <scope>provided</scope>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.apache.httpcomponents</groupId>
+                                       <artifactId>httpclient</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.11</version>
+                       <scope>test</scope>
+               </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>
+               </dependency>
+               <dependency>
+                       <groupId>org.codehaus.groovy</groupId>
+                       <artifactId>groovy-all</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.commons</groupId>
+                       <artifactId>commons-lang3</artifactId>
+                       <version>3.4</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>MSOCoreBPMN</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <!-- unit test utilities -->
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>MSOCoreBPMN</artifactId>
+                       <version>${project.version}</version>
+                       <classifier>test</classifier>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>javax.ws.rs</groupId>
+                       <artifactId>javax.ws.rs-api</artifactId>
+                       <version>2.0</version>
+               </dependency>
+               <!--            for encoding the url the same way A&AI does -->
+       <dependency>
+          <groupId>org.springframework</groupId>
+       <artifactId>spring-web</artifactId>
+       <version>4.3.2.RELEASE</version>
+       </dependency>
+
+       <dependency>
+         <groupId>org.openecomp.mso</groupId>
+         <artifactId>MSORESTClient</artifactId>
+         <version>${project.version}</version>
+       </dependency>
+
+<!-- Took from MockServer modules after removing it to avoid class file for javax.servlet.ServletContextListener not found -->
+       <dependency>
+                       <groupId>com.github.tomakehurst</groupId>
+                       <artifactId>wiremock</artifactId>
+                       <version>1.56</version>
+                       <classifier>standalone</classifier>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.mortbay.jetty</groupId>
+                                       <artifactId>jetty</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.google.guava</groupId>
+                                       <artifactId>guava</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.fasterxml.jackson.core</groupId>
+                                       <artifactId>jackson-core</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.fasterxml.jackson.core</groupId>
+                                       <artifactId>jackson-annotations</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.fasterxml.jackson.core</groupId>
+                                       <artifactId>jackson-databind</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.httpcomponents</groupId>
+                                       <artifactId>httpclient</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.skyscreamer</groupId>
+                                       <artifactId>jsonassert</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>xmlunit</groupId>
+                                       <artifactId>xmlunit</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.jayway.jsonpath</groupId>
+                                       <artifactId>json-path</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>net.sf.jopt-simple</groupId>
+                                       <artifactId>jopt-simple</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AaiUtil.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AaiUtil.groovy
new file mode 100644 (file)
index 0000000..96431b6
--- /dev/null
@@ -0,0 +1,530 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+class AaiUtil {
+
+       public MsoUtils utils = new MsoUtils()
+       public static final String NETWORK_GENERIC_VNF = 'aai_network_generic_vnf_uri'
+       public static final String NETWORK_VPN_BINDING = 'aai_network_vpn_binding_uri'
+       public static final String NETWORK_POLICY = 'aai_network_policy_uri'
+       public static final String NETWORK_VCE = 'aai_network_vce_uri'
+       public static final String NETWORK_L3_NETWORK = 'aai_network_l3_network_uri'
+       public static final String NETWORK_TABLE_REFERENCES = 'aai_network_table_reference_uri'
+       public static final String BUSINESS_CUSTOMER = 'aai_business_customer_uri'
+       public static final String BUSINESS_CUSTOMERV7 = 'aaiv7_business_customer_uri'
+       public static final String CLOUD_INFRASTRUCTURE_VOLUME_GROUP = 'aai_cloud_infrastructure_volume_group_uri'
+       public static final String CLOUD_INFRASTRUCTURE_CLOUD_REGION = 'aai_cloud_infrastructure_cloud_region_uri'
+       public static final String CLOUD_INFRASTRUCTURE_TENANT = 'aai_cloud_infrastructure_tenant_uri'
+       public static final String SEARCH_GENERIC_QUERY = 'aai_search_generic_query_uri'
+       public static final String SEARCH_NODES_QUERY = 'aai_search_nodes_query_uri'
+       public static final String AAI_NAMESPACE_STRING = 'http://org.openecomp.aai.inventory/'
+
+       private AbstractServiceTaskProcessor taskProcessor
+
+       public AaiUtil(AbstractServiceTaskProcessor taskProcessor) {
+               this.taskProcessor = taskProcessor
+       }
+       
+       public String getNetworkGenericVnfEndpoint(Execution execution) {
+               def method = getClass().getSimpleName() + '.getNetworkGenericVnfUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String endpoint = execution.getVariable("URN_aai_endpoint")
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, NETWORK_GENERIC_VNF)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return endpoint + uri
+       }
+
+       public String getNetworkGenericVnfUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getNetworkGenericVnfUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, NETWORK_GENERIC_VNF)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+       
+       
+
+       public String getNetworkVpnBindingUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getNetworkVpnBindingUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, NETWORK_VPN_BINDING)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getNetworkPolicyUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getNetworkPolicyUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, NETWORK_POLICY)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getNetworkTableReferencesUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getNetworkTableReferencesUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, NETWORK_TABLE_REFERENCES)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+       
+       public String getNetworkVceUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getNetworkVceUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, NETWORK_VCE)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getNetworkL3NetworkUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getNetworkL3NetworkUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, NETWORK_L3_NETWORK)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getBusinessCustomerUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getBusinessCustomerUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, BUSINESS_CUSTOMER)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getBusinessCustomerUriv7(Execution execution) {
+               def method = getClass().getSimpleName() + '.getBusinessCustomerUriv7(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, BUSINESS_CUSTOMERV7)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getCloudInfrastructureCloudRegionEndpoint(Execution execution) {
+               def method = getClass().getSimpleName() + '.getCloudInfrastructureCloudRegionUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String endpoint = execution.getVariable("URN_aai_endpoint")
+               
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, CLOUD_INFRASTRUCTURE_CLOUD_REGION)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return endpoint + uri
+       }
+       
+       /**
+        * This method is depracated, use getCloudInfrastructureRegionEndpoint instead
+        */
+       //@Deprecated
+       public String getCloudInfrastructureCloudRegionUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getCloudInfrastructureCloudRegionUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, CLOUD_INFRASTRUCTURE_CLOUD_REGION)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getCloudInfrastructureVolumeGroupEndpoint(Execution execution) {
+               def method = getClass().getSimpleName() + '.getCloudInfrastructureVolumeGroupUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String endpoint = execution.getVariable("URN_aai_endpoint")
+               
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, CLOUD_INFRASTRUCTURE_VOLUME_GROUP)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return endpoint + uri
+       }
+       
+       public String getCloudInfrastructureVolumeGroupUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getCloudInfrastructureVolumeGroupUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, CLOUD_INFRASTRUCTURE_VOLUME_GROUP)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getCloudInfrastructureTenantUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getCloudInfrastructureTenantUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, CLOUD_INFRASTRUCTURE_TENANT)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getSearchNodesQueryUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getSearchNodesQueryUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, SEARCH_NODES_QUERY)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+       
+       public String getSearchNodesQueryEndpoint(Execution execution) {
+               def method = getClass().getSimpleName() + '.getSearchNodesQueryUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+               
+               String endpoint = execution.getVariable("URN_aai_endpoint")
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, SEARCH_NODES_QUERY)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return endpoint + uri
+       }
+       
+       public String getSearchGenericQueryUri(Execution execution) {
+               def method = getClass().getSimpleName() + '.getSearchGenericQueryUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uri = getUri(execution, SEARCH_GENERIC_QUERY)
+
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getUri(Execution execution, String key) {
+               def method = getClass().getSimpleName() + '.getUri(' +
+               'execution=' + execution.getId() +
+               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def processKey = taskProcessor.getProcessKey(execution)
+               def uriKey = "URN_mso_workflow_${processKey}_${key}"
+               def defaultUriKey = "URN_mso_workflow_default_${key}"
+
+               taskProcessor.logDebug('URI Key ' + uriKey, isDebugLogEnabled)
+               taskProcessor.logDebug('Default URI Key ' + defaultUriKey, isDebugLogEnabled)
+
+               def uri = execution.getVariable(uriKey)
+               if (uri == null || uri == "") {
+                       taskProcessor.logDebug("Process specific key not defined, using default key $defaultUriKey", isDebugLogEnabled)
+                       uri = execution.getVariable(defaultUriKey)
+               }
+
+               taskProcessor.logDebug('AAI URI is ' + uri, isDebugLogEnabled)
+               taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               return uri
+       }
+
+       public String getNamespaceFromUri(String uri) {
+                       String namespace = AAI_NAMESPACE_STRING
+                       if(uri!=null){
+                               return namespace + uri.substring(uri.indexOf("v"),  uri.indexOf("v")+2)
+                       }else{
+                               return namespace
+                       }
+       }
+
+
+       
+       /**
+        * This reusable method can be used for making AAI Get Calls. The url should
+        * be passed as a parameter along with the execution.  The method will
+        * return an APIResponse.
+        *
+        * @param execution
+        * @param url
+        *
+        * @return APIResponse
+        */
+       public APIResponse executeAAIGetCall(Execution execution, String url){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               taskProcessor.logDebug(" ======== STARTED Execute AAI Get Process ======== ", isDebugEnabled)
+               try{
+                       String uuid = UUID.randomUUID()
+                       taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+                       taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+                                       
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(url);
+                       RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/xml");
+
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+
+                       APIResponse apiResponse = client.get()
+                       return apiResponse
+
+               }catch(Exception e){
+                       taskProcessor.logDebug("Exception occured while executing AAI Get Call. Exception is: \n" + e, isDebugEnabled)
+                       return e
+               }
+               taskProcessor.logDebug( "======== COMPLETED Execute AAI Get Process ======== ", isDebugEnabled)
+       }
+
+       /**
+        * This reusable method can be used for making AAI httpPut Calls. The url should
+        * be passed as a parameter along with the execution and payload.  The method will
+        * return an APIResponse.
+        *
+        * @param execution
+        * @param url
+        * @param payload
+        *
+        * @return APIResponse
+        */
+       public APIResponse executeAAIPutCall(Execution execution, String url, String payload){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               taskProcessor.logDebug( " ======== Started Execute AAI Put Process ======== ", isDebugEnabled)
+               try{
+                       String uuid = UUID.randomUUID()
+                       taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+
+                       taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(url);
+                       RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Content-Type", "application/xml").addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse apiResponse = client.httpPut(payload)
+
+                       return apiResponse
+               }catch(Exception e){
+                       taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Put Call. Exception is: \n" + e, isDebugEnabled)
+                       return e
+               }
+               taskProcessor.logDebug( "======== Completed Execute AAI Put Process ======== ", isDebugEnabled)
+       }
+
+
+       /**
+        * This reusable method can be used for making AAI Delete Calls. The url should
+        * be passed as a parameter along with the execution.  The method will
+        * return an APIResponse.
+        *
+        * @param execution
+        * @param url
+        *
+        * @return APIResponse
+        */
+       public APIResponse executeAAIDeleteCall(Execution execution, String url){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               taskProcessor.logDebug( " ======== Started Execute AAI Delete Process ======== ", isDebugEnabled)
+               try{
+                       String uuid = UUID.randomUUID()
+                       taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
+
+                       taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(url);
+                       RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse apiResponse = client.delete()
+
+                       return apiResponse
+
+               }catch(Exception e){
+                       taskProcessor.utils.log("ERROR", "Exception occured while executing AAI Delete Call. Exception is: \n" + e, isDebugEnabled)
+                       return e
+               }
+               taskProcessor.logDebug( "======== Completed Execute AAI Delete Process ======== ", isDebugEnabled)
+       }
+
+
+       /** Utilitty to get the Cloud Region from AAI
+        * Returns String cloud region id, (ie, cloud-region-id)
+        * @param execution
+        * @param url  - url for AAI get cloud region
+        * @param backend - "PO" - real region, or "SDNC" - v2.5 (fake region).
+        */
+
+       //TODO: We should refactor this method to return WorkflowException instead of Error. Also to throw MSOWorkflowException which the calling flow will then catch.
+
+       public String getAAICloudReqion(Execution execution, String url, String backend, inputCloudRegion){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+               try {
+                 APIResponse apiResponse = executeAAIGetCall(execution, url)
+                 String returnCode = apiResponse.getStatusCode()
+                 String aaiResponseAsString = apiResponse.getResponseBodyAsString()
+                 taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region Return code: " + returnCode, isDebugEnabled)
+                 execution.setVariable(execution.getVariable("prefix")+"queryCloudRegionReturnCode", returnCode)
+                 //taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region Response: " + aaiResponseAsString, isDebugEnabled)
+                 //execution.setVariable(execution.getVariable("prefix")+"queryCloudRegionResponse", aaiResponseAsString)
+                 String regionId = ""
+                 if (returnCode == "200") {
+                        taskProcessor.utils.log("DEBUG", "Call AAI Cloud Region is Successful.", isDebugEnabled)
+                          try {
+                          String regionVersion = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-version")
+                          taskProcessor.utils.log("DEBUG", "Cloud Region Version from AAI for " + backend + " is: " + regionVersion, isDebugEnabled)
+                          if (backend == "PO") {
+                                 regionId = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-id")
+                          } else { // backend not "PO"
+                                 if (regionVersion == "2.5" ) {
+                                         regionId = "AAIAIC25"
+                                 } else {
+                                         regionId = taskProcessor.utils.getNodeText(aaiResponseAsString, "cloud-region-id")
+                                 }
+                          }
+
+                          taskProcessor.utils.log("DEBUG", "Cloud Region Id from AAI " + backend + " is: " + regionId, isDebugEnabled)
+                          return regionId
+
+                        } catch (Exception e) {
+                                 taskProcessor.utils.log("ERROR", "Exception occured while getting the Cloud Reqion. Exception is: \n" + e, isDebugEnabled)
+                                 return "ERROR"
+                        }
+                 } else { // not 200
+                     if (returnCode == "404") {
+                                if (backend == "PO") {
+                                         regionId = inputCloudRegion
+                                } else  {  // backend not "PO"
+                                         regionId = "AAIAIC25"
+                                }
+                                taskProcessor.utils.log("DEBUG", "Cloud Region value for code='404' of " + backend + " is: " + regionId, isDebugEnabled)
+                                 return regionId
+                     } else {
+                             taskProcessor.utils.log("ERROR", "Call AAI Cloud Region is NOT Successful.", isDebugEnabled)
+                             return "ERROR"
+                     }
+                 }
+               }catch(Exception e) {
+                  taskProcessor.utils.log("ERROR", "Exception occured while getting the Cloud Reqion. Exception is: \n" + e, isDebugEnabled)
+                  return "ERROR"
+               }
+       }
+
+       /* returns xml Node with service-type of searchValue */
+       def searchServiceType(xmlInput, searchValue){
+               def fxml= new XmlSlurper().parseText(xmlInput)
+               def ret = fxml.'**'.find {it.'service-type' == searchValue}
+               return ret
+       }
+
+       /* returns xml Node with service-instance-id of searchValue */
+       def searchServiceInstanceId(xmlInput, searchValue){
+               def ret = xmlInput.'**'.find {it.'service-instance-id' == searchValue}
+               return ret
+       }
+
+
+
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AbstractServiceTaskProcessor.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/AbstractServiceTaskProcessor.groovy
new file mode 100644 (file)
index 0000000..168cf0b
--- /dev/null
@@ -0,0 +1,874 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import javax.xml.transform.Transformer
+import javax.xml.transform.TransformerException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.impl.core.variable.value.ObjectValueImpl
+import org.camunda.bpm.engine.runtime.Execution
+import org.camunda.bpm.engine.variable.VariableMap
+
+
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.gamma.workflow.service.WorkflowCallbackResponse
+import org.openecomp.mso.bpmn.gamma.workflow.service.WorkflowContextHolder
+
+import groovy.json.JsonSlurper
+
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import org.camunda.bpm.engine.variable.VariableMap;
+import org.camunda.bpm.engine.variable.Variables;
+import org.camunda.bpm.engine.variable.Variables.SerializationDataFormats;
+import org.w3c.dom.Node;
+
+public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcessor {
+       public MsoUtils utils = new MsoUtils()
+
+
+       /**
+        * Logs a message at the ERROR level.
+        * @param message the message
+        */
+       public void logError(String message) {
+               log('ERROR', message, null, "true")
+       }
+
+       /**
+        * Logs a message at the ERROR level.
+        * @param message the message
+        * @param cause the cause (stracktrace will be included in the output)
+        */
+       public void logError(String message, Throwable cause) {
+               log('ERROR', message, cause, "true")
+       }
+
+       /**
+        * Logs a message at the WARN level.
+        * @param message the message
+        */
+       public void logWarn(String message) {
+               log('WARN', message, null, "true")
+       }
+
+       /**
+        * Logs a message at the WARN level.
+        * @param message the message
+        * @param cause the cause (stracktrace will be included in the output)
+        */
+       public void logWarn(String message, Throwable cause) {
+               log('WARN', message, cause, "true")
+       }
+
+       /**
+        * Logs a message at the INFO level.
+        * @param message the message
+        */
+       public void logInfo(String message) {
+               log('INFO', message, null, "true")
+       }
+
+       /**
+        * Logs a message at the INFO level.
+        * @param message the message
+        * @param cause the cause (stracktrace will be included in the output)
+        */
+       public void logInfo(String message, Throwable cause) {
+               log('INFO', message, cause, "true")
+       }
+
+       /**
+        * Logs a message at the DEBUG level.
+        * @param message the message
+        * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
+        */
+       public void logDebug(String message, String isDebugLogEnabled) {
+               log('DEBUG', message, null, isDebugLogEnabled)
+       }
+
+       /**
+        * Logs a message at the DEBUG level.
+        * @param message the message
+        * @param cause the cause (stracktrace will be included in the output)
+        * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
+        */
+       public void logDebug(String message, Throwable cause, String isDebugLogEnabled) {
+               log('DEBUG', message, cause, isDebugLogEnabled)
+       }
+
+       /**
+        * Logs a message at the specified level.
+        * @param level the level (DEBUG, INFO, WARN, ERROR)
+        * @param message the message
+        * @param isLevelEnabled a flag indicating if the level is enabled
+        *        (used only at the DEBUG level)
+        */
+       public void log(String level, String message, String isLevelEnabled) {
+               log(level, message,  null, isLevelEnabled)
+       }
+
+       /**
+        * Logs a message at the specified level.
+        * @param level the level (DEBUG, INFO, WARN, ERROR)
+        * @param message the message
+        * @param cause the cause (stracktrace will be included in the output)
+        * @param isLevelEnabled a flag indicating if the level is enabled
+        *        (used only at the DEBUG level)
+        */
+       public void log(String level, String message, Throwable cause, String isLevelEnabled) {
+               if (cause == null) {
+                       utils.log(level, message, isLevelEnabled);
+               } else {
+                       StringWriter stringWriter = new StringWriter();
+                       PrintWriter printWriter = new PrintWriter(stringWriter);
+                       printWriter.println(message);
+                       cause.printStackTrace(printWriter);
+                       utils.log(level, stringWriter.toString(), isLevelEnabled);
+                       printWriter.close();
+               }
+       }
+
+       /**
+        * Logs a WorkflowException at the ERROR level with the specified message.
+        * @param execution the execution
+        */
+       public void logWorkflowException(Execution execution, String message) {
+               def workflowException = execution.getVariable("WorkflowException")
+
+               if (workflowException == null) {
+                       logError(message);
+               } else {
+                       logError(message + ": " + workflowException)
+               }
+       }
+
+       /**
+        * Saves the WorkflowException in the execution to the specified variable,
+        * clearing the WorkflowException variable so the workflow can continue
+        * processing (perhaps catching another WorkflowException).
+        * @param execution the execution
+        * @return the name of the destination variable
+        */
+       public saveWorkflowException(Execution execution, String variable) {
+               if (variable == null) {
+                       throw new NullPointerException();
+               }
+
+               execution.setVariable(variable, execution.getVariable("WorkflowException"))
+               execution.setVariable("WorkflowException", null)
+       }
+
+       /**
+        * Builds a success response from the specified message content and numeric
+        * response code.  The response code may be an integer or a string representation
+        * of an integer.  The response is stored in the execution where it may be
+        * picked up by the Workflow service.
+        * <p>
+        * IMPORTANT: the activity that executes this method should have an
+        * asynchronous continuation after it to ensure the execution variables
+        * are persisted to the database.
+        * @param execution the execution
+        * @param content the message content
+        * @param responseCode the message response code
+        */
+       @Deprecated
+       public void buildResponse(Execution execution, String content, Object responseCode) {
+               buildResponse(execution, content, responseCode, true)
+       }
+
+       /**
+        * Builds a standard error response containing the specified error message and
+        * numeric response code.  The response code may be an integer or a string
+        * representation of an integer.  The response is stored in the execution where
+        * it may be picked up by the Workflow service.
+        * <p>
+        * IMPORTANT: the activity that executes this method should have an
+        * asynchronous continuation after it to ensure the execution variables
+        * are persisted to the database.
+        * @param execution the execution
+        * @param content the message content
+        * @param errorCode the message response code
+        */
+       @Deprecated
+       public void buildErrorResponse(Execution execution, String errorMessage, Object errorCode) {
+
+               def encErrorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+
+               def content = """
+                       <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                       <aetgt:ErrorMessage>${encErrorMessage}</aetgt:ErrorMessage>
+                       <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                       </aetgt:WorkflowException>
+                 """
+
+               buildResponse(execution, content, errorCode, false)
+       }
+
+       // BEGIN LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+       /**
+        * Builds a standard error response containing the specified error message
+        * and a numeric response code.  The response code is obtained from the
+        * prefix+"ResponseCode" execution variable. The response is stored in the
+        * execution where it may be picked up by the Workflow service.
+        * <p>
+        * IMPORTANT: the activity that executes this method should have an
+        * asynchronous continuation after it to ensure the execution variables
+        * are persisted to the database.
+        * <p>
+        * This method is deprecated. Methods that accept a response code should
+        * be used instead.
+        * @param execution the execution
+        * @param errorMessage the error message for the error response
+        */
+       @Deprecated
+       public void buildErrorResponse(Execution execution, String errorMessage) {
+               buildErrorResponse(execution, errorMessage, null)
+       }
+       // END LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+
+       /**
+        * Builds a response from the specified message content and numeric response
+        * code.  The response code may be an integer or a string representation of
+        * an integer.  The response is stored in the execution where it may be
+        * picked up by the Workflow service.
+        * <p>
+        * IMPORTANT: the activity that executes this method should have an
+        * asynchronous continuation after it to ensure the execution variables
+        * are persisted to the database.
+        * @param execution the execution
+        * @param content the message content
+        * @param responseCode the message response code
+        * @param isSuccess true if this is a success response
+        */
+       @Deprecated
+       protected void buildResponse(Execution execution, String content, Object responseCode,
+                       boolean isSuccess) {
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+
+               String processKey = getProcessKey(execution);
+               logDebug("Building " + processKey + " response", isDebugLogEnabled)
+
+               Map<String, Object> responseMap = new HashMap<String, Object>()
+
+               if (isSuccess) {
+                       responseMap.put("Status", "Success")
+               } else {
+                       responseMap.put("Status", "Fail")
+               }
+
+               // BEGIN LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+               def prefix = execution.getVariable("prefix")
+
+               if (responseCode == null) {
+                       responseCode = execution.getVariable(prefix+"ResponseCode")
+               } else {
+                       execution.setVariable(prefix+"ResponseCode", String.valueOf(responseCode))
+               }
+               // END LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+
+               responseMap.put("ResponseCode", String.valueOf(responseCode))
+
+               if (isSuccess) {
+                       responseMap.put("Status", "Success")
+                       // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+                       execution.setVariable("WorkflowResponse", content)
+                       // BEGIN LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+                       execution.setVariable(processKey+"Response", content)
+                       execution.setVariable(prefix+"ErrorResponse", null)
+                       // END LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+               } else {
+                       responseMap.put("Status", "Fail")
+                       // BEGIN LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+                       execution.setVariable(prefix+"ErrorResponse", content)
+                       execution.setVariable(prefix+"Response", null)
+                       // END LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+               }
+
+               responseMap.put("Response", content)
+
+               logDebug(processKey
+                       + " ResponseCode=" + responseMap.get("ResponseCode")
+                       + " Status=" + responseMap.get("Status")
+                       + " Response=\n" + responseMap.get("Response"),
+                       isDebugLogEnabled)
+
+               execution.setVariable(processKey + "ResponseMap", responseMap)
+       }
+
+       /**
+        * Builds an error response (if one has not already been built) and throws
+        * a BpmnError of type "MSOWorkflowException" that can be caught as a
+        * boundary event.
+        * @param execution the execution
+        * @param errorMessage the error message for the error response
+        * @param responseCode the message response code
+        */
+       @Deprecated
+       public void workflowException(Execution execution, String errorMessage, Object responseCode) {
+               String processKey = getProcessKey(execution);
+
+               buildErrorResponse(execution, errorMessage, responseCode)
+               throw new BpmnError("MSOWorkflowException")
+       }
+
+       /**
+        * Puts a WorkflowException into the execution
+        * @param execution the execution
+        * @param errorCode the error code (normally a 4-digit number)
+        * @param errorMessage the error message
+        */
+       @Deprecated
+       public void newWorkflowException(Execution execution, int errorCode, String errorMessage) {
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               String processKey = getProcessKey(execution);
+               logDebug("Building a " + processKey + " WorkflowException", isDebugLogEnabled)
+
+               if (errorCode < 1000) {
+                       throw new IllegalArgumentException("ErrorCode must be a number greater than 1000");
+               }
+
+               WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+               execution.setVariable("WorkflowException", exception);
+       }
+
+       /**
+        * Puts a WorkflowException into the execution and throws an MSOWorkflowException event.
+        * @param execution the execution
+        * @param errorCode the error code (normally a 4-digit number)
+        * @param errorMessage the error message
+        */
+       // TODO: rename this method to be throwWorkflowException
+       @Deprecated
+       public void createWorkflowException(Execution execution, int errorCode, String errorMessage) {
+               newWorkflowException(execution, errorCode, errorMessage)
+               throw new BpmnError("MSOWorkflowException", "errorCode:" + errorCode + ", errorMessage:" + errorMessage)
+       }
+
+       /**
+        * Puts a WorkflowException into the execution and throws an MSOWorkflowException event.
+        * @param execution the execution
+        * @param errorCode the error code (normally a 4-digit number)
+        * @param errorMessage the error message
+        */
+       @Deprecated
+       public void commonWorkflowException(Execution execution, int errorCode, String errorMessage) {
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               String processKey = getProcessKey(execution);
+               logDebug("Building a " + processKey + " WorkflowException", isDebugLogEnabled)
+               logError(errorMessage)
+               WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+               execution.setVariable("WorkflowException", exception);
+               throw new BpmnError("MSOWorkflowException","errorCode:" + errorCode + ",errorMessage:" + errorMessage)
+       }
+
+       /**
+        * Puts a WorkflowException into the execution and throws an MSOWorkflowException event.
+        * @param execution the execution
+        * @param errorCode the error code (normally a 4-digit number)
+        * @param errorMessage the error message
+        */
+       @Deprecated
+       public void commonWorkflowException(Execution execution, String errorCode, String errorMessage) {
+               int intRespCode
+               try{
+                       intRespCode = Integer.parseInt(errorCode)
+               }catch (Exception e){
+                       intRespCode = 400
+               }
+               commonWorkflowException(execution, intRespCode, errorMessage)
+       }
+
+
+
+       /**
+        * Validates that the request exists and that the att-mso-request-id variable is set.
+        * Additional required variables may be checked by specifying their names.
+        * NOTE: services requiring att-mso-service-instance-id must specify it explicitly!
+        * If a problem is found, buildAndThrowWorkflowException builds a WorkflowException
+        * and throws an MSOWorkflowException.  This method also sets up the log context for
+        * the workflow.
+        *
+        * @param execution the execution
+        * @return the validated request
+        */
+       public String validateRequest(Execution execution, String... requiredVariables) {
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               def method = getClass().getSimpleName() + '.validateRequest(' +
+                       'execution=' + execution.getId() +
+                       ', requredVariables=' + requiredVariables +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String processKey = getProcessKey(execution)
+               def prefix = execution.getVariable("prefix")
+
+               if (prefix == null) {
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")
+               }
+
+               try {
+                       def request = execution.getVariable(prefix + 'Request')
+
+                       if (request == null) {
+                               request = execution.getVariable(processKey + 'Request')
+
+                               if (request == null) {
+                                       request = execution.getVariable('bpmnRequest')
+                               }
+
+                               setVariable(execution, processKey + 'Request', null)
+                               setVariable(execution, 'bpmnRequest', null)
+                               setVariable(execution, prefix + 'Request', request)
+                       }
+
+                       if (request == null) {
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
+                       }
+
+                       // All requests must have a request ID.
+                       // Some requests (e.g. SDN-MOBILITY) do not have a service instance ID.
+
+                       String requestId = null
+                       String serviceInstanceId = null
+
+                       List<String> allRequiredVariables = new ArrayList<String>()
+                       allRequiredVariables.add("att-mso-request-id")
+
+                       if (requiredVariables != null) {
+                               for (String variable : requiredVariables) {
+                                       if (!allRequiredVariables.contains(variable)) {
+                                               allRequiredVariables.add(variable)
+                                       }
+                               }
+                       }
+
+                       for (String variable : allRequiredVariables) {
+                               def value = execution.getVariable(variable)
+                               if (value == null || ((value instanceof CharSequence) && value.length() == 0)) {
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey +
+                                               " request was received with no '" + variable + "' variable")
+                               }
+
+                               if ("att-mso-request-id".equals(variable)) {
+                                       requestId = (String) value
+                               } else if ("att-mso-service-instance-id".equals(variable)) {
+                                       serviceInstanceId = (String) value
+                               }
+                       }
+
+                       if (serviceInstanceId == null) {
+                               serviceInstanceId = (String) execution.getVariable("att-mso-service-instance-id")
+                       }
+
+                       utils.logContext(requestId, serviceInstanceId)
+                       logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+                       return request
+               } catch (BpmnError e) {
+                       throw e
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
+               }
+       }
+
+       /**
+        * gets vars stored in a JSON object in prefix+Request and returns as a LazyMap
+        * setting log context here too
+        * @param execution the execution
+        * @return the inputVars
+        */
+       public Map validateJSONReq(Execution execution) {
+               def method = getClass().getSimpleName() + '.validateJSONReq(' +
+                               'execution=' + execution.getId() +
+                               ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String processKey = getProcessKey(execution);
+               def prefix = execution.getVariable("prefix")
+
+               def requestId =getVariable(execution, "att-mso-request-id")
+               def serviceInstanceId = getVariable(execution, "att-mso-service-instance-id")
+               if(requestId!=null && serviceInstanceId!=null){
+                       utils.logContext(requestId, serviceInstanceId)
+               }
+
+
+               def request = getVariable(execution, prefix + 'Request')
+
+               if (request == null) {
+                       request = getVariable(execution, processKey + 'Request')
+
+                       if (request == null) {
+                               request = getVariable(execution, 'bpmnRequest')
+                       }
+                       execution.setVariable(prefix + 'Request', request)
+               }
+
+               def jsonSlurper = new JsonSlurper()
+               def parsed = jsonSlurper.parseText(request)
+
+
+               logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
+               logDebug('Exited ' + method, isDebugLogEnabled)
+               return parsed
+
+       }
+
+
+
+
+       /**
+        * Sends a response to the workflow service that invoked the process.  This method
+        * may only be used by top-level processes that were directly invoked by the
+        * asynchronous workflow service.
+        * @param execution the execution
+        * @param responseCode the response code
+        * @param content the message content
+        * @throws IllegalArgumentException if the response code is invalid
+        *         by HTTP standards
+        * @throws UnsupportedOperationException if not invoked by an asynchronous,
+        *         top-level process
+        * @throws IllegalStateException if a response has already been sent
+        */
+       protected void sendWorkflowResponse(Execution execution, Object responseCode, String response) {
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               try {
+                       String processKey = getProcessKey(execution);
+
+                       // isAsyncProcess is injected by the workflow service that started the flow
+                       if (!String.valueOf(execution.getVariable("isAsyncProcess")).equals("true")) {
+                               throw new UnsupportedOperationException(processKey + ": " +
+                                       "sendWorkflowResponse is valid only in asynchronous workflows");
+                       }
+
+                       if (String.valueOf(execution.getVariable(processKey + "WorkflowResponseSent")).equals("true")) {
+                                       logDebug("Sync response has already been sent for " + processKey, isDebugLogEnabled)
+                       }else{
+
+                               logDebug("Building " + processKey + " response ", isDebugLogEnabled)
+
+                               int intResponseCode;
+
+                               try {
+                                       intResponseCode = Integer.parseInt(String.valueOf(responseCode));
+
+                                       if (intResponseCode < 100 || intResponseCode > 599) {
+                                               throw new NumberFormatException(String.valueOf(responseCode));
+                                       }
+                               } catch (NumberFormatException e) {
+                                       throw new IllegalArgumentException("Process " + processKey
+                                               + " provided an invalid HTTP response code: " + responseCode);
+                               }
+
+                               // Only 2XX responses are considered "Success"
+                               String status = (intResponseCode >= 200 && intResponseCode <= 299) ?
+                                       "Success" : "Fail";
+
+                               // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+                               execution.setVariable(processKey + "ResponseCode", String.valueOf(intResponseCode))
+                               execution.setVariable(processKey + "Response", response);
+                               execution.setVariable(processKey + "Status", status);
+                               execution.setVariable("WorkflowResponse", response)
+
+                               logDebug("Sending response for " + processKey
+                                       + " ResponseCode=" + intResponseCode
+                                       + " Status=" + status
+                                       + " Response=\n" + response,
+                                       isDebugLogEnabled)
+
+                               // TODO: ensure that this flow was invoked asynchronously?
+
+                               WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse()
+                               callbackResponse.setStatusCode(intResponseCode)
+                               callbackResponse.setMessage(status)
+                               callbackResponse.setResponse(response)
+
+                               // TODO: send this data with HTTP POST
+
+                               WorkflowContextHolder.getInstance().processCallback(
+                                       processKey,
+                                       execution.getProcessInstanceId(),
+                                       execution.getVariable("att-mso-request-id"),
+                                       callbackResponse)
+
+                               execution.setVariable(processKey + "WorkflowResponseSent", "true");
+                       }
+
+               } catch (Exception ex) {
+                       logError("Unable to send workflow response to client ....", ex)
+               }
+       }
+
+       /**
+        * Returns true if a workflow response has already been sent.
+        * @param execution the execution
+        */
+       protected boolean isWorkflowResponseSent(Execution execution) {
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               String processKey = getProcessKey(execution);
+               return String.valueOf(execution.getVariable(processKey + "WorkflowResponseSent")).equals("true");
+       }
+
+       /**
+        * Returns the process definition key (i.e. the process name) from the
+        * execution.
+        * @param execution the execution
+        */
+       public String getProcessKey(Execution execution) {
+               def testKey = execution.getVariable("testProcessKey")
+               if(testKey!=null){
+                       return testKey
+               }
+               return execution.getProcessEngineServices().getRepositoryService()
+                       .getProcessDefinition(execution.getProcessDefinitionId()).getKey()
+       }
+
+       /**
+        * Gets the node for the named element from the given xml. If the element
+        * does not exist in the xml or is empty, a WorkflowException is created
+        * (and as a result, a MSOWorkflowException event is thrown).
+        *
+        * @param execution The flow's execution.
+        * @param xml Xml to search.
+        * @param elementName Name of element to search for.
+        * @return The element node, if found in the xml.
+        */
+       protected String getRequiredNodeXml(Execution execution, String xml, String elementName) {
+               def element = utils.getNodeXml(xml, elementName, false)
+               if (element.trim().isEmpty()) {
+                       def msg = 'Required element \'' + elementName + '\' is missing or empty'
+                       logError(msg)
+                       createWorkflowException(execution, 2000, msg)
+               } else {
+                       return element
+               }
+       }
+
+       /**
+        * Gets the value of the named element from the given xml. If the element
+        * does not exist in the xml or is empty, a WorkflowException is created
+        * (and as a result, a MSOWorkflowException event is thrown).
+        *
+        * @param execution The flow's execution.
+        * @param xml Xml to search.
+        * @param elementName Name of element to whose value to get.
+        * @return The value of the element, if found in the xml.
+        */
+       protected String getRequiredNodeText(Execution execution, String xml, String elementName) {
+               def elementText = utils.getNodeText1(xml, elementName)
+               if (elementText == null) {
+                       def msg = 'Required element \'' + elementName + '\' is missing or empty'
+                       logError(msg)
+                       createWorkflowException(execution, 2000, msg)
+               } else {
+                       return elementText
+               }
+       }
+
+       /**
+        * Get the text for the specified element from the specified xml.  If
+        * the element does not exist, return an empty string.
+        *
+        * @param xml Xml from which to get the element's text.
+        * @param elementName Name of element whose text to get.
+        * @return the element's text or an empty string if the element does not
+        * exist in the given xml.
+        */
+       protected String getNodeTextForce(String xml, String elementName) {
+               def nodeText = utils.getNodeText1(xml, elementName)
+               return (nodeText == null) ? '' : nodeText
+       }
+
+       /**
+        * Sends the empty, synchronous response back to the API Handler.
+        * @param execution the execution
+        */
+       @Deprecated
+       public void sendResponse(Execution execution) {
+               def method = getClass().getSimpleName() + '.sendResponse(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       buildResponse(execution, "", 200)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
+               }
+       }
+
+       /**
+       *Store the variable as typed with java serialization type
+       *@param execution
+       *@param name
+       *@param value
+       */
+       public void setVariable(Execution execution, String name, Object value) {
+               VariableMap variables = Variables.createVariables()
+               variables.putValueTyped('payload', Variables.objectValue(value)
+               .serializationDataFormat(SerializationDataFormats.JAVA) // tells the engine to use java serialization for persisting the value
+               .create())
+               execution.setVariable(name,variables)
+       }
+
+       //TODO not sure how this will look in Cockpit
+
+       /**
+        * Returns the variable map
+       *@param execution
+       *@param name
+       *@return
+       **/
+       public String getVariable(Execution execution, String name) {
+               def myObj = execution.getVariable(name)
+               if(myObj instanceof VariableMap){
+                       VariableMap serializedObjectMap = (VariableMap) myObj
+                       ObjectValueImpl payloadObj = serializedObjectMap.getValueTyped('payload')
+                       return payloadObj.getValue()
+               }else{
+                       return myObj
+               }
+       }
+
+
+       /**
+        * Returns true if a value equals one of the provided set. Equality is
+        * determined by using the equals method if the value object and the
+        * object in the provided set have the same class. Otherwise, the objects
+        * are converted to strings and then compared.  Nulls are permitted for
+        * the value as well as in the provided set
+        * Example:
+        * <pre>
+        *     def statusCode = getStatusCode()
+        *     isOneOf(statusCode, 200, 201, 204)
+        * </pre>
+        * @param value the value to test
+        * @param these a set of permissable values
+        * @return true if the value is in the provided set
+        */
+       public boolean isOneOf(Object value, Object... these) {
+               for (Object thisOne : these) {
+                       if (thisOne == null) {
+                               if (value == null) {
+                                       return true
+                               }
+                       } else {
+                               if (value != null) {
+                                       if (value.getClass() == thisOne.getClass()) {
+                                               if (value.equals(thisOne)) {
+                                                       return true
+                                               }
+                                       } else {
+                                               if (String.valueOf(value).equals(String.valueOf(thisOne))) {
+                                                       return true
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return false
+       }
+
+       public void setSuccessIndicator(Execution execution, boolean isSuccess) {
+               String prefix = execution.getVariable('prefix')
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+
+               logDebug('Entered SetSuccessIndicator Method', isDebugLogEnabled)
+               execution.setVariable(prefix+'SuccessIndicator', isSuccess)
+               logDebug('Outgoing SuccessIndicator is: ' + execution.getVariable(prefix+'SuccessIndicator') + '', isDebugLogEnabled)
+       }
+
+
+       public void sendSyncError(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               String requestId = execution.getVariable("att-mso-request-id")
+               logDebug('sendSyncError, requestId: ' + requestId, isDebugEnabled)
+               WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+               if (workflowExceptionObj != null) {
+                       String errorMessage = workflowExceptionObj.getErrorMessage()
+                       def errorCode = workflowExceptionObj.getErrorCode()
+                       logDebug('sendSyncError, requestId: '  + requestId + ' | errorMessage: ' + errorMessage + ' | errorCode: ' + errorCode, isDebugEnabled)
+                       sendWorkflowResponse(execution, errorCode, errorMessage)
+               }
+       }
+       
+       /**
+        * Create a WorkflowException - uses ExceptionUtil to build a WorkflowException
+        * @param execution
+        * @param errorCode
+        * @param errorMessage
+        * @param isDebugEnabled
+        */
+       public void buildWorkflowException(Execution execution, int errorCode, String errorMessage, boolean isDebugEnabled) {
+               (new ExceptionUtil()).buildWorkflowException(execution, errorCode, errorMessage)
+       }
+       
+       /**
+        * Executes a named groovy script method in the current object
+        */
+       public void executeMethod(String methodName, Object... args) {
+               
+               if (args != null && args.size() > 0) {
+                       
+                       // First argument of method to call is always the execution object
+                       Execution execution = (Execution) args[0]
+
+                       def classAndMethod = getClass().getSimpleName() + '.' + methodName + '(execution=' + execution.getId() + ')'
+                       def isDebugEnabled =  execution.getVariable('isDebugLogEnabled')
+
+                       logDebug('Entered ' + classAndMethod, isDebugEnabled)
+                       logDebug('Received parameters: ' + args, isDebugEnabled)
+
+                       try{
+                               def methodToCall = this.metaClass.getMetaMethod(methodName, args)
+                               logDebug('Method to call: ' + methodToCall, isDebugEnabled)
+                               methodToCall?.invoke(this, args)
+                       }
+                       catch(BpmnError bpmnError) {
+                               logDebug('Rethrowing BpmnError ' + bpmnError.getMessage(), isDebugEnabled)
+                               throw bpmnError
+                       }
+                       catch(Exception e) {
+                               e.printStackTrace()
+                               logDebug('Unexpected error encountered - ' + e.getMessage(), isDebugEnabled)
+                               (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 9999, e.getMessage())
+                       }
+                       finally {
+                               logDebug('Exited ' + classAndMethod, isDebugEnabled)
+                       }
+               }
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CommonExceptionUtil.groovy
new file mode 100644 (file)
index 0000000..fae12c3
--- /dev/null
@@ -0,0 +1,382 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+class CommonExceptionUtil {
+       
+       
+       
+       public static enum Error {
+               SVC_GENERAL_SERVICE_ERROR("SVC0001","Internal Error"),
+               SVC_BAD_PARAMETER("SVC0002", "Invalid input value for message part %1"),
+               SVC_NO_SERVER_RESOURCES("SVC1000", "No server resources available to process the request"),
+               SVC_DETAILED_SERVICE_ERROR("SVC2000", "The following service error occurred: %1. Error code is %2."),
+               POL_GENERAL_POLICY_ERROR("POL0001", "A policy error occurred."),
+               POL_USER_NOT_PROVISIONED("POL1009", "User has not been provisioned for service"),
+               POL_USER_SUSPENDED("POL1010", "User has been suspended from service"),
+               POL_DETAILED_POLICY_ERROR("POL2000", "The following policy error occurred: %1. Error code is %2."),
+               POL_MSG_SIZE_EXCEEDS_LIMIT("POL9003", "Message content size exceeds the allowable limit")
+       
+
+               private final String msgId
+               private final String msgTxt
+
+               private Error(String msgId, String msgTxt) {
+                       this.msgId = msgId
+                       this.msgTxt = msgTxt
+               }
+
+               public String getMsgId() {
+                    return msgId
+                 }
+
+               public String getMsgTxt() {
+                       return msgTxt
+               }
+
+       }
+
+
+       
+       
+       String mapAdapterExecptionToCommonException(String response, Execution execution)
+       {
+               def utils=new MsoUtils()
+               def method = getClass().getSimpleName() + '.mapAdapterExecptionToCommonException(' +
+                       'execution=' + execution.getId() +
+                       ')'
+
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+
+               
+               def errorCode
+
+               
+               try {
+                         errorCode = MapCategoryToErrorCode(utils.getNodeText(response, "category")) 
+                         execution.setVariable(prefix+"err",errorCode)
+                         String message = buildException(response, execution)
+                         utils.log("DEBUG","=========== End MapAdapterExecptionToWorkflowException ===========",isDebugLogEnabled)
+                         return message
+               }catch (Exception ex) {
+                       //Ignore the exception - cases include non xml payload
+                       utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
+                       utils.log("DEBUG","=========== End MapAdapterExecptionToWorkflowException ===========",isDebugLogEnabled)
+                       return buildException(response, execution)
+               } 
+       }
+       
+       /**
+        * @param response
+        * @param execution
+        * @return mapped exception
+        */
+       String mapAOTSExecptionToCommonException(String response, Execution execution)
+       {
+               def utils=new MsoUtils()
+
+               def prefix=execution.getVariable("prefix")
+               def method = getClass().getSimpleName() + '.mapAOTSExecptionToCommonException(' +
+                       'execution=' + execution.getId() +
+                       ')'
+
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+               
+               
+               try {
+                         def errorCode = utils.getNodeText(response,"code")
+                         def descr = utils.getNodeText(response, "description")
+                         def mappedErr = mapErrorCodetoError(errorCode, descr)
+                         if(mappedErr == Error.SVC_DETAILED_SERVICE_ERROR || mappedError == Error.POL_DETAILED_POLICY_ERROR){
+                                 ArrayList myVars = new ArrayList()
+                                 myVars.add(descr)
+                                 myVars.add(errorCode)
+                                 execution.setVariable(prefix+"errVariables", myVars)
+                         }
+                         execution.setVariable(prefix+"err",mappedErr)
+                         def message = buildException("Received error from AOTS: " + descr, execution)
+                         utils.log("DEBUG","=========== End MapAOTSExecptionToCommonException ===========",isDebugLogEnabled)
+                         return message
+               }catch (Exception ex) {
+                       //Ignore the exception - cases include non xml payload
+                       utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
+                       utils.log("DEBUG","=========== End MapAOTSExecptionToCommonException ===========",isDebugLogEnabled)
+                       return buildException(response, execution)
+               }
+       }
+       
+       String mapSDNCAdapterExceptionToErrorResponse(String sdncAdapterCallbackRequest, Execution execution) {
+               def utils=new MsoUtils()
+               def prefix=execution.getVariable("prefix")
+               def method = getClass().getSimpleName() + '.mapSDNCAdapterExceptionToErrorResponse(' +
+                       'execution=' + execution.getId() +
+                       ')'
+
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+               
+               def sdncResponseCode
+               String responseCode = execution.getVariable(prefix+"ResponseCode")
+               utils.log("DEBUG",'responseCode to map: ' + responseCode, isDebugLogEnabled)
+               def errorMessage
+               
+               try {
+                       
+                       if(utils.nodeExists(sdncAdapterCallbackRequest, "RequestData")) {
+                               def reqDataXml = StringEscapeUtils.unescapeXml(utils.getNodeXml(sdncAdapterCallbackRequest, "RequestData"))
+                               errorMessage = utils.getNodeText(reqDataXml, "response-message")
+                               sdncResponseCode = utils.getNodeText(reqDataXml, "response-code")
+                       }else{
+                               errorMessage = utils.getNodeText(sdncAdapterCallbackRequest, "ResponseMessage")
+                               sdncResponseCode = responseCode
+                   }
+                       def mappedErr = mapErrorCodetoError(responseCode, errorMessage)
+                       errorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+                       def modifiedErrorMessage = "Received error from SDN-C: " + errorMessage
+                       if(mappedErr == Error.SVC_DETAILED_SERVICE_ERROR || mappedErr == Error.POL_DETAILED_POLICY_ERROR){
+                               ArrayList myVars = new ArrayList()
+                               myVars.add(errorMessage)
+                               myVars.add(sdncResponseCode)
+                               execution.setVariable(prefix+"errVariables", myVars)
+                       }
+                       execution.setVariable(prefix+"err",mappedErr)
+                       def message = buildException(modifiedErrorMessage, execution)
+
+                       
+                       utils.log("DEBUG","=========== End MapSDNCAdapterException ===========",isDebugLogEnabled)
+                   return message
+               }catch (Exception ex) {
+                       //Ignore the exception - cases include non xml payload
+                       utils.log("DEBUG","error mapping sdnc error, ignoring: " + ex,isDebugLogEnabled)
+                       utils.log("DEBUG","=========== End MapSDNCAdapterException ===========",isDebugLogEnabled)
+                       return null
+               } 
+               
+       }
+       
+       /**
+        * @param response message from called component (ex: AAI)
+        * @param execution
+        * @return an error response conforming to the common 
+        */
+       String mapAAIExceptionTCommonException(String response, Execution execution)
+       {
+               def utils=new MsoUtils()
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               def prefix=execution.getVariable("prefix")
+               def method = getClass().getSimpleName() + '.mapAAIExceptionTCommonException(' +
+                       'execution=' + execution.getId() +
+                       ')'
+
+               utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+               def variables
+               def message
+               String errorCode = 'SVC0001'
+               utils.log("DEBUG","response: " + response, isDebugLogEnabled)
+               //they use the same format we do, pass their error along
+               //TODO add Received error from A&AI at beg of text
+               try {
+                        message = utils.getNodeXml(response, "requestError")
+                        message = utils.removeXmlNamespaces(message)
+               } catch (Exception ex) {
+                       //Ignore the exception - cases include non xml payload
+                               message = buildException("Received error from A&AI, unable to parse",execution)
+                       utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugLogEnabled)
+               }
+               
+               if(message != null) { 
+                        execution.setVariable(prefix+"ErrorResponse",message)
+                        utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
+                        return message
+               } else {
+                       
+                               return null
+                       
+               }
+       }
+       
+       /**
+        * @param execution
+        * @return an error response conforming to the common API with default text msg
+        */
+       String buildException(execution){
+               return buildException(null, execution)
+       }
+       
+       /**
+        * @param response message from called component (ex: AAI)
+        * @param execution
+        * @return an error response conforming to the common
+        */
+       String buildException(response, execution){
+               def utils=new MsoUtils()
+               def method = getClass().getSimpleName() + '.buildException(' +
+                       'execution=' + execution.getId() +
+                       ')'
+
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               utils.log("DEBUG",'Entered ' + method, isDebugLogEnabled)
+               def prefix=execution.getVariable("prefix")
+               def responseCode = String.valueOf(execution.getVariable(prefix+"ResponseCode"))
+               def variables
+               utils.log("DEBUG","response: " + response, isDebugLogEnabled)
+               
+                       try {
+                               utils.log("DEBUG","formatting error message" ,isDebugLogEnabled)
+                               def msgVars = execution.getVariable(prefix+"errVariables")
+                               def myErr = execution.getVariable(prefix+"err")
+                               def messageTxt = execution.getVariable(prefix+"errTxt")
+                               def messageId = null
+                               
+                               if(myErr == null){
+                                       utils.log("DEBUG","mapping response code: " + responseCode, isDebugLogEnabled)
+                                       myErr = mapErrorCodetoError(responseCode, response)
+                                       if(myErr == null){
+                                               //not a service or policy error, just return error code
+                                               return ""
+                                       }
+                               }
+                               messageId = myErr.getMsgId()
+                               
+                               if(messageTxt == null){
+                                       if(myErr!=null){
+                                               messageTxt = myErr.getMsgTxt()
+                                       }else{
+                                               messageTxt = response
+                                       }
+                               }
+                               
+                               if(msgVars==null && (myErr == Error.SVC_DETAILED_SERVICE_ERROR || myErr == Error.POL_DETAILED_POLICY_ERROR)){
+                                       msgVars = new ArrayList()
+                                       msgVars.add(response)
+                                       msgVars.add(responseCode)
+                               }
+                               
+                               def msgVarsXML=""
+                               StringBuffer msgVarsBuff = new StringBuffer()
+                               if(msgVars!=null){
+                                       for(String msgVar : msgVars){
+                                               msgVarsBuff.append(
+                                                       """
+                       <tns:variables>${msgVar}</tns:variables>""")
+                                       }
+                                       
+                               }
+                               def message = ""
+                               if(messageId.startsWith("SVC")){
+                                       message = """<tns:requestError xmlns:tns="http://ecomp.att.com/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ecomp.att.com/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+       <tns:serviceException>
+               <tns:messageId>${messageId}</tns:messageId>
+               <tns:text>${messageTxt}</tns:text>${msgVarsBuff}
+       </tns:serviceException>
+</tns:requestError>""" 
+                               }else{
+                                       message ="""<tns:requestError xmlns:tns="http://ecomp.att.com/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ecomp.att.com/mso/request/types/v1 MsoServiceInstanceTypesV1.xsd">
+       <tns:policyException>
+               <tns:messageId>${messageId}</tns:messageId>
+               <tns:text>${messageTxt}</tns:text>${msgVarsBuff}
+       </tns:policyException>
+</tns:requestError>""" 
+                               }
+                                utils.log("DEBUG", "message " + message, isDebugLogEnabled)
+                                execution.setVariable(prefix+"ErrorResponse",message)
+                                execution.setVariable(prefix+"err", myErr)
+                                execution.setVariable(prefix+"errTxt", messageTxt)
+                                execution.setVariable(prefix+"errVariables", msgVars)
+                                utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
+                                return message
+                       }catch(Exception ex) {
+                               utils.log("DEBUG","error mapping error, return null: " + ex,isDebugLogEnabled)
+                               return null
+                       }
+
+       }
+       
+       String parseError(Execution execution){
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               def utils=new MsoUtils()
+               def prefix=execution.getVariable("prefix")
+               def text = execution.getVariable(prefix+"errTxt")
+               def msgVars = execution.getVariable(prefix+"errVariables")
+               utils.log("DEBUG",'parsing message: ' + text, isDebugLogEnabled)
+               if(text == null){
+                       return 'failed'
+               }
+               if(msgVars!=null && !msgVars.isEmpty()){
+                       for(int i=0; i<msgVars.size(); i++){
+                               text = text.replaceFirst("%"+(i+1), msgVars[i])
+                       }
+               }
+               utils.log("DEBUG",'parsed message is: ' + text, isDebugLogEnabled)
+               return text
+       }
+       
+       
+
+       Error mapErrorCodetoError(responseCode, descr)
+       {
+               
+               if(responseCode==null || responseCode=='0' || responseCode=='500' || responseCode =='408'){
+                       return Error.SVC_NO_SERVER_RESOURCES
+               }else if(responseCode == '401' || responseCode == '405' || responseCode == '409' || responseCode == '503'){
+                       return null
+               }else if(responseCode == '400'){
+                       if(descr==null){
+                               return Error.SVC_GENERAL_SERVICE_ERROR
+                       }else{
+                               return Error.SVC_DETAILED_SERVICE_ERROR
+                       }
+               }else if(responseCode == '401'){
+                       if(descr==null){
+                               return Error.POL_GENERAL_POLICY_ERROR
+                       }else{
+                               return Error.POL_DETAILED_POLICY_ERROR
+                       }
+               }else{
+                       return Error.SVC_NO_SERVER_RESOURCES
+               }
+       }
+       
+       String mapCategoryToErrorCode(String errorCategory)
+       {
+               if(errorCategory.equals('OPENSTACK'))
+                       return Error.SVC_NO_SERVER_RESOURCES
+               else if (errorCategory.equals('IO'))
+                       return Error.SVC_NO_SERVER_RESOURCES
+               else if (errorCategory.equals('INTERNAL'))
+                       return Error.SVC_NO_SERVER_RESOURCES
+               else if (errorCategory.equals('USERDATA'))
+                       return Error.SVC_GENERAL_SERVICE_ERROR
+               else
+                       return Error.SVC_GENERAL_SERVICE_ERROR
+       }
+       
+       
+       
+
+       
+       
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CompleteMsoProcess.groovy
new file mode 100644 (file)
index 0000000..8ec267d
--- /dev/null
@@ -0,0 +1,502 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import java.text.SimpleDateFormat
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+
+public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
+
+       String Prefix="CMSO_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       // Complete MSO Request processing
+       public initializeProcessVariables(Execution execution){
+
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+
+                       /* Initialize all the process request variables in this block */
+                       execution.setVariable("prefix",Prefix)
+                       //execution.setVariable("getLayer3ServiceDetailsV1Response","")
+                       execution.setVariable("CMSO_request_id","")
+                       execution.setVariable("CMSO_notification-url","")
+                       execution.setVariable("CMSO_mso-bpel-name","")
+                       execution.setVariable("CMSO_request_action","")
+
+                       execution.setVariable("CMSO_notification-url-Ok", false)
+                       execution.setVariable("CMSO_request_id-Ok", false)
+
+                       //These variabels are for Get Mso Aai Password Adapter
+                       execution.setVariable("CMSO_deliveryStatus", false)
+
+                       //updateRequest Adapter process variables
+                       execution.setVariable("CMSO_updateRequestResponse", "")
+                       execution.setVariable("CMSO_updateRequestResponseCode", "")
+                       execution.setVariable("CMSO_updateFinalNotifyAckStatusSuccessPayload", "")
+                       execution.setVariable("CMSO_updateFinalNotifyAckStatusFailedPayload", "")
+                       execution.setVariable("CMSO_gSendManagedNetworkStatusNotificationResponse", "")
+
+                       //Set DB adapter variables here
+                       execution.setVariable("CMSO_updateFinalStatusSuccessPayload", "")
+                       execution.setVariable("CMSO_updateDBStatusToSuccessPayload", "")
+                       execution.setVariable("CMSO_updateInfraRequestDBPayload", "")
+                       execution.setVariable("CMSO_setUpdateDBstatustoSuccessPayload", "")
+                       execution.setVariable("CMSO_setUpdateFinalNotifyAckStatusPayload", "")
+
+                       //NotifyOMXSuccessFailureViaCSI Adapter variables
+                       execution.setVariable("CMSO_notifyOMXSuccessFailureViaCSIPayload", "")
+                       execution.setVariable("CMSO_notifyOMXSuccessFailureViaCSIResponseCode", null)
+                       execution.setVariable("CMSO_notifyOMXSuccessFailureViaCSIResponse", "")
+
+                       //Auth variables
+                       execution.setVariable("BasicAuthHeaderValue","")
+
+                       //Response variables
+                       execution.setVariable("CompletionHandlerResponse","")
+                       execution.setVariable("CMSO_ErrorResponse", null)
+                       execution.setVariable("CMSO_ResponseCode", "")
+
+                       setSuccessIndicator(execution, false)
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+
+       }
+
+       public void preProcessRequest (Execution execution) {
+
+               initializeProcessVariables(execution)
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               utils.log("DEBUG", "*** Started CompleteMsoProcess preProcessRequest Method ***", isDebugLogEnabled);
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+                       def xml = execution.getVariable("CompleteMsoProcessRequest")
+
+                       utils.logAudit("CompleteMsoProcess Request: " + xml)
+                       utils.log("DEBUG", "Incoming Request is: "+ xml, isDebugLogEnabled)
+
+                       //mso-bpel-name from the incoming request
+                       def msoBpelName = utils.getNodeText1(xml,"mso-bpel-name")
+                       execution.setVariable("CMSO_mso-bpel-name",msoBpelName)
+
+                       //Check the incoming request type
+                       //Incoming request can be ACTIVE_REQUESTS (request-information node) or  INFRA_ACTIVE_REQUESTS (request-info node)
+                       if (utils.nodeExists(xml, "request-information")) {
+                               execution.setVariable("CMSO_request_id-Ok", true) // Incoming request is for ACTIVE_REQUESTS
+                       }
+
+                       //Check notification-url for the incoming request type
+                       //ACTIVE_REQUESTS may have notificationurl node
+                       //INFRA_ACTIVE_REQUESTS notificationurl node does not exist
+                       def notificationurl = ""
+                       if (utils.nodeExists(xml, "notification-url")) {
+                               notificationurl = utils.getNodeText(xml,"notification-url")
+                               if(notificationurl != null && !notificationurl.isEmpty()) {
+                                       execution.setVariable("CMSO_notification-url-Ok", true)
+                                       execution.setVariable("CMSO_notification-url",notificationurl)
+                               }
+                       }
+
+                       //Check request_id for the incoming request type
+                       //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
+                       //For ACTIVE_REQUESTS payload request-id is NOT optional
+                       def request_id = ""
+                       if (utils.nodeExists(xml, "request-id")) {
+                               execution.setVariable("CMSO_request_id",utils.getNodeText(xml,"request-id"))
+                       }
+
+
+                       // INFRA_ACTIVE_REQUESTS         have "action" element ... mandatory
+                       // ACTIVE_REQUEST have "request-action" ... mandatory
+                       if (utils.nodeExists(xml, "request-action")) {
+                               execution.setVariable("CMSO_request_action",utils.getNodeText(xml,"request-action"))
+                       } else if (utils.nodeExists(xml, "action")) {
+                               execution.setVariable("CMSO_request_action",utils.getNodeText(xml,"action"))
+                       }
+
+                       //Check source for the incoming request type
+                       //For INFRA_ACTIVE_REQUESTS payload source IS optional
+                       //For ACTIVE_REQUESTS payload source is NOT optional
+                       def source = ""
+                       if (utils.nodeExists(xml, "source")) {
+                               execution.setVariable("CMSO_source",utils.getNodeText(xml,"source"))
+                       }
+
+                       utils.log("DEBUG", "CMSO_notification-url-Ok --> " + execution.getVariable("CMSO_notification-url-Ok"), isDebugLogEnabled)
+                       utils.log("DEBUG", "CMSO_request_id-Ok --> " + execution.getVariable("CMSO_request_id-Ok"), isDebugLogEnabled)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       utils.log("DEBUG", "Exception Occured During PreProcessRequest: " + e, isDebugLogEnabled);
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+               }
+
+               utils.log("DEBUG", "*** Completed CompleteMsoProcess preProcessRequest Method ***", isDebugLogEnabled);
+       }
+
+       public void postProcessResponse (Execution execution) {
+
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               utils.log("DEBUG", "*** Started CompleteMsoProcess PostProcessRequest Method ***", isDebugLogEnabled);
+               try {
+
+                       def msoCompletionResponse = """
+                       <sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1">
+                          <sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} completed</sdncadapterworkflow:out>
+                       </sdncadapterworkflow:MsoCompletionResponse>
+                       """.trim()
+
+                       // Format Response
+                       def xmlMsoCompletionResponse = utils.formatXML(msoCompletionResponse)
+                       String buildMsoCompletionResponseAsString = xmlMsoCompletionResponse.drop(38).trim()
+                       // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+                       execution.setVariable("WorkflowResponse", buildMsoCompletionResponseAsString)
+                       utils.logAudit("CompleteMsoProcess Response: " + buildMsoCompletionResponseAsString)
+                       execution.setVariable("CompleteMsoProcessResponse", buildMsoCompletionResponseAsString)
+                       execution.setVariable("CMSO_ResponseCode", "200")
+
+                       setSuccessIndicator(execution, true)
+
+                       utils.log("DEBUG", "@@ CompleteMsoProcess Response @@ " + "\n" + execution.getVariable("CompleteMsoProcessResponse"), isDebugLogEnabled)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+               utils.log("DEBUG", "*** Completed CompleteMsoProcess PostProcessRequest Method ***", isDebugLogEnabled);
+
+       }
+
+       public void updateFinalNotifyAckStatusSuccessPayload (Execution execution){
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+
+                       def deliveryStatus = execution.getVariable("CMSO_deliveryStatus")
+                       String responseStatus = ""
+                       String responseCode = ""
+                       String responseBodyXml = ""
+
+                       if(deliveryStatus == true){
+                               responseStatus = "SUCCESS"
+                               responseCode = "200"
+                               responseBodyXml = """<responseBody>${execution.getVariable("CMSO_gSendManagedNetworkStatusNotificationResponse")}</responseBody>"""
+                       }else{
+                               responseStatus = "FAILED"
+                               responseCode = execution.getVariable("CCDStatusCode")
+                       }
+
+                       String payload = """
+                       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                       <soapenv:Header/>
+                       <soapenv:Body>
+                          <req:updateRequest>
+                                 <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
+                                 <lastModifiedBy>BPEL</lastModifiedBy>
+                                 <responseStatus>${responseStatus}</responseStatus>
+                                 <responseCode>${responseCode}</responseCode>
+                                 ${responseBodyXml}
+                          </req:updateRequest>
+                       </soapenv:Body>
+                </soapenv:Envelope>"""
+
+                       execution.setVariable("CMSO_updateFinalNotifyAckStatusSuccessPayload", payload)
+                       utils.logAudit("updateFinalNotifyAckStatusPayload: " + payload)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+       }
+
+
+       public String updateFinalStatusSuccessPayload (Execution execution){
+
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+                       String payload = """
+                       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                       <soapenv:Header/>
+                       <soapenv:Body>
+                          <req:updateRequest>
+                                 <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
+                                 <lastModifiedBy>BPEL</lastModifiedBy>
+                                 <responseStatus>SUCCESS</responseStatus>
+                          </req:updateRequest>
+                       </soapenv:Body>
+                </soapenv:Envelope>
+               """
+                       execution.setVariable("CMSO_updateFinalStatusSuccessPayload", payload)
+                       utils.logAudit("updateFinalStatusSuccessPayload: " + payload)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+                       //println("CMSO_updateFinalStatusSuccessPayload --> " + execution.getVariable("CMSO_updateFinalStatusSuccessPayload"))
+
+                       return execution.getVariable("CMSO_updateFinalStatusSuccessPayload")
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+       }
+
+       public void updateDBStatusToSuccessPayload (Execution execution){
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+
+                       String payload = """
+                       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                       <soapenv:Header/>
+                       <soapenv:Body>
+                          <req:updateStatus>
+                                 <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
+                                 <lastModifiedBy>BPEL</lastModifiedBy>
+                                 <status>COMPLETED</status>
+                          </req:updateStatus>
+                       </soapenv:Body>
+                </soapenv:Envelope>
+               """
+                       execution.setVariable("CMSO_updateDBStatusToSuccessPayload", payload)
+                       utils.logAudit("updateDBStatusToSuccessPayload: " + payload)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+                       //println("CMSO_updateDBStatusToSuccessPayload --> " + execution.getVariable("CMSO_updateDBStatusToSuccessPayload"))
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+       }
+
+       public void setUpdateDBstatustoSuccessPayload (Execution execution){
+
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+
+                       def xml = execution.getVariable("CompleteMsoProcessRequest")
+
+                       //Get statusMessage if exists
+                       def statusMessage
+                       if(utils.nodeExists(xml, "status-message")){
+                               statusMessage = utils.getNodeText1(xml, "status-message")
+                       }else{
+                               statusMessage = "Resource Completed Successfully"
+                       }
+
+                       //Get instance Id if exist
+                       String idXml = ""
+                       if(utils.nodeExists(xml, "vnfId")){
+                               idXml = utils.getNodeXml(xml, "vnfId")
+                       }else if(utils.nodeExists(xml, "networkId")){
+                               idXml = utils.getNodeXml(xml, "networkId")
+                       }else if(utils.nodeExists(xml, "serviceInstanceId")){
+                               idXml = utils.getNodeXml(xml, "serviceInstanceId")
+                       }else if(utils.nodeExists(xml, "vfModuleId")){
+                               idXml = utils.getNodeXml(xml, "vfModuleId")
+                       }else if(utils.nodeExists(xml, "volumeGroupId")){
+                               idXml = utils.getNodeXml(xml, "volumeGroupId")
+                       }else{
+                               idXml = ""
+                       }
+                       idXml = utils.removeXmlPreamble(idXml)
+                       utils.log("DEBUG", "Incoming Instance Id Xml: " + idXml, isDebugLogEnabled)
+
+                       String payload = """
+                                               <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                                                  <soapenv:Header/>
+                                                  <soapenv:Body>
+                                                     <req:updateInfraRequest>
+                                                        <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
+                                                        <lastModifiedBy>${execution.getVariable("CMSO_mso-bpel-name")}</lastModifiedBy>
+                                                        <statusMessage>${statusMessage}</statusMessage>
+                                                        <requestStatus>COMPLETE</requestStatus>
+                                                                <progress>100</progress>
+                                                                ${idXml}
+                                                     </req:updateInfraRequest>
+                                                  </soapenv:Body>
+                                               </soapenv:Envelope>"""
+
+                       execution.setVariable("CMSO_setUpdateDBstatustoSuccessPayload", payload)
+                       utils.log("DEBUG", "Outgoing Update Mso Request Payload is: " + payload, isDebugLogEnabled)
+                       utils.logAudit("setUpdateDBstatustoSuccessPayload: " + payload)
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+
+       public String updateFinalNotifyAckStatusPayload (Execution execution){
+
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+                       String payload = """
+                                               <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                                                  <soapenv:Header/>
+                                                  <soapenv:Body>
+                                                     <req:updateResponseStatus>
+                                                        <requestId>${execution.getVariable("CMSO_request_id")}</requestId>
+                                                        <lastModifiedBy>BPEL</lastModifiedBy>
+                                                        <responseStatus>SENDING_FINAL_NOTIFY</responseStatus>
+                                                     </req:updateResponseStatus>
+                                                  </soapenv:Body>
+                                               </soapenv:Envelope>
+               """
+                       execution.setVariable("CMSO_setUpdateFinalNotifyAckStatusPayload", payload)
+                       utils.logAudit("updateFinalNotifyAckStatusPayload: " + payload)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+
+                       return execution.getVariable("CMSO_setUpdateFinalNotifyAckStatusPayload")
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+
+       }
+
+       //      public void decryptMsoPassword (Execution execution) {
+       //
+       //              def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+       //              def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+       //              logDebug('Entered ' + method, isDebugLogEnabled)
+       //              try {
+       //                      def encryptedPwd=execution.getVariable("URN_mso_csi_pwd")
+       //                      def msoKey = execution.getVariable("URN_mso_msoKey")
+       //
+       //                      String basicAuthValue = utils.getBasicAuth(encryptedPwd, msoKey)
+       //                      execution.setVariable("BasicAuthHeaderValueCSI",basicAuthValue)
+       //                      logDebug('Exited ' + method, isDebugLogEnabled)
+       //              } catch (BpmnError e) {
+       //                      throw e;
+       //              } catch (IOException e) {
+       //                      logError('Caught exception in ' + method, e)
+       //                      workflowException(execution, 'Internal Error', 2000)
+       //              }
+       //      }
+
+       public String notifyOMXSuccessFailureViaCSIPayload (Execution execution) {
+
+               return "";
+       }
+
+       public String notifyCCDSuccessPayload (Execution execution) {
+
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+
+                       String payload ="""
+               <ns:status-notification xmlns:ns="http://ecomp.att.com/mso/statusnotification/schema/v1" xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1">
+                               <msoservtypes:request-id>${execution.getVariable("CMSO_request_id")}</msoservtypes:request-id>
+                               <msoservtypes:request-action>${execution.getVariable("CMSO_request_action")}</msoservtypes:request-action>
+                               <msoservtypes:source>${execution.getVariable("CMSO_source")}</msoservtypes:source>
+                               <msoservtypes:ack-final-indicator>Y</msoservtypes:ack-final-indicator>
+               </ns:status-notification>
+               """
+                       execution.setVariable("CMSO_notifyCCDSuccessPayload", payload)
+                       utils.logAudit("notifyCCDSuccessPayload: " + payload)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+
+                       return execution.getVariable("CMSO_notifyCCDSuccessPayload")
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+
+
+       }
+
+       public void buildDataError (Execution execution, String message) {
+
+               def method = getClass().getSimpleName() + '.sendResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               try {
+
+                       def msoCompletionResponse = """
+                       <sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1">
+                          <sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} FAILED</sdncadapterworkflow:out>
+                       </sdncadapterworkflow:MsoCompletionResponse>
+                       """.trim()
+
+                       // Format Response
+                       def xmlMsoCompletionResponse = utils.formatXml(msoCompletionResponse)
+                       String buildMsoCompletionResponseAsString = xmlMsoCompletionResponse.drop(38).trim()
+                       utils.logAudit("CompleteMsoProcess Response: " + buildMsoCompletionResponseAsString)
+                       execution.setVariable("CompleteMsoProcessResponse", buildMsoCompletionResponseAsString)
+                       utils.log("DEBUG", "@@ CompleteMsoProcess Response @@ " + "\n" + execution.getVariable("CompletionHandlerResponse"), isDebugLogEnabled)
+
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, message)
+
+               } catch (BpmnError e) {
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugLogEnabled)
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupName.groovy
new file mode 100644 (file)
index 0000000..b13fff7
--- /dev/null
@@ -0,0 +1,171 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class ConfirmVolumeGroupName extends AbstractServiceTaskProcessor{
+       
+       def Prefix="CVGN_"
+       
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable("prefix",Prefix)
+               execution.setVariable("CVGN_volumeGroupId",null)
+               execution.setVariable("CVGN_volumeGroupName",null)
+               execution.setVariable("CVGN_aicCloudRegion", null)
+               execution.setVariable("CVGN_volumeGroupGetEndpoint",null)
+                                               
+               // ConfirmVolumeGroupName workflow response variable placeholders
+               execution.setVariable("CVGN_volumeGroupNameMatches", false)
+               execution.setVariable("CVGN_queryVolumeGroupResponseCode",null)
+               execution.setVariable("CVGN_queryVolumeGroupResponse","")
+               execution.setVariable("CVGN_ResponseCode",null)
+//             execution.setVariable("CVGN_ErrorResponse","")
+               execution.setVariable("RollbackData", null)
+       }       
+       
+       // store the incoming data in the flow Execution
+       public void preProcessRequest(Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               def volumeGroupId = execution.getVariable("ConfirmVolumeGroupName_volumeGroupId")
+               def volumeGroupName= execution.getVariable("ConfirmVolumeGroupName_volumeGroupName")
+               def aicCloudRegion = execution.getVariable("ConfirmVolumeGroupName_aicCloudRegion")
+               
+               initProcessVariables(execution)
+               execution.setVariable("CVGN_volumeGroupId", volumeGroupId)
+               execution.setVariable("CVGN_volumeGroupName", volumeGroupName)
+               execution.setVariable("CVGN_aicCloudRegion", aicCloudRegion)
+               
+               AaiUtil aaiUriUtil = new AaiUtil(this)
+               def aai_uri = aaiUriUtil.getCloudInfrastructureCloudRegionUri(execution)
+               logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+               
+               execution.setVariable("CVGN_volumeGroupGetEndpoint","${aai_uri}/${aicCloudRegion}/volume-groups/volume-group/" +
+                               volumeGroupId)          
+       }
+       
+       // send a GET request to AA&I to retrieve the Volume information based on volume-group-id
+       // expect a 200 response with the information in the response body or a 404 if the volume group id does not exist
+       public void queryAAIForVolumeGroupId(Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CVGN_volumeGroupGetEndpoint")
+               def aaiRequestId = UUID.randomUUID().toString()
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+               RESTConfig config = new RESTConfig(endPoint);
+               utils.log("DEBUG","queryAAIForVolumeGroupId() endpoint-" + endPoint, isDebugLogEnabled)
+               def responseData = ""
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").addHeader("Content-Type", "application/xml").
+                               addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       logDebug("invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugLogEnabled)
+                       APIResponse response = client.httpGet()
+                               
+                       responseData = response.getResponseBodyAsString()
+                       execution.setVariable("CVGN_queryVolumeGroupResponseCode", response.getStatusCode())
+                       execution.setVariable("CVGN_queryVolumeGroupResponse", responseData)
+                       logDebug("Response code:" + response.getStatusCode(), isDebugLogEnabled)
+                       logDebug("Response:" + System.lineSeparator()+responseData,isDebugLogEnabled)
+               } catch (Exception ex) {
+                       ex.printStackTrace()
+                       logDebug("Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugLogEnabled)
+                       execution.setVariable("CVGN_queryVolumeGroupResponseCode", 500)
+                       execution.setVariable("CVGN_queryVolumeGroupResponse", "AAI GET Failed:" + ex.getMessage())
+               }
+       }
+       
+       // process the result from queryAAIVolumeGroupId()
+       
+       public void checkAAIQueryResult(Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               def result = execution.getVariable("CVGN_queryVolumeGroupResponse")
+               
+               if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == 404) {
+                       logDebug('volumeGroupId does not exist in AAI', isDebugLogEnabled)
+               }
+               else if (execution.getVariable("CVGN_queryVolumeGroupResponseCode") == 200) {
+                       logDebug("volumeGroupId exists in AAI", isDebugLogEnabled)      
+               }
+               def xml = execution.getVariable("CVGN_queryVolumeGroupResponse")
+               def actualVolumeGroupName = ""
+               if (utils.nodeExists(xml, "volume-group-name")) {
+                       actualVolumeGroupName = utils.getNodeText(xml, "volume-group-name")
+               }
+               execution.setVariable("CVGN_volumeGroupNameMatches", false)
+               def volumeGroupName = execution.getVariable("CVGN_volumeGroupName")
+                               
+               if (volumeGroupName.equals(actualVolumeGroupName)) {
+                       logDebug('Volume Group Name Matches AAI records', isDebugLogEnabled)                            
+                       execution.setVariable("CVGN_volumeGroupNameMatches", true)
+               }                               
+       }
+       
+       
+       // generates a WorkflowException if the A&AI query returns a response code other than 200/404
+       public void handleAAIQueryFailure(Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               
+               logError("Error occurred attempting to query AAI, Response Code " +
+                       execution.getVariable("CVGN_queryVolumeGroupResponseCode") + ", Error Response " +
+                       execution.getVariable("CVGN_queryVolumeGroupResponse"))
+               //String processKey = getProcessKey(execution);
+               //WorkflowException exception = new WorkflowException(processKey, 5000,
+                       //execution.getVariable("CVGN_queryVolumeGroupResponse"))
+               //execution.setVariable("WorkflowException", exception)
+       }
+       
+       // generates a WorkflowException if the volume group name does not match AAI record for this volume group
+       public void handleVolumeGroupNameNoMatch(Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               
+               def errorNotAssociated = "Error occurred - volume group id " + execution.getVariable("CVGN_volumeGroupId") +
+                       " is not associated with  " + execution.getVariable("CVGN_volumeGroupName")
+               logError(errorNotAssociated)
+               createWorkflowException(execution, 1002, errorNotAssociated)
+               //String processKey = getProcessKey(execution);
+               //WorkflowException exception = new WorkflowException(processKey, 1002,
+               //      errorNotAssociated)
+               //execution.setVariable("WorkflowException", exception)
+       }
+       
+       // sends a successful WorkflowResponse
+       public void reportSuccess(Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               logDebug("Sending 200 back to the caller", isDebugLogEnabled)
+               def responseXML = ""
+               execution.setVariable("WorkflowResponse", responseXML)
+       }
+       
+       
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ConfirmVolumeGroupTenant.groovy
new file mode 100644 (file)
index 0000000..45ffd55
--- /dev/null
@@ -0,0 +1,202 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+import javax.xml.transform.Transformer
+import javax.xml.transform.TransformerFactory
+import javax.xml.transform.TransformerException
+import javax.xml.transform.dom.DOMSource
+import javax.xml.transform.stream.StreamResult
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.NamedNodeMap
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+
+
+/**
+ * Vnf Module Subflow for confirming the volume group belongs
+ * to the tenant
+ *
+ * @param tenantId
+ * @param volumeGroupId
+ *
+ */
+class ConfirmVolumeGroupTenant extends AbstractServiceTaskProcessor{
+
+       String Prefix="CVGT_"
+
+       public void preProcessRequest(Execution execution){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+               utils.log("DEBUG", " ======== STARTED Confirm Volume Group Tenant Subflow ======== ", isDebugEnabled)
+               String processKey = getProcessKey(execution);
+               try{
+                       utils.log("DEBUG", " === Started QueryAAIForVolumeGroup Process === ", isDebugEnabled)
+
+                       String volumeGroupId = execution.getVariable("volumeGroupId")
+                       String incomingGroupName = execution.getVariable("volumeGroupName")
+                       String incomingTenantId = execution.getVariable("tenantId")
+                       def aicCloudRegion = execution.getVariable("aicCloudRegion")
+                       String aai = execution.getVariable("URN_aai_endpoint")
+
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       def aai_uri = aaiUriUtil.getCloudInfrastructureCloudRegionUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+
+                       String path = aai + "${aai_uri}/${aicCloudRegion}/volume-groups/volume-group/" + volumeGroupId
+
+                       APIResponse queryAAIForVolumeGroupResponse = aaiUriUtil.executeAAIGetCall(execution, path)
+
+                       def responseCode = queryAAIForVolumeGroupResponse.getStatusCode()
+                       execution.setVariable("queryVolumeGroupResponseCode", responseCode)
+                       String response = queryAAIForVolumeGroupResponse.getResponseBodyAsString()
+                       response = StringEscapeUtils.unescapeXml(response)
+
+                       if(responseCode == 200 && response != null){
+                               execution.setVariable("queryAAIVolumeGroupResponse", response)
+                               utils.log("DEBUG", "QueryAAIForVolumeGroup Received a Good REST Response is: \n" + response, isDebugEnabled)
+
+                               String volumeGroupTenantId = ""
+                               InputSource source = new InputSource(new StringReader(response));
+                               DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                               docFactory.setNamespaceAware(true)
+                               DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+                               Document createVCERequestXml = docBuilder.parse(source)
+                               NodeList nodeList = createVCERequestXml.getElementsByTagNameNS("*", "relationship")
+                               for (int x = 0; x < nodeList.getLength(); x++) {
+                                       Node node = nodeList.item(x)
+                                       if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                               Element eElement = (Element) node
+                                               String e = eElement.getElementsByTagNameNS("*", "related-to").item(0).getTextContent()
+                                               if(e.equals("tenant")){
+                                                       NodeList relationDataList = eElement.getElementsByTagNameNS("*", "relationship-data")
+                                                       for (int d = 0; d < relationDataList.getLength(); d++) {
+                                                               Node dataNode = relationDataList.item(d)
+                                                               if (dataNode.getNodeType() == Node.ELEMENT_NODE) {
+                                                                       Element dElement = (Element) dataNode
+                                                                       String key = dElement.getElementsByTagNameNS("*", "relationship-key").item(0).getTextContent()
+                                                                       if(key.equals("tenant.tenant-id")){
+                                                                               volumeGroupTenantId = dElement.getElementsByTagNameNS("*", "relationship-value").item(0).getTextContent()
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               //Determine if Tenant Ids match
+                               if(incomingTenantId.equals(volumeGroupTenantId)){
+                                       utils.log("DEBUG", "Tenant Ids Match", isDebugEnabled)
+                                       execution.setVariable("tenantIdsMatch", true)
+                               }else{
+                                       utils.log("DEBUG", "Tenant Ids DO NOT Match", isDebugEnabled)
+                                       execution.setVariable("tenantIdsMatch", false)
+                               }
+
+                               //Determine if Volume Group Names match
+                               String volumeGroupName = utils.getNodeText1(response, "volume-group-name")
+                               if(incomingGroupName == null || incomingGroupName.length() < 1){
+                                       utils.log("DEBUG", "Incoming Volume Group Name is NOT Provided.", isDebugEnabled)
+                                       execution.setVariable("groupNamesMatch", true)
+                               }else{
+                                       utils.log("DEBUG", "Incoming Volume Group Name is: " + incomingGroupName, isDebugEnabled)
+                                       if(volumeGroupName.equals(incomingGroupName)){
+                                               utils.log("DEBUG", "Volume Group Names Match.", isDebugEnabled)
+                                               execution.setVariable("groupNamesMatch", true)
+                                       }else{
+                                               utils.log("DEBUG", "Volume Group Names DO NOT Match.", isDebugEnabled)
+                                               execution.setVariable("groupNamesMatch", false)
+                                       }
+                               }
+                       }else{
+                               utils.log("DEBUG", "QueryAAIForVolumeGroup Bad REST Response!", isDebugEnabled)
+                               WorkflowException exception = new WorkflowException(processKey, 1, "Error Searching AAI for Volume Group. Received a Bad Response.")
+                               execution.setVariable("WorkflowException", exception)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing queryAAIForVolumeGroup. Exception is:\n" + e, isDebugEnabled)
+                       throw new BpmnError("MSOWorkflowException")
+               }
+               utils.log("DEBUG", "=== COMPLETED queryAAIForVolumeGroup Process === ", isDebugEnabled)
+       }
+
+       public void assignVolumeHeatId(Execution execution){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+               try{
+                       utils.log("DEBUG", " === Started assignVolumeHeatId Process === ", isDebugEnabled)
+
+                       String response = execution.getVariable("queryAAIVolumeGroupResponse")
+                       String heatStackId = utils.getNodeText1(response, "heat-stack-id")
+                       execution.setVariable("volumeHeatStackId", heatStackId)
+                       execution.setVariable("ConfirmVolumeGroupTenantResponse", heatStackId)
+                       // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+                       execution.setVariable("WorkflowResponse", heatStackId)
+                       utils.log("DEBUG", "Volume Heat Stack Id is: " + heatStackId, isDebugEnabled)
+
+               }catch(Exception e){
+               utils.log("ERROR", "Exception Occured Processing assignVolumeHeatId. Exception is:\n" + e, isDebugEnabled)
+               throw new BpmnError("MSOWorkflowException")
+       }
+       utils.log("DEBUG", "=== COMPLETED assignVolumeHeatId Process === ", isDebugEnabled)
+       utils.log("DEBUG", "======== COMPLETED Confirm Volume Group Tenant Subflow ======== ", isDebugEnabled)
+}
+
+       public void assignWorkflowException(Execution execution, String message){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+               String processKey = getProcessKey(execution);
+               utils.log("DEBUG", " === STARTED Assign Workflow Exception === ", isDebugEnabled)
+               try{
+                       String volumeGroupId = execution.getVariable("volumeGroupId")
+                       int errorCode = 1
+                       String errorMessage = "Volume Group " + volumeGroupId + " " + message
+
+                       WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage)
+                       execution.setVariable("WorkflowException", exception)
+                       execution.setVariable("CVGT_ErrorResponse", "") // Setting for Unit Testing Purposes
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing assignWorkflowException. Exception is:\n" + e, isDebugEnabled)
+               }
+               utils.log("DEBUG", "=== COMPLETED Assign Workflow Exception ==== ", isDebugEnabled)
+       }
+
+
+
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModule.groovy
new file mode 100644 (file)
index 0000000..ea01503
--- /dev/null
@@ -0,0 +1,623 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.runtime.Execution
+import org.springframework.web.util.UriUtils
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
+       
+       def Prefix="CAAIVfMod_"
+       
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable("prefix",Prefix)
+               execution.setVariable("CAAIVfMod_vnfId",null)
+               execution.setVariable("CAAIVfMod_vnfName",null)
+               execution.setVariable("CAAIVfMod_vnfType",null)
+               execution.setVariable("CAAIVfMod_serviceId",null)
+               execution.setVariable("CAAIVfMod_personaId",null)
+               execution.setVariable("CAAIVfMod_personaVer",null)
+               execution.setVariable("CAAIVfMod_vnfPersonaId",null)
+               execution.setVariable("CAAIVfMod_vnfPersonaVer",null)
+               execution.setVariable("CAAIVfMod_isBaseVfModule", false)
+               execution.setVariable("CAAIVfMod_moduleName",null)
+               execution.setVariable("CAAIVfMod_moduleModelName",null)
+               execution.setVariable("CAAIVfMod_newGenericVnf",false)
+               execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",null)
+               execution.setVariable("CAAIVfMod_genericVnfPutEndpoint",null)
+               execution.setVariable("CAAIVfMod_aaiNamespace",null)
+               execution.setVariable("CAAIVfMod_moduleExists",false)
+               execution.setVariable("CAAIVfMod_baseModuleConflict", false)
+               execution.setVariable("CAAIVfMod_vnfNameFromAAI", null)
+               
+               
+               // CreateAAIVfModule workflow response variable placeholders
+               execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode",null)
+               execution.setVariable("CAAIVfMod_queryGenericVnfResponse","")
+               execution.setVariable("CAAIVfMod_createGenericVnfResponseCode",null)
+               execution.setVariable("CAAIVfMod_createGenericVnfResponse","")
+               execution.setVariable("CAAIVfMod_createVfModuleResponseCode",null)
+               execution.setVariable("CAAIVfMod_createVfModuleResponse","")
+               execution.setVariable("CAAIVfMod_parseModuleResponse","")
+               execution.setVariable("CAAIVfMod_deleteGenericVnfResponseCode",null)
+               execution.setVariable("CAAIVfMod_deleteGenericVnfResponse","")
+               execution.setVariable("CAAIVfMod_deleteVfModuleResponseCode",null)
+               execution.setVariable("CAAIVfMod_deleteVfModuleResponse","")
+//             execution.setVariable("CAAIVfMod_ResponseCode",null)
+//             execution.setVariable("CAAIVfMod_ErrorResponse","")
+               execution.setVariable("CreateAAIVfModuleResponse","")
+               execution.setVariable("RollbackData", null)
+
+       }       
+       
+       // parse the incoming CREATE_VF_MODULE request and store the Generic VNF
+       // and VF Module data in the flow Execution
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("CreateAAIVfModuleRequest")
+               utils.log("DEBUG", "input request xml:" + xml, isDebugEnabled)
+               initProcessVariables(execution)
+
+               def vnfId = ""
+               if (utils.nodeExists(xml, "vnf-id")) {
+                       vnfId = utils.getNodeText(xml,"vnf-id")
+               }
+               if (vnfId.isEmpty()) {
+                       execution.setVariable("CAAIVfMod_newGenericVnf", true)
+               }
+               execution.setVariable("CAAIVfMod_vnfId",vnfId)
+
+               def vnfName = ""
+               if (utils.nodeExists(xml, "vnf-name")) {
+                       vnfName = utils.getNodeText(xml,"vnf-name")
+               }
+               execution.setVariable("CAAIVfMod_vnfName", vnfName)
+
+               if (utils.nodeExists(xml, "vnf-type")) {
+                       execution.setVariable("CAAIVfMod_vnfType",utils.getNodeText(xml,"vnf-type"))
+               } else {
+                       execution.setVariable("CAAIVfMod_vnfType","")
+               }
+
+               execution.setVariable("CAAIVfMod_serviceId",utils.getNodeText(xml,"service-id"))
+
+               if (utils.nodeExists(xml, "persona-model-id")) {
+                       execution.setVariable("CAAIVfMod_personaId",utils.getNodeText(xml,"persona-model-id"))
+               } else {
+                       execution.setVariable("CAAIVfMod_personaId","")
+               }
+
+               if (utils.nodeExists(xml, "persona-model-version")) {
+                       execution.setVariable("CAAIVfMod_personaVer",utils.getNodeText(xml,"persona-model-version"))
+               } else {
+                       execution.setVariable("CAAIVfMod_personaVer","")
+               }
+               
+               if (utils.nodeExists(xml, "vnf-persona-model-id")) {
+                       execution.setVariable("CAAIVfMod_vnfPersonaId",utils.getNodeText(xml,"vnf-persona-model-id"))
+               } else {
+                       execution.setVariable("CAAIVfMod_vnfPersonaId","")
+               }
+
+               if (utils.nodeExists(xml, "vnf-persona-model-version")) {
+                       execution.setVariable("CAAIVfMod_vnfPersonaVer",utils.getNodeText(xml,"vnf-persona-model-version"))
+               } else {
+                       execution.setVariable("CAAIVfMod_vnfPersonaVer","")
+               }
+               
+               //isBaseVfModule
+               Boolean isBaseVfModule = false
+               if (utils.nodeExists(xml, "is-base-vf-module")) {
+                       String isBaseVfModuleString = utils.getNodeText(xml, "is-base-vf-module")
+                       if (isBaseVfModuleString.equals("true")) {
+                               isBaseVfModule = true
+                       }
+               }
+               execution.setVariable("CAAIVfMod_isBaseVfModule", isBaseVfModule)
+               
+               String isVidRequest = execution.getVariable("isVidRequest")
+               if (isVidRequest != null && "true".equals(isVidRequest)) {
+                       logDebug("VID Request received", isDebugEnabled)                
+               }
+
+               execution.setVariable("CAAIVfMod_moduleName",utils.getNodeText(xml,"vf-module-name"))
+               execution.setVariable("CAAIVfMod_moduleModelName",utils.getNodeText(xml,"vf-module-model-name"))
+
+               AaiUtil aaiUriUtil = new AaiUtil(this)
+               def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+               logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+               String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+               logDebug('AAI namespace is: ' + aaiNamespace, isDebugEnabled)
+               
+               execution.setVariable("CAAIVfMod_aaiNamespace","${aaiNamespace}")
+               
+       
+               if (vnfId.isEmpty()) {
+                       // TBD - assert that the vnfName is not empty
+                       execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",
+                               "${aai_uri}/?vnf-name=" +
+                                       UriUtils.encode(vnfName,"UTF-8"))
+               } else {
+                       execution.setVariable("CAAIVfMod_genericVnfGetEndpoint",
+                               "${aai_uri}/" + UriUtils.encode(vnfId,"UTF-8"))
+               }
+
+               
+               execution.setVariable("CAAIVfMod_genericVnfPutEndpoint","${aai_uri}/")
+       }
+       
+       // send a GET request to AA&I to retrieve the Generic VNF/VF Module information based on a Vnf Name
+       // expect a 200 response with the information in the response body or a 404 if the Generic VNF does not exist
+       public void queryAAIForGenericVnf(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CAAIVfMod_genericVnfGetEndpoint")
+               def aaiRequestId = UUID.randomUUID().toString()
+
+               RESTConfig config = new RESTConfig(endPoint);
+               utils.log("DEBUG","queryAAIForGenericVnf() endpoint-" + endPoint, isDebugEnabled)
+               def responseData = ""
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").addHeader("Content-Type", "application/xml").
+                               addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       utils.log("DEBUG", "invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugEnabled)
+                       APIResponse response = client.httpGet()
+                               
+                       responseData = response.getResponseBodyAsString()
+                       execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode", response.getStatusCode())
+                       execution.setVariable("CAAIVfMod_queryGenericVnfResponse", responseData)
+                       utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+                       utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+               } catch (Exception ex) {
+                       ex.printStackTrace()
+                       utils.log("DEBUG", "Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugEnabled)
+                       execution.setVariable("CAAIVfMod_queryGenericVnfResponseCode", 500)
+                       execution.setVariable("CAAIVfMod_queryGenericVnfResponse", "AAI GET Failed:" + ex.getMessage())
+               }
+       }
+       
+       // process the result from queryAAIForGenericVnf()
+       // note: this method is primarily for logging as the actual decision logic is embedded in the bpmn flow 
+       public void processAAIGenericVnfQuery(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def result = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+               
+               if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
+                       execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
+                       utils.log("DEBUG", "New Generic VNF requested and it does not already exist", isDebugEnabled)
+               } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 200 &&
+                               !execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
+                       utils.log("DEBUG", "Adding module to existing Generic VNF", isDebugEnabled)     
+               } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 200 &&
+                               execution.getVariable("CAAIVfMod_vnfId").isEmpty()) {
+                       utils.log("DEBUG", "Invalid request for new Generic VNF which already exists", isDebugEnabled)
+                       execution.setVariable("CAAIVfMod_queryGenericVnfResponse",
+                               "Invalid request for new Generic VNF which already exists, Vnf Name=" +
+                                execution.getVariable("CAAIVfMod_vnfName"))    
+               } else { // execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
+                          // !execution.getVariable("CAAIVfMod_vnfId").isEmpty())
+                       utils.log("DEBUG", "Invalid request for Add-on Module requested for non-existant Generic VNF", isDebugEnabled)  
+                       execution.setVariable("CAAIVfMod_createVfModuleResponse",
+                               "Invalid request for Add-on Module requested for non-existant Generic VNF, VNF Id=" +
+                               execution.getVariable("CAAIVfMod_vnfId"))
+               }
+       }
+
+       // construct and send a PUT request to A&AI to create a new Generic VNF
+       // note: to get here, the vnf-id in the original CREATE_VF_MODULE request was absent or ""
+       public void createGenericVnf(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def aaiRequestId = UUID.randomUUID().toString()
+               // TBD - is this how we want to generate the Id for the new Generic VNF?
+               def newVnfId = UUID.randomUUID().toString()
+               def endPoint = execution.getVariable("URN_aai_endpoint") +
+                       execution.getVariable("CAAIVfMod_genericVnfPutEndpoint") + newVnfId
+               // update the flow execution with the new Vnf Id
+               execution.setVariable("CAAIVfMod_vnfId",newVnfId)
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+       //      AaiUriUtil aaiUriUtil = new AaiUriUtil(this)
+       //      def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+       //      logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+       //      String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+       //      logDebug('AAI namespace is: ' + namespace, isDebugEnabled)
+               
+                               
+               String payload = """<generic-vnf xmlns="${execution.getVariable("CAAIVfMod_aaiNamespace")}">
+                                                               <vnf-id>${newVnfId}</vnf-id>
+                                                               <vnf-name>${execution.getVariable("CAAIVfMod_vnfName")}</vnf-name>
+                                                               <vnf-type>${execution.getVariable("CAAIVfMod_vnfType")}</vnf-type>
+                                                               <service-id>${execution.getVariable("CAAIVfMod_serviceId")}</service-id>
+                                                               <orchestration-status>active</orchestration-status>
+                                                               <persona-model-id>${execution.getVariable("CAAIVfMod_vnfPersonaId")}</persona-model-id>
+                                                               <persona-model-version>${execution.getVariable("CAAIVfMod_vnfPersonaVer")}</persona-model-version>
+                                                       </generic-vnf>""" as String
+               execution.setVariable("CAAIVfMod_createGenericVnfPayload", payload)
+
+               RESTConfig config = new RESTConfig(endPoint);
+               utils.log("DEBUG","createGenericVnf() endpoint-" + endPoint, isDebugEnabled)
+               def responseData = ""
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").addHeader("Content-Type", "application/xml").
+                               addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       utils.log("DEBUG", "invoking PUT call to AAI with payload:"+System.lineSeparator()+payload,isDebugEnabled)
+                       APIResponse response = client.httpPut(payload)
+                               
+                       responseData = response.getResponseBodyAsString()
+                       execution.setVariable("CAAIVfMod_createGenericVnfResponseCode", response.getStatusCode())
+                       execution.setVariable("CAAIVfMod_createGenericVnfResponse", responseData)
+                       utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+                       utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+               } catch (Exception ex) {
+                       ex.printStackTrace()
+                       utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
+                       execution.setVariable("CAAIVfMod_createGenericVnfResponseCode", 500)
+                       execution.setVariable("CAAIVfMod_createGenericVnfResponse", "AAI PUT Failed:" + ex.getMessage())
+               }               
+       }
+
+       // construct and send a PUT request to A&AI to create a Base or Add-on VF Module
+       public void createVfModule(Execution execution, Boolean isBaseModule) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               // TBD - is this how we want to generate the Id for the new (Base) VF Module?
+               
+               // Generate the new VF Module ID here if it has not been provided by the parent process
+               def newModuleId = execution.getVariable('newVfModuleId')
+               if (newModuleId == null || newModuleId.isEmpty()) {
+                       newModuleId = UUID.randomUUID().toString()
+               }
+               def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("CAAIVfMod_genericVnfPutEndpoint")
+               // need to append the existing Vnf Id or the one generated in createGenericVnf() to the url
+               endPoint = endPoint + UriUtils.encode(execution.getVariable("CAAIVfMod_vnfId"), "UTF-8") +
+                       "/vf-modules/vf-module/" + newModuleId;
+               def aaiRequestId = UUID.randomUUID().toString()
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+               // if we get to this point, we may be about to create the Vf Module,
+               // add rollback information about the Generic VNF for this base/add-on module
+               def rollbackData = execution.getVariable("RollbackData")
+               if (rollbackData == null) {
+                       rollbackData = new RollbackData();
+               }
+               rollbackData.put("VFMODULE", "vnfId", execution.getVariable("CAAIVfMod_vnfId"))
+               rollbackData.put("VFMODULE", "vnfName", execution.getVariable("CAAIVfMod_vnfName"))
+               rollbackData.put("VFMODULE", "isBaseModule", isBaseModule.toString())
+               execution.setVariable("RollbackData", rollbackData)
+               utils.log("DEBUG", "RollbackData:" + rollbackData, isDebugEnabled)
+               String payload = """<vf-module xmlns="${execution.getVariable("CAAIVfMod_aaiNamespace")}">
+                                                               <vf-module-id>${newModuleId}</vf-module-id>
+                                                               <vf-module-name>${execution.getVariable("CAAIVfMod_moduleName")}</vf-module-name>
+                                                               <persona-model-id>${execution.getVariable("CAAIVfMod_personaId")}</persona-model-id>
+                                                               <persona-model-version>${execution.getVariable("CAAIVfMod_personaVer")}</persona-model-version>
+                                                               <is-base-vf-module>${isBaseModule}</is-base-vf-module>
+                                                               <orchestration-status>pending-create</orchestration-status>
+                                                               </vf-module>""" as String
+               execution.setVariable("CAAIVfMod_createVfModulePayload", payload)
+
+               RESTConfig config = new RESTConfig(endPoint);
+               utils.log("DEBUG","createVfModule() endpoint-" + endPoint, isDebugEnabled)
+               def responseData = ""
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").addHeader("Content-Type", "application/xml").
+                               addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       utils.log("DEBUG", "invoking PUT call to AAI with payload:"+System.lineSeparator()+payload,isDebugEnabled)
+                       APIResponse response = client.httpPut(payload)
+                               
+                       responseData = response.getResponseBodyAsString()
+                       execution.setVariable("CAAIVfMod_createVfModuleResponseCode", response.getStatusCode())
+                       execution.setVariable("CAAIVfMod_createVfModuleResponse", responseData)
+                       utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+                       utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+
+                       // the base or add-on VF Module was successfully created,
+                       // add the module name to the rollback data and the response
+                       if (isOneOf(response.getStatusCode(), 200, 201)) {
+                               rollbackData.put("VFMODULE", "vfModuleId", newModuleId)
+                               rollbackData.put("VFMODULE", "vfModuleName", execution.getVariable("CAAIVfMod_moduleName"))
+                               execution.setVariable("RollbackData", rollbackData)
+                               utils.log("DEBUG", "RollbackData:" + rollbackData, isDebugEnabled)
+                               
+                               String responseOut = ""
+                               
+                               String isVidRequest = execution.getVariable("isVidRequest")
+                               
+                               if (isBaseModule && (isVidRequest == null || "false".equals(isVidRequest))) {                           
+                               
+                                       responseOut = """<CreateAAIVfModuleResponse>
+                                                                                       <vnf-id>${execution.getVariable("CAAIVfMod_vnfId")}</vnf-id>
+                                                                                       <vf-module-id>${newModuleId}</vf-module-id>
+                                                                               </CreateAAIVfModuleResponse>""" as String
+                               }
+                               else {
+                                       responseOut = """<CreateAAIVfModuleResponse>
+                                                                                       <vnf-name>${execution.getVariable("CAAIVfMod_vnfNameFromAAI")}</vnf-name>
+                                                                                       <vnf-id>${execution.getVariable("CAAIVfMod_vnfId")}</vnf-id>
+                                                                                       <vf-module-id>${newModuleId}</vf-module-id>
+                                                                               </CreateAAIVfModuleResponse>""" as String
+                               }
+                               
+                               execution.setVariable("CreateAAIVfModuleResponse", responseOut)
+                               utils.log("DEBUG", "CreateAAIVfModuleResponse:" + System.lineSeparator()+responseOut,isDebugEnabled)
+                       }
+               } catch (Exception ex) {
+                       ex.printStackTrace()
+                       utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
+                       execution.setVariable("CAAIVfMod_createVfModuleResponseCode", 500)
+                       execution.setVariable("CAAIVfMod_createVfModuleResponse", "AAI PUT Failed:" + ex.getMessage())
+               }                               
+       }
+       
+       // parses the output from the result from queryAAIForGenericVnf() to determine if the vf-module-name
+       // requested for an Add-on VF Module does not already exist for the specified Generic VNF
+       // also retrieves VNF name from AAI response for existing VNF
+       public void parseForAddOnModule(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+               def vnfNameFromAAI = utils.getNodeText1(xml, "vnf-name")
+               execution.setVariable("CAAIVfMod_vnfNameFromAAI", vnfNameFromAAI)
+               utils.log("DEBUG", "Obtained vnf-name from AAI for existing VNF: " + vnfNameFromAAI)    
+               def newModuleName = execution.getVariable("CAAIVfMod_moduleName")
+               utils.log("DEBUG", "VF Module to be added: " + newModuleName, isDebugEnabled)
+               def qryModuleNameList = utils.getMultNodes(xml, "vf-module-name")
+               execution.setVariable("CAAIVfMod_moduleExists", false)
+               if (qryModuleNameList != null) {
+                       utils.log("DEBUG", "Existing VF Module List: " + qryModuleNameList, isDebugEnabled)
+                       for (String qryModuleName : qryModuleNameList) {
+                               if (newModuleName.equals(qryModuleName)) {
+                                       // a module with the requested name already exists - failure
+                                       utils.log("DEBUG", "VF Module " + qryModuleName + " already exists for Generic VNF " +
+                                               execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+                                       execution.setVariable("CAAIVfMod_moduleExists", true)
+                                       execution.setVariable("CAAIVfMod_parseModuleResponse",
+                                               "VF Module " + qryModuleName + " already exists for Generic VNF " +
+                                               execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+                                       break
+                               }
+                       }
+               }
+               if (execution.getVariable("CAAIVfMod_moduleExists") == false) {
+                       utils.log("DEBUG", "VF Module " + execution.getVariable("CAAIVfMod_moduleName") +
+                               " does not exist for Generic VNF " + execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+                       execution.setVariable("CAAIVfMod_parseModuleResponse",
+                               "VF Module " + newModuleName + " does not exist for Generic VNF " +
+                               execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+               }               
+       }
+       
+       // parses the output from the result from queryAAIForGenericVnf() to determine if the vf-module-name
+       // requested for an Add-on VF Module does not already exist for the specified Generic VNF; 
+       // also retrieves VNF name from AAI response for existing VNF
+       public void parseForBaseModule(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+               def vnfNameFromAAI = utils.getNodeText1(xml, "vnf-name")
+               execution.setVariable("CAAIVfMod_vnfNameFromAAI", vnfNameFromAAI)
+               utils.log("DEBUG", "Obtained vnf-name from AAI for existing VNF: " + vnfNameFromAAI)    
+               def newModuleName = execution.getVariable("CAAIVfMod_moduleName")
+               utils.log("DEBUG", "VF Module to be added: " + newModuleName, isDebugEnabled)
+               def qryModuleNameList = utils.getMultNodes(xml, "vf-module-name")
+               execution.setVariable("CAAIVfMod_moduleExists", false)
+               if (qryModuleNameList != null) {
+                       utils.log("DEBUG", "Existing VF Module List: " + qryModuleNameList, isDebugEnabled)
+                       for (String qryModuleName : qryModuleNameList) {
+                               if (newModuleName.equals(qryModuleName)) {
+                                       // a module with the requested name already exists - failure
+                                       utils.log("DEBUG", "VF Module " + qryModuleName + " already exists for Generic VNF " +
+                                               execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+                                       execution.setVariable("CAAIVfMod_baseModuleConflict", true)
+                                       execution.setVariable("CAAIVfMod_parseModuleResponse",
+                                               "VF Module " + qryModuleName + " already exists for Generic VNF " +
+                                               execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+                                       break
+                               }
+                       }
+               }
+               def isBaseVfModuleList = utils.getMultNodes(xml, "is-base-vf-module")
+               if (isBaseVfModuleList != null && !execution.getVariable("CAAIVfMod_baseModuleConflict")) {
+                       
+                       for (String baseValue : isBaseVfModuleList) {
+                               if (baseValue.equals("true")) {
+                                       // a base module already exists in this VNF - failure
+                                       utils.log("DEBUG", "Base VF Module already exists for Generic VNF " +
+                                               execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+                                       execution.setVariable("CAAIVfMod_baseModuleConflict", true)
+                                       execution.setVariable("CAAIVfMod_parseModuleResponse",
+                                               "Base VF Module already exists for Generic VNF " +
+                                               execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+                                       break
+                               }
+                       }
+               
+               }
+               if (execution.getVariable("CAAIVfMod_moduleExists") == false && execution.getVariable("CAAIVfMod_baseModuleConflict") == false) {
+                       utils.log("DEBUG", "VF Module " + execution.getVariable("CAAIVfMod_moduleName") +
+                               " does not exist for Generic VNF " + execution.getVariable("CAAIVfMod_vnfNameFromAAI"), isDebugEnabled)
+                       execution.setVariable("CAAIVfMod_parseModuleResponse",
+                               "VF Module " + newModuleName + " does not exist for Generic VNF " +
+                               execution.getVariable("CAAIVfMod_vnfNameFromAAI"))
+               }               
+       }
+       
+       // generates a WorkflowException when the A&AI query returns a response code other than 200 or 404
+       public void handleAAIQueryFailure(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               
+               utils.log("ERROR", "Error occurred attempting to query AAI, Response Code " +
+                       execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") + ", Error Response " +
+                       execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable("CAAIVfMod_queryGenericVnfResponse"))
+               execution.setVariable("WorkflowException", exception)
+       }
+       
+       // generates a WorkflowException if
+       //              - the A&AI Generic VNF PUT returns a response code other than 200 or 201
+       //              - the requested Generic VNF already exists but vnf-id == null
+       //              - the requested Generic VNF does not exist but vnf-id != null
+       //              - the A&AI VF Module PUT returns a response code other than 200 or 201
+       //              - the requested VF Module already exists for the Generic VNF
+       public void handleCreateVfModuleFailure(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               
+               def errorCode
+               def errorResponse
+               if (execution.getVariable("CAAIVfMod_createGenericVnfResponseCode") != null &&
+                               !isOneOf(execution.getVariable("CAAIVfMod_createGenericVnfResponseCode"), 200, 201)) {
+                       utils.log("DEBUG", "Failure creating Generic VNF: " +
+                               execution.getVariable("CAAIVfMod_createGenericVnfResponse"), isDebugEnabled)
+                       errorResponse = execution.getVariable("CAAIVfMod_createGenericVnfResponse")
+                       errorCode = 5000
+               } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponse") != null &&
+                               execution.getVariable("CAAIVfMod_newGenericVnf") == true) {
+                       // attempted to create a Generic VNF that already exists but vnf-id == null
+                       utils.log("DEBUG", execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
+                       errorResponse = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+                       errorCode = 1002
+               } else if (execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404 &&
+                               execution.getVariable("CAAIVfMod_newGenericVnf") == false) {
+                       // attempted to create a Generic VNF where vnf-name does not exist but vnf-id != null
+                       utils.log("DEBUG", execution.getVariable("CAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
+                       errorResponse = execution.getVariable("CAAIVfMod_queryGenericVnfResponse")
+                       errorCode = 1002
+               } else if (execution.getVariable("CAAIVfMod_createVfModuleResponseCode") != null) {
+                       utils.log("DEBUG", "Failed to add VF Module: " +
+                       execution.getVariable("CAAIVfMod_createVfModuleResponse"), isDebugEnabled)
+                       errorResponse = execution.getVariable("CAAIVfMod_createVfModuleResponse")
+                       errorCode = 5000
+               } else if (execution.getVariable("CAAIVfMod_moduleExists") == true) {
+                       utils.log("DEBUG", "Attempting to add VF Module that already exists: " +
+                               execution.getVariable("CAAIVfMod_parseModuleResponse"), isDebugEnabled)
+                       errorResponse = execution.getVariable("CAAIVfMod_parseModuleResponse")
+                       errorCode = 1002
+               } else if (execution.getVariable("CAAIVfMod_baseModuleConflict") == true) {
+                       utils.log("DEBUG", "Attempting to add Base VF Module to VNF that already has a Base VF Module: " +
+                               execution.getVariable("CAAIVfMod_parseModuleResponse"), isDebugEnabled)
+                       errorResponse = execution.getVariable("CAAIVfMod_parseModuleResponse")
+                       errorCode = 1002
+               } else {
+                       // if the responses get populated corerctly, we should never get here
+                       errorResponse = "Unknown error occurred during CreateAAIVfModule flow"
+                       errorCode = 2000
+               }
+
+               utils.log("ERROR", "Error occurred during CreateAAIVfModule flow: " + errorResponse, isDebugEnabled)
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, errorCode, errorResponse)
+               execution.setVariable("WorkflowException", exception)
+       }
+
+       /**
+        * Performs a rollback.
+        * TBD: This method requires additional testing once integrated with the
+        *      main CreateVfModule flow.
+        * @param execution the execution
+        */
+       public void rollback(Execution execution) {
+               def method = getClass().getSimpleName() + ".rollback(" +
+                       "execution=" + execution.getId() +
+                       ")"
+               def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+               logDebug("Entered " + method, isDebugLogEnabled)
+
+               try {
+                       RollbackData rollbackData = (RollbackData) execution.getVariable("RollbackData")
+                       logDebug("RollbackData:" + rollbackData, isDebugLogEnabled)
+
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       
+                       if (rollbackData != null) {
+                               if (rollbackData.hasType("VFMODULE")) {
+                                       // use the DeleteAAIVfModule groovy methods for the rollback
+                                       def vnfId = rollbackData.get("VFMODULE", "vnfId")
+                                       def vfModuleId = rollbackData.get("VFMODULE", "vfModuleId")
+                                       def isBaseModule = rollbackData.get("VFMODULE", "isBaseModule")
+                                       execution.setVariable("DAAIVfMod_vnfId", vnfId)         
+                                       execution.setVariable("DAAIVfMod_vfModuleId", vfModuleId)
+                                       execution.setVariable("DAAIVfMod_genericVnfEndpoint", "${aai_uri}/" + vnfId)
+                                       execution.setVariable("DAAIVfMod_vfModuleEndpoint", "${aai_uri}/" + vnfId +
+                                                "/vf-modules/vf-module/" + vfModuleId)
+                                       DeleteAAIVfModule dvm = new DeleteAAIVfModule()
+                                       // query A&AI to get the needed information for the delete(s)
+                                       dvm.queryAAIForGenericVnf(execution)
+                                       dvm.parseForVfModule(execution)
+                                       
+                                       // roll back the base or add-on module
+                                       dvm.deleteVfModule(execution)
+                                       def responseCode = execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode")
+                                       def response = execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode")
+
+                                       if (isOneOf(responseCode, 200, 204)) {
+                                               logDebug("Received " + responseCode + " to VF Module rollback request", isDebugLogEnabled)
+//                                             execution.setVariable("RollbackResult", "SUCCESS")
+                                       } else {
+                                               logError("Received " + responseCode + " to VF Module rollback request: " + rollbackData +
+                                                       System.lineSeparator() + "Response: " + response)
+                                       }
+                                       
+                                       // a new Generic VNF was created that needs to be rolled back
+                                       if (isBaseModule.equals("true")) {
+                                               dvm.deleteGenericVnf(execution)
+                                               responseCode = execution.getVariable("DAAIVfMod_deleteGenericVnfResponseCode")
+                                               response = execution.getVariable("DAAIVfMod_deleteGenericVnfResponse")
+       
+                                               if (isOneOf(responseCode, 200, 204)) {
+                                                       logDebug("Received " + responseCode + " to Generic VNF rollback request", isDebugLogEnabled)
+                                                       execution.setVariable("RollbackResult", "SUCCESS")
+                                               } else {
+                                                       logError("Received " + responseCode + " to Generic VNF rollback request: " + rollbackData +
+                                                               System.lineSeparator() + "Response: " + response)
+                                               }
+                                       } else {
+                                               execution.setVariable("RollbackResult", "SUCCESS")
+                                       }
+                               }
+                       }
+
+                       logDebug("Exited " + method, isDebugLogEnabled)
+               } catch (Exception e) {
+                       logError("Caught exception in " + method, e)
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateAAIVfModuleVolumeGroup.groovy
new file mode 100644 (file)
index 0000000..51e77a8
--- /dev/null
@@ -0,0 +1,334 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class CreateAAIVfModuleVolumeGroup extends AbstractServiceTaskProcessor {
+
+       private XmlParser xmlParser = new XmlParser()
+
+       /**
+        * Initialize the flow's variables.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable('prefix', 'CAAIVfModVG_')
+               execution.setVariable('CAAIVfModVG_vnfId', null)
+               execution.setVariable('CAAIVfModVG_vfModuleId', null)
+               execution.setVariable('CAAIVfModVG_aicCloudRegion', null)
+               execution.setVariable('CAAIVfModVG_volumeGroupId', null)
+               execution.setVariable('CAAIVfModVG_getVfModuleResponseCode' ,null)
+               execution.setVariable('CAAIVfModVG_getVfModuleResponse', '')
+               execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', null)
+               execution.setVariable('CAAIVfModVG_updateVfModuleResponse', '')
+       }
+
+       /**
+        * Check for missing elements in the received request.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def xml = execution.getVariable('CreateAAIVfModuleVolumeGroupRequest')
+                       logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+                       initProcessVariables(execution)
+
+                       def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
+                       execution.setVariable('CAAIVfModVG_vnfId', vnfId)
+
+                       def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
+                       execution.setVariable('CAAIVfModVG_vfModuleId', vfModuleId)
+                       
+                       def aicCloudRegion = getRequiredNodeText(execution, xml,'aic-cloud-region')
+                       execution.setVariable('CAAIVfModVG_aicCloudRegion', aicCloudRegion)
+                       
+                       def volumeGroupId = getRequiredNodeText(execution, xml,'volume-group-id')
+                       execution.setVariable('CAAIVfModVG_volumeGroupId', volumeGroupId)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Using the received vnfId and vfModuleId, query AAI to get the corresponding VF Module.
+        * A 200 response is expected with the VF Module in the response body.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void getVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.getVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('CAAIVfModVG_vnfId')
+                       def vfModuleId = execution.getVariable('CAAIVfModVG_vfModuleId')
+
+                       // Construct endpoint
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + URLEncoder.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + URLEncoder.encode(vfModuleId, "UTF-8")
+
+                       try {
+                               logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+                               APIResponse response = aaiUtil.executeAAIGetCall(execution, endPoint)
+                               def responseData = response.getResponseBodyAsString()
+                               execution.setVariable('CAAIVfModVG_getVfModuleResponseCode', response.getStatusCode())
+                               execution.setVariable('CAAIVfModVG_getVfModuleResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+                               execution.setVariable('CAAIVfModVG_getVfModuleResponseCode', 500)
+                               execution.setVariable('CAAIVfModVG_getVfModuleResponse', 'AAI GET Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in getVfModule(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Construct and send a PUT request to AAI to update the VF Module with the
+        * created Volume Group relationship.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void updateVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.updateVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('CAAIVfModVG_vnfId')
+                       def vfModuleId = execution.getVariable('CAAIVfModVG_vfModuleId')
+                       def vfModule = execution.getVariable('CAAIVfModVG_getVfModuleResponse')
+                       def origRequest = execution.getVariable('CreateAAIVfModuleVolumeGroupRequest')
+                       def Node vfModuleNode = xmlParser.parseText(vfModule)
+                       
+                       // Confirm resource-version is in retrieved VF Module
+                       if (utils.getChildNode(vfModuleNode, 'resource-version') == null) {
+                               def msg = 'Can\'t update VF Module ' + vfModuleId + ' since \'resource-version\' is missing'
+                               logError(msg)
+                               throw new Exception(msg)
+                       }
+                                               
+                       // Construct payload by creating a Volume Group relationhip and inserting it into the VF Module
+                       def aicCloudRegion = execution.getVariable('CAAIVfModVG_aicCloudRegion')
+                       def volumeGroupId = execution.getVariable('CAAIVfModVG_volumeGroupId')
+                       def Node vgRelationshipNode = createVolumeGroupRelationshipNode(aicCloudRegion, volumeGroupId)
+                       insertVolumeGroupRelationshipNode(vfModuleNode, vgRelationshipNode)
+                       def payload = utils.nodeToString(vfModuleNode)
+
+                       // Construct endpoint
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + URLEncoder.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + URLEncoder.encode(vfModuleId, "UTF-8")
+
+                       try {
+                               logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
+                               APIResponse response = aaiUtil.executeAAIPutCall(execution, endPoint, payload)
+                               def responseData = response.getResponseBodyAsString()
+                               execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', response.getStatusCode())
+                               execution.setVariable('CAAIVfModVG_updateVfModuleResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(),isDebugLogEnabled)
+                               execution.setVariable('CAAIVfModVG_updateVfModuleResponseCode', 500)
+                               execution.setVariable('CAAIVfModVG_updateVfModuleResponse', 'AAI PUT Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Construct a Volume Group relationship Node with the given AIC Cloud Region and
+        * Volume Group ID for insertion into a VF Module.
+        * 
+        * @param aicCloudRegion Cloud Region ID to use in the Volume Group relationship
+        * @param volumeGroupId Volume Group ID to use in the Volume Group relationship
+        * @return a Node representing the new Volume Group relationship
+        */
+       private Node createVolumeGroupRelationshipNode(String aicCloudRegion, String volumeGroupId) {
+               
+               def Node relatedTo = new Node(null, 'related-to', 'volume-group')
+               
+               def Node relationshipKeyCO = new Node(null, 'relationship-key', 'cloud-region.cloud-owner')
+               def Node relationshipValueCO = new Node(null, 'relationship-value', 'att-aic')
+               def Node relationshipDataCO = new Node(null, 'relationship-data')
+               relationshipDataCO.append(relationshipKeyCO)
+               relationshipDataCO.append(relationshipValueCO)
+               
+               def Node relationshipKeyCRI = new Node(null, 'relationship-key', 'cloud-region.cloud-region-id')
+               def Node relationshipValueCRI = new Node(null, 'relationship-value', aicCloudRegion)
+               def Node relationshipDataCRI = new Node(null, 'relationship-data')
+               relationshipDataCRI.append(relationshipKeyCRI)
+               relationshipDataCRI.append(relationshipValueCRI)
+
+               def Node relationshipKeyVGI = new Node(null, 'relationship-key', 'volume-group.volume-group-id')
+               def Node relationshipValueVGI = new Node(null, 'relationship-value', volumeGroupId)
+               def Node relationshipDataVGI = new Node(null, 'relationship-data')
+               relationshipDataVGI.append(relationshipKeyVGI)
+               relationshipDataVGI.append(relationshipValueVGI)
+               
+               def Node volumeGroupRelationship = new Node(null, 'relationship')
+               volumeGroupRelationship.append(relatedTo)
+               volumeGroupRelationship.append(relationshipDataCO)
+               volumeGroupRelationship.append(relationshipDataCRI)
+               volumeGroupRelationship.append(relationshipDataVGI)
+               
+               return volumeGroupRelationship;
+       }
+       
+       /**
+        * Insert the given Volume Group relationship Node into the given VF Module.
+        * If the VF Module does NOT contain a relationship list:
+        *      - Create a relationship list containing the Volume Group relationship and insert it into the VF Module
+        * If the VF Module contains a relationship list but not a Volume Group relationship:
+        *      - Insert the the Volume Group relationship into the relationship lsit
+        * If the VF Module contains a relationship list and has a Volume Group relationship:
+        *      - Replace the existing Volume Group relationship with the new one
+        * @param vfModuleNode
+        * @param volumeGroupRelationshipNode
+        */
+       private void insertVolumeGroupRelationshipNode(Node vfModuleNode, Node volumeGroupRelationshipNode) {
+               def Node relationshipList = utils.getChildNode(vfModuleNode, 'relationship-list')
+               if (relationshipList == null) {
+                       relationshipList = new Node(null, 'relationship-list')
+                       relationshipList.append(volumeGroupRelationshipNode)
+                       vfModuleNode.append(relationshipList)
+               } else {
+                       def Node currVolumeGroupRelationshipNode = getCurrVolumeGroupRelationshipNode(relationshipList)
+                       if (currVolumeGroupRelationshipNode == null) {
+                               relationshipList.append(volumeGroupRelationshipNode)
+                       } else {
+                               currVolumeGroupRelationshipNode.replaceNode(volumeGroupRelationshipNode)
+                       }
+               }
+       }
+               
+       /**
+        * Find and return the value of the Volume Group ID for the specified VF Module.  If
+        * the value of the Volume Group ID cannot be found for any reason, 'null' is returned.
+        * 
+        * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
+        * @return the value of the Volume Group ID for the specified VF Module.  If the
+        * value of the Volume Group ID cannot be found for any reason, 'null' is returned.
+        */
+       private Node getCurrVolumeGroupRelationshipNode(Node relationshipList) {
+               def Node currVolumeGroupRelationshipNode = null
+               def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+               for (Node relationshipNode in relationships) {
+                       def String relatedTo = utils.getChildNodeText(relationshipNode, 'related-to')
+                       if ((relatedTo != null) && relatedTo.equals('volume-group')) {
+                               currVolumeGroupRelationshipNode = relationshipNode
+                       }
+               }
+               return currVolumeGroupRelationshipNode
+       }
+
+       /**
+        * Generates a WorkflowException if the AAI query returns a response code other than 200.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void handleAAIQueryFailure(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logError('Error occurred attempting to query AAI, Response Code ' +
+                       execution.getVariable('CAAIVfModVG_getVfModuleResponseCode') + ', Error Response ' +
+                       execution.getVariable('CAAIVfModVG_getVfModuleResponse'))
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               exceptionUtil.buildWorkflowException(execution, 5000, execution.getVariable('CAAIVfModVG_getVfModuleResponse'))
+
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+
+       /**
+        * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void handleUpdateVfModuleFailure(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
+                       execution.getVariable('CAAIVfModVG_updateVfModuleResponseCode') + ', Error Response ' +
+                       execution.getVariable('CAAIVfModVG_updateVfModuleResponse'))
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               exceptionUtil.buildWorkflowException(execution, 5000, execution.getVariable('CAAIVfModVG_updateVfModuleResponse'))
+
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateNetworkInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateNetworkInstanceInfra.groovy
new file mode 100644 (file)
index 0000000..bfd8648
--- /dev/null
@@ -0,0 +1,1780 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>CreateNetworkInstanceInfra.bpmn</class> process.
+ *
+ */
+public class CreateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
+       String Prefix="CRENWKI_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+       JsonUtils jsonUtil = new JsonUtils()
+       VidUtils vidUtils = new VidUtils(this)
+       NetworkUtils networkUtils = new NetworkUtils()
+       SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+       /**
+        * This method is executed during the preProcessRequest task of the <class>CreateNetworkInstanceInfra.bpmn</class> process.
+        * @param execution
+        */
+       public InitializeProcessVariables(Execution execution){
+               /* Initialize all the process variables in this block */
+
+               execution.setVariable("CRENWKI_messageId", "")
+               execution.setVariable("BasicAuthHeaderValuePO", "")
+               execution.setVariable("BasicAuthHeaderValueSDNC", "")
+               execution.setVariable("CRENWKI_CreateNetworkInstanceInfraJsonRequest", "")
+               execution.setVariable("CRENWKI_networkRequest", "")
+               execution.setVariable("CRENWKI_networkInputs", "")
+               execution.setVariable("CRENWKI_networkOutputs", "")
+               execution.setVariable("CRENWKI_requestId", "")
+               execution.setVariable("CRENWKI_source", "")
+
+               execution.setVariable("CRENWKI_CompleteMsoProcessRequest", "")
+               execution.setVariable("CRENWKI_FalloutHandlerRequest", "")
+               execution.setVariable("CRENWKI_isSilentSuccess", false)
+               execution.setVariable("CRENWKI_isPONR", false)    // Point-of-no-return, means, rollback is not needed
+
+               // query Service Instance
+               execution.setVariable("CRENWKI_serviceInstanceId","")
+               
+               // AAI query Name
+               execution.setVariable("CRENWKI_queryNameAAIRequest","")
+               execution.setVariable("CRENWKI_queryNameAAIResponse", "")
+               execution.setVariable("CRENWKI_aaiNameReturnCode", "")
+               execution.setVariable("CRENWKI_isAAIqueryNameGood", false)
+
+               // AAI query Cloud Region
+               execution.setVariable("CRENWKI_queryCloudRegionRequest","")
+               execution.setVariable("CRENWKI_queryCloudRegionReturnCode","")
+               execution.setVariable("CRENWKI_queryCloudRegionResponse","")
+               execution.setVariable("CRENWKI_cloudRegionPo","")
+               execution.setVariable("CRENWKI_cloudRegionSdnc","")
+               execution.setVariable("CRENWKI_isCloudRegionGood", false)
+
+               // AAI query Id
+               execution.setVariable("CRENWKI_queryIdAAIRequest","")
+               execution.setVariable("CRENWKI_queryIdAAIResponse", "")
+               execution.setVariable("CRENWKI_aaiIdReturnCode", "")
+
+               // AAI query vpn binding
+               execution.setVariable("CRENWKI_queryVpnBindingAAIRequest","")
+               execution.setVariable("CRENWKI_queryVpnBindingAAIResponse", "")
+               execution.setVariable("CRENWKI_aaiQqueryVpnBindingReturnCode", "")
+               execution.setVariable("CRENWKI_vpnBindings", null)
+               execution.setVariable("CRENWKI_vpnCount", 0)
+               execution.setVariable("CRENWKI_routeCollection", "")
+
+               // AAI query network policy
+               execution.setVariable("CRENWKI_queryNetworkPolicyAAIRequest","")
+               execution.setVariable("CRENWKI_queryNetworkPolicyAAIResponse", "")
+               execution.setVariable("CRENWKI_aaiQqueryNetworkPolicyReturnCode", "")
+               execution.setVariable("CRENWKI_networkPolicyUriList", null)
+               execution.setVariable("CRENWKI_networkPolicyCount", 0)
+               execution.setVariable("CRENWKI_networkCollection", "")
+
+               // AAI query route table reference
+               execution.setVariable("CRENWKI_queryNetworkTableRefAAIRequest","")
+               execution.setVariable("CRENWKI_queryNetworkTableRefAAIResponse", "")
+               execution.setVariable("CRENWKI_aaiQqueryNetworkTableRefReturnCode", "")
+               execution.setVariable("CRENWKI_networkTableRefUriList", null)
+               execution.setVariable("CRENWKI_networkTableRefCount", 0)
+               execution.setVariable("CRENWKI_tableRefCollection", "")
+
+               // AAI requery Id
+               execution.setVariable("CRENWKI_requeryIdAAIRequest","")
+               execution.setVariable("CRENWKI_requeryIdAAIResponse", "")
+               execution.setVariable("CRENWKI_aaiRequeryIdReturnCode", "")
+
+               // AAI update contrail
+               execution.setVariable("CRENWKI_updateContrailAAIUrlRequest","")
+               execution.setVariable("CRENWKI_updateContrailAAIPayloadRequest","")
+               execution.setVariable("CRENWKI_updateContrailAAIResponse", "")
+               execution.setVariable("CRENWKI_aaiUpdateContrailReturnCode", "")
+
+               execution.setVariable("CRENWKI_createNetworkRequest", "")
+               execution.setVariable("CRENWKI_createNetworkResponse", "")
+               execution.setVariable("CRENWKI_rollbackNetworkRequest", "")
+               execution.setVariable("CRENWKI_rollbackNetworkResponse", "")
+               execution.setVariable("CRENWKI_networkReturnCode", "")
+               execution.setVariable("CRENWKI_rollbackNetworkReturnCode", "")
+               execution.setVariable("CRENWKI_isNetworkRollbackNeeded", false)
+
+               execution.setVariable("CRENWKI_assignSDNCRequest", "")
+               execution.setVariable("CRENWKI_assignSDNCResponse", "")
+               execution.setVariable("CRENWKI_rollbackSDNCRequest", "")
+               execution.setVariable("CRENWKI_rollbackSDNCResponse", "")
+               execution.setVariable("CRENWKI_sdncReturnCode", "")
+               execution.setVariable("CRENWKI_rollbackSDNCReturnCode", "")
+               execution.setVariable("CRENWKI_isSdncRollbackNeeded", false)
+               execution.setVariable("CRENWKI_sdncResponseSuccess", false)
+
+               execution.setVariable("CRENWKI_createDBRequest", "")
+               execution.setVariable("CRENWKI_createDBResponse", "")
+               execution.setVariable("CRENWKI_dbReturnCode", "")
+
+               execution.setVariable("CRENWKI_orchestrationStatus", "")
+               execution.setVariable("CRENWKI_isVnfBindingPresent", false)
+               execution.setVariable("CRENWKI_Success", false)
+               execution.setVariable("GENGS_type", "service-instance") // Setting for Generic Sub Flow use
+
+
+       }
+
+       // **************************************************
+       //     Pre or Prepare Request Section
+       // **************************************************
+       /**
+        * This method is executed during the preProcessRequest task of the <class>CreateNetworkInstanceInfra.bpmn</class> process.
+        * @param execution
+        */
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside preProcessRequest CreateNetworkInstanceInfra Request ***** ", isDebugEnabled)
+
+               // initialize flow variables
+               InitializeProcessVariables(execution)
+
+               // get Incoming request & validate json format
+               String createNetworkJsonIncoming = execution.getVariable("bpmnRequest")
+               utils.logAudit(createNetworkJsonIncoming)
+               try {
+                       def prettyJson = JsonOutput.prettyPrint(createNetworkJsonIncoming.toString())
+                       utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+               }
+
+               // PO Authorization Info / headers Authorization=
+               String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+               utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+               try {
+                       def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+                       execution.setVariable("BasicAuthHeaderValuePO",encodedString)
+                       execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
+
+               } catch (IOException ex) {
+                       String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+               }
+
+               try {
+
+                       execution.setVariable("CRENWKI_CreateNetworkInstanceInfraJsonRequest", createNetworkJsonIncoming)
+
+                       // input should be empty, use generated 'network-id' from SDNC/AAI
+                       execution.setVariable("networkId", "")
+
+                       // recreate the xml network-request
+                       String networkRequest =  vidUtils.createXmlNetworkRequestInfra(execution, createNetworkJsonIncoming)
+                       execution.setVariable("CRENWKI_networkRequest", networkRequest)
+                       utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled)
+
+                       String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+                       execution.setVariable("CRENWKI_networkInputs", networkInputs)
+                       utils.log("DEBUG", " networkInputs - " + '\n' + networkInputs, isDebugEnabled)
+
+                       String netId = utils.getNodeText1(networkRequest, "network-id")
+                       String netName = utils.getNodeText1(networkRequest, "network-name")
+                       String networkOutputs =
+                          """<network-outputs>
+                   <network-id>${netId}</network-id>
+                   <network-name>${netName}</network-name>
+                 </network-outputs>"""
+                       execution.setVariable("CRENWKI_networkOutputs", networkOutputs)
+                       utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+
+                       String requestId = execution.getVariable("att-mso-request-id")
+                       if (requestId == null || requestId == "") {
+                               requestId = execution.getVariable("requestId")
+                       }
+                       execution.setVariable("CRENWKI_requestId", requestId)
+                       execution.setVariable("CRENWKI_source", utils.getNodeText1(networkRequest, "source"))
+
+                       // prepare messageId
+                       String messageId = execution.getVariable("CRENWKI_messageId")  // for testing
+                       if (messageId == null || messageId == "") {
+                               messageId = UUID.randomUUID()
+                               utils.log("DEBUG", " CRENWKI_messageId, random generated: " + messageId, isDebugEnabled)
+                       } else {
+                               utils.log("DEBUG", " CRENWKI_messageId, pre-assigned: " + messageId, isDebugEnabled)
+                       }
+                       execution.setVariable("CRENWKI_messageId", messageId)
+
+                       // validate 'backout-on-failure' to override 'URN_mso_rollback'
+                       boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
+                       execution.setVariable("CRENWKI_rollbackEnabled", rollbackEnabled)
+
+                       String instanceName = ""
+                       if (utils.nodeExists(networkRequest, "network-name")) {
+                               instanceName = utils.getNodeText1(networkRequest, "network-name")
+                               if (instanceName == 'null' || instanceName == "") {
+                                       sendSyncError(execution)
+                                       // missing value of network-name
+                                       String dataErrorMessage = "requestDetails has missing 'network-name' value/element."
+                                       utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               }
+                       }
+
+                       String lcpCloudRegion = ""
+                       if (utils.nodeExists(networkRequest, "aic-cloud-region")) {
+                               lcpCloudRegion = utils.getNodeText1(networkRequest, "aic-cloud-region")
+                           if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) {
+                                       sendSyncError(execution)
+                                       String dataErrorMessage = "requestDetails has missing 'aic-cloud-region' value/element."
+                                       utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+                               }
+                       }
+
+                       String serviceInstanceId = ""
+                       if (utils.nodeExists(networkRequest, "service-instance-id")) {
+                               serviceInstanceId = utils.getNodeText1(networkRequest, "service-instance-id")
+                               if ((serviceInstanceId == 'null') || (lcpCloudRegion == "")) {
+                                       sendSyncError(execution)
+                                       String dataErrorMessage = "Variable 'serviceInstanceId' value/element is missing."
+                                       utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+                               }
+                       }
+
+                       execution.setVariable("CRENWKI_serviceInstanceId", serviceInstanceId)
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex){
+                       sendSyncError(execution)
+                        // caught exception
+                       String exceptionMessage = "Exception Encountered in CreateNetworkInstanceInfra, PreProcessRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+       }
+
+       public void sendSyncResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       String requestId = execution.getVariable("att-mso-request-id")
+
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       String createNetworkRestRequest = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
+
+                       utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + createNetworkRestRequest, isDebugEnabled)
+                       sendWorkflowResponse(execution, 202, createNetworkRestRequest)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. sendSyncResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+               }
+
+       }
+
+
+       public void callRESTQueryAAINetworkName (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkName of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               // get variables
+               String networkInputs  = execution.getVariable("CRENWKI_networkInputs")
+               String networkName   = utils.getNodeText1(networkInputs, "network-name")
+               networkName = UriUtils.encode(networkName,"UTF-8")
+               String messageId = execution.getVariable("CRENWKI_messageId")
+
+               // Prepare AA&I url with network-name
+               String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+               AaiUtil aaiUriUtil = new AaiUtil(this)
+               String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+               String queryAAINameRequest = "${aai_endpoint}${aai_uri}" + "?network-name=" + networkName
+               utils.logAudit(queryAAINameRequest)
+               execution.setVariable("CRENWKI_queryNameAAIRequest", queryAAINameRequest)
+               utils.log("DEBUG", " CRENWKI_queryNameAAIRequest - " + "\n" + queryAAINameRequest, isDebugEnabled)
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+               RESTConfig config = new RESTConfig(queryAAINameRequest);
+
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.get()
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("CRENWKI_aaiNameReturnCode", returnCode)
+                       utils.log("DEBUG", " ***** AAI Query Name Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+                       utils.log("DEBUG", " ***** AAI Query Name Response : " +'\n'+ aaiResponseAsString, isDebugEnabled)
+
+                       if (returnCode=='200') {
+                               utils.logAudit(aaiResponseAsString)
+                               execution.setVariable("CRENWKI_queryNameAAIResponse", aaiResponseAsString)
+                               execution.setVariable("CRENWKI_isAAIqueryNameGood", true)
+                               String orchestrationStatus = ""
+                               try {
+                                       // response is NOT empty
+                                       orchestrationStatus = utils.getNodeText1(aaiResponseAsString, "orchestration-status")
+                                       execution.setVariable("CRENWKI_orchestrationStatus", orchestrationStatus.toUpperCase())
+                                       utils.log("DEBUG", " CRENWKI_orchestrationStatus - " + orchestrationStatus.toUpperCase(), isDebugEnabled)
+                               } catch (Exception ex) {
+                                   // response is empty
+                                       execution.setVariable("CRENWKI_orchestrationStatus", orchestrationStatus)
+                                       utils.log("DEBUG", " CRENWKI_orchestrationStatus - " + orchestrationStatus, isDebugEnabled)
+                               }
+
+                       } else {
+                           if (returnCode=='404') {
+                                       utils.log("DEBUG", " QueryAAINetworkName return code = '404' (Not Found).  Proceed with the Create !!! ", isDebugEnabled)
+
+                           } else {
+                               // aai all errors
+                                       String dataErrorMessage = "Unexpected Error Response from QueryAAINetworkName - " + returnCode
+                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
+
+                     }
+
+                       }
+
+                       utils.log("DEBUG", " AAI call, CRENWKI_isAAIqueryNameGood? : " + execution.getVariable("CRENWKI_isAAIqueryNameGood"), isDebugEnabled)
+
+
+               } catch (Exception ex) {
+                       // try error
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow - callRESTQueryAAINetworkName() -  " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAICloudRegion (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       String networkInputs  = execution.getVariable("CRENWKI_networkInputs")
+                       String cloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region")
+                       cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+
+                       // Prepare AA&I url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+                       String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+                       utils.logAudit(queryCloudRegionRequest)
+                       execution.setVariable("CRENWKI_queryCloudRegionRequest", queryCloudRegionRequest)
+                       utils.log("DEBUG", " CRENWKI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+                       String cloudRegionPo = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "PO", cloudRegion)
+                       String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "SDNC", cloudRegion)
+
+                       if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
+                               execution.setVariable("CRENWKI_cloudRegionPo", cloudRegionPo)
+                               execution.setVariable("CRENWKI_cloudRegionSdnc", cloudRegionSdnc)
+                               execution.setVariable("CRENWKI_isCloudRegionGood", true)
+
+                       } else {
+                           String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable("CRENWKI_queryCloudRegionReturnCode")
+                           utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                       }
+
+                       utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("CRENWKI_isCloudRegionGood"), isDebugEnabled)
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       // try error
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow - callRESTQueryAAICloudRegion() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAINetworkId(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkId of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String assignSDNCResponse = execution.getVariable("CRENWKI_assignSDNCResponse")
+                       String networkId   = utils.getNodeText1(assignSDNCResponse, "network-id")
+                       networkId = UriUtils.encode(networkId,"UTF-8")
+                       String messageId = execution.getVariable("CRENWKI_messageId")
+
+                       // Prepare AA&I url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                       String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
+                       utils.logAudit(queryIdAAIRequest)
+                       execution.setVariable("CRENWKI_queryIdAAIRequest", queryIdAAIRequest)
+                       utils.log("DEBUG", " CRENWKI_queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(queryIdAAIRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.get()
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("CRENWKI_aaiIdReturnCode", returnCode)
+
+                       utils.log("DEBUG", " ***** AAI Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                       if (returnCode=='200') {
+                               utils.logAudit(aaiResponseAsString)
+                               execution.setVariable("CRENWKI_queryIdAAIResponse", aaiResponseAsString)
+                               utils.log("DEBUG", " QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                       } else {
+                               if (returnCode=='404') {
+                                       String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)."
+                                       utils.log("DEBUG", " AAI Query Failed. " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               } else {
+                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                          execution.setVariable("WorkflowException", exceptionObject)
+                                          throw new BpmnError("MSOWorkflowException")
+
+                                  } else {
+                                                       // aai all errors
+                                                       String dataErrorMessage = "Unexpected Response from QueryAAINetworkId - " + returnCode
+                                                       utils.log("DEBUG", "Unexpected Response from QueryAAINetworkId - " + dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                 }
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTQueryAAINetworkId() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTReQueryAAINetworkId(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTReQueryAAINetworkId of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String networkId   = utils.getNodeText1(execution.getVariable("CRENWKI_assignSDNCResponse"), "network-id")
+                       networkId = UriUtils.encode(networkId,"UTF-8")
+                       String messageId = execution.getVariable("CRENWKI_messageId")
+
+                       // Prepare AA&I url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                       String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
+                       utils.logAudit(requeryIdAAIRequest)
+                       execution.setVariable("CRENWKI_requeryIdAAIRequest", requeryIdAAIRequest)
+                       utils.log("DEBUG", " CRENWKI_requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(requeryIdAAIRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.get()
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("CRENWKI_aaiRequeryIdReturnCode", returnCode)
+                       utils.log("DEBUG", " ***** AAI ReQuery Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                       if (returnCode=='200') {
+                               utils.logAudit(aaiResponseAsString)
+                               execution.setVariable("CRENWKI_requeryIdAAIResponse", aaiResponseAsString)
+                               utils.log("DEBUG", " ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                               String netId = utils.getNodeText1(aaiResponseAsString, "network-id")
+                               String netName = utils.getNodeText1(aaiResponseAsString, "network-name")
+                               String networkOutputs =
+                                  """<network-outputs>
+                   <network-id>${netId}</network-id>
+                   <network-name>${netName}</network-name>
+                 </network-outputs>"""
+                               execution.setVariable("CRENWKI_networkOutputs", networkOutputs)
+                               utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+
+                       } else {
+                               if (returnCode=='404') {
+                                       String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)."
+                                       utils.log("DEBUG", " AAI ReQuery Failed. - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               } else {
+                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                          execution.setVariable("WorkflowException", exceptionObject)
+                                          throw new BpmnError("MSOWorkflowException")
+
+                                          } else {
+                                                       // aai all errors
+                                                       String dataErrorMessage = "Unexpected Response from ReQueryAAINetworkId - " + returnCode
+                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                       }
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTReQueryAAINetworkId() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAINetworkVpnBinding(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkVpnBinding of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+
+                       // get variables
+                       String messageId = execution.getVariable("CRENWKI_messageId")
+                       String queryIdAAIResponse   = execution.getVariable("CRENWKI_queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+                       String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+                       utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+                       // Check if Vnf Binding is present, then build a List of vnfBinding
+                       List vpnBindingUri = networkUtils.getVnfBindingObject(relationship)
+                       int vpnCount = vpnBindingUri.size()
+                       execution.setVariable("CRENWKI_vpnCount", vpnCount)
+                       utils.log("DEBUG", " CRENWKI_vpnCount - " + vpnCount, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       if (vpnCount > 0) {
+                               execution.setVariable("CRENWKI_vpnBindings", vpnBindingUri)
+                               utils.log("DEBUG", " vpnBindingUri List - " + vpnBindingUri, isDebugEnabled)
+
+                               String routeTargets = ""
+                               // AII loop call using list vpnBindings
+                               for (i in 0..vpnBindingUri.size()-1) {
+
+                                       int counting = i+1
+
+                                       // prepare url using vpnBinding
+                                       String queryVpnBindingAAIRequest = ""
+                                       String aai_uri = aaiUriUtil.getNetworkVpnBindingUri(execution)
+
+                                       // Note: By default, the vpnBinding url is found in 'related-link' of the response,
+                                       //       so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+                                       if (aai_uri == null || aai_uri == "") {
+                                               // using value of 'related-link' from response
+                                               if (vpnBindingUri[i].charAt(vpnBindingUri[i].length()-1) == '/') {
+                                                   queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i].substring(0, vpnBindingUri[i].length()-1)
+                                               } else {
+                                                   queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i]
+                                               }
+
+                                       } else {
+                                           // using uri value in URN mapping
+                                               String vpnBindingId = vpnBindingUri[i].substring(vpnBindingUri[i].indexOf("/vpn-binding/")+13, vpnBindingUri[i].length())
+                                               if (vpnBindingId.charAt(vpnBindingId.length()-1) == '/') {
+                                                       vpnBindingId = vpnBindingId.substring(0, vpnBindingId.length()-1)
+                                               }
+                                           queryVpnBindingAAIRequest = "${aai_endpoint}${aai_uri}/" + vpnBindingId
+                                       }
+
+                                       utils.logAudit(queryVpnBindingAAIRequest)
+                                       execution.setVariable("CRENWKI_queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
+                                       utils.log("DEBUG", " CRENWKI_queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled)
+
+                                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                                       RESTConfig config = new RESTConfig(queryVpnBindingAAIRequest);
+                                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                                         .addHeader("Accept","application/xml");
+                                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                               client.addAuthorizationHeader(basicAuthCred)
+                                       }
+                                       APIResponse response = client.get()
+                                       String returnCode = response.getStatusCode()
+                                       execution.setVariable("CRENWKI_aaiQqueryVpnBindingReturnCode", returnCode)
+                                       utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled)
+
+                                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                                       if (returnCode=='200') {
+                                               utils.logAudit(aaiResponseAsString)
+                                               execution.setVariable("CRENWKI_queryVpnBindingAAIResponse", aaiResponseAsString)
+                                               utils.log("DEBUG", " AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                                               String routeTarget = ""
+                                               if (utils.nodeExists(aaiResponseAsString, "global-route-target")) {
+                                                       routeTarget  = utils.getNodeText1(aaiResponseAsString, "global-route-target")
+                                                       routeTargets += "<routeTargets>" + routeTarget + "</routeTargets>" + '\n'
+                                               }
+
+                                       } else {
+                                               if (returnCode=='404') {
+                                                       String dataErrorMessage = "Response Error from AAINetworkVpnBinding is 404 (Not Found)."
+                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                               } else {
+                                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                                          execution.setVariable("WorkflowException", exceptionObject)
+                                                          throw new BpmnError("MSOWorkflowException")
+
+                                                          } else {
+                                                                       // aai all errors
+                                                                       String dataErrorMessage = " Unexpected Response from AAINetworkVpnBinding - " + returnCode
+                                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                                         }
+                                               }
+                                       }
+
+                               } // end loop
+
+                               execution.setVariable("CRENWKI_routeCollection", routeTargets)
+                               utils.log("DEBUG", " CRENWKI_routeCollection - " + '\n' + routeTargets, isDebugEnabled)
+
+                       } else {
+                               // reset return code to success
+                               execution.setVariable("CRENWKI_aaiQqueryVpnBindingReturnCode", "200")
+                           String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                               String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                           String aaiStubResponse =
+                                       """     <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+                                                       <vpn-binding xmlns="${schemaVersion}">
+                                                     <global-route-target/>
+                                                       </vpn-binding>
+                                               </rest:payload>"""
+                               String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+                               execution.setVariable("CRENWKI_queryVpnBindingAAIResponse", aaiStubResponseAsXml)
+                               execution.setVariable("CRENWKI_routeCollection", "<routeTargets/>")
+                               utils.log("DEBUG", " No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAINetworkPolicy(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkPolicy of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String messageId = execution.getVariable("CRENWKI_messageId")
+                       String queryIdAAIResponse   = execution.getVariable("CRENWKI_queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+                       String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+                       utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+                       // Check if Network Policy is present, then build a List of network policy
+                       List networkPolicyUriList = networkUtils.getNetworkPolicyObject(relationship)
+                       int networkPolicyCount = networkPolicyUriList.size()
+                       execution.setVariable("CRENWKI_networkPolicyCount", networkPolicyCount)
+                       utils.log("DEBUG", " CRENWKI_networkPolicyCount - " + networkPolicyCount, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       if (networkPolicyCount > 0) {
+                               execution.setVariable("CRENWKI_networkPolicyUriList", networkPolicyUriList)
+                               utils.log("DEBUG", " networkPolicyUri List - " + networkPolicyUriList, isDebugEnabled)
+
+                               String networkPolicies = ""
+                               // AII loop call using list vpnBindings
+                               for (i in 0..networkPolicyUriList.size()-1) {
+
+                                       int counting = i+1
+
+                                       // prepare url using vpnBinding
+                                       String queryNetworkPolicyAAIRequest = ""
+
+                                       String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+                                       // Note: By default, the network policy url is found in 'related-link' of the response,
+                                       //       so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+                                       if (aai_uri == null || aai_uri == "") {
+                                               // using value of 'related-link' from response
+                                               if (networkPolicyUriList[i].charAt(networkPolicyUriList[i].length()-1) == '/') {
+                                                       queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i].substring(0, networkPolicyUriList[i].length()-1)
+                                               } else {
+                                                       queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i]
+                                               }
+                                       } else {
+                                               // using uri value in URN mapping
+                                               String networkPolicyId = networkPolicyUriList[i].substring(networkPolicyUriList[i].indexOf("/network-policy/")+16, networkPolicyUriList[i].length())
+                                               println " networkPolicyId - " + networkPolicyId
+                                               if (networkPolicyId.charAt(networkPolicyId.length()-1) == '/') {
+                                                       networkPolicyId = networkPolicyId.substring(0, networkPolicyId.length()-1)
+                                               }
+                                               queryNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + networkPolicyId
+
+                                       }
+
+
+                                       utils.logAudit(queryNetworkPolicyAAIRequest)
+                                       execution.setVariable("CRENWKI_queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
+                                       utils.log("DEBUG", " CRENWKI_queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled)
+
+                                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                                       RESTConfig config = new RESTConfig(queryNetworkPolicyAAIRequest);
+                                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                                         .addHeader("Accept","application/xml");
+                                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                               client.addAuthorizationHeader(basicAuthCred)
+                                       }
+                                       APIResponse response = client.get()
+                                       String returnCode = response.getStatusCode()
+                                       execution.setVariable("CRENWKI_aaiQqueryNetworkPolicyReturnCode", returnCode)
+                                       utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled)
+
+                                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                                       if (returnCode=='200') {
+                                               utils.logAudit(aaiResponseAsString)
+                                               execution.setVariable("CRENWKI_queryNetworkPolicyAAIResponse", aaiResponseAsString)
+                                               utils.log("DEBUG", " QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                                               String networkPolicy = ""
+                                               if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) {
+                                                       networkPolicy  = utils.getNodeText1(aaiResponseAsString, "network-policy-fqdn")
+                                                       networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n'
+                                               }
+
+                                       } else {
+                                               if (returnCode=='404') {
+                                                       String dataErrorMessage = "Response Error from QueryAAINetworkPolicy is 404 (Not Found)."
+                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                               } else {
+                                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                                          execution.setVariable("WorkflowException", exceptionObject)
+                                                          throw new BpmnError("MSOWorkflowException")
+
+                                                          } else {
+                                                                       // aai all errors
+                                                                       String dataErrorMessage = "Unexpected Response from QueryAAINetworkPolicy - " + returnCode
+                                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                                         }
+                                               }
+                                       }
+
+                               } // end loop
+
+                               execution.setVariable("CRENWKI_networkCollection", networkPolicies)
+                               utils.log("DEBUG", " CRENWKI_networkCollection - " + '\n' + networkPolicies, isDebugEnabled)
+
+                       } else {
+                               // reset return code to success
+                               execution.setVariable("CRENWKI_aaiQqueryNetworkPolicyReturnCode", "200")
+                               String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                               String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                               String aaiStubResponse =
+                                       """     <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+                                                       <network-policy xmlns="${schemaVersion}">
+                                                         <network-policy-fqdn/>
+                            </network-policy>
+                                               </rest:payload>"""
+                               String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+                               execution.setVariable("CRENWKI_queryNetworkPolicyAAIResponse", aaiStubResponseAsXml)
+                               execution.setVariable("CRENWKI_networkCollection", "<policyFqdns/>")
+                               utils.log("DEBUG", " No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAINetworkTableRef(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkTableRef of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String messageId = execution.getVariable("CRENWKI_messageId")
+                       String queryIdAAIResponse   = execution.getVariable("CRENWKI_queryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+                       String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+                       utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+                       // Check if Network TableREf is present, then build a List of network policy
+                       List networkTableRefUriList = networkUtils.getNetworkTableRefObject(relationship)
+                       int networkTableRefCount = networkTableRefUriList.size()
+                       execution.setVariable("CRENWKI_networkTableRefCount", networkTableRefCount)
+                       utils.log("DEBUG", " CRENWKI_networkTableRefCount - " + networkTableRefCount, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       if (networkTableRefCount > 0) {
+                               execution.setVariable("CRENWKI_networkTableRefUriList", networkTableRefUriList)
+                               utils.log("DEBUG", " networkTableRefUri List - " + networkTableRefUriList, isDebugEnabled)
+
+                               // AII loop call using list vpnBindings
+                               String networkTableRefs = ""
+                               for (i in 0..networkTableRefUriList.size()-1) {
+
+                                       int counting = i+1
+
+                                       // prepare url using tableRef
+                                       String queryNetworkTableRefAAIRequest = ""
+
+                                       String aai_uri = aaiUriUtil.getNetworkTableReferencesUri(execution)
+
+                                       // Note: By default, the network policy url is found in 'related-link' of the response,
+                                       //       so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+                                       if (aai_uri == null || aai_uri == "") {
+                                               // using value of 'related-link' from response
+                                               if (networkTableRefUriList[i].charAt(networkTableRefUriList[i].length()-1) == '/') {
+                                                       queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i].substring(0, networkTableRefUriList[i].length()-1)
+                                               } else {
+                                                       queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i]
+                                               }
+                                       } else {
+                                               // using uri value in URN mapping
+                                               String networkTableRefId = networkTableRefUriList[i].substring(networkTableRefUriList[i].indexOf("/route-table-reference/")+23, networkTableRefUriList[i].length())
+
+                                               if (networkTableRefId.charAt(networkTableRefId.length()-1) == '/') {
+                                                       networkTableRefId = networkTableRefId.substring(0, networkTableRefId.length()-1)
+                                               }
+                                               queryNetworkTableRefAAIRequest = "${aai_endpoint}${aai_uri}/" + networkTableRefId
+
+                                       }
+
+
+                                       utils.logAudit(queryNetworkTableRefAAIRequest)
+                                       execution.setVariable("CRENWKI_queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
+                                       utils.log("DEBUG", " CRENWKI_queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled)
+
+                                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                                       RESTConfig config = new RESTConfig(queryNetworkTableRefAAIRequest);
+                                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                                         .addHeader("Accept","application/xml");
+                                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                               client.addAuthorizationHeader(basicAuthCred)
+                                       }
+                                       APIResponse response = client.get()
+                                       String returnCode = response.getStatusCode()
+                                       execution.setVariable("CRENWKI_aaiQqueryNetworkTableRefReturnCode", returnCode)
+                                       utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled)
+
+                                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                                       if (returnCode=='200') {
+                                               utils.logAudit(aaiResponseAsString)
+                                               execution.setVariable("CRENWKI_queryNetworkTableRefAAIResponse", aaiResponseAsString)
+                                               utils.log("DEBUG", " QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                                               String networkTableRef = ""
+                                               if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) {
+                                                       networkTableRef  = utils.getNodeText1(aaiResponseAsString, "route-table-reference-fqdn")
+                                                       networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n'
+                                               }
+
+                                       } else {
+                                               if (returnCode=='404') {
+                                                       String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)."
+                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                               } else {
+                                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                                          execution.setVariable("WorkflowException", exceptionObject)
+                                                          throw new BpmnError("MSOWorkflowException")
+
+                                                          } else {
+                                                                       // aai all errors
+                                                                       String dataErrorMessage = "Unexpected Response from QueryAAINetworkTableRef - " + returnCode
+                                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                                         }
+                                               }
+                                       }
+
+                               } // end loop
+
+                               execution.setVariable("CRENWKI_tableRefCollection", networkTableRefs)
+                               utils.log("DEBUG", " CRENWKI_tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled)
+
+                       } else {
+                               // reset return code to success
+                               execution.setVariable("CRENWKI_aaiQqueryNetworkTableRefReturnCode", "200")
+                               String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                               String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                               String aaiStubResponse =
+                                       """     <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+                                                       <route-table-references xmlns="${schemaVersion}">
+                                                         <route-table-reference-fqdn/>
+                            </route-table-references>
+                                               </rest:payload>"""
+                               String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+                               execution.setVariable("CRENWKI_queryNetworkTableRefAAIResponse", aaiStubResponseAsXml)
+                               execution.setVariable("CRENWKI_tableRefCollection", "<routeTableFqdns/>")
+                               utils.log("DEBUG", " No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+
+       public void callRESTUpdateContrailAAINetwork(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTUpdateContrailAAINetwork of CreateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String networkId   = utils.getNodeText1(execution.getVariable("CRENWKI_assignSDNCResponse"), "network-id")
+                       networkId = UriUtils.encode(networkId,"UTF-8")
+                       String requeryIdAAIResponse   = execution.getVariable("CRENWKI_requeryIdAAIResponse")
+                       String createNetworkResponse   = execution.getVariable("CRENWKI_createNetworkResponse")
+                       String messageId = execution.getVariable("CRENWKI_messageId")
+
+                       // Prepare url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                       String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId
+
+                       utils.logAudit(updateContrailAAIUrlRequest)
+                       execution.setVariable("CRENWKI_updateContrailAAIUrlRequest", updateContrailAAIUrlRequest)
+                       utils.log("DEBUG", " CRENWKI_updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled)
+
+                       //Prepare payload (PUT)
+                       String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                       String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion)
+                       String payloadXml = utils.formatXml(payload)
+                       utils.logAudit(payloadXml)
+                       execution.setVariable("CRENWKI_updateContrailAAIPayloadRequest", payloadXml)
+                       utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(updateContrailAAIUrlRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.httpPut(payload)
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("CRENWKI_aaiUpdateContrailReturnCode", returnCode)
+
+                       utils.log("DEBUG", " ***** AAI Update Contrail Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
+
+                       if (returnCode=='200') {
+                               utils.logAudit(aaiUpdateContrailResponseAsString)
+                               execution.setVariable("CRENWKI_updateContrailAAIResponse", aaiUpdateContrailResponseAsString)
+                               utils.log("DEBUG", " AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString, isDebugEnabled)
+                               // Point-of-no-return is set to false, rollback not needed.
+                               execution.setVariable("CRENWKI_isPONR", true)
+
+                       } else {
+                               if (returnCode=='404') {
+                                       String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)."
+                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               } else {
+                                  if (aaiUpdateContrailResponseAsString.contains("RESTFault")) {
+                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiUpdateContrailResponseAsString, execution)
+                                          execution.setVariable("WorkflowException", exceptionObject)
+                                          throw new BpmnError("MSOWorkflowException")
+
+                                          } else {
+                                                       // aai all errors
+                                                       String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode
+                                                       utils.log("DEBUG", errorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage)
+                                         }
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in CreateNetworkInstanceInfra flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void prepareCreateNetworkRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareCreateNetworkRequest of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+
+                       // get variables
+                       String requestId = execution.getVariable("CRENWKI_requestId")
+                       String messageId = execution.getVariable("CRENWKI_messageId")
+                       String source    = execution.getVariable("CRENWKI_source")
+
+                       String requestInput = execution.getVariable("CRENWKI_networkRequest")
+                       String queryIdResponse = execution.getVariable("CRENWKI_queryIdAAIResponse")
+                       String cloudRegionId = execution.getVariable("CRENWKI_cloudRegionPo")
+                       String backoutOnFailure = execution.getVariable("CRENWKI_rollbackEnabled")
+
+                       // Prepare Network request
+                       String routeCollection = execution.getVariable("CRENWKI_routeCollection")
+                       String policyCollection = execution.getVariable("CRENWKI_networkCollection")
+                       String tableCollection = execution.getVariable("CRENWKI_tableRefCollection")
+                       String createNetworkRequest = networkUtils.CreateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyCollection, tableCollection, cloudRegionId, backoutOnFailure, source )
+                       // Format Response
+                       String buildDeleteNetworkRequestAsString = utils.formatXml(createNetworkRequest)
+                       buildDeleteNetworkRequestAsString = buildDeleteNetworkRequestAsString.replace(":w1aac13n0", "").replace("w1aac13n0:", "")
+                       utils.logAudit(buildDeleteNetworkRequestAsString)
+
+                       execution.setVariable("CRENWKI_createNetworkRequest", buildDeleteNetworkRequestAsString)
+                       utils.log("DEBUG", " CRENWKI_createNetworkRequest - " + "\n" +  buildDeleteNetworkRequestAsString, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareCreateNetworkRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void prepareSDNCRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareSDNCRequest of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       // get variables
+                       String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+                       String createNetworkInput = execution.getVariable("CRENWKI_networkRequest")
+                       String cloudRegionId = execution.getVariable("CRENWKI_cloudRegionSdnc")
+
+                       String networkId = ""
+                       if (utils.nodeExists(createNetworkInput, "network-id")) {
+                          networkId = utils.getNodeText1(createNetworkInput, "network-id")
+                       }
+                       if (networkId == null) {networkId = ""}
+
+                       String serviceInstanceId = utils.getNodeText1(createNetworkInput, "service-instance-id")
+
+                       // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+                       String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "assign", "NetworkActivateRequest", cloudRegionId, networkId, null)
+
+                       String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+                       utils.logAudit(sndcTopologyCreateRequesAsString)
+                       execution.setVariable("CRENWKI_assignSDNCRequest", sndcTopologyCreateRequesAsString)
+                       utils.log("DEBUG", " CRENWKI_assignSDNCRequest - " + "\n" +  sndcTopologyCreateRequesAsString, isDebugEnabled)
+
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareSDNCRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void prepareDBRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       utils.log("DEBUG", " ***** Inside prepareDBRequest of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+                       String networkOutputs = execution.getVariable("CRENWKI_networkOutputs")
+                       String networkName = ""
+                       try {
+                                networkName = utils.getNodeText1(networkOutputs, "network-name")
+                                if (networkName == null) {networkName = ""}
+                       } catch (Exception ex) {
+                               networkName = ""
+                               utils.log("DEBUG", " No 'network-name' found in '<network-outputs>' ! ", isDebugEnabled)
+                       }
+                       String networkId = ""
+                       try {
+                               networkId = utils.getNodeText1(networkOutputs, "network-id")
+                               if (networkId == null) {networkId = ""}
+                       } catch (Exception) {
+                               networkId = ""
+                               utils.log("DEBUG", " No 'network-id' found in '<network-outputs>' ! ", isDebugEnabled)
+                       }
+                       String requestId = execution.getVariable("CRENWKI_requestId")
+
+                       String statusMessage = ""
+                       if (execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE") {
+                               // SILENT SUCCESS
+                               statusMessage = "Network " + networkName + " already exists. Silent success."
+                       } else {
+                               statusMessage = "Network successfully created."
+                       }
+
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>COMPLETED</requestStatus>
+                                                               <progress>100</progress>
+                                                               <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
+                                <networkId>${networkId}</networkId>
+                                                       </ns:updateInfraRequest>
+                                               </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+                  execution.setVariable("CRENWKI_createDBRequest", buildDeleteDBRequestAsString)
+                  utils.log("DEBUG", " DB Adapter Request - " + "\n" + buildDeleteDBRequestAsString, isDebugEnabled)
+                  utils.logAudit(buildDeleteDBRequestAsString)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareDBRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+       public void prepareDBRequestError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       utils.log("DEBUG", " ***** Inside prepareDBRequestError of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+                       String statusMessage = ""
+                       WorkflowException wfe = null
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               wfe = execution.getVariable("WorkflowException")
+                               statusMessage = wfe.getErrorMessage()
+                       } else {
+                          String workflowException = execution.getVariable("WorkflowException")
+                          try {
+                                 statusMessage = utils.getNodeText1(workflowException, "ErrorMessage")
+                          } catch (Exception ex) {
+                                 statusMessage = "Encountered Error during DB Update. " + ex.getMessage()
+                          }
+                       }
+                       String networkOutputs = execution.getVariable("CRENWKI_networkOutputs")
+                       String requestId = execution.getVariable("CRENWKI_requestId")
+                       String networkId = ""
+                       try {
+                               networkId = utils.getNodeText1(networkOutputs, "network-id")
+                               if (networkId == null) {networkId = ""}
+                       } catch (Exception) {
+                               networkId = ""
+                               utils.log("DEBUG", " No 'network-id' found in '<network-outputs>' ! ", isDebugEnabled)
+                       }
+                       String networkName = ""
+                       try {
+                                networkName = utils.getNodeText1(networkOutputs, "network-name")
+                                if (networkName == null) {networkName = ""}
+                       } catch (Exception ex) {
+                               networkName = ""
+                               utils.log("DEBUG", " No 'network-name' found in '<network-outputs>' ! ", isDebugEnabled)
+                       }
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>FAILED</requestStatus>
+                                                               <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
+                                                       </ns:updateInfraRequest>
+                                               </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  execution.setVariable("CRENWKI_createDBRequest", dbRequest)
+                  utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+                  utils.logAudit(dbRequest)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareDBRequestError() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+
+       // **************************************************
+       //     Post or Validate Response Section
+       // **************************************************
+
+       public void validateCreateNetworkResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside validateNetworkResponse of CreateNetworkInstanceInfra *****", isDebugEnabled)
+
+               try {
+                       String returnCode = execution.getVariable("CRENWKI_networkReturnCode")
+                       String networkResponse = execution.getVariable("CRENWKI_createNetworkResponse")
+                       if (networkResponse==null)      {
+                               networkResponse="" // reset
+                       }
+
+                       utils.log("DEBUG", " Network Adapter create responseCode: " + returnCode, isDebugEnabled)
+
+                       String errorMessage = ""
+                       if (returnCode == "200") {
+                               execution.setVariable("CRENWKI_isNetworkRollbackNeeded", true)
+                               utils.logAudit(networkResponse)
+                               execution.setVariable("CRENWKI_createNetworkResponse", networkResponse)
+                               utils.log("DEBUG", " Network Adapter create Success Response - " + "\n" + networkResponse, isDebugEnabled)
+
+                               // prepare rollback data
+                               String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
+                               String rollbackNetwork =
+                                       """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://com.att.mso/network">
+                                                       ${rollbackData}
+                                               </NetworkAdapter:rollbackNetwork>"""
+                               String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+                               execution.setVariable("CRENWKI_rollbackNetworkRequest", rollbackNetworkXml)
+                               utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled)
+
+                       } else { // network error
+                          if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) {   //4xx, 5xx
+                                  if (networkResponse.contains("createNetworkError")) {
+                                          networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '')
+                                          errorMessage = utils.getNodeText1(networkResponse, "message")
+                                          errorMessage  = "Received error from Network Adapter: " + errorMessage
+                                          exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+                                  } else { // CatchAll exception
+                                          if (returnCode == "500") {
+                                                  errorMessage = "JBWEB000065: HTTP Status 500."
+                                      } else {
+                                              errorMessage = "Return code is " + returnCode
+                                      }
+                                          errorMessage  = "Received error from Network Adapter: " + errorMessage
+                                          exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+                                  }
+
+                          } else { // CatchAll exception
+                                  String dataErrorMessage  = "Received error from Network Adapter. Return code is: " + returnCode
+                                  exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                          }
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. validateCreateNetworkResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+
+       }
+
+       public void validateSDNCResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside validateSDNCResponse of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               String response = execution.getVariable("CRENWKI_assignSDNCResponse")
+               WorkflowException workflowException = null
+               try {
+                       workflowException = execution.getVariable("CRENWKI_WorkflowException")
+                       //execution.setVariable("WorkflowException", workflowException)
+               } catch (Exception ex) {
+                       utils.log("DEBUG", " Sdnc 'WorkflowException' object is empty or null. ", isDebugEnabled)
+               }
+
+               boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+               // reset variable
+               String assignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable("CRENWKI_assignSDNCResponse"))
+               assignSDNCResponseDecodeXml = assignSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+               execution.setVariable("CRENWKI_assignSDNCResponse", assignSDNCResponseDecodeXml)
+
+               if (execution.getVariable("CRENWKI_sdncResponseSuccess") == true) {  // from sdnc util, prefix+'sdncResponseSuccess'
+                       execution.setVariable("CRENWKI_isSdncRollbackNeeded", true)
+                       utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+
+               } else {
+                       utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
+                       throw new BpmnError("MSOWorkflowException")
+               }
+
+       }
+
+
+       public void postProcessResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside postProcessResponse of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       // Display DB response: CRENWKI_createDBResponse / CRENWKI_dbReturnCode
+                       String dbReturnCode = execution.getVariable("CRENWKI_dbReturnCode")
+                       utils.log("DEBUG", " ***** DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+                       String createDBResponse =  execution.getVariable("CRENWKI_createDBResponse")
+                       utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + createDBResponse, isDebugEnabled)
+                       utils.logAudit(createDBResponse)
+
+                       String source = execution.getVariable("CRENWKI_source")
+                       String requestId = execution.getVariable("CRENWKI_requestId")
+
+                       String msoCompletionRequest =
+                               """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                               xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                               <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                                       <request-id>${requestId}</request-id>
+                                                       <action>CREATE</action>
+                                                       <source>${source}</source>
+                                               </request-info>
+                                               <aetgt:status-message>Network has been created successfully.</aetgt:status-message>
+                                               <aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
+                                       </aetgt:MsoCompletionRequest>"""
+
+                               // Format Response
+                               String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+                       if (execution.getVariable("CRENWKI_orchestrationStatus") != "ACTIVE") {
+                               // normal path
+                               if (dbReturnCode == "200") {
+                                       utils.logAudit(createDBResponse)
+                                       utils.logAudit(xmlMsoCompletionRequest)
+                                       execution.setVariable("CRENWKI_Success", true)
+                                       execution.setVariable("CRENWKI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+                                       utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+                               } else {
+                                       String errorMessage = " DB Update failed, code: " + dbReturnCode
+                                       utils.log("DEBUG", errorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+                               }
+
+                       } else {
+                               // silent Success path
+                               utils.logAudit(createDBResponse)
+                               utils.logAudit(xmlMsoCompletionRequest)
+                               execution.setVariable("CRENWKI_Success", true)
+                               execution.setVariable("CRENWKI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+                               utils.log("DEBUG", " Silent SUCCESS going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+                       }
+
+               } catch (BpmnError e) {
+               throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. postProcessResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+        }
+
+
+       }
+
+       public void prepareSDNCRollbackRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareSDNCRollbackRequest of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException.
+                       execution.setVariable("CRENWKI_WorkflowException", execution.getVariable("WorkflowException"))
+                       // get variables
+                       String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+                       String createNetworkInput = execution.getVariable("CRENWKI_networkRequest")
+                       String cloudRegionId = execution.getVariable("CRENWKI_cloudRegionSdnc")
+                       String assignSDNCResponse = execution.getVariable("CRENWKI_assignSDNCResponse")
+                       String networkId = utils.getNodeText1(assignSDNCResponse, "network-id")
+
+                       String serviceInstanceId = utils.getNodeText1(createNetworkInput, "service-instance-id")
+
+                       // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+                       String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null)
+                       String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
+                       execution.setVariable("CRENWKI_rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
+                       utils.log("DEBUG", " Preparing request for SDNC Topology assign's rollback/compensation . . . - " + "\n" +  sndcTopologyRollbackRequestAsString, isDebugEnabled)
+
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void validateRollbackResponses (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       // validate PO network rollback response
+                       String rollbackNetworkErrorMessages = ""
+                       Boolean isNetworkRollbackNeeded = execution.getVariable("CRENWKI_isNetworkRollbackNeeded")
+                       if (isNetworkRollbackNeeded == true) {
+                               utils.log("DEBUG", " NetworkRollback Code - " + execution.getVariable("CRENWKI_rollbackNetworkReturnCode"), isDebugEnabled)
+                               utils.log("DEBUG", " NetworkRollback Response - " + execution.getVariable("CRENWKI_rollbackNetworkResponse"), isDebugEnabled)
+
+                               String rollbackNetworkReturnCode = execution.getVariable("CRENWKI_rollbackNetworkReturnCode")
+                               String rollbackNetworkResponse = execution.getVariable("CRENWKI_rollbackNetworkResponse")
+                               if (rollbackNetworkReturnCode != "200") {
+                                       rollbackNetworkErrorMessages = " + PO Network rollback failed. "
+                               } else {
+                                       rollbackNetworkErrorMessages = " + PO Network rollback completed."
+                               }
+
+                       }
+
+                       // validate SDNC rollback response
+                       String rollbackSdncErrorMessages = ""
+                       Boolean isSdncRollbackNeeded = execution.getVariable("CRENWKI_isSdncRollbackNeeded")
+                       if (isSdncRollbackNeeded == true) {
+                               String rollbackSDNCReturnCode = execution.getVariable("CRENWKI_rollbackSDNCReturnCode")
+                               String rollbackSDNCReturnInnerCode = ""
+                               String rollbackSDNCResponse = execution.getVariable("CRENWKI_rollbackSDNCResponse")
+                               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+                               rollbackSDNCResponse = sdncAdapterUtils.decodeXML(rollbackSDNCResponse)
+                               rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+
+                               if (rollbackSDNCReturnCode == "200") {
+                                       if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+                                               rollbackSDNCReturnInnerCode = utils.getNodeText1(rollbackSDNCResponse, "response-code")
+                                               if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") {
+                                               rollbackSdncErrorMessages = " + SNDC rollback completed."
+                                               } else {
+                                                       rollbackSdncErrorMessages = " + SDNC rollback failed. "
+                                               }
+                                       } else {
+                                         rollbackSdncErrorMessages = " + SNDC rollback completed."
+                                       }
+                               } else {
+                                         rollbackSdncErrorMessages = " + SDNC rollback failed. "
+                               }
+
+                               utils.log("DEBUG", " SDNC rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled)
+                               utils.log("DEBUG", " SDNC rollback  Response - " + rollbackSDNCResponse, isDebugEnabled)
+
+                       }
+
+                       //WorkflowException wfe = execution.getVariable("WorkflowException")
+                       //String statusMessage = wfe.getErrorMessage()
+                       //int errorCode = wfe.getErrorCode()
+
+                       String statusMessage = ""
+                       int errorCode = 0
+                       WorkflowException wfe = execution.getVariable("WorkflowException")
+                       if (wfe instanceof WorkflowException) {
+                         statusMessage = wfe.getErrorMessage()
+                         errorCode = wfe.getErrorCode()
+                       } else {
+                          if (execution.getVariable("CRENWKI_WorkflowException") instanceof WorkflowException) {
+                                 // get saved WorkflowException
+                             WorkflowException swfe = execution.getVariable("CRENWKI_WorkflowException")
+                             statusMessage = swfe.getErrorMessage()
+                             errorCode =  swfe.getErrorCode()
+                          } else {
+                             statusMessage = "Encountered Error, please see previous tasks/activities/steps for error messages."
+                             errorCode = 7000
+                      }
+                       }
+
+                       // recreate WorkflowException to include the rollback Message
+                       statusMessage =  statusMessage + rollbackNetworkErrorMessages + rollbackSdncErrorMessages
+                       exceptionUtil.buildWorkflowException(execution, errorCode, statusMessage)
+
+               } catch (Exception ex) {
+                       execution.setVariable("WorkflowException", null)
+                       String exceptionMessage = " Bpmn error encountered in CreateNetworkInstanceInfra flow. validateRollbackResponses() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+
+
+       }
+
+       // *******************************
+       //     Build Error Section
+       // *******************************
+
+       // Prepare for FalloutHandler
+       public void buildErrorResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+               String dbReturnCode = execution.getVariable("CRENWKI_dbReturnCode")
+               utils.log("DEBUG", " ***** DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+               String createDBResponse =  execution.getVariable("CRENWKI_createDBResponse")
+               utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + createDBResponse, isDebugEnabled)
+               utils.logAudit(createDBResponse)
+
+               String falloutHandlerRequest = ""
+               String requestId = execution.getVariable("CRENWKI_requestId")
+               String source = execution.getVariable("CRENWKI_source")
+               try {
+                       execution.setVariable("CRENWKI_Success", false)
+                       WorkflowException wfe = execution.getVariable("WorkflowException")
+                       String errorCode = String.valueOf(wfe.getErrorCode())
+                       String errorMessage = wfe.getErrorMessage()
+                       falloutHandlerRequest =
+                           """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                             <request-id>${requestId}</request-id>
+                                             <action>CREATE</action>
+                                             <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+
+                       utils.logAudit(falloutHandlerRequest)
+                       execution.setVariable("CRENWKI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("DEBUG", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       String errorException = "  Bpmn error encountered in CreateNetworkInstanceInfra flow. FalloutHandlerRequest,  buildErrorResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", errorException, isDebugEnabled)
+                       falloutHandlerRequest =
+                       """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                             <request-id>${requestId}</request-id>
+                                             <action>CREATE</action>
+                                             <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+
+                       execution.setVariable("CRENWKI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("DEBUG", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               }
+
+       }
+
+
+       public void sendSyncError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+
+                       String requestId = execution.getVariable("att-mso-request-id")
+
+                       // REST Error (for API Handler (APIH) Reply Task)
+                       String syncError = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
+
+                       sendWorkflowResponse(execution, 500, syncError)
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", " Bpmn error encountered in CreateNetworkInstanceInfra flow. sendSyncError() - " + ex.getMessage(), isDebugEnabled)
+               }
+
+       }
+
+
+       public void processJavaException(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               try{
+                       utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+                       utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+                       utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+                       execution.setVariable("UnexpectedError", "Caught a Java Lang Exception")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+               }catch(BpmnError b){
+                       utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+                       execution.setVariable("UnexpectedError", "Exception in processJavaException method")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+               }
+               utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateServiceInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateServiceInstanceInfra.groovy
new file mode 100644 (file)
index 0000000..3c3bb81
--- /dev/null
@@ -0,0 +1,776 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>CreateServiceInstance.bpmn</class> process.
+ *
+ */
+public class CreateServiceInstanceInfra extends AbstractServiceTaskProcessor {
+
+       String Prefix="CRESI_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+       JsonUtils jsonUtil = new JsonUtils()
+       VidUtils vidUtils = new VidUtils()
+
+       /**
+        * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+        * @param execution
+        */
+       public InitializeProcessVariables(Execution execution){
+               /* Initialize all the process variables in this block */
+
+               execution.setVariable("CRESI_CreateServiceInstanceJasonRequest", "")
+               execution.setVariable("CRESI_globalSubscriberId", "")
+               execution.setVariable("CRESI_serviceInstanceName", "")
+               execution.setVariable("CRESI_newServiceInstanceId", "")
+               execution.setVariable("CRESI_messageId", "")
+               execution.setVariable("CRESI_requestId", "")
+
+               execution.setVariable("CRESI_queryAAIGlobalCustomerIdUrlRequest", "")
+               execution.setVariable("CRESI_queryAAIGlobalCustomerIdResponse", "")
+               execution.setVariable("CRESI_queryAAIGlobalCustomerIdCode", "")
+
+               execution.setVariable("CRESI_queryAAISINameUrlRequest", "")
+               execution.setVariable("CRESI_queryAAISINamePayloadRequest", "")
+               execution.setVariable("CRESI_queryAAISINameResponse", "")
+               execution.setVariable("CRESI_queryAAISINameCode", "")
+
+               execution.setVariable("CRESI_createSIinAAIUrlRequest", "")
+               execution.setVariable("CRESI_createSIinAAIPayloadRequest", "")
+               execution.setVariable("CRESI_createSIinAAIResponse", "")
+               execution.setVariable("CRESI_createSIinAAICode", "")
+
+               execution.setVariable("CRESI_createDBRequest", "")
+               execution.setVariable("CRESI_createDBResponse", "")
+               execution.setVariable("CRESI_createDBCode", "")
+
+               execution.setVariable("CRESI_createDBInfraErrorRequest", "")
+               execution.setVariable("CRESI_errorDBInfraErrorResponse", "")
+               execution.setVariable("CRESI_errorDBInfraErrorErrorCode", "")
+
+               execution.setVariable("CRESI_CompleteMsoProcessRequest", "")
+               execution.setVariable("CRESI_FalloutHandlerRequest", "")
+               execution.setVariable("CRESI_Success", false)
+               execution.setVariable("CRESI_unexpectedError", "")
+
+       }
+
+       // **************************************************
+       //     Pre or Prepare Request Section
+       // **************************************************
+       /**
+        * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+        * @param execution
+        */
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside preProcessRequest CreateServiceInstanceInfra Request ***** ", isDebugEnabled)
+
+               try {
+                       // initialize flow variables
+                       InitializeProcessVariables(execution)
+
+                       // check for incoming json message/input
+                       String createServiceInstanceIncoming = execution.getVariable("bpmnRequest")
+                       utils.logAudit(createServiceInstanceIncoming)
+                       execution.setVariable("CRESI_CreateServiceInstanceJasonRequest", createServiceInstanceIncoming);
+                       println 'createServiceInstanceIncoming - ' + createServiceInstanceIncoming
+
+                       // extract requestId
+                       String requestId = execution.getVariable("att-mso-request-id")
+                       execution.setVariable("CRESI_requestId", requestId)
+
+                       String serviceInstanceId = execution.getVariable("serviceInstanceId")
+                       execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+                       String requestAction = execution.getVariable("requestAction")
+                       execution.setVariable("requestAction", requestAction)
+
+                       String source = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.requestInfo.source")
+                       execution.setVariable("CRESI_source", source)
+
+                       // extract globalSubscriberId
+                       String globalSubscriberId = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.subscriberInfo.globalSubscriberId")
+
+                       // prepare messageId
+                       String messageId = execution.getVariable("CRESI_messageId")  // for testing
+                       if (messageId == null || messageId == "") {
+                               messageId = UUID.randomUUID()
+                               utils.log("DEBUG", " CRESI_messageId, random generated: " + messageId, isDebugEnabled)
+                       } else {
+                               utils.log("DEBUG", " CRESI_messageId, pre-assigned: " + messageId, isDebugEnabled)
+                       }
+                       execution.setVariable("CRESI_messageId", messageId)
+
+                       // verify element global-customer-id is sent from JSON input, throw exception if missing
+                       if ((globalSubscriberId == null) || (globalSubscriberId.isEmpty())) {
+                               String dataErrorMessage = " Element 'globalSubscriberId' is missing. "
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+               } else {
+                           execution.setVariable("CRESI_globalSubscriberId", globalSubscriberId)
+
+               }
+
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+                       String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                       logDebug('AAI namespace is: ' + aaiNamespace, isDebugEnabled)
+                       execution.setVariable("CRESI_aaiNamespace","${aaiNamespace}")
+
+                       String newServiceInstanceId = execution.getVariable("CRESI_testServiceInstanceId") // for testing variable
+                       if ((newServiceInstanceId) == null || (newServiceInstanceId.isEmpty())) {
+                               newServiceInstanceId = UUID.randomUUID().toString()
+                               utils.log("DEBUG", " Generated new Service Instance: " + newServiceInstanceId , isDebugEnabled)  // generated
+                       } else {
+                               utils.log("DEBUG", " Assigned new Service Instance: " + newServiceInstanceId , isDebugEnabled)
+                       }
+                       newServiceInstanceId = UriUtils.encode(newServiceInstanceId,"UTF-8")
+                       execution.setVariable("CRESI_newServiceInstanceId", newServiceInstanceId)
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex){
+                       String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+               }
+
+       }
+
+       public void sendSyncResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateServiceInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       String newServiceInstanceId = execution.getVariable("CRESI_newServiceInstanceId")
+                       String requestId = execution.getVariable("att-mso-request-id")
+
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       String syncResponse ="""{"requestReferences":{"instanceId":"${newServiceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+                       utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+                       sendWorkflowResponse(execution, 202, syncResponse)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+               }
+
+       }
+
+       public void callRESTQueryAAIGlobalSubscriberId (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAICustomer of CreateServiceInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String messageId = execution.getVariable("CRESI_requestId")
+                       String globalSubscriberId = execution.getVariable("CRESI_globalSubscriberId")
+                       globalSubscriberId = UriUtils.encode(globalSubscriberId,"UTF-8")
+
+                       // Prepare AA&I url with globalCustomerId
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+                       String queryAAISubscriberIdUrlRequest = "${aai_endpoint}${aai_uri}/${globalSubscriberId}"
+                       utils.logAudit(queryAAISubscriberIdUrlRequest)
+                       utils.log("DEBUG", " ***** AAI Query Subscriber Id Url: " + queryAAISubscriberIdUrlRequest, isDebugEnabled)
+                       execution.setVariable("CRESI_queryAAIGlobalCustomerIdUrlRequest", queryAAISubscriberIdUrlRequest)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+                                                               
+                       RESTConfig config = new RESTConfig(queryAAISubscriberIdUrlRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.get()
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("CRESI_queryAAIGlobalCustomerIdCode", returnCode)
+                       utils.log("DEBUG", " ***** AAI Query Customer Subscriber Id Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+                       execution.setVariable("CRESI_queryAAIGlobalCustomerIdResponse", aaiResponseAsString)
+                       utils.logAudit(aaiResponseAsString)
+
+                       if (returnCode=='200') {
+                               // Customer found by ID. FLow to proceed.
+                               utils.log("DEBUG", " CRESI_queryAAIGlobalCustomerIdResponse  : " + aaiResponseAsString, isDebugEnabled)
+
+                               //TODO
+                               //we might verify that service-subscription with matching name exists
+                               //and throw error if not. If not checked, we will get exception in subsequent step on Create call
+                               //in 1610 we assume both customer & service subscription were pre-created
+
+                       } else {
+                               if (returnCode=='404') {
+                                       String errorMessage = " Customer Global Id not found (404) in AAI, Global Subscriber id: " + globalSubscriberId
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+                               } else {
+                                       if (aaiResponseAsString.contains("RESTFault")) {
+                                               // build WorkflowException & throw new BpmnError("MSOWorkflowException")
+                                               WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                               execution.setVariable("WorkflowException", workflowException)
+                                               throw new BpmnError("MSOWorkflowException")
+
+                                       } else {
+                                               // aai all errors
+                                               String errorMessage = " Unexpected Error Response from AAI during callRESTQueryAAICustomerSubcriberId() - " + returnCode
+                                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+                                       }
+
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       // try error in method block
+                       String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error during method callRESTQueryAAICustomerSubcriberId() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+               }
+
+       }
+
+
+       public void callRESTQueryAAISIName (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAISIName of CreateServiceInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String messageId = execution.getVariable("CRESI_requestId")
+                       String globalSubscriberId = execution.getVariable("CRESI_globalSubscriberId")
+                       globalSubscriberId = UriUtils.encode(globalSubscriberId,"UTF-8")
+
+                       // extract serviceType
+                       String createServiceInstanceIncoming = execution.getVariable("CRESI_CreateServiceInstanceJasonRequest");
+                       String serviceInstanceName = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.requestInfo.instanceName")
+                       serviceInstanceName = UriUtils.encode(serviceInstanceName,'UTF-8')
+                       String serviceType = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.modelInfo.modelName")
+                       serviceType = UriUtils.encode(serviceType,'UTF-8')
+
+                       // Prepare AA&I url
+                       //String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
+
+                       // seach by service instance name
+
+                       // Currently not designed, but this would search for service-instance-name within realm of customer:
+                       // https://{serverURL}/aai/{version}/business/customers/customer/{globalCustID}/service-subscriptions/service-subscription/{serviceType}/service-instances?service-instance-name={serviceInstanceName}
+                       //search for service-instance-name globally:
+                       String queryAAISINameUrlRequest = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
+                       utils.log("DEBUG", " ***** AAI Query Service Name Url: " + queryAAISINameUrlRequest, isDebugEnabled)
+
+                       utils.logAudit(queryAAISINameUrlRequest)
+                       execution.setVariable("CRESI_queryAAISINameUrlRequest", queryAAISINameUrlRequest)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+                                                                       
+                       RESTConfig config = new RESTConfig(queryAAISINameUrlRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.get()
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("CRESI_queryAAISINameCode", returnCode)
+                       utils.log("DEBUG", " ***** AAI Query Service Instance Name Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+                       utils.log("DEBUG", " ***** AAI Query Service Instance Name Response : " +'\n'+ aaiResponseAsString, isDebugEnabled)
+
+                       if (returnCode=='200') {
+                               utils.logAudit(aaiResponseAsString)
+                               execution.setVariable("CRESI_queryAAISINameResponse", aaiResponseAsString)
+
+                               if ( (aaiResponseAsString != null) && (aaiResponseAsString.contains("service-instance")) ) {
+                                       // SI with same name was found
+                                       serviceInstanceName = UriUtils.decode(serviceInstanceName,'UTF-8')
+                                       String errorMessage = " Stopped creating Service Instance, already exists in AAI. Service instance name: " + serviceInstanceName
+                                       utils.log("DEBUG", errorMessage, isDebugEnabled)
+                                       exceptionUtil.buildWorkflowException(execution, 2500, errorMessage)
+                               } else {
+                                       utils.log("DEBUG", "AAI return code 200, but no content found matching ServiceInstance name", isDebugEnabled)
+                                       //Actual meaning is 404 Not Found
+                                       execution.setVariable("CRESI_queryAAISINameCode", '404')
+                               }
+
+                       } else {
+                           if (returnCode=='404') {
+                                       utils.log("DEBUG", " AAI Query return code = '404'. Proceed with the Create Service Instance !!! ", isDebugEnabled)
+
+                           } else {
+                                       if (aaiResponseAsString.contains("RESTFault")) {
+                                               // build WorkflowException
+                                               WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                               execution.setVariable("WorkflowException", workflowException)
+
+                                       } else {
+                                       // aai all errors
+                                               String errorMessage = " Unexpected Error Response from AAI  during callRESTQueryAAISIName() - " + returnCode
+                                               exceptionUtil.buildWorkflowException(execution, 2500, errorMessage)
+                                       }
+                     }
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception excp) {
+                       // try error for method block
+                       String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow in method callRESTQueryAAISIName(). Error was - " + excp.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTCreateServiceInstanceInAAI(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTCreateServiceInstanceInAAI of CreateServiceInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+
+                       // get variables
+                       String messageId = execution.getVariable("CRESI_messageId")
+                       String newServiceInstanceId = execution.getVariable("CRESI_newServiceInstanceId")
+
+                       String globalSubcriberId = execution.getVariable("CRESI_globalSubscriberId")
+                       globalSubcriberId = UriUtils.encode(globalSubcriberId,"UTF-8")
+
+                       // get variable within incoming json
+                       String createServiceInstanceIncoming = execution.getVariable("CRESI_CreateServiceInstanceJasonRequest");
+                       String serviceType = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.requestParameters.subscriptionServiceType")
+                       if (serviceType != null || serviceType != "") {
+                               serviceType = UriUtils.encode(serviceType,"UTF-8")
+                       }
+
+                       String personaModelId = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.modelInfo.modelInvariantId")
+                       String personaModelVersion = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.modelInfo.modelVersion")
+                       String workloadContext = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.modelInfo.workload-context")
+
+                       String serviceInstanceName = jsonUtil.getJsonValue(createServiceInstanceIncoming, "requestDetails.requestInfo.instanceName")
+
+                       // Prepare url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+                       String createServiceInstanceAAIUrlRequest = "${aai_endpoint}${aai_uri}/${globalSubcriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${newServiceInstanceId}"
+                       utils.log("DEBUG", " ***** AAI Create Service Instance Url: " + createServiceInstanceAAIUrlRequest, isDebugEnabled)
+
+                       utils.logAudit(createServiceInstanceAAIUrlRequest)
+                       execution.setVariable("CRESI_createSIinAAIUrlRequest", createServiceInstanceAAIUrlRequest)
+
+                       //Prepare payload (PUT)
+                       String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+
+                       String createServiceInstancePayload =
+                       """<service-instance xmlns="${execution.getVariable("CRESI_aaiNamespace")}">
+                               <service-instance-name>${serviceInstanceName}</service-instance-name>
+                               <persona-model-id>${personaModelId}</persona-model-id>
+                               <persona-model-version>${personaModelVersion}</persona-model-version>
+                               </service-instance>
+                               """.trim()
+
+                       utils.logAudit(createServiceInstancePayload)
+                       execution.setVariable("CRESI_createSIinAAIPayloadRequest", createServiceInstancePayload)
+                       utils.log("DEBUG", " 'payload' to create Service Instance in AAI - " + "\n" + createServiceInstancePayload, isDebugEnabled)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+                                                                       
+                       RESTConfig config = new RESTConfig(createServiceInstanceAAIUrlRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.httpPut(createServiceInstancePayload)
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("CRESI_createSIinAAICode", returnCode)
+                       utils.log("DEBUG", " ***** AAI Create Service Instance Response Code : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+                       utils.logAudit(aaiResponseAsString)
+
+                       if (returnCode.toInteger() > 199 && returnCode.toInteger() < 203) {
+                               //200 OK 201 CREATED 202 ACCEPTED
+                               utils.log("DEBUG", " AAI Create Service Instance Success REST Response.", isDebugEnabled)
+
+                       } else {
+                               if (returnCode=='404') {
+                                       String dataErrorMessage = " AAI Create Service Instance Failed, Error 404. Proposed new Create Instance Id was: " + newServiceInstanceId
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               } else {
+                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                          // build WorkflowException & throw new BpmnError("MSOWorkflowException")
+                                          WorkflowException workflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                          execution.setVariable("WorkflowException", workflowException)
+                                          throw new BpmnError("MSOWorkflowException")
+
+                                          } else {
+                                                       // aai all errors
+                                                       String dataErrorMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error during create call in AAI - " + returnCode
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+                                         }
+                               }
+                       }
+
+               } catch (BpmnError e) {
+               throw e;
+
+               } catch (Exception excep) {
+                       // try error in method block
+                       String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error from method callRESTCreateServiceInstanceInAAI() - " + excep.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       // *******************************
+       //     Build DB request Section
+       // *******************************
+       public void prepareDBRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       utils.log("DEBUG", " ***** Inside prepareDBRequest of CreateServiceInstanceInfra ***** ", isDebugEnabled)
+
+                       String requestId = execution.getVariable("CRESI_requestId")
+                       String statusMessage = "Service Instance successfully created."
+                       String serviceInstanceId = execution.getVariable("CRESI_newServiceInstanceId")
+
+                       //TODO - verify the format for Service Instance Create,
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>COMPLETED</requestStatus>
+                                                               <progress>100</progress>
+                                                               <vnfOutputs/>
+                                                               <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+                                                       </ns:updateInfraRequest>
+                                               </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+                  execution.setVariable("CRESI_createDBRequest", buildDeleteDBRequestAsString)
+                  utils.logAudit(buildDeleteDBRequestAsString)
+
+               } catch (Exception ex) {
+                       // try error in method block
+                       String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+
+       // *****************************************
+       //     Prepare Completion request Section
+       // *****************************************
+       public void postProcessResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside postProcessResponse of CreateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       // Display Success scenario for DB update Response:
+                       String dbReturnCode = execution.getVariable("CRESI_createDBCode")
+                       utils.log("DEBUG", " ***** Success DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+                       utils.log("DEBUG", " ***** Success DB Update Response String: " + '\n' + execution.getVariable("CRESI_createDBResponse"), isDebugEnabled)
+
+                       if (dbReturnCode == "200") {
+                               String source = execution.getVariable("CRESI_source")
+                               String requestId = execution.getVariable("CRESI_requestId")
+
+                               String msoCompletionRequest =
+                                       """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                                               <request-id>${requestId}</request-id>
+                                                               <action>CREATE</action>
+                                                               <source>${source}</source>
+                                                       </request-info>
+                                                       <aetgt:status-message>Service Instance has been created successfully.</aetgt:status-message>
+                                                       <aetgt:mso-bpel-name>BPMN Service Instance action: CREATE</aetgt:mso-bpel-name>
+                                               </aetgt:MsoCompletionRequest>"""
+
+                                       // Format Response
+                                       String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+                                       utils.logAudit(xmlMsoCompletionRequest)
+                                       execution.setVariable("CRESI_Success", true)
+                                       execution.setVariable("CRESI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+                                       utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+                       } else {
+                               String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error from DB adapter, return code: " + dbReturnCode
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, exceptionMessage)
+
+                       }
+
+               } catch (BpmnError e) {
+               throw e;
+
+               } catch (Exception ex) {
+                       // try error in method block
+                       String exceptionMessage = "Bpmn error encountered in CreateServiceInstance flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+
+       // *******************************
+       //     Build Error Section
+       // *******************************
+       public void prepareDBRequestError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareDBRequestError of CreateServiceInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       String requestId = execution.getVariable("CRESI_requestId")
+                       String statusMessage = ""
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               WorkflowException wfe = execution.getVariable("WorkflowException")
+                               statusMessage = wfe.getErrorMessage()
+
+                       } else {
+                               statusMessage = "Encountered Error during CreateServiceInstance proccessing. "
+                       }
+
+                       //TODO - verify the format for Service Instance Create,
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>FAILED</requestStatus>
+                                                               <vnfOutputs/>
+                                                       </ns:updateInfraRequest>
+                                               </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  String buildDBRequestAsString = utils.formatXml(dbRequest)
+                  execution.setVariable("CRESI_createDBInfraErrorRequest", buildDBRequestAsString)
+                  utils.logAudit(buildDBRequestAsString)
+
+               } catch (Exception ex) {
+                       // try error in method block
+                       String exceptionMessage = "Bpmn error encountered in CreateServiceInstanceInfra flow. Unexpected Error from method prepareDBRequestError() - " + ex.getMessage()
+                       exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+       // Prepare for FalloutHandler
+       public void buildErrorResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("ERROR", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+               String falloutHandlerRequest = ""
+               try {
+                       // Display Success scenario for DB update Response:
+                       String dbReturnCode = execution.getVariable("CRESI_errorDBInfraErrorErrorCode")
+                       utils.log("DEBUG", " ***** Error DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+                       utils.log("DEBUG", " ***** Error DB Update Response String: " + '\n' + execution.getVariable("CRESI_errorDBInfraErrorResponse"), isDebugEnabled)
+
+                       String requestId = execution.getVariable("CRESI_requestId")
+                       String source = execution.getVariable("CRESI_source")
+
+                       execution.setVariable("CRESI_Success", false)
+                       String errorMessage = ""
+                       String errorCode = ""
+
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               WorkflowException wfe = execution.getVariable("WorkflowException")
+                               errorMessage = wfe.getErrorMessage()
+                               errorCode = wfe.getErrorCode().toString()
+
+                       } else {
+                               errorMessage = "Bpmn error encountered in CreateServiceInstance flow."
+                               errorCode = "2500"
+
+                       }
+
+                       falloutHandlerRequest =
+                               """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                             <request-id>${requestId}</request-id>
+                                             <action>CREATE</action>
+                                             <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+
+                       utils.logAudit(falloutHandlerRequest)
+                       execution.setVariable("CRESI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("ERROR", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       // rebuild workflow exception
+                       String requestId = execution.getVariable("CRESI_requestId")
+                       String source = execution.getVariable("CRESI_source")
+                       String errorException = " Build Error Response exception encountered during method buildErrorResponse(), preparing request for FalloutHandler: - " + ex.getMessage()
+                       utils.log("DEBUG", errorException, isDebugEnabled)
+                       falloutHandlerRequest =
+                       """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                             <request-id>${requestId}</request-id>
+                                             <action>CREATE</action>
+                                             <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+                       execution.setVariable("CRESI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("ERROR", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               }
+
+       }
+
+       public void sendSyncError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside sendSyncError() of CreateServiceInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       String errorMessage = ""
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               WorkflowException wfe = execution.getVariable("WorkflowException")
+                               errorMessage = wfe.getErrorMessage()
+                       } else {
+                               errorMessage = "Sending Sync Error."
+                       }
+
+                       String buildworkflowException =
+                               """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                       <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+                                  </aetgt:WorkflowException>"""
+
+                       utils.logAudit(buildworkflowException)
+                       sendWorkflowResponse(execution, 500, buildworkflowException)
+
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+               }
+
+       }
+
+       public void processJavaException(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               try{
+                       utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+                       utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+                       utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+                       execution.setVariable("CRESI_unexpectedError", "Caught a Java Lang Exception")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+               }catch(BpmnError b){
+                       utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+                       execution.setVariable("CRESI_unexpectedError", "Exception in processJavaException method")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+               }
+               utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+       }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleInfra.groovy
new file mode 100644 (file)
index 0000000..fa80c76
--- /dev/null
@@ -0,0 +1,428 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import groovy.json.JsonSlurper
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
+
+       /**
+        * Validates the request message and sets up the workflow.
+        * @param execution the execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def prefix = 'CVFMI_'
+               logDebug('Entered 1' + method, isDebugLogEnabled)
+               execution.setVariable('prefix', prefix)
+               logDebug('Entered 2' + method, isDebugLogEnabled)
+               execution.setVariable("isVidRequest", "false")
+
+               logDebug("Set variables", isDebugLogEnabled)
+
+               def rollbackData = execution.getVariable("RollbackData")
+               if (rollbackData == null) {
+                       rollbackData = new RollbackData()
+               }
+               execution.setVariable("RollbackData", rollbackData)
+
+               logDebug("Set rollback data", isDebugLogEnabled)
+               def incomingRequest = execution.getVariable('bpmnRequest')
+
+               utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled)
+
+               // check if request is xml or json
+               try {
+                       def jsonSlurper = new JsonSlurper()
+                       Map reqMap = jsonSlurper.parseText(incomingRequest)
+                       utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
+
+                       def serviceInstanceId = execution.getVariable('serviceInstanceId')
+                       def vnfId = execution.getVariable('vnfId')
+
+                       def vidUtils = new VidUtils(this)
+
+                       String requestInXmlFormat = vidUtils.createXmlVfModuleRequest(execution, reqMap, 'CREATE_VF_MODULE', serviceInstanceId)
+
+                       utils.log("DEBUG", " Request in XML format: " + requestInXmlFormat, isDebugLogEnabled)
+
+                       execution.setVariable(prefix + 'Request', requestInXmlFormat)
+                       execution.setVariable(prefix+'vnfId', vnfId)
+                       execution.setVariable("isVidRequest", "true")
+
+               }
+               catch(groovy.json.JsonException je) {
+                       utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
+                       workflowException(execution, "Invalid request format", 400)
+
+               }
+               catch(Exception e) {
+                       String restFaultMessage = e.getMessage()
+                       //execution.setVariable("CVFMODVOL2_RESTFault", restFaultMessage)
+                       //execution.setVariable("CVFMODVOL2_isDataOk", false)
+                       utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
+                       workflowException(execution, restFaultMessage, 400)
+               }
+
+               try {
+                       String request = validateInfraRequest(execution)
+
+                       execution.setVariable("CreateVfModuleInfraSuccessIndicator", false)
+                       execution.setVariable("RollbackCompleted", false)
+                       execution.setVariable("DoCreateVfModuleRequest", request)
+                       execution.setVariable("isDebugLogEnabled", isDebugLogEnabled)
+                       execution.setVariable("CVFMI_requestInfo",utils.getNodeXml(request,"request-info"))
+                       execution.setVariable("CVFMI_requestId",utils.getNodeText1(request,"request-id"))
+                       execution.setVariable("CVFMI_source",utils.getNodeText1(request,"source"))
+                       execution.setVariable("CVFMI_serviceInstanceId", utils.getNodeText1(request, "service-instance-id"))
+                       execution.setVariable("CVFMI_vnfInputs",utils.getNodeXml(request,"vnf-inputs"))
+                       //backoutOnFailure
+
+                       NetworkUtils networkUtils = new NetworkUtils()
+                       execution.setVariable("CVFMI_rollbackEnabled", networkUtils.isRollbackEnabled(execution,request))
+                       execution.setVariable("CVFMI_originalWorkflowException", null)
+                       def vnfParams = ""
+                       if (utils.nodeExists(request, "vnf-params")) {
+                               vnfParams = utils.getNodeXml(request,"vnf-params")
+                       }
+                       execution.setVariable("CVFMI_vnfParams", vnfParams)
+
+                       def newVfModuleId = UUID.randomUUID().toString()
+                       execution.setVariable("newVfModuleId", newVfModuleId)
+
+                       logDebug('RequestInfo: ' + execution.getVariable("CVFMI_requestInfo"), isDebugLogEnabled)
+                       logDebug('VnfInputs: ' + execution.getVariable("CVFMI_vnfInputs"), isDebugLogEnabled)
+                       logDebug('VnfParams: ' + execution.getVariable("CVFMI_vnfParams"), isDebugLogEnabled)
+                       logDebug('rollbackEnabled: ' + execution.getVariable("CVFMI_rollbackEnabled"), isDebugLogEnabled)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError bpmnError) {
+                       buildErrorResponse(execution,bpmnError.getMessage(),"400")
+                       throw bpmnError
+               } catch (Exception exception) {
+                       workflowException(execution, exception.getMessage(), 400)
+               }
+       }
+
+       /**
+        * Validates a workflow response.
+        * @param execution the execution
+        * @param responseVar the execution variable in which the response is stored
+        * @param responseCodeVar the execution variable in which the response code is stored
+        * @param errorResponseVar the execution variable in which the error response is stored
+        */
+       public void validateWorkflowResponse(Execution execution, String responseVar,
+                       String responseCodeVar, String errorResponseVar) {
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
+       }
+
+
+       /**
+        * Sends the empty, synchronous response back to the API Handler.
+        * @param execution the execution
+        */
+       public void sendResponse(Execution execution) {
+               def method = getClass().getSimpleName() + '.sendResponse(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestInfo = execution.getVariable('CVFMI_requestInfo')
+                       def requestId = execution.getVariable('CVFMI_requestId')
+                       def source = execution.getVariable('CVFMI_source')
+                       def progress = getNodeTextForce(requestInfo, 'progress')
+                       if (progress.isEmpty()) {
+                               progress = '0'
+                       }
+                       def startTime = getNodeTextForce(requestInfo, 'start-time')
+                       if (startTime.isEmpty()) {
+                               startTime = System.currentTimeMillis()
+                       }
+
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       def newVfModuleId = execution.getVariable("newVfModuleId")
+                       String synchResponse = """{"requestReferences":{"instanceId":"${newVfModuleId}","requestId":"${requestId}"}}""".trim()
+
+                       sendWorkflowResponse(execution, 200, synchResponse)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        *
+        * @param execution the execution
+        */
+       public void postProcessResponse(Execution execution){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+               utils.log("DEBUG", " ======== STARTED PostProcessResponse Process ======== ", isDebugEnabled)
+               try{
+                       def request = execution.getVariable("DoCreateVfModuleRequest")
+                       def requestInfo = utils.getNodeXml(request, 'request-info', false)
+                       def action = utils.getNodeText1(requestInfo, "action")
+
+                       utils.log("DEBUG", "requestInfo is: " + requestInfo, isDebugEnabled)
+                       utils.log("DEBUG", "action is: " + action, isDebugEnabled)
+
+                       String payload =
+                                       """  <aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                               xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                               xmlns:ns8="http://ecomp.att.com/mso/workflow/schema/v1">
+                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                       ${requestInfo}
+                       </request-info>
+                       <ns8:status-message>Vf Module has been created successfully.</ns8:status-message>
+                       <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>
+                       </aetgt:MsoCompletionRequest>"""
+
+                       payload = utils.formatXml(payload)
+                       execution.setVariable("CVFMI_SuccessFlag", true)
+                       execution.setVariable("CVFMI_msoCompletionRequest", payload)
+                       utils.log("DEBUG", "Outgoing MsoCompletionRequest: \n" + payload, isDebugEnabled)
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing PostProcessResponse. Exception is:\n" + e, isDebugEnabled)
+                       execution.setVariable("CVFMI_ErrorResponse", "Error Occured during PostProcessResponse Method:\n" + e.getMessage())
+               }
+               utils.log("DEBUG", "======== COMPLETED PostProcessResponse Process ======== ", isDebugEnabled)
+       }
+
+
+
+
+
+       /**
+        * Validates the request, request id and service instance id.  If a problem is found,
+        * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+        * method also sets up the log context for the workflow.
+        * @param execution the execution
+        * @return the validated request
+        */
+       public String validateInfraRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String processKey = getProcessKey(execution);
+               def prefix = execution.getVariable("prefix")
+
+               if (prefix == null) {
+                       createWorkflowException(execution, 1002, processKey + " prefix is null")
+               }
+
+               try {
+                       def request = execution.getVariable(prefix + 'Request')
+
+                       if (request == null) {
+                               request = execution.getVariable(processKey + 'Request')
+
+                               if (request == null) {
+                                       request = execution.getVariable('bpmnRequest')
+                               }
+
+                               setVariable(execution, processKey + 'Request', null);
+                               setVariable(execution, 'bpmnRequest', null);
+                               setVariable(execution, prefix + 'Request', request);
+                       }
+
+                       if (request == null) {
+                               createWorkflowException(execution, 1002, processKey + " request is null")
+                       }
+
+                       /*
+
+                       def requestId = execution.getVariable("att-mso-request-id")
+
+                       if (requestId == null) {
+                               createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+                       }
+
+                       setVariable(execution, prefix + 'requestId', requestId)
+
+                       def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+                       if (serviceInstanceId == null) {
+                               createWorkflowException(execution, 1002, processKey + " request message has no att-mso-service-instance-id")
+                       }
+
+                       utils.logContext(requestId, serviceInstanceId)
+                       */
+                       logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+                       return request
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, "Invalid Message")
+               }
+       }
+
+       public void prepareUpdateInfraRequest(Execution execution){
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+               utils.log("DEBUG", " ======== STARTED prepareUpdateInfraRequest Process ======== ", isDebugEnabled)
+               try{
+
+                       String vnfInputs = execution.getVariable("CVFMI_vnfInputs")
+                       String requestInfo = execution.getVariable("CVFMI_requestInfo")
+                       def aicCloudRegion      = utils.getNodeText1(vnfInputs, "aic-cloud-region")
+                       def tenantId = utils.getNodeText1(vnfInputs, "tenant-id")
+                       def requestId = utils.getNodeText1(requestInfo, "request-id")
+                       def vnfId = execution.getVariable("CVFMI_vnfId")
+                       def vfModuleId = execution.getVariable("CVFMI_vfModuleId")
+
+                       def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_db_endpoint")
+                       execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+                       utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
+
+                       String payload =
+                               """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                                               xmlns:ns="http://com.att.mso/requestsdb">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                       <requestId>${requestId}</requestId>
+                                                       <lastModifiedBy>BPMN</lastModifiedBy>
+                                                       <statusMessage>VF Module successfully created</statusMessage>
+                                                       <responseBody></responseBody>
+                                                       <requestStatus>COMPLETE</requestStatus>
+                                                       <progress>100</progress>
+                                                       <vnfOutputs>&lt;vnf-outputs xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:aetgt="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"&gt;&lt;vnf-id&gt;${vnfId}&lt;/vnf-id&gt;&lt;vf-module-id&gt;${vfModuleId}&lt;/vf-module-id&gt;&lt;/vnf-outputs&gt;</vnfOutputs>
+                                                       <vfModuleId>${vfModuleId}</vfModuleId>
+                                               </ns:updateInfraRequest>
+                                       </soapenv:Body>
+                               </soapenv:Envelope>"""
+
+                       payload = utils.formatXml(payload)
+                       execution.setVariable("CVFMI_updateInfraRequest", payload)
+                       utils.log("DEBUG", "Outgoing UpdateInfraRequest: \n" + payload, isDebugEnabled)
+
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing prepareUpdateInfraRequest. Exception is:\n" + e, isDebugEnabled)
+                       execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareUpdateInfraRequest Method:\n" + e.getMessage())
+               }
+               utils.log("DEBUG", "======== COMPLETED prepareUpdateInfraRequest Process ======== ", isDebugEnabled)
+       }
+
+       /**
+        * Builds a "FalloutHandler" request and stores it in the specified execution variable.
+        *
+        * @param execution the execution
+        * @param resultVar the execution variable in which the result will be stored
+        */
+       public void falloutHandlerPrep(Execution execution, String resultVar) {
+               def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+                       'execution=' + execution.getId() +
+                       ', resultVar=' + resultVar +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+
+               try {
+                       def WorkflowException workflowException = execution.getVariable("WorkflowException")
+                       def request = execution.getVariable("DoCreateVfModuleRequest")
+                       def requestInformation = utils.getNodeXml(request, 'request-info', false)
+                       def errorResponseCode = workflowException.getErrorCode()
+                       def errorResponseMsg = workflowException.getErrorMessage()
+                       def encErrorResponseMsg = ""
+                       if (errorResponseMsg != null) {
+                               encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+                       }
+
+                       String content = """
+                               <aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1"
+                                               xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
+                                               xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
+                                               ${requestInformation}
+                                       <aetgt:WorkflowException>
+                                               <aetgt:ErrorMessage>${encErrorResponseMsg}</aetgt:ErrorMessage>
+                                               <aetgt:ErrorCode>${errorResponseCode}</aetgt:ErrorCode>
+                                       </aetgt:WorkflowException>
+                               </aetgt:FalloutHandlerRequest>
+                       """
+
+                       logDebug("CONTENT before translation: " + content, isDebugLogEnabled)
+                       content = utils.formatXml(content)
+                       logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+                       execution.setVariable(resultVar, content)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 2000, 'Internal Error')
+               }
+       }
+
+       public void logAndSaveOriginalException(Execution execution) {
+               def method = getClass().getSimpleName() + '.validateRollbackResponse(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logWorkflowException(execution, 'CreateVfModuleInfra caught an event')
+               saveWorkflowException(execution, 'CVFMI_originalWorkflowException')
+       }
+
+       public void validateRollbackResponse(Execution execution) {
+               def method = getClass().getSimpleName() + '.validateRollbackResponse(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def originalException = execution.getVariable("CVFMI_originalWorkflowException")
+               execution.setVariable("WorkflowException", originalException)
+
+               execution.setVariable("RollbackCompleted", true)
+
+       }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVfModuleVolumeInfraV1.groovy
new file mode 100644 (file)
index 0000000..672bb34
--- /dev/null
@@ -0,0 +1,285 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import groovy.json.JsonSlurper
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.lang3.*
+
+class CreateVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+
+       public static final String  prefix='CVMVINFRAV1_'
+
+       /**
+        * Perform initial processing, such as request validation, initialization of variables, etc.
+        * * @param execution
+        */
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               preProcessRequest(execution, isDebugEnabled)
+       }
+
+
+       /**
+        * Perform initial processing, such as request validation, initialization of variables, etc.
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void preProcessRequest (Execution execution, isDebugEnabled) {
+
+               execution.setVariable("prefix",prefix)
+               setSuccessIndicator(execution, false)
+               execution.setVariable(prefix+'syncResponseSent', false)
+
+               String createVolumeIncoming = validateRequest(execution, 'vnfId')
+               utils.logAudit(createVolumeIncoming)
+
+               try {
+                       def jsonSlurper = new JsonSlurper()
+                       Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+
+                       def serviceInstanceId = execution.getVariable('serviceInstanceId')
+                       def vnfId = execution.getVariable('vnfId')
+
+                       def vidUtils = new VidUtils(this)
+                       createVolumeIncoming = vidUtils.createXmlVolumeRequest(reqMap, 'CREATE_VF_MODULE_VOL', serviceInstanceId)
+
+                       execution.setVariable(prefix+'Request', createVolumeIncoming)
+                       execution.setVariable(prefix+'vnfId', vnfId)
+                       execution.setVariable(prefix+'isVidRequest', true)
+
+                       utils.log("DEBUG", "XML request:\n" + createVolumeIncoming, isDebugEnabled)
+
+               }
+               catch(groovy.json.JsonException je) {
+                       (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'Request is not a valid JSON document')
+               }
+
+               execution.setVariable(prefix+'source', utils.getNodeText1(createVolumeIncoming, "source"))
+               execution.setVariable(prefix+'volumeGroupName', utils.getNodeText1(createVolumeIncoming, 'volume-group-name'))
+               execution.setVariable(prefix+'volumeOutputs', utils.getNodeXml(createVolumeIncoming, 'volume-outputs', false))
+
+               execution.setVariable(prefix+'serviceType', 'service-instance')
+               execution.setVariable(prefix+'serviceInstanceId', utils.getNodeText1(createVolumeIncoming, "service-instance-id"))
+
+               // Generate volume group id
+               String volumeGroupId = UUID.randomUUID()
+               utils.log("DEBUG", "Generated volume group id: " + volumeGroupId, isDebugEnabled)
+
+               def testGroupId = execution.getVariable('test-volume-group-id')
+               if (testGroupId != null && testGroupId.trim() != '') {
+                       volumeGroupId = testGroupId
+               }
+
+               execution.setVariable(prefix+'volumeGroupId', volumeGroupId)
+
+       }
+
+
+       public void sendSyncResponse (Execution execution, isDebugEnabled) {
+               def volumeGroupId = execution.getVariable(prefix+'volumeGroupId')
+               def requestId = execution.getVariable("att-mso-request-id")
+               def serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+               String syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+
+               utils.log("DEBUG", "Sync Response: " + "\n" + syncResponse, isDebugEnabled)
+               sendWorkflowResponse(execution, 200, syncResponse)
+
+               execution.setVariable(prefix+'syncResponseSent', true)
+       }
+
+
+       public void sendSyncError (Execution execution, isDebugEnabled) {
+               WorkflowException we = execution.getVariable('WorkflowException')
+               def errorCode = we?.getErrorCode()
+               def errorMessage = we?.getErrorMessage()
+               //default to 400 since only invalid request will trigger this method
+               sendWorkflowResponse(execution, 400, errorMessage)
+       }
+
+
+       /**
+        * Create a WorkflowException
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void buildWorkflowException(Execution execution, int errorCode, errorMessage, isDebugEnabled) {
+               utils.log("DEBUG", errorMessage, isDebugEnabled)
+               (new ExceptionUtil()).buildWorkflowException(execution, 2500, errorMessage)
+       }
+
+
+       public void prepareDbInfraSuccessRequest(Execution execution, isDebugEnabled) {
+               def dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
+               def requestId = execution.getVariable('att-mso-request-id')
+               def statusMessage = "VolumeGroup successfully created."
+               def requestStatus = "COMPLETED"
+               def progress = "100"
+
+               /*
+               from: $gVolumeGroup/aai:volume-group-id/text()
+               to: vnfreq:volume-outputs/vnfreq:volume-group-id
+               */
+               // for now assume, generated volumeGroupId is accepted
+               def volumeGroupId = execution.getVariable(prefix+'volumeGroupId')
+
+               String dbRequest =
+                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                               <soapenv:Header/>
+                               <soapenv:Body>
+                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                               <requestId>${requestId}</requestId>
+                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                               <statusMessage>${statusMessage}</statusMessage>
+                                               <responseBody></responseBody>
+                                               <requestStatus>${requestStatus}</requestStatus>
+                                               <progress>${progress}</progress>
+                                               <vnfOutputs>${dbVnfOutputs}</vnfOutputs>
+                                               <volumeGroupId>${volumeGroupId}</volumeGroupId>
+                                       </ns:updateInfraRequest>
+                               </soapenv:Body>
+                          </soapenv:Envelope>"""
+
+               String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+               execution.setVariable(prefix+"createDBRequest", buildDeleteDBRequestAsString)
+
+               utils.logAudit(buildDeleteDBRequestAsString)
+       }
+
+
+
+
+
+       public void postProcessResponse (Execution execution, isDebugEnabled) {
+
+               def dbReturnCode = execution.getVariable(prefix+'dbReturnCode')
+               def createDBResponse =  execution.getVariable(prefix+'createDBResponse')
+
+               utils.logAudit('DB return code: ' + dbReturnCode)
+               utils.logAudit('DB response: ' + createDBResponse)
+
+               def requestId = execution.getVariable("att-mso-request-id")
+               def source = execution.getVariable(prefix+'source')
+
+               String msoCompletionRequest =
+                       """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                               <request-id>${requestId}</request-id>
+                                               <action>CREATE</action>
+                                               <source>${source}</source>
+                                       </request-info>
+                                       <aetgt:status-message>Volume Group has been created successfully.</aetgt:status-message>
+                                       <aetgt:mso-bpel-name>BPMN VF Module Volume action: CREATE</aetgt:mso-bpel-name>
+                               </aetgt:MsoCompletionRequest>"""
+
+               String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+               utils.logAudit(createDBResponse)
+               utils.logAudit(xmlMsoCompletionRequest)
+               execution.setVariable(prefix+'Success', true)
+               execution.setVariable(prefix+'CompleteMsoProcessRequest', xmlMsoCompletionRequest)
+               utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+       }
+
+       public void prepareFalloutHandlerRequest(Execution execution, isDebugEnabled) {
+
+               WorkflowException we = execution.getVariable('WorkflowException')
+               def errorCode = we?.getErrorCode()
+               def errorMessage = we?.getErrorMessage()
+
+               def requestId = execution.getVariable("att-mso-request-id")
+               def source = execution.getVariable(prefix+'source')
+
+               String falloutHandlerRequest =
+                       """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                            xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                            xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                  <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                     <request-id>${requestId}</request-id>
+                                     <action>CREATE</action>
+                                     <source>${source}</source>
+                                  </request-info>
+                                          <aetgt:WorkflowException>
+                                             <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                             <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+
+                               </aetgt:FalloutHandlerRequest>"""
+
+               // Format Response
+               String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
+               utils.logAudit(xmlHandlerRequest)
+
+               execution.setVariable(prefix+'FalloutHandlerRequest', xmlHandlerRequest)
+               utils.log("ERROR", "Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled)
+       }
+
+
+       /**
+        * Query AAI service instance
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void callRESTQueryAAIServiceInstance(Execution execution, isDebugEnabled) {
+
+               def request = execution.getVariable(prefix+"Request")
+               def serviceInstanceId = utils.getNodeText1(request, "service-instance-id")
+
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getSearchNodesQueryEndpoint(execution)
+
+               def String queryAAIRequest = aaiEndpoint + "?search-node-type=service-instance&filter=service-instance-id:EQUALS:" + serviceInstanceId
+               utils.logAudit("AAI query service instance request: " + queryAAIRequest)
+
+               APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+               utils.logAudit("AAI query service instance return code: " + returnCode)
+               utils.logAudit("AAI query service instance response: " + aaiResponseAsString)
+
+               utils.log("DEBUG", "AAI query service instance return code: " + returnCode, isDebugEnabled)
+               utils.log("DEBUG", "AAI query service instance response: " + aaiResponseAsString, isDebugEnabled)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+               if (returnCode=='200') {
+                       utils.log("DEBUG", 'Service instance ' + serviceInstanceId + ' found in AAI.', isDebugEnabled)
+               } else {
+                       if (returnCode=='404') {
+                               def message = 'Service instance ' + serviceInstanceId + ' was not found in AAI. Return code: 404.'
+                               utils.log("DEBUG", message, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+                       } else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/CreateVnfInfra.groovy
new file mode 100644 (file)
index 0000000..05537ad
--- /dev/null
@@ -0,0 +1,326 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+
+
+/**
+ * This class supports the CreateVnfInfra Flow
+ * with the creation of a generic vnf for
+ * infrastructure.
+ */
+class CreateVnfInfra extends AbstractServiceTaskProcessor {
+
+       String Prefix="CREVI_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+       JsonUtils jsonUtil = new JsonUtils()
+       VidUtils vidUtils = new VidUtils(this)
+
+       /**
+        * This method gets and validates the incoming
+        * request.
+        *
+        * @param - execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED CreateVnfInfra PreProcessRequest Process*** ", isDebugEnabled)
+
+               execution.setVariable("CREVI_sentSyncResponse", false)
+
+               try{
+                       // Get Variables
+                       String createVnfRequest = execution.getVariable("bpmnRequest")
+                       execution.setVariable("CREVI_createVnfRequest", createVnfRequest)
+                       utils.logAudit("Incoming CreateVnfInfra Request is: \n" + createVnfRequest)
+
+                       if(createVnfRequest != null){
+
+                               String requestId = execution.getVariable("att-mso-request-id")
+                               execution.setVariable("CREVI_requestId", requestId)
+                               utils.log("DEBUG", "Incoming Request Id is: " + requestId, isDebugEnabled)
+
+                               String serviceInstanceId = execution.getVariable("serviceInstanceId")
+                               execution.setVariable("CREVI_serviceInstanceId", serviceInstanceId)
+                               utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+                               String vnfType = execution.getVariable("vnfType")
+                               execution.setVariable("CREVI_vnfType", vnfType)
+                               utils.log("DEBUG", "Incoming Vnf Type is: " + vnfType, isDebugEnabled)
+
+                               String vnfName = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.instanceName")
+                               execution.setVariable("CREVI_vnfName", vnfName)
+                               utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+                               String serviceId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.productFamilyId")
+                               execution.setVariable("CREVI_serviceId", serviceId)
+                               utils.log("DEBUG", "Incoming Service Id is: " + serviceId, isDebugEnabled)
+
+                               String source = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.source")
+                               execution.setVariable("CREVI_source", source)
+                               utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+                               String suppressRollback = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.requestInfo.suppressRollback")
+                               execution.setVariable("CREVI_suppressRollback", suppressRollback)
+                               utils.log("DEBUG", "Incoming Suppress Rollback is: " + suppressRollback, isDebugEnabled)
+
+                               String modelInvariantId = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelInvariantId")
+                               execution.setVariable("CREVI_modelInvariantId", modelInvariantId)
+                               utils.log("DEBUG", "Incoming Invariant Id is: " + modelInvariantId, isDebugEnabled)
+
+                               String modelVersion = jsonUtil.getJsonValue(createVnfRequest, "requestDetails.modelInfo.modelVersion")
+                               execution.setVariable("CREVI_modelVersion", modelVersion)
+                               utils.log("DEBUG", "Incoming Model Version is: " + modelVersion, isDebugEnabled)
+
+                               //For Completion Handler & Fallout Handler
+                               String requestInfo =
+                               """<request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                       <request-id>${requestId}</request-id>
+                                       <action>CREATE</action>
+                                       <source>${source}</source>
+                                  </request-info>"""
+
+                               execution.setVariable("CREVI_requestInfo", requestInfo)
+
+                               //TODO: Orch Status - TBD, will come from SDN-C Response in 1702
+                               String orchStatus = "Created"
+                               execution.setVariable("CREVI_orchStatus", orchStatus)
+
+                               //TODO: Equipment Role - Should come from SDN-C Response in 1702
+                               String equipmentRole = " "
+                               execution.setVariable("CREVI_equipmentRole", equipmentRole)
+
+                               String vnfId = execution.getVariable("testVnfId") // for junits
+                               if(isBlank(vnfId)){
+                                       vnfId = UUID.randomUUID().toString()
+                                       utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+                               }
+                               execution.setVariable("CREVI_vnfId", vnfId)
+
+                               // Setting for Sub Flow Calls
+                               execution.setVariable("CREVI_type", "generic-vnf")
+                               execution.setVariable("GENGS_type", "service-instance")
+
+                       }else{
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Bpmn Request is Null.")
+                       }
+
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", " Error Occured in CreateVnfInfra PreProcessRequest method!" + e.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PreProcessRequest")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PreProcessRequest Process ***", isDebugEnabled)
+       }
+
+       public void sendSyncResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " *** STARTED CreateVnfInfra SendSyncResponse Process *** ", isDebugEnabled)
+
+               try {
+                       String requestId = execution.getVariable("CREVI_requestId")
+                       String vnfId = execution.getVariable("CREVI_vnfId")
+
+                       String createVnfResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+                       utils.log("DEBUG", " CreateVnfInfra Sync Response is: \n"  + createVnfResponse, isDebugEnabled)
+
+                       sendWorkflowResponse(execution, 202, createVnfResponse)
+
+                       execution.setVariable("CREVI_sentSyncResponse", true)
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", "Error Occured in CreateVnfInfra SendSyncResponse Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra SendSyncResponse Process")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED CreateVnfInfra SendSyncResponse Process ***", isDebugEnabled)
+       }
+
+       public void prepareCreateGenericVnf (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " *** STARTED CreateVnfInfra PrepareCreateGenericVnf Process *** ", isDebugEnabled)
+               try {
+                       //Get Vnf Info
+                       String vnfId = execution.getVariable("CREVI_vnfId")
+                       def vnfName = execution.getVariable("CREVI_vnfName")
+                       def vnfType = execution.getVariable("CREVI_vnfType")
+                       def serviceId = execution.getVariable("CREVI_serviceId")
+                       def orchStatus = execution.getVariable("CREVI_orchStatus")
+                       def modelInvariantId = execution.getVariable("CREVI_modelInvariantId")
+                       def modelVersion = execution.getVariable("CREVI_modelVersion")
+                       // TODO: 1702 Variable
+                       def equipmentRole = execution.getVariable("CREVI_equipmentRole")
+
+                       //Get Service Instance Info
+                       def serviceInstanceId = execution.getVariable("CREVI_serviceInstanceId")
+                       String siRelatedLink = execution.getVariable("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)
+
+                       //Get Namespace
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       def aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+                       String namespace = aaiUtil.getNamespaceFromUri(aai_uri)
+
+                       String payload =
+                                       """<generic-vnf xmlns="${namespace}">
+                               <vnf-id>${vnfId}</vnf-id>
+                               <vnf-name>${vnfName}</vnf-name>
+                               <service-id>${serviceId}</service-id>
+                               <vnf-type>${vnfType}</vnf-type>
+                               <orchestration-status>${orchStatus}</orchestration-status>
+                               <persona-model-id>${modelInvariantId}</persona-model-id>
+                               <persona-model-version>${modelVersion}</persona-model-version>
+                               <relationship-list>
+                                       <relationship>
+                               <related-to>service-instance</related-to>
+                               <related-link>${siRelatedLink}</related-link>
+                               <relationship-data>
+                               <relationship-key>customer.global-customer-id</relationship-key>
+                               <relationship-value>${globalCustId}</relationship-value>
+                       </relationship-data>
+                               <relationship-data>
+                               <relationship-key>service-subscription.service-type</relationship-key>
+                               <relationship-value>${serviceType}</relationship-value>
+                               </relationship-data>
+                                       <relationship-data>
+                               <relationship-key>service-instance.service-instance-id</relationship-key>
+                               <relationship-value>${serviceInstanceId}</relationship-value>
+                               </relationship-data>
+                       </relationship>
+                               </relationship-list>
+                       </generic-vnf>"""
+
+                       execution.setVariable("CREVI_genericVnfPayload", payload)
+
+               }catch(Exception ex) {
+                       utils.log("DEBUG", "Error Occured in CreateVnfInfra PrepareCreateGenericVnf Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PrepareCreateGenericVnf Process")
+               }
+               utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCreateGenericVnf Process ***", isDebugEnabled)
+       }
+
+       public void prepareCompletionHandlerRequest(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " *** STARTED CreateVnfInfra PrepareCompletionHandlerRequest Process *** ", isDebugEnabled)
+
+               try {
+                       String requestInfo = execution.getVariable("CREVI_requestInfo")
+                       String vnfId = execution.getVariable("CREVI_vnfId")
+                       requestInfo = utils.removeXmlPreamble(requestInfo)
+
+                       String request =
+                               """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                                       ${requestInfo}
+                                                       <status-message>Vnf has been created successfully.</status-message>
+                                                       <vnfId>${vnfId}</vnfId>
+                                                       <mso-bpel-name>CreateVnfInfra</mso-bpel-name>
+                                               </aetgt:MsoCompletionRequest>"""
+
+                       execution.setVariable("CREVI_completionHandlerRequest", request)
+                       utils.log("DEBUG", "Completion Handler Request is: " + request, isDebugEnabled)
+
+                       execution.setVariable("WorkflowResponse", "Success") // for junits
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", "Error Occured in CreateVnfInfra PrepareCompletionHandlerRequest Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra PrepareCompletionHandlerRequest Process")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED CreateVnfInfra PrepareCompletionHandlerRequest Process ***", isDebugEnabled)
+       }
+
+       public void sendErrorResponse(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " *** STARTED CreateVnfInfra sendErrorResponse Process *** ", isDebugEnabled)
+               try {
+                       def sentSyncResponse = execution.getVariable("CREVI_sentSyncResponse")
+                       if(sentSyncResponse == false){
+                               WorkflowException wfex = execution.getVariable("WorkflowException")
+                               String response = exceptionUtil.buildErrorResponseXml(wfex)
+
+                               utils.logAudit(response)
+                               sendWorkflowResponse(execution, 500, response)
+                       }else{
+                               utils.log("DEBUG", "Not Sending Error Response.  Sync Response Already Sent", isDebugEnabled)
+                       }
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", "Error Occured in CreateVnfInfra sendErrorResponse Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra sendErrorResponse Process")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED CreateVnfInfra sendErrorResponse Process ***", isDebugEnabled)
+       }
+
+       public void prepareFalloutRequest(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " *** STARTED CreateVnfInfra prepareFalloutRequest Process *** ", isDebugEnabled)
+
+               try {
+                       WorkflowException wfex = execution.getVariable("WorkflowException")
+                       utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+                       String requestInfo = execution.getVariable("CREVI_requestInfo")
+                       utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+                       String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+                       execution.setVariable("CREVI_falloutRequest", falloutRequest)
+
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", "Error Occured in CreateVnfInfra prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra prepareFalloutRequest Process")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED CreateVnfInfra prepareFalloutRequest Process ***", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteAAIVfModule.groovy
new file mode 100644 (file)
index 0000000..0e5360d
--- /dev/null
@@ -0,0 +1,360 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
+       
+       def Prefix="DAAIVfMod_"
+       
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable("prefix",Prefix)
+               execution.setVariable("DAAIVfMod_vnfId",null)
+               execution.setVariable("DAAIVfMod_vnfName",null)
+               execution.setVariable("DAAIVfMod_genVnfRsrcVer",null)
+               execution.setVariable("DAAIVfMod_vfModuleId",null)
+               execution.setVariable("DAAIVfMod_vfModRsrcVer",null)
+               execution.setVariable("DAAIVfMod_genericVnfEndpoint",null)
+               execution.setVariable("DAAIVfMod_vfModuleEndpoint",null)
+               execution.setVariable("DAAIVfMod_moduleExists",false)
+               execution.setVariable("DAAIVfMod_isBaseModule", false)
+               execution.setVariable("DAAIVfMod_isLastModule", false)
+
+               // DeleteAAIVfModule workflow response variable placeholders
+               execution.setVariable("DAAIVfMod_queryGenericVnfResponseCode",null)
+               execution.setVariable("DAAIVfMod_queryGenericVnfResponse","")
+               execution.setVariable("DAAIVfMod_parseModuleResponse","")
+               execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode",null)
+               execution.setVariable("DAAIVfMod_deleteGenericVnfResponse","")
+               execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode",null)
+               execution.setVariable("DAAIVfMod_deleteVfModuleResponse","")
+
+       }       
+       
+       // parse the incoming DELETE_VF_MODULE request and store the Generic Vnf
+       // and Vf Module Ids in the flow Execution
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("DeleteAAIVfModuleRequest")
+               utils.logAudit("DeleteAAIVfModule Request: " + xml)
+               utils.log("DEBUG", "input request xml:" + xml, isDebugEnabled)
+               initProcessVariables(execution)
+               def vnfId = utils.getNodeText(xml,"vnf-id")
+               def vfModuleId = utils.getNodeText(xml,"vf-module-id")
+               execution.setVariable("DAAIVfMod_vnfId", vnfId)         
+               execution.setVariable("DAAIVfMod_vfModuleId", vfModuleId)
+               
+               AaiUtil aaiUriUtil = new AaiUtil(this)
+               def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+               logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+               
+               execution.setVariable("DAAIVfMod_genericVnfEndpoint", "${aai_uri}/" + vnfId)
+               execution.setVariable("DAAIVfMod_vfModuleEndpoint", "${aai_uri}/" + vnfId +
+                        "/vf-modules/vf-module/" + vfModuleId)
+       }
+       
+       // send a GET request to AA&I to retrieve the Generic Vnf/Vf Module information based on a Vnf Id
+       // expect a 200 response with the information in the response body or a 404 if the Generic Vnf does not exist
+       public void queryAAIForGenericVnf(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def delModuleId = execution.getVariable("DAAIVfMod_vfModuleId")
+               def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_genericVnfEndpoint")
+               utils.logAudit("DeleteAAIVfModule endPoint: " + endPoint)
+               def aaiRequestId = UUID.randomUUID().toString()
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+               RESTConfig config = new RESTConfig(endPoint);
+               utils.log("DEBUG","queryAAIForGenericVnf() endpoint-" + endPoint, isDebugEnabled)
+               def responseData = ""
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
+                               addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       utils.log("DEBUG", "invoking GET call to AAI endpoint :"+System.lineSeparator()+endPoint,isDebugEnabled)
+                       APIResponse response = client.httpGet()
+                       utils.logAudit("DeleteAAIVfModule - invoking httpGet to AAI")
+                       
+                       responseData = response.getResponseBodyAsString()
+                       execution.setVariable("DAAIVfMod_queryGenericVnfResponseCode", response.getStatusCode())
+                       execution.setVariable("DAAIVfMod_queryGenericVnfResponse", responseData)
+                       utils.logAudit("AAI Response: " + responseData)
+                       utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+                       utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+               } catch (Exception ex) {
+                       ex.printStackTrace()
+                       utils.log("DEBUG", "Exception occurred while executing AAI GET:" + ex.getMessage(),isDebugEnabled)
+                       execution.setVariable("DAAIVfMod_queryGenericVnfResponseCode", 500)
+                       execution.setVariable("DAAIVfMod_queryGenericVnfResponse", "AAI GET Failed:" + ex.getMessage())
+               }
+       }
+       
+       // construct and send a DELETE request to A&AI to delete a Generic Vnf
+       // note: to get here, all the modules associated with the Generic Vnf must already be deleted
+       public void deleteGenericVnf(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def aaiRequestId = UUID.randomUUID().toString()
+               def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_genericVnfEndpoint") +
+                       "/?resource-version=" + execution.getVariable("DAAIVfMod_genVnfRsrcVer")
+               utils.logAudit("AAI endPoint: " + endPoint)
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+               RESTConfig config = new RESTConfig(endPoint);
+               utils.log("DEBUG","deleteGenericVnf() endpoint-" + endPoint, isDebugEnabled)
+               def responseData = ""
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
+                               addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.httpDelete()
+                               
+                       responseData = response.getResponseBodyAsString()
+                       execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode", response.getStatusCode())
+                       execution.setVariable("DAAIVfMod_deleteGenericVnfResponse", responseData)
+                       utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+                       utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+               } catch (Exception ex) {
+                       ex.printStackTrace()
+                       utils.log("DEBUG", "Exception occurred while executing AAI DELETE:" + ex.getMessage(),isDebugEnabled)
+                       execution.setVariable("DAAIVfMod_deleteGenericVnfResponseCode", 500)
+                       execution.setVariable("DAAIVfMod_deleteGenericVnfResponse", "AAI DELETE Failed:" + ex.getMessage())
+               }               
+       }
+
+       // construct and send a DELETE request to A&AI to delete the Base or Add-on Vf Module
+       public void deleteVfModule(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def endPoint = execution.getVariable("URN_aai_endpoint") + execution.getVariable("DAAIVfMod_vfModuleEndpoint") +
+                       "/?resource-version=" + execution.getVariable("DAAIVfMod_vfModRsrcVer")
+               def aaiRequestId = UUID.randomUUID().toString()
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+               RESTConfig config = new RESTConfig(endPoint);
+               utils.log("DEBUG","deleteVfModule() endpoint-" + endPoint, isDebugEnabled)
+               def responseData = ""
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", aaiRequestId).addHeader("X-FromAppId", "MSO").
+                               addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.httpDelete()
+                       utils.logAudit("DeleteAAIVfModule - invoking httpDelete to AAI")
+                       
+                       responseData = response.getResponseBodyAsString()
+                       execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode", response.getStatusCode())
+                       execution.setVariable("DAAIVfMod_deleteVfModuleResponse", responseData)
+                       utils.logAudit("DeleteAAIVfModule - AAI Response" + responseData)
+                       utils.log("DEBUG", "Response code:" + response.getStatusCode(), isDebugEnabled)
+                       utils.log("DEBUG", "Response:" + System.lineSeparator()+responseData,isDebugEnabled)
+
+               } catch (Exception ex) {
+                       ex.printStackTrace()
+                       utils.log("DEBUG", "Exception occurred while executing AAI PUT:" + ex.getMessage(),isDebugEnabled)
+                       execution.setVariable("DAAIVfMod_deleteVfModuleResponseCode", 500)
+                       execution.setVariable("DAAIVfMod_deleteVfModuleResponse", "AAI PUT Failed:" + ex.getMessage())
+               }                               
+       }
+       
+       // parses the output from the result from queryAAIForGenericVnf() to determine if the Vf Module
+       // to be deleted exists for the specified Generic Vnf and if it is the Base Module,
+       // there are no Add-on Modules present
+       public void parseForVfModule(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("DAAIVfMod_queryGenericVnfResponse")
+               utils.logAudit("DeleteAAIVfModule - queryGenericVnfResponse" + xml)
+               
+               def delModuleId = execution.getVariable("DAAIVfMod_vfModuleId")
+               utils.log("DEBUG", "Vf Module to be deleted: " + delModuleId, isDebugEnabled)
+               List <String> qryModuleIdList = utils.getMultNodes(xml, "vf-module-id")
+               List <String> qryBaseModuleList = utils.getMultNodes(xml, "is-base-vf-module")
+               List <String> qryResourceVerList = utils.getMultNodes(xml, "resource-version")
+               execution.setVariable("DAAIVfMod_moduleExists", false)
+               execution.setVariable("DAAIVfMod_isBaseModule", false)
+               execution.setVariable("DAAIVfMod_isLastModule", false)
+               // 
+               def isBaseVfModule = "false"
+               // loop through the Vf Module Ids looking for a match
+               if (qryModuleIdList != null && !qryModuleIdList.empty) {
+                       utils.log("DEBUG", "Existing Vf Module Id List: " + qryModuleIdList, isDebugEnabled)
+                       utils.log("DEBUG", "Existing Vf Module Resource Version List: " + qryResourceVerList, isDebugEnabled)
+                       def moduleCntr = 0
+                       // the Generic Vnf resource-version in the 1st entry in the query response
+                       execution.setVariable("DAAIVfMod_genVnfRsrcVer", qryResourceVerList[moduleCntr])
+                       for (String qryModuleId : qryModuleIdList) {
+                               if (delModuleId.equals(qryModuleId)) {
+                                       // a Vf Module with the requested Id exists
+                                       execution.setVariable("DAAIVfMod_moduleExists", true)
+                                       // find the corresponding value for the is-base-vf-module field
+                                       isBaseVfModule = qryBaseModuleList[moduleCntr]
+                                       // find the corresponding value for the resource-version field
+                                       // note: the Generic Vnf entry also has a resource-version field, so
+                                       //       add 1 to the index to get the corresponding Vf Module value
+                                       execution.setVariable("DAAIVfMod_vfModRsrcVer", qryResourceVerList[moduleCntr+1])
+                                       utils.log("DEBUG", "Match found for Vf Module Id " + qryModuleId + " for Generic Vnf Id " +
+                                               execution.getVariable("DAAIVfMod_vnfId") + ", Base Module is " + isBaseVfModule +
+                                               ", Resource Version is " + execution.getVariable("vfModRsrcVer"), isDebugEnabled)
+                                       break
+                               }
+                               moduleCntr++
+                       }
+               }
+               
+               // determine if the module to be deleted is a Base Module and/or the Last Module
+               if (execution.getVariable("DAAIVfMod_moduleExists") == true) {
+                       if (isBaseVfModule.equals("true") && qryModuleIdList.size() != 1) {
+                               execution.setVariable("DAAIVfMod_parseModuleResponse",
+                                       "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
+                                       execution.getVariable("DAAIVfMod_vnfId") + ": is Base Module, not Last Module")
+                               execution.setVariable("DAAIVfMod_isBaseModule", true)
+                       } else {
+                               if (isBaseVfModule.equals("true") && qryModuleIdList.size() == 1) {
+                                       execution.setVariable("DAAIVfMod_parseModuleResponse",
+                                               "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
+                                               execution.getVariable("DAAIVfMod_vnfId") + ": is Base Module and Last Module")
+                                       execution.setVariable("DAAIVfMod_isBaseModule", true)
+                                       execution.setVariable("DAAIVfMod_isLastModule", true)
+                               } else {
+                                       if (qryModuleIdList.size() == 1) {
+                                               execution.setVariable("DAAIVfMod_parseModuleResponse",
+                                                       "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
+                                                       execution.getVariable("DAAIVfMod_vnfId") + ": is Not Base Module, is Last Module")
+                                               execution.setVariable("DAAIVfMod_isLastModule", true)
+                                       } else {
+                                       execution.setVariable("DAAIVfMod_parseModuleResponse",
+                                               "Found Vf Module Id " + delModuleId + " for Generic Vnf Id " +
+                                               execution.getVariable("DAAIVfMod_vnfId") + ": is Not Base Module and Not Last Module")
+                                       }
+                               }
+                       }
+                       utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
+               } else { // (execution.getVariable("DAAIVfMod_moduleExists") == false)
+                       utils.log("DEBUG", "Vf Module Id " + delModuleId + " does not exist for Generic Vnf Id " +
+                                execution.getVariable("DAAIVfMod_vnfId"), isDebugEnabled)
+                       execution.setVariable("DAAIVfMod_parseModuleResponse",
+                               "Vf Module Id " + delModuleId + " does not exist for Generic Vnf Id " +
+                               execution.getVariable("DAAIVfMod_vnfName"))
+               }               
+       }
+       
+       // parses the output from the result from queryAAIForGenericVnf() to determine if the Vf Module
+       // to be deleted exists for the specified Generic Vnf and if it is the Base Module,
+       // there are no Add-on Modules present
+       public void parseForResourceVersion(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("DAAIVfMod_queryGenericVnfResponse")
+               utils.logAudit("DeleteAAIVfModule - queryGenericVnfResponse" + xml)
+               String resourceVer = utils.getNodeText1(xml, "resource-version")
+               execution.setVariable("DAAIVfMod_genVnfRsrcVer", resourceVer)
+               utils.log("DEBUG", "Latest Generic VNF Resource Version: " + resourceVer)                       
+       }
+       
+       
+       // generates a WorkflowException if the A&AI query returns a response code other than 200
+       public void handleAAIQueryFailure(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               
+               utils.log("ERROR", "Error occurred attempting to query AAI, Response Code " +
+                       execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") + ", Error Response " +
+                       execution.getVariable("DAAIVfMod_queryGenericVnfResponse"), isDebugEnabled)
+               def errorCode = 5000
+               // set the errorCode to distinguish between a A&AI failure
+               // and the Generic Vnf Id not found
+               if (execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") == 404) {
+                       errorCode = 1002
+               }
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, errorCode,
+                       execution.getVariable("DAAIVfMod_queryGenericVnfResponse"))
+               execution.setVariable("WorkflowException", exception)
+       }
+       
+       // generates a WorkflowException if
+       //              - the A&AI Vf Module DELETE returns a response code other than 200
+       //              - the Vf Module is a Base Module that is not the last Vf Module
+       //              - the Vf Module does not exist for the Generic Vnf
+       public void handleDeleteVfModuleFailure(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               
+               def errorCode = 2000
+               def errorResponse = ""
+               if (execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") != null &&
+                       execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") != 200) {
+                       utils.log("DEBUG", "AAI failure deleting a Vf Module: " +
+                               execution.getVariable("DAAIVfMod_deleteVfModuleResponse"), isDebugEnabled)
+                       errorResponse = execution.getVariable("DAAIVfMod_deleteVfModuleResponse")
+                       utils.logAudit("DeleteAAIVfModule - deleteVfModuleResponse" + errorResponse)
+                       errorCode = 5000
+               } else {
+                       if (execution.getVariable("DAAIVfMod_isBaseModule", true) == true &&
+                                       execution.getVariable("DAAIVfMod_isLastModule") == false) {
+                               // attempt to delete a Base Module that is not the last Vf Module
+                               utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
+                               errorResponse = execution.getVariable("DAAIVfMod_parseModuleResponse")
+                               utils.logAudit("DeleteAAIVfModule - parseModuleResponse" + errorResponse)
+                               errorCode = 1002
+                       } else {
+                               // attempt to delete a non-existant Vf Module
+                               if (execution.getVariable("DAAIVfMod_moduleExists") == false) {
+                                       utils.log("DEBUG", execution.getVariable("DAAIVfMod_parseModuleResponse"), isDebugEnabled)
+                                       errorResponse = execution.getVariable("DAAIVfMod_parseModuleResponse")
+                                       utils.logAudit("DeleteAAIVfModule - parseModuleResponse" + errorResponse)
+                                       errorCode = 1002
+                               } else {
+                                       // if the responses get populated corerctly, we should never get here
+                                       errorResponse = "Unknown error occurred during DeleteAAIVfModule flow"
+                               }
+                       }
+               }
+
+               utils.log("ERROR", "Error occurred during DeleteAAIVfModule flow: " + errorResponse, isDebugEnabled)
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, errorCode, errorResponse)
+               execution.setVariable("WorkflowException", exception)
+       }
+
+       // generates a WorkflowException if
+       //              - the A&AI Generic Vnf DELETE returns a response code other than 200
+       public void handleDeleteGenericVnfFailure(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               utils.log("ERROR", "AAI error occurred deleting the Generic Vnf: "
+                       + execution.getVariable("DAAIVfMod_deleteGenericVnfResponse"), isDebugEnabled)
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable("DAAIVfMod_deleteGenericVnfResponse"))
+               execution.setVariable("WorkflowException", exception)
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteNetworkInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteNetworkInstanceInfra.groovy
new file mode 100644 (file)
index 0000000..9cc7562
--- /dev/null
@@ -0,0 +1,873 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+public class DeleteNetworkInstanceInfra extends AbstractServiceTaskProcessor {
+       String Prefix="DELNWKI_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+       JsonUtils jsonUtil = new JsonUtils()
+       VidUtils vidUtils = new VidUtils(this)
+
+       public InitializeProcessVariables(Execution execution){
+               /* Initialize all the process variables in this block */
+
+               execution.setVariable("DELNWKI_DeleteNetworkInstanceInfraJsonRequest", "")
+               execution.setVariable("DELNWKI_networkRequest", "")
+               execution.setVariable("DELNWKI_networkRESTRequest", "")
+               execution.setVariable("DELNWKI_CompleteMsoProcessRequest", "")
+               execution.setVariable("DELNWKI_FalloutHandlerRequest", "")
+               execution.setVariable("DELNWKI_isSilentSuccess", false)
+               execution.setVariable("DELNWKI_Success", false)
+               execution.setVariable("DELNWKI_isPONR", false)    // Point-of-no-return, means, rollback is not needed
+
+               execution.setVariable("DELNWKI_requestId", "")
+               execution.setVariable("DELNWKI_source", "")
+               execution.setVariable("DELNWKI_networkInputs", "")
+
+               execution.setVariable("DELNWKI_queryAAIRequest","")
+               execution.setVariable("DELNWKI_queryAAIResponse", "")
+               execution.setVariable("DELNWKI_aaiReturnCode", "")
+               execution.setVariable("DELNWKI_isAAIGood", false)
+               execution.setVariable("DELNWKI_isVfRelationshipExist", false)
+
+               // AAI query Cloud Region
+               execution.setVariable("DELNWKI_queryCloudRegionRequest","")
+               execution.setVariable("DELNWKI_queryCloudRegionReturnCode","")
+               execution.setVariable("DELNWKI_queryCloudRegionResponse","")
+               execution.setVariable("DELNWKI_cloudRegionPo","")
+               execution.setVariable("DELNWKI_cloudRegionSdnc","")
+
+               execution.setVariable("DELNWKI_deleteNetworkRequest", "")
+               execution.setVariable("DELNWKI_deleteNetworkResponse", "")
+               execution.setVariable("DELNWKI_networkReturnCode", "")
+
+               execution.setVariable("DELNWKI_deleteSDNCRequest", "")
+               execution.setVariable("DELNWKI_deleteSDNCResponse", "")
+               execution.setVariable("DELNWKI_rollbackSDNCRequest", "")
+               execution.setVariable("DELNWKI_rollbackSDNCResponse", "")
+               execution.setVariable("DELNWKI_sdncReturnCode", "")
+               execution.setVariable("DELNWKI_rollbackSDNCReturnCode", "")
+               execution.setVariable("DELNWKI_isSdncRollbackNeeded", false)
+               execution.setVariable("DELNWKI_sdncResponseSuccess", false)
+
+       }
+
+       // **************************************************
+       //     Pre or Prepare Request Section
+       // **************************************************
+
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside preProcessRequest() DeleteNetworkV2 Request ***** ", isDebugEnabled)
+
+               // initialize flow variables
+               InitializeProcessVariables(execution)
+
+               // get incoming message/input
+               String deleteNetworkJsonIncoming = execution.getVariable("bpmnRequest")
+               utils.logAudit(deleteNetworkJsonIncoming)
+
+               try {
+                       def prettyJson = JsonOutput.prettyPrint(deleteNetworkJsonIncoming.toString())
+                       utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+               }
+
+               // prepare messageId
+               String messageId = execution.getVariable("DELNWKI_messageId") // test scenario
+               if (messageId == null || messageId == "") {
+                       messageId = UUID.randomUUID()
+                       utils.log("DEBUG", " DELNWKI_messageId, random generated: " + messageId, isDebugEnabled)
+               } else {
+                       utils.log("DEBUG", " DELNWKI_messageId, pre-assigned: " + messageId, isDebugEnabled)
+               }
+               execution.setVariable("DELNWKI_messageId", messageId)
+
+               // PO Authorization Info / headers Authorization=
+               String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+               utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+               try {
+                       def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+                       execution.setVariable("BasicAuthHeaderValuePO",encodedString)
+                       execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
+
+               } catch (IOException ex) {
+                       String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+               }
+
+               try {
+
+                       execution.setVariable("DELNWKI_DeleteNetworkInstanceInfraJsonRequest", deleteNetworkJsonIncoming)
+
+                       // recreate the xml network-request
+                       String networkRequest =  vidUtils.createXmlNetworkRequestInfra(execution, deleteNetworkJsonIncoming)
+                       execution.setVariable("DELNWKI_networkRequest", networkRequest)
+                       utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled)
+
+                       String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+                       execution.setVariable("DELNWKI_networkInputs", networkInputs)
+
+                       String requestId = execution.getVariable("att-mso-request-id")
+                       if (requestId == null || requestId == "") {
+                               requestId = utils.getNodeText(networkRequest, "request-id")
+                       }
+                       execution.setVariable("DELNWKI_requestId", requestId)
+                       execution.setVariable("DELNWKI_source", utils.getNodeText(networkRequest, "source"))
+
+                       String networkId = ""
+                       if (utils.nodeExists(networkInputs, "network-id")) {
+                               networkId = utils.getNodeText1(networkInputs, "network-id")
+                               if (networkId == 'null' || networkId == "") {
+                                       sendSyncError(execution)
+                                       // missing value of network-name
+                                       String dataErrorMessage = "network-request has missing 'network-id' element/value."
+                                       utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+                               }
+                       }
+
+                       String lcpCloudRegion = ""
+                       if (utils.nodeExists(networkInputs, "aic-cloud-region")) {
+                               lcpCloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region")
+                               if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) {
+                                       sendSyncError(execution)
+                                       String dataErrorMessage = "network-request has missing 'aic-cloud-region' element/value."
+                                       utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+                               }
+                       }
+
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex){
+                        // caught exception
+                       String exceptionMessage = "Exception Encountered in DeleteNetworkInstanceInfra, PreProcessRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void sendSyncResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside sendSyncResponse() of DeleteNetworkV2 ***** ", isDebugEnabled)
+
+               try {
+                       String requestId = execution.getVariable("att-mso-request-id")
+                       String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       String deleteNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+                       utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + deleteNetworkRestRequest, isDebugEnabled)
+
+                       sendWorkflowResponse(execution, 202, deleteNetworkRestRequest)
+
+               } catch (Exception ex) {
+                        // caught exception
+                       String exceptionMessage = "Exception Encountered in DeleteNetworkInstanceInfra, sendSyncResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAI (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAI() of DeleteNetworkV2 ***** " , isDebugEnabled)
+
+               // get variables
+               String networkInputs  = execution.getVariable("DELNWKI_networkInputs")
+               String networkId   = utils.getNodeText(networkInputs, "network-id")
+               networkId = UriUtils.encode(networkId,"UTF-8")
+               String messageId = execution.getVariable("DELNWKI_messageId")
+
+               // Prepare AA&I url
+               String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+               AaiUtil aaiUriUtil = new AaiUtil(this)
+               String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+               String queryAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
+               utils.logAudit(queryAAIRequest)
+               execution.setVariable("DELNWKI_queryAAIRequest", queryAAIRequest)
+               utils.log("DEBUG", " DELNWKI_AAIRequest - " + "\n" + queryAAIRequest, isDebugEnabled)
+
+               String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+               RESTConfig config = new RESTConfig(queryAAIRequest);
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               Boolean isVfRelationshipExist = false
+               try {
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+                       APIResponse response = client.get()
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("DELNWKI_aaiReturnCode", returnCode)
+
+                       utils.log("DEBUG", " ***** AAI Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+                       aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+                       execution.setVariable("DELNWKI_queryAAIResponse", aaiResponseAsString)
+
+                       if (returnCode=='200' || returnCode=='204') {
+                               utils.logAudit(aaiResponseAsString)
+                               execution.setVariable("DELNWKI_isAAIGood", true)
+                               utils.log("DEBUG", " AAI Query Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+                               // verify if vf or vnf relationship exist
+                               if (utils.nodeExists(aaiResponseAsString, "relationship")) {
+                                       NetworkUtils networkUtils = new NetworkUtils()
+                               isVfRelationshipExist = networkUtils.isVfRelationshipExist(aaiResponseAsString)
+                                       execution.setVariable("DELNWKI_isVfRelationshipExist", isVfRelationshipExist)
+                                       if (isVfRelationshipExist == true) {
+                                               String relationshipMessage = "AAI Query Success Response but 'vf-module' relationship exist, not allowed to delete: network Id: " + networkId
+                                               exceptionUtil.buildWorkflowException(execution, 2500, relationshipMessage)
+
+                                       }
+                               }
+                               utils.log("DEBUG", " DELNWKI_isVfRelationshipExist - " + isVfRelationshipExist, isDebugEnabled)
+
+                       } else {
+                               execution.setVariable("DELNWKI_isAAIGood", false)
+                           if (returnCode=='404' || aaiResponseAsString == "" || aaiResponseAsString == null) {
+                                       // not found // empty aai response
+                                       execution.setVariable("DELNWKI_isSilentSuccess", true)
+                                       utils.log("DEBUG", " AAI Query is Silent Success", isDebugEnabled)
+
+                               } else {
+                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                          execution.setVariable("WorkflowException", exceptionObject)
+
+                                  } else {
+                                 // aai all errors
+                                                String dataErrorMessage = "Unexpected Error Response from callRESTQueryAAI() - " + returnCode
+                                                utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                exceptionUtil.buildWorkflowException(execution, 2500, dataErrorMessage)
+
+                             }
+                               }
+                       }
+
+                       utils.log("DEBUG", " AAI Query call, isAAIGood? : " + execution.getVariable("DELNWKI_isAAIGood"), isDebugEnabled)
+
+               } catch (Exception ex) {
+                  // caught exception
+                  String exceptionMessage = "Exception Encountered in DeleteNetworkInstanceInfra, callRESTQueryAAI() - " + ex.getMessage()
+                  utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                  exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAICloudRegion (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of DeleteNetworkV2 ***** " , isDebugEnabled)
+
+               try {
+                       String networkInputs  = execution.getVariable("DELNWKI_networkInputs")
+                       String cloudRegion = utils.getNodeText(networkInputs, "aic-cloud-region")
+                       cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+                       // Prepare AA&I url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+                       String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+                       utils.logAudit(queryCloudRegionRequest)
+                       execution.setVariable("DELNWKI_queryCloudRegionRequest", queryCloudRegionRequest)
+                       utils.log("DEBUG", " DELNWKI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+                       String cloudRegionPo = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "PO", cloudRegion)
+                       String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "SDNC", cloudRegion)
+
+                       if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
+                               execution.setVariable("DELNWKI_cloudRegionPo", cloudRegionPo)
+                               execution.setVariable("DELNWKI_cloudRegionSdnc", cloudRegionSdnc)
+
+                       } else {
+                               String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable("DELNWKI_queryCloudRegionReturnCode")
+                               utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                       }
+
+               } catch (BpmnError e) {
+               throw e;
+
+               } catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, callRESTQueryAAICloudRegion(). Unexpected Response from AAI - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void prepareNetworkRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareNetworkRequest of DeleteNetworkV2 ***** ", isDebugEnabled)
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               try {
+                       // get variables
+                       String cloudSiteId = execution.getVariable("DELNWKI_cloudRegionPo")
+                       String networkInputs = execution.getVariable("DELNWKI_networkInputs")
+                       String tenantId = utils.getNodeText(networkInputs, "tenant-id")
+                       String networkType = utils.getNodeText(networkInputs, "network-type")
+                       String networkId = utils.getNodeText(networkInputs, "network-id")
+
+                       String networkStackId = ""
+                       networkStackId = utils.getNodeText1(execution.getVariable("DELNWKI_queryAAIResponse"), "heat-stack-id")
+                       if (networkStackId == 'null' || networkStackId == "") {
+                               networkStackId = "force_delete"
+                       }
+
+                       String requestId = execution.getVariable("DELNWKI_requestId")
+                       String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+                       // Added new Elements
+                       String messageId = execution.getVariable("DELNWKI_messageId")
+                       String notificationUrl = ""                                   //TODO - is this coming from URN? What variable/value to use?
+                       //String notificationUrl = execution.getVariable("URN_?????") //TODO - is this coming from URN? What variable/value to use?
+
+                       String deleteNetworkRequest = """
+                                         <deleteNetworkRequest>
+                                           <cloudSiteId>${cloudSiteId}</cloudSiteId>
+                                           <tenantId>${tenantId}</tenantId>
+                                           <networkId>${networkId}</networkId>
+                                               <networkStackId>${networkStackId}</networkStackId>
+                                           <networkType>${networkType}</networkType>
+                                               <skipAAI>true</skipAAI>
+                                           <msoRequest>
+                                              <requestId>${requestId}</requestId>
+                                              <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+                                           </msoRequest>
+                                               <messageId>${messageId}</messageId>
+                                               <notificationUrl>${notificationUrl}</notificationUrl>
+                                         </deleteNetworkRequest>
+                                               """.trim()
+
+                       utils.log("DEBUG", " DELNWKI_deleteNetworkRequest - " + "\n" +  deleteNetworkRequest, isDebugEnabled)
+                       // Format Response
+                       String buildDeleteNetworkRequestAsString = utils.formatXml(deleteNetworkRequest)
+                       utils.logAudit(buildDeleteNetworkRequestAsString)
+                       utils.log("DEBUG", " DELNWKI_deleteNetworkRequestAsString - " + "\n" +  buildDeleteNetworkRequestAsString, isDebugEnabled)
+
+                       String restURL = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
+                       execution.setVariable("URN_mso_adapters_network_rest_endpoint", restURL + "/" + networkId)
+                       utils.log("DEBUG", "URN_mso_adapters_network_rest_endpoint - " + "\n" +  restURL + "/" + networkId, isDebugEnabled)
+
+                       execution.setVariable("DELNWKI_deleteNetworkRequest", buildDeleteNetworkRequestAsString)
+                       utils.log("DEBUG", " DELNWKI_deleteNetworkRequest - " + "\n" +  buildDeleteNetworkRequestAsString, isDebugEnabled)
+               }
+               catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, prepareNetworkRequest(). Unexpected Response from AAI - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+       }
+
+       /**
+        * This method is used instead of an HTTP Connector task because the
+        * connector does not allow DELETE with a body.
+        */
+       public void sendRequestToVnfAdapter(Execution execution) {
+               def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugEnabled)
+
+               try {
+
+                       String vnfAdapterUrl = execution.getVariable("URN_mso_adapters_network_rest_endpoint")
+                       String vnfAdapterRequest = execution.getVariable("DELNWKI_deleteNetworkRequest")
+
+                       RESTConfig config = new RESTConfig(vnfAdapterUrl)
+                       RESTClient client = new RESTClient(config).
+                               addHeader("Content-Type", "application/xml").
+                               addAuthorizationHeader(execution.getVariable("BasicAuthHeaderValuePO"));
+
+                       APIResponse response;
+
+                       response = client.httpDelete(vnfAdapterRequest)
+
+                       execution.setVariable("DELNWKI_networkReturnCode", response.getStatusCode())
+                       execution.setVariable("DELNWKI_deleteNetworkResponse", response.getResponseBodyAsString())
+
+               } catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, sendRequestToVnfAdapter() - " + ex.getMessage()
+                       logError(exceptionMessage)
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+       }
+
+
+       public void prepareSDNCRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareSDNCRequest of DeleteNetworkV2 ***** ", isDebugEnabled)
+
+               try {
+                       // get variables
+                       String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+                       String deleteNetworkInput = execution.getVariable("DELNWKI_networkRequest")
+
+                       String networkId = ""
+                       if (utils.nodeExists(deleteNetworkInput, "network-id")) {
+                               networkId = utils.getNodeText1(deleteNetworkInput, "network-id")
+                       }
+                       if (networkId == 'null') {networkId = ""}
+
+                       String serviceInstanceId = utils.getNodeText1(deleteNetworkInput, "service-instance-id")
+
+                       SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+                       String cloudRegionId = execution.getVariable("DELNWKI_cloudRegionSdnc")
+                       // 1. prepare delete topology via SDNC Adapter SUBFLOW call
+                       String sndcTopologyDeleteRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "delete", "DisconnectNetworkRequest", cloudRegionId, networkId, null)
+                   String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
+                       utils.logAudit(sndcTopologyDeleteRequesAsString)
+                       execution.setVariable("DELNWKI_deleteSDNCRequest", sndcTopologyDeleteRequesAsString)
+                       utils.log("DEBUG", " DELNWKI_deleteSDNCRequest - " + "\n" +  sndcTopologyDeleteRequesAsString, isDebugEnabled)
+
+                       // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+                       String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, deleteNetworkInput, serviceInstanceId, sdncCallback, "rollback", "DisconnectNetworkRequest", cloudRegionId, networkId, null)
+                       String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
+                       execution.setVariable("DELNWKI_rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
+                       utils.log("DEBUG", " DELNWKI_rollbackSDNCRequest (prepared if NEEDED later for SDNC Topology delete's rollback/compensation . . . - " + "\n" +  sndcTopologyRollbackRequestAsString, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, prepareSDNCRequest() - " + ex.getMessage()
+                       logError(exceptionMessage)
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void prepareDBRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       utils.log("DEBUG", " ***** Inside prepareDBRequest of DeleteNetworkV2 ***** ", isDebugEnabled)
+
+                       String aaiReturnCode = execution.getVariable("DELNWKI_aaiReturnCode")
+                       String requestId = execution.getVariable("DELNWKI_requestId")
+
+                       String statusMessage = ""
+                       if (aaiReturnCode == '404' || execution.getVariable("DELNWKI_isSilentSuccess") == true) {
+                               // SILENT SUCCESS
+                               statusMessage = "Network Id to be deleted NOT found. Silent success."
+                       } else {
+                               statusMessage = "Network successfully deleted."
+                       }
+
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>COMPLETED</requestStatus>
+                                                               <progress>100</progress>
+                                                               <vnfOutputs>&lt;network-outputs xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:aetgt="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+                                                       </ns:updateInfraRequest>
+                                               </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+                  utils.logAudit(buildDeleteDBRequestAsString)
+                  execution.setVariable("DELNWKI_deleteDBRequest", buildDeleteDBRequestAsString)
+                  utils.log("DEBUG", " DB Adapter Request - " + "\n" + buildDeleteDBRequestAsString, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, prepareDBRequest() - " + ex.getMessage()
+                       logError(exceptionMessage)
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+       public void prepareDBRequestError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteNetworkV2 ***** ", isDebugEnabled)
+
+                       WorkflowException wfe = execution.getVariable("WorkflowException")
+                       String statusMessage = wfe.getErrorMessage()
+                       String requestId = execution.getVariable("DELNWKI_requestId")
+
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>FAILED</requestStatus>
+                                                               <progress></progress>
+                                                               <vnfOutputs>&lt;network-outputs xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:aetgt="http://ecomp.att.com/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"/&gt;</vnfOutputs>
+                                                       </ns:updateInfraRequest>
+                                               </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  execution.setVariable("DELNWKI_deleteDBRequest", dbRequest)
+                  utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, prepareDBRequestError() - " + ex.getMessage()
+                       logError(exceptionMessage)
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+       // **************************************************
+       //     Post or Validate Response Section
+       // **************************************************
+
+       public void validateNetworkResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside validateNetworkResponse of DeleteNetworkV2 *****", isDebugEnabled)
+
+               try {
+                       String returnCode = execution.getVariable("DELNWKI_networkReturnCode")
+                       String networkResponse = execution.getVariable("DELNWKI_deleteNetworkResponse")
+
+                       utils.log("DEBUG", " Network Adapter responseCode: " + returnCode, isDebugEnabled)
+                       utils.log("DEBUG", "Network Adapter Error Response - " + "\n" + networkResponse, isDebugEnabled)
+
+                       String errorMessage = ""
+                       if (returnCode == "200") {
+                               utils.logAudit(networkResponse)
+                               execution.setVariable("DELNWKI_deleteNetworkResponse", networkResponse)
+                               utils.log("DEBUG", " Network Adapter Success Response - " + "\n" + networkResponse, isDebugEnabled)
+
+                       } else { // network error
+                          if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) {   //4xx, 5xx
+                                  if (networkResponse.contains("deleteNetworkError")  ) {
+                                          networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '')
+                                          errorMessage  = utils.getNodeText1(networkResponse, "message")
+                                          errorMessage  = "Received error from Network Adapter: " + errorMessage
+                                          exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+                                  } else { // CatchAll exception
+                                          if (returnCode == "500") {
+                                                  errorMessage = "JBWEB000065: HTTP Status 500."
+                                      } else {
+                                              errorMessage = "Return code is " + returnCode
+                                      }
+                                          errorMessage  = "Received error from Network Adapter: " + errorMessage
+                                          exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+                                  }
+
+                          } else { // CatchAll exception
+                                  String dataErrorMessage  = "Received error from Network Adapter. Return code is: " + returnCode
+                                  exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                          }
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, validateNetworkResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void validateSDNCResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside validateSDNCResponse of DeleteNetworkV2 ***** ", isDebugEnabled)
+
+               String response = execution.getVariable("DELNWKI_deleteSDNCResponse")
+               WorkflowException workflowException = execution.getVariable("WorkflowException")
+
+               boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+               // reset variable
+               String deleteSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable("DELNWKI_deleteSDNCResponse"))
+               deleteSDNCResponseDecodeXml = deleteSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+               execution.setVariable("DELNWKI_deleteSDNCResponse", deleteSDNCResponseDecodeXml)
+
+               if (execution.getVariable("DELNWKI_sdncResponseSuccess") == true) {  // from sdnc util, prefix+'sdncResponseSuccess'
+                       execution.setVariable("DELNWKI_isSdncRollbackNeeded", true)      //
+                       execution.setVariable("DELNWKI_isPONR", true)
+                       utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+               } else {
+                       utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
+                       throw new BpmnError("MSOWorkflowException")
+               }
+
+       }
+
+
+       public void postProcessResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside postProcessResponse of DeleteNetworkV2 ***** ", isDebugEnabled)
+
+               try {
+                       // Display DB response: DELNWKI_deleteDBResponse / DELNWKI_dbReturnCode
+                       String dbReturnCode = execution.getVariable("DELNWKI_dbReturnCode")
+                       utils.log("DEBUG", " ***** DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+                       utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + execution.getVariable("DELNWKI_deleteDBResponse"), isDebugEnabled)
+
+                       if (dbReturnCode == '200') {
+
+                               String source = execution.getVariable("DELNWKI_source")
+                               String requestId = execution.getVariable("DELNWKI_requestId")
+
+                               String msoCompletionRequest =
+                                       """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                       xmlns:ns8="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                                               <request-id>${requestId}</request-id>
+                                                               <action>DELETE</action>
+                                                               <source>${source}</source>
+                                                       </request-info>
+                                                       <ns8:status-message>Network has been deleted successfully.</ns8:status-message>
+                                                       <ns8:mso-bpel-name>BPMN Network action: DELETE</ns8:mso-bpel-name>
+                                               </aetgt:MsoCompletionRequest>"""
+
+                                       // Format Response
+                                       String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+                               utils.logAudit(xmlMsoCompletionRequest)
+                               execution.setVariable("DELNWKI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+                               execution.setVariable("DELNWKI_Success", true)
+                               if (execution.getVariable("DELNWKI_isSilentSuccess") == false) {
+                                       utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+                               } else {
+                                       utils.log("DEBUG", " Silent SUCCESS going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+                               }
+
+                       } else {
+                               // caught exception
+                               String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, DB Update Failed: " + dbReturnCode
+                               utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, exceptionMessage)
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, postProcessResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+        }
+
+       }
+
+
+       // *******************************
+       //     Build Error Section
+       // *******************************
+
+       // Prepare for FalloutHandler
+       public void buildErrorResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+               String dbReturnCode = execution.getVariable("DELNWKI_dbReturnCode")
+               utils.log("DEBUG", " ***** DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+               utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + execution.getVariable("DELNWKI_deleteDBResponse"), isDebugEnabled)
+
+               String falloutHandlerRequest = ""
+               String workflowException = ""
+               String requestId = execution.getVariable("DELNWKI_requestId")
+               String source = execution.getVariable("DELNWKI_source")
+               execution.setVariable("DELNWKI_Success", false)
+               try {
+                       WorkflowException wfe = execution.getVariable("WorkflowException")
+                       String errorCode = String.valueOf(wfe.getErrorCode())
+                       String errorMessage = wfe.getErrorMessage()
+
+                       falloutHandlerRequest =
+                           """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                             <request-id>${requestId}</request-id>
+                                             <action>DELETE</action>
+                                             <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+
+                       utils.logAudit(falloutHandlerRequest)
+                       execution.setVariable("DELNWKI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("ERROR", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       // caught exception
+                       String exceptionMessage = "Bpmn error encountered in DeleteNetworkInstanceInfra, buildErrorResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       falloutHandlerRequest =
+                       """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                             <request-id>${requestId}</request-id>
+                                             <action>CREATE</action>
+                                             <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${exceptionMessage}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>9999</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+                       execution.setVariable("DELNWKI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("DEBUG", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+               }
+       }
+
+
+       public void sendSyncError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       String requestId = execution.getVariable("att-mso-request-id")
+                       String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       String deleteNetworkRestError = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+                       utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + deleteNetworkRestError, isDebugEnabled)
+
+                       sendWorkflowResponse(execution, 500, deleteNetworkRestError)
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", " Sending Sync Error Activity Failed - DeleteNetworkInstanceInfra, sendSyncError(): " + "\n" + ex.getMessage(), isDebugEnabled)
+               }
+       }
+
+       public void processJavaException(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               try{
+                       utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+                       utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+                       utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+                       execution.setVariable("UnexpectedError", "Caught a Java Lang Exception")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+               }catch(BpmnError b){
+                       utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+                       execution.setVariable("UnexpectedError", "Exception in processJavaException method")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+               }
+               utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteServiceInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteServiceInstanceInfra.groovy
new file mode 100644 (file)
index 0000000..7004004
--- /dev/null
@@ -0,0 +1,549 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+import org.xml.sax.InputSource
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.springframework.web.util.UriUtils;
+
+/**
+ * This groovy class supports the <class>CreateServiceInstance.bpmn</class> process.
+ */
+public class DeleteServiceInstanceInfra extends AbstractServiceTaskProcessor {
+
+       String Prefix="DELSI_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+       JsonUtils jsonUtil = new JsonUtils()
+       VidUtils vidUtils = new VidUtils()
+
+       /**
+        * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
+        * @param execution
+        */
+       public InitializeProcessVariables(Execution execution){
+               /* Initialize all the process variables in this block */
+
+               execution.setVariable("DELSI_DeleteServiceInstanceJasonRequest", "")
+               execution.setVariable("DELSI_requestDetails", "")
+               execution.setVariable("DELSI_globalSubscriberId", "")
+               execution.setVariable("DELSI_serviceInstanceName", "")
+               execution.setVariable("DELSI_serviceInstanceId", "")
+               execution.setVariable("DELSI_serviceInstance", "")
+               execution.setVariable("DELSI_messageId", "")
+               execution.setVariable("DELSI_serviceType", "")
+
+               execution.setVariable("DELSI_queryAAISINameResponse", "")
+               execution.setVariable("DELSI_queryAAISINameCode", "")
+
+               execution.setVariable("DELSI_createDBRequest", "")
+               execution.setVariable("DELSI_dbResponse", "")
+               execution.setVariable("DELSI_dbReturnCode", "")
+
+               execution.setVariable("DELSI_createDBInfraErrorRequest", "")
+               execution.setVariable("DELSI_errorDBInfraErrorResponse", "")
+               execution.setVariable("DELSI_errorDBInfraErrorErrorCode", "")
+
+               execution.setVariable("DELSI_CompleteMsoProcessRequest", "")
+               execution.setVariable("DELSI_FalloutHandlerRequest", "")
+               execution.setVariable("DELSI_Success", false)
+               execution.setVariable("DELSI_unexpectedError", "")
+               execution.setVariable("DELSI_siInUse", false)
+
+       }
+
+       // **************************************************
+       //     Pre or Prepare Request Section
+       // **************************************************
+       /**
+        * This method is executed during the preProcessRequest task of the <class>DeleteServiceInstance.bpmn</class> process.
+        * @param execution
+        */
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside preProcessRequest DeleteServiceInstance Request ***** ", isDebugEnabled)
+
+               try {
+                       // initialize flow variables
+                       InitializeProcessVariables(execution)
+
+                       // check for incoming json message/input
+                       String deleteServiceInstanceIncoming = execution.getVariable("bpmnRequest")
+                       utils.logAudit(deleteServiceInstanceIncoming)
+                       execution.setVariable("DELSI_DeleteServiceInstanceJasonRequest", deleteServiceInstanceIncoming);
+
+                       // extract requestId
+                       String requestId = execution.getVariable("att-mso-request-id")
+                       execution.setVariable("DELSI_requestId", requestId)
+
+                       String serviceInstanceId = execution.getVariable("serviceInstanceId")
+                       execution.setVariable("DELSI_serviceInstanceId", serviceInstanceId)
+
+                       String requestAction = execution.getVariable("requestAction")
+                       execution.setVariable("requestAction", requestAction)
+
+                       String source = jsonUtil.getJsonValue(deleteServiceInstanceIncoming, "requestDetails.requestInfo.source")
+                       execution.setVariable("DELSI_source", source)
+
+                       // get variables
+                       // extract requestDetails
+                       String xmlRequestDetails = vidUtils.getJsonRequestDetailstoXml(deleteServiceInstanceIncoming)
+                       execution.setVariable("DELSI_requestDetails", xmlRequestDetails)
+
+                       utils.log("DEBUG", "xmlRequestDetails: " + xmlRequestDetails , isDebugEnabled)
+
+                       String xmlParameters = utils.getNodeXml(xmlRequestDetails, "requestParameters", false)
+                       utils.log("DEBUG","xmlParameters: " +  xmlParameters , isDebugEnabled)
+
+                       String serviceType = jsonUtil.getJsonValue(deleteServiceInstanceIncoming, "requestDetails.requestParameters.subscriptionServiceType")
+                       execution.setVariable("DELSI_serviceType", serviceType)
+
+                       // extract globalSubscriberId
+                       //String globalSubscriberId = jsonUtil.getJsonValue(deleteServiceInstanceIncoming, "requestDetails.subscriberInfo.globalSubscriberId")
+
+                       // prepare messageId
+                       String messageId = execution.getVariable("DELSI_messageId")  // for testing
+                       if (messageId == null || messageId == "") {
+                               messageId = UUID.randomUUID()
+                               utils.log("DEBUG", " DELSI_messageId, random generated: " + messageId, isDebugEnabled)
+                       } else {
+                               utils.log("DEBUG", " DELSI_messageId, pre-assigned: " + messageId, isDebugEnabled)
+                       }
+                       execution.setVariable("DELSI_messageId", messageId)
+
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+                       String aaiNamespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                       logDebug('AAI namespace is: ' + aaiNamespace, isDebugEnabled)
+                       execution.setVariable("DELSI_aaiNamespace","${aaiNamespace}")
+
+                       //Setting for Generic Sub Flows
+                       execution.setVariable("GENGS_type", "service-instance")
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex){
+                       String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+               }
+
+       }
+
+       public void sendSyncResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside sendSyncResponse of DeleteServiceInstance ***** ", isDebugEnabled)
+
+               try {
+                       String requestId = execution.getVariable("att-mso-request-id")
+                       String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+                       utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+                       sendWorkflowResponse(execution, 202, syncResponse)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+               }
+       }
+
+
+       public void processGetServiceInstanceResponse(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside processGetServiceInstanceResponse of DeleteServiceInstance ***** " , isDebugEnabled)
+
+               try {
+
+                       //Extract Global Sub Id
+                       String messageId = execution.getVariable("DELSI_requestId")
+                       String serviceInstanceId = execution.getVariable("serviceInstanceId")
+                       String siRelatedLink = execution.getVariable("GENGSI_siResourceLink")
+
+                       int custStart = siRelatedLink.indexOf("customer/")
+                       int custEnd = siRelatedLink.indexOf("/service-subscriptions")
+                       String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
+
+                       execution.setVariable("DELSI_globalSubscriberId",globalCustId)
+
+                       //Extract Service Type if not provided on request
+                       String serviceType = execution.getVariable("DELSI_serviceType")
+                       if(isBlank(serviceType)){
+                               int serviceStart = siRelatedLink.indexOf("service-subscription/")
+                               int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+                               String serviceTypeEncoded = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+
+                               serviceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
+                       }
+                       execution.setVariable("serviceType", serviceType)
+
+                       String serviceInstanceData = execution.getVariable("DELSI_serviceInstance");
+                       utils.log("DEBUG", " DELSI_serviceInstance:  " + serviceInstanceData, isDebugEnabled)
+
+                               //Confirm there are no related service instances (vnf/network or volume)
+                               if (utils.nodeExists(serviceInstanceData, "relationship-list")) {
+
+                                       InputSource source = new InputSource(new StringReader(serviceInstanceData));
+                                       DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                                       DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+                                       Document serviceXml = docBuilder.parse(source)
+
+                                       NodeList nodeList = serviceXml.getElementsByTagName("relationship")
+                                       for (int x = 0; x < nodeList.getLength(); x++) {
+                                               Node node = nodeList.item(x)
+                                               if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                                       Element eElement = (Element) node
+                                                       def e = eElement.getElementsByTagName("related-to").item(0).getTextContent()
+                                                       if(e.equals("generic-vnf") || e.equals("l3-network")){
+                                                               utils.log("DEBUG", "ServiceInstance still has relationship(s) to OpenStack.", isDebugEnabled)
+                                                               execution.setVariable("DELSI_siInUse", true)
+                                                               //there are relationship dependencies to this Service Instance
+                                                               String errorMessage = " Stopped deleting Service Instance, it has dependencies. Service instance id: " + serviceInstanceId
+                                                               utils.log("DEBUG", errorMessage, isDebugEnabled)
+                                                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+                                                       }else{
+                                                               utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
+                                                       }
+                                               }
+                                       }
+                               }
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception excp) {
+                       // try error for method block
+                       String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow in method processGetServiceInstanceResponse. Error was - " + excp.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+               }
+               utils.log("DEBUG", " ***** Completed processGetServiceInstanceResponse of DeleteServiceInstance ***** " , isDebugEnabled)
+       }
+
+       // *******************************
+       //     Build DB request Section
+       // *******************************
+       public void prepareDBRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       utils.log("DEBUG", " ***** Inside prepareDBRequest of DeleteServiceInstance ***** ", isDebugEnabled)
+
+                       String requestId = execution.getVariable("DELSI_requestId")
+                       String statusMessage = "Service Instance successfully deleted."
+
+                       //TODO - verify the format for Service Instance Delete,
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>COMPLETED</requestStatus>
+                                                               <progress>100</progress>
+                                                               <vnfOutputs/>
+                                                       </ns:updateInfraRequest>
+                                                  </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+                  execution.setVariable("DELSI_createDBRequest", buildDeleteDBRequestAsString)
+                  utils.logAudit(buildDeleteDBRequestAsString)
+
+               } catch (Exception ex) {
+                       // try error in method block
+                       String exceptionMessage = "Bpmn error encountered in DeleteServiceInstance flow. Unexpected Error from method prepareDBRequest() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+
+       // *****************************************
+       //     Prepare Completion request Section
+       // *****************************************
+       public void postProcessResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside postProcessResponse of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       // Display Success scenario for DB update Response:
+                       String dbReturnCode = execution.getVariable("DELSI_dbReturnCode")
+                       utils.log("DEBUG", " ***** Success DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+                       utils.log("DEBUG", " ***** Success DB Update Response String: " + '\n' + execution.getVariable("DELSI_dbResponse"), isDebugEnabled)
+
+                       if (dbReturnCode == "200") {
+                               String source = execution.getVariable("DELSI_source")
+                               String requestId = execution.getVariable("DELSI_requestId")
+
+                               String msoCompletionRequest =
+                                       """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                                               <request-id>${requestId}</request-id>
+                                                               <action>DELETE</action>
+                                                               <source>${source}</source>
+                                                          </request-info>
+                                                          <aetgt:status-message>Service Instance has been deleted successfully.</aetgt:status-message>
+                                                          <aetgt:mso-bpel-name>BPMN Service Instance action: DELETE</aetgt:mso-bpel-name>
+                                               </aetgt:MsoCompletionRequest>"""
+
+                                       // Format Response
+                                       String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+                                       utils.logAudit(xmlMsoCompletionRequest)
+                                       execution.setVariable("DELSI_Success", true)
+                                       execution.setVariable("DELSI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+                                       utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+
+                       } else {
+                               String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow. Unexpected Error from DB adapter, return code: " + dbReturnCode
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, exceptionMessage)
+
+                       }
+
+               } catch (BpmnError e) {
+               throw e;
+
+               } catch (Exception ex) {
+                       // try error in method block
+                       String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+
+       // *******************************
+       //     Build Error Section
+       // *******************************
+       public void prepareDBRequestError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareDBRequestError of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       String requestId = execution.getVariable("DELSI_requestId")
+                       String statusMessage = ""
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               WorkflowException wfe = execution.getVariable("WorkflowException")
+                               statusMessage = wfe.getErrorMessage()
+
+                       } else {
+                               statusMessage = "Encountered Error during DeleteServiceInstanceInfra proccessing. "
+                       }
+
+                       //TODO - verify the format for Service Instance Create,
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>FAILED</requestStatus>
+                                                               <vnfOutputs/>
+                                                       </ns:updateInfraRequest>
+                                                  </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  String buildDBRequestAsString = utils.formatXml(dbRequest)
+                  execution.setVariable("DELSI_createDBInfraErrorRequest", buildDBRequestAsString)
+                  utils.logAudit(buildDBRequestAsString)
+
+               } catch (Exception ex) {
+                       // try error in method block
+                       String exceptionMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow. Unexpected Error from method prepareDBRequestError() - " + ex.getMessage()
+                       exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+       // Prepare for FalloutHandler
+       public void buildErrorResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("ERROR", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+               String falloutHandlerRequest = ""
+               try {
+                       // Display Success scenario for DB update Response:
+                       String dbReturnCode = execution.getVariable("DELSI_errorDBInfraErrorErrorCode")
+                       utils.log("DEBUG", " ***** Error DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+                       utils.log("DEBUG", " ***** Error DB Update Response String: " + '\n' + execution.getVariable("DELSI_errorDBInfraErrorResponse"), isDebugEnabled)
+
+                       String requestId = execution.getVariable("DELSI_requestId")
+                       String source = execution.getVariable("DELSI_source")
+
+                       execution.setVariable("DELSI_Success", false)
+                       String errorMessage = ""
+                       String errorCode = ""
+
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               WorkflowException wfe = execution.getVariable("WorkflowException")
+                               errorMessage = wfe.getErrorMessage()
+                               errorCode = wfe.getErrorCode().toString()
+
+                       } else {
+                               errorMessage = "Bpmn error encountered in DeleteServiceInstanceInfra flow."
+                               errorCode = "2500"
+
+                       }
+
+                       falloutHandlerRequest =
+                               """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                                                xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                                                xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                                 <request-id>${requestId}</request-id>
+                                                 <action>DELETE</action>
+                                                 <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+
+                       utils.logAudit(falloutHandlerRequest)
+                       execution.setVariable("DELSI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("ERROR", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       // rebuild workflow exception
+                       String requestId = execution.getVariable("DELSI_requestId")
+                       String source = execution.getVariable("DELSI_source")
+                       String errorException = " Build Error Response exception encountered during method buildErrorResponse(), preparing request for FalloutHandler: - " + ex.getMessage()
+                       utils.log("DEBUG", errorException, isDebugEnabled)
+                       falloutHandlerRequest =
+                       """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                                                xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                                                xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                                 <request-id>${requestId}</request-id>
+                                                 <action>DELETE</action>
+                                                 <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+                       execution.setVariable("DELSI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("ERROR", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               }
+
+       }
+
+       public void sendSyncError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside sendSyncError() of DeleteServiceInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       String errorMessage = ""
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               WorkflowException wfe = execution.getVariable("WorkflowException")
+                               errorMessage = wfe.getErrorMessage()
+                       } else {
+                               errorMessage = "Sending Sync Error."
+                       }
+
+                       String buildworkflowException =
+                               """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                       <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+                                  </aetgt:WorkflowException>"""
+
+                       utils.logAudit(buildworkflowException)
+                       sendWorkflowResponse(execution, 500, buildworkflowException)
+
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+               }
+
+       }
+
+       public void processJavaException(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               try{
+                       utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+                       utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+                       utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+                       execution.setVariable("DELSI_unexpectedError", "Caught a Java Lang Exception")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+               }catch(BpmnError b){
+                       utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+                       execution.setVariable("DELSI_unexpectedError", "Exception in processJavaException method")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+               }
+               utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleInfra.groovy
new file mode 100644 (file)
index 0000000..bf5e62d
--- /dev/null
@@ -0,0 +1,350 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import groovy.json.JsonSlurper
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
+
+       /**
+        * Initialize the flow's variables.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable('prefix', 'DELVfModI_')
+               execution.setVariable('DELVfModI_requestInfo', null)
+               execution.setVariable('DELVfModI_requestId', null)
+               execution.setVariable('DELVfModI_source', null)
+               execution.setVariable('DELVfModI_vnfInputs', null)
+               execution.setVariable('DELVfModI_vnfId', null)
+               execution.setVariable('DELVfModI_vfModuleId', null)
+               execution.setVariable('DELVfModI_tenantId', null)
+               execution.setVariable('DELVfModI_volumeGroupId', null)
+               execution.setVariable('DELVfModI_vnfParams', null)
+               execution.setVariable('DELVfModI_updateInfraRequest', null)
+               execution.setVariable('DeleteVfModuleRequest', null)
+               execution.setVariable('DeleteVfModuleSuccessIndicator', false)
+       }
+
+       /**
+        * Process the incoming DELETE_VF_MODULE vnf-request.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               execution.setVariable("isVidRequest", "false")
+               initProcessVariables(execution)
+
+               def prefix = execution.getVariable('prefix')
+
+               def incomingRequest = execution.getVariable('bpmnRequest')
+
+               utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled)
+
+               // check if request is xml or json
+               try {
+                       def jsonSlurper = new JsonSlurper()
+                       Map reqMap = jsonSlurper.parseText(incomingRequest)
+                       utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
+
+                       def serviceInstanceId = execution.getVariable('serviceInstanceId')
+                       def vnfId = execution.getVariable('vnfId')
+
+                       def vidUtils = new VidUtils(this)
+
+                       String requestInXmlFormat = vidUtils.createXmlVfModuleRequest(execution, reqMap, 'DELETE_VF_MODULE', serviceInstanceId)
+
+                       utils.log("DEBUG", " Request in XML format: " + requestInXmlFormat, isDebugLogEnabled)
+
+                       execution.setVariable(prefix + 'Request', requestInXmlFormat)
+                       execution.setVariable(prefix+'vnfId', vnfId)
+                       execution.setVariable("isVidRequest", "true")
+
+               }
+               catch(groovy.json.JsonException je) {
+                       utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
+                       workflowException(execution, "Invalid request format", 400)
+
+               }
+               catch(Exception e) {
+                       String restFaultMessage = e.getMessage()
+                       utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
+                       workflowException(execution, restFaultMessage, 400)
+               }
+
+
+               try {
+
+                       String request = validateRequest(execution)
+                       execution.setVariable('DeleteVfModuleRequest', request)
+
+                       def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+                       execution.setVariable('DELVfModI_requestInfo', requestInfo)
+                       execution.setVariable('DELVfModI_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+                       execution.setVariable('DELVfModI_source', getNodeTextForce(requestInfo, 'source'))
+
+                       def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs')
+                       execution.setVariable('DELVfModI_vnfInputs', vnfInputs)
+                       execution.setVariable('DELVfModI_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+                       execution.setVariable('DELVfModI_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+                       execution.setVariable('DELVfModI_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+                       execution.setVariable('DELVfModI_volumeGroupId', getNodeTextForce(vnfInputs, 'volume-group-id'))
+
+                       def vnfParams = utils.getNodeXml(request, 'vnf-params')
+                       execution.setVariable('DELVfModI_vnfParams', vnfParams)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Sends the 'IN_PROGRESS' synchronous response.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void sendSynchResponse(Execution execution) {
+               def method = getClass().getSimpleName() + '.sendResponse(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestInfo = execution.getVariable('DELVfModI_requestInfo')
+                       def requestId = execution.getVariable('DELVfModI_requestId')
+                       def source = execution.getVariable('DELVfModI_source')
+                       def progress = getNodeTextForce(requestInfo, 'progress')
+                       if (progress.isEmpty()) {
+                               progress = '0'
+                       }
+                       def startTime = getNodeTextForce(requestInfo, 'start-time')
+                       if (startTime.isEmpty()) {
+                               startTime = System.currentTimeMillis()
+                       }
+
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       def vfModuleId = execution.getVariable('DELVfModI_vfModuleId')
+                       String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim()
+
+                       sendWorkflowResponse(execution, 200, synchResponse)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Currently passing the entire DELETE_VF_MODULE vnf-request to DoDeleteVfModule.
+        * 'DeleteVfModuleRequest' is now being set in preProcessRequest().
+        * TBD: may want to eventually create a specific request that only contains the needed fields.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepDoDeleteVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepDoDeleteVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepDoDeleteVfModule(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Prepare the DB update to add an entry for the Vf Module request.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepUpdateInfraRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepUpdateInfraRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestId = execution.getVariable('DELVfModI_requestId')
+                       def vnfId = execution.getVariable('DELVfModI_vnfId')
+                       def vfModuleId = execution.getVariable('DELVfModI_vfModuleId')
+                       def tenantId = execution.getVariable('DELVfModI_tenantId')
+                       def volumeGroupId = execution.getVariable('DELVfModI_volumeGroupId')
+
+                       String updateInfraRequest = """
+                               <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                                               xmlns:req="http://com.att.mso/requestsdb">
+                                       <soapenv:Header/>
+                                       <soapenv:Body>
+                                               <req:updateInfraRequest>
+                                                       <requestId>${requestId}</requestId>
+                                                       <lastModifiedBy>BPMN</lastModifiedBy>
+                                                       <requestStatus>COMPLETED</requestStatus>
+                                                       <progress>100</progress>
+                                               </req:updateInfraRequest>
+                                       </soapenv:Body>
+                               </soapenv:Envelope>
+                       """
+
+                       updateInfraRequest = utils.formatXml(updateInfraRequest)
+                       execution.setVariable('DELVfModI_updateInfraRequest', updateInfraRequest)
+                       logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepInfraRequest(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Builds a "CompletionHandler" request and stores it in the specified execution variable.
+        *
+        * @param execution the execution
+        * @param resultVar the execution variable in which the result will be stored
+        */
+       public void completionHandlerPrep(Execution execution, String resultVar) {
+               def method = getClass().getSimpleName() + '.completionHandlerPrep(' +
+                       'execution=' + execution.getId() +
+                       ', resultVar=' + resultVar +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def request = execution.getVariable("DeleteVfModuleRequest")
+                       def requestInfo = utils.getNodeXml(request, 'request-info', false)
+                       def action = utils.getNodeText1(requestInfo, "action")
+
+                       String content =
+                                       """  <aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                               xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                               xmlns:ns8="http://ecomp.att.com/mso/workflow/schema/v1">
+                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                       ${requestInfo}
+                       </request-info>
+                       <ns8:status-message>Vf Module has been deleted successfully.</ns8:status-message>
+                       <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>
+                       </aetgt:MsoCompletionRequest>"""
+
+                       content = utils.formatXml(content)
+                       logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+                       execution.setVariable(resultVar, content)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 2000, 'Internal Error')
+               }
+       }
+
+       /**
+        * Builds a "FalloutHandler" request and stores it in the specified execution variable.
+        *
+        * @param execution the execution
+        * @param resultVar the execution variable in which the result will be stored
+        */
+       public void falloutHandlerPrep(Execution execution, String resultVar) {
+               def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+                       'execution=' + execution.getId() +
+                       ', resultVar=' + resultVar +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def prefix = execution.getVariable('prefix')
+                       def request = execution.getVariable("DeleteVfModuleRequest")
+                       def requestInfo = utils.getNodeXml(request, 'request-info', false)
+                       def WorkflowException workflowException = execution.getVariable("WorkflowException")
+                       def errorResponseCode = workflowException.getErrorCode()
+                       def errorResponseMsg = workflowException.getErrorMessage()
+                       def encErrorResponseMsg = ""
+                       if (errorResponseMsg != null) {
+                               encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+                       }
+
+                       String content = """
+                               <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1"
+                                               xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
+                                               xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
+                                       ${requestInfo}
+                                       <sdncadapterworkflow:WorkflowException>
+                                               <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+                                               <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+                                       </sdncadapterworkflow:WorkflowException>
+                               </sdncadapterworkflow:FalloutHandlerRequest>
+                       """
+                       content = utils.formatXml(content)
+                       logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+                       execution.setVariable(resultVar, content)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 2000, 'Internal Error')
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVfModuleVolumeInfraV1.groovy
new file mode 100644 (file)
index 0000000..bfbaf68
--- /dev/null
@@ -0,0 +1,545 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import groovy.json.JsonSlurper
+import java.util.concurrent.ExecutionException;
+import org.springframework.web.util.UriUtils
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+/**
+ * This groovy class supports the <class>DeleteVfModuleVolume.bpmn</class> process.
+ */
+public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
+
+       private XmlParser xmlParser = new XmlParser()
+       /**
+        * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+        * @param execution
+        */
+       public InitializeProcessVariables(Execution execution){
+               execution.setVariable('prefix', 'DELVfModVol_')
+               execution.setVariable("DELVfModVol_volumeRequest", null)
+               execution.setVariable('DELVfModVol_requestInfo', null)
+               execution.setVariable('DELVfModVol_requestId', null)
+               execution.setVariable('DELVfModVol_source', null)
+               execution.setVariable('DELVfModVol_volumeInputs', null)
+               execution.setVariable('DELVfModVol_volumeOutputs', null)
+               execution.setVariable('DELVfModVol_volumeGroupId', null)
+               execution.setVariable('DELVfModVol_vnfType', null)
+               execution.setVariable('DELVfModVol_serviceId', null)
+               execution.setVariable('DELVfModVol_cloudRegion', null)
+               execution.setVariable('DELVfModVol_tenantId', null)
+               execution.setVariable('DELVfModVol_volumeParams', null)
+               execution.setVariable('DELVfModVol_volumeGroupHeatStackId', null)
+               execution.setVariable('DELVfModVol_volumeGroupTenantId', null)
+               execution.setVariable("DELVfModVol_queryAAIVolGrpResponse", null)
+               execution.setVariable('DELVfModVol_messageId', null)
+               execution.setVariable('DELVfModVol_deleteVnfARequest', null)
+               execution.setVariable('DELVfModVol_updateInfraRequest', null)
+               execution.setVariable('DELVfModVol_CompleteMsoProcessRequest', null)
+               execution.setVariable('DELVfModVol_WorkflowException', null)
+               execution.setVariable('DELVfModVol_TransactionSuccessIndicator', false)
+               execution.setVariable("DELVfModVol_isErrorMessageException", false)
+               execution.setVariable('DELVfModVol_syncResponseSent', false)
+       }
+
+       /**
+        * Perform initial processing, such as request validation, initialization of variables, etc.
+        * * @param execution
+        */
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               preProcessRequest(execution, isDebugEnabled)
+       }
+
+       /**
+        * This method is executed during the preProcessRequest task of the <class>DeleteVfModuleVolume.bpmn</class> process.
+        * @param execution
+        */
+       public void preProcessRequest (Execution execution, isDebugLogEnabled) {
+
+               InitializeProcessVariables(execution)
+
+               String createVolumeIncoming = validateRequest(execution)
+               utils.logAudit(createVolumeIncoming)
+
+               // check if request is xml or json
+               try {
+                       def jsonSlurper = new JsonSlurper()
+                       Map reqMap = jsonSlurper.parseText(createVolumeIncoming)
+                       utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
+
+                       def serviceInstanceId = execution.getVariable('serviceInstanceId')
+                       def volumeGroupId = execution.getVariable('volumeGroupId')
+                       def vidUtils = new VidUtils(this)
+                       createVolumeIncoming = vidUtils.createXmlVolumeRequest(reqMap, 'DELETE_VF_MODULE_VOL', serviceInstanceId, volumeGroupId)
+                       execution.setVariable("DELVfModVol_isVidRequest", true)
+               }
+               catch(groovy.json.JsonException je) {
+                       utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
+                       // assume request is in XML format - proceed as usual to process XML request
+               }
+
+               String request = utils.getNodeXml(createVolumeIncoming, "volume-request").drop(38).trim().replace("tag0:","").replace(":tag0","")
+               execution.setVariable("DELVfModVol_volumeRequest", request)
+
+               def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+               execution.setVariable('DELVfModVol_requestInfo', requestInfo)
+               String requestId = execution.getVariable("att-mso-request-id")
+               if (requestId == null || requestId == "") {
+                       requestId = getRequiredNodeText(execution, requestInfo, 'request-id')
+               }
+               execution.setVariable('DELVfModVol_requestId', requestId)
+               execution.setVariable('DELVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+
+               def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+               execution.setVariable('DELVfModVol_volumeInputs', volumeInputs)
+               execution.setVariable('DELVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+               execution.setVariable('DELVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+               execution.setVariable('DELVfModVol_serviceId', getRequiredNodeText(execution, volumeInputs, 'service-id'))
+               execution.setVariable('DELVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+               execution.setVariable('DELVfModVol_messageId', UUID.randomUUID().toString())
+               execution.setVariable('DELVfModVol_volumeOutputs', utils.getNodeXml(request, 'volume-outputs', false))
+               execution.setVariable('DELVfModVol_volumeParams', utils.getNodeXml(request, 'volume-params'))
+               execution.setVariable('DELVfModVol_cloudRegion', utils.getNodeText1(request, 'aic-cloud-region'))
+
+               logDebug('Request: ' + createVolumeIncoming, isDebugLogEnabled)
+       }
+
+       public void sendSyncResponse (Execution execution, isDebugEnabled) {
+
+               String volumeRequest = execution.getVariable("DELVfModVol_volumeRequest")
+               utils.log("DEBUG", " DELVfModVol_volumeRequest - " + "\n" + volumeRequest, isDebugEnabled)
+               // RESTResponse (for API Handler (APIH) Reply Task)
+               String deleteVolumeRequest =
+                               """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd" statusCode="200">
+                <rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
+                          contentType="text/xml">
+                               ${volumeRequest}
+                </rest:payload>
+                      </rest:RESTResponse>""".trim()
+
+               def isVidRequest = execution.getVariable('DELVfModVol_isVidRequest')
+               def syncResponse = ''
+
+               if(isVidRequest) {
+                       def serviceInstanceId = execution.getVariable('serviceInstanceId')
+                       def volumeGroupId = execution.getVariable('volumeGroupId')
+                       def requestId = execution.getVariable('DELVfModVol_requestId')
+                       syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+               }
+               else {
+                       syncResponse = utils.formatXml(deleteVolumeRequest)
+               }
+
+               execution.setVariable('DELVfModVol_syncResponseSent', true)
+
+               sendWorkflowResponse(execution, 200, syncResponse)
+       }
+
+
+       public void sendSyncError (Execution execution, isDebugEnabled) {
+               WorkflowException we = execution.getVariable('WorkflowException')
+               def errorCode = we?.getErrorCode()
+               def errorMessage = we?.getErrorMessage()
+               //default to 400 since only invalid request will trigger this method
+               sendWorkflowResponse(execution, 400, errorMessage)
+       }
+
+
+       public void callRESTQueryAAICloudRegion (Execution execution, isDebugEnabled) {
+
+               String cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+
+               String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+               String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+               utils.logAudit(queryCloudRegionRequest)
+               execution.setVariable("DELVfModVol_queryCloudRegionRequest", queryCloudRegionRequest)
+               utils.log("DEBUG", " DELVfModVol_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+               cloudRegion = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "PO", cloudRegion)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+               if ((cloudRegion != "ERROR")) {
+                       if(execution.getVariable("DELVfModVol_queryCloudRegionReturnCode") == "404"){
+                               execution.setVariable("DELVfModVol_aicCloudRegion", "AAIAIC25")
+                       }else{
+                               execution.setVariable("DELVfModVol_aicCloudRegion", cloudRegion)
+                       }
+                       execution.setVariable("DELVfModVol_cloudRegion", cloudRegion)
+                       execution.setVariable("DELVfModVol_isCloudRegionGood", true)
+
+               } else {
+                       utils.log("DEBUG", "AAI Query Cloud Region Unsuccessful.", isDebugEnabled)
+                       execution.setVariable("DELVfModVol_isCloudRegionGood", false)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable("DELVfModVol_queryCloudRegionReturnCode"))
+               }
+
+               utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("DELVfModVol_isCloudRegionGood"), isDebugEnabled)
+       }
+
+       /**
+        * Query volume group by id
+        * @param execution
+        */
+       public void queryAAIForVolumeGroup(Execution execution, isDebugLogEnabled) {
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+               def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+               if(volumeGroupId == null) {
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, 'volume-group-id is not provided in the request')
+                       throw new Exception('volume-group-id is not provided in the request')
+               }
+               String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+               String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+
+               utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+               logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
+
+               APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+               utils.logAudit("AAI query volume group by id return code: " + returnCode)
+               utils.logAudit("AAI query volume group by id response: " + aaiResponseAsString)
+
+               execution.setVariable("DELVfModVol_queryAAIVolGrpResponse", aaiResponseAsString)
+
+               if (returnCode=='200' || returnCode == '204') {
+
+                       def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+                       execution.setVariable('DELVfModVol_volumeGroupHeatStackId', heatStackId)
+
+                       if(hasVfModuleRelationship(aaiResponseAsString)){
+                               utils.log("DEBUG", 'Volume Group ' + volumeGroupId + ' currently in use', isDebugLogEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} currently in use - found vf-module relationship.")
+                       }
+
+                       def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+                       if (volumeGroupTenantId == null) {
+                               utils.log("DEBUG", "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}", isDebugLogEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id ${volumeGroupId}")
+                       }
+
+                       execution.setVariable('DELVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+                       logDebug('Received Tenant Id ' + volumeGroupTenantId + ' from AAI for Volume Group with Volume Group Id ' + volumeGroupId , isDebugLogEnabled)
+               }
+               else {
+                       if (returnCode=='404') {
+                               utils.log("DEBUG", "Volume Group ${volumeGroupId} not found in AAI", isDebugLogEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group ${volumeGroupId} not found in AAI. Response code: 404")
+                       }
+                       else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+
+       /**
+        * Extract the Tenant Id from the Volume Group information returned by AAI.
+        *
+        * @param volumeGroupXml Volume Group XML returned by AAI.
+        * @return the Tenant Id extracted from the Volume Group information. 'null' is returned if
+        * the Tenant Id is missing or could not otherwise be extracted.
+        */
+       private String getTenantIdFromVolumeGroup(String volumeGroupXml) {
+               def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+               def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+               if (relationshipList != null) {
+                       def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+                       for (Node relationship in relationships) {
+                               def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+                               if ((relatedTo != null) && (relatedTo.text().equals('tenant'))) {
+                                       def NodeList relationshipDataList = utils.getIdenticalChildren(relationship, 'relationship-data')
+                                       for (Node relationshipData in relationshipDataList) {
+                                               def Node relationshipKey = utils.getChildNode(relationshipData, 'relationship-key')
+                                               if ((relationshipKey != null) && (relationshipKey.text().equals('tenant.tenant-id'))) {
+                                                       def Node relationshipValue = utils.getChildNode(relationshipData, 'relationship-value')
+                                                       if (relationshipValue != null) {
+                                                               return relationshipValue.text()
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
+               return null
+       }
+
+       private boolean hasVnfRelationship(String volumeGroupXml) {
+               def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+               def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+               if (relationshipList != null) {
+                       def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+                       for (Node relationship in relationships) {
+                               def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+                               if ((relatedTo != null) && (relatedTo.text().equals('generic-vnf'))) {
+                                       def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+                                       if (relatedLink !=null && relatedLink.text() != null){
+                                               return true
+                                       }
+                               }
+                       }
+               }
+               return false
+       }
+
+       private boolean hasVfModuleRelationship(String volumeGroupXml) {
+               def Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+               def Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+               if (relationshipList != null) {
+                       def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+                       for (Node relationship in relationships) {
+                               def Node relatedTo = utils.getChildNode(relationship, 'related-to')
+                               if ((relatedTo != null) && (relatedTo.text().equals('vf-module'))) {
+                                       def Node relatedLink = utils.getChildNode(relationship, 'related-link')
+                                       if (relatedLink !=null && relatedLink.text() != null){
+                                               return true
+                                       }
+                               }
+                       }
+               }
+               return false
+       }
+
+       public void prepareVnfAdapterDeleteRequest(Execution execution, isDebugLogEnabled) {
+               def cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+               def tenantId = execution.getVariable('DELVfModVol_tenantId')
+               def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+               def volumeGroupHeatStackId = execution.getVariable('DELVfModVol_volumeGroupHeatStackId')
+               def requestId = execution.getVariable('DELVfModVol_requestId')
+               def serviceId = execution.getVariable('DELVfModVol_serviceId')
+
+               def messageId = execution.getVariable('DELVfModVol_messageId')
+               def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+               def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+               if ('true'.equals(useQualifiedHostName)) {
+                               notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+               }
+
+               String vnfAdapterRestRequest = """
+                       <deleteVolumeGroupRequest>
+                               <cloudSiteId>${cloudRegion}</cloudSiteId>
+                               <tenantId>${tenantId}</tenantId>
+                               <volumeGroupId>${volumeGroupId}</volumeGroupId>
+                               <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+                               <skipAAI>true</skipAAI>
+                           <msoRequest>
+                               <requestId>${requestId}</requestId>
+                               <serviceInstanceId>${serviceId}</serviceInstanceId>
+                           </msoRequest>
+                           <messageId>${messageId}</messageId>
+                           <notificationUrl>${notificationUrl}</notificationUrl>
+                       </deleteVolumeGroupRequest>
+               """
+               vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+               execution.setVariable('DELVfModVol_deleteVnfARequest', vnfAdapterRestRequest)
+               logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+       }
+
+
+       public void deleteVolGrpId(Execution execution, isDebugEnabled) {
+
+               // get variables
+               String queryAAIVolGrpIdResponse = execution.getVariable("DELVfModVol_queryAAIVolGrpResponse")
+               String groupId = utils.getNodeText(queryAAIVolGrpIdResponse, "volume-group-id")
+               String resourceVersion = utils.getNodeText(queryAAIVolGrpIdResponse, "resource-version")
+               String messageId = execution.getVariable('DELVfModVol_messageId')
+               String cloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+               String deleteAAIVolumeGrpIdRequest = aaiEndpoint + '/' + URLEncoder.encode(cloudRegion, "UTF-8")  + "/volume-groups/volume-group/" +  UriUtils.encode(groupId, "UTF-8")
+
+               if(resourceVersion !=null){
+                       deleteAAIVolumeGrpIdRequest = deleteAAIVolumeGrpIdRequest +'?resource-version=' + UriUtils.encode(resourceVersion, 'UTF-8')
+               }
+
+               utils.logAudit('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
+               utils.log("DEBUG", "Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest, isDebugEnabled)
+
+               APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
+
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+
+               utils.logAudit("AAI delete volume group return code: " + returnCode)
+               utils.logAudit("AAI delete volume group response: " + aaiResponseAsString)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               if (returnCode=='200' || (returnCode == '204')) {
+                       utils.log("DEBUG", "Volume group $groupId deleted.", isDebugEnabled)
+               } else {
+                       if (returnCode=='404') {
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $groupId not found for delete in AAI Response code: 404")
+                       } else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+
+
+       public void prepareDBRequest (Execution execution, isDebugLogEnabled) {
+
+               WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+
+               def requestId = execution.getVariable('DELVfModVol_requestId')
+               def volOutputs = execution.getVariable('DELVfModVol_volumeOutputs')
+               def statusMessage = "VolumeGroup successfully deleted"
+               def progress = "100"
+               def requestStatus = "COMPLETE"
+
+               if (workflowExceptionObj != null) {
+                       statusMessage = (workflowExceptionObj.getErrorMessage()).replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+                       execution.setVariable("DELVfModVol_WorkflowExceptionMessage", statusMessage)
+                       execution.setVariable("DELVfModVol_WorkflowExceptionCode", workflowExceptionObj.getErrorCode())
+                       requestStatus = "FAILURE"
+                       progress = ""
+               }
+
+               String updateInfraRequest = """
+                       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                                       xmlns:req="http://com.att.mso/requestsdb">
+                               <soapenv:Header/>
+                               <soapenv:Body>
+                                       <req:updateInfraRequest>
+                                               <requestId>${requestId}</requestId>
+                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                               <statusMessage>${statusMessage}</statusMessage>
+                                               <requestStatus>${requestStatus}</requestStatus>
+                                               <progress>${progress}</progress>
+                                               <vnfOutputs>${volOutputs}</vnfOutputs>
+                                       </req:updateInfraRequest>
+                               </soapenv:Body>
+                       </soapenv:Envelope>
+               """
+
+               updateInfraRequest = utils.formatXml(updateInfraRequest)
+               execution.setVariable('DELVfModVol_updateInfraRequest', updateInfraRequest)
+               logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+       }
+
+
+       public void prepareCompletionHandlerRequest (Execution execution, isDebugLogEnabled) {
+               def requestId = execution.getVariable("att-mso-request-id")
+               def source = execution.getVariable("DELVfModVol_source")
+
+               String msoCompletionRequest =
+                       """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                               <request-id>${requestId}</request-id>
+                                               <action>DELETE</action>
+                                               <source>${source}</source>
+                                       </request-info>
+                                       <aetgt:status-message>Volume Group has been deleted successfully.</aetgt:status-message>
+                                       <aetgt:mso-bpel-name>BPMN VF Module Volume action: DELETE</aetgt:mso-bpel-name>
+                               </aetgt:MsoCompletionRequest>"""
+
+               String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+               execution.setVariable('DELVfModVol_CompleteMsoProcessRequest', xmlMsoCompletionRequest)
+               utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugLogEnabled)
+
+       }
+
+
+
+       public void prepareFalloutHandler (Execution execution, isDebugEnabled) {
+
+               execution.setVariable("DELVfModVol_Success", false)
+               String requestId = execution.getVariable("DELVfModVol_requestId")
+               String source = execution.getVariable("DELVfModVol_source")
+
+               WorkflowException workflowExceptionObj = execution.getVariable("WorkflowException")
+               def errorMessage = workflowExceptionObj.getErrorMessage()
+               def errorCode =  workflowExceptionObj.getErrorCode()
+
+               String falloutHandlerRequest =
+                   """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                            xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                            xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                  <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                     <request-id>${requestId}</request-id>
+                                     <action>DELETE</action>
+                                     <source>${source}</source>
+                                  </request-info>
+                                       <aetgt:WorkflowException>
+                                     <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                     <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                       </aetgt:WorkflowException>
+                               </aetgt:FalloutHandlerRequest>"""
+
+               // Format Response
+               String xmlHandlerRequest = utils.formatXml(falloutHandlerRequest)
+               utils.logAudit(xmlHandlerRequest)
+
+               execution.setVariable("DELVfModVol_FalloutHandlerRequest", xmlHandlerRequest)
+               utils.log("ERROR", "  Overall Error Response going to FalloutHandler: " + "\n" + xmlHandlerRequest, isDebugEnabled)
+
+       }
+
+
+       /**
+        * Create a WorkflowException for the error case where the Tenant Id from
+        * AAI did not match the Tenant Id in the incoming request.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void handleTenantIdMismatch(Execution execution, isDebugLogEnabled) {
+
+               def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
+               def aicCloudRegion = execution.getVariable('DELVfModVol_aicCloudRegion')
+               def tenantId = execution.getVariable('DELVfModVol_tenantId')
+               def volumeGroupTenantId = execution.getVariable('DELVfModVol_volumeGroupTenantId')
+
+               def String errorMessage = 'TenantId ' + tenantId + ' in incoming request does not match Tenant Id ' + volumeGroupTenantId +
+                       ' retrieved from AAI for Volume Group Id ' + volumeGroupId
+
+               logError('Error in DeleteVfModuleVolume: ' + errorMessage)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               exceptionUtil.buildWorkflowException(execution, 5000, errorMessage)
+
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DeleteVnfInfra.groovy
new file mode 100644 (file)
index 0000000..e53df32
--- /dev/null
@@ -0,0 +1,250 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList
+
+import org.xml.sax.InputSource
+
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+
+
+/**
+ * This class supports the DeleteVnfInfra Flow
+ * with the Deletion of a generic vnf for
+ * infrastructure.
+ */
+class DeleteVnfInfra extends AbstractServiceTaskProcessor {
+
+       String Prefix="DELVI_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+       JsonUtils jsonUtil = new JsonUtils()
+       VidUtils vidUtils = new VidUtils(this)
+
+       /**
+        * This method gets and validates the incoming
+        * request.
+        *
+        * @param - execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED DeleteVnfInfra PreProcessRequest Process*** ", isDebugEnabled)
+
+               execution.setVariable("DELVI_SuccessIndicator", false)
+               execution.setVariable("DELVI_vnfInUse", false)
+
+               try{
+                       // Get Variables
+                       String deleteVnfRequest = execution.getVariable("bpmnRequest")
+                       execution.setVariable("DELVI_DeleteVnfRequest", deleteVnfRequest)
+                       utils.logAudit("Incoming DeleteVnfInfra Request is: \n" + deleteVnfRequest)
+
+                       if(deleteVnfRequest != null){
+
+                               String requestId = execution.getVariable("att-mso-request-id")
+                               execution.setVariable("DELVI_requestId", requestId)
+
+                               String serviceInstanceId = execution.getVariable("serviceInstanceId")
+                               execution.setVariable("DELVI_serviceInstanceId", serviceInstanceId)
+                               utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+
+                               String vnfId = execution.getVariable("vnfId")
+                               execution.setVariable("DELVI_vnfId", vnfId)
+                               utils.log("DEBUG", "Incoming Vnf(Instance) Id is: " + vnfId, isDebugEnabled)
+
+                               String source = jsonUtil.getJsonValue(deleteVnfRequest, "requestDetails.requestInfo.source")
+                               execution.setVariable("DELVI_source", source)
+                               utils.log("DEBUG", "Incoming Source is: " + source, isDebugEnabled)
+
+                               //For Completion Handler & Fallout Handler
+                               String requestInfo =
+                               """<request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                       <request-id>${requestId}</request-id>
+                                       <action>DELETE</action>
+                                       <source>${source}</source>
+                                  </request-info>"""
+
+                               execution.setVariable("DELVI_requestInfo", requestInfo)
+
+                               // Setting for sub flow calls
+                               execution.setVariable("DELVI_type", "generic-vnf")
+
+                       }else{
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Bpmn Request is Null.")
+                       }
+
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", " Error Occured in DeleteVnfInfra PreProcessRequest method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra PreProcessRequest")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra PreProcessRequest Process ***", isDebugEnabled)
+       }
+
+       public void sendSyncResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " *** STARTED DeleteVnfInfra SendSyncResponse Process *** ", isDebugEnabled)
+
+               try {
+                       String requestId = execution.getVariable("DELVI_requestId")
+                       String vnfId = execution.getVariable("DELVI_vnfId")
+
+                       String DeleteVnfResponse = """{"requestReferences":{"instanceId":"${vnfId}","requestId":"${requestId}"}}""".trim()
+
+                       utils.log("DEBUG", " DeleteVnfInfra Sync Response is: \n"  + DeleteVnfResponse, isDebugEnabled)
+                       execution.setVariable("DELVI_sentSyncResponse", true)
+
+                       sendWorkflowResponse(execution, 202, DeleteVnfResponse)
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", "Error Occured in DeleteVnfInfra SendSyncResponse Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra SendSyncResponse Process")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra SendSyncResponse Process ***", isDebugEnabled)
+       }
+
+       public void processGetVnfResponse(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED DeleteVnfInfra processGetVnfResponse Process *** ", isDebugEnabled)
+               try {
+                       String vnf = execution.getVariable("DELVI_genericVnf")
+                       String resourceVersion = utils.getNodeText1(vnf, "resource-version")
+                       execution.setVariable("DELVI_resourceVersion", resourceVersion)
+
+                       if(utils.nodeExists(vnf, "relationship")){
+                               InputSource source = new InputSource(new StringReader(vnf));
+                               DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                               DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+                               Document vnfXml = docBuilder.parse(source)
+
+                               NodeList nodeList = vnfXml.getElementsByTagName("relationship")
+                               for (int x = 0; x < nodeList.getLength(); x++) {
+                                       Node node = nodeList.item(x)
+                                       if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                               Element eElement = (Element) node
+                                               def e = eElement.getElementsByTagName("related-to").item(0).getTextContent()
+                                               if(e.equals("volume-group") || e.equals("l3-network") || e.equals("vserver")){
+                                                       utils.log("DEBUG", "Generic Vnf still has relationship to OpenStack.", isDebugEnabled)
+                                                       execution.setVariable("DELVI_vnfInUse", true)
+                                               }else{
+                                                       utils.log("DEBUG", "Relationship NOT related to OpenStack", isDebugEnabled)
+                                               }
+                                       }
+                               }
+                       }
+
+                       if(utils.nodeExists(vnf, "vf-module")){
+                               execution.setVariable("DELVI_vnfInUse", true)
+                               utils.log("DEBUG", "Generic Vnf still has vf-modules.", isDebugEnabled)
+                       }
+
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", "Error Occured in DeleteVnfInfra processGetVnfResponse Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra processGetVnfResponse Process")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra processGetVnfResponse Process ***", isDebugEnabled)
+       }
+
+       public void prepareCompletionHandlerRequest(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " *** STARTED DeleteVnfInfra PrepareCompletionHandlerRequest Process *** ", isDebugEnabled)
+
+               try {
+                       String requestInfo = execution.getVariable("DELVI_requestInfo")
+                       requestInfo = utils.removeXmlPreamble(requestInfo)
+                       String vnfId = execution.getVariable("DELVI_vnfId")
+
+                       String request =
+                               """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                                       ${requestInfo}
+                                                       <status-message>Vnf has been deleted successfully.</status-message>
+                                                       <vnfId>${vnfId}</vnfId>
+                                                       <mso-bpel-name>DeleteVnfInfra</mso-bpel-name>
+                                               </aetgt:MsoCompletionRequest>"""
+
+                       execution.setVariable("DELVI_completionHandlerRequest", request)
+                       utils.log("DEBUG", "Completion Handler Request is: " + request, isDebugEnabled)
+
+                       execution.setVariable("WorkflowResponse", "Success") // for junits
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", "Error Occured in DeleteVnfInfra PrepareCompletionHandlerRequest Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra PrepareCompletionHandlerRequest Process")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra PrepareCompletionHandlerRequest Process ***", isDebugEnabled)
+       }
+
+       public void sendErrorResponse(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " *** STARTED DeleteVnfInfra sendErrorResponse Process *** ", isDebugEnabled)
+               try {
+                       def sentSyncResponse = execution.getVariable("DELVI_sentSyncResponse")
+                       if(sentSyncResponse == false){
+                               utils.log("DEBUG", "Sending a Sync Error Response", isDebugEnabled)
+                               WorkflowException wfex = execution.getVariable("WorkflowException")
+                               String response = exceptionUtil.buildErrorResponseXml(wfex)
+
+                               utils.logAudit(response)
+                               sendWorkflowResponse(execution, 500, response)
+                       }else{
+                               utils.log("DEBUG", "A Sync Response has already been sent. Skipping Send Sync Error Response.", isDebugEnabled)
+                       }
+
+               } catch(Exception ex) {
+                       utils.log("DEBUG", "Error Occured in DeleteVnfInfra sendErrorResponse Process " + ex.getMessage(), isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DeleteVnfInfra sendErrorResponse Process")
+               }
+               utils.log("DEBUG", "*** COMPLETED DeleteVnfInfra sendErrorResponse Process ***", isDebugEnabled)
+       }
+
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModule.groovy
new file mode 100644 (file)
index 0000000..8293bfa
--- /dev/null
@@ -0,0 +1,1281 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.apache.commons.codec.binary.Base64
+import org.springframework.web.util.UriUtils
+
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.NamedNodeMap
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource
+
+
+
+public class DoCreateVfModule extends VfModuleBase {
+
+       String Prefix="DCVFM_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       /**
+        * Validates the request message and sets up the workflow.
+        * @param execution the execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               execution.setVariable('prefix', Prefix)
+try{
+               String request = execution.getVariable("DoCreateVfModuleRequest")
+               utils.logAudit("DoCreateVfModule request: " + request)
+
+               def rollbackData = execution.getVariable("RollbackData")
+               if (rollbackData == null) {
+                       rollbackData = new RollbackData()
+               }
+
+               execution.setVariable ("CreateAAIVfModuleRequest", request)
+               execution.setVariable("DCVFM_vnfParamsExistFlag", false)
+               //tenantId
+               def tenantId = ""
+               if (utils.nodeExists(request, "tenant-id")) {
+                       tenantId = utils.getNodeText(request, "tenant-id")
+               }
+               execution.setVariable("DCVFM_tenantId", tenantId)
+               rollbackData.put("VFMODULE", "tenantid", tenantId)
+               //volumeGroupId
+               def volumeGroupId = ""
+               if (utils.nodeExists(request, "volume-group-id")) {
+                       volumeGroupId = utils.getNodeText(request, "volume-group-id")
+               }
+               execution.setVariable("DCVFM_volumeGroupId", volumeGroupId)
+               //volumeGroupId
+               def volumeGroupName = ""
+               if (utils.nodeExists(request, "volume-group-name")) {
+                       volumeGroupName = utils.getNodeText(request, "volume-group-name")
+               }
+               execution.setVariable("DCVFM_volumeGroupName", volumeGroupName)
+               //cloudSiteId
+               def cloudSiteId = ""
+               if (utils.nodeExists(request, "aic-cloud-region")) {
+                       cloudSiteId = utils.getNodeText(request, "aic-cloud-region")
+               }
+               execution.setVariable("DCVFM_cloudSiteId", cloudSiteId)
+               rollbackData.put("VFMODULE", "aiccloudregion", cloudSiteId)
+               logDebug("cloudSiteId: " + cloudSiteId, isDebugLogEnabled)
+               //vnfType
+               def vnfType = ""
+               if (utils.nodeExists(request, "vnf-type")) {
+                       vnfType = utils.getNodeText(request, "vnf-type")
+               }
+               execution.setVariable("DCVFM_vnfType", vnfType)
+               rollbackData.put("VFMODULE", "vnftype", vnfType)
+               logDebug("vnfType: " + vnfType, isDebugLogEnabled)
+               //vnfName
+               def vnfName = ""
+               if (utils.nodeExists(request, "vnf-name")) {
+                       vnfName = utils.getNodeText(request, "vnf-name")
+               }
+               execution.setVariable("DCVFM_vnfName", vnfName)
+               rollbackData.put("VFMODULE", "vnfname", vnfName)
+               logDebug("vnfName: " + vnfName, isDebugLogEnabled)
+               //vnfId
+               def vnfId = ""
+               if (utils.nodeExists(request, "vnf-id")) {
+                       vnfId = utils.getNodeText(request, "vnf-id")
+               }
+               execution.setVariable("DCVFM_vnfId", vnfId)
+               rollbackData.put("VFMODULE", "vnfid", vnfId)
+               logDebug("vnfId: " + vnfId, isDebugLogEnabled)
+               //vfModuleName
+               def vfModuleName = ""
+               if (utils.nodeExists(request, "vf-module-name")) {
+                       vfModuleName = utils.getNodeText(request, "vf-module-name")
+               }
+               execution.setVariable("DCVFM_vfModuleName", vfModuleName)
+               rollbackData.put("VFMODULE", "vfmodulename", vfModuleName)
+               logDebug("vfModuleName: " + vfModuleName, isDebugLogEnabled)
+               //vfModuleModelName
+               def vfModuleModelName = ""
+               if (utils.nodeExists(request, "vf-module-model-name")) {
+                       vfModuleModelName = utils.getNodeText(request, "vf-module-model-name")
+               }
+               execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName)
+               rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName)
+               logDebug("vfModuleModelName: " + vfModuleModelName, isDebugLogEnabled)
+               //vfModuleId
+               def vfModuleId = ""
+               if (utils.nodeExists(request, "vf-module-id")) {
+                       vfModuleId = utils.getNodeText(request, "vf-module-id")
+               }
+               execution.setVariable("DCVFM_vfModuleId", vfModuleId)
+               logDebug("vfModuleId: " + vfModuleId, isDebugLogEnabled)
+               def requestId = ""
+               if (utils.nodeExists(request, "request-id")) {
+                       requestId = utils.getNodeText(request, "request-id")
+               }
+               execution.setVariable("DCVFM_requestId", requestId)
+               logDebug("requestId: " + requestId, isDebugLogEnabled)
+               //serviceId
+               def serviceId = ""
+               if (utils.nodeExists(request, "service-id")) {
+                       serviceId = utils.getNodeText(request, "service-id")
+               }
+               execution.setVariable("DCVFM_serviceId", serviceId)
+               logDebug("serviceId: " + serviceId, isDebugLogEnabled)
+               //serviceInstanceId
+               def serviceInstanceId = ""
+               if (utils.nodeExists(request, "service-instance-id")) {
+                       serviceInstanceId = utils.getNodeText(request, "service-instance-id")
+               }
+               execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
+               rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
+               logDebug("serviceInstanceId: " + serviceInstanceId, isDebugLogEnabled)
+               //source
+               def source = ""
+               if (utils.nodeExists(request, "source")) {
+                       source = utils.getNodeText(request, "source")
+               }
+               execution.setVariable("DCVFM_source", source)
+               rollbackData.put("VFMODULE", "source", source)
+               logDebug("source: " + source, isDebugLogEnabled)
+               //backoutOnFailure
+               NetworkUtils networkUtils = new NetworkUtils()
+               def backoutOnFailure = networkUtils.isRollbackEnabled(execution,request)
+               execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
+               logDebug("backoutOnFailure: " + backoutOnFailure, isDebugLogEnabled)
+               //isBaseVfModule
+               def isBaseVfModule = "false"
+               if (utils.nodeExists(request, "is-base-vf-module")) {
+                       isBaseVfModule = utils.getNodeText(request, "is-base-vf-module")
+               }
+               execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule)
+               logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+
+               //asdcServiceModelVersion
+               def asdcServiceModelVersion = ""
+               if (utils.nodeExists(request, "asdc-service-model-version")) {
+                       asdcServiceModelVersion = utils.getNodeText(request, "asdc-service-model-version")
+               }
+               execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
+               logDebug("asdcServiceModelVersion: " + asdcServiceModelVersion, isDebugLogEnabled)
+
+               //Get or Generate UUID
+               String uuid = execution.getVariable("DCVFM_uuid")
+               if(uuid == null){
+                       uuid = UUID.randomUUID()
+                       logDebug("Generated messageId (UUID) is: " + uuid, isDebugLogEnabled)
+               }else{
+                       logDebug("Found messageId (UUID) is: " + uuid, isDebugLogEnabled)
+               }
+               execution.setVariable("DCVFM_uuid", uuid)
+               execution.setVariable("DCVFM_baseVfModuleId", "")
+               execution.setVariable("DCVFM_baseVfModuleHeatStackId", "")
+               execution.setVariable("DCVFM_heatStackId", "")
+               execution.setVariable("DCVFM_contrailServiceInstanceFqdn", "")
+               execution.setVariable("DCVFM_volumeGroupStackId", "")
+               execution.setVariable("DCVFM_cloudRegionForVolume", "")
+               rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "false")
+               rollbackData.put("VFMODULE", "rollbackUpdateAAIVfModule", "false")
+               rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "false")
+               rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "false")
+               rollbackData.put("VFMODULE", "rollbackSDNCRequestAssign", "false")
+               rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "false")
+
+               String sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+                       if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+                               def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+                               logError(msg)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                       }
+                       execution.setVariable("DCVFM_sdncCallbackUrl", sdncCallbackUrl)
+                       utils.logAudit("SDNC Callback URL: " + sdncCallbackUrl)
+                   logDebug("SDNC Callback URL is: " + sdncCallbackUrl, isDebugLogEnabled)
+                       String vnfCallbackUrl = (String) execution.getVariable('URN_mso_workflow_vnfadapter_rest_callback')
+                       if (vnfCallbackUrl == null || vnfCallbackUrl.trim().isEmpty()) {
+                               def msg = 'Required variable \'URN_mso_workflow_vnfadapter_rest_callback\' is missing'
+                               logError(msg)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                       }
+
+               // Process the parameters
+
+               String vnfParamsChildNodes = utils.getChildNodes(request, "vnf-params")
+               if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
+                               utils.log("DEBUG", "Request contains NO VNF Params", isDebugLogEnabled)
+               }else{
+                               utils.log("DEBUG", "Request does contain VNF Params", isDebugLogEnabled)
+                               execution.setVariable("DCVFM_vnfParamsExistFlag", true)
+
+                               InputSource xmlSource = new InputSource(new StringReader(request));
+                               DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                               docFactory.setNamespaceAware(true)
+                               DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+                               Document xml = docBuilder.parse(xmlSource)
+                               //Get params, build map
+                               Map<String, String> paramsMap = new HashMap<String, String>()
+                               NodeList paramsList = xml.getElementsByTagNameNS("*", "param")
+
+                               for (int z = 0; z < paramsList.getLength(); z++) {
+                                       Node node = paramsList.item(z)
+                                       String paramValue = node.getTextContent()
+                                       NamedNodeMap e = node.getAttributes()
+                                       String paramName = e.getNamedItem("name").getTextContent()
+                                       paramsMap.put(paramName, paramValue)
+                               }
+                               execution.setVariable("DCVFM_vnfParamsMap", paramsMap)
+                       }
+
+               execution.setVariable("RollbackData", rollbackData)
+}catch(BpmnError b){
+                       throw b
+}catch(Exception e){
+       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
+}
+
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+
+       /**
+        * Validates a workflow response.
+        * @param execution the execution
+        * @param responseVar the execution variable in which the response is stored
+        * @param responseCodeVar the execution variable in which the response code is stored
+        * @param errorResponseVar the execution variable in which the error response is stored
+        */
+       public void validateWorkflowResponse(Execution execution, String responseVar,
+                       String responseCodeVar, String errorResponseVar) {
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
+       }
+
+
+       /**
+        * Sends the empty, synchronous response back to the API Handler.
+        * @param execution the execution
+        */
+       public void sendResponse(Execution execution) {
+               def method = getClass().getSimpleName() + '.sendResponse(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       buildResponse(execution, "", 200)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Internal Error')
+               }
+       }
+
+       /**
+        * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+        * A 200 response is expected with the VNF info in the response body. Will find out the base module info
+        * and existing VNF's name for add-on modules
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void postProcessCreateAAIVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.getVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def createResponse = execution.getVariable('DCVFM_createVfModuleResponse')
+                       utils.logAudit("createVfModule Response: " + createResponse)
+
+                       def rollbackData = execution.getVariable("RollbackData")
+                       String vnfName = utils.getNodeText1(createResponse, 'vnf-name')
+                       if (vnfName != null) {
+                               execution.setVariable('DCVFM_vnfName', vnfName)
+                               logDebug("vnfName retrieved from AAI is: " + vnfName, isDebugLogEnabled)
+                               rollbackData.put("VFMODULE", "vnfname", vnfName)
+                       }
+                       String vnfId = utils.getNodeText1(createResponse, 'vnf-id')
+                       execution.setVariable('DCVFM_vnfId', vnfId)
+                       logDebug("vnfId is: " + vnfId, isDebugLogEnabled)
+                       String vfModuleId = utils.getNodeText1(createResponse, 'vf-module-id')
+                       execution.setVariable('DCVFM_vfModuleId', vfModuleId)
+                       logDebug("vfModuleId is: " + vfModuleId, isDebugLogEnabled)
+                       rollbackData.put("VFMODULE", "vnfid", vnfId)
+                       rollbackData.put("VFMODULE", "vfmoduleid", vfModuleId)
+                       rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true")
+                       rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "true")
+                       execution.setVariable("RollbackData", rollbackData)
+               } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while postProcessing CreateAAIVfModule request:' + ex.getMessage(),isDebugLogEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Bad response from CreateAAIVfModule' + ex.getMessage())
+               }
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+
+
+       /**
+        * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+        * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void queryAAIVfModule(Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               def method = getClass().getSimpleName() + '.getVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('DCVFM_vnfId')
+                       def vfModuleId = execution.getVariable('DCVFM_vfModuleId')
+
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String  aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+                       String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+                       utils.logAudit("AAI endPoint: " + endPoint)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       try {
+                               RESTConfig config = new RESTConfig(endPoint);
+                               def responseData = ''
+                               def aaiRequestId = UUID.randomUUID().toString()
+                               RESTClient client = new RESTClient(config).
+                                       addHeader('X-TransactionId', aaiRequestId).
+                                       addHeader('X-FromAppId', 'MSO').
+                                       addHeader('Content-Type', 'application/xml').
+                                       addHeader('Accept','application/xml');
+
+                               if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                       client.addAuthorizationHeader(basicAuthCred)
+                               }
+
+                               logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+                               APIResponse response = client.httpGet()
+                               utils.logAudit("createVfModule - invoking httpGet() to AAI")
+
+                               responseData = response.getResponseBodyAsString()
+                               if (responseData != null) {
+                                       logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+                               }
+
+                               utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
+                               utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+                               execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
+                               execution.setVariable('DCVFM_queryAAIVfModuleResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                               if (response.getStatusCode() == 200) {
+                                       // Parse the VNF record from A&AI to find base module info
+                                       logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled)
+                                       if (responseData != null) {
+                                               def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+                                               def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+                                               def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+                                               int vfModulesSize = 0
+                                               for (i in 0..vfModules.size()-1) {
+                                                       def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+                                                       def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
+
+                                                       if (isBaseVfModule == "true") {
+                                                           String baseModuleId = utils.getNodeText1(vfModuleXml, "vf-module-id")
+                                                           execution.setVariable("DCVFM_baseVfModuleId", baseModuleId)
+                                                           logDebug('Received baseVfModuleId: ' + baseModuleId, isDebugLogEnabled)
+                                                           String baseModuleHeatStackId = utils.getNodeText1(vfModuleXml, "heat-stack-id")
+                                                           execution.setVariable("DCVFM_baseVfModuleHeatStackId", baseModuleHeatStackId)
+                                                           logDebug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId, isDebugLogEnabled)
+                                                       }
+                                               }
+                                       }
+                               }
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+               }
+       }
+
+
+       public void preProcessSDNCAssignRequest(Execution execution){
+               def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+               logDebug(" ======== STARTED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+               def vnfId = execution.getVariable("DCVFM_vnfId")
+               def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+               def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+               logDebug("NEW VNF ID: " + vnfId, isDebugLogEnabled)
+               utils.logAudit("NEW VNF ID: " + vnfId)
+
+               try{
+
+                       //Build SDNC Request
+
+                       def svcInstId = ""
+                       if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+                               svcInstId = vfModuleId
+                       }
+                       else {
+                               svcInstId = serviceInstanceId
+                       }
+
+                       String assignSDNCRequest = buildSDNCRequest(execution, svcInstId, "assign")
+
+                       assignSDNCRequest = utils.formatXml(assignSDNCRequest)
+                       execution.setVariable("DCVFM_assignSDNCRequest", assignSDNCRequest)
+                       logDebug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest, isDebugLogEnabled)
+                       utils.logAudit("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing preProcessSDNCAssignRequest. Exception is:\n" + e, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
+               }
+               logDebug("======== COMPLETED preProcessSDNCAssignRequest ======== ", isDebugLogEnabled)
+       }
+
+       public void preProcessSDNCGetRequest(Execution execution){
+               def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+               utils.log("DEBUG", " ======== STARTED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled)
+               try{
+                       String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+                       utils.logAudit("DCVFM_assignSDNCAdapterResponse is: \n" + response)
+
+                       String data = utils.getNodeXml(response, "response-data")
+                       data = data.replaceAll("&lt;", "<")
+                       data = data.replaceAll("&gt;", ">")
+                       String vnfId = utils.getNodeText1(data, "vnf-id")
+                       def vfModuleId = execution.getVariable('DCVFM_vfModuleId')
+                       def serviceInstanceId = execution.getVariable('DCVFM_serviceInstanceId')
+
+                       String uuid = execution.getVariable('testReqId') // for junits
+                       if(uuid==null){
+                               uuid = execution.getVariable("att-mso-request-id") + "-" +      System.currentTimeMillis()
+                       }
+
+                       String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vfModuleId
+                       def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
+                       utils.logAudit("callbackUrl:" + callbackUrl)
+
+                       def svcInstId = ""
+                       if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+                               svcInstId = vfModuleId
+                       }
+                       else {
+                               svcInstId = serviceInstanceId
+                       }
+
+                       //!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE
+                       sleep(5000)
+
+                       String SDNCGetRequest =
+                                       """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
+                                                                                       xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                                       xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                       <sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
+                                       <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+                                       <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+                                       <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+                                       <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                       <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+                               </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+                       utils.logAudit("SDNCGetRequest: \n" + SDNCGetRequest)
+                       execution.setVariable("DCVFM_getSDNCRequest", SDNCGetRequest)
+                       utils.log("DEBUG", "Outgoing GetSDNCRequest is: \n" + SDNCGetRequest, isDebugLogEnabled)
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occurred Processing preProcessSDNCGetRequest. Exception is:\n" + e, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
+               }
+               utils.log("DEBUG", "======== COMPLETED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled)
+       }
+
+
+       public void preProcessVNFAdapterRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.VNFAdapterCreateVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               //def xml = execution.getVariable("DoCreateVfModuleRequest")
+               //logDebug('VNF REQUEST is: ' + xml, isDebugLogEnabled)
+
+               //Get variables
+               //cloudSiteId
+               def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+               //tenantId
+               def tenantId = execution.getVariable("DCVFM_tenantId")
+               //vnfType
+               def vnfType = execution.getVariable("DCVFM_vnfType")
+               //vnfName
+               def vnfName = execution.getVariable("DCVFM_vnfName")
+               //vnfId
+               def vnfId = execution.getVariable("DCVFM_vnfId")
+               //vfModuleName
+               def vfModuleName = execution.getVariable("DCVFM_vfModuleName")
+               //vfModuleModelName
+               def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
+               //vfModuleId
+               def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+               //requestId
+               def requestId = execution.getVariable("DCVFM_requestId")
+               //serviceId
+               def serviceId = execution.getVariable("DCVFM_serviceId")
+               //serviceInstanceId
+               def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+               //backoutOnFailure
+               def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure")
+               //volumeGroupId
+               def volumeGroupId = execution.getVariable("DCVFM_volumeGroupId")
+               // baseVfModuleId
+               def baseVfModuleId = execution.getVariable("DCVFM_baseVfModuleId")
+               // baseVfModuleStackId
+               def baseVfModuleStackId = execution.getVariable("DCVFM_baseVfModuleHeatStackId")
+               // asdcServiceModelVersion
+               def asdcServiceModelVersion = execution.getVariable("DCVFM_asdcServiceModelVersion")
+               //volumeGroupStackId
+               def volumeGroupStackId = execution.getVariable("DCVFM_volumeGroupStackId")
+
+               def messageId = execution.getVariable('att-mso-request-id') + '-' +
+                                System.currentTimeMillis()
+
+               def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+               def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+
+               utils.logAudit("notificationUrl: " + notificationUrl)
+               utils.logAudit("QualifiedHostName: " + useQualifiedHostName)
+
+               if ('true'.equals(useQualifiedHostName)) {
+                       notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+               }
+
+               String vnfParams
+                       if(execution.getVariable("DCVFM_vnfParamsExistFlag") == true){
+                               StringBuilder sbParams = new StringBuilder()
+                               Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
+
+                               for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+                                       String paramsXml
+                                       String paramName = entry.getKey();
+                                       String paramValue = entry.getValue()
+                                       paramsXml =
+                                                       """     <entry>
+                                                       <key>${paramName}</key>
+                                               <value>${paramValue}</value>
+                                               </entry>
+                                       """
+
+                                       vnfParams = sbParams.append(paramsXml)
+                               }
+                       }else{
+                               vnfParams = ""
+                       }
+
+               //Get SDNC Response Data for VnfSubCreate Request
+               String sdncGetResponse = execution.getVariable('DCVFM_getSDNCAdapterResponse')
+               utils.logAudit("sdncGetResponse: " + sdncGetResponse)
+
+               String vfModuleParams = buildVfModuleParams(vnfParams, sdncGetResponse, vnfId, vnfName,
+                               vfModuleId, vfModuleName)
+
+               def svcInstId = ""
+               if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+                               svcInstId = serviceId
+               }
+               else {
+                       svcInstId = serviceInstanceId
+               }
+
+
+               def createVnfARequest = """
+               <createVfModuleRequest>
+               <cloudSiteId>${cloudSiteId}</cloudSiteId>
+               <tenantId>${tenantId}</tenantId>
+               <vnfId>${vnfId}</vnfId>
+               <vnfName>${vnfName}</vnfName>
+               <vfModuleName>${vfModuleName}</vfModuleName>
+               <vfModuleId>${vfModuleId}</vfModuleId>
+               <vnfType>${vnfType}</vnfType>
+               <vfModuleType>${vfModuleModelName}</vfModuleType>
+               <vnfVersion>${asdcServiceModelVersion}</vnfVersion>
+               <requestType></requestType>
+               <volumeGroupId>${volumeGroupId}</volumeGroupId>
+       <volumeGroupStackId>${volumeGroupStackId}</volumeGroupStackId>
+       <baseVfModuleId>${baseVfModuleId}</baseVfModuleId>
+       <baseVfModuleStackId>${baseVfModuleStackId}</baseVfModuleStackId>
+       <skipAAI>true</skipAAI>
+       <backout>${backoutOnFailure}</backout>
+       <failIfExists>true</failIfExists>
+               <vfModuleParams>
+               ${vfModuleParams}
+               </vfModuleParams>
+               <msoRequest>
+                       <requestId>${requestId}</requestId>
+                       <serviceInstanceId>${svcInstId}</serviceInstanceId>
+               </msoRequest>
+               <messageId>${messageId}</messageId>
+               <notificationUrl>${notificationUrl}</notificationUrl>
+               </createVfModuleRequest>"""
+
+               utils.logAudit("Create VfModule Request to VNF Adapter : " + createVnfARequest)
+               logDebug("Create VfModule Request to VNF Adapter: " + createVnfARequest, isDebugLogEnabled)
+               execution.setVariable("DCVFM_createVnfARequest", createVnfARequest)
+       }
+
+       /**
+        * Validates the request, request id and service instance id.  If a problem is found,
+        * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+        * method also sets up the log context for the workflow.
+        * @param execution the execution
+        * @return the validated request
+        */
+       public String validateInfraRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String processKey = getProcessKey(execution);
+               def prefix = execution.getVariable("prefix")
+
+               if (prefix == null) {
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")
+               }
+
+               try {
+                       def request = execution.getVariable(prefix + 'Request')
+
+                       if (request == null) {
+                               request = execution.getVariable(processKey + 'Request')
+
+                               if (request == null) {
+                                       request = execution.getVariable('bpmnRequest')
+                               }
+
+                               setVariable(execution, processKey + 'Request', null);
+                               setVariable(execution, 'bpmnRequest', null);
+                               setVariable(execution, prefix + 'Request', request);
+                       }
+
+                       if (request == null) {
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
+                       }
+                       utils.logAudit("DoCreateVfModule Request: " + request)
+
+                       /*
+
+                       def requestId = execution.getVariable("att-mso-request-id")
+
+                       if (requestId == null) {
+                               createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+                       }
+
+                       def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+                       if (serviceInstanceId == null) {
+                               createWorkflowException(execution, 1002, processKey + " request message has no att-mso-service-instance-id")
+                       }
+
+                       utils.logContext(requestId, serviceInstanceId)
+                       */
+                       logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+                       return request
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
+               }
+       }
+
+       public boolean isVolumeGroupIdPresent(Execution execution) {
+
+               def method = getClass().getSimpleName() + '.isVolumeGroupIdPresent(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def request = execution.getVariable('DoCreateVfModuleRequest')
+               String volumeGroupId = utils.getNodeText1(request, "volume-group-id")
+               if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+                       logDebug('No volume group id is present', isDebugLogEnabled)
+                       return false
+               }
+               else {
+                       logDebug('Volume group id is present', isDebugLogEnabled)
+                       return true
+               }
+
+       }
+
+       public boolean isVolumeGroupNamePresent(Execution execution) {
+
+               def method = getClass().getSimpleName() + '.isVolumeGroupNamePresent(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def request = execution.getVariable('DoCreateVfModuleRequest')
+               String volumeGroupName = utils.getNodeText1(request, "volume-group-name")
+               if (volumeGroupName == null || volumeGroupName.isEmpty()) {
+                       logDebug('No volume group name is present', isDebugLogEnabled)
+                       return false
+               }
+               else {
+                       logDebug('Volume group name is present', isDebugLogEnabled)
+                       return true
+               }
+
+       }
+
+       public String buildSDNCRequest(Execution execution, String svcInstId, String action){
+
+               String uuid = execution.getVariable('testReqId') // for junits
+               if(uuid==null){
+                       uuid = execution.getVariable("att-mso-request-id") + "-" +      System.currentTimeMillis()
+               }
+               def callbackURL = execution.getVariable("DCVFM_sdncCallbackUrl")
+               def requestId = execution.getVariable("DCVFM_requestId")
+               def serviceId = execution.getVariable("DCVFM_serviceId")
+               def vnfType = execution.getVariable("DCVFM_vnfType")
+               def vnfName = execution.getVariable("DCVFM_vnfName")
+               def tenantId = execution.getVariable("DCVFM_tenantId")
+               def source = execution.getVariable("DCVFM_source")
+               def backoutOnFailure = execution.getVariable("DCVFM_backoutOnFailure")
+               def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+               def vfModuleName = execution.getVariable("DCVFM_vfModuleName")
+               def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
+               def vnfId = execution.getVariable("DCVFM_vnfId")
+               def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+
+               String sdncVNFParamsXml = ""
+
+               if(execution.getVariable("DCVFM_vnfParamsExistFlag") == true){
+                       sdncVNFParamsXml = buildSDNCParamsXml(execution)
+               }else{
+                       sdncVNFParamsXml = ""
+               }
+
+               String sdncRequest =
+               """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
+                                                                                                       xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                                                       xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+          <sdncadapter:RequestHeader>
+                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                               <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>
+                               <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+                               <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+                               <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+               </sdncadapter:RequestHeader>
+       <sdncadapterworkflow:SDNCRequestData>
+               <request-information>
+                       <request-id>${requestId}</request-id>
+                       <request-action>VNFActivateRequest</request-action>
+                       <source>${source}</source>
+                       <notification-url/>
+               </request-information>
+               <service-information>
+                       <service-id>${serviceId}</service-id>
+                       <service-type>${serviceId}</service-type>
+                       <service-instance-id>${svcInstId}</service-instance-id>
+                       <subscriber-name>notsurewecare</subscriber-name>
+               </service-information>
+               <vnf-request-information>
+                       <vnf-id>${vfModuleId}</vnf-id>
+                       <vnf-type>${vfModuleModelName}</vnf-type>
+                       <vnf-name>${vfModuleName}</vnf-name>
+                       <generic-vnf-id>${vnfId}</generic-vnf-id>
+                       <generic-vnf-name>${vnfName}</generic-vnf-name>
+                       <generic-vnf-type>${vnfType}</generic-vnf-type>
+                       <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+                       <tenant>${tenantId}</tenant>
+               ${sdncVNFParamsXml}
+               </vnf-request-information>
+       </sdncadapterworkflow:SDNCRequestData>
+       </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+       utils.logAudit("sdncRequest:  " + sdncRequest)
+       return sdncRequest
+
+       }
+
+       public void preProcessSDNCActivateRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessSDNCActivateRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               execution.setVariable("prefix", Prefix)
+               logDebug(" ======== STARTED preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+               try{
+                       String vnfId = execution.getVariable("DCVFM_vnfId")
+                       String vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+                       String serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
+
+                       def svcInstId = ""
+                       if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+                               svcInstId = vfModuleId
+                       }
+                       else {
+                               svcInstId = serviceInstanceId
+                       }
+                       String activateSDNCRequest = buildSDNCRequest(execution, svcInstId, "activate")
+
+                       execution.setVariable("DCVFM_activateSDNCRequest", activateSDNCRequest)
+                       logDebug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest, isDebugLogEnabled)
+                       utils.logAudit("Outgoing CommitSDNCRequest is: \n"  + activateSDNCRequest)
+
+               }catch(Exception e){
+                       log.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during  preProcessSDNCActivateRequest Method:\n" + e.getMessage())
+               }
+               logDebug("======== COMPLETED  preProcessSDNCActivateRequest Process ======== ", isDebugLogEnabled)
+       }
+
+       public void postProcessVNFAdapterRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.postProcessVNFAdapterRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               execution.setVariable("prefix",Prefix)
+               try{
+               logDebug(" *** STARTED postProcessVNFAdapterRequest Process*** ", isDebugLogEnabled)
+
+               String vnfResponse = execution.getVariable("DCVFM_createVnfAResponse")
+               logDebug("VNF Adapter Response is: " + vnfResponse, isDebugLogEnabled)
+               utils.logAudit("createVnfAResponse is: \n"  + vnfResponse)
+
+               RollbackData rollbackData = execution.getVariable("RollbackData")
+               if(vnfResponse != null){
+
+                       if(vnfResponse.contains("createVfModuleResponse")){
+                               logDebug("Received a Good Response from VNF Adapter for CREATE_VF_MODULE Call.", isDebugLogEnabled)
+                               execution.setVariable("DCVFM_vnfVfModuleCreateCompleted", true)
+                               String heatStackId = utils.getNodeText1(vnfResponse, "vfModuleStackId")
+                               execution.setVariable("DCVFM_heatStackId", heatStackId)
+                               logDebug("Received heat stack id from VNF Adapter: " + heatStackId, isDebugLogEnabled)
+                               rollbackData.put("VFMODULE", "heatstackid", heatStackId)
+                               // Parse vnfOutputs for network_fqdn
+                               if (vnfResponse.contains("vfModuleOutputs")) {
+                                       def vfModuleOutputsXml = utils.getNodeXml(vnfResponse, "vfModuleOutputs")
+                                       InputSource source = new InputSource(new StringReader(vfModuleOutputsXml));
+                       DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                       docFactory.setNamespaceAware(true)
+                       DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+                       Document outputsXml = docBuilder.parse(source)
+
+                                       NodeList entries = outputsXml.getElementsByTagNameNS("*", "entry")
+                                       for (int i = 0; i< entries.getLength(); i++) {
+                                               Node node = entries.item(i)
+                                               if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                                       Element element = (Element) node
+                                                       String key = element.getElementsByTagNameNS("*", "key").item(0).getTextContent()
+                                                       if (key.equals("contrail-service-instance-fqdn")) {
+                                                               String contrailServiceInstanceFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+                                                               logDebug("Obtained contrailServiceInstanceFqdn: " + contrailServiceInstanceFqdn, isDebugLogEnabled)
+                                                               execution.setVariable("DCVFM_contrailServiceInstanceFqdn", contrailServiceInstanceFqdn)
+                                                       }
+                                               }
+                                       }
+                               }
+                       }else{
+                               logDebug("Received a BAD Response from VNF Adapter for CREATE_VF_MODULE Call.", isDebugLogEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
+                       }
+               }else{
+                       logDebug("Response from VNF Adapter is Null for CREATE_VF_MODULE Call.", isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Empty response from VNF Adapter")
+               }
+
+               rollbackData.put("VFMODULE", "rollbackVnfAdapterCreate", "true")
+               execution.setVariable("RollbackData", rollbackData)
+
+               }catch(BpmnError b){
+                       throw b
+               }catch(Exception e){
+                       logDebug("Internal Error Occured in PostProcess Method", isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Internal Error Occured in PostProcess Method")
+               }
+               logDebug(" *** COMPLETED postProcessVnfAdapterResponse Process*** ", isDebugLogEnabled)
+       }
+
+
+       public void preProcessUpdateAAIVfModuleRequestOrch(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessUpdateAAIVfModuleRequestOrch(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               execution.setVariable("prefix", Prefix)
+               logDebug(" ======== STARTED preProcessUpdateAAIVfModuleRequestOrch ======== ", isDebugLogEnabled)
+
+               try{
+
+                       //Build UpdateAAIVfModule Request
+                       boolean setContrailServiceInstanceFqdn = false
+                       def contrailServiceInstanceFqdn = execution.getVariable("DCVFM_contrailServiceInstanceFqdn")
+                       if (!contrailServiceInstanceFqdn.equals("")) {
+                               setContrailServiceInstanceFqdn = true
+                       }
+
+                       String updateAAIVfModuleRequest = buildUpdateAAIVfModuleRequest(execution, false, true, true, setContrailServiceInstanceFqdn)
+
+                       updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+                       execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
+                       logDebug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest, isDebugLogEnabled)
+                       utils.logAudit("Outgoing UpdateAAIVfModuleRequest is: \n"  + updateAAIVfModuleRequest)
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing preProcessUpdateAAIVfModuleRequestOrch. Exception is:\n" + e, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestOrch Method:\n" + e.getMessage())
+               }
+               logDebug("======== COMPLETED preProcessUpdateAAIVfModuleRequestOrch ======== ", isDebugLogEnabled)
+
+       }
+
+       public void preProcessUpdateAAIVfModuleRequestGroup(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessUpdateAAIVfModuleRequestGroup(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               execution.setVariable("prefix", Prefix)
+               logDebug(" ======== STARTED preProcessUpdateAAIVfModuleRequestGroup ======== ", isDebugLogEnabled)
+
+               try{
+
+                       //Build UpdateAAIVfModule Request
+
+                       String updateAAIVfModuleRequest = buildUpdateAAIVfModuleRequest(execution, true, false, false, false)
+
+                       updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+                       execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
+                       logDebug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest, isDebugLogEnabled)
+                       utils.logAudit("Outgoing UpdateAAIVfModuleRequest is: \n"  + updateAAIVfModuleRequest)
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing preProcessUpdateAAIVfModuleRequestGroup. Exception is:\n" + e, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestGroup Method:\n" + e.getMessage())
+               }
+               logDebug("======== COMPLETED  preProcessUpdateAAIVfModuleRequestGroup ======== ", isDebugLogEnabled)
+
+       }
+
+       public void validateSDNCResponse(Execution execution, String response, String method){
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+               WorkflowException workflowException = execution.getVariable("WorkflowException")
+               boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+               utils.logAudit("workflowException: " + workflowException)
+
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+               utils.logAudit("SDNCResponse: " + response)
+
+               String sdncResponse = response
+               if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+                       logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call.  Response is: \n" + sdncResponse, isDebugLogEnabled)
+                       RollbackData rollbackData = execution.getVariable("RollbackData")
+
+                       if(method.equals("assign")){
+                               rollbackData.put("VFMODULE", "rollbackSDNCRequestAssign", "true")
+                               execution.setVariable("CRTGVNF_sdncAssignCompleted", true)
+                       }
+                       else if (method.equals("activate")) {
+                               rollbackData.put("VFMODULE", "rollbackSDNCRequestActivate", "true")
+                       }
+                       execution.setVariable("RollbackData", rollbackData)
+               }else{
+                       logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+                       throw new BpmnError("MSOWorkflowException")
+               }
+               logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+       }
+
+       public void preProcessUpdateAfterCreateRequest(Execution execution){
+               def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+               utils.log("DEBUG", " ======== STARTED preProcessRequest Process ======== ", isDebugLogEnabled)
+               try{
+                       String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+                       utils.logAudit("DCVFM_assignSDNCAdapterResponse: " + response)
+
+                       String data = utils.getNodeXml(response, "response-data")
+                       data = data.replaceAll("&lt;", "<")
+                       data = data.replaceAll("&gt;", ">")
+                       String vnfId = utils.getNodeText1(data, "vnf-id")
+
+                       String uuid = execution.getVariable('testReqId') // for junits
+                       if(uuid==null){
+                               uuid = execution.getVariable("att-mso-request-id") + "-" +      System.currentTimeMillis()
+                       }
+
+                       String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vnfId
+                       def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
+                       utils.logAudit("callbackUrl: " + callbackUrl)
+
+                       String SDNCGetRequest =
+                                       """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
+                                                                                       xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                                       xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                       <sdncadapter:RequestId>${uuid}</sdncadapter:RequestId>
+                                       <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+                                       <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+                                       <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                       <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+                               </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData></sdncadapterworkflow:SDNCRequestData>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+                       execution.setVariable("DCVFM_getSDNCRequest", SDNCGetRequest)
+                       utils.log("DEBUG", "Outgoing GetSDNCRequest is: \n" + SDNCGetRequest, isDebugLogEnabled)
+                       utils.logAudit("Outgoing GetSDNCRequest: " + SDNCGetRequest)
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing preProcessSDNCGetRequest. Exception is:\n" + e, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
+               }
+               utils.log("DEBUG", "======== COMPLETED preProcessSDNCGetRequest Process ======== ", isDebugLogEnabled)
+       }
+
+       public String buildUpdateAAIVfModuleRequest(Execution execution, boolean updateVolumeGroupId,
+               boolean updateOrchestrationStatus, boolean updateHeatStackId, boolean updateContrailFqdn){
+
+               def vnfId = execution.getVariable("DCVFM_vnfId")
+               def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+               def volumeGroupIdString = ""
+               if (updateVolumeGroupId) {
+                       volumeGroupIdString = "<volume-group-id>" + execution.getVariable("DCVFM_volumeGroupId") +
+                                       "</volume-group-id>"
+               }
+               def orchestrationStatusString = ""
+               if (updateOrchestrationStatus) {
+                       orchestrationStatusString = "<orchestration-status>Created</orchestration-status>"
+               }
+               def heatStackIdString = ""
+               if (updateHeatStackId) {
+                       heatStackIdString = "<heat-stack-id>" + execution.getVariable("DCVFM_heatStackId") + "</heat-stack-id>"
+               }
+               def contrailFqdnString = ""
+               if (updateContrailFqdn) {
+                       contrailFqdnString = "<contrail-service-instance-fqdn>" + execution.getVariable("DCVFM_contrailServiceInstanceFqdn") +
+                               "</contrail-service-instance-fqdn>"
+               }
+
+               String updateAAIVfModuleRequest =
+                       """<UpdateAAIVfModuleRequest>
+                               <vnf-id>${vnfId}</vnf-id>
+                               <vf-module-id>${vfModuleId}</vf-module-id>
+                               ${heatStackIdString}
+                               ${orchestrationStatusString}
+                               ${volumeGroupIdString}
+                               ${contrailFqdnString}
+                       </UpdateAAIVfModuleRequest>"""
+
+       utils.logAudit("updateAAIVfModule Request: " + updateAAIVfModuleRequest)
+       return updateAAIVfModuleRequest
+
+       }
+
+       public String buildSDNCParamsXml(Execution execution){
+
+               String params = ""
+               StringBuilder sb = new StringBuilder()
+               Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
+
+               for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
+                       String paramsXml
+                       String key = entry.getKey();
+                       if(key.endsWith("_network")){
+                               String requestKey = key.substring(0, key.indexOf("_network"))
+                               String requestValue = entry.getValue()
+                               paramsXml =
+"""<vnf-networks>
+       <network-role>{ functx:substring-before-match(data($param/@name), '_network') }</network-role>
+       <network-name>{ $param/text() }</network-name>
+</vnf-networks>"""
+                       }else{
+                       paramsXml = ""
+                       }
+                       params = sb.append(paramsXml)
+               }
+               return params
+       }
+
+   public void queryCloudRegion (Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+               utils.log("DEBUG", " ======== STARTED queryCloudRegion ======== ", isDebugLogEnabled)
+
+               try {
+                       String cloudRegion = execution.getVariable("DCVFM_cloudSiteId")
+
+                       // Prepare AA&I url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+                       String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+                       utils.logAudit("CloudRegion Request: " + queryCloudRegionRequest)
+
+                       execution.setVariable("DCVFM_queryCloudRegionRequest", queryCloudRegionRequest)
+                       utils.log("DEBUG", "DCVFM_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugLogEnabled)
+
+                       cloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
+
+                       if ((cloudRegion != "ERROR")) {
+                               if(execution.getVariable("DCVFM_queryCloudRegionReturnCode") == "404"){
+                                       execution.setVariable("DCVFM_cloudRegionForVolume", "AAIAIC25")
+                               }else{
+                               execution.setVariable("DCVFM_cloudRegionForVolume", cloudRegion)
+                               }
+                               execution.setVariable("DCVFM_isCloudRegionGood", true)
+                       } else {
+                               String errorMessage = "AAI Query Cloud Region Unsuccessful. AAI Response Code: " + execution.getVariable("DCVFM_queryCloudRegionReturnCode")
+                               utils.log("DEBUG", errorMessage, isDebugLogEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+                               execution.setVariable("DCVFM_isCloudRegionGood", false)
+                       }
+                       utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("DCVFM_isCloudRegionGood"), isDebugLogEnabled)
+
+               } catch(BpmnError b){
+                       utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugLogEnabled)
+                       throw b
+               }catch (Exception ex) {
+                       // try error
+                       String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + ex.getMessage()
+                       utils.log("ERROR", " AAI Query Cloud Region Failed.  Exception - " + "\n" + errorMessage, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during queryCloudRegion method")
+               }
+       }
+
+   /**
+    *This method occurs when an MSOWorkflowException is caught.  It logs the
+    *variables and ensures that the "WorkflowException" Variable is set.
+    *
+    */
+   public void processBPMNException(Execution execution){
+          def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+          execution.setVariable("prefix",Prefix)
+          try{
+                  utils.log("DEBUG", "Caught a BPMN Exception", isDebugEnabled)
+                  utils.log("DEBUG", "Started processBPMNException Method", isDebugEnabled)
+                  utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+                  if(execution.getVariable("WorkflowException") == null){
+                          exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during DoCreateVfModule Sub Process")
+                  }
+
+          }catch(Exception e){
+                  utils.log("DEBUG", "Caught Exception during processBPMNException Method: " + e, isDebugEnabled)
+          }
+          utils.log("DEBUG", "Completed processBPMNException Method", isDebugEnabled)
+   }
+
+   public void prepareCreateAAIVfModuleVolumeGroupRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepareCreateAAIVfModuleVolumeGroupRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               execution.setVariable("prefix", Prefix)
+               logDebug(" ======== STARTED prepareCreateAAIVfModuleVolumeGroupRequest ======== ", isDebugLogEnabled)
+
+               try{
+
+                       //Build CreateAAIVfModuleVolumeGroup Request
+
+                       def vnfId = execution.getVariable("DCVFM_vnfId")
+                       def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
+                       def volumeGroupId = execution.getVariable("DCVFM_volumeGroupId")
+                       //def aicCloudRegion = execution.getVariable("DCVFM_cloudSiteId")
+                       def aicCloudRegion = execution.getVariable("DCVFM_cloudRegionForVolume")
+                       String createAAIVfModuleVolumeGroupRequest =
+                       """<CreateAAIVfModuleVolumeGroupRequest>
+                               <vnf-id>${vnfId}</vnf-id>
+                               <vf-module-id>${vfModuleId}</vf-module-id>
+                               <volume-group-id>${volumeGroupId}</volume-group-id>
+                               <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+                       </CreateAAIVfModuleVolumeGroupRequest>"""
+
+                       createAAIVfModuleVolumeGroupRequest = utils.formatXml(createAAIVfModuleVolumeGroupRequest)
+                       execution.setVariable("DCVFM_createAAIVfModuleVolumeGroupRequest", createAAIVfModuleVolumeGroupRequest)
+                       logDebug("Outgoing CreateAAIVfModuleVolumeGroupRequest is: \n" + createAAIVfModuleVolumeGroupRequest, isDebugLogEnabled)
+                       utils.logAudit("Outgoing CreateAAIVfModuleVolumeGroupRequest is: \n"  + createAAIVfModuleVolumeGroupRequest)
+
+               }catch(Exception e){
+                       utils.log("ERROR", "Exception Occured Processing prepareCreateAAIVfModuleVolumeGroupRequest. Exception is:\n" + e, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareCreateAAIVfModuleVolumeGroupRequest Method:\n" + e.getMessage())
+               }
+               logDebug("======== COMPLETED  prepareCreateAAIVfModuleVolumeGroupRequest ======== ", isDebugLogEnabled)
+
+       }
+
+
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleRollback.groovy
new file mode 100644 (file)
index 0000000..76347d5
--- /dev/null
@@ -0,0 +1,284 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+
+public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
+
+       def Prefix="DCVFMR_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable("prefix",Prefix)
+       }
+
+       // parse the incoming DELETE_VF_MODULE request for the Generic Vnf and Vf Module Ids
+       // and formulate the outgoing request for PrepareUpdateAAIVfModuleRequest
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+               initProcessVariables(execution)
+
+               def rollbackData = execution.getVariable("RollbackData")
+               String vnfId = rollbackData.get("VFMODULE", "vnfid")
+               execution.setVariable("DCVFMR_vnfId", vnfId)
+               String vfModuleId = rollbackData.get("VFMODULE", "vfmoduleid")
+               execution.setVariable("DCVFMR_vfModuleId", vfModuleId)
+               String source = rollbackData.get("VFMODULE", "source")
+               execution.setVariable("DCVFMR_source", source)
+               String serviceInstanceId = rollbackData.get("VFMODULE", "serviceInstanceId")
+               execution.setVariable("DCVFMR_serviceInstanceId", serviceInstanceId)
+               String serviceId = rollbackData.get("VFMODULE", "service-id")
+               execution.setVariable("DCVFMR_serviceId", serviceId)
+               String vnfType = rollbackData.get("VFMODULE", "vnftype")
+               execution.setVariable("DCVFMR_vnfType", vnfType)
+               String vnfName = rollbackData.get("VFMODULE", "vnfname")
+               execution.setVariable("DCVFMR_vnfName", vnfName)
+               String tenantId = rollbackData.get("VFMODULE", "tenantid")
+               execution.setVariable("DCVFMR_tenantId", tenantId)
+               String vfModuleName = rollbackData.get("VFMODULE", "vfmodulename")
+               execution.setVariable("DCVFMR_vfModuleName", vfModuleName)
+               String vfModuleModelName = rollbackData.get("VFMODULE", "vfmodulemodelname")
+               execution.setVariable("DCVFMR_vfModuleModelName", vfModuleModelName)
+               String cloudSiteId = rollbackData.get("VFMODULE", "aiccloudregion")
+               execution.setVariable("DCVFMR_cloudSiteId", cloudSiteId)
+               String heatStackId = rollbackData.get("VFMODULE", "heatstackid")
+               execution.setVariable("DCVFMR_heatStackId", heatStackId)
+               String requestId = rollbackData.get("VFMODULE", "attmsorequestid")
+               execution.setVariable("DCVFMR_requestId", requestId)
+               //String serviceInstanceId = rollbackData.get("VFMODULE", "attmsoserviceinstanceid")
+               //execution.setVariable("DCVFMR_serviceInstanceId", serviceInstanceId)
+               execution.setVariable("DCVFMR_rollbackPrepareUpdateVfModule", rollbackData.get("VFMODULE", "rollbackPrepareUpdateVfModule"))
+               execution.setVariable("DCVFMR_rollbackUpdateAAIVfModule", rollbackData.get("VFMODULE", "rollbackUpdateAAIVfModule"))
+               execution.setVariable("DCVFMR_rollbackVnfAdapterCreate", rollbackData.get("VFMODULE", "rollbackVnfAdapterCreate"))
+               execution.setVariable("DCVFMR_rollbackSDNCRequestAssign", rollbackData.get("VFMODULE", "rollbackSDNCRequestAssign"))
+               execution.setVariable("DCVFMR_rollbackSDNCRequestActivate", rollbackData.get("VFMODULE", "rollbackSDNCRequestActivate"))
+               execution.setVariable("DCVFMR_rollbackCreateAAIVfModule", rollbackData.get("VFMODULE", "rollbackCreateAAIVfModule"))
+
+               // formulate the request for PrepareUpdateAAIVfModule
+               String request = """<PrepareUpdateAAIVfModuleRequest>
+                                                               <vnf-id>${vnfId}</vnf-id>
+                                                               <vf-module-id>${vfModuleId}</vf-module-id>
+                                                               <orchestration-status>pending-delete</orchestration-status>
+                                                       </PrepareUpdateAAIVfModuleRequest>""" as String
+               utils.log("DEBUG", "PrepareUpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+               execution.setVariable("PrepareUpdateAAIVfModuleRequest", request)
+       }
+
+       // build a SDNC vnf-topology-operation request for the specified action
+       // (note: the action passed is expected to be 'changedelete' or 'delete')
+       public void prepSDNCAdapterRequest(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId")
+               
+               def callbackUrl = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+
+               String source = execution.getVariable("DCVFMR_source")
+               String serviceId = execution.getVariable("DCVFMR_serviceId")
+               String vnfId = execution.getVariable("DCVFMR_vnfId")
+               String vnfType = execution.getVariable("DCVFMR_vnfType")
+               String vnfName = execution.getVariable("DCVFMR_vnfName")
+               String tenantId = execution.getVariable("DCVFMR_tenantId")
+               String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+               String vfModuleName = execution.getVariable("DCVFMR_vfModuleName")
+               String vfModuleModelName = execution.getVariable("DCVFMR_vfModuleModelName")
+               String cloudSiteId = execution.getVariable("DCVFMR_cloudSiteId")
+               String requestId = execution.getVariable("DCVFMR_requestId")
+               
+               String serviceInstanceIdToSdnc = ""
+               if (srvInstId != null && !srvInstId.isEmpty()) {
+                       serviceInstanceIdToSdnc = srvInstId
+               } else {
+                   serviceInstandIdToSdnc = vfModuleId
+               }
+
+               def doSDNCActivateRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestActivate")
+               def doSDNCAssignRollback = execution.getVariable("DCVFMR_rollbackSDNCRequestAssign")
+
+               def action = ""
+               def requestAction = ""
+
+               if (doSDNCActivateRollback.equals("true")) {
+                       action = "delete"
+                       requestAction = "DisconnectVNFRequest"
+               }
+               else if (doSDNCAssignRollback.equals("true")) {
+                       action = "rollback"
+                       requestAction = "VNFActivateRequest"
+               }
+               else
+                       return
+
+
+               String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
+                                                                                                       xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                                                       xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                                     <sdncadapter:RequestHeader>
+                                                        <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                                        <sdncadapter:SvcInstanceId>${vfModuleId}</sdncadapter:SvcInstanceId>
+                                                        <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+                                                        <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+                                                        <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                                     </sdncadapter:RequestHeader>
+                                                     <sdncadapterworkflow:SDNCRequestData>
+                                                        <request-information>
+                                                           <request-id>${requestId}</request-id>
+                                                           <request-action>${requestAction}</request-action>
+                                                           <source>${source}</source>
+                                                           <notification-url/>
+                                                           <order-number/>
+                                                           <order-version/>
+                                                        </request-information>
+                                                        <service-information>
+                                                           <service-id>${serviceId}</service-id>
+                                                                       <service-type>${serviceId}</service-type>
+                                                           <service-instance-id>${serviceInstanceIdToSdnc}</service-instance-id>
+                                                           <subscriber-name>notsurewecare</subscriber-name>
+                                                        </service-information>
+                                                        <vnf-request-information>
+                                                               <vnf-id>${vfModuleId}</vnf-id>
+                                                                       <vnf-type>${vfModuleModelName}</vnf-type>
+                                    <vnf-name>${vfModuleName}</vnf-name>
+                                                                       <generic-vnf-id>${vnfId}</generic-vnf-id>
+                                    <generic-vnf-name>${vnfName}</generic-vnf-name>
+                                                                       <generic-vnf-type>${vnfType}</generic-vnf-type>
+                                                                       <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+                                                                       <tenant>${tenantId}</tenant>
+                                                        </vnf-request-information>
+                                                     </sdncadapterworkflow:SDNCRequestData>
+                                                  </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+               utils.log("DEBUG", "sdncAdapterWorkflowRequest: " + request, isDebugEnabled)
+               execution.setVariable("sdncAdapterWorkflowRequest", request)
+       }
+
+       // parse the incoming DELETE_VF_MODULE request
+       // and formulate the outgoing VnfAdapterDeleteV1 request
+       public void prepVNFAdapterRequest(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               String requestId = UUID.randomUUID().toString()
+               String origRequestId = execution.getVariable("DCVFMR_requestId")
+               String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId")
+               String aicCloudRegion = execution.getVariable("DCVFMR_cloudSiteId")
+               String vnfId = execution.getVariable("DCVFMR_vnfId")
+               String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+               String vfModuleStackId = execution.getVariable("DCVFMR_heatStackId")
+               String tenantId = execution.getVariable("DCVFMR_tenantId")
+               def messageId = execution.getVariable('att-mso-request-id') + '-' +
+                       System.currentTimeMillis()
+               def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+               def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+               if ('true'.equals(useQualifiedHostName)) {
+                       notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+               }
+
+               String request = """
+                       <deleteVfModuleRequest>
+                           <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+                           <tenantId>${tenantId}</tenantId>
+                           <vnfId>${vnfId}</vnfId>
+                           <vfModuleId>${vfModuleId}</vfModuleId>
+                           <vfModuleStackId>${vfModuleStackId}</vfModuleStackId>
+                           <skipAAI>true</skipAAI>
+                           <msoRequest>
+                               <requestId>${origRequestId}</requestId>
+                               <serviceInstanceId>${srvInstId}</serviceInstanceId>
+                           </msoRequest>
+                           <messageId>${messageId}</messageId>
+                           <notificationUrl>${notificationUrl}</notificationUrl>
+                       </deleteVfModuleRequest>
+                       """ as String
+
+               utils.log("DEBUG", "vnfAdapterRestV1Request: " + request, isDebugEnabled)
+               execution.setVariable("vnfAdapterRestV1Request", request)
+       }
+
+       // parse the incoming DELETE_VF_MODULE request
+       // and formulate the outgoing UpdateAAIVfModuleRequest request
+       public void prepUpdateAAIVfModule(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               String vnfId = execution.getVariable("DCVFMR_vnfId")
+               String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+               // formulate the request for UpdateAAIVfModule
+               String request = """<UpdateAAIVfModuleRequest>
+                                                               <vnf-id>${vnfId}</vnf-id>
+                                                               <vf-module-id>${vfModuleId}</vf-module-id>
+                                                               <heat-stack-id>DELETE</heat-stack-id>
+                                                               <orchestration-status>deleted</orchestration-status>
+                                                       </UpdateAAIVfModuleRequest>""" as String
+               utils.log("DEBUG", "UpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+               execution.setVariable("UpdateAAIVfModuleRequest", request)
+       }
+
+       // parse the incoming DELETE_VF_MODULE request
+       // and formulate the outgoing DeleteAAIVfModuleRequest request
+       public void prepDeleteAAIVfModule(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               String vnfId = execution.getVariable("DCVFMR_vnfId")
+               String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
+               // formulate the request for UpdateAAIVfModule
+               String request = """<DeleteAAIVfModuleRequest>
+                                                               <vnf-id>${vnfId}</vnf-id>
+                                                               <vf-module-id>${vfModuleId}</vf-module-id>
+                                                       </DeleteAAIVfModuleRequest>""" as String
+               utils.log("DEBUG", "DeleteAAIVfModuleRequest :" + request, isDebugEnabled)
+               execution.setVariable("DeleteAAIVfModuleRequest", request)
+       }
+
+       // generates a WorkflowException if
+       //              -
+       public void handleDoDeleteVfModuleFailure(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               utils.log("ERROR", "AAI error occurred deleting the Generic Vnf: "
+                       + execution.getVariable("DoDVfMod_deleteGenericVnfResponse"), isDebugEnabled)
+               String processKey = getProcessKey(execution);
+               exceptionUtil.buildWorkflowException(execution, 5000, "Failure in DoDeleteVfModule")
+
+       }
+
+       public void sdncValidateResponse(Execution execution, String response){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               WorkflowException workflowException = execution.getVariable("WorkflowException")
+               boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+               if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+                       utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+               }else{
+                       throw new BpmnError("MSOWorkflowException")
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoCreateVfModuleVolumeV1.groovy
new file mode 100644 (file)
index 0000000..12a21c6
--- /dev/null
@@ -0,0 +1,654 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import static org.camunda.spin.Spin.XML;
+import groovy.json.JsonSlurper
+import groovy.lang.GroovyInterceptable;
+import groovy.xml.XmlUtil
+import org.springframework.web.util.UriUtils
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+
+class DoCreateVfModuleVolumeV1 extends VfModuleBase {
+       
+       String prefix='DCVFMODVOLV1_'
+       
+       
+       /**
+        * Perform initial processing, such as request validation, initialization of variables, etc.
+        * * @param execution
+        */
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               preProcessRequest(execution, isDebugEnabled)
+       }
+       
+       /**
+        * Perform initial processing, such as request validation, initialization of variables, etc.
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void preProcessRequest (Execution execution, isDebugEnabled) {
+
+               execution.setVariable("prefix",prefix)
+               execution.setVariable(prefix+'SuccessIndicator', false)
+               
+       
+               // INPUT: DoCreateVfModuleVolumeV1Request, att-mso-request-id, volume-group-id, vnf-id, is-vid-request
+               // OUTPUT: DCVFMODVOLV1_SuccessIndicator. WorkflowException
+               
+               def volumeRequest  = getVariable(execution, 'DoCreateVfModuleVolumeV1Request')
+               if (volumeRequest != null) {
+                       execution.setVariable(prefix+'Request', volumeRequest)
+               } else {        
+                       volumeRequest  = getVariable(execution, prefix+'Request')
+                       if (volumeRequest == null) {
+                               (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'DoCreateVfModuleVolumeV1 received null request.')
+                       }
+               }
+               
+               def vnfId = execution.getVariable('vnf-id')
+               if (vnfId == null) {
+                       (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'DoCreateVfModuleVolumeV1 received null vnf-id.')
+               }
+               
+               def volumeGroupId = execution.getVariable('volume-group-id')
+               if (volumeGroupId == null) {
+                       (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, 'DoCreateVfModuleVolumeV1 received null volume-group-id.')
+               }
+               
+               def requestId = execution.getVariable("att-mso-request-id")
+               if (requestId == null || requestId == "") {
+                       requestId = utils.getNodeText1(volumeRequest, "request-id")
+               }
+
+               //def serviceId = execution.getVariable("att-mso-service-instance-id")
+               //if (serviceId == null || serviceId == "") {
+               def     serviceId = utils.getNodeText1(volumeRequest, "service-id")
+               //}
+               
+               def source = utils.getNodeText1(volumeRequest, "source")
+               
+               execution.setVariable(prefix+'requestId', requestId)
+               execution.setVariable(prefix+'serviceId', serviceId)
+               execution.setVariable(prefix+'source', source)
+               
+               // @TODO: for better tracking of logs, should we strip all new lines in the log message?
+               utils.logAudit('Incoming request: ' + volumeRequest)
+
+               // Rollback settings
+               NetworkUtils networkUtils = new NetworkUtils()
+               def rollbackEnabled = networkUtils.isRollbackEnabled(execution,volumeRequest)
+               execution.setVariable(prefix+"rollbackEnabled", rollbackEnabled)
+               utils.log("DEBUG", 'rollbackEnabled: ' + rollbackEnabled, isDebugEnabled)
+               
+       }
+       
+
+       /**
+        * Get cloud region
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void callRESTQueryAAICloudRegion (Execution execution, isDebugEnabled) {
+               
+               def request = execution.getVariable(prefix+'Request')
+               def cloudRegion = utils.getNodeText1(request, "aic-cloud-region")
+               utils.log("DEBUG", 'Request cloud region is: ' + cloudRegion, isDebugEnabled)
+
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+               String queryCloudRegionRequest = aaiEndpoint + '/' + cloudRegion
+               
+               utils.logAudit(queryCloudRegionRequest)
+
+               cloudRegion = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "PO", cloudRegion)
+
+               if ((cloudRegion != "ERROR")) {
+                       if(execution.getVariable(prefix+"queryCloudRegionReturnCode") == "404"){
+                               cloudRegion = "AAIAIC25"
+                       }
+                       execution.setVariable(prefix+"aicCloudRegion", cloudRegion)
+                       utils.log("DEBUG", "AIC Cloud Region: " + cloudRegion, isDebugEnabled)
+               } else {
+                       String errorMessage = "AAI Query Cloud Region Unsuccessful. Return Code: " + execution.getVariable(prefix+"queryCloudRegionReturnCode")
+                       utils.log("DEBUG", errorMessage, isDebugEnabled)
+                       (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
+               }
+       }
+       
+
+       /**
+        * Query AAI volume group by name
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void callRESTQueryAAIVolGrpName(Execution execution, isDebugEnabled) {
+
+               def volumeRequest = execution.getVariable(prefix+'Request')
+               def volumeGroupName = utils.getNodeText(volumeRequest, "volume-group-name")
+               def cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
+               
+               // Save volume group name
+               execution.setVariable(prefix+'volumeGroupName', volumeGroupName)
+               
+               // This is for stub testing
+               def testVolumeGroupName = execution.getVariable('test-volume-group-name')
+               if (testVolumeGroupName != null && testVolumeGroupName.length() > 0) {
+                       volumeGroupName = testVolumeGroupName
+                       //reset to null
+                       execution.setVariable('test-volume-group-name', null)
+               }
+               
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+               String queryAAIVolumeNameRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups" + "?volume-group-name=" + UriUtils.encode(volumeGroupName, 'UTF-8')
+
+               utils.logAudit('Query AAI volume group by name: ' + queryAAIVolumeNameRequest)
+               
+               APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeNameRequest)
+               
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+               
+               utils.logAudit("AAI query volume group by name return code: " + returnCode)
+               utils.logAudit("AAI query volume group by name response: " + aaiResponseAsString)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+               execution.setVariable(prefix+"queryAAIVolGrpNameResponse", aaiResponseAsString)
+               execution.setVariable(prefix+'AaiReturnCode', returnCode)
+
+               if (returnCode=='200') {
+                       // @TODO: verify error code
+                       // @TODO: create class of literals representing error codes
+                       execution.setVariable(prefix+'queryAAIVolGrpNameResponse', aaiResponseAsString)
+                       utils.log("DEBUG", "Volume Group Name $volumeGroupName exists in AAI.", isDebugEnabled)
+               } else {
+                       if (returnCode=='404') {
+                               utils.log("DEBUG", "Volume Group Name $volumeGroupName does not exist in AAI.", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $volumeGroupName not found in AAI. Response code: 404")
+                       } else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+       
+
+       /**
+        * Create a WorkflowException 
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void buildWorkflowException(Execution execution, int errorCode, errorMessage, isDebugEnabled) {
+               utils.log("DEBUG", errorMessage, isDebugEnabled)
+               (new ExceptionUtil()).buildWorkflowException(execution, 2500, errorMessage)
+       }
+       
+
+       /**
+        * Create a WorkflowException
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void handleError(Execution execution, isDebugEnabled) {
+               WorkflowException we = execution.getVariable('WorkflowException')
+               if (we == null) {
+                       (new ExceptionUtil()).buildWorkflowException(execution, 2500, "Enexpected error encountered!")
+               }
+               throw new BpmnError("MSOWorkflowException")
+       }
+       
+       /**
+        * Create volume group in AAI
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void callRESTCreateAAIVolGrpName(Execution execution, isDebugEnabled) {
+
+               def volumeRequest  = execution.getVariable(prefix+'Request')
+               def vnfId = execution.getVariable('vnf-id')
+               def volumeName = utils.getNodeText(volumeRequest, "volume-group-name")
+               
+               def cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
+               def groupId = execution.getVariable('volume-group-id')
+               utils.log("DEBUG", "volume group id: " + groupId, isDebugEnabled)
+               
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+               String createAAIVolumeGrpNameUrlRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group/" + UriUtils.encode(groupId, "UTF-8")
+               
+               String namespace =  aaiUtil.getNamespaceFromUri(aaiUtil.getCloudInfrastructureCloudRegionUri(execution))
+               utils.log("DEBUG", "AAI namespace is: " + namespace, isDebugEnabled)
+               
+               utils.logAudit(createAAIVolumeGrpNameUrlRequest)
+               
+               //Prepare payload (PUT)
+               def vnfType = utils.getNodeText(volumeRequest, "vnf-type")
+               def tenantId = utils.getNodeText(volumeRequest, "tenant-id")
+               
+               NetworkUtils networkUtils = new NetworkUtils()
+               String payload = networkUtils.createCloudRegionVolumeRequest(groupId, volumeName, vnfType, vnfId, tenantId, cloudRegion, namespace)
+               String payloadXml = utils.formatXml(payload)
+               utils.logAudit(payloadXml)
+               
+               APIResponse response = aaiUtil.executeAAIPutCall(execution, createAAIVolumeGrpNameUrlRequest, payloadXml)
+                               
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+               
+               utils.logAudit("AAI create volume group return code: " + returnCode)
+               utils.logAudit("AAI create volume group response: " + aaiResponseAsString)
+
+               execution.setVariable(prefix+"createAAIVolumeGrpNameReturnCode", returnCode)
+               execution.setVariable(prefix+"createAAIVolumeGrpNameResponse", aaiResponseAsString)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               
+               if (returnCode =='201') {
+                       execution.setVariable(prefix+"isAAIRollbackNeeded", true)
+               } else {
+                       execution.setVariable(prefix+"isErrorMessageException", true)
+                       if (returnCode=='404') {
+                               // @TODO: verify return code and make static LITERAL
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Unable to create volume group in AAI. Response code: 404")
+                       } else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               utils.log("DEBUG", " AAI Adapter Query Failed.  WorkflowException - " + "\n" + aWorkflowException, isDebugEnabled)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+
+       /**
+        * Prepare VNF adapter create request XML
+        * @param execution
+        */
+       public void prepareVnfAdapterCreateRequest(Execution execution, isDebugEnabled) {
+               
+               
+               def volumeRequest  = execution.getVariable(prefix+'Request')
+               def requestId = execution.getVariable(prefix+'requestId')
+               def serviceId = execution.getVariable(prefix+'serviceId')
+               
+               def aaiGenericVnfResponse = execution.getVariable(prefix+'AAIQueryGenericVfnResponse')
+               def vnfId = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-id')
+               def vnfName = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-name')
+                               
+               String messageId = UUID.randomUUID()
+               utils.log("DEBUG", "messageId to be used is generated: " + messageId, isDebugEnabled)
+
+               // prepare vnf request for vnfAdapterCreateV1
+               def cloudSiteId = utils.getNodeText1(volumeRequest, 'aic-cloud-region')
+               def tenantId = utils.getNodeText1(volumeRequest, "tenant-id")
+               def vnfType = utils.getNodeText1(volumeRequest, "vnf-type")
+               def vnfVersion = utils.getNodeText1(volumeRequest, "asdc-service-model-version")
+               def vnfModuleType = utils.getNodeText1(volumeRequest, "vf-module-model-name")
+               def volumeGroupnName = utils.getNodeText1(volumeRequest, "volume-group-name")
+
+               def volumeParamsXml = utils.getNodeXml(volumeRequest, 'volume-params')
+               def volumeGroupParams = transformVolumeParamsToEntries(volumeParamsXml)
+
+               utils.log("DEBUG", "volumeGroupParams: "+ volumeGroupParams, isDebugEnabled)
+
+               String volumeGroupId = execution.getVariable('volume-group-id')
+               def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+               def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+               if ('true'.equals(useQualifiedHostName)) {
+                               notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+               }
+               utils.log("DEBUG", "CreateVfModuleVolume - notificationUrl: "+ notificationUrl, isDebugEnabled)
+               
+               def backoutOnFailure = execution.getVariable("DCVFMODVOLV1_rollbackEnabled")
+               utils.log("DEBUG", "backoutOnFailure: "+ backoutOnFailure, isDebugEnabled)
+               
+               // build request
+               String vnfSubCreateWorkflowRequest =
+               """
+                       <createVolumeGroupRequest>
+                               <cloudSiteId>${cloudSiteId}</cloudSiteId>
+                               <tenantId>${tenantId}</tenantId>
+                               <vnfId>${vnfId}</vnfId>
+                               <vnfName>${vnfName}</vnfName>
+                               <volumeGroupId>${volumeGroupId}</volumeGroupId>
+                               <volumeGroupName>${volumeGroupnName}</volumeGroupName>
+                               <vnfType>${vnfType}</vnfType>
+                               <vnfVersion>${vnfVersion}</vnfVersion>
+                               <vfModuleType>${vnfModuleType}</vfModuleType>
+                               <volumeGroupParams>
+                                       <entry>
+                                               <key>vnf_id</key>
+                                               <value>${vnfId}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vnf_name</key>
+                                               <value>${vnfName}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vf_module_id</key>
+                                               <value>${volumeGroupId}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vf_module_name</key>
+                                               <value>${volumeGroupnName}</value>
+                                       </entry>
+                                       ${volumeGroupParams}
+                           </volumeGroupParams>
+                               <skipAAI>true</skipAAI>
+                               <backout>${backoutOnFailure}</backout>
+                               <failIfExists>true</failIfExists>
+                           <msoRequest>
+                               <requestId>${requestId}</requestId>
+                               <serviceInstanceId>${serviceId}</serviceInstanceId>
+                           </msoRequest>
+                           <messageId>${messageId}</messageId>
+                           <notificationUrl>${notificationUrl}</notificationUrl>
+                       </createVolumeGroupRequest>
+               """
+
+               String vnfSubCreateWorkflowRequestAsString = utils.formatXml(vnfSubCreateWorkflowRequest)
+               utils.logAudit(vnfSubCreateWorkflowRequestAsString)
+               execution.setVariable(prefix+"createVnfARequest", vnfSubCreateWorkflowRequestAsString)
+               
+               // build rollback request for use later if needed
+               
+               String vnfSubRollbackWorkflowRequest =
+               """<rollbackVolumeGroupRequest>
+                               <cloudSiteId>${cloudSiteId}</cloudSiteId>
+                               <tenantId>${tenantId}</tenantId>
+                               <volumeGroupId>${volumeGroupId}</volumeGroupId>
+                               <skipAAI>true</skipAAI>
+                               <volumeGroupCreated>true</volumeGroupCreated>
+                           <msoRequest>
+                               <requestId>${requestId}</requestId>
+                               <serviceInstanceId>${serviceId}</serviceInstanceId>
+                           </msoRequest>
+                           <messageId>${messageId}</messageId>
+                           <notificationUrl>${notificationUrl}</notificationUrl>
+                       </rollbackVolumeGroupRequest>"""
+
+               utils.log("DEBUG", "Sub Vnf flow rollback request: vnfSubRollbackWorkflowRequest " + "\n" + vnfSubRollbackWorkflowRequest, isDebugEnabled)
+               
+               String vnfSubRollbackWorkflowRequestAsString = utils.formatXml(vnfSubRollbackWorkflowRequest)
+               execution.setVariable(prefix+"rollbackVnfARequest", vnfSubRollbackWorkflowRequestAsString)
+       }
+
+       
+
+       /**
+        * Update voulume group in AAI 
+        * @TODO: Can we re-use the create method??
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void callRESTUpdateCreatedVolGrpName(Execution execution, isDebugEnabled) {
+               
+               // get variables
+               String requeryAAIVolGrpNameResponse = execution.getVariable(prefix+"queryAAIVolGrpNameResponse")
+               String volumeGroupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
+               String cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
+               
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+               String updateAAIVolumeGroupUrlRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, 'UTF-8')
+               
+               String namespace =  aaiUtil.getNamespaceFromUri(aaiUtil.getCloudInfrastructureCloudRegionUri(execution))
+
+               utils.logAudit(updateAAIVolumeGroupUrlRequest)
+
+               //Prepare payload (PUT)
+               String createVnfAResponse = execution.getVariable(prefix+"createVnfAResponse")
+               
+               // @TODO: revisit
+               // if VID request createVnfresponse will be null, use vnf from JSON request
+               def vnfId = ""
+               if(createVnfAResponse == null || createVnfAResponse == "") {
+                       vnfId = execution.getVariable(prefix+'vnfId')
+               }
+               else {
+                       vnfId = utils.getNodeText(createVnfAResponse, "volumeGroupStackId")
+               }
+               
+               NetworkUtils networkUtils = new NetworkUtils()
+               String payload = networkUtils.updateCloudRegionVolumeRequest(requeryAAIVolGrpNameResponse, vnfId, namespace)
+               String payloadXml = utils.formatXml(payload)
+               
+               //execution.setVariable(prefix+"updateCreatedAAIVolumeGrpNamePayloadRequest", payloadXml)
+               utils.logAudit(payload)
+               //utils.log("DEBUG", " 'payload' to Update Created VolumeGroupName - " + "\n" + payloadXml, isDebugEnabled)
+
+               APIResponse response = aaiUtil.executeAAIPutCall(execution, updateAAIVolumeGroupUrlRequest, payloadXml)
+               
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+               
+               utils.logAudit("AAI create volume group return code: " + returnCode)
+               utils.logAudit("AAI create volume group response: " + aaiResponseAsString)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+               if (returnCode =='200') {
+                       execution.setVariable(prefix+"updateCreatedAAIVolumeGrpNameResponse", aaiResponseAsString)
+                       execution.setVariable(prefix+"isPONR", true)
+               } else {
+                       execution.setVariable(prefix+"isErrorMessageException", true)
+                       if (returnCode=='404') {
+                               // @TODO: verify return code and make static LITERAL
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Unable to update volume group in AAI. Response code: 404")
+                       } else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               utils.log("DEBUG", " AAI Adapter Query Failed.  WorkflowException - " + "\n" + aWorkflowException, isDebugEnabled)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+
+       
+       /**
+        * Query AAI service instance
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void callRESTQueryAAIGenericVnf(Execution execution, isDebugEnabled) {
+               
+               def request = execution.getVariable(prefix+"Request")
+               def vnfId = execution.getVariable('vnf-id')
+               
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getNetworkGenericVnfEndpoint(execution)
+               def String queryAAIRequest = aaiEndpoint + "/" + UriUtils.encode(vnfId, "UTF-8")
+               
+               utils.logAudit("AAI query generic vnf request: " + queryAAIRequest)
+               
+               APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+               
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+               
+               utils.logAudit("AAI query generic vnf return code: " + returnCode)
+               utils.logAudit("AAI query generic vnf response: " + aaiResponseAsString)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               
+               if (returnCode=='200') {
+                       utils.log("DEBUG", 'Generic vnf ' + vnfId + ' found in AAI.', isDebugEnabled)
+                       execution.setVariable(prefix+'AAIQueryGenericVfnResponse', aaiResponseAsString)
+               } else {
+                       if (returnCode=='404') {
+                               def message = 'Generic vnf ' + vnfId + ' was not found in AAI. Return code: 404.'
+                               utils.log("DEBUG", message, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+                       } else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+
+       public void callRESTDeleteAAIVolumeGroup(Execution execution, isDebugEnabled) {
+
+               callRESTQueryAAIVolGrpName(execution, isDebugEnabled)
+               
+               def queryAaiVolumeGroupResponse = execution.getVariable(prefix+'queryAAIVolGrpNameResponse')
+               
+               def volumeGroupId = utils.getNodeText(queryAaiVolumeGroupResponse, "volume-group-id")
+               def resourceVersion = utils.getNodeText(queryAaiVolumeGroupResponse, "resource-version")
+
+               def cloudRegion = execution.getVariable(prefix+"aicCloudRegion")
+               
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+               String deleteAAIVolumeGrpIdRequest = aaiEndpoint + '/' + cloudRegion + "/volume-groups/volume-group" + '/' +  volumeGroupId + "?resource-version=" + UriUtils.encode(resourceVersion, "UTF-8")
+
+               utils.logAudit('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
+               
+               APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
+               
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+               
+               utils.logAudit("AAI delete volume group return code: " + returnCode)
+               utils.logAudit("AAI delete volume group response: " + aaiResponseAsString)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+               def volumeGroupNameFound = prefix+'volumeGroupNameFound'
+               if (returnCode=='200' || returnCode=='204' ) {
+                       utils.log("DEBUG", "Volume group $volumeGroupId deleted.", isDebugEnabled)
+               } else {
+                       if (returnCode=='404') {
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume group $volumeGroupId not found for delete in AAI Response code: 404")
+                       } else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+
+       
+       
+       
+       
+       public void prepareSuccessDBRequest(Execution execution, isDebugEnabled) {
+               String requestId = execution.getVariable(prefix+'requestId')
+               String dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
+               prepareDBRequest(execution, requestId, "VolumeGroup successfully created.", "COMPLETED", "100", dbVnfOutputs, isDebugEnabled)
+       }
+       
+       public void prepareFailDbRequest(Execution execution, isDebugEnabled) {
+               
+               WorkflowException we = execution.getVariable("WorkflowException")
+               
+               String requestId = execution.getVariable(prefix+'requestId')
+               String dbVnfOutputs = execution.getVariable(prefix+'volumeOutputs')
+               prepareDBRequest(execution, requestId, we.getErrorMessage(), "FAILURE", "", dbVnfOutputs, isDebugEnabled)
+
+       }
+       
+       
+       /**
+        * Prepare Infra DB XML Request 
+        * @param execution
+        */
+       public void prepareDBRequest (Execution execution, String requestId, String statusMessage, String requestStatus, String progress, String dbVnfOutputs, isDebugEnabled) {
+               
+               String dbRequest =
+               """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                       <soapenv:Header/>
+                       <soapenv:Body>
+                               <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                       <requestId>${requestId}</requestId>
+                                       <lastModifiedBy>BPMN</lastModifiedBy>
+                                       <statusMessage>${statusMessage}</statusMessage>
+                                       <responseBody></responseBody>
+                                       <requestStatus>${requestStatus}</requestStatus>
+                                       <progress>${progress}</progress>
+                                       <vnfOutputs>${dbVnfOutputs}</vnfOutputs>
+                               </ns:updateInfraRequest>
+                       </soapenv:Body>
+                  </soapenv:Envelope>"""
+
+          utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+          String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+          
+          execution.setVariable(prefix+"createDBRequest", buildDeleteDBRequestAsString)
+          
+          utils.logAudit(buildDeleteDBRequestAsString)
+        }
+
+
+
+       
+       public void postProcessResponse (Execution execution, isDebugEnabled) {
+
+               String dbReturnCode = execution.getVariable(prefix+"dbReturnCode")
+               utils.log("DEBUG", "DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+               
+               String createDBResponse =  execution.getVariable(prefix+"createDBResponse")
+               utils.logAudit(createDBResponse)
+
+               String source = execution.getVariable(prefix+"source")
+               String requestId = execution.getVariable(prefix+'requestId')
+
+               String msoCompletionRequest =
+                       """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                               <request-id>${requestId}</request-id>
+                                               <action>CREATE</action>
+                                               <source>${source}</source>
+                                       </request-info>
+                                       <aetgt:mso-bpel-name>BPEL Volume Group action: CREATE</aetgt:mso-bpel-name>
+                               </aetgt:MsoCompletionRequest>"""
+
+               // Format Response
+               String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+               utils.logAudit(xmlMsoCompletionRequest)
+               
+               // normal path
+               if (dbReturnCode == "200") {
+                               execution.setVariable(prefix+"Success", true)
+                               execution.setVariable(prefix+"CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+                               utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+               } else {
+                               execution.setVariable(prefix+"isErrorMessageException", true)
+                               utils.log("DEBUG", " DB Update failed, code: " + dbReturnCode + ", going to Unexpected Error.", isDebugEnabled)
+               }
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoDeleteVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoDeleteVfModule.groovy
new file mode 100644 (file)
index 0000000..5b726a0
--- /dev/null
@@ -0,0 +1,264 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+
+public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
+
+       def Prefix="DoDVfMod_"
+
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable("prefix",Prefix)
+       }
+
+       // parse the incoming DELETE_VF_MODULE request for the Generic Vnf and Vf Module Ids
+       // and formulate the outgoing request for PrepareUpdateAAIVfModuleRequest
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("DoDeleteVfModuleRequest")
+               utils.logAudit("DoDeleteVfModule Request: " + xml)
+               
+               utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
+               initProcessVariables(execution)
+               def vnfId = utils.getNodeText1(xml,"vnf-id")
+               def vfModuleId = utils.getNodeText1(xml,"vf-module-id")
+//             execution.setVariable("DoDVfMod_vnfId", vnfId)
+//             execution.setVariable("DoDVfMod_vfModuleId", vfModuleId)
+               // formulate the request for PrepareUpdateAAIVfModule
+               String request = """<PrepareUpdateAAIVfModuleRequest>
+                                                               <vnf-id>${vnfId}</vnf-id>
+                                                               <vf-module-id>${vfModuleId}</vf-module-id>
+                                                               <orchestration-status>pending-delete</orchestration-status>
+                                                       </PrepareUpdateAAIVfModuleRequest>""" as String
+               utils.log("DEBUG", "PrepareUpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+               utils.logAudit("UpdateAAIVfModule Request: " + request)
+               execution.setVariable("PrepareUpdateAAIVfModuleRequest", request)
+               execution.setVariable("DoDVfMod_vfModuleFromAAI", null)
+       }
+
+       // build a SDNC vnf-topology-operation request for the specified action
+       // (note: the action passed is expected to be 'changedelete' or 'delete')
+       public void prepSDNCAdapterRequest(Execution execution, String action) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("DoDeleteVfModuleRequest")
+               utils.logAudit("DoDeleteVfModule Request: " + xml)
+               
+               def srvInstId = execution.getVariable("att-mso-service-instance-id")
+               def callbackUrl = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+               utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
+
+               String requestId = ""
+               try {
+                       requestId = execution.getVariable("att-mso-request-id")
+               } catch (Exception ex) {
+                       requestId = utils.getNodeText1(xml, "request-id")
+               }
+
+               String source = utils.getNodeText1(xml, "source")
+               String serviceId = utils.getNodeText1(xml, "service-id")
+               String vnfId = utils.getNodeText1(xml, "vnf-id")
+               String vnfType = utils.getNodeText1(xml, "vnf-type")
+               String vnfName = utils.getNodeText1(xml, "vnf-name")
+               String tenantId = utils.getNodeText1(xml, "tenant-id")
+               String vfModuleId = utils.getNodeText1(xml, "vf-module-id")
+               String serviceInstanceIdToSdnc = ""
+               if (xml.contains("service-instance-id")) {
+                       serviceInstanceIdToSdnc = utils.getNodeText1(xml, "service-instance-id")
+               } else {
+                   serviceInstanceIdToSdnc = vfModuleId
+               }
+               String vfModuleName = utils.getNodeText1(xml, "vf-module-name")
+               // Get vfModuleName from AAI response if it was not specified on the request
+               if (vfModuleName == null || vfModuleName.isEmpty()) {
+                       if (execution.getVariable("DoDVfMod_vfModuleFromAAI") != null) {
+                               VfModule vfModuleFromAAI = execution.getVariable("DoDVfMod_vfModuleFromAAI")
+                               vfModuleName = vfModuleFromAAI.getElementText("vf-module-name")                 
+                       }               
+               }
+               String vfModuleModelName = utils.getNodeText1(xml, "vf-module-model-name")
+               String cloudSiteId = utils.getNodeText1(xml, "aic-cloud-region")
+               String request = """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://ecomp.att.com/mso/request/types/v1"
+                                                                                                       xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                                                       xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                                     <sdncadapter:RequestHeader>
+                                                        <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                                        <sdncadapter:SvcInstanceId>${vfModuleId}</sdncadapter:SvcInstanceId>
+                                                        <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+                                                        <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+                                                        <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                                     </sdncadapter:RequestHeader>
+                                                     <sdncadapterworkflow:SDNCRequestData>
+                                                        <request-information>
+                                                           <request-id>${requestId}</request-id>
+                                                           <request-action>DisconnectVNFRequest</request-action>
+                                                           <source>${source}</source>
+                                                           <notification-url/>
+                                                           <order-number/>
+                                                           <order-version/>
+                                                        </request-information>
+                                                        <service-information>
+                                                           <service-id>${serviceId}</service-id>
+                                                                       <service-type>${serviceId}</service-type>
+                                                           <service-instance-id>${serviceInstanceIdToSdnc}</service-instance-id>
+                                                           <subscriber-name>notsurewecare</subscriber-name>
+                                                        </service-information>
+                                                        <vnf-request-information>
+                                                               <vnf-id>${vfModuleId}</vnf-id>
+                                                                       <vnf-type>${vfModuleModelName}</vnf-type>
+                                    <vnf-name>${vfModuleName}</vnf-name>
+                                                                       <generic-vnf-id>${vnfId}</generic-vnf-id>
+                                    <generic-vnf-name>${vnfName}</generic-vnf-name>
+                                                                       <generic-vnf-type>${vnfType}</generic-vnf-type>
+                                                                       <aic-cloud-region>${cloudSiteId}</aic-cloud-region>
+                                                                       <tenant>${tenantId}</tenant>
+                                                        </vnf-request-information>
+                                                     </sdncadapterworkflow:SDNCRequestData>
+                                                  </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
+
+               utils.log("DEBUG", "sdncAdapterWorkflowRequest: " + request, isDebugEnabled)
+               utils.logAudit("DoDeleteVfModule - SDNCAdapterWorkflowRequest: " + request)
+               execution.setVariable("sdncAdapterWorkflowRequest", request)
+       }
+
+       // parse the incoming DELETE_VF_MODULE request
+       // and formulate the outgoing VnfAdapterDeleteV1 request
+       public void prepVNFAdapterRequest(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("DoDeleteVfModuleRequest")
+               def requestId = UUID.randomUUID().toString()
+               def origRequestId = execution.getVariable('att-mso-request-id')
+               def srvInstId = execution.getVariable('att-mso-service-instance-id')
+               def aicCloudRegion = utils.getNodeText1(xml, "aic-cloud-region")
+               def vnfId = utils.getNodeText1(xml, "vnf-id")
+               def vnfName = utils.getNodeText1(xml, "vnf-name")
+               def vfModuleId = utils.getNodeText1(xml, "vf-module-id")
+               def vfModuleStackId = execution.getVariable('DoDVfMod_heatStackId')
+               def tenantId = utils.getNodeText1(xml, "tenant-id")
+               def messageId = execution.getVariable('att-mso-request-id') + '-' +
+                       System.currentTimeMillis()
+               def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+               def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+               if ('true'.equals(useQualifiedHostName)) {
+                       notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+               }
+
+               String request = """
+                       <deleteVfModuleRequest>
+                           <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+                           <tenantId>${tenantId}</tenantId>
+                           <vnfId>${vnfId}</vnfId>
+                           <vfModuleId>${vfModuleId}</vfModuleId>
+                           <vfModuleStackId>${vfModuleStackId}</vfModuleStackId>
+                           <skipAAI>true</skipAAI>
+                           <msoRequest>
+                               <requestId>${origRequestId}</requestId>
+                               <serviceInstanceId>${srvInstId}</serviceInstanceId>
+                           </msoRequest>
+                           <messageId>${messageId}</messageId>
+                           <notificationUrl>${notificationUrl}</notificationUrl>
+                       </deleteVfModuleRequest>
+                       """ as String
+
+               utils.log("DEBUG", "vnfAdapterRestV1Request: " + request, isDebugEnabled)
+               utils.logAudit("deleteVfModuleRequest: " + request)
+               execution.setVariable("vnfAdapterRestV1Request", request)
+       }
+
+       // parse the incoming DELETE_VF_MODULE request
+       // and formulate the outgoing UpdateAAIVfModuleRequest request
+       public void prepUpdateAAIVfModule(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("DoDeleteVfModuleRequest")
+               utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
+               initProcessVariables(execution)
+               def vnfId = utils.getNodeText1(xml,"vnf-id")
+               def vfModuleId = utils.getNodeText1(xml,"vf-module-id")
+               // formulate the request for UpdateAAIVfModule
+               String request = """<UpdateAAIVfModuleRequest>
+                                                               <vnf-id>${vnfId}</vnf-id>
+                                                               <vf-module-id>${vfModuleId}</vf-module-id>
+                                                               <heat-stack-id>DELETE</heat-stack-id>
+                                                               <orchestration-status>deleted</orchestration-status>
+                                                       </UpdateAAIVfModuleRequest>""" as String
+               utils.log("DEBUG", "UpdateAAIVfModuleRequest :" + request, isDebugEnabled)
+               utils.logAudit("UpdateAAIVfModuleRequest: " + request)
+               execution.setVariable("UpdateAAIVfModuleRequest", request)
+       }
+
+       // parse the incoming DELETE_VF_MODULE request
+       // and formulate the outgoing DeleteAAIVfModuleRequest request
+       public void prepDeleteAAIVfModule(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def xml = execution.getVariable("DoDeleteVfModuleRequest")
+               utils.log("DEBUG", "input request xml: " + xml, isDebugEnabled)
+               initProcessVariables(execution)
+               def vnfId = utils.getNodeText1(xml,"vnf-id")
+               def vfModuleId = utils.getNodeText1(xml,"vf-module-id")
+               // formulate the request for UpdateAAIVfModule
+               String request = """<DeleteAAIVfModuleRequest>
+                                                               <vnf-id>${vnfId}</vnf-id>
+                                                               <vf-module-id>${vfModuleId}</vf-module-id>
+                                                       </DeleteAAIVfModuleRequest>""" as String
+               utils.log("DEBUG", "DeleteAAIVfModuleRequest :" + request, isDebugEnabled)
+               utils.logAudit("DeleteAAIVfModuleRequest: " + request)
+               execution.setVariable("DeleteAAIVfModuleRequest", request)
+       }
+
+       // generates a WorkflowException if
+       //              -
+       public void handleDoDeleteVfModuleFailure(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               utils.log("ERROR", "AAI error occurred deleting the Generic Vnf: "
+                       + execution.getVariable("DoDVfMod_deleteGenericVnfResponse"), isDebugEnabled)
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable("DoDVfMod_deleteGenericVnfResponse"))
+               execution.setVariable("WorkflowException", exception)
+       }
+
+       public void sdncValidateResponse(Execution execution, String response){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               WorkflowException workflowException = execution.getVariable("WorkflowException")
+               boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+               if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
+                       utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+               }else{
+                       throw new BpmnError("MSOWorkflowException")
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoUpdateVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/DoUpdateVfModule.groovy
new file mode 100644 (file)
index 0000000..35600bc
--- /dev/null
@@ -0,0 +1,793 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.util.Node
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.springframework.web.util.UriUtils
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+public class DoUpdateVfModule extends VfModuleBase {
+
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+       
+       /**
+        * Initialize the flow's variables.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable('prefix', 'DOUPVfMod_')
+               execution.setVariable('DOUPVfMod_requestInfo', null)
+               execution.setVariable('DOUPVfMod_serviceInstanceId', null)
+               execution.setVariable('DOUPVfMod_requestId', null)
+               execution.setVariable('DOUPVfMod_vnfInputs', null)
+               execution.setVariable('DOUPVfMod_vnfId', null)
+               execution.setVariable('DOUPVfMod_vnfName', null)
+               execution.setVariable('DOUPVfMod_vnfNameFromAAI', null)
+               execution.setVariable('DOUPVfMod_vfModuleName', null)
+               execution.setVariable('DOUPVfMod_vfModuleId', null)
+               execution.setVariable('DOUPVfMod_vnfType', null)
+               execution.setVariable('DOUPVfMod_asdcServiceModelVersion', null)
+               execution.setVariable('DOUPVfMod_vfModuleModelName', null)
+               execution.setVariable("DOUPVfMod_isBaseVfModule", "false")
+               execution.setVariable('DOUPVfMod_serviceId', null)
+               execution.setVariable('DOUPVfMod_aicCloudRegion', null)
+               execution.setVariable('DOUPVfMod_tenantId', null)
+               execution.setVariable('DOUPVfMod_volumeGroupId', null)
+               execution.setVariable('DOUPVfMod_vfModule', null)
+               execution.setVariable('DOUPVfMod_vnfParams', null)
+               execution.setVariable("DOUPVfMod_baseVfModuleId", "")
+               execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", "")
+               execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', null)
+               execution.setVariable('DOUPVfMod_sdncTopologyRequest', null)
+               execution.setVariable('DOUPVfMod_sdncTopologyResponse', null)
+               execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', null)
+               execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', null)
+               execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', null)
+               execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', false)
+               execution.setVariable('DoUpdateVfModuleSuccessIndicator', false)
+       }       
+       
+       /**
+        * Check for missing elements in the received request.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       initProcessVariables(execution)
+                       def xml = getVariable(execution, 'DoUpdateVfModuleRequest')
+                       utils.logAudit("DoUpdateVfModule request: " + xml)
+                       logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+                       
+                       def requestInfo = getRequiredNodeXml(execution, xml, 'request-info')
+                       execution.setVariable('DOUPVfMod_requestInfo', requestInfo)
+                       execution.setVariable('DOUPVfMod_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+                       def serviceInstanceId = execution.getVariable('att-mso-service-instance-id')
+                       if (serviceInstanceId == null) {
+                               serviceInstanceId = ''
+                       }
+                       execution.setVariable('DOUPVfMod_serviceInstanceId', serviceInstanceId)
+                       
+                       def vnfInputs = getRequiredNodeXml(execution, xml, 'vnf-inputs')
+                       execution.setVariable('DOUPVfMod_vnfInputs', vnfInputs)
+                       execution.setVariable('DOUPVfMod_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+                       execution.setVariable('DOUPVfMod_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+                       execution.setVariable('DOUPVfMod_vfModuleName', getNodeTextForce(vnfInputs, 'vf-module-name'))
+                       execution.setVariable('DOUPVfMod_vnfType', getNodeTextForce(vnfInputs, 'vnf-type'))
+                       execution.setVariable('DOUPVfMod_vnfName', getNodeTextForce(vnfInputs, 'vnf-name'))
+                       execution.setVariable('DOUPVfMod_asdcServiceModelVersion', getNodeTextForce(vnfInputs, 'asdc-service-model-version'))
+                       execution.setVariable('DOUPVfMod_vfModuleModelName', getRequiredNodeText(execution, vnfInputs, 'vf-module-model-name'))
+                       execution.setVariable('DOUPVfMod_serviceId', getRequiredNodeText(execution, vnfInputs, 'service-id'))
+                       execution.setVariable('DOUPVfMod_aicCloudRegion', getRequiredNodeText(execution, vnfInputs, 'aic-cloud-region'))
+                       execution.setVariable('DOUPVfMod_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+                       //isBaseVfModule
+                       def isBaseVfModule = "false"
+                       if (utils.nodeExists(xml, "is-base-vf-module")) {
+                               isBaseVfModule = utils.getNodeText(xml, "is-base-vf-module")
+                               execution.setVariable("DOUPVfMod_isBaseVfModule", isBaseVfModule)
+                       }                       
+                       logDebug("isBaseVfModule: " + isBaseVfModule, isDebugLogEnabled)
+                       
+                       NetworkUtils networkUtils = new NetworkUtils()
+                       def backoutOnFailure = networkUtils.isRollbackEnabled(execution, xml)
+                       execution.setVariable("DOUPVfMod_backoutOnFailure", backoutOnFailure)
+                       
+                       def String vgi = getNodeTextForce(vnfInputs, 'volume-group-id')
+                       execution.setVariable('DOUPVfMod_volumeGroupId', vgi)
+                       
+                       execution.setVariable('DOUPVfMod_vnfParams', utils.getNodeXml(xml, 'vnf-params', false))
+                       
+                       def sdncCallbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+                       if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
+                               def msg = 'Required variable \'URN_mso_workflow_sdncadapter_callback\' is missing'
+                               logError(msg)
+                               createWorkflowException(execution, 2000, msg)
+                       }
+                       def vnfCallbackUrl = (String) execution.getVariable('URN_mso_workflow_vnfadapter_rest_callback')
+                       if (vnfCallbackUrl == null || vnfCallbackUrl.trim().isEmpty()) {
+                               def msg = 'Required variable \'URN_mso_workflow_vnfadapter_rest_callback\' is missing'
+                               logError(msg)
+                               createWorkflowException(execution, 2000, msg)
+                       }
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Prepare a Request for invoking the PrepareUpdateAAIVfModule subflow.  This will
+        * set the orchestration-status to 'pending-update'.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void prepPrepareUpdateAAIVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.preparePrepareUpdateAAIVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+                       def orchestrationStatus = 'pending-update'
+                       
+                       String prepareUpdateAAIVfModuleRequest = """
+                               <PrepareUpdateAAIVfModuleRequest>
+                                       <vnf-id>${vnfId}</vnf-id>
+                                       <vf-module-id>${vfModuleId}</vf-module-id>
+                                       <orchestration-status>${orchestrationStatus}</orchestration-status>
+                               </PrepareUpdateAAIVfModuleRequest>
+                       """
+                       prepareUpdateAAIVfModuleRequest = utils.formatXml(prepareUpdateAAIVfModuleRequest)
+                       execution.setVariable('DOUPVfMod_prepareUpdateAAIVfModuleRequest', prepareUpdateAAIVfModuleRequest)
+                       utils.logAudit("DoUpdateAAIVfModule request: " + prepareUpdateAAIVfModuleRequest)
+                       logDebug('Request for PrepareUpdateAAIVfModule:\n' + prepareUpdateAAIVfModuleRequest, isDebugLogEnabled)
+                       
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in preparePrepareUpdateAAIVfModule(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Prepare a Request for invoking the ConfirmVolumeGroupTenant subflow.  Currently,
+        * there is really nothing to do, so we just log that we're passing through.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepConfirmVolumeGroupTenant(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepConfirmVolumeGroupTenant(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       // Nothing to do - just log that we're passing through here
+                       
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepConfirmVolumeGroupTenant(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Prepare a Request for invoking the SDNC Adapter subflow to perform
+        * a VNF topology 'changeassign' operation.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepSDNCTopologyChg(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepSDNCTopologyChg(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestId = execution.getVariable('DOUPVfMod_requestId')
+                       def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+                       def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+                       def serviceId = execution.getVariable('DOUPVfMod_serviceId')
+                       def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+                       def vnfType = execution.getVariable('DOUPVfMod_vnfType')                        
+                       def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+                       def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+                       def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+                       def vfModuleName = vfModule.getElementText('vf-module-name')
+                       def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+                       def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')
+                       
+                       // Retrieve vnf name from AAI response
+                       def vnfName = execution.getVariable('DOUPVfMod_vnfNameFromAAI')
+                       execution.setVariable('DOUPVfMod_vnfName', vnfName)
+                       
+                       def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+                       def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
+                       
+                       String sdncTopologyRequest = """
+                               <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+                                               xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                               <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>   
+                                               <sdncadapter:SvcAction>changeassign</sdncadapter:SvcAction>
+                                               <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+                                               <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                       </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData>
+                                             <request-information>
+                                                <request-id>${requestId}</request-id>
+                                                <request-action>ChangeVNFActivateRequest</request-action>
+                                                <source>PORTAL</source>
+                                                <notification-url/>
+                                                <order-number/>
+                                                <order-version/>
+                                             </request-information>
+                                             <service-information>
+                                                <service-type>${serviceId}</service-type>
+                                                <service-instance-id>${vnfId}</service-instance-id>
+                                                <subscriber-name>dontcare</subscriber-name>
+                                             </service-information>
+                                             <vnf-request-information>
+                                                <vnf-id>${vfModuleId}</vnf-id>
+                                                <vnf-type>${vfModuleModelName}</vnf-type>                                               
+                                                <vnf-name>${vfModuleName}</vnf-name>
+                                                <generic-vnf-id>${vnfId}</generic-vnf-id>
+                                                <generic-vnf-name>${vnfName}</generic-vnf-name>
+                                                        <generic-vnf-type>${vnfType}</generic-vnf-type>
+                                                <tenant>${tenantId}</tenant>
+                                                <aic-cloud-region>${aicCloudRegion}</aic-cloud-region> 
+                                                ${vnfNetworks}                                                 
+                                             </vnf-request-information>
+                                       </sdncadapterworkflow:SDNCRequestData>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+                       """
+                       sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+                       execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
+                       utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
+                       logDebug('Request for SDNCAdapter topology/changeassign:\n' + sdncTopologyRequest, isDebugLogEnabled)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepSDNCTopologyChg(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Prepare a Request for invoking the SDNC Adapter subflow to perform
+        * a VNF topology 'query' operation.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepSDNCTopologyQuery(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepSDNCTopologyQuery(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestId = execution.getVariable('DOUPVfMod_requestId')
+                       def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+                       def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+                       def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+                       
+                       def svcInstId = ""
+                       if (serviceInstanceId == null || serviceInstanceId.isEmpty()) {
+                               svcInstId = vfModuleId
+                       }
+                       else {
+                               svcInstId = serviceInstanceId
+                       }
+                       
+                       //!!!! TEMPORARY WORKAROUND FOR SDNC REPLICATION ISSUE
+                       sleep(5000)             
+
+                       String sdncTopologyRequest = """
+                               <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+                                               xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                               <sdncadapter:SvcInstanceId>${svcInstId}</sdncadapter:SvcInstanceId>   
+                                               <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
+                                               <sdncadapter:SvcOperation>/VNF-API:vnfs/vnf-list/${vfModuleId}</sdncadapter:SvcOperation>
+                                               <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                               <sdncadapter:MsoAction>mobility</sdncadapter:MsoAction>
+                                       </sdncadapter:RequestHeader>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+                       """
+                       sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+                       execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
+                       utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
+                       logDebug('Request for SDNCAdapter query:\n' + sdncTopologyRequest, isDebugLogEnabled)
+                       
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepSDNCTopologyQuery(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Prepare a Request for invoking the VnfAdapterRest subflow.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepVnfAdapterRest(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepVnfAdapterRest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestId = execution.getVariable('DOUPVfMod_requestId')
+                       def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+                       def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+                       def vfModuleName = execution.getVariable('DOUPVfMod_vfModuleName')
+                       def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+                       def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+                       def volumeGroupId = execution.getVariable('DOUPVfMod_volumeGroupId')
+                       def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+                       def heatStackId = vfModule.getElementText('heat-stack-id')
+                       def cloudId = execution.getVariable('DOUPVfMod_aicCloudRegion')
+                       def vnfType = execution.getVariable('DOUPVfMod_vnfType')
+                       def vnfName = execution.getVariable('DOUPVfMod_vnfName')
+                       def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')                    
+                       def baseVfModuleId = execution.getVariable("DOUPVfMod_baseVfModuleId")          
+                       def baseVfModuleStackId = execution.getVariable("DOUPVfMod_baseVfModuleHeatStackId")
+                       def asdcServiceModelVersion = execution.getVariable('DOUPVfMod_asdcServiceModelVersion')
+                       def backoutOnFailure = execution.getVariable("DOUPVfMod_backoutOnFailure")
+                       
+                       def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+                       def vfModuleParamsEntries = transformParamsToEntries(vnfParamsXml)
+                       
+                       def messageId = execution.getVariable('att-mso-request-id') + '-' + System.currentTimeMillis()
+                       def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+                       def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+                       if ('true'.equals(useQualifiedHostName)) {
+                                       notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+                       }
+                       
+                       String sdncGetResponse = execution.getVariable('DOUPVfMod_sdncTopologyResponse')
+                       
+                       String vfModuleParams = buildVfModuleParams(vfModuleParamsEntries, sdncGetResponse, vnfId, vnfName,
+                                       vfModuleId, vfModuleName)               
+                       
+                       
+                       String vnfAdapterRestRequest = """
+                               <updateVfModuleRequest>
+                                       <cloudSiteId>${cloudId}</cloudSiteId>
+                                       <tenantId>${tenantId}</tenantId>
+                                       <vnfId>${vnfId}</vnfId>
+                                       <vfModuleId>${vfModuleId}</vfModuleId>
+                                       <vfModuleStackId>${heatStackId}</vfModuleStackId>
+                                       <vnfType>${vnfType}</vnfType>
+                                       <vnfVersion>${asdcServiceModelVersion}</vnfVersion>
+                                       <vfModuleType>${vfModuleModelName}</vfModuleType>
+                                       <volumeGroupId>${volumeGroupId}</volumeGroupId>
+                                       <baseVfModuleId>${baseVfModuleId}</baseVfModuleId>
+                               <baseVfModuleStackId>${baseVfModuleStackId}</baseVfModuleStackId>
+                                       <skipAAI>true</skipAAI>
+                                       <backout>${backoutOnFailure}</backout>
+                                   <failIfExists>false</failIfExists>
+                                       <vfModuleParams>                                                
+                                               ${vfModuleParams}
+                                   </vfModuleParams>
+                                   <msoRequest>
+                                       <requestId>${requestId}</requestId>
+                                       <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+                                   </msoRequest>
+                                   <messageId>${messageId}</messageId>
+                                   <notificationUrl>${notificationUrl}</notificationUrl>
+                               </updateVfModuleRequest>
+                       """
+                       vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+                       execution.setVariable('DOUPVfMod_vnfAdapterRestRequest', vnfAdapterRestRequest)
+                       utils.logAudit("vnfAdapterRestRequest : " + vnfAdapterRestRequest)
+                       logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepVnfAdapterRest(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Prepare a Request for invoking the UpdateAAIGenericVnf subflow.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepUpdateAAIGenericVnf(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepUpdateAAIGenericVnf(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+                       def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+                       
+                       def personaModelId = utils.getNodeText1(vnfInputs, 'vnf-persona-model-id')
+                       def personaModelVersion = utils.getNodeText1(vnfInputs, 'vnf-persona-model-version')
+                       if ((personaModelId == null) || (personaModelVersion == null)) {
+                               logDebug('Skipping update for Generic VNF ' + vnfId +
+                                       ' because either \'vnf-persona-model-id\' or \'vnf-persona-model-version\' is absent', isDebugLogEnabled)
+                               execution.setVariable('DOUPVfMod_skipUpdateGenericVnf', true)
+                       } else {
+                               def personaModelIdElement = '<persona-model-id>' + personaModelId + '</persona-model-id>'
+                               def personaModelVersionElement = '<persona-model-version>' + personaModelVersion + '</persona-model-version>'
+                               
+                               String updateAAIGenericVnfRequest = """
+                                       <UpdateAAIGenericVnfRequest>
+                                               <vnf-id>${vnfId}</vnf-id>
+                                               ${personaModelIdElement}
+                                               ${personaModelVersionElement}
+                                       </UpdateAAIGenericVnfRequest>
+                               """
+                               updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
+                               execution.setVariable('DOUPVfMod_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
+                               utils.logAudit("updateAAIGenericVnfRequest : " + updateAAIGenericVnfRequest)
+                               logDebug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest, isDebugLogEnabled)
+                       }
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Prepare a Request for invoking the UpdateAAIVfModule subflow.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepUpdateAAIVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepUpdateAAIVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+                       def orchestrationStatus = 'updated'
+                       def vnfInputs = execution.getVariable('DOUPVfMod_vnfInputs')
+                       
+                       def volumeGroupIdElement = ''
+                       def volumeGroupId = execution.getVariable('DOUPVfMod_volumeGroupId')
+                       if (volumeGroupId != null) {
+                               volumeGroupIdElement = '<volume-group-id>' + volumeGroupId + '</volume-group-id>'
+                       }
+                       def personaModelIdElement = ''
+                       def personaModelId = utils.getNodeText1(vnfInputs, 'persona-model-id')
+                       if (personaModelId != null) {
+                               personaModelIdElement = '<persona-model-id>' + personaModelId + '</persona-model-id>'
+                       }
+                       def personaModelVersionElement = ''
+                       def personaModelVersion = utils.getNodeText1(vnfInputs, 'persona-model-version')
+                       if (personaModelVersion != null) {
+                               personaModelVersionElement = '<persona-model-version>' + personaModelVersion + '</persona-model-version>'
+                       }
+                       def contrailServiceInstanceFqdnElement = ''
+                       def contrailServiceInstanceFqdn = utils.getNodeText1(vnfInputs, 'contrail-service-instance-fqdn')
+                       if (contrailServiceInstanceFqdn != null) {
+                               contrailServiceInstanceFqdnElement = '<contrail-service-instance-fqdn>' + contrailServiceInstanceFqdn + '</contrail-service-instance-fqdn>'
+                       }
+                       
+                       String updateAAIVfModuleRequest = """
+                               <UpdateAAIVfModuleRequest>
+                                       <vnf-id>${vnfId}</vnf-id>
+                                       <vf-module-id>${vfModuleId}</vf-module-id>
+                                       <orchestration-status>${orchestrationStatus}</orchestration-status>
+                                       ${volumeGroupIdElement}
+                                       ${personaModelIdElement}
+                                       ${personaModelVersionElement}
+                                       ${contrailServiceInstanceFqdnElement}
+                               </UpdateAAIVfModuleRequest>
+                       """
+                       updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
+                       execution.setVariable('DOUPVfMod_updateAAIVfModuleRequest', updateAAIVfModuleRequest)
+                       utils.logAudit("updateAAIVfModuleRequest : " + updateAAIVfModuleRequest)
+                       logDebug('Request for UpdateAAIVfModule:\n' + updateAAIVfModuleRequest, isDebugLogEnabled)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepUpdateAAIVfModule(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Prepare a Request for invoking the SDNC Adapter subflow to perform
+        * a VNF topology 'activate' operation.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepSDNCTopologyAct(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepSDNCTopologyAct(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestId = execution.getVariable('DOUPVfMod_requestId')
+                       def serviceInstanceId = execution.getVariable('DOUPVfMod_serviceInstanceId')
+                       def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+                       def serviceId = execution.getVariable('DOUPVfMod_serviceId')
+                       def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+                       def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
+                       def VfModule vfModule = (VfModule) execution.getVariable('DOUPVfMod_vfModule')
+                       def vfModuleName = vfModule.getElementText('vf-module-name')
+                       def tenantId = execution.getVariable('DOUPVfMod_tenantId')
+                       def aicCloudRegion = execution.getVariable('DOUPVfMod_aicCloudRegion')
+                       
+                       def vnfParamsXml = execution.getVariable('DOUPVfMod_vnfParams')
+                       def vnfNetworks = transformNetworkParamsToVnfNetworks(vnfParamsXml)
+
+                       String sdncTopologyRequest = """
+                               <sdncadapterworkflow:SDNCAdapterWorkflowRequest
+                                               xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                               <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>   
+                                               <sdncadapter:SvcAction>activate</sdncadapter:SvcAction>
+                                               <sdncadapter:SvcOperation>vnf-topology-operation</sdncadapter:SvcOperation>
+                                               <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                       </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData>
+                                             <request-information>
+                                                <request-id>${requestId}</request-id>
+                                                <request-action>ChangeVNFActivateRequest</request-action>
+                                                <source>PORTAL</source>
+                                                <notification-url/>
+                                                <order-number/>
+                                                <order-version/>
+                                             </request-information>
+                                             <service-information>
+                                                <service-type>${serviceId}</service-type>
+                                                <service-instance-id>${vnfId}</service-instance-id>
+                                                <subscriber-name>dontcare</subscriber-name>
+                                             </service-information>
+                                             <vnf-request-information>
+                                                <vnf-id>${vfModuleId}</vnf-id>
+                                                <vnf-type>${vfModuleModelName}</vnf-type>
+                                                <vnf-name>${vfModuleName}</vnf-name>
+                                                <tenant>${tenantId}</tenant>
+                                                <aic-clli>${aicCloudRegion}</aic-clli> <!-- Optional -->
+                                                ${vnfNetworks}                                                 <!-- Optional -->
+                                             </vnf-request-information>
+                                       </sdncadapterworkflow:SDNCRequestData>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+                       """
+                       sdncTopologyRequest = utils.formatXml(sdncTopologyRequest)
+                       execution.setVariable('DOUPVfMod_sdncTopologyRequest', sdncTopologyRequest)
+                       utils.logAudit("sdncTopologyRequest : " + sdncTopologyRequest)
+                       logDebug('Request for SDNCAdapter topology/activate:\n' + sdncTopologyRequest, isDebugLogEnabled)
+                       
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepSDNCTopologyAct(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Log a WorkflowException that has been created. 
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void handleWorkflowException(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleWorkflowException(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def WorkflowException workflowException = (WorkflowException) execution.getVariable('WorkflowException')
+                       logError(method + ' caught WorkflowException: ' + workflowException.getErrorMessage())
+                       
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in handleWorkflowException(): ' + e.getMessage())
+               }
+       }
+       
+       public void validateSDNCResponse(Execution execution, String response, String method){
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               def prefix = execution.getVariable("prefix")
+               
+               logDebug(" *** STARTED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+
+               WorkflowException workflowException = execution.getVariable("WorkflowException")
+               boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+               utils.logAudit("workflowException: " + workflowException)
+
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+
+               utils.logAudit("SDNCResponse: " + response)
+
+               String sdncResponse = response
+               if(execution.getVariable(prefix + 'sdncResponseSuccess') == true){
+                       logDebug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call.  Response is: \n" + sdncResponse, isDebugLogEnabled)                 
+               }else{
+                       logDebug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.", isDebugLogEnabled)
+                       throw new BpmnError("MSOWorkflowException")
+               }
+               logDebug(" *** COMPLETED ValidateSDNCResponse Process*** ", isDebugLogEnabled)
+       }
+       
+       /**
+        * Using the received vnfId and vfModuleId, query AAI to get the corresponding VNF info.
+        * A 200 response is expected with the VNF info in the response body. Will find out the base module info.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void queryAAIVfModule(Execution execution) {
+               def isDebugLogEnabled=execution.getVariable("isDebugLogEnabled")
+               def method = getClass().getSimpleName() + '.getVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('DOUPVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('DOUPVfMod_vfModuleId')
+
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String  aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+
+                       String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+                       utils.logAudit("AAI endPoint: " + endPoint)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       try {
+                               RESTConfig config = new RESTConfig(endPoint);
+                               def responseData = ''
+                               def aaiRequestId = UUID.randomUUID().toString()
+                               RESTClient client = new RESTClient(config).
+                                       addHeader('X-TransactionId', aaiRequestId).
+                                       addHeader('X-FromAppId', 'MSO').
+                                       addHeader('Content-Type', 'application/xml').
+                                       addHeader('Accept','application/xml');
+                               if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                       client.addAuthorizationHeader(basicAuthCred)
+                               }
+                               logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+                               APIResponse response = client.httpGet()
+                               utils.logAudit("createVfModule - invoking httpGet() to AAI")
+
+                               responseData = response.getResponseBodyAsString()
+                               if (responseData != null) {
+                                       logDebug("Received generic VNF data: " + responseData, isDebugLogEnabled)
+
+                               }
+
+                               utils.logAudit("createVfModule - queryAAIVfModule Response: " + responseData)
+                               utils.logAudit("createVfModule - queryAAIVfModule ResponseCode: " + response.getStatusCode())
+
+                               execution.setVariable('DOUPVfMod_queryAAIVfModuleResponseCode', response.getStatusCode())
+                               execution.setVariable('DOUPVfMod_queryAAIVfModuleResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                               if (response.getStatusCode() == 200) {
+                                       // Parse the VNF record from A&AI to find base module info
+                                       logDebug('Parsing the VNF data to find base module info', isDebugLogEnabled)
+                                       if (responseData != null) {
+                                               def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
+                                               def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
+                                               def vfModules = xmlVfModules.'**'.findAll {it.name() == "vf-module"}
+                                               int vfModulesSize = 0
+                                               for (i in 0..vfModules.size()-1) {
+                                                       def vfModuleXml = groovy.xml.XmlUtil.serialize(vfModules[i])
+                                                       def isBaseVfModule = utils.getNodeText(vfModuleXml, "is-base-vf-module")
+
+                                                       if (isBaseVfModule == "true") {
+                                                           String baseModuleId = utils.getNodeText1(vfModuleXml, "vf-module-id")
+                                                           execution.setVariable("DOUPVfMod_baseVfModuleId", baseModuleId)
+                                                           logDebug('Received baseVfModuleId: ' + baseModuleId, isDebugLogEnabled)
+                                                           String baseModuleHeatStackId = utils.getNodeText1(vfModuleXml, "heat-stack-id")
+                                                           execution.setVariable("DOUPVfMod_baseVfModuleHeatStackId", baseModuleHeatStackId)
+                                                           logDebug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId, isDebugLogEnabled)
+                                                       }
+                                               }
+                                       }
+                               }
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
+               }
+       }
+       
+       
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ExceptionUtil.groovy
new file mode 100644 (file)
index 0000000..2f32367
--- /dev/null
@@ -0,0 +1,509 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+/**
+ * @version 1.0
+ */
+class ExceptionUtil extends AbstractServiceTaskProcessor {
+
+       /**
+        *
+        * @Deprecated
+        *
+        * Instead use <method>MapAAIExceptionToWorkflowException</method>
+        *
+        * To Be Removed Once Refactoring Main Flow Error Handling Is Complete
+        *
+        *
+        */
+       @Deprecated
+       String MapAAIExceptionToWorkflowExceptionOld(String response, Execution execution)
+       {
+               def utils=new MsoUtils()
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def prefix=execution.getVariable("prefix")
+               def errorMsg = execution.getVariable(prefix+"ErrorResponse")
+               utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
+               String text = null
+               def variables
+               String errorCode = '5000'
+               utils.log("DEBUG","response: " + response, isDebugEnabled)
+               try {
+                       //String msg = utils.getNodeXml(response, "Fault")
+                        variables = utils.getMultNodes(response, "variable")
+                        text = utils.getNodeText1(response, "text")
+               } catch (Exception ex) {
+                       //Ignore the exception - cases include non xml payload
+                       utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
+               }
+
+               if(text != null) {
+                       if(variables.size()>=4){
+                               text = text.replaceFirst("%1", variables[0])
+                               text = text.replaceFirst("%2", variables[1])
+                               text = text.replaceFirst("%3", variables[2])
+                               text = text.replaceFirst("%4", variables[3])
+                       }
+                       String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
+                       utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
+                       // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
+                       String message = """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                               <aetgt:ErrorMessage>$modifiedErrorMessage</aetgt:ErrorMessage>
+                               <aetgt:ErrorCode>$errorCode</aetgt:ErrorCode>
+                       </aetgt:WorkflowException>"""
+                        execution.setVariable(prefix+"ErrorResponse",message)
+                        utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
+                        return message
+               } else {
+                       try {
+                               errorCode = MapErrorCode(errorMsg)
+                               String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
+
+                               String message = """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                       <aetgt:ErrorMessage>$mappedErrorMessage</aetgt:ErrorMessage>
+                                       <aetgt:ErrorCode>$errorCode</aetgt:ErrorCode>
+                               </aetgt:WorkflowException>"""
+                               utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
+                                execution.setVariable(prefix+"ErrorResponse",message)
+                                utils.log("ERROR","Fault:"+ execution.getVariable(prefix+"ErrorResponse"))
+                                return message
+                       } catch(Exception ex) {
+                               utils.log("DEBUG","error mapping error, return null: " + ex,isDebugEnabled)
+                               return null
+
+                       }
+               }
+       }
+
+       /**
+        * This error handling method maps an AAI Exception response to a
+        * WorkflowException Object.  It then sets the WorkflowException Object
+        * on the execution as "WorkflowException".
+        *
+        * This method formats the exception from AAI into the WorkflowException's
+        * errorMessage that CCD expects.
+        *
+        * @param execution the execution
+        * @param response the aai exception
+        */
+       WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution)
+       {
+               def utils=new MsoUtils()
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def prefix=execution.getVariable("prefix")
+               def errorMsg = execution.getVariable(prefix+"ErrorResponse")
+               utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
+               String text = null
+               def variables
+               String errorCode = '5000'
+               WorkflowException wfex
+               utils.log("DEBUG","response: " + response, isDebugEnabled)
+               try {
+                       //String msg = utils.getNodeXml(response, "Fault")
+                       variables = utils.getMultNodes(response, "variable")
+                       text = utils.getNodeText1(response, "text")
+               } catch (Exception ex) {
+                       //Ignore the exception - cases include non xml payload
+                       utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
+               }
+
+               if(text != null) {
+                       if(variables.size()>=4){
+                               text = text.replaceFirst("%1", variables[0])
+                               text = text.replaceFirst("%2", variables[1])
+                               text = text.replaceFirst("%3", variables[2])
+                               text = text.replaceFirst("%4", variables[3])
+                       }
+                       String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
+                       utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
+                       // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
+                       buildWorkflowException(execution, 5000, modifiedErrorMessage)
+
+                       wfex = execution.getVariable("WorkflowException")
+                       utils.log("ERROR","Fault:"+ wfex)
+                       return wfex
+               } else {
+                       try {
+                               errorCode = MapErrorCode(errorMsg)
+                               String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
+
+                               int errorCodeInt = Integer.parseInt(errorCode)
+                               buildWorkflowException(execution, errorCodeInt, mappedErrorMessage)
+
+                               utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
+                               wfex = execution.getVariable("WorkflowException")
+                               utils.log("ERROR","Fault:"+ wfex, isDebugEnabled)
+                               return wfex
+                       } catch(Exception ex) {
+                               utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled)
+                               return null
+
+                       }
+               }
+       }
+
+       /**
+        * This error handling method maps an AAI Exception response to a
+        * WorkflowException Object.  It then sets the WorkflowException Object
+        * on the execution as "WorkflowException".
+        *
+        * This method takes the exact exception inside the <Fault> tags from AAI Response
+        * and puts it into the WorkflowException's errorMessage.
+        *
+        * @param execution the execution
+        * @param response the aai exception
+        */
+       WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){
+               def utils=new MsoUtils()
+               def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+               utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
+
+               WorkflowException wfex
+               try {
+                       if(utils.nodeExists(response, "Fault")){
+                               String fault = utils.getNodeXml(response, "Fault")
+                               fault = utils.removeXmlPreamble(fault)
+                               fault = fault.replace("<Fault>", "").replace("</Fault>", "")
+                               fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces
+                               buildWorkflowException(execution, resCode, fault)
+                       }else if(utils.nodeExists(response, "RESTFault")){
+                               String rFault = utils.getNodeXml(response, "RESTFault")
+                               buildWorkflowException(execution, resCode, rFault)
+                       }else{
+                               buildWorkflowException(execution, resCode, "Received a bad response from AAI")
+                       }
+               } catch (Exception ex) {
+                       utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled)
+                       buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric")
+
+               }
+               utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled)
+               utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
+       }
+
+       /**
+        *
+        *This method build a WorkflowException using the adapters response.
+        *
+        *@param String response
+        *@param String adapter
+        *
+        *@return WorkflowException wfex
+        */
+       WorkflowException MapAdapterExecptionToWorkflowException(String response, Execution execution, String adapter){
+               def utils=new MsoUtils()
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               def prefix=execution.getVariable("prefix")
+               utils.log("DEBUG","=========== Start MapAdapterExecptionToWorkflowException Process ===========",isDebugEnabled)
+
+               String errorCode
+               def errorMessage
+               WorkflowException wfex
+               try {
+                       errorCode = MapCategoryToErrorCode(utils.getNodeText(response, "category"))
+                       errorMessage = MapAdapterErrorMessage(utils.getNodeText(response, "message"), errorCode, adapter)
+
+                       int errorCodeInt = Integer.parseInt(errorCode)
+                       buildWorkflowException(execution, errorCodeInt, errorMessage)
+               }catch (Exception ex) {
+                       utils.log("DEBUG", "Exception Occured during MapAdapterExecptionToWorkflowException: " + ex, isDebugEnabled)
+                       buildWorkflowException(execution, 2500, "Internal Error - Occured in MapAdapterExecptionToWorkflowException")
+               }
+               wfex = execution.getVariable("WorkflowException")
+               return wfex
+               utils.log("DEBUG","=========== Completed MapAdapterExecptionToWorkflowException Process ===========",isDebugEnabled)
+       }
+
+
+       /**
+        *
+        * @Deprecated
+        *
+        * Instead use <method>buildWorkflowException(Execution execution, int errorCode, String errorMessage)</method> method below
+        *
+        * To Be Removed Once Refactoring Of Main Flow Error Handling Is Complete
+        *
+        */
+       @Deprecated
+       String buildWorkflowExceptionXml(String errorCode, String errorMessage) {
+               return """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                       <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                 </aetgt:WorkflowException>"""
+       }
+
+       /**
+        * This method takes a WorkflowException Object and builds
+        * WorkflowException Xml. This method should only be used
+        * for the purpose of sending an error response.
+        *
+        *@param - WorkflowException Object
+        *
+        *@return - String WorkflowException Xml
+        *
+        *
+        */
+       String buildErrorResponseXml(WorkflowException wfex) {
+               String xml
+               if(wfex != null){
+                       String mes = wfex.getErrorMessage()
+                       int code = wfex.getErrorCode()
+                       xml =
+                       """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                       <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage>
+                                       <aetgt:ErrorCode>${code}</aetgt:ErrorCode>
+                                 </aetgt:WorkflowException>"""
+
+               }else{
+                       xml =
+                       """<aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                       <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage>
+                                       <aetgt:ErrorCode>2500</aetgt:ErrorCode>
+                                 </aetgt:WorkflowException>"""
+               }
+               return xml
+       }
+
+       /*
+       5000    Received error from A&AI ($A&AI_ERROR)  Asynchronous    During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR.
+       5010    Could not communicate with A&AI Asynchronous    During orchestration of the recipe, a connection with A&AI could not be established.
+       5020    No response from A&AI   Asynchronous    During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout.
+       */
+       String MapErrorCode(String errorMessage)
+       {
+               if(errorMessage==null){
+                       return '5000'
+               }
+               errorMessage = errorMessage.toLowerCase();
+               if(errorMessage.contains('timed out') || errorMessage.contains('timeout'))
+                       return '5020'
+               else if (errorMessage.contains('connection'))
+                       return '5010'
+               else
+                       return '5000'
+       }
+
+       String MapErrorMessage(String errorMessage, String errorCode)
+       {
+               if(errorMessage == null){
+                       errorMessage=""
+               }
+               if( errorCode.equals('5010'))
+                                       return 'Could not communicate with A&amp;AI'
+               else if (errorCode.equals('5020'))
+                       return 'No response from A&amp;AI'
+               else
+                       return 'Received error from A&amp;AI (' +errorMessage +')'
+       }
+
+       String MapCategoryToErrorCode(String errorCategory)
+       {
+               if(errorCategory.equals('OPENSTACK'))
+                       return '5100'
+               else if (errorCategory.equals('IO'))
+                       return '5110'
+               else if (errorCategory.equals('INTERNAL'))
+                       return '7020'
+               else if (errorCategory.equals('USERDATA'))
+                       return '7020'
+               else
+                       return '7020'
+       }
+
+
+       String MapAdapterErrorMessage(String errorMessage, String errorCode, String adapter)
+       {
+               if(errorCode.equals('5100'))
+                       return 'Received error from Platform Orchestrator: ' + errorMessage
+               else if(errorCode.equals('5110'))
+                   return 'Could not communicate with Platform Orchestrator'
+               else
+                   return 'Received error from ' + adapter + ': ' + errorMessage
+       }
+
+       String MapSDNCResponseCodeToErrorCode(String sdncResponseCode)
+       {
+               if (sdncResponseCode == '500') {
+                       return '5310'
+               } else if ( sdncResponseCode == '408') {
+                        return '5320'
+               } else if ( sdncResponseCode == '60010') {
+                        return '5350'
+               } else {
+                  return '5300'
+               }
+       }
+
+       /**
+        * This error handling method builds a WorkflowException Object.  It sets it on
+        * the execution as "WorkflowException".
+        *
+        * @param execution the execution
+        * @param errorCode the error code
+        * @param errorMessage the error message
+        */
+       public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) {
+               MsoUtils utils = new MsoUtils()
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               String processKey = getProcessKey(execution);
+               utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled)
+
+               WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+               execution.setVariable("WorkflowException", exception);
+               utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
+       }
+
+       /**
+        * This error handling method builds a WorkflowException Object and throws a
+        * MSOWorkflowException.  It throws a "MSOWorkflowException" BpmnError after
+        * setting the WorkflowException Object on the execution as "WorkflowException".
+        *
+        * @param execution the execution
+        * @param errorCode the error code
+        * @param errorMessage the error message
+        */
+       public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) {
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               String processKey = getProcessKey(execution);
+               utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled)
+
+               WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+               execution.setVariable("WorkflowException", exception);
+               utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
+               utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled)
+               throw new BpmnError("MSOWorkflowException")
+       }
+
+       /**
+        * This method is executed after an MSOWorkflowException is caught by a
+        * subflow (during subflows "Error Handling Sub Process").
+        * It ensures the WorkflowException variable is populated before ending the
+        * subflow and also logs the subflows outgoing WorkflowException Variable.
+        *
+        * @param - execution
+        *
+        */
+       public void processSubflowsBPMNException(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               String processKey = getProcessKey(execution)
+               try{
+                       utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled)
+                       if(execution.getVariable("WorkflowException") == null){
+                               buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey)
+                       }
+
+                       utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+               }catch(Exception e){
+                       utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled)
+               }
+               utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled)
+       }
+
+       /**
+        * This method is executed after an MSOWorkflowException is caught by a
+        * Mainflow. It builds and returns a FalloutHandler Request. It also
+        * verifies the WorkflowException variable is populated.
+        *
+        * @param - execution
+        * @param - requestInfo
+        *
+        * @return - falloutHandlerRequest
+        *
+        */
+       public String processMainflowsBPMNException(Execution execution, String requestInfo){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               String processKey = getProcessKey(execution)
+               try{
+                       utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled)
+                       if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){
+                               buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey)
+                       }
+                       requestInfo = utils.removeXmlPreamble(requestInfo)
+                       WorkflowException wfex = execution.getVariable("WorkflowException")
+                       String errorMessage = wfex.getErrorMessage()
+                       int errorCode = wfex.getErrorCode()
+
+                       String falloutHandlerRequest =
+                       """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          ${requestInfo}
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+
+                       utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+                       utils.log("DEBUG", processKey + " Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled)
+
+                       return falloutHandlerRequest
+
+               }catch(Exception e){
+                       utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled)
+                       return null
+               }
+               utils.log("DEBUG", "Completed ProcessMainflowBPMNException Method", isDebugEnabled)
+       }
+
+       /**
+        * This method is executed after an Java Exception is caught.
+        * It sets the WorkflowException variable and throws an MSOWorkflowException.
+        *
+        * @param - execution
+        *
+        */
+       public void processSubflowsJavaException(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               String processKey = getProcessKey(execution)
+               try{
+                       utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled)
+                       utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+                       buildAndThrowWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey)
+
+               }catch(BpmnError b){
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+                       buildAndThrowWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
+               }
+               utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+       }
+
+
+       public void preProcessRequest(Execution execution) {
+               // TODO Auto-generated method stub
+
+       }
+
+
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/FalloutHandler.groovy
new file mode 100644 (file)
index 0000000..eefcf47
--- /dev/null
@@ -0,0 +1,402 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import java.text.SimpleDateFormat
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.runtime.Execution
+
+public class FalloutHandler extends AbstractServiceTaskProcessor {
+
+       String Prefix="FH_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       public initializeProcessVariables(Execution execution){
+               def method = getClass().getSimpleName() + '.initializeProcessVariables(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       execution.setVariable("prefix",Prefix)
+
+                       //These variables are form the input Message to the BPMN
+                       execution.setVariable("FH_request_id","")
+                       execution.setVariable("FH_request_action","")
+                       execution.setVariable("FH_notification-url","")
+                       execution.setVariable("FH_mso-bpel-name","")
+                       execution.setVariable("FH_ErrorCode", "")
+                       execution.setVariable("FH_ErrorMessage", "")
+
+                       execution.setVariable("FH_notification-url-Ok", false)
+                       execution.setVariable("FH_request_id-Ok", false)
+
+                       //These variables are for Get Mso Aai Password Adapter
+                       execution.setVariable("FH_deliveryStatus", true)
+
+                       //Notify CSI Adapter variables
+                       execution.setVariable("FH_notifyCSIPayload", "")
+                       execution.setVariable("FH_notifyCSIResponseCode", null)
+                       execution.setVariable("FH_notifyCSIResponse", "")
+
+                       //update Response Status to pending ...Adapter variables
+                       execution.setVariable("FH_updateResponseStatusPayload", null)
+                       execution.setVariable("FH_updateResponseStatusResponse", null)
+
+                       //update Request Gamma ...Adapter variables
+                       execution.setVariable("FH_updateRequestGammaPayload", "")
+                       execution.setVariable("FH_updateRequestGammaResponse", null)
+                       execution.setVariable("FH_updateRequestGammaResponseCode", null)
+
+                       //update Request Infra ...Adapter variables
+                       execution.setVariable("FH_updateRequestInfraPayload", "")
+                       execution.setVariable("FH_updateRequestInfraResponse", null)
+                       execution.setVariable("FH_updateRequestInfraResponseCode", null)
+
+                       //assign True to success variable
+                       execution.setVariable("FH_success", true)
+
+                       //Set notify status to Failed variable
+                       execution.setVariable("FH_NOTIFY_STATUS", "SUCCESS")
+
+                       //Set DB update variable
+                       execution.setVariable("FH_updateRequestPayload", "")
+                       execution.setVariable("FH_updateRequestResponse", null)
+                       execution.setVariable("FH_updateRequestResponseCode", null)
+
+                       //Auth variables
+                       execution.setVariable("BasicAuthHeaderValue","")
+
+                       //Parameter list
+                       execution.setVariable("FH_parameterList",  "")
+
+                       //Response variables
+                       execution.setVariable("FalloutHandlerResponse","")
+                       execution.setVariable("FH_ErrorResponse", null)
+                       execution.setVariable("FH_ResponseCode", "")
+
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+               }
+       }
+
+       public void preProcessRequest (Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               // Initialize flow variables
+               initializeProcessVariables(execution)
+               setSuccessIndicator(execution, false)
+
+               try {
+                       def xml = execution.getVariable("FalloutHandlerRequest")
+                       utils.log("DEBUG", " XML --> " + xml, isDebugLogEnabled)
+                       utils.logAudit("FalloutHandler request: " + xml)
+
+                       //Check the incoming request type
+                       //Incoming request can be ACTIVE_REQUESTS (request-information node) or  INFRA_ACTIVE_REQUESTS (request-info node)
+                       if (utils.nodeExists(xml, "request-information")) {
+                               execution.setVariable("FH_request_id-Ok", true) // Incoming request is for ACTIVE_REQUESTS
+                       }
+
+                       //Check notification-url for the incoming request type
+                       //ACTIVE_REQUESTS may have notificationurl node
+                       //INFRA_ACTIVE_REQUESTS notificationurl node does not exist
+                       def notificationurl = ""
+                       if (utils.nodeExists(xml, "notification-url")) {
+                               notificationurl = utils.getNodeText(xml,"notification-url")
+                               if(notificationurl != null && !notificationurl.isEmpty()) {
+                                       execution.setVariable("FH_notification-url-Ok", true)
+                                       execution.setVariable("FH_notification-url",notificationurl)
+                               }
+                       }
+
+                       //Check request_id for the incoming request type
+                       //For INFRA_ACTIVE_REQUESTS payload request-id IS optional (Not sure why this is option since req id is primary key ... also tried exe through SOAP UI to check if MSO code handles null like auto generated seq not it does not)
+                       //For ACTIVE_REQUESTS payload request-id is NOT optional
+                       def request_id = ""
+                       if (utils.nodeExists(xml, "request-id")) {
+                               execution.setVariable("FH_request_id",utils.getNodeText(xml,"request-id"))
+                       }
+                       utils.logAudit("FH_request_id: " + execution.getVariable("FH_request_id"))
+
+                       // INFRA_ACTIVE_REQUESTS         have "action" element ... mandatory
+                       // ACTIVE_REQUEST have "request-action" ... mandatory
+                       if (utils.nodeExists(xml, "request-action")) {
+                               execution.setVariable("FH_request_action",utils.getNodeText(xml,"request-action"))
+                       } else if (utils.nodeExists(xml, "action")) {
+                               execution.setVariable("FH_request_action",utils.getNodeText(xml,"action"))
+                       }
+
+
+                       //Check source for the incoming request type
+                       //For INFRA_ACTIVE_REQUESTS payload source IS optional
+                       //For ACTIVE_REQUESTS payload source is NOT optional
+                       def source = ""
+                       if (utils.nodeExists(xml, "source")) {
+                               execution.setVariable("FH_source",utils.getNodeText(xml,"source"))
+                       }
+
+                       //Check if ErrorCode node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
+                       def errorCode = ""
+                       if (utils.nodeExists(xml, "ErrorCode")) {
+                               errorCode = utils.getNodeText(xml,"ErrorCode")
+                               if(errorCode != null && !errorCode.isEmpty()) {
+                                       execution.setVariable("FH_ErrorCode", errorCode)
+                               }
+                       }
+                       utils.logAudit("FH_ErrorCode: " + errorCode)
+
+                       //Check if ErrorMessage node exists. If yes, initialize it from request xml, if no, it will stay with defaulf value already set in initializeProcessVariables() method above.
+                       def errorMessage = ""
+                       if (utils.nodeExists(xml, "ErrorMessage")) {
+                               errorCode = utils.getNodeText(xml,"ErrorMessage")
+                               if(errorCode != null && !errorCode.isEmpty()) {
+                                       errorCode = errorCode.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+                                       execution.setVariable("FH_ErrorMessage", errorCode)
+                               }
+                       }
+
+                       //Check for Parameter List
+                       if (utils.nodeExists(xml, "parameter-list")) {
+                               def parameterList = utils.getNodeXml(xml, "parameter-list", false)
+                               execution.setVariable("FH_parameterList", parameterList)
+                       }
+
+                       utils.log("DEBUG","FH_notification-url-Ok --> " + execution.getVariable("FH_notification-url-Ok"),isDebugLogEnabled)
+                       utils.log("DEBUG","FH_request_id-OK --> " + execution.getVariable("FH_request_id-Ok"),isDebugLogEnabled)
+
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+               }
+
+               utils.log("DEBUG","OUTOF --> Initialize Variables Fallout Handler #########",isDebugLogEnabled);
+       }
+
+       public String updateRequestPayload (Execution execution){
+               def method = getClass().getSimpleName() + '.updateRequestPayload(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       String payload = """
+                               <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                               <soapenv:Header/>
+                               <soapenv:Body>
+                                       <req:updateRequest>
+                                               <requestId>${execution.getVariable("FH_request_id")}</requestId>
+                                               <lastModifiedBy>BPEL</lastModifiedBy>
+                                               <finalErrorMessage>${execution.getVariable("FH_ErrorMessage")}</finalErrorMessage>
+                                               <finalErrorCode>${execution.getVariable("FH_ErrorCode")}</finalErrorCode>
+                                               <status>FAILED</status>
+                                               <responseStatus>${execution.getVariable("FH_NOTIFY_STATUS")}</responseStatus>
+                                       </req:updateRequest>
+                               </soapenv:Body>
+                               </soapenv:Envelope>
+                       """
+
+                       utils.logAudit("updateRequestPayload: " + payload)
+                       execution.setVariable("FH_updateRequestPayload", payload)
+                       return execution.getVariable("FH_updateRequestPayload")
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+               }
+       }
+
+       public String updateRequestInfraPayload (Execution execution){
+               def method = getClass().getSimpleName() + '.updateRequestInfraPayload(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       String payload = """
+                               <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                               <soapenv:Header/>
+                               <soapenv:Body>
+                                       <req:updateInfraRequest>
+                                               <requestId>${execution.getVariable("FH_request_id")}</requestId>
+                                               <lastModifiedBy>BPEL</lastModifiedBy>
+                                               <statusMessage>${execution.getVariable("FH_ErrorMessage")}</statusMessage>
+                                               <requestStatus>FAILED</requestStatus>
+                                               <progress>100</progress>
+                                       </req:updateInfraRequest>
+                               </soapenv:Body>
+                               </soapenv:Envelope>
+                       """
+
+                       execution.setVariable("FH_updateRequestInfraPayload", payload)
+                       utils.logAudit("updateRequestInfraPayload: " + payload)
+                       return execution.getVariable("FH_updateRequestInfraPayload")
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+               }
+       }
+
+       public String updateRequestGammaPayload (Execution execution){
+               def method = getClass().getSimpleName() + '.updateRequestGammaPayload(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       String payload = """
+                               <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                               <soapenv:Header/>
+                               <soapenv:Body>
+                                       <req:updateRequest>
+                                               <requestId>${execution.getVariable("FH_request_id")}</requestId>
+                                               <lastModifiedBy>BPEL</lastModifiedBy>
+                                               <finalErrorMessage>${execution.getVariable("FH_ErrorMessage")}</finalErrorMessage>
+                                               <finalErrorCode>${execution.getVariable("FH_ErrorCode")}</finalErrorCode>
+                                               <status>FAILED</status>
+                                       </req:updateRequest>
+                               </soapenv:Body>
+                               </soapenv:Envelope>
+                       """
+
+                       execution.setVariable("FH_updateRequestGammaPayload", payload)
+                       utils.logAudit("updateRequestGammaPayload: " + payload)
+                       return execution.getVariable("FH_updateRequestGammaPayload")
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+               }
+       }
+
+       public String updateResponseStatusPayload (Execution execution){
+               def method = getClass().getSimpleName() + '.updateResponseStatusPayload(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       String payload = """
+                               <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+                               <soapenv:Header/>
+                               <soapenv:Body>
+                                       <req:updateResponseStatus>
+                                               <requestId>${execution.getVariable("FH_request_id")}</requestId>
+                                               <lastModifiedBy>BPEL</lastModifiedBy>
+                                               <responseStatus>SENDING_FINAL_NOTIFY</responseStatus>
+                                       </req:updateResponseStatus>
+                               </soapenv:Body>
+                               </soapenv:Envelope>
+                       """
+
+                       execution.setVariable("FH_updateResponseStatusPayload", payload)
+                       utils.logAudit("updateResponseStatusPayload: " + payload)
+                       return execution.getVariable("FH_updateResponseStatusPayload")
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+               }
+       }
+
+       public String notifyCSIPayload (Execution execution) {
+               return "";
+       }
+
+       public String notifyCCDFailurePayload (Execution execution) {
+               def method = getClass().getSimpleName() + '.notifyCCDFailurePayload(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def parameterList = execution.getVariable('FH_parameterList')
+                       String payload ="""
+                               <ns:status-notification xmlns:ns="http://ecomp.att.com/mso/statusnotification/schema/v1" xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1">
+                                       <msoservtypes:request-id>${execution.getVariable("FH_request_id")}</msoservtypes:request-id>
+                                       <msoservtypes:request-action>${execution.getVariable("FH_request_action")}</msoservtypes:request-action>
+                                       <msoservtypes:source>${execution.getVariable("FH_source")}</msoservtypes:source>
+                                       <msoservtypes:error-code>${execution.getVariable("FH_ErrorCode")}</msoservtypes:error-code>
+                                       <msoservtypes:error-message>${execution.getVariable("FH_ErrorMessage")}</msoservtypes:error-message>
+                                       <msoservtypes:ack-final-indicator>Y</msoservtypes:ack-final-indicator>
+                                       ${parameterList}
+                               </ns:status-notification>
+                       """
+
+                       payload = utils.formatXml(payload)
+                       utils.logAudit("notifyCCDFailurePayload: " + payload)
+
+                       execution.setVariable("FH_notifyCCDFailurePayload", payload)
+                       utils.log("DEBUG", "FH_notifyCCDFailurePayload --> " + "\n" + execution.getVariable("FH_notifyCCDFailurePayload"), isDebugLogEnabled)
+                       return execution.getVariable("FH_notifyCCDFailurePayload")
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+               }
+       }
+
+       public void buildDBWorkflowException(Execution execution, String responseCodeVariable) {
+               def method = getClass().getSimpleName() + '.buildDBWorkflowException(' +
+                       'execution=' + execution.getId() +
+                       ', responseCodeVariable=' + responseCodeVariable + ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def responseCode = execution.getVariable(responseCodeVariable)
+                       // If the HTTP response code was null, it means a connection fault occurred (a java exception)
+                       def errorMessage = responseCode == null ? "Could not connect to DB Adapter" : "DB Adapter returned ${responseCode} response"
+                       def errorCode = responseCode == null ? 7000 : 7020
+                       exceptionUtil.buildWorkflowException(execution, errorCode, errorMessage)
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
+               }
+       }
+
+       /**
+        * Used to create a workflow response in success and failure cases.
+        */
+       public void postProcessResponse (Execution execution) {
+               def method = getClass().getSimpleName() + '.postProcessResponse(' +'execution=' + execution.getId() +')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       Boolean success = (Boolean) execution.getVariable("FH_success")
+                       String out = success ? "Fallout Handler Succeeded" : "Fallout Handler Failed";
+
+                       def falloutHandlerResponse = """
+                               <workflow:FalloutHandlerResponse xmlns:workflow="http://ecomp.att.com/mso/workflow/schema/v1">
+                                  <workflow:out>${out}</workflow:out>
+                               </workflow:FalloutHandlerResponse>
+                       """
+
+                       falloutHandlerResponse = utils.formatXml(falloutHandlerResponse)
+                       utils.logAudit("FalloutHandler Response: " + falloutHandlerResponse);
+
+                       execution.setVariable("FalloutHandlerResponse", falloutHandlerResponse)
+                       execution.setVariable("WorkflowResponse", falloutHandlerResponse)
+                       execution.setVariable("FH_ResponseCode", success ? "200" : "500")
+                       setSuccessIndicator(execution, success)
+
+                       logDebug("FalloutHandlerResponse =\n" + falloutHandlerResponse, isDebugLogEnabled)
+               } catch (Exception e) {
+                       // Do NOT throw WorkflowException!
+                       logError('Caught exception in ' + method, e)
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteService.groovy
new file mode 100644 (file)
index 0000000..53cd254
--- /dev/null
@@ -0,0 +1,303 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * This class supports the GenericDeleteService Sub Flow.
+ * This Generic sub flow can be used by any flow for the
+ * goal of deleting a Service-Instance or Service-Subscription.
+ * The calling flow must set the GENDS_type variable as "service-instance"
+ * or "service-subscription".
+ *
+ * If the resource-version is not provided by the calling flow
+ * then this sub flow will query the service-instance or
+ * service-subscription, prior to deleting it, in order to
+ * obtain this resource version.  Upon successful completion of
+ * this sub flow the GENDS_SuccessIndicator will be true.  A
+ * MSOWorkflowException will be thrown if an error occurs within this flow.
+ *
+ * Please map variables to the corresponding variable names
+ * below.
+ *
+ * Note - if this sub flow receives a Not Found (404) response
+ * from AAI at any time this will be considered an acceptable
+ * response.
+ *
+ * Incoming Variables (Service-Instance):
+ * @param - GENDS_serviceInstanceId
+ * @param - GENDS_serviceType
+ * @param - GENDS_globalCustomerId
+ * @param - GENDS_type
+ * @param (Optional) - GENDS_resourceVersion
+ *
+ * Incoming Variables (Service-Subscription):
+ * @param - GENDS_serviceType
+ * @param - GENDS_globalCustomerId
+ * @param - GENDS_type
+ * @param (Optional) - GENDS_resourceVersion
+ *
+ *
+ * Outgoing Variables:
+ * @param - GENDS_SuccessIndicator
+ * @param - GENDS_FoundIndicator
+ * @param - WorkflowException
+ */
+class GenericDeleteService extends AbstractServiceTaskProcessor{
+
+       String Prefix = "GENDS_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       /**
+        * This method validates the incoming variables and
+        * determines if the resource version was provided
+        *
+        * @param - execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericDeleteService PreProcessRequest Process*** ", isDebugEnabled)
+
+               execution.setVariable("GENDS_resourceVersionProvidedFlag", true)
+               execution.setVariable("GENDS_SuccessIndicator", false)
+               execution.setVariable("GENDS_FoundIndicator", false)
+
+               try{
+                       // Get Variables
+                       String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
+                       String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
+                       String serviceType = execution.getVariable("GENDS_serviceType")
+                       String type = execution.getVariable("GENDS_type")
+
+                       if(type != null){
+                               utils.log("DEBUG", "Incoming GENDS_type is: " + type, isDebugEnabled)
+                               if(isBlank(globalCustomerId) || isBlank(serviceType)){
+                                       utils.log("DEBUG", "Incoming Required Variable is null!", isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+                               }else{
+                                       utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+                                       utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+                                       if(type.equalsIgnoreCase("service-instance")){
+                                               if(isBlank(serviceInstanceId)){
+                                                       utils.log("DEBUG", "Incoming Required Variable is null!", isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+                                               }else{
+                                                       utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+                                                       utils.log("DEBUG", "Preparing Delete Service-Instance Process", isDebugEnabled)
+                                               }
+                                       }else if(type.equalsIgnoreCase("service-subscription")){
+                                               utils.log("DEBUG", "Preparing Delete Service-Subscription Process", isDebugEnabled)
+                                       }else{
+                                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
+                                       }
+                               }
+
+                               String resourceVersion = execution.getVariable('GENDS_resourceVersion')
+                               if(isBlank(resourceVersion)){
+                                       utils.log("DEBUG", "Service Instance Resource Version is NOT Provided", isDebugEnabled)
+                                       execution.setVariable("GENDS_resourceVersionProvidedFlag", false)
+                               }else{
+                                       utils.log("DEBUG", "Incoming SI Resource Version is: " + resourceVersion, isDebugEnabled)
+                               }
+
+                       }else{
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENDS_type is null. Variable is Required.")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("ERROR", " Error encountered within GenericDeleteService PreProcessRequest method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericDeleteService PreProcessRequest")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED GenericDeleteService PreProcessRequest Process ***", isDebugEnabled)
+       }
+
+       /**
+        * This method executes a GET call to AAI for the service instance
+        * or service-subscription so that the objects's resource-version
+        * can be obtained.
+        *
+        * @param - execution
+        */
+       public void getServiceResourceVersion(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericDeleteService GetServiceResourceVersion Process*** ", isDebugEnabled)
+               try {
+                       String serviceType = execution.getVariable("GENDS_serviceType")
+                       utils.log("DEBUG", " Incoming GENDS_serviceType is: " + serviceType, isDebugEnabled)
+                       String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
+                       utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+                       String type = execution.getVariable("GENDS_type")
+                       String serviceEndpoint = ""
+
+                       if(type.equalsIgnoreCase("service-instance")){
+                               String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
+                               utils.log("DEBUG", " Incoming GENDS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+                               serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
+
+                       }else if(type.equalsIgnoreCase("service-subscription")){
+                               serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
+                       }
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+
+                       String serviceAaiPath = "${aai_endpoint}${aai_uri}/"  + serviceEndpoint
+
+                       execution.setVariable("GENDS_serviceAaiPath", serviceAaiPath)
+                       utils.log("DEBUG", "GET Service Instance AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
+
+                       APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceAaiPath)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENDS_getServiceResponseCode", responseCode)
+                       utils.log("DEBUG", "  GET Service Instance response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENDS_getServiceResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 200 || responseCode == 202){
+                               utils.log("DEBUG", "GET Service Received a Good Response: \n" + aaiResponse, isDebugEnabled)
+                               execution.setVariable("GENDS_SuccessIndicator", true)
+                               execution.setVariable("GENDS_FoundIndicator", true)
+                               String resourceVersion = utils.getNodeText1(aaiResponse, "resource-version")
+                               execution.setVariable("GENDS_resourceVersion", resourceVersion)
+                               utils.log("DEBUG", type + " Resource Version is: " + resourceVersion, isDebugEnabled)
+
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "GET Service Received a Not Found (404) Response", isDebugEnabled)
+                               execution.setVariable("GENDS_SuccessIndicator", true)
+                               execution.setVariable("WorkflowResponse", "  ") // for junits
+                       }
+                       else{
+                               utils.log("DEBUG", "  GET Service Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", " Error encountered within GenericDeleteService GetServiceResourceVersion method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetServiceResourceVersion")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericDeleteService GetServiceResourceVersion Process*** ", isDebugEnabled)
+       }
+
+       /**
+        * This method executes a DELETE call to AAI for the provided
+        * service-instance or service-subscription.
+        *
+        * @param - execution
+        */
+       public void deleteServiceObject(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericDeleteService DeleteServiceObject Process*** ", isDebugEnabled)
+               try {
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String type = execution.getVariable("GENDS_type")
+                       String serviceAaiPath = execution.getVariable("GENDS_serviceAaiPath")
+                       String serviceEndpoint = ""
+
+                       if(isEmpty(serviceAaiPath)){
+                               String serviceType = execution.getVariable("GENDS_serviceType")
+                               utils.log("DEBUG", " Incoming GENDS_serviceType is: " + serviceType, isDebugEnabled)
+                               String globalCustomerId = execution.getVariable("GENDS_globalCustomerId")
+                               utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+                               if(type.equalsIgnoreCase("service-instance")){
+                                       String serviceInstanceId = execution.getVariable("GENDS_serviceInstanceId")
+                                       utils.log("DEBUG", " Incoming GENDS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+                                       serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
+
+                               }else if(type.equalsIgnoreCase("service-subscription")){
+                                       serviceEndpoint = UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
+                               }
+
+                               String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                               String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+                               logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+
+                               serviceAaiPath = "${aai_endpoint}${aai_uri}/"  + serviceEndpoint
+                       }
+
+                       String resourceVersion = execution.getVariable("GENDS_resourceVersion")
+                       utils.log("DEBUG", "Incoming Resource Version is: " + resourceVersion, isDebugEnabled)
+                       if(resourceVersion !=null){
+                               serviceAaiPath = serviceAaiPath +'?resource-version=' + UriUtils.encode(resourceVersion,"UTF-8")
+                       }
+
+                       execution.setVariable("GENDS_deleteServiceAaiPath", serviceAaiPath)
+                       utils.log("DEBUG", "DELETE Service AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
+
+                       APIResponse response = aaiUriUtil.executeAAIDeleteCall(execution, serviceAaiPath)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENDS_deleteServiceResponseCode", responseCode)
+                       utils.log("DEBUG", "  DELETE Service response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENDS_deleteServiceResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 200 || responseCode == 204){
+                               utils.log("DEBUG", "  DELETE Service Received a Good Response", isDebugEnabled)
+                               execution.setVariable("GENDS_FoundIndicator", true)
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "  DELETE Service Received a Not Found (404) Response", isDebugEnabled)
+                               execution.setVariable("GENDS_FoundIndicator", false)
+                       }else{
+                               utils.log("DEBUG", "DELETE Service Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", " Error encountered within GenericDeleteService DeleteServiceObject method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During Delete Service Object")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericDeleteService DeleteServiceObject Process*** ", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericDeleteVnf.groovy
new file mode 100644 (file)
index 0000000..c68ea47
--- /dev/null
@@ -0,0 +1,276 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * TODO: Support getting vnf type = vpe
+ *
+ * This class supports the GenericGetVnf Sub Flow.
+ * This Generic sub flow can be used by any flow for accomplishing
+ * the goal of getting a Vnf Object (from AAI).  The flow currently
+ * supports the querying of 2 types of Vnfs, generic-vnf and vce. The
+ * type must be provided by the calling flow and the type should
+ * be mapped to the variable GENDV_type. The type should either be
+ * "generic-vnf" or "vce".  If the Vnf Id is not provided by the calling
+ * flow then this sub flow will execute the query to get the
+ * Vnf using the Vnf Name. Therefore, the calling flow must provide
+ * either the Vnf Id or Vnf Name.
+ *
+ * Upon successful completion of this sub flow the
+ * GENDV_SuccessIndicator will be true and the query response payload
+ * will be set to GENDV_vnf.  An MSOWorkflowException will
+ * be thrown upon unsuccessful completion or if an error occurs
+ * at any time during this sub flow. Please map variables
+ * to the corresponding variable names below.
+ *
+ * Note - if this sub flow receives a Not Found (404) response
+ * from AAI at any time this will be considered an acceptable
+ * successful response however the GENDV_FoundIndicator
+ * set to false.  This will allow the calling flow to distinguish
+ * between the two success scenarios, "Success where Vnf is found"
+ * and "Success where Vnf is NOT found".
+ *
+ *
+ * Incoming Variables:
+ * @param - GENDV_vnfId
+ * @param - GENDV_type
+ * @param (Optional) - GENDV_resourceVersion
+ *
+ *
+ * Outgoing Variables:
+ * @param - GENDV_vnf
+ * @param - GENDV_SuccessIndicator
+ * @param - GENDV_FoundIndicator
+ * @param - WorkflowException
+ */
+class GenericDeleteVnf extends AbstractServiceTaskProcessor{
+
+       String Prefix = "GENDV_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       /**
+        * This method validates the incoming variables and
+        * determines if the resource version was provided
+        *
+        * @param - execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericDeleteVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+               execution.setVariable("GENDV_resourceVersionProvided", true)
+               execution.setVariable("GENDV_SuccessIndicator", false)
+               execution.setVariable("GENDV_FoundIndicator", false)
+
+               try{
+                       // Get Variables
+                       String vnfId = execution.getVariable("GENDV_vnfId")
+                       String type = execution.getVariable("GENDV_type")
+
+                       if(isBlank(type) || isBlank(vnfId)){
+                               utils.log("ERROR", "Incoming Required Variable is null!", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Required Variable is Missing or Null!")
+                       }else{
+                               utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
+
+                               String resourceVersion = execution.getVariable("GENDV_resourceVersion")
+                               if(isBlank(resourceVersion)){
+                                       utils.log("DEBUG", "Vnf Resource Version is NOT Provided", isDebugEnabled)
+                                       execution.setVariable("GENDV_resourceVersionProvided", false)
+                               }else{
+                                       utils.log("DEBUG", "Incoming Vnf Resource Version is: " + resourceVersion, isDebugEnabled)
+                               }
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("ERROR", " Error encountered within GenericDeleteVnf PreProcessRequest method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericDeleteVnf PreProcessRequest")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED GenericDeleteVnf PreProcessRequest Process ***", isDebugEnabled)
+       }
+
+       /**
+        * This method executes a GET call to AAI for the Vnf
+        * so that the Vnf's resource-version can be
+        * obtained.
+        *
+        * @param - execution
+        */
+       public void getVnfResourceVersion(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericDeleteVnf GetVnfResourceVersion Process*** ", isDebugEnabled)
+               try {
+                       String vnfId = execution.getVariable("GENDV_vnfId")
+                       String type = execution.getVariable("GENDV_type")
+                       utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       //Determine Type of Vnf Querying For
+                       def aai_uri = ""
+                       if(type.equals("generic-vnf")){
+                               aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       }else if(type.equals("vce")){
+                               aai_uri = aaiUriUtil.getNetworkVceUri(execution)
+                       }else{
+                               utils.log("DEBUG", "Invalid Incoming GENDV_type", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENDV_type")
+                       }
+
+                       String getVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+
+                       execution.setVariable("GENDV_getVnfPath", getVnfPath)
+                       utils.logAudit("Get Vnf Resource Version Url is: " + getVnfPath)
+
+                       APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENDV_getVnfResponseCode", responseCode)
+                       utils.log("DEBUG", "  GET Vnf response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENDV_getVnfResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 200 || responseCode == 202){
+                               utils.log("DEBUG", "GET Vnf Received a Good Response: \n" + aaiResponse, isDebugEnabled)
+                               execution.setVariable("GENDV_FoundIndicator", true)
+                               if(utils.nodeExists(aaiResponse, "resource-version")){
+                                       String resourceVersion = utils.getNodeText1(aaiResponse, "resource-version")
+                                       execution.setVariable("GENDV_resourceVersion", resourceVersion)
+                                       utils.log("DEBUG", "SI Resource Version is: " + resourceVersion, isDebugEnabled)
+                               }else{
+                                       utils.log("DEBUG", "GET Vnf for Resource Version Response Does NOT Contain a resource-version", isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Unable to obtain Vnf resource-version. GET Vnf Response Does NOT Contain a resource-version")
+                               }
+
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
+                               execution.setVariable("GENDV_SuccessIndicator", true)
+                               execution.setVariable("WorkflowResponse", "  ") // for junits
+                       }
+                       else{
+                               utils.log("DEBUG", "  GET Vnf Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", " Error encountered within GenericDeleteVnf GetVnfResourceVersion method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfResourceVersion")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericDeleteVnf GetVnfResourceVersion Process*** ", isDebugEnabled)
+       }
+
+       /**
+        * This method executes a DELETE call to AAI for the provided
+        * Vnf.
+        *
+        * @param - execution
+        */
+       public void deleteVnf(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericDeleteVnf DeleteVnf Process*** ", isDebugEnabled)
+               try {
+                       String vnfId = execution.getVariable("GENDV_vnfId")
+                       String type = execution.getVariable("GENDV_type")
+                       utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
+                       String resourceVersion = execution.getVariable("GENDV_resourceVersion")
+                       utils.log("DEBUG", "Incoming Vnf Resource Version is: " + resourceVersion, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       //Determine Type of Vnf Querying For
+                       def aai_uri = ""
+                       if(type.equals("generic-vnf")){
+                               aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       }else if(type.equals("vce")){
+                               aai_uri = aaiUriUtil.getNetworkVceUri(execution)
+                       }else{
+                               utils.log("DEBUG", "Invalid Incoming GENDV_type", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENDV_type")
+                       }
+
+                       String deleteVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") +'?resource-version=' + UriUtils.encode(resourceVersion,"UTF-8")
+
+                       execution.setVariable("GENDV_deleteVnfPath", deleteVnfPath)
+                       utils.logAudit("Delete Vnf Url is: " + deleteVnfPath)
+
+                       APIResponse response = aaiUriUtil.executeAAIDeleteCall(execution, deleteVnfPath)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENDV_deleteVnfResponseCode", responseCode)
+                       utils.log("DEBUG", "  DELETE Vnf response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENDV_deleteVnfResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 204){
+                               utils.log("DEBUG", "  DELETE Vnf Received a Good Response", isDebugEnabled)
+                               execution.setVariable("GENDV_FoundIndicator", true)
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "  DELETE Vnf Received a Not Found (404) Response", isDebugEnabled)
+                       }else if(responseCode == 412){
+                               utils.log("DEBUG", "DELETE Vnf Received a Resource Version Mismatch Error: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 412, "Delete Vnf Received a resource-version Mismatch Error Response from AAI")
+                       }else{
+                               utils.log("DEBUG", "DELETE Vnf Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", " Error encountered within GenericDeleteVnf DeleteVnf method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During Delete Vnf")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericDeleteVnf DeleteVnf Process*** ", isDebugEnabled)
+       }
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetService.groovy
new file mode 100644 (file)
index 0000000..89728bf
--- /dev/null
@@ -0,0 +1,379 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * This class supports the GenericGetService Sub Flow.
+ * This Generic sub flow can be used by any flow for accomplishing
+ * the goal of getting a Service-Instance or Service-Subscription (from AAI).
+ * The calling flow must set the GENGS_type variable as "service-instance"
+ * or "service-subscription".
+ *
+ * When using to Get a Service-Instance:
+ * If the global-customer-id and service-type are not provided
+ * this flow executes a query to get the service- Url using the
+ * Service  Id or Name (whichever is provided).
+ *
+ * When using to Get a Service-Subscription:
+ * The global-customer-id and service-type must be
+ * provided.
+ *
+ * Upon successful completion of this sub flow the
+ * GENGS_SuccessIndicator will be true and the query response payload
+ * will be set to GENGS_service.  An MSOWorkflowException will
+ * be thrown upon unsuccessful completion or if an error occurs
+ * at any time during this sub flow. Please map variables
+ * to the corresponding variable names below.
+ *
+ * Note - If this sub flow receives a Not Found (404) response
+ * from AAI at any time this will be considered an acceptable
+ * successful response however the GENGS_FoundIndicator
+ * will be set to false. This variable will allow the calling flow
+ * to distinguish between the two Success scenarios,
+ * "Success where service- is found" and
+ * "Success where service- is NOT found".
+ *
+ *
+ * Incoming Variables (Service-Instance):
+ * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
+ * @param - GENGS_type
+ * @param (Optional) - GENGS_serviceType
+ * @param (Optional) - GENGS_globalCustomerId
+ *
+ * Incoming Variables (Service-Subscription):
+ * @param - GENGS_type
+ * @param - GENGS_serviceType
+ * @param - GENGS_globalCustomerId
+ *
+ *
+ * Outgoing Variables:
+ * @param - GENGS_service
+ * @param - GENGS_SuccessIndicator
+ * @param - GENGS_FoundIndicator
+ * @param - WorkflowException
+ */
+class GenericGetService extends AbstractServiceTaskProcessor{
+
+       String Prefix = "GENGS_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       /**
+        * This method validates the incoming variables and
+        * determines the subsequent event based on which
+        * variables the calling flow provided.
+        *
+        * @param - execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericGetService PreProcessRequest Process*** ", isDebugEnabled)
+
+               execution.setVariable("GENGS_obtainServiceInstanceUrl", false)
+               execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
+               execution.setVariable("GENGS_SuccessIndicator", false)
+               execution.setVariable("GENGS_FoundIndicator", false)
+               execution.setVariable("GENGS_siResourceLink", null)
+
+               try{
+                       // Get Variables
+                       String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
+                       String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
+                       String serviceType = execution.getVariable("GENGS_serviceType")
+                       String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
+                       String type = execution.getVariable("GENGS_type")
+
+                       if(type != null){
+                               utils.log("DEBUG", "Incoming GENGS_type is: " + type, isDebugEnabled)
+                               if(type.equalsIgnoreCase("service-instance")){
+                                       if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
+                                               utils.log("DEBUG", "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.", isDebugEnabled)
+                                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
+                                       }else{
+                                               utils.log("DEBUG", "Incoming Service Instance Id is: " + serviceInstanceId, isDebugEnabled)
+                                               utils.log("DEBUG", "Incoming Service Instance Name is: " + serviceInstanceName, isDebugEnabled)
+                                               if(isBlank(globalCustomerId) || isBlank(serviceType)){
+                                                       execution.setVariable("GENGS_obtainServiceInstanceUrl", true)
+                                                       if(isBlank(serviceInstanceId)){
+                                                               execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
+                                                       }
+                                               }else{
+                                                       utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+                                                       utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+                                               }
+                                       }
+                               }else if(type.equalsIgnoreCase("service-subscription")){
+                                       if(isBlank(serviceType) || isBlank(globalCustomerId)){
+                                               utils.log("DEBUG", "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.", isDebugEnabled)
+                                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
+                                       }else{
+                                               utils.log("DEBUG", "Incoming Service Type is: " + serviceType, isDebugEnabled)
+                                               utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+                                       }
+                               }else{
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
+                               }
+                       }else{
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
+                       }
+
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", "Internal Error encountered within GenericGetService PreProcessRequest method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED GenericGetService PreProcessRequest Process ***", isDebugEnabled)
+       }
+
+       /**
+        * This method obtains the Url to the provided service instance
+        * using the Service Instance Id.
+        *
+        * @param - execution
+        */
+       public void obtainServiceInstanceUrlById(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericGetService ObtainServiceInstanceUrlById Process*** ", isDebugEnabled)
+               try {
+                       String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
+                       utils.log("DEBUG", " Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId, isDebugEnabled)
+
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
+
+                       //String url = "${aai_endpoint}${path}"  host name needs to be removed from property
+                       String url = "${path}"
+                       execution.setVariable("GENGS_obtainSIUrlPath", url)
+
+                       APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
+                       utils.log("DEBUG", "  DELETE Service Instance response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 200){
+                               utils.log("DEBUG", "  Query for Service Instance Url Received a Good Response Code", isDebugEnabled)
+                               execution.setVariable("GENGS_SuccessIndicator", true)
+                               if(utils.nodeExists(aaiResponse, "result-data")){
+                                       utils.log("DEBUG", "Query for Service Instance Url Response Does Contain Data" , isDebugEnabled)
+                                       execution.setVariable("GENGS_FoundIndicator", true)
+                                       String resourceLink = utils.getNodeText1(aaiResponse, "resource-link")
+                                       execution.setVariable("GENGS_siResourceLink", resourceLink)
+                               }else{
+                                       utils.log("DEBUG", "Query for Service Instance Url Response Does NOT Contains Data" , isDebugEnabled)
+                                       execution.setVariable("WorkflowResponse", "  ") //for junits
+                               }
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "  Query for Service Instance Received a Not Found (404) Response", isDebugEnabled)
+                               execution.setVariable("GENGS_SuccessIndicator", true)
+                               execution.setVariable("WorkflowResponse", "  ") //for junits
+                       }else{
+                               utils.log("DEBUG", "Query for Service Instance Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("ERROR", " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericGetService ObtainServiceInstanceUrlById Process*** ", isDebugEnabled)
+       }
+
+       /**
+        * This method obtains the Url to the provided service instance
+        * using the Service Instance Name.
+        *
+        * @param - execution
+        */
+       public void obtainServiceInstanceUrlByName(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericGetService ObtainServiceInstanceUrlByName Process*** ", isDebugEnabled)
+               try {
+                       String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
+                       utils.log("DEBUG", " Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName, isDebugEnabled)
+
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
+
+                       //String url = "${aai_endpoint}${path}"  host name needs to be removed from property
+                       String url = "${path}"
+                       execution.setVariable("GENGS_obtainSIUrlPath", url)
+
+                       APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
+                       utils.log("DEBUG", "  DELETE Service Instance response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 200){
+                               utils.log("DEBUG", "  Query for Service Instance Url Received a Good Response Code", isDebugEnabled)
+                               execution.setVariable("GENGS_SuccessIndicator", true)
+                               if(utils.nodeExists(aaiResponse, "result-data")){
+                                       utils.log("DEBUG", "Query for Service Instance Url Response Does Contain Data" , isDebugEnabled)
+                                       execution.setVariable("GENGS_FoundIndicator", true)
+                                       String resourceLink = utils.getNodeText1(aaiResponse, "resource-link")
+                                       execution.setVariable("GENGS_siResourceLink", resourceLink)
+                               }else{
+                                       utils.log("DEBUG", "Query for Service Instance Url Response Does NOT Contains Data" , isDebugEnabled)
+                                       execution.setVariable("WorkflowResponse", "  ") //for junits
+                               }
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "  Query for Service Instance Received a Not Found (404) Response", isDebugEnabled)
+                               execution.setVariable("GENGS_SuccessIndicator", true)
+                               execution.setVariable("WorkflowResponse", "  ") //for junits
+                       }else{
+                               utils.log("DEBUG", "Query for Service Instance Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("ERROR", " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process*** ", isDebugEnabled)
+       }
+
+
+       /**
+        * This method executes a GET call to AAI to obtain the
+        * service-instance or service-subscription
+        *
+        * @param - execution
+        */
+       public void getServiceObject(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericGetService GetServiceObject Process*** ", isDebugEnabled)
+               try {
+                       String type = execution.getVariable("GENGS_type")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       String serviceEndpoint = ""
+
+                       if(type.equalsIgnoreCase("service-instance")){
+                               String siResourceLink = execution.getVariable("GENGS_siResourceLink")
+                               if(isBlank(siResourceLink)){
+                                       String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
+                                       utils.log("DEBUG", " Incoming GENGS_serviceInstanceId is: " + serviceInstanceId, isDebugEnabled)
+                                       String serviceType = execution.getVariable("GENGS_serviceType")
+                                       utils.log("DEBUG", " Incoming GENGS_serviceType is: " + serviceType, isDebugEnabled)
+                                       String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
+                                       utils.log("DEBUG", "Incoming Global Customer Id is: " + globalCustomerId, isDebugEnabled)
+
+                                       String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+                                       logDebug('AAI URI is: ' + aai_uri, isDebugEnabled)
+                                       serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
+                               }else{
+                                       utils.log("DEBUG", "Incoming Service Instance Resource Link is: " + siResourceLink, isDebugEnabled)
+                                       String[] split = siResourceLink.split("/aai/")
+                                       serviceEndpoint = "/aai/" + split[1]
+                               }
+                       }else if(type.equalsIgnoreCase("service-subscription")){
+                               String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
+                               String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
+                               String serviceType = execution.getVariable("GENGS_serviceType")
+                               serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
+                       }
+
+                       String serviceUrl = "${aai_endpoint}" + serviceEndpoint
+
+                       execution.setVariable("GENGS_getServiceUrl", serviceUrl)
+                       utils.log("DEBUG", "GET Service AAI Path is: \n" + serviceUrl, isDebugEnabled)
+
+                       APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENGS_getServiceResponseCode", responseCode)
+                       utils.log("DEBUG", "  GET Service response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENGS_getServiceResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 200 || responseCode == 202){
+                               utils.log("DEBUG", "GET Service Received a Good Response Code", isDebugEnabled)
+                               if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
+                                       utils.log("DEBUG", "GET Service Response Contains a service-instance" , isDebugEnabled)
+                                       execution.setVariable("GENGS_FoundIndicator", true)
+                                       execution.setVariable("GENGS_service", aaiResponse)
+                                       execution.setVariable("WorkflowResponse", aaiResponse)
+
+                               }else{
+                                       utils.log("DEBUG", "GET Service Response Does NOT Contain Data" , isDebugEnabled)
+                               }
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "GET Service Received a Not Found (404) Response", isDebugEnabled)
+                               execution.setVariable("WorkflowResponse", "  ") //for junits
+                       }
+                       else{
+                               utils.log("DEBUG", "  GET Service Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", " Error encountered within GenericGetService GetServiceObject method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericGetService GetServiceObject Process*** ", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericGetVnf.groovy
new file mode 100644 (file)
index 0000000..81c8c01
--- /dev/null
@@ -0,0 +1,276 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import org.springframework.web.util.UriUtils
+
+
+/**
+ * TODO: Support getting vnf type = vpe
+ *
+ * This class supports the GenericGetVnf Sub Flow.
+ * This Generic sub flow can be used by any flow for accomplishing
+ * the goal of getting a Vnf Object (from AAI).  The flow currently
+ * supports the querying of 2 types of Vnfs, generic-vnf and vce. The
+ * type must be provided by the calling flow and the type should
+ * be mapped to the variable GENGV_type. The type should either be
+ * "generic-vnf" or "vce".  If the Vnf Id is not provided by the calling
+ * flow then this sub flow will execute the query to get the
+ * Vnf using the Vnf Name. Therefore, the calling flow must provide
+ * either the Vnf Id or Vnf Name.
+ *
+ * Upon successful completion of this sub flow the
+ * GENGV_SuccessIndicator will be true and the query response payload
+ * will be set to GENGV_vnf.  An MSOWorkflowException will
+ * be thrown upon unsuccessful completion or if an error occurs
+ * at any time during this sub flow. Please map variables
+ * to the corresponding variable names below.
+ *
+ * Note - if this sub flow receives a Not Found (404) response
+ * from AAI at any time this will be considered an acceptable
+ * successful response however the GENGV_FoundIndicator
+ * set to false.  This will allow the calling flow to distinguish
+ * between the two success scenarios, "Success where Vnf is found"
+ * and "Success where Vnf is NOT found".
+ *
+ *
+ * Incoming Required Variables:
+ * @param - GENGV_vnfId  or  @param - GENGV_vnfName
+ * @param - GENGV_type
+ *
+ *
+ * Outgoing Variables:
+ * @param - GENGV_vnf
+ * @param - GENGV_SuccessIndicator
+ * @param - GENGV_FoundIndicator
+ * @param - WorkflowException
+ */
+class GenericGetVnf extends AbstractServiceTaskProcessor{
+
+       String Prefix = "GENGV_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       /**
+        * This method validates the incoming variables and
+        * determines the subsequent event based on which
+        * variables the calling flow provided.
+        *
+        * @param - execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericGetVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+               execution.setVariable("GENGV_getVnfByName", false)
+               execution.setVariable("GENGV_SuccessIndicator", false)
+               execution.setVariable("GENGV_FoundIndicator", false)
+
+               try{
+                       // Get Variables
+                       String vnfId = execution.getVariable("GENGV_vnfId")
+                       utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
+                       String vnfName = execution.getVariable("GENGV_vnfName")
+                       utils.log("DEBUG", "Incoming Vnf Name is: " + vnfName, isDebugEnabled)
+
+                       if(isBlank(vnfId) && isBlank(vnfName)){
+                               utils.log("DEBUG", "Incoming Vnf Name and Vnf Id are null. At least one is required!", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Vnf Name and Vnf Id are null. At least one is required.")
+                       }else{
+                               if(isBlank(vnfId)){
+                                       execution.setVariable("GENGV_getVnfByName", true)
+                               }
+                       }
+
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", " Error encountered within GenericGetVnf PreProcessRequest method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetVnf PreProcessRequest")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED GenericGetVnf PreProcessRequest Process ***", isDebugEnabled)
+       }
+
+       /**
+        * This method executes a GET call to AAI to obtain the
+        * Vnf using the Vnf Name
+        *
+        * @param - execution
+        */
+       public void getVnfByName(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericGetVnf GetVnfByName Process*** ", isDebugEnabled)
+               try {
+                       String vnfName = execution.getVariable("GENGV_vnfName")
+                       utils.log("DEBUG", "Getting Vnf by Vnf Name: " + vnfName, isDebugEnabled)
+                       String type = execution.getVariable("GENGV_type")
+                       utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       //Determine Type of Vnf Querying For.
+                       def aai_uri = ""
+                       if(type.equals("generic-vnf")){
+                               aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       }else if(type.equals("vce")){
+                               aai_uri = aaiUriUtil.getNetworkVceUri(execution)
+                       }else{
+                               utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENGV_type")
+                       }
+
+                       String getVnfPath = "${aai_endpoint}${aai_uri}?vnf-name=" + UriUtils.encode(vnfName, "UTF-8")
+
+                       execution.setVariable("GENGV_getVnfPath", getVnfPath)
+                       utils.logAudit("Get Vnf Url is: " + getVnfPath)
+
+                       APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENGV_getVnfResponseCode", responseCode)
+                       utils.log("DEBUG", "  GET Vnf response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENGV_getVnfResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 200){
+                               utils.log("DEBUG", "GET Vnf Received a Good Response", isDebugEnabled)
+                                       if(utils.nodeExists(aaiResponse, type)){
+                                               utils.log("DEBUG", "GET Vnf Response Contains a Vnf", isDebugEnabled)
+                                               execution.setVariable("GENGV_FoundIndicator", true)
+                                               execution.setVariable("GENGV_vnf", aaiResponse)
+                                               execution.setVariable("WorkflowResponse", aaiResponse)
+                                       }else{
+                                               utils.log("DEBUG", "GET Vnf Response Does NOT Contain a Vnf", isDebugEnabled)
+                                       }
+
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
+                       }else{
+                               utils.log("DEBUG", "GET Vnf Received a Bad Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("ERROR", " Error encountered within GenericGetVnf GetVnfByName method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfByName")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericGetVnf GetVnfByName Process*** ", isDebugEnabled)
+       }
+
+       /**
+        * This method executes a GET call to AAI to obtain the
+        * Vnf using the Vnf Id
+        *
+        * @param - execution
+        */
+       public void getVnfById(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericGetVnf GetVnfById Process*** ", isDebugEnabled)
+               try {
+                       String vnfId = execution.getVariable("GENGV_vnfId")
+                       utils.log("DEBUG", "Getting Vnf by Vnf Id: " + vnfId, isDebugEnabled)
+                       String type = execution.getVariable("GENGV_type")
+                       utils.log("DEBUG", "Type of Vnf Getting is: " + type, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       //Determine Type of Vnf Querying For.
+                       def aai_uri = ""
+                       if(type.equals("generic-vnf")){
+                               aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       }else if(type.equals("vce")){
+                               aai_uri = aaiUriUtil.getNetworkVceUri(execution)
+                       }else if(type.equals("vpe")){
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "GenericGetVnf does not yet support getting type of vnf = vpe")
+                       }else{
+                               utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENGV_type")
+                       }
+                       utils.log("DEBUG", "Using AAI Uri: " + aai_uri, isDebugEnabled)
+
+                       String getVnfPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+                       utils.log("DEBUG", "GET Vnf Endpoint is: " + getVnfPath, isDebugEnabled)
+
+                       execution.setVariable("GENGV_getVnfPath", getVnfPath)
+                       utils.logAudit("Get Vnf Url is: " + getVnfPath)
+
+                       APIResponse response = aaiUriUtil.executeAAIGetCall(execution, getVnfPath)
+                       int responseCode = response.getStatusCode()
+                       execution.setVariable("GENGV_getVnfResponseCode", responseCode)
+                       utils.log("DEBUG", "  GET Vnf response code is: " + responseCode, isDebugEnabled)
+
+                       String aaiResponse = response.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENGV_getVnfResponse", aaiResponse)
+
+                       //Process Response
+                       if(responseCode == 200){
+                               utils.log("DEBUG", "GET Vnf Received a Good Response", isDebugEnabled)
+                                       if(utils.nodeExists(aaiResponse, type)){
+                                               utils.log("DEBUG", "GET Vnf Response Contains a Vnf", isDebugEnabled)
+                                               execution.setVariable("GENGV_FoundIndicator", true)
+                                               execution.setVariable("GENGV_vnf", aaiResponse)
+                                               execution.setVariable("WorkflowResponse", aaiResponse)
+                                       }else{
+                                               utils.log("DEBUG", "GET Vnf Response Does NOT Contain a Vnf", isDebugEnabled)
+                                       }
+
+                       }else if(responseCode == 404){
+                               utils.log("DEBUG", "GET Vnf Received a Not Found (404) Response", isDebugEnabled)
+                       }else{
+                               utils.log("DEBUG", "GET Vnf Received a BAD REST Response: \n" + aaiResponse, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("ERROR", " Error encountered within GenericGetVnf GetVnfById method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GetVnfById")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericGetVnf GetVnfById Process*** ", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/GenericPutVnf.groovy
new file mode 100644 (file)
index 0000000..40948dc
--- /dev/null
@@ -0,0 +1,178 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import static org.apache.commons.lang3.StringUtils.*;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import org.springframework.web.util.UriUtils
+
+/**
+ * TODO: Support Putting vnf type = vpe and vce
+ *
+ * This class supports the GenericPutVnf Sub Flow.
+ * This Generic sub flow can be used by any flow for accomplishing
+ * the goal of Creating/Updating(PUT) a Vnf Object (in AAI).  The flow
+ * supports the Creating/Updating of 3 types of Vnfs (generic-vnf, vce, and vpe).
+ * The "type" must be provided by the calling flow and this type should
+ * be mapped to the variable GENPV_type. The type should either be
+ * "generic-vnf", "vce", or "vpe".  In addition, the Vnf Id and
+ * payload should be provided.
+ *
+ * Upon successful completion of this sub flow the
+ * GENPV_SuccessIndicator.  An MSOWorkflowException will
+ * be thrown if an error occurs at any time during this
+ * sub flow. Please map input variables to the corresponding
+ * variable names below.
+ *
+ *
+ * Incoming Required Variables:
+ * @param - GENPV_vnfId
+ * @param - GENPV_vnfPayload
+ * @param - GENPV_type
+ *
+ *
+ * Outgoing Variables:
+ * @param - GENPV_SuccessIndicator
+ * @param - WorkflowException
+ */
+class GenericPutVnf  extends AbstractServiceTaskProcessor{
+
+       String Prefix = "GENPV_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       /**
+        * This method validates the incoming variables and
+        * generates a Vnf Id if one is not provided.
+        *
+        * @param - execution
+        */
+       public void preProcessRequest(Execution execution) {
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericPutVnf PreProcessRequest Process*** ", isDebugEnabled)
+
+               execution.setVariable("GENPV_SuccessIndicator", false)
+               execution.setVariable("GENPV_FoundIndicator", false)
+
+               try{
+                       // Get Variables
+                       String payload = execution.getVariable("GENPV_vnfPayload")
+                       utils.log("DEBUG", "Incoming Vnf Payload is: " + payload, isDebugEnabled)
+                       String type = execution.getVariable("GENPV_type")
+                       utils.log("DEBUG", "Incoming Type of Vnf is: " + type, isDebugEnabled)
+
+                       if(isBlank(payload) || isBlank(type)){
+                               utils.log("ERROR", "Incoming Vnf Payload and/or Type is null. These Variables are required!", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Vnf Payload and/or Type is null. These Variables are required!")
+                       }else{
+                               String vnfId = execution.getVariable("GENPV_vnfId")
+                               if(isBlank(vnfId)){
+                                       vnfId = UUID.randomUUID().toString()
+                                       utils.log("DEBUG", "Generated Vnf Id is: " + vnfId, isDebugEnabled)
+                                       execution.setVariable("GENPV_vnfId", vnfId)
+                               }else{
+                                       utils.log("DEBUG", "Incoming Vnf Id is: " + vnfId, isDebugEnabled)
+                               }
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("ERROR", " Error encountered within GenericPutVnf PreProcessRequest method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericPutVnf PreProcessRequest")
+
+               }
+               utils.log("DEBUG", "*** COMPLETED GenericPutVnf PreProcessRequest Process ***", isDebugEnabled)
+       }
+
+       /**
+        * This method executes a Put call to AAI to create
+        * or update a Vnf Object using the provided payload
+        *
+        * @param - execution
+        */
+       public void putVnf(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               utils.log("DEBUG", " *** STARTED GenericPutVnf PutVnf Process*** ", isDebugEnabled)
+               try {
+                       String vnfId = execution.getVariable("GENPV_vnfId")
+                       String payload = execution.getVariable("GENPV_vnfPayload")
+                       String type = execution.getVariable("GENPV_type")
+
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       def aai_uri = ""
+                       if(type.equals("generic-vnf")){
+                               aai_uri = aaiUtil.getNetworkGenericVnfUri(execution)
+                       }else if(type.equals("vce")){
+                               aai_uri = aaiUtil.getNetworkVceUri(execution)
+                       }else if(type.equals("vpe")){
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "GenericPutVnf does not yet support getting type of vnf = vpe")
+                       }else{
+                               utils.log("DEBUG", "Invalid Incoming GENGV_type", isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Invalid Incoming GENPV_type")
+                       }
+                       utils.log("DEBUG", "Using AAI Uri: " + aai_uri, isDebugEnabled)
+
+                       String path = "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+                       utils.log("DEBUG", "PUT Vnf Endpoint is: " + path, isDebugEnabled)
+
+                       String putVnfAAIPath = execution.getVariable("URN_aai_endpoint") + path
+                       execution.setVariable("GENPV_putVnfAAIPath", putVnfAAIPath)
+                       utils.logAudit("PUT Vnf Url is: " + putVnfAAIPath)
+
+                       APIResponse apiResponse = aaiUtil.executeAAIPutCall(execution, putVnfAAIPath, payload)
+                       int responseCode = apiResponse.getStatusCode()
+                       execution.setVariable("GENPV_putVnfResponseCode", responseCode)
+                       utils.logAudit("AAI Response Code: " + responseCode)
+                       String aaiResponse = apiResponse.getResponseBodyAsString()
+                       aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+                       execution.setVariable("GENPV_putVnfResponse", aaiResponse)
+                       utils.logAudit("AAI Response: " + aaiResponse)
+
+                       if(responseCode == 200 || responseCode == 201){
+                               utils.log("DEBUG", "PUT Vnf Received a Good Response Code.", isDebugEnabled)
+                       }else{
+                               utils.log("DEBUG", "PUT Vnf Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled)
+                               exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }catch(BpmnError b){
+                       utils.log("DEBUG", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("ERROR", " Error encountered within GenericPutVnf PutVnf method!" + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During PutVnf")
+               }
+               utils.log("DEBUG", " *** COMPLETED GenericPutVnf PutVnf Process*** ", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/HealchCheckActivate.groovy
new file mode 100644 (file)
index 0000000..9f21faa
--- /dev/null
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+public class HealthCheckActivate extends AbstractServiceTaskProcessor {
+       
+       
+               /**
+        * Validates the request message and sets up the workflow.
+        * @param execution the execution
+        */
+       public void preProcessRequest(Execution execution) {
+
+       }
+       
+       
+       /**
+        * Sends the synchronous response back to the API Handler.
+        * @param execution the execution
+        */
+       public void sendResponse(Execution execution) {
+               def status = execution.getVariable("healthyStatus")
+               def healthcheckmessage = execution.getVariable("healthcheckmessage")
+                       if (status == "true") {
+                               sendWorkflowResponse(execution, 200, healthcheckmessage)
+                       }else{
+                               sendWorkflowResponse(execution, 503, healthcheckmessage)
+                       }
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/MsoUtils.groovy
new file mode 100644 (file)
index 0000000..2721a20
--- /dev/null
@@ -0,0 +1,864 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.util.Node;
+import groovy.xml.XmlUtil
+
+import java.text.SimpleDateFormat
+
+import org.apache.commons.codec.binary.Base64
+
+
+
+import org.apache.commons.codec.binary.Base64
+import org.camunda.bpm.engine.runtime.Execution;
+import org.slf4j.MDC;
+import org.w3c.dom.Element
+//import org.w3c.dom.NodeList
+
+import org.openecomp.mso.bpmn.core.BPMNLogger
+import org.openecomp.mso.logger.MessageEnum
+import org.openecomp.mso.logger.MsoLogger
+import org.openecomp.mso.utils.CryptoUtils
+import org.openecomp.mso.bpmn.core.xml.XmlTool
+
+class MsoUtils {
+       def initializeEndPoints(execution){
+               // use this placeholder to initialize end points, if called independently, this need to be set
+               execution.setVariable("AAIEndPoint","http://localhost:8080/SoapUIMocks")                        
+       }
+       def getNodeText(xmlInput,element){
+               def rtn=null
+               if(xmlInput!=null){
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       rtn= xml.'**'.find{node->node.name()==element}.text()
+               }
+               return rtn
+       }
+       def getMultNodes(xmlInput, element){
+               def nodes=null
+               if(xmlInput!=null){
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       nodes = xml.'**'.findAll{ node-> node.name() == element }*.text()
+               }
+               return nodes
+       }
+       def getNodeText1(xmlInput,element){
+               def rtn=null
+               if(xmlInput!=null){
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       rtn= xml.'**'.find{node->node.name()==element}
+                       if (rtn != null){
+                               rtn=rtn.text()
+                       }
+               }
+               return rtn
+       }       
+       def getNodeXml(xmlInput,element){
+               return getNodeXml(xmlInput, element, true)
+       }
+       def getNodeXml(xmlInput,element,incPreamble){
+               def fxml= new XmlSlurper().parseText(xmlInput)
+               def nodeToSerialize = fxml.'**'.find {it.name() == element}
+               if(nodeToSerialize==null){
+                       return ""
+               }
+               def nodeAsText = XmlUtil.serialize(nodeToSerialize)
+               if (!incPreamble) {
+                       nodeAsText = removeXmlPreamble(nodeAsText)
+               }
+               return nodeAsText               
+       }
+       def nodeExists(xmlInput,element){
+               try {
+                       def fxml= new XmlSlurper().parseText(xmlInput)
+                       def nodeToSerialize = fxml.'**'.find {it.name() == element}
+                       return nodeToSerialize!=null
+               } catch(Exception e) {
+                       return false
+               }
+       }
+
+       
+       /***** Utilities when using XmlParser *****/
+       
+       /**
+        * Convert a Node into a String by deserializing it and formatting it.
+        *
+        * @param node Node to be converted.
+        * @return the Node as a String.
+        */
+       def String nodeToString(Node node) {
+               def String nodeAsString = groovy.xml.XmlUtil.serialize(node)
+               nodeAsString = removeXmlPreamble(nodeAsString)
+               return formatXml(nodeAsString)
+       }
+       
+       /**
+        * Get the specified child Node of the specified parent. If there are
+        * multiple children of the same name, only the first one is returned.
+        * If there are no children with the specified name, 'null' is returned.
+        * 
+        * @param parent Parent Node in which to find a child.
+        * @param childNodeName Name of the child Node to get.
+        * @return the (first) child Node with the specified name or 'null'
+        * if a child Node with the specified name does not exist.
+        */
+       def Node getChildNode(Node parent, String childNodeName) {
+               def NodeList nodeList = getIdenticalChildren(parent, childNodeName)
+               if (nodeList.size() == 0) {
+                       return null
+               } else {
+                       return nodeList.get(0)
+               }
+       }
+       
+       /**
+        * Get the textual value of the specified child Node of the specified parent.
+        * If there are no children with the specified name, 'null' is returned.
+        * 
+        * @param parent Parent Node in which to find a child.
+        * @param childNodeName Name of the child Node whose value to get.
+        * @return the textual value of child Node with the specified name or 'null'
+        * if a child Node with the specified name does not exist.
+        */
+       def String getChildNodeText(Node parent, String childNodeName) {
+               def Node childNode = getChildNode(parent, childNodeName)
+               if (childNode == null) {
+                       return null
+               } else {
+                       return childNode.text()
+               }
+       }
+       
+       /**
+        * Get all of the child nodes from the specified parent that have the
+        * specified name.  The returned NodeList could be empty.
+        * 
+        * @param parent Parent Node in which to find children.
+        * @param childNodeName Name of the children to get.
+        * @return a NodeList of all the children from the parent with the specified
+        * name. The list could be empty.
+        */
+       def NodeList getIdenticalChildren(Node parent, String childNodeName) {
+               return (NodeList) parent.get(childNodeName)
+       }
+
+       /***** End of Utilities when using XmlParser *****/
+
+       
+       /** these are covered under the common function above**/
+       def getSubscriberName(xmlInput,element){
+               def rtn=null
+               if(xmlInput!=null){
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       rtn= xml.'**'.find{node->node.name()==element}.text()
+               } 
+               return rtn
+       }
+       def getTenantInformation(xmlInput,element){
+               def xml= new XmlSlurper().parseText(xmlInput)
+               def nodeToSerialize = xml.'**'.find {it.name() == 'service-information'}
+               def nodeAsText = XmlUtil.serialize(nodeToSerialize)
+               return nodeAsText
+       }
+       def getServiceInstanceId(xmlInput,element){
+               def xml= new XmlSlurper().parseText(xmlInput)
+               return ( xml.'**'.find{node->node.name()==element}.text() )
+       }
+       //for aai tenant url
+       def searchResourceLink(xmlInput, resourceType){
+               def fxml= new XmlSlurper().parseText(xmlInput)
+               def element = fxml.'**'.find {it.'resource-type' == resourceType}
+               return (element == null) ? null : element.'resource-link'.text()
+       }
+
+       def searchMetaData(xmlInput, searchName, searchValue){
+               def fxml= new XmlSlurper().parseText(xmlInput)
+               def ret = fxml.'**'.find {it.metaname.text() == searchName && it.metaval.text() == searchValue}
+               if(ret != null){
+                       return ret.parent().parent()
+               }
+               return ret
+       }
+       
+       def searchMetaDataNode(fxml, searchName, searchValue){
+               def ret = fxml.'**'.find {it.metaname.text() == searchName && it.metaval.text() == searchValue}
+               if(ret != null){
+                       return ret.parent().parent()
+               }
+               return ret
+       }
+       
+       // for Trinity L3 delete bonding
+       def getPBGFList(isDebugLogEnabled, xmlInput){
+               xmlInput = xmlInput.replaceAll("&amp;", "&")
+               xmlInput = xmlInput.replaceAll("&lt;", "<")
+               xmlInput = xmlInput.replaceAll("&gt;", ">")
+               log("DEBUG", "getPBGFList: xmlInput " + xmlInput,isDebugLogEnabled)
+               ArrayList myNodes = new ArrayList()
+               if(nodeExists(xmlInput,"nbnc-response-information")){
+               def respInfo=getNodeXml(xmlInput,"nbnc-response-information", false)
+               if(respInfo!=null){
+                       def fxml= new XmlSlurper().parseText(respInfo)
+                       def myNode
+                       fxml.'virtual-datacenter-list'.each { vdc ->
+                               //we only want to add one BFG per VDC
+                               log("DEBUG", "vdc " + vdc.text(),isDebugLogEnabled)
+                               myNode = vdc.'**'.find {it.'border-element-tangibility'.text() =~ /PHYSICAL/}
+                               log("DEBUG", "myNode " + myNode.text(),isDebugLogEnabled)
+                               myNodes.add(XmlUtil.serialize(myNode))
+                       }
+               }
+                               
+                       return myNodes
+               }else{
+                       return null
+               }
+       }
+       
+       def getPBGFList(xmlInput){
+               getPBGFList("false", xmlInput)
+       }
+       
+       def String decodeXML(xml) {
+               def String decodedXml = xml.replaceAll("&amp;", "&")
+               decodedXml = decodedXml.replaceAll("&lt;", "<")
+               decodedXml = decodedXml.replaceAll("&gt;", ">")
+       }
+       
+       def getMetaVal(node, name){
+               try{
+                       return node.'**'.find {it.metaname.text() == name}.metaval.text()
+               }catch(Exception e){
+                       return null
+               }
+       }
+       def getRelationshipVal(node, name){
+               try{
+                       return node.'**'.find {it.'relationship-key'.text() == name}.'relationship-value'.text()
+               }catch(Exception e){
+                       return null
+               }
+       }
+
+       
+       def log(logmode,logtxt,isDebugLogEnabled="false"){
+               MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+               if ("INFO"==logmode) {
+                       msoLogger.info(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, logtxt);
+               } else if ("WARN"==logmode) {
+                       msoLogger.warn (MessageEnum.BPMN_GENERAL_WARNING, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logtxt);
+               } else if ("ERROR"==logmode) {
+                   msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logtxt);
+                       
+               } else {
+                       BPMNLogger.debug(isDebugLogEnabled, logtxt);
+               }
+       }
+       
+       def logContext(requestId, serviceInstanceId){
+           MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+               msoLogger.setLogContext(requestId, serviceInstanceId);
+       }
+       
+       def logMetrics(elapsedTime, logtxt){
+               MsoLogger metricsLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+               
+               metricsLogger.recordMetricEvent (elapsedTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+                       logtxt, "BPMN", MsoLogger.getServiceName(), null);
+       }
+       
+       def logAudit(logtxt){
+               MsoLogger auditLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+               long startTime = System.currentTimeMillis();
+               
+               auditLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logtxt);
+       }
+       
+       // headers: header - name-value
+       def getHeaderNameValue(xmlInput, nameAttribute){
+               def rtn=null
+               if(xmlInput!=null){
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       rtn= xml.'**'.find {header->header.'@name'.text() == nameAttribute}.'@value'
+               }
+               return rtn
+       }
+       
+       /**
+        * Gets the children of the specified element.
+        */
+       public String getChildNodes(xmlInput, element) {
+               def xml= new XmlSlurper().parseText(xmlInput)
+               def thisElement = xml.'**'.find {it.name() == element}
+               StringBuilder out = new StringBuilder()
+               if (thisElement != null) {
+                       thisElement.children().each() {
+                               String nodeAsText = removeXmlPreamble(XmlUtil.serialize(it))
+                               if (out.length() > 0) {
+                                       out.append(System.lineSeparator())
+                               }
+                               out.append(nodeAsText)
+                       }
+               }
+               return out.toString();
+       }
+       
+       /**
+        * Encodes a value so it can be used inside an XML text element.
+        * @param s the string to encode
+        * @return the encoded string
+        */
+       public String xmlEncode(Object value) {
+               return XmlTool.encode(value)
+       }
+       
+       /**
+        * Encodes a value so it can be used inside an XML attribute.
+        * @param s the string to encode
+        * @return the encoded string
+        */
+       public String xmlEncodeAttr(Object value) {
+               return XmlTool.encodeAttr(value)
+       }
+       
+       /**
+        * Decodes XML entities in a string value
+        * @param value a value with embedded XML entities
+        * @return the decoded string
+        */
+       public String xmlDecode(Object value) {
+               return XmlTool.decode(value)
+       }
+       
+       /**
+        * Removes the preamble, if present, from an XML document.
+        * Also, for historical reasons, this also trims leading and trailing
+        * whitespace from the resulting document.  TODO: remove the trimming
+        * and fix unit tests that depend on EXACT xml format.
+        * @param xml the XML document
+        * @return a possibly modified document
+        */
+       public String removeXmlPreamble(def xml) {
+               if (xml == null) {
+                       return null
+               }
+
+               return XmlTool.removePreamble(xml).trim()
+       }
+
+       /**
+        * Removes namespaces and namespace declarations from an XML document.
+        * @param xml the XML document
+        * @return a possibly modified document
+        */
+       public String removeXmlNamespaces(def xml) {
+               return XmlTool.removeNamespaces(xml);
+       }
+
+       /**
+        * Use formatXml instead.  Note: this method inserts an XML preamble.
+        */
+       @Deprecated
+       def formatXML(xmlInput) {
+               def parseXml = null
+               def formatXml = null
+               if (xmlInput !=null) {
+                       parseXml = new XmlParser().parseText(xmlInput)
+                       formatXml = XmlUtil.serialize(parseXml)
+               }
+       }
+
+       /**
+        * Reformats an XML document. The result will not contain an XML preamble
+        * or a trailing newline.
+        * @param xml the XML document
+        * @return a reformatted document
+        */
+       public String formatXml(def xml) {
+               return XmlTool.normalize(xml);
+       }
+       
+       // build single elements
+       def buildElements(xmlInput, elementList, parentName) {
+               String var = ""
+               def xmlBuild = ""
+               if (parentName != "") {
+                  xmlBuild += "<tns2:"+parentName+">"
+               }   
+               if (xmlInput != null) {
+                          for (element in elementList) {
+                             def xml= new XmlSlurper().parseText(xmlInput)
+                             var = xml.'**'.find {it.name() == element}
+                                 if (var != null) {
+                                xmlBuild += "<tns2:"+element+">"+var.toString()+"</tns2:"+element+">"
+                                 } 
+                          }
+               }
+               if (parentName != "") {
+                  xmlBuild += "</tns2:"+parentName+">"
+               }   
+               return xmlBuild
+       }
+       
+       // build the Unbounded elements
+       def buildElementsUnbounded(xmlInput, elementList, parentName) {
+               def varParents = ""
+               def var = ""
+               def xmlBuildUnbounded = ""
+               if (xmlInput != null) {
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       varParents = xml.'**'.findAll {it.name() == parentName}
+                       //println " Unbounded ${parentName} - varParent.Size() - " + varParents.size()
+                       for (i in 0..varParents.size()-1) {
+                               if (parentName != "") {
+                                       xmlBuildUnbounded += "<tns2:"+parentName+">"
+                                }
+                               for (element in elementList) {
+                                       var = varParents[i].'*'.find {it.name() == element}
+                                  if (var != null) {
+                                         xmlBuildUnbounded += "<tns2:"+element+">"+var.toString()+"</tns2:"+element+">"
+                                         //println " i = " + i + ", element: " + element + " = " + var.toString()
+                                  }
+                               }
+                               if (parentName != "") {
+                                       xmlBuildUnbounded += "</tns2:"+parentName+">"
+                                }
+                       }
+               }
+               return xmlBuildUnbounded
+        }
+       
+       // Build internet-evc-access-information
+       def buildInternetEvcAccessInformation(xmlInput) {
+               def elementsInternetEvcAccessInformationList = ["internet-evc-speed-value", "internet-evc-speed-units", "ip-version"]
+               def rebuildInternetEvcAccess = ''
+               if (xmlInput != null) {
+                       rebuildInternetEvcAccess = buildElements(xmlInput, elementsInternetEvcAccessInformationList, "internet-evc-access-information")
+               }
+               return rebuildInternetEvcAccess
+       }
+       
+    // Build internet-service-change-details
+       def buildInternetServiceChangeDetails(xmlInput) {
+               def rebuildInternetServiceChangeDetails = ""
+               if (xmlInput != null) {
+                   try { // optional
+                               def internetServiceChangeDetails = getNodeXml(xmlInput, "internet-service-change-details").drop(38).trim()
+                               rebuildInternetServiceChangeDetails = "<tns:internet-service-change-details>"
+                               rebuildInternetServiceChangeDetails += buildElements(internetServiceChangeDetails, ["internet-evc-speed-value"], "")
+                               rebuildInternetServiceChangeDetails += buildElements(internetServiceChangeDetails, ["internet-evc-speed-units"], "")
+                               def tProvidedV4LanPublicPrefixesChangesList = ["request-index", "v4-next-hop-address", "v4-lan-public-prefix", "v4-lan-public-prefix-length"]
+                               rebuildInternetServiceChangeDetails += buildElementsUnbounded(internetServiceChangeDetails, tProvidedV4LanPublicPrefixesChangesList, "t-provided-v4-lan-public-prefixes")
+                               try { // optional
+                                 def tProvidedV6LanPublicPrefixesChangesList = ["request-index", "v6-next-hop-address", "v6-lan-public-prefix", "v6-lan-public-prefix-length"]
+                                 rebuildInternetServiceChangeDetails += buildElementsUnbounded(internetServiceChangeDetails, tProvidedV6LanPublicPrefixesChangesList, "t-provided-v6-lan-public-prefixes")
+                               } catch (Exception e) {
+                                       log("ERROR"," Optional - Exception INTERNET-SERVICE-CHANGE-DETAILS 't-provided-v6-lan-public-prefixes ")
+                               }
+                               rebuildInternetServiceChangeDetails += "</tns:internet-service-change-details>"
+                       } catch (Exception e) {
+                               log("ERROR", " Optional - Exception INTERNET-SERVICE-CHANGE-DETAILS 'internet-service-change-details' ")
+                       }
+               }
+           return rebuildInternetServiceChangeDetails
+       }               
+       
+       // Build vr-lan 
+       def buildVrLan(xmlInput) {
+               
+               def rebuildVrLan = ''
+               if (xmlInput != null) {
+                       
+                       rebuildVrLan = "<tns2:vr-lan>"
+                       def vrLan = getNodeXml(xmlInput, "vr-lan").drop(38).trim()
+                       rebuildVrLan += buildElements(vrLan, ["routing-protocol"], "")
+                       
+                       // vr-lan-interface
+                       def rebuildVrLanInterface = "<tns2:vr-lan-interface>"
+                       def vrLanInterface = getNodeXml(vrLan, "vr-lan-interface").drop(38).trim()
+                       rebuildVrLanInterface += buildVrLanInterfacePartial(vrLanInterface)
+                       
+                        // dhcp
+                        def dhcp = getNodeXml(vrLan, "dhcp").drop(38).trim()
+                        def rebuildDhcp = buildDhcp(dhcp)
+                        rebuildVrLanInterface += rebuildDhcp
+                        
+                        // pat
+                        def pat = getNodeXml(vrLan, "pat").drop(38).trim()
+                        def rebuildPat = buildPat(pat)
+                        rebuildVrLanInterface += rebuildPat
+                        
+                        // nat
+                        def rebuildNat = ""
+                        try { // optional
+                               def nat = getNodeXml(vrLan, "nat").drop(38).trim()
+                               rebuildNat = buildNat(nat)
+                        } catch (Exception e) {
+                                log("ERROR", " Optional - Exception 'nat' ")
+                        }
+                        rebuildVrLanInterface += rebuildNat
+                                                                               
+                        // firewall-lite
+                        def firewallLite = getNodeXml(vrLan, "firewall-lite").drop(38).trim()
+                        def rebuildFirewallLite = buildFirewallLite(firewallLite)
+                        rebuildVrLanInterface += rebuildFirewallLite
+                        
+                        // static-routes
+                        def rebuildStaticRoutes = ""
+                        try { // optional 
+                                def staticRoutes = getNodeXml(vrLan, "static-routes").drop(38).trim()
+                                rebuildStaticRoutes = buildStaticRoutes(staticRoutes)
+                       } catch (Exception e) {
+                                log("ERROR", " Optional - Exception 'static-routes' ")
+                       }
+                       rebuildVrLanInterface += rebuildStaticRoutes
+                        
+                  rebuildVrLan += rebuildVrLanInterface
+                  rebuildVrLan += "</tns2:vr-lan-interface>"
+                  rebuildVrLan += "</tns2:vr-lan>"
+                       
+               }
+               log("DEBUG", " rebuildVrLan - " + rebuildVrLan)
+               return rebuildVrLan             
+       }
+       
+       // Build vr-lan-interface
+       def buildVrLanInterfacePartial(xmlInput) {
+               def rebuildingVrLanInterface = ''
+               if (xmlInput != null) {
+                       def vrLanInterfaceList = ["vr-designation", "v4-vr-lan-prefix", "v4-vr-lan-address", "v4-vr-lan-prefix-length", "v6-vr-lan-prefix", "v6-vr-lan-address", "v6-vr-lan-prefix-length", "v4-vce-loopback-address", "v6-vce-wan-address"]
+                       rebuildingVrLanInterface += buildElements(xmlInput, vrLanInterfaceList, "")
+                       rebuildingVrLanInterface += "<tns2:v4-public-lan-prefixes>"
+                       try { // optional
+                               def tProvidedV4LanPublicPrefixes = getNodeXml(xmlInput, "v4-public-lan-prefixes").drop(38).trim()
+                               def tProvidedV4LanPublicPrefixesList = ["request-index", "v4-next-hop-address", "v4-lan-public-prefix", "v4-lan-public-prefix-length" ]
+                               rebuildingVrLanInterface += buildElementsUnbounded(xmlInput, tProvidedV4LanPublicPrefixesList, "t-provided-v4-lan-public-prefixes")
+                       } catch (Exception ex) {
+                               log("ERROR", " Optional - Exception VR-LAN INTERFACE 'v4-public-lan-prefixes' ")
+                       }
+                       rebuildingVrLanInterface += "</tns2:v4-public-lan-prefixes>"
+                       rebuildingVrLanInterface += "<tns2:v6-public-lan-prefixes>"
+                       try { // optional
+                               def tProvidedV6LanPublicPrefixes = getNodeXml(xmlInput, "v6-public-lan-prefixes").drop(38).trim()
+                               def tProvidedV6LanPublicPrefixesList = ["request-index", "v6-next-hop-address", "v6-lan-public-prefix", "v6-lan-public-prefix-length" ]
+                               rebuildingVrLanInterface += buildElementsUnbounded(xmlInput, tProvidedV6LanPublicPrefixesList, "t-provided-v6-lan-public-prefixes")
+                       } catch (Exception e) {
+                               log("ERROR", " Optional - Exception VR-LAN INTERFACE 'v6-public-lan-prefixes' ")
+                       }
+                       rebuildingVrLanInterface += "</tns2:v6-public-lan-prefixes>"
+               }
+               log("DEBUG", " rebuildingVrLanInterface - " + rebuildingVrLanInterface)
+               return rebuildingVrLanInterface
+       }
+       
+       // Build dhcp
+       def buildDhcp(xmlInput) {
+               def rebuildingDhcp = ''
+               if (xmlInput != null) {
+                       def dhcpData = new XmlSlurper().parseText(xmlInput)
+                       rebuildingDhcp = "<tns2:dhcp>"
+                       def dhcpList1 = ["v4-dhcp-server-enabled", "v6-dhcp-server-enabled", "use-v4-default-pool", "v4-dhcp-default-pool-prefix", "v4-dhcp-default-pool-prefix-length"]
+                       rebuildingDhcp += buildElements(xmlInput, dhcpList1, "")
+                       try { // optional
+                               def excludedV4DhcpAddressesFromDefaultPoolList = ["excluded-v4-address"]
+                               rebuildingDhcp += buildElementsUnbounded(xmlInput, excludedV4DhcpAddressesFromDefaultPoolList, "excluded-v4-dhcp-addresses-from-default-pool")
+                       } catch (Exception e) {
+                               log("ERROR", " Optional - Exception DHCP 'excluded-v4-dhcp-addresses-from-default-pool' ")
+                       }
+                       try { // optional
+                               def v4DhcpPools = dhcpData.'**'.findAll {it.name() == "v4-dhcp-pools"}
+                               def v4DhcpPoolsSize = v4DhcpPools.size()
+                               // println " v4DhcpPoolsSize = " + v4DhcpPools.size()
+                               for (i in 0..v4DhcpPoolsSize-1) {
+                                       def v4DhcpPool = v4DhcpPools[i]
+                                       def v4DhcpPoolXml = XmlUtil.serialize(v4DhcpPool)
+                                       rebuildingDhcp += "<tns2:v4-dhcp-pools>"
+                                       def v4DhcpPoolsList1 = ["v4-dhcp-pool-prefix", "v4-dhcp-pool-prefix-length" ]
+                                       rebuildingDhcp += buildElements(v4DhcpPoolXml, v4DhcpPoolsList1, "")
+                                       try { // optional
+                                          def excludedV4AddressesList = ["excluded-v4-address"]
+                                          rebuildingDhcp += buildElementsUnbounded(v4DhcpPoolXml, excludedV4AddressesList, "excluded-v4-addresses")
+                                       } catch (Exception e) {
+                                          log("ERROR", " Optional - Exception DHCP 'excluded-v4-addresses' ")
+                                       }
+                                       def v4DhcpPoolsList2 = ["v4-dhcp-relay-gateway-address", "v4-dhcp-relay-next-hop-address"]
+                                       rebuildingDhcp += buildElements(v4DhcpPoolXml, v4DhcpPoolsList2, "")
+                                       rebuildingDhcp += "</tns2:v4-dhcp-pools>"
+                                }
+                        } catch (Exception e) {
+                                 log("ERROR"," Optional - Exception DHCP 'v4-dhcp-pools' ")
+                        }
+                        def dhcpList2 = ["use-v6-default-pool", "v6-dhcp-default-pool-prefix", "v6-dhcp-default-pool-prefix-length"]
+                        rebuildingDhcp += buildElements(xmlInput, dhcpList2, "")
+                        try { // optional
+                                def excludedV6DhcpAddressesFromDdefaultPoolList = ["excluded-v6-address"]
+                                rebuildingDhcp += buildElementsUnbounded(xmlInput, excludedV6DhcpAddressesFromDdefaultPoolList, "excluded-v6-dhcp-addresses-from-default-pool")
+                        } catch (Exception e) {
+                          log("ERROR", " Optional - Exception DHCP 'excluded-v6-dhcp-addresses-from-default-pool' ")
+                        }
+                        try { // optional
+                                def v6DhcpPools = dhcpData.'**'.findAll {it.name() == "v6-dhcp-pools"}
+                                def v6DhcpPoolsSize = v6DhcpPools.size()
+                                //println " v6DhcpPoolsSize = " + v6DhcpPools.size()
+                                for (i in 0..v6DhcpPoolsSize-1) {
+                                       def v6DhcpPool = v6DhcpPools[i]
+                                       def v6DhcpPoolXml = XmlUtil.serialize(v6DhcpPool)
+                                       rebuildingDhcp += "<tns2:v6-dhcp-pools>"
+                                       def v6DhcpPoolsList1 = ["v6-dhcp-pool-prefix", "v6-dhcp-pool-prefix-length"]
+                                       rebuildingDhcp += buildElements(v6DhcpPoolXml, v6DhcpPoolsList1, "")
+                                       try { // optional
+                                               def excludedV6AddressesList = ["excluded-v6-address"]
+                                               rebuildingDhcp += buildElementsUnbounded(v6DhcpPoolXml, excludedV6AddressesList, "excluded-v6-addresses")
+                                       } catch (Exception e) {
+                                                        log("ERROR", " Optional - Exception DHCP 'excluded-v6-addresses' ")
+                                       }
+                                       def v6DhcpPoolsList2 = ["v6-dhcp-relay-gateway-address", "v6-dhcp-relay-next-hop-address"]
+                                       rebuildingDhcp += buildElements(v6DhcpPoolXml, v6DhcpPoolsList2, "")
+                                       rebuildingDhcp += "</tns2:v6-dhcp-pools>"
+                                }
+                        } catch (Exception e) {
+                                log("ERROR", " Optional - Exception DHCP 'v6-dhcp-pools' ")
+                        }
+                        rebuildingDhcp += "</tns2:dhcp>"
+               }        
+               log("DEBUG", " rebuildingDhcp - " + rebuildingDhcp)
+               return rebuildingDhcp
+       }       
+
+       // Build pat
+       def buildPat(xmlInput) {
+                def rebuildingPat = ''
+                if (xmlInput != null) {
+                        rebuildingPat = "<tns2:pat>"
+                        def patList = ["v4-pat-enabled", "use-v4-default-pool", "v4-pat-default-pool-prefix", "v4-pat-default-pool-prefix-length"]
+                        rebuildingPat += buildElements(xmlInput, patList, "")
+                        try { // optional
+                                def v4PatPools = getNodeXml(xmlInput, "v4-pat-pools").drop(38).trim()
+                                def v4PatPoolsList = ["v4-pat-pool-prefix", "v4-pat-pool-prefix-length", "v4-pat-pool-next-hop-address"]
+                                rebuildingPat += buildElementsUnbounded(xmlInput, v4PatPoolsList, "v4-pat-pools")
+                        } catch (Exception e) {
+                               log("ERROR", " Optional - Exception 'v4-pat-pool-next-hop-address' ")
+                        }
+                        rebuildingPat += "</tns2:pat>"
+                }
+                log("DEBUG", " rebuildingPat - " + rebuildingPat)
+            return rebuildingPat
+    }
+       
+       // Build nat
+       def buildNat(xmlInput) {
+               def rebuildingNat = ''
+               if (xmlInput != null) {
+                       rebuildingNat = "<tns2:nat>"
+                       rebuildingNat += buildElements(xmlInput, ["v4-nat-enabled"], "")
+                       try { // optional
+                        def v4NatMappingEntries = getNodeXml(xmlInput, "v4-nat-mapping-entries").drop(38).trim()
+                        def v4NatMappingEntriesList = ["v4-nat-internal", "v4-nat-next-hop-address", "v4-nat-external"]
+                        rebuildingNat += buildElementsUnbounded(xmlInput, v4NatMappingEntriesList, "v4-nat-mapping-entries")
+                       } catch (Exception e) {
+                          log("ERROR", " Optional - Exception 'v4-nat-external' ")
+                       }
+                       rebuildingNat += "</tns2:nat>"
+               }
+               log("DEBUG", " rebuildingNat - " + rebuildingNat)
+           return rebuildingNat
+       }                               
+       
+       // Build firewall-lite
+       def buildFirewallLite(xmlInput) {
+               def rebuildingFirewallLite = ''
+               
+               if (xmlInput != null) {
+                       
+                       def firewallLiteData = new XmlSlurper().parseText(xmlInput)
+                       rebuildingFirewallLite = "<tns2:firewall-lite>"
+                       def firewallLiteList = ["stateful-firewall-lite-v4-enabled", "stateful-firewall-lite-v6-enabled"]
+                       rebuildingFirewallLite += buildElements(xmlInput, firewallLiteList, "")
+                       
+                        try { // optional
+                                def v4FirewallPacketFilters = firewallLiteData.'**'.findAll {it.name() == "v4-firewall-packet-filters"}
+                                def v4FirewallPacketFiltersSize = v4FirewallPacketFilters.size()
+                                //println " v4FirewallPacketFiltersSize = " + v4FirewallPacketFilters.size()
+                                for (i in 0..v4FirewallPacketFiltersSize-1) {
+                              def v4FirewallPacketFilter = v4FirewallPacketFilters[i]
+                              def v4FirewallPacketFilterXml = XmlUtil.serialize(v4FirewallPacketFilter)
+                                  rebuildingFirewallLite += "<tns2:v4-firewall-packet-filters>"
+                                  def v4FirewallPacketFiltersList = ["v4-firewall-prefix", "v4-firewall-prefix-length", "allow-icmp-ping"]
+                                  rebuildingFirewallLite += buildElements(v4FirewallPacketFilterXml, v4FirewallPacketFiltersList, "")
+                                  try {  // optional
+                                 def udpPortsList = ["port-number"]
+                                         rebuildingFirewallLite += buildElementsUnbounded(v4FirewallPacketFilterXml, udpPortsList, "udp-ports")
+                                  } catch (Exception e) {
+                                         log("ERROR", " Optional - Exception FIREWALL-LITE v4 'udp-ports' ")
+                                  }
+                                  try {  // optional
+                                         def tcpPortsList =  ["port-number"]
+                                         rebuildingFirewallLite += buildElementsUnbounded(v4FirewallPacketFilterXml, tcpPortsList, "tcp-ports")
+                                  } catch (Exception e) {
+                                     log("ERROR", " Optional - Exception FIREWALL-LITE v4 'tcp-ports' ")
+                                  }
+                                  rebuildingFirewallLite += "</tns2:v4-firewall-packet-filters>"
+                                }
+                        } catch (Exception e) {
+                                log("ERROR", " Optional - Exception FIREWALL-LITE 'v4-firewall-packet-filters' ")
+                        }
+                        
+                        try { // optional
+                                def v6FirewallPacketFilters = firewallLiteData.'**'.findAll {it.name() == "v6-firewall-packet-filters"}
+                                def v6FirewallPacketFiltersSize = v6FirewallPacketFilters.size()
+                                //println " v6FirewallPacketFiltersSize = " + v6FirewallPacketFilters.size()
+                                for (i in 0..v6FirewallPacketFiltersSize-1) {
+                                       def v6FirewallPacketFilter = v6FirewallPacketFilters[i]
+                                       def v6FirewallPacketFilterXml = XmlUtil.serialize(v6FirewallPacketFilter)
+                                       rebuildingFirewallLite += "<tns2:v6-firewall-packet-filters>"
+                                       def v6FirewallPacketFiltersList = ["v6-firewall-prefix", "v6-firewall-prefix-length", "allow-icmp-ping"]
+                                       rebuildingFirewallLite += buildElements(v6FirewallPacketFilterXml, v6FirewallPacketFiltersList, "")
+                                       try { // optional
+                                               def udpPortsList = ["port-number"]
+                                               rebuildingFirewallLite += buildElementsUnbounded(v6FirewallPacketFilterXml, udpPortsList, "udp-ports")
+                                       } catch (Exception e) {
+                                     log("ERROR", " Optional - Exception FIREWALL-LITE v6 'udp-ports' ")
+                                       }
+                                       try { // optional
+                                               def tcpPortsList =  ["port-number"]
+                                               rebuildingFirewallLite += buildElementsUnbounded(v6FirewallPacketFilterXml, tcpPortsList, "tcp-ports")
+                                       } catch (Exception e) {
+                                       log("ERROR", " Optional - Exception FIREWALL-LITE v6 'tcp-ports' ")
+                                       }
+                              rebuildingFirewallLite += "</tns2:v6-firewall-packet-filters>"
+                                }
+                        } catch (Exception e) {
+                                log("ERROR", " Optional - Exception FIREWALL-LITE 'v6-firewall-packet-filters' ")
+                        }
+                        rebuildingFirewallLite+= "</tns2:firewall-lite>"
+               }
+               log("DEBUG", " rebuildingFirewallLite - " + rebuildingFirewallLite)
+               return rebuildingFirewallLite
+     }
+       
+       def buildStaticRoutes(xmlInput) {
+               def rebuildingStaticRoutes = ''
+               if (xmlInput != null) {
+                       rebuildingStaticRoutes = "<tns2:static-routes>"
+                       def v4StaticRouteslist = ["v4-static-route-prefix","v4-static-route-prefix-length", "v4-next-hop-address"]
+                       rebuildingStaticRoutes += buildElementsUnbounded(xmlInput, v4StaticRouteslist, "v4-static-routes")
+                       def v6StaticRouteslist = ["v6-static-route-prefix","v6-static-route-prefix-length", "v6-next-hop-address"]
+                       rebuildingStaticRoutes += buildElementsUnbounded(xmlInput, v6StaticRouteslist, "v6-static-routes")
+                       rebuildingStaticRoutes += "</tns2:static-routes>"
+               }
+               log("DEBUG", " rebuildingStaticRoutes - " + rebuildingStaticRoutes)
+               return rebuildingStaticRoutes
+       }
+       
+       public String generateCurrentTimeInUtc(){
+               final  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+               sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+               final String utcTime = sdf.format(new Date());
+               return utcTime;
+       }
+       
+       public String generateCurrentTimeInGMT(){
+               final  SimpleDateFormat sdf = new SimpleDateFormat("E, d MMM yyyy h:m:s z");
+               sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
+               final String utcTime = sdf.format(new Date());
+               return utcTime;
+       }
+       
+
+       /**
+        * @param encryptedAuth: encrypted credentials from urn properties
+        * @param msoKey: key to use to decrypt from urn properties
+        * @return base 64 encoded basic auth credentials
+        */
+       def getBasicAuth(encryptedAuth, msoKey){
+               try {
+                       def auth = decrypt(encryptedAuth, msoKey)
+                       byte[] encoded = Base64.encodeBase64(auth.getBytes())
+                       String encodedString = new String(encoded)
+                       encodedString = "Basic " + encodedString
+                       return encodedString
+               } catch (Exception ex) {
+                       log("ERROR", "Unable to encode basic auth")
+                       throw ex
+               }
+       }
+       
+       def encrypt(toEncrypt, msokey){
+               try {
+                       String result = CryptoUtils.encrypt(toEncrypt, msokey);
+                       return result
+               }
+               catch (Exception e) {
+                       log("ERROR", "Failed to encrypt credentials")
+               }
+       }
+       
+       def decrypt(toDecrypt, msokey){
+               try {
+                       String result = CryptoUtils.decrypt(toDecrypt, msokey);
+                       return result
+               }
+               catch (Exception e) {
+                       log("ERROR", "Failed to decrypt credentials")
+                       throw e
+               }
+       }
+       
+       /**
+        * Return URL with qualified host name (if any) or urn mapping
+        * @param  String url from urn mapping
+        * @return String url with qualified host name
+        */
+       public String getQualifiedHostNameForCallback(String urnCallbackUrl) {
+               def callbackUrlToUse = urnCallbackUrl
+               try{
+                       //swap host name with qualified host name from the jboss properties
+                       def qualifiedHostName = System.getProperty("jboss.qualified.host.name")
+                       if(qualifiedHostName!=null){
+                               log("DEBUG", "qualifiedHostName:\n" + qualifiedHostName)
+                               callbackUrlToUse = callbackUrlToUse.replaceAll("(http://)(.*)(:8080*)", {orig, first, torepl, last -> "${first}${qualifiedHostName}${last}"})
+                       }
+               }catch(Exception e){
+                               log("DEBUG", "unable to grab qualified host name, using what's in urn properties for callbackurl. Exception was: " + e.printStackTrace())
+               }
+               return callbackUrlToUse
+               
+       }
+       
+       /**
+        * Retrieves text context of the element if the element exists, returns empty string otherwise
+        * @param com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl element to parse
+        * param String tagName tagName
+        * @return String text content of the element
+        */
+        public String getElementText(Element element, String tagName) {
+               String text = ""
+               org.w3c.dom.NodeList nodeList = element.getElementsByTagNameNS("*", tagName)
+               if (nodeList != null && nodeList.length > 0) {
+                       text = nodeList.item(0).getTextContent()
+               }
+               return text
+        }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/NetworkUtils.groovy
new file mode 100644 (file)
index 0000000..7d2c53d
--- /dev/null
@@ -0,0 +1,1325 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import org.apache.commons.lang3.*
+
+import groovy.xml.XmlUtil
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+import javax.xml.transform.Transformer
+import javax.xml.transform.TransformerFactory
+import javax.xml.transform.TransformerException
+import javax.xml.transform.dom.DOMSource
+import javax.xml.transform.stream.StreamResult
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+
+import org.w3c.dom.NamedNodeMap
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+
+import org.w3c.dom.NamedNodeMap
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource
+
+
+/**
+ * This groovy class supports the any Network processes that need the methods defined here.
+ */
+class NetworkUtils {
+
+       public MsoUtils utils = new MsoUtils()
+       private AbstractServiceTaskProcessor taskProcessor
+
+       public NetworkUtils(AbstractServiceTaskProcessor taskProcessor) {
+               this.taskProcessor = taskProcessor
+       }
+
+
+       /**
+        * This method returns the string for Network request
+        * V2 for Contrail 3.x will populate cloud-region data in same cloudSiteId filed
+        * Network adapter will handle it properly
+        * @param requestId either 'request-id' or 'att-mso-request-id'
+        * @param requestInput the request in the process
+        * @param queryIdResponse the response of REST AAI query by Id
+        * @param routeCollection the collection
+        * @param policyFqdns the policy 
+        * @param tableCollection the collection
+        * @param cloudRegionId the cloud-region-region
+        * @return String request
+        */
+       def CreateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyFqdns, tableCollection, cloudRegionId, backoutOnFailure, source) {
+               String createNetworkRequest = null
+               if(requestInput!=null && queryIdResponse!=null) {
+                               String serviceInstanceId = ""
+                               String sharedValue = ""
+                               String externalValue = ""
+                       
+                               if (source == "VID") {
+                                       sharedValue = utils.getNodeText1(queryIdResponse, "is-shared-network") != null ? utils.getNodeText1(queryIdResponse, "is-shared-network") : "false"
+                                       externalValue = utils.getNodeText1(queryIdResponse, "is-external-network") != null ? utils.getNodeText1(queryIdResponse, "is-external-network") : "false"
+                                       serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id")
+                                       
+                               } else { // source = 'PORTAL'
+                                       sharedValue = getParameterValue(requestInput, "shared")
+                                       externalValue = getParameterValue(requestInput, "external")
+                                       serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id") != null ? utils.getNodeText1(requestInput, "service-instance-id") : ""
+                               }
+
+                               String networkParams = ""
+                               if (utils.nodeExists(requestInput, "network-params")) {
+                                       String netParams = utils.getNodeXml(requestInput, "network-params", false).replace("tag0:","").replace(":tag0","")
+                                       networkParams = buildParams(netParams)
+                               }
+                                                                       
+                               String failIfExists = "false"
+                               // requestInput
+                               String cloudRegion = cloudRegionId
+                               String tenantId = utils.getNodeText1(requestInput, "tenant-id")
+
+                               // queryIdResponse
+                               String networkName = utils.getNodeText1(queryIdResponse, "network-name")
+                               String networkId = utils.getNodeText1(queryIdResponse, "network-id")
+                               String networkType = utils.getNodeText1(queryIdResponse, "network-type")
+
+                               // rebuild subnets
+                               String subnets = ""
+                               if (utils.nodeExists(queryIdResponse, "subnets")) {
+                                       def subnetsGroup = utils.getNodeXml(queryIdResponse, "subnets", false)
+                                       subnets = buildSubnets(subnetsGroup)
+                               }
+
+                               String physicalNetworkName = ""
+                               physicalNetworkName = utils.getNodeText1(queryIdResponse, "physical-network-name") 
+                               
+                               String vlansCollection = buildVlans(queryIdResponse)
+                               
+                               String notificationUrl = ""                                   //TODO - is this coming from URN? What variable/value to use?
+                               //String notificationUrl = execution.getVariable("URN_?????") //TODO - is this coming from URN? What variable/value to use?
+
+                               createNetworkRequest = """
+                                                               <createNetworkRequest>
+                                                                       <cloudSiteId>${cloudRegion}</cloudSiteId>
+                                                                       <tenantId>${tenantId}</tenantId>
+                                                                       <networkId>${networkId}</networkId>
+                                                                       <networkName>${networkName}</networkName>
+                                                                       <networkType>${networkType}</networkType>
+                                                                       <networkTechnology>CONTRAIL</networkTechnology>
+                                                                       <providerVlanNetwork>
+                                                                               <physicalNetworkName>${physicalNetworkName}</physicalNetworkName >
+                                                                               ${vlansCollection}
+                                                                       </providerVlanNetwork>
+                                                                       <contrailNetwork>
+                                                                               <shared>${sharedValue}</shared>
+                                                                               <external>${externalValue}</external>
+                                                                               ${routeCollection}
+                                                                               ${policyFqdns}
+                                                                               ${tableCollection}
+                                                                       </contrailNetwork>
+                                                                       ${subnets}
+                                                                       <skipAAI>true</skipAAI>
+                                                                       <backout>${backoutOnFailure}</backout>
+                                                                       <failIfExists>${failIfExists}</failIfExists>
+                                                                       ${networkParams}        
+                                                                       <msoRequest>
+                                                                               <requestId>${requestId}</requestId>
+                                                                               <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+                                                               </msoRequest>
+                                                                       <messageId>${messageId}</messageId>
+                                                                       <notificationUrl>${notificationUrl}</notificationUrl>
+                                                               </createNetworkRequest>
+                                                               """.trim()
+               }
+               return createNetworkRequest
+               
+       }
+       
+       /**
+        * This method returns the string for Network request
+        * V2 for Contrail 3.x will populate cloud-region data in same cloudSiteId filed
+        * Network adapter will handle it properly
+        * @param requestId either 'request-id' or 'att-mso-request-id'
+        * @param requestInput the request in the process
+        * @param queryIdResponse the response of REST AAI query by Id
+        * @param routeCollection the collection
+        * @param policyFqdns the policy
+        * @param cloudRegionId the cloud-region-region
+        * @return String request
+        */
+       def UpdateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyFqdns, tableCollection, cloudRegionId, backoutOnFailure, source) {
+               String updateNetworkRequest = null
+               if(requestInput!=null && queryIdResponse!=null) {
+                               String serviceInstanceId = ""
+                               String sharedValue = ""
+                               String externalValue = ""
+                       
+                               if (source == "VID") {
+                                       sharedValue = utils.getNodeText1(queryIdResponse, "is-shared-network") != null ? utils.getNodeText1(queryIdResponse, "is-shared-network") : "false"
+                                       externalValue = utils.getNodeText1(queryIdResponse, "is-external-network") != null ? utils.getNodeText1(queryIdResponse, "is-external-network") : "false"
+                                       serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id")
+                                       
+                               } else { // source = 'PORTAL'
+                                       sharedValue = getParameterValue(requestInput, "shared")
+                                       externalValue = getParameterValue(requestInput, "external")
+                                       serviceInstanceId = utils.getNodeText1(requestInput, "service-instance-id") != null ? utils.getNodeText1(requestInput, "service-instance-id") : ""
+                               }
+                                                               
+                               String failIfExists = "false"
+                               // requestInput
+                               String cloudRegion = cloudRegionId
+                               String tenantId = utils.getNodeText1(requestInput, "tenant-id")
+
+                               // queryIdResponse
+                               String networkName = utils.getNodeText1(queryIdResponse, "network-name")
+                               String networkId = utils.getNodeText1(queryIdResponse, "network-id")
+                               String networkType = utils.getNodeText1(queryIdResponse, "network-type")
+
+                               // rebuild subnets
+                               String subnets = ""
+                               if (utils.nodeExists(queryIdResponse, "subnets")) {
+                                       def subnetsGroup = utils.getNodeXml(queryIdResponse, "subnets", false)
+                                       subnets = buildSubnets(subnetsGroup)
+                               }
+
+                               String networkParams = ""
+                               if (utils.nodeExists(requestInput, "network-params")) {
+                                       String netParams = utils.getNodeXml(requestInput, "network-params", false).replace("tag0:","").replace(":tag0","")
+                                       networkParams = buildParams(netParams)
+                               }
+                                       
+                               String networkStackId = utils.getNodeText1(queryIdResponse, "heat-stack-id")
+                               if (networkStackId == 'null' || networkStackId == "" || networkStackId == null) {
+                                       networkStackId = "force_update"
+                               }
+                               
+                               String physicalNetworkName = utils.getNodeText1(queryIdResponse, "physical-network-name")
+                               String vlansCollection = buildVlans(queryIdResponse)
+                               
+                               updateNetworkRequest = 
+                         """<updateNetworkRequest>
+                                                               <cloudSiteId>${cloudRegion}</cloudSiteId>
+                                                               <tenantId>${tenantId}</tenantId>
+                                                               <networkId>${networkId}</networkId>
+                                                       <networkStackId>${networkStackId}</networkStackId>
+                                                               <networkName>${networkName}</networkName>
+                                                               <networkType>${networkType}</networkType>
+                                                               <networkTypeVersion/>
+                                                               <networkTechnology>CONTRAIL</networkTechnology>
+                                                               <providerVlanNetwork>
+                                                                       <physicalNetworkName>${physicalNetworkName}</physicalNetworkName>
+                                                                       ${vlansCollection}
+                                                               </providerVlanNetwork>
+                                                               <contrailNetwork>
+                                                                       <shared>${sharedValue}</shared>
+                                                                       <external>${externalValue}</external>
+                                                                       ${routeCollection}
+                                                                       ${policyFqdns}
+                                                                       ${tableCollection}
+                                                               </contrailNetwork>
+                                                               ${subnets}
+                                                               <skipAAI>true</skipAAI>
+                                                               <backout>${backoutOnFailure}</backout>
+                                                               <failIfExists>${failIfExists}</failIfExists>
+                                                                       ${networkParams}        
+
+                                                               <msoRequest>
+                                                                 <requestId>${requestId}</requestId>
+                                                                 <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+                                                               </msoRequest>
+                                                               <messageId>${messageId}</messageId>
+                                                               <notificationUrl></notificationUrl>
+                                                       </updateNetworkRequest>""".trim()
+                                                  
+               }
+               return updateNetworkRequest
+               
+       }
+
+       /**
+        * This method returns the string for Create Volume Request payload
+        * @param groupId the volume-group-id
+        * @param volumeName the volume-group-name
+        * @param vnfType the vnf-type
+        * @param tenantId the value of relationship-key 'tenant.tenant-id'
+        * @return String request payload
+        */
+       def String CreateNetworkVolumeRequest(groupId, volumeName, vnfType, tenantId) {
+
+               String requestPayload =
+               """<volume-group xmlns="http://org.openecomp.aai.inventory/v6">
+                               <volume-group-id>${groupId}</volume-group-id>
+                               <volume-group-name>${volumeName}</volume-group-name>
+                               <heat-stack-id></heat-stack-id>
+                               <vnf-type>${vnfType}</vnf-type>
+                               <orchestration-status>Pending</orchestration-status>
+                               <relationship-list>
+                                  <relationship>
+                                          <related-to>tenant</related-to>
+                                          <relationship-data>
+                                                  <relationship-key>tenant.tenant-id</relationship-key>
+                                                  <relationship-value>${tenantId}</relationship-value>
+                                          </relationship-data>
+                                  </relationship>
+                          </relationship-list>
+                  </volume-group>"""
+
+               return requestPayload
+       }
+
+       def String createCloudRegionVolumeRequest(groupId, volumeName, vnfType, tenantId, cloudRegion, namespace) {
+
+                               String requestPayload =
+                               """<volume-group xmlns="${namespace}">
+                               <volume-group-id>${groupId}</volume-group-id>
+                               <volume-group-name>${volumeName}</volume-group-name>
+                               <heat-stack-id></heat-stack-id>
+                               <vnf-type>${vnfType}</vnf-type>
+                               <orchestration-status>Pending</orchestration-status>
+                               <relationship-list>
+                                  <relationship>
+                                          <related-to>tenant</related-to>
+                                          <relationship-data>
+                                                  <relationship-key>tenant.tenant-id</relationship-key>
+                                                  <relationship-value>${tenantId}</relationship-value>
+                                          </relationship-data>
+                                          <relationship-data>
+                                                  <relationship-key>cloud-region.cloud-owner</relationship-key>
+                                                  <relationship-value>att-aic</relationship-value>
+                                          </relationship-data>
+                                          <relationship-data>
+                                                  <relationship-key>cloud-region.cloud-region-id</relationship-key>
+                                                  <relationship-value>${cloudRegion}</relationship-value>
+                                          </relationship-data>
+                                  </relationship>
+                          </relationship-list>
+                  </volume-group>"""
+
+                               return requestPayload
+                       }
+       
+       def String createCloudRegionVolumeRequest(groupId, volumeName, vnfType, vnfId, tenantId, cloudRegion, namespace) {
+               
+               String requestPayload =
+               """<volume-group xmlns="${namespace}">
+                       <volume-group-id>${groupId}</volume-group-id>
+                       <volume-group-name>${volumeName}</volume-group-name>
+                       <heat-stack-id></heat-stack-id>
+                       <vnf-type>${vnfType}</vnf-type>
+                       <orchestration-status>Pending</orchestration-status>
+                       <relationship-list>
+                               <relationship>
+                                  <related-to>generic-vnf</related-to>
+                                  <relationship-data>
+                                          <relationship-key>generic-vnf.vnf-id</relationship-key>
+                                          <relationship-value>${vnfId}</relationship-value>
+                                  </relationship-data>
+                          </relationship>
+                          <relationship>
+                                  <related-to>tenant</related-to>
+                                  <relationship-data>
+                                          <relationship-key>tenant.tenant-id</relationship-key>
+                                          <relationship-value>${tenantId}</relationship-value>
+                                  </relationship-data>
+                                  <relationship-data>
+                                          <relationship-key>cloud-region.cloud-owner</relationship-key>
+                                          <relationship-value>att-aic</relationship-value>
+                                  </relationship-data>
+                                  <relationship-data>
+                                          <relationship-key>cloud-region.cloud-region-id</relationship-key>
+                                          <relationship-value>${cloudRegion}</relationship-value>
+                                  </relationship-data>
+                          </relationship>
+                  </relationship-list>
+               </volume-group>"""
+       
+               return requestPayload
+       }
+
+
+       /**
+        * This method returns the string for Update Volume Request payload
+        * @param requeryAAIVolGrpNameResponse the response of query volume group name (in AAI)
+         * @param heatStackId the value of heat stack id
+        * @return String request payload
+        */
+       def String updateCloudRegionVolumeRequest(requeryAAIVolGrpNameResponse, heatStackId, namespace) {
+               String requestPayload = ""
+               if (requeryAAIVolGrpNameResponse != null) {
+                       def groupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
+                       def volumeName = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-name")
+                       def vnfType = utils.getNodeText(requeryAAIVolGrpNameResponse, "vnf-type")
+                       def resourceVersion = utils.getNodeText(requeryAAIVolGrpNameResponse, "resource-version")
+                       def relationshipList = ""
+                       if (utils.nodeExists(requeryAAIVolGrpNameResponse, "relationship")) {
+                               relationshipList = rebuildRelationship(requeryAAIVolGrpNameResponse)
+                       }
+
+                       requestPayload =
+                               """<volume-group xmlns="${namespace}">
+                                       <volume-group-id>${groupId}</volume-group-id>
+                                       <volume-group-name>${volumeName}</volume-group-name>
+                                       <heat-stack-id>${heatStackId}</heat-stack-id>
+                                       <vnf-type>${vnfType}</vnf-type>
+                                       <orchestration-status>Active</orchestration-status>
+                                       <resource-version>${resourceVersion}</resource-version>
+                                       ${relationshipList}
+                                </volume-group>"""
+               }
+
+               return requestPayload
+       }
+
+
+       /**
+        * This method returns the string for Update Volume Request payload
+        * @param requeryAAIVolGrpNameResponse the response of query volume group name (in AAI)
+        * @param heatStackId the value of heat stack id
+        * @return String request payload
+        */
+       def String UpdateNetworkVolumeRequest(requeryAAIVolGrpNameResponse, heatStackId) {
+               String requestPayload = ""
+               if (requeryAAIVolGrpNameResponse != null) {
+                       def groupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
+                       def volumeName = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-name")
+                       def vnfType = utils.getNodeText(requeryAAIVolGrpNameResponse, "vnf-type")
+                       def resourceVersion = utils.getNodeText(requeryAAIVolGrpNameResponse, "resource-version")
+                       def relationshipList = ""
+                       if (utils.nodeExists(requeryAAIVolGrpNameResponse, "relationship")) {
+                               relationshipList = rebuildRelationship(requeryAAIVolGrpNameResponse)
+                       }
+
+                       requestPayload =
+                               """<volume-group xmlns="http://org.openecomp.aai.inventory/v6">
+                                       <volume-group-id>${groupId}</volume-group-id>
+                                       <volume-group-name>${volumeName}</volume-group-name>
+                                       <heat-stack-id>${heatStackId}</heat-stack-id>
+                                       <vnf-type>${vnfType}</vnf-type>
+                                       <orchestration-status>Active</orchestration-status>
+                                       <resource-version>${resourceVersion}</resource-version>
+                                       ${relationshipList}
+                                </volume-group>"""
+               }
+
+               return requestPayload
+       }
+
+       /**
+        * This method returns the string for Create Contrail Network payload
+        * @param requeryIdAAIResponse the response from AAI query by id
+        * @param createNetworkResponse the response of create network
+        * @return String contrailNetworkCreatedUpdate
+        */
+       def ContrailNetworkCreatedUpdate(requeryIdAAIResponse, createNetworkResponse, schemaVersion) {
+
+               String contrailNetworkCreatedUpdate = ""
+               if(requeryIdAAIResponse!=null && createNetworkResponse!=null) {
+
+                       def l3Network = utils.getNodeXml(requeryIdAAIResponse, "l3-network", false).replace("tag0:","").replace(":tag0","")
+                       def createNetworkContrailResponse = ""
+                       if (utils.nodeExists(createNetworkResponse, 'createNetworkResponse')) {
+                          createNetworkContrailResponse = utils.getNodeXml(createNetworkResponse, "createNetworkResponse", false).replace("tag0:","").replace(":tag0","")
+                       } else {
+                          createNetworkContrailResponse = utils.getNodeXml(createNetworkResponse, "updateNetworkContrailResponse", false).replace("tag0:","").replace(":tag0","")
+                       }
+                          
+                       // rebuild network
+                       def networkList = ["network-id", "network-name", "network-type", "network-role", "network-technology", "neutron-network-id", "is-bound-to-vpn", "service-id", "network-role-instance", "resource-version", "resource-model-uuid", "orchestration-status", "heat-stack-id", "mso-catalog-key", "contrail-network-fqdn",
+                                                            "physical-network-name", "is-provider-network", "is-shared-network", "is-external-network"]
+                       String rebuildNetworkElements = buildNetworkElements(l3Network, createNetworkContrailResponse, networkList)
+
+                       // rebuild 'subnets'
+                       def rebuildSubnetList = ""
+                       if (utils.nodeExists(requeryIdAAIResponse, 'subnet')) {
+                            rebuildSubnetList = buildSubnets(requeryIdAAIResponse, createNetworkResponse)
+                       }
+
+                       // rebuild 'segmentation-assignments'
+                       def rebuildSegmentationAssignments = ""
+                       if (utils.nodeExists(requeryIdAAIResponse, 'segmentation-assignments')) {
+                               List elementList = ["segmentation-id"]  
+                               rebuildSegmentationAssignments =  buildXMLElements(requeryIdAAIResponse, "", "segmentation-assignments", elementList)
+                       }
+                       
+                       // rebuild 'ctag-assignments' / rebuildCtagAssignments
+                       def rebuildCtagAssignmentsList = ""
+                       if (utils.nodeExists(requeryIdAAIResponse, 'ctag-assignment')) {
+                               rebuildCtagAssignmentsList = rebuildCtagAssignments(requeryIdAAIResponse)
+                       }
+
+                       // rebuild 'relationship'
+                       def relationshipList = ""
+                       if (utils.nodeExists(requeryIdAAIResponse, 'relationship-list')) {
+                               String rootRelationshipData = getFirstNodeXml(requeryIdAAIResponse, "relationship-list").drop(38).trim().replace("tag0:","").replace(":tag0","")
+                               if (utils.nodeExists(rootRelationshipData, 'relationship')) {
+                                       relationshipList = rebuildRelationship(rootRelationshipData)
+                               }
+                       }
+
+                       //Check for optional contrail network fqdn within CreateNetworkResponse
+                       String contrailNetworkFQDN
+                       if(utils.nodeExists(createNetworkResponse, "contrail-network-fqdn")){
+                               contrailNetworkFQDN = utils.getNodeXml(createNetworkResponse, "contrail-network-fqdn")
+                               contrailNetworkFQDN = utils.removeXmlNamespaces(contrailNetworkFQDN)
+                               contrailNetworkFQDN = utils.removeXmlPreamble(contrailNetworkFQDN)
+                       }else{
+                               contrailNetworkFQDN = ""
+                       }
+
+                       contrailNetworkCreatedUpdate =
+                                """<l3-network xmlns="${schemaVersion}">
+                                               ${rebuildNetworkElements}
+                                               ${rebuildSubnetList}
+                                               ${rebuildSegmentationAssignments}
+                                               ${rebuildCtagAssignmentsList}
+                                               ${relationshipList}
+                                               ${contrailNetworkFQDN}
+                                     </l3-network>""".trim()
+
+               }
+                       return contrailNetworkCreatedUpdate
+       }
+
+       
+       
+       /**
+        * This method returns the value for the name paramName.
+        *   Ex:   <network-params>
+        *            <param name="shared">1</param>
+        *            <param name="external">0</external>
+        *         </network-params>
+        *
+        * @param xmlInput the XML document
+        * @param paramName the param name (ex: 'shared')
+        * @return a param value for 'shared' (ex: '1')
+        */
+       def getParameterValue(xmlInput, paramName) {
+               def rtn=""
+               if(xmlInput!=null){
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       rtn= xml.'**'.find {param->param.'@name'.text() == paramName}
+               }
+               if (rtn==null) {
+                       return ""
+               } else {
+                  return rtn
+               }
+       }
+
+       /**
+        * This method returns the name of param if found/match with paramName.
+        *   Ex:   <network-params>
+        *            <param name="shared">1</param>
+        *            <param name="external">0</external>
+        *         </network-params>
+        *
+        * @param xmlInput the XML document
+        * @param paramName the param name (ex: 'shared', )
+        * @return a param name for 'shared' (ex: 'shared' if found)
+        */
+       def getParameterName(xmlInput, paramName) {
+               def rtn=""
+               if(xmlInput!=null){
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       try {
+                               rtn= xml.'**'.find {param->param.'@name' == paramName}.'@name'
+                       } catch (Exception ex) {
+                           rtn=""
+                       }
+               }
+               if (rtn==null || rtn=="") {
+                       return ""
+               } else {
+                  return rtn
+               }
+       }
+
+       /**
+        * This method returns the networkParams xml string.
+        *   Ex: input:  
+        *         <network-params>
+        *            <param name="shared">1</param>
+        *            <param name="external">0</external>
+        *         </network-params>
+        *         
+        *   Sample result:
+        *         <networkParams>
+     *            <shared>1</shared>
+     *            <external>0</external>
+     *         </networkParams>
+     *           
+        */
+       
+       def buildParams(networkParams) {
+               def build = ""
+                       def netParams = new XmlParser().parseText(networkParams)
+                       try {
+                               def paramsList = netParams.'**'.findAll {param->param.'@name'}.'@name'
+                               if (paramsList.size() > 0) {
+                                       build += "<networkParams>"
+                                       for (i in 0..paramsList.size()-1) {
+                        def name = netParams.'**'.find {param->param.'@name' == paramsList[i]}.'@name'
+                                               def value= netParams.'**'.find {param->param.'@name' == paramsList[i]}.text()
+                                               build += "<${name}>${value}</${name}>"
+                                       }
+                                       build += "</networkParams>"
+                               }       
+                          
+                       } catch (Exception ex) {
+                               println ' buildParams error - ' + ex.getMessage()
+                               build = ""
+                       }       
+               return build
+       }
+       
+       def getVlans(xmlInput) {
+               def rtn = ""
+               if (xmlInput!=null) {
+                       def vlansList = getListWithElements(xmlInput, 'vlans')
+                       def vlansListSize = vlansList.size()
+                       if (vlansListSize > 0) {
+                               for (i in 0..vlansListSize-1) {
+                                  rtn += '<vlans>'+vlansList[i]+'</vlans>'
+                               }
+                       }
+               }
+               return rtn
+
+
+       }
+
+       /**
+        * This method returns the uri value for the vpn bindings.
+        * Return the a list of value of vpn binding in the <related-link> string.
+        * Ex.
+        *   <relationship-list>
+        *      <relationship>
+        *          <related-to>vpn-binding</related-to>
+        *          <related-link>https://aai-app-e2e.test.att.com:8443/aai/v6/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/</related-link>
+        *          <relationship-data>
+        *             <relationship-key>vpn-binding.vpn-id</relationship-key>
+        *             <relationship-value>85f015d0-2e32-4c30-96d2-87a1a27f8017</relationship-value>
+        *          </relationship-data>
+        *       </relationship>
+        *              <relationship>
+        *              <related-to>vpn-binding</related-to>
+        *                      <related-link>https://aai-ext1.test.att.com:8443/aai/v6/network/vpn-bindings/vpn-binding/24a4b507-853a-4a38-99aa-05fcc54be24d/</related-link>
+        *                      <relationship-data>
+        *                         <relationship-key>vpn-binding.vpn-id</relationship-key>
+        *                         <relationship-value>24a4b507-853a-4a38-99aa-05fcc54be24d</relationship-value>
+        *                  </relationship-data>
+        *                      <related-to-property>
+        *                        <property-key>vpn-binding.vpn-name</property-key>
+        *                        <property-value>oam_protected_net_6_MTN5_msotest1</property-value>
+        *                      </related-to-property>
+        *              </relationship>
+        * @param xmlInput the XML document
+        * @return a list of vpn binding values
+        *            ex: ['aai/v6/network/vpn-bindings/vpn-binding/85f015d0-2e32-4c30-96d2-87a1a27f8017/', 'aai/v6/network/vpn-bindings/vpn-binding/c980a6ef-3b88-49f0-9751-dbad8608d0a6/']
+        *
+        **/
+       def getVnfBindingObject(xmlInput) {
+               //def rtn = null
+               List rtn = []
+               if (xmlInput!=null) {
+                       def relationshipList = getListWithElements(xmlInput, 'relationship')
+                       def relationshipListSize = relationshipList.size()
+                       if (relationshipListSize > 0) {
+                               for (i in 0..relationshipListSize-1) {
+                                  def relationshipXml = XmlUtil.serialize(relationshipList[i])
+                                  if (utils.getNodeText(relationshipXml, 'related-to') == "vpn-binding") {
+                                         def relatedLink = utils.getNodeText(relationshipXml, 'related-link')
+                                         if (relatedLink != null || relatedLink != "") {
+                                                rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
+                                         }
+                                  }
+                               }
+                       }
+               }
+               return rtn
+       }
+       /**
+        * similar to VNF bindings method
+       * @param xmlInput the XML document
+       * @return a list of network policy values
+       *            ex: ['aai/v$/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg', 'aai/v$/network/network-policies/network-policy/cee6d136-e378-4678-a024-2cd15f0ee0cg']
+       *
+       **/
+       def getNetworkPolicyObject(xmlInput) {
+               //def rtn = null
+               List rtn = []
+               if (xmlInput!=null) {
+                       def relationshipList = getListWithElements(xmlInput, 'relationship')
+                       def relationshipListSize = relationshipList.size()
+                       if (relationshipListSize > 0) {
+                               for (i in 0..relationshipListSize-1) {
+                                  def relationshipXml = XmlUtil.serialize(relationshipList[i])
+                                  if (utils.getNodeText(relationshipXml, 'related-to') == "network-policy") {
+                                         def relatedLink = utils.getNodeText(relationshipXml, 'related-link')
+                                         if (relatedLink != null || relatedLink != "") {
+                                                rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
+                                         }
+                                  }
+                               }
+                       }
+               }
+               return rtn
+       }
+
+       /**
+        * similar to network policymethod
+       * @param xmlInput the XML document
+       * @return a list of network policy values
+       *            ex: ['aai/v$/network/route-table-references/route-table-reference/refFQDN1', 'aai/v$/network/route-table-references/route-table-reference/refFQDN2']
+       *
+       **/
+       def getNetworkTableRefObject(xmlInput) {
+               //def rtn = null
+               List rtn = []
+               if (xmlInput!=null) {
+                       def relationshipList = getListWithElements(xmlInput, 'relationship')
+                       def relationshipListSize = relationshipList.size()
+                       if (relationshipListSize > 0) {
+                               for (i in 0..relationshipListSize-1) {
+                                  def relationshipXml = XmlUtil.serialize(relationshipList[i])
+                                  if (utils.getNodeText(relationshipXml, 'related-to') == "route-table-reference") {
+                                         def relatedLink = utils.getNodeText1(relationshipXml, 'related-link')
+                                         if (relatedLink != null || relatedLink != "") {
+                                                rtn.add(relatedLink.substring(relatedLink.indexOf("/aai/"), relatedLink.length()))
+                                         }
+                                  }
+                               }
+                       }
+               }
+               return rtn
+       }
+       
+       
+       def isVfRelationshipExist(xmlInput) {
+               Boolean rtn = false
+               if (xmlInput!=null) {
+                       def relationshipList = getListWithElements(xmlInput, 'relationship')
+                       def relationshipListSize = relationshipList.size()
+                       if (relationshipListSize > 0) {
+                               for (i in 0..relationshipListSize-1) {
+                                  def relationshipXml = XmlUtil.serialize(relationshipList[i])
+                                  if (utils.getNodeText(relationshipXml, 'related-to') == "vf-module") { 
+                                            rtn = true
+                                  }
+                               }
+                       }
+               }
+               return rtn
+
+       }
+
+       def isInstanceValueMatch(linkResource, globalSubscriberId, serviceType) {
+               Boolean rtn = false
+               try {
+                       String globalSubscriberIdLink = linkResource.substring(linkResource.indexOf("/customer/")+10, linkResource.indexOf("/service-subscriptions"))
+                       String serviceTypeLink = linkResource.substring(linkResource.indexOf("/service-subscription/")+22, linkResource.indexOf("/service-instances"))
+                       if (globalSubscriberIdLink == globalSubscriberId) { 
+                                       rtn = true
+                       } else {
+                               if (serviceTypeLink == serviceType) {
+                                       rtn = true
+                               }
+                       }
+                       
+               } catch (Exception ex) {
+                   println 'Exception - ' + ex.getMessage()
+                       return false
+               }
+        return rtn
+       }
+       
+       def getListWithElements(xmlInput, groupName) {
+               def rtn = ""
+               if (xmlInput != null) {
+                       def relationshipData = new XmlSlurper().parseText(xmlInput)
+                       rtn = relationshipData.'**'.findAll {it.name() == groupName}
+               }
+               return rtn
+
+       }
+
+       // build network single elements
+       def buildNetworkElements(l3Network, createNetworkContrailResponse, networkList) {
+               def replaceNetworkId = ""
+               def replaceNeutronNetworkId = ""
+               def replaceContrailNetworkFqdn = ""
+               if (l3Network != null && createNetworkContrailResponse != null) {
+                       if (utils.nodeExists(l3Network, 'heat-stack-id')) {
+                               replaceNetworkId = utils.getNodeText(l3Network, 'heat-stack-id')
+                       } else {
+                               if (utils.nodeExists(createNetworkContrailResponse, 'networkStackId')) {
+                                       replaceNetworkId = utils.getNodeText(createNetworkContrailResponse, 'networkStackId')
+                               }
+                       }
+                       if (utils.nodeExists(l3Network, 'neutron-network-id')) {
+                               replaceNeutronNetworkId = utils.getNodeText(l3Network, 'neutron-network-id')
+                       } else {
+                               if (utils.nodeExists(createNetworkContrailResponse, 'neutronNetworkId')) {
+                                       replaceNeutronNetworkId = utils.getNodeText(createNetworkContrailResponse, 'neutronNetworkId')
+                               }
+                       }
+                       if (utils.nodeExists(l3Network, 'contrail-network-fqdn')) {
+                               replaceContrailNetworkFqdn = utils.getNodeText(l3Network, 'contrail-network-fqdn')
+                       } else {
+                               if (utils.nodeExists(createNetworkContrailResponse, 'networkFqdn')) {
+                                       replaceContrailNetworkFqdn = utils.getNodeText(createNetworkContrailResponse, 'networkFqdn')
+                               }
+                       }
+               }
+
+               String var = ""
+               def xmlNetwork = ""
+               if (l3Network != null) {
+                       for (element in networkList) {
+                               def xml= new XmlSlurper().parseText(l3Network)
+                               var = xml.'**'.find {it.name() == element}
+                               if (var == null) {
+                                       if (element=="orchestration-status") {
+                                               xmlNetwork += "<"+element+">"+"active"+"</"+element+">"
+                                       }
+                                       if (element=="heat-stack-id") {
+                                               if (replaceNetworkId != "") {
+                                                       xmlNetwork += "<"+element+">"+replaceNetworkId+"</"+element+">"
+                                               }
+                                       }
+                                       if (element=="neutron-network-id") {
+                                               if (replaceNeutronNetworkId != "") {
+                                                       xmlNetwork += "<"+element+">"+replaceNeutronNetworkId+"</"+element+">"
+                                               }
+                                       }
+                                       if (element=="contrail-network-fqdn") {
+                                               if (replaceContrailNetworkFqdn != "") {
+                                                       xmlNetwork += "<"+element+">"+replaceContrailNetworkFqdn+"</"+element+">"
+                                               }
+                                       }
+
+                               } else {
+                                       if (element=="orchestration-status") {
+                                               xmlNetwork += "<"+element+">"+"active"+"</"+element+">"
+                                       } else {
+                                       xmlNetwork += "<"+element+">"+var.toString()+"</"+element+">"
+                               }
+                               }
+
+                       }
+               }
+               return xmlNetwork
+       }
+
+       def buildSubnets(requeryIdAAIResponse, createNetworkResponse) {
+               def rebuildingSubnets = ""
+               if (requeryIdAAIResponse != null && utils.nodeExists(requeryIdAAIResponse, 'subnets')) {
+                       def subnetIdMapValue = ""
+                       def subnetsGroup = utils.getNodeXml(requeryIdAAIResponse, "subnets", false)
+                       def subnetsData = new XmlSlurper().parseText(subnetsGroup)
+                       rebuildingSubnets += "<subnets>"
+                       try {
+                               def subnets = subnetsData.'**'.findAll {it.name() == "subnet"}
+                               def subnetsSize = subnets.size()
+                               for (i in 0..subnetsSize-1) {
+                                  def subnet = subnets[i]
+                                  def subnetXml = XmlUtil.serialize(subnet)
+                                  def subnetList = ["subnet-id", "neutron-subnet-id", "gateway-address", "network-start-address", "cidr-mask", "ip-version", "orchestration-status", "dhcp-enabled", "dhcp-start", "dhcp-end", "resource-version", "subnet-name"]
+                                  rebuildingSubnets += buildSubNetworkElements(subnetXml, createNetworkResponse, subnetList, "subnet")
+                               }
+                               if (utils.nodeExists(subnetsData, 'relationship')) {
+                                       rebuildingSubnets = rebuildRelationship(requeryIdAAIResponse)
+                               }
+
+                       } catch (Exception ex) {
+                               // error
+                       } finally {
+                               rebuildingSubnets += "</subnets>"
+                       }
+               }
+               return rebuildingSubnets
+       }
+
+       def buildSubnets(queryIdResponse) {
+               def rebuildingSubnets = ""
+               def subnetsData = new XmlSlurper().parseText(queryIdResponse)
+               //rebuildingSubnets += "<subnets>"
+               try {
+                       def subnets = subnetsData.'**'.findAll {it.name() == "subnet"}
+                       def subnetsSize = subnets.size()
+                       for (i in 0..subnetsSize-1) {
+                          def subnet = subnets[i]
+                          def subnetXml = XmlUtil.serialize(subnet)
+                          def subnetList = ["dhcp-start", "dhcp-end", "network-start-address", "cidr-mask", "dhcp-enabled", "gateway-address", "ip-version", "subnet-id", "subnet-name"]
+                          rebuildingSubnets += buildSubNetworkElements(subnetXml, subnetList, "subnets")
+                          //rebuildingSubnets += buildSubNetworkElements(subnetXml, subnetList, "")
+                       }
+               } catch (Exception ex) {
+                  //
+               } finally {
+                 //rebuildingSubnets += "</subnets>"
+               }
+               return rebuildingSubnets
+       }
+
+
+       // build subnet sub-network single elements
+       def buildSubNetworkElements(subnetXml, createNetworkResponse, elementList, parentName) {
+               String var = ""
+               def xmlBuild = ""
+               if (parentName != "") {
+                  xmlBuild += "<"+parentName+">"
+               }
+               if (subnetXml != null) {
+                       for (element in elementList) {
+                         def xml= new XmlSlurper().parseText(subnetXml)
+                         var = xml.'**'.find {it.name() == element}
+                         if (var != null) {
+                                if (element=="orchestration-status") {
+                                       xmlBuild += "<"+element+">"+"active"+"</"+element+">"
+                                } else { // "subnet-id", "neutron-subnet-id"
+                                        if (element=="subnet-id") {
+                                                if (utils.nodeExists(createNetworkResponse, "subnetMap")) {
+                                                        xmlBuild += "<"+element+">"+var.toString()+"</"+element+">"
+                                                        String neutronSubnetId = extractNeutSubId(createNetworkResponse, var.toString())
+                                                        xmlBuild += "<neutron-subnet-id>"+neutronSubnetId+"</neutron-subnet-id>"
+                                                }
+                                        } else {
+                                            if (element=="neutron-subnet-id") {
+                               // skip
+                                                } else {
+                                                   xmlBuild += "<"+element+">"+var.toString()+"</"+element+">"
+                                                }
+                                        }
+                                }
+                         }
+                       }
+
+               }
+               if (parentName != "") {
+                  xmlBuild += "</"+parentName+">"
+               }
+               return xmlBuild
+       }
+
+       // build subnet sub-network single elements
+       def buildSubNetworkElements(subnetXml, elementList, parentName) {
+               def var = ""
+               def xmlBuild = ""
+               if (parentName != "") {
+                       xmlBuild += "<"+parentName+">"
+                }
+               if (subnetXml != null) {
+                   def networkStartAddress = ""
+                       for (element in elementList) {
+                               def xml= new XmlSlurper().parseText(subnetXml)
+                               var = xml.'**'.find {it.name() == element}
+                               if (element == "dhcp-start") {
+                                       xmlBuild += "<allocationPools>"
+                                       if (var.toString() == 'null') {
+                                               xmlBuild += "<start>"+""+"</start>"
+                                       } else {
+                                               xmlBuild += "<start>"+var.toString()+"</start>"
+                                       }
+                               }
+                               if (element == "dhcp-end") {
+                                       if (var.toString() == 'null') {
+                                               xmlBuild += "<end>"+""+"</end>"
+                                       } else {
+                                               xmlBuild += "<end>"+var.toString()+"</end>"
+                                       }
+                                       xmlBuild += "</allocationPools>"
+                               }
+                               if (element == "network-start-address" || element == "cidr-mask") {
+                                       if (element == "network-start-address") {
+                                               networkStartAddress = var.toString()
+                                       }
+                                       if (element == "cidr-mask") {
+                                               xmlBuild += "<cidr>"+networkStartAddress+"/"+var.toString()+"</cidr>"
+                                       }
+                               }
+                               if (element == "dhcp-enabled") {
+                                       xmlBuild += "<enableDHCP>"+var.toString()+"</enableDHCP>"
+                               }
+                               if (element == "gateway-address") {
+                                       xmlBuild += "<gatewayIp>"+var.toString()+"</gatewayIp>"
+                               }
+                               if (element == "ip-version") {
+                                       xmlBuild += "<ipVersion>"+var.toString()+"</ipVersion>"
+                               }
+                               if (element == "subnet-id") {
+                                       xmlBuild += "<subnetId>"+var.toString()+"</subnetId>"
+                               }
+                               if ((element == "subnet-name") && (var != null)) {
+                                       xmlBuild += "<subnetName>"+var.toString()+"</subnetName>"
+                               }
+                       }
+               }
+               if (parentName != "") {
+                       xmlBuild += "</"+parentName+">"
+                }
+               return xmlBuild
+       }
+
+       // rebuild ctag-assignments
+       def rebuildCtagAssignments(xmlInput) {
+               def rebuildingCtagAssignments = ""
+               if (xmlInput!=null) {
+                       def ctagAssignmentsData = new XmlSlurper().parseText(xmlInput)
+                       rebuildingCtagAssignments += "<ctag-assignments>"
+                       def ctagAssignments = ctagAssignmentsData.'**'.findAll {it.name() == "ctag-assignment"}
+                       def ctagAssignmentsSize = ctagAssignments.size()
+                       for (i in 0..ctagAssignmentsSize-1) {
+                               def ctagAssignment = ctagAssignments[i]
+                               def ctagAssignmentXml = XmlUtil.serialize(ctagAssignment)
+                               rebuildingCtagAssignments += "<ctag-assignment>"
+                               List elementList = ["vlan-id-inner", "resource-version"]
+                               rebuildingCtagAssignments +=  buildXMLElements(ctagAssignmentXml, ""      , "", elementList)
+                               if (utils.nodeExists(ctagAssignmentXml, 'relationship')) {
+                                       rebuildingCtagAssignments += rebuildRelationship(ctagAssignmentXml)
+                               }
+                               rebuildingCtagAssignments += "</ctag-assignment>"
+                       }
+                       rebuildingCtagAssignments += "</ctag-assignments>"
+               }
+               return rebuildingCtagAssignments
+       }
+
+       // rebuild 'relationship-list'
+       def rebuildRelationship(xmlInput) {
+               def rebuildingSubnets = ""
+               if (xmlInput!=null) {
+                       def subnetsData = new XmlSlurper().parseText(xmlInput)
+                       rebuildingSubnets += "<relationship-list>"
+                       def relationships = subnetsData.'**'.findAll {it.name() == "relationship"}
+                       def relationshipsSize = relationships.size()
+                       for (i in 0..relationshipsSize-1) {
+                               def relationship = relationships[i]
+                               def relationshipXml = XmlUtil.serialize(relationship)
+                               rebuildingSubnets += "<relationship>"
+                               def relationshipList = ["related-to", "related-link"]
+                               rebuildingSubnets += buildSubNetworkElements(relationshipXml, "", relationshipList, "")
+                               if (utils.nodeExists(relationshipXml, 'relationship-data')) {
+                                       def relationshipDataXmlData = new XmlSlurper().parseText(relationshipXml)
+                                       def relationshipsData = relationshipDataXmlData.'**'.findAll {it.name() == "relationship-data"}
+                                       def relationshipsDataSize = relationshipsData.size()
+                                       for (j in 0..relationshipsDataSize-1) {
+                                               def relationshipData = relationshipsData[j]
+                                               def relationshipDataXml = XmlUtil.serialize(relationshipData)
+                                               def relationshipDataList =  ["relationship-key", "relationship-value"]
+                                               rebuildingSubnets += buildXMLElements(relationshipDataXml, "", "relationship-data", relationshipDataList)
+                                       }
+                               }
+                               if (utils.nodeExists(relationshipXml, 'related-to-property')) {
+                                       def relationshipDataXmlData = new XmlSlurper().parseText(relationshipXml)
+                                       def relationshipsData = relationshipDataXmlData.'**'.findAll {it.name() == "related-to-property"}
+                                       def relationshipsDataSize = relationshipsData.size()
+                                       for (j in 0..relationshipsDataSize-1) {
+                                               def relationshipData = relationshipsData[j]
+                                               def relationshipDataXml = XmlUtil.serialize(relationshipData)
+                                               def relationshipDataList =  ["property-key", "property-value"]
+                                               rebuildingSubnets += buildXMLElements(relationshipDataXml, "", "related-to-property", relationshipDataList)
+                                       }
+                               }
+
+                               rebuildingSubnets += "</relationship>"
+                       }
+                       rebuildingSubnets += "</relationship-list>"
+               }
+               return rebuildingSubnets
+       }
+       
+       def buildVlans(queryIdResponse) {
+               def rebuildingSubnets = "<vlans>"
+               def subnetsData = new XmlSlurper().parseText(queryIdResponse)
+
+               try {
+                       def subnets = subnetsData.'**'.findAll {it.name() == "segmentation-assignments"}
+                       def subnetsSize = subnets.size()
+                       for (i in 0..subnetsSize-1) {
+                          def subnet = subnets[i]
+                          def subnetXml = XmlUtil.serialize(subnet)
+                          
+                          String vlan = utils.getNodeText1(subnetXml, "segmentation-id")
+                          if (i>0){
+                                  rebuildingSubnets += ","
+                          }
+                          rebuildingSubnets += vlan
+                       }
+               } catch (Exception ex) {
+                  //
+               } finally {
+                 //rebuildingSubnets += "</subnets>"
+               rebuildingSubnets += "</vlans>"
+               }
+               return rebuildingSubnets
+       }
+
+       /* Utility code to rebuild xml/elements in a list:
+        * rebuild xml with 1) unbounded groups of elements; or
+        *                  2) one group of elements; or
+        *                  3) just one or more elements (in a list as argument)
+        * @param xmlInput the XML document
+        * @param parentName the parent name  (ex: 'inputs')
+        * @param childrenName the chilrendName (ex: 'entry' as unbounded/occurs>1)
+        * @param elementList the element list of children (ex: 'key', 'value')
+        * @return a string of rebuild xml
+        *
+        * Ex 1: xmlInput:
+        *    <ws:inputs>
+        *       <ws:entry>
+        *          <ws:key>name</ws:key>
+        *          <ws:value>Edward</ws:value>
+        *       </ws:entry>
+        *       <ws:entry>
+        *          <ws:key>age</ws:key>
+        *          <ws:value>30</ws:value>
+        *       </ws:entry>
+        *       <ws:entry>
+        *          <ws:key>age</ws:key>
+        *          <ws:value>30</ws:value>
+        *       </ws:entry>
+        *    <ws:/inputs>
+        * Usage:
+        * List elementList = ["key", "value"]
+        * String rebuild =  buildXMLElements(xmlInput, "inputs", "entry", elementList)
+        *
+        * Ex 2: xmlInput // no parent tag
+        *   <ws:sdnc-request-header>
+        *    <ws:svc-request-id>fec8ec88-151a-45c9-ad60-8233e0fc8ff2</ws:svc-request-id>
+        *    <ws:svc-notification-url>https://msojra.mtsnj.aic.cip.att.com:8443/adapters/rest/SDNCNotify</ws:svc-notification-url>
+        *    <ws:svc-action>assign</ws:svc-action>
+        *   </ws:sdnc-request-header>
+        * Usage:
+        * List elementList = ["svc-request-id", "svc-notification-url", "svc-action"]
+        * String rebuild =  buildXMLElements(xmlInput, ""      , "sdnc-request-header", elementList)  // no parent tag
+        *
+        * Ex 3: xmlInput // elements one after another (with no parent & children tag)
+        * <ws:test-id>myTestid</ws:test-id>
+        * <ws:test-user>myUser</ws:test-user>
+        * Usage:
+        * List elementList = ["test-id", "test-user"]
+        * String rebuild =  buildXMLElements(xmlInput, ""      , "", elementList)
+        *
+        */
+       def buildXMLElements(xmlInput, parentName, childrenName, elementList) {
+               def varChildren = ""
+               def var = ""
+               def xmlBuildUnbounded = ""
+               if (parentName!="") {xmlBuildUnbounded += "<"+parentName+">" +'\n'}
+               if (xmlInput != null) {
+                       def xml= new XmlSlurper().parseText(xmlInput)
+                       if (childrenName!="") {
+                               varChildren = xml.'**'.findAll {it.name() == childrenName}
+                               for (i in 0..varChildren.size()-1) {
+                                       xmlBuildUnbounded += "<"+childrenName+">" +'\n'
+                                       for (element in elementList) {
+                                               var = varChildren[i].'*'.find {it.name() == element}
+                                          if (var != null) {
+                                                 xmlBuildUnbounded += "<"+element+">"+var.toString()+"</"+element+">" +'\n'
+                                          }
+                                       }
+                                       xmlBuildUnbounded += "</"+childrenName+">" +'\n'
+                               }
+                       } else {
+                               for (element in elementList) {
+                                       var = xml.'*'.find {it.name() == element}
+                                       if (var != null) {
+                                               xmlBuildUnbounded += "<"+element+">"+var.toString()+"</"+element+">" +'\n'
+                                       }
+                               }
+                       }
+
+               }
+               if (parentName!="") {xmlBuildUnbounded += "</"+parentName+">" +'\n'}
+               return xmlBuildUnbounded
+        }
+
+       def getFirstNodeXml(xmlInput, element){
+               def nodeAsText = ""
+               def nodeToSerialize =  ""
+               if (xmlInput != null) {
+                       def fxml= new XmlSlurper().parseText(xmlInput)
+                       if (utils.nodeExists(xmlInput, "payload")) {
+                               nodeToSerialize = fxml.'payload'.'l3-network'.'*'.find {it.name() == element}
+                               if (nodeToSerialize!=null) {
+                                       nodeAsText = XmlUtil.serialize(nodeToSerialize)
+                               } else {
+                                   nodeAsText = ""
+                               }
+
+                       } else {
+                               nodeToSerialize = fxml.'*'.find {it.name() == element}
+                               if (nodeToSerialize!=null) {
+                                       nodeAsText = XmlUtil.serialize(nodeToSerialize)
+                               } else {
+                                       nodeAsText = ""
+                               }
+
+                       }
+               }
+               return nodeAsText
+
+       }
+
+//TODO: This method still needs to be tested before using.
+       /**
+        * This method is similar to the gennetwork:ContrailNetworUpdateCompletedObject
+        * BPEL method.  It extracts all of the required subnet information
+        * for each subnet listed with an orch status equal to the one provided
+        * and puts the corresponding infomation with the appropriate node for
+        * updating aai. The method sets the orch status for each subnet to active
+        *
+        * @param subnetsXml the entire subnets xml
+        * @param requestInput the request in the process
+        * @param queryIdResponse the response of REST AAI query by Id
+        * @param queryVpnBindingResponse the response of REST AAI query by vpn binding
+        * @param routeCollection the collection of vpnBinding's 'global-route-target'
+        * @return String request
+        */
+       public String networkUpdateSubnetInfo(String subnetsXml, String networkResponseXml){
+
+                       String subnets = ""
+                       StringBuilder sb = new StringBuilder()
+                       InputSource source = new InputSource(new StringReader(subnetsXml));
+                       DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                       docFactory.setNamespaceAware(true)
+                       DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+                       Document xml = docBuilder.parse(source)
+                       NodeList nodeList = xml.getElementsByTagNameNS("*", "subnet")
+                       for (int x = 0; x < nodeList.getLength(); x++) {
+                               Node node = nodeList.item(x)
+                               String subnet = ""
+                               if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                       Element eElement = (Element) node
+                                       String subnetOrchStatus = eElement.getElementsByTagNameNS("*", "orchestration-status").item(0).getTextContent()
+                                       if(subnetOrchStatus.equals("pending-create")){
+
+                                               String subnetId = eElement.getElementsByTagNameNS("*", "subnet-id").item(0).getTextContent()
+                                               def netAddress = eElement.getElementsByTagNameNS("*", "network-start-address").item(0).getTextContent()
+                                               def mask = eElement.getElementsByTagNameNS("*", "cidr-mask").item(0).getTextContent()
+                                               def dhcpEnabledSubnet = eElement.getElementsByTagNameNS("*", "dhcp-enabled").item(0).getTextContent()
+                                               def gatewayAddress = eElement.getElementsByTagNameNS("*", "gateway-address").item(0).getTextContent()
+                                               def ipVersion = eElement.getElementsByTagNameNS("*", "ip-version").item(0).getTextContent()
+                                               def relationshipList =  eElement.getElementsByTagNameNS("*", "relationship-list").item(0).getTextContent() //TODO: test this
+                                               String neutronSubnetId = extractNeutSubId(networkResponseXml, subnetId)
+                                               subnet =
+                                               """<subnet>
+                                       <subnetId>${subnetId}</subnetId>
+                                       <neutron-subnet-id>${neutronSubnetId}</neutron-subnet-id>
+                                       <gateway-address>${gatewayAddress}</gateway-address>
+                                       <network-start-address>${netAddress}</network-start-address>
+                                       <cidr-mask>${mask}</cidr-mask>
+                                       <ip-Version>${ipVersion}</ip-Version>
+                                       <orchestration-status>active</orchestration-status>
+                                       <dhcp-enabled>${dhcpEnabledSubnet}</dhcp-enabled>
+                                       <relationship-list>${relationshipList}</relationship-list>
+                                       </subnet>"""
+
+                                       }else if(subnetOrchStatus.equals("pending-delete")){
+                                               StringWriter writer = new StringWriter()
+                                               Transformer transformer = TransformerFactory.newInstance().newTransformer()
+                                               transformer.transform(new DOMSource(node), new StreamResult(writer))
+                                               subnet = writer.toString()
+
+                                       }else{
+                                               subnet = ""
+                                       }
+                               }
+                               subnets = sb.append(subnet)
+                       }
+
+                       subnets = utils.removeXmlPreamble(subnets)
+
+                       String subnetsList =
+                       """<subnets>
+                       ${subnets}
+                       </subnets>"""
+
+                       return subnetsList
+       }
+
+
+       /**
+        * This method extracts the "value" node text for the the given subnet Id.
+        *
+        * @param String inputSource - xml that contains the subnet id key and value
+        * @param String subnetId - for which you want the value of
+
+        * @return String value - node text of node named value associated with the given subnet id
+        */
+       public String extractNeutSubId(String inputSource, String subnetId){
+
+                               String value = ""
+                               InputSource source = new InputSource(new StringReader(inputSource));
+                               DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                               docFactory.setNamespaceAware(true)
+                               DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+                               Document xml = docBuilder.parse(source)
+                               NodeList nodeList = xml.getElementsByTagNameNS("*", "entry")
+                               for (int x = 0; x < nodeList.getLength(); x++) {
+                                       Node node = nodeList.item(x)
+                                       String subnet = ""
+                                       if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                               Element eElement = (Element) node
+                                               String key = eElement.getElementsByTagNameNS("*", "key").item(0).getTextContent()
+                                               if(key.equals(subnetId)){
+                                                       value = eElement.getElementsByTagNameNS("*", "value").item(0).getTextContent()
+                                               }
+                                       }
+                               }
+                               return value
+                       }
+
+       public boolean isRollbackEnabled (Execution execution, String payloadXml) {
+               
+               boolean rollbackEnabled = false
+               boolean rollbackValueSet = false
+               if (utils.nodeExists(payloadXml, "backout-on-failure")) {
+                       String backoutValue = utils.getNodeText1(payloadXml, "backout-on-failure")
+                       if (backoutValue != null && !backoutValue.isEmpty()) {
+                               if (backoutValue.equalsIgnoreCase("false")) {
+                                       rollbackEnabled = false
+                               }
+                               else {
+                                       rollbackEnabled = true
+                               }
+                               rollbackValueSet = true;
+                       }
+               }
+               
+               if (!rollbackValueSet) {
+                       rollbackEnabled = execution.getVariable("URN_mso_rollback")
+               }
+               return rollbackEnabled
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/PrepareUpdateAAIVfModule.groovy
new file mode 100644 (file)
index 0000000..b34467e
--- /dev/null
@@ -0,0 +1,363 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.util.Node
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.springframework.web.util.UriUtils
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import com.jayway.jsonpath.internal.Utils;
+
+public class PrepareUpdateAAIVfModule extends VfModuleBase {
+       
+       /**
+        * Initialize the flow's variables.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable('prefix', 'PUAAIVfMod_')
+               execution.setVariable('PUAAIVfMod_vnfId', null)
+               execution.setVariable('PUAAIVfMod_vfModuleId', null)
+               execution.setVariable('PUAAIVfMod_vnfName', null)
+               execution.setVariable('PUAAIVfMod_orchestrationStatus', null)
+               execution.setVariable('PUAAIVfMod_vfModule', null)
+               execution.setVariable('PUAAIVfMod_vfModuleOK', false)
+               execution.setVariable('PUAAIVfMod_vfModuleValidationError', null)
+               execution.setVariable('PUAAIVfMod_getVnfResponseCode' ,null)
+               execution.setVariable('PUAAIVfMod_getVnfResponse', '')
+               execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', null)
+               execution.setVariable('PUAAIVfMod_updateVfModuleResponse', '')
+               execution.setVariable('PUAAIVfMod_outVfModule', null)
+       }       
+       
+       /**
+        * Check for missing elements in the received request.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def xml = execution.getVariable('PrepareUpdateAAIVfModuleRequest')
+                       logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+                       initProcessVariables(execution)
+                       
+                       def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
+                       execution.setVariable('PUAAIVfMod_vnfId', vnfId)
+
+                       def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
+                       execution.setVariable('PUAAIVfMod_vfModuleId', vfModuleId)
+                       
+                       def orchestrationStatus = getRequiredNodeText(execution, xml,'orchestration-status')
+                       execution.setVariable('PUAAIVfMod_orchestrationStatus', orchestrationStatus)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Using the received vnfId, query AAI to get the corresponding Generic VNF.
+        * A 200 response is expected with the Generic VNF in the response body.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void getGenericVnf(Execution execution) {
+               def method = getClass().getSimpleName() + '.getGenericVnf(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
+                       
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       
+                       String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8")
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       try {
+                               RESTConfig config = new RESTConfig(endPoint);
+                               def responseData = ''
+                               def aaiRequestId = UUID.randomUUID().toString()
+                               RESTClient client = new RESTClient(config).
+                                       addHeader('X-TransactionId', aaiRequestId).
+                                       addHeader('X-FromAppId', 'MSO').
+                                       addHeader('Content-Type', 'application/xml').
+                                       addHeader('Accept','application/xml');
+                               if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                       client.addAuthorizationHeader(basicAuthCred)
+                               }
+                               logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+                               APIResponse response = client.httpGet()
+                                       
+                               responseData = response.getResponseBodyAsString()
+                               execution.setVariable('PUAAIVfMod_getVnfResponseCode', response.getStatusCode())
+                               execution.setVariable('PUAAIVfMod_getVnfResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(), isDebugLogEnabled)
+                               execution.setVariable('PUAAIVfMod_getVnfResponseCode', 500)
+                               execution.setVariable('PUAAIVfMod_getVnfResponse', 'AAI GET Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in getGenericVnf(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Validate the VF Module.  That is, confirm that a VF Module with the input VF Module ID
+        * exists in the retrieved Generic VNF.  Then, check to make sure that if that VF Module
+        * is the base VF Module and it's not the only VF Module for this Generic VNF, that we're not
+        * attempting to delete it.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void validateVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.validateVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               
+               try {
+                       def genericVnf = execution.getVariable('PUAAIVfMod_getVnfResponse')
+                       def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('PUAAIVfMod_vfModuleId')
+                       def vnfName = getNodeTextForce(genericVnf, 'vnf-name')
+                       execution.setVariable('PUAAIVfMod_vnfName', vnfName)
+                       def VfModule vfModule = findVfModule(genericVnf, vfModuleId)
+                       if (vfModule == null) {
+                               def String msg = 'VF Module \'' + vfModuleId + '\' does not exist in Generic VNF \'' + vnfId + '\''
+                               execution.setVariable('PUAAIVfMod_vfModuleValidationError', msg)
+                               execution.setVariable('PUAAIVfMod_vfModuleOK', false)
+                       } else {
+                               def orchestrationStatus = execution.getVariable('PUAAIVfMod_orchestrationStatus')
+                               if (isDebugLogEnabled) {
+                                       logDebug('VF Module \'' + vfModuleId + '\': isBaseVfModule=' + vfModule.isBaseVfModule() +
+                                               ', isOnlyVfModule=' + vfModule.isOnlyVfModule() + ', new orchestration-status=' + orchestrationStatus,
+                                               isDebugLogEnabled)
+                               }
+                               if (vfModule.isBaseVfModule() && !vfModule.isOnlyVfModule() && orchestrationStatus.equals('pending-delete')) {
+                                       def String msg = 'Orchestration status for VF Module \'' + vfModuleId +
+                                               '\' cannot be set to \'pending-delete\' since it is the base VF Module and it\'s not the only VF Module in Generic VNF \'' + vnfId + '\''
+                                       execution.setVariable('PUAAIVfMod_vfModuleValidationError', msg)
+                                       execution.setVariable('PUAAIVfMod_vfModuleOK', false)
+                               } else {
+                                       execution.setVariable('PUAAIVfMod_vfModule', vfModule)
+                                       execution.setVariable('PUAAIVfMod_vfModuleOK', true)
+                               }
+                       }
+                       
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in validateVfModule(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Construct and send a PUT request to AAI to update the VF Module.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void updateVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.updateVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               
+               try {
+                       // Construct payload
+                       def VfModule vfModule = (VfModule) execution.getVariable('PUAAIVfMod_vfModule')
+                       def Node newVfModuleNode = vfModule.getNode().clone()
+                       def orchestrationStatus = execution.getVariable('PUAAIVfMod_orchestrationStatus')
+                       def Node orchestrationStatusNode = utils.getChildNode(newVfModuleNode, 'orchestration-status')
+                       if (orchestrationStatusNode == null) {
+                               // Node doesn't exist, this should never happen, right?
+                               new Node(newVfModuleNode, 'orchestration-status', orchestrationStatus)
+                       } else {
+                               // Node already exists, just give it a new value
+                               orchestrationStatusNode.setValue(orchestrationStatus)
+                       }
+                       def VfModule newVfModule = new VfModule(newVfModuleNode, vfModule.isOnlyVfModule())
+                       def payload = utils.nodeToString(newVfModuleNode)
+                       
+                       // Construct endpoint
+                       def vnfId = execution.getVariable('PUAAIVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('PUAAIVfMod_vfModuleId')
+                       
+                       
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       
+                       String endPoint = execution.getVariable("URN_aai_endpoint") + "${aai_uri}/" + UriUtils.encode(vnfId, "UTF-8") + "/vf-modules/vf-module/" + UriUtils.encode(vfModuleId, "UTF-8")
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       try {
+                               RESTConfig config = new RESTConfig(endPoint);
+                               def responseData = ''
+                               def aaiRequestId = UUID.randomUUID().toString()
+                               RESTClient client = new RESTClient(config).
+                                       addHeader('X-TransactionId', aaiRequestId).
+                                       addHeader('X-FromAppId', 'MSO').
+                                       addHeader('Content-Type', 'application/xml').
+                                       addHeader('Accept','application/xml');
+                               if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                       client.addAuthorizationHeader(basicAuthCred)
+                               }
+                               logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
+                               APIResponse response = client.httpPut(payload)
+
+                               responseData = response.getResponseBodyAsString()
+                               execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', response.getStatusCode())
+                               execution.setVariable('PUAAIVfMod_updateVfModuleResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                               
+                               // Set the output for this flow.  The updated VfModule is an output, the generic VNF name, and for
+                               // backward compatibilty, the heat-stack-id is an output
+                               execution.setVariable('PUAAIVfMod_outVfModule', newVfModule)
+                               def vnfName = execution.getVariable('PUAAIVfMod_vnfName')
+                               logDebug('Output PUAAIVfMod_vnfName set to ' + vnfName, isDebugLogEnabled)
+                               // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+                               execution.setVariable('WorkflowResponse', newVfModule)
+                               logDebug('Output PUAAIVfMod_outVfModule set for VF Module Id \'' + newVfModule.getElementText('vf-module-id') + '\'', isDebugLogEnabled)
+                               def heatStackId = newVfModule.getElementText('heat-stack-id')
+                               execution.setVariable('PUAAIVfMod_heatStackId', heatStackId)
+                               logDebug('Output PUAAIVfMod_heatStackId set to \'' + heatStackId + '\'', isDebugLogEnabled)
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(), isDebugLogEnabled)
+                               execution.setVariable('PUAAIVfMod_updateVfModuleResponseCode', 500)
+                               execution.setVariable('PUAAIVfMod_updateVfModuleResponse', 'AAI PUT Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
+               }                               
+       }
+               
+       /**
+        * Generates a WorkflowException if the AAI query returns a response code other than 200.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void handleVnfNotFound(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleVnfNotFound(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logError('Error occurred attempting to query AAI, Response Code ' +
+                       execution.getVariable('PUAAIVfMod_getVnfResponseCode') + ', Error Response ' +
+                       execution.getVariable('PUAAIVfMod_getVnfResponse'))
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable('PUAAIVfMod_getVnfResponse'))
+               execution.setVariable('WorkflowException', exception)
+               
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+       
+       /**
+        * Generates a WorkflowException if the VF Module does not pass validation.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void handleVfModuleValidationError(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleVfModuleValidationError(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+                               
+               def String errorMsg = 'VF Module validation error: ' + execution.getVariable('PUAAIVfMod_vfModuleValidationError')
+               logError(errorMsg)
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000, errorMsg)
+               execution.setVariable('WorkflowException', exception)
+
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+       
+       /**
+        * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void handleUpdateVfModuleFailure(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
+                       execution.getVariable('PUAAIVfMod_updateVfModuleResponseCode') + ', Error Response ' +
+                       execution.getVariable('PUAAIVfMod_updateVfModuleResponse'))
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable('PUAAIVfMod_updateVfModuleResponse'))
+               execution.setVariable('WorkflowException', exception)
+               
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapter.groovy
new file mode 100644 (file)
index 0000000..8bd6983
--- /dev/null
@@ -0,0 +1,368 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import java.text.SimpleDateFormat
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.codec.binary.Base64;
+
+
+// SDNC Adapter Request/Response processing
+
+public class SDNCAdapter extends AbstractServiceTaskProcessor {
+
+       def Prefix="SDNCA_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       // Script Task: Process SDNC Workflow Request
+       // Params:      Workflow Execution
+       // Assume:      Received SDNCAdapterWorkflowRequest is in variable 'sdncAdapterWorkflowRequest'
+       //                      Put created SDNCAdapterRequest in variable 'sdncAdapterRequest'
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               try{
+
+                       utils.log("DEBUG", "=========== Begin PreProcess SDNCAdapterRequestScript  ===========", isDebugEnabled)
+                       utils.log("DEBUG", "Incoming sdncAdapterWorkflowRequest:\n" + execution.getVariable("sdncAdapterWorkflowRequest"), isDebugEnabled)
+
+                       // Initialize some variables used throughout the flow
+                       execution.setVariable("prefix", Prefix)
+                       execution.setVariable("sdncAdapterResponse", "")
+                       execution.setVariable("asynchronousResponseTimeout", false)
+                       execution.setVariable("continueListening", false)
+                       execution.setVariable("SDNCA_SuccessIndicator", false)
+
+                       // Authorization Info
+                       String basicAuthValue = execution.getVariable("URN_mso_adapters_po_auth")
+                       utils.log("DEBUG", "Obtained BasicAuth userid password for sdnc adapter:" + basicAuthValue, isDebugEnabled)
+                       try {
+                               def encodedString = utils.getBasicAuth(basicAuthValue, execution.getVariable("URN_mso_msoKey"))
+                               execution.setVariable("BasicAuthHeaderValue",encodedString)
+                       } catch (IOException ex) {
+                               utils.log("ERROR", "Unable to encode username password string")
+                       }
+
+                       // TODO Use variables instead of passing xml request - Huh?
+
+                       // Get original RequestHeader
+                       def sdncwfreq= execution.getVariable("sdncAdapterWorkflowRequest")
+                       def requestHeader = utils.getNodeXml(sdncwfreq, "RequestHeader")
+                       requestHeader = requestHeader.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+                       utils.log("DEBUG", "RequestHeader:\n" + requestHeader, isDebugEnabled)
+
+                       // Set Callback URL to use from URN Mapping or jBoss Property
+                       def origCallbackUrl = utils.getNodeText(requestHeader, "CallbackUrl")
+                       def callbackUrlToUse = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+                       MsoUtils msoUtil = new MsoUtils()
+                       def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+                       if((useQualifiedHostName!=null) && (useQualifiedHostName.equals("true"))){
+                               callbackUrlToUse = msoUtil.getQualifiedHostNameForCallback(callbackUrlToUse)
+                       }
+                       utils.log("DEBUG", "Callback URL to use:\n" + callbackUrlToUse, isDebugEnabled)
+                       requestHeader = requestHeader.replace(origCallbackUrl, callbackUrlToUse)
+
+                       // Get parameters from request header
+                       def sdnca_svcInstanceId = utils.getNodeText1(requestHeader, "SvcInstanceId") // optional
+                       utils.log("DEBUG", "SvcInstanceId: " + sdnca_svcInstanceId, isDebugEnabled)
+                       def sdnca_msoAction = utils.getNodeText1(requestHeader, "MsoAction") // optional
+                       utils.log("DEBUG", "MsoAction: " + sdnca_msoAction, isDebugEnabled)
+                       def sdnca_svcAction = utils.getNodeText(requestHeader, "SvcAction")
+                       utils.log("DEBUG", "SvcAction: " + sdnca_svcAction, isDebugEnabled)
+                       def sdnca_svcOperation = utils.getNodeText(requestHeader, "SvcOperation")
+                       utils.log("DEBUG", "SvcOperation: " + sdnca_svcOperation, isDebugEnabled)
+                       def sdncRequestData = utils.getChildNodes(sdncwfreq, "SDNCRequestData")
+                       sdncRequestData = sdncRequestData.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+                       sdncRequestData = sdncRequestData.replaceAll('tag0:', '').replaceAll(':tag0', '')
+                       utils.log("DEBUG", "SDNCRequestData:\n" + sdncRequestData, isDebugEnabled)
+                       def sdnca_serviceType = ""
+                       if (utils.nodeExists(sdncwfreq, "service-type")) {
+                               sdnca_serviceType = utils.getNodeText(sdncwfreq, "service-type")
+                       }
+                       utils.log("DEBUG", "service-type: " + sdnca_serviceType, isDebugEnabled)
+                       def serviceConfigActivate = false
+                       def source = ''
+
+                       execution.setVariable("serviceConfigActivate", serviceConfigActivate)
+                       utils.log("DEBUG", "serviceConfigActivate: " + serviceConfigActivate, isDebugEnabled)
+                       execution.setVariable("source", source)
+                       utils.log("DEBUG", "source: " + source, isDebugEnabled)
+
+                       //calling process should pass a generated uuid if sending multiple sdnc requests
+                       def requestId = utils.getNodeText(requestHeader, "RequestId")
+                       execution.setVariable(Prefix + "requestId", requestId)
+
+                       // Prepare SDNC Request to the SDNC Adapter
+                       String sdncAdapterRequest = """
+                       <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+                       <SOAP-ENV:Body>
+                       <aetgt:SDNCAdapterRequest xmlns:aetgt="http://domain2.att.com/workflow/sdnc/adapter/schema/v1" xmlns:sdncadaptersc="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                       <sdncadapter:RequestHeader xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                       <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>"""
+
+                       if (sdnca_svcInstanceId != null) {
+                               sdncAdapterRequest += """
+                       <sdncadapter:SvcInstanceId>${sdnca_svcInstanceId}</sdncadapter:SvcInstanceId>"""
+                       }
+
+                       sdncAdapterRequest += """
+                       <sdncadapter:SvcAction>${sdnca_svcAction}</sdncadapter:SvcAction>
+                       <sdncadapter:SvcOperation>${sdnca_svcOperation}</sdncadapter:SvcOperation>
+                       <sdncadapter:CallbackUrl>${callbackUrlToUse}</sdncadapter:CallbackUrl>"""
+
+                       if (sdnca_msoAction != null) {
+                               sdncAdapterRequest += """
+                       <sdncadapter:MsoAction>${sdnca_msoAction}</sdncadapter:MsoAction>"""
+                       }
+
+                       sdncAdapterRequest += """
+                       </sdncadapter:RequestHeader>
+                       <sdncadaptersc:RequestData>${sdncRequestData}</sdncadaptersc:RequestData></aetgt:SDNCAdapterRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>"""
+
+                       utils.logAudit("Outgoing SDNCAdapterRequest:\n" + sdncAdapterRequest)
+                       execution.setVariable("sdncAdapterRequest", sdncAdapterRequest)
+
+                       utils.log("DEBUG", execution.getVariable("sdncAdapterRequest"), isDebugEnabled)
+                       utils.log("DEBUG", execution.getVariable("URN_mso_adapters_sdnc_endpoint"), isDebugEnabled)
+               }catch(Exception e){
+                       utils.log("DEBUG", 'Internal Error occured during PreProcess Method: ' + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error occured during PreProcess Method') // TODO: what message and error code?
+               }
+               utils.log("DEBUG","=========== End pre Process SDNCRequestScript ===========", isDebugEnabled)
+       }
+
+       public void postProcessResponse (Execution execution) {
+
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               try{
+                       utils.log("DEBUG","=========== Begin POSTProcess SDNCAdapter ===========", isDebugEnabled)
+                       utils.log("DEBUG","Incoming sdncAdapterCallbackRequest:\n" + execution.getVariable("sdncAdapterCallbackRequest"), isDebugEnabled)
+
+                       // Check the sdnccallback request and get the responsecode
+                       def sdnccallbackreq = execution.getVariable("sdncAdapterCallbackRequest")
+                       def callbackRequestData = ""
+                       def callbackHeader = ""
+
+                       if(sdnccallbackreq != null){
+                               callbackHeader = utils.getNodeXml(sdnccallbackreq, "CallbackHeader")
+                               callbackRequestData = utils.getNodeXml(sdnccallbackreq, "RequestData")
+
+                               callbackHeader = callbackHeader.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+                               utils.log("DEBUG","SDNCCallbackHeader is:\n" + callbackHeader, isDebugEnabled)
+
+                               callbackRequestData = callbackRequestData.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+                               utils.log("DEBUG","DECODED SDNCCallback RequestData is:\n" + callbackRequestData, isDebugEnabled)
+
+                               String sdncAdapterWorkflowResponse ="""
+                                               <sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1">
+                                               <sdncadapterworkflow:response-data>
+                                               ${callbackHeader}
+                                               ${callbackRequestData}
+                                               </sdncadapterworkflow:response-data>
+                                               </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
+
+
+                               utils.log("DEBUG","Outgoing sdncAdapterWorkflowResponse:\n" + sdncAdapterWorkflowResponse, isDebugEnabled)
+                               sdncAdapterWorkflowResponse = utils.formatXml(sdncAdapterWorkflowResponse)
+                               execution.setVariable("sdncAdapterResponse", sdncAdapterWorkflowResponse)
+                               // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead
+                               execution.setVariable("WorkflowResponse", sdncAdapterWorkflowResponse)
+
+                               // Check final indicator to determine if we are to continue listening or not
+                               def String enhancedCallbackRequestData = callbackRequestData.replaceAll("&amp;", "&")
+                               enhancedCallbackRequestData = enhancedCallbackRequestData.replaceAll("&lt;", "<")
+                               enhancedCallbackRequestData = enhancedCallbackRequestData.replaceAll("&gt;", ">")
+                               // replace the data with '&' (ex: subscriber-name= 'FOUR SEASONS HEATING & COOLING'
+                               enhancedCallbackRequestData = enhancedCallbackRequestData.replace("&", "&amp;")
+                               utils.log("DEBUG","EnhancedCallbackRequestData:\n" + enhancedCallbackRequestData, isDebugEnabled)
+                               execution.setVariable("enhancedCallbackRequestData", enhancedCallbackRequestData)
+                               def continueListening = false
+                               if (utils.nodeExists(enhancedCallbackRequestData, "ack-final-indicator")) {
+                                       if (utils.getNodeText(enhancedCallbackRequestData, "ack-final-indicator") == 'N') {
+                                               continueListening = true
+                                       }
+                               }
+                               execution.setVariable("continueListening", continueListening)
+                               utils.log("DEBUG", "Continue Listening: " + continueListening, isDebugEnabled)
+                       }else{
+                               // Timed out waiting for asynchronous message, build error response
+                               exceptionUtil.buildWorkflowException(execution, 500, "SDNC Callback Timeout Error")
+                               execution.setVariable("asynchronousResponseTimeout", true)
+                               utils.log("DEBUG", "Timed out waiting for asynchronous message", isDebugEnabled)
+                       }
+               }catch(Exception e){
+                       utils.log("DEBUG", 'Internal Error occured during PostProcess Method: ' + e, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error occured during PostProcess Method') // TODO: what message and error code?
+               }
+               utils.log("DEBUG","=========== End POSTProcess SDNCAdapter ===========", isDebugEnabled)
+       }
+
+       public void callbackResponsecheck(Execution execution){
+
+               def sdnccallbackreq=execution.getVariable("sdncAdapterCallbackRequest")
+               if (sdnccallbackreq==null){
+                       execution.setVariable("callbackResponseReceived",false);
+               }else{
+                       execution.setVariable("callbackResponseReceived",true);
+               }
+       }
+
+       public void resetCallbackRequest(Execution execution) {
+
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+               utils.log("DEBUG","=========== Begin Reset Callback Info SDNCAdapter ===========", isDebugEnabled)
+
+               // Clear sdncAdapterCallbackRequest variable
+               execution.removeVariable("sdncAdapterCallbackRequest")
+
+               // Determine and set SDNC Timeout Value
+               def enhancedCallbackRequestData = execution.getVariable("enhancedCallbackRequestData")
+               def interim = false
+               if (enhancedCallbackRequestData != null) {
+                       if (utils.nodeExists(enhancedCallbackRequestData, "ack-final-indicator")) {
+                               if (utils.getNodeText(enhancedCallbackRequestData, "ack-final-indicator") == 'N') {
+                                       interim = true
+                               }
+                       }
+               }
+               def timeoutValue = execution.getVariable("URN_mso_sdnc_timeout")
+               def sdncAdapterWorkflowRequest = execution.getVariable("sdncAdapterWorkflowRequest")
+               if (interim && utils.nodeExists(sdncAdapterWorkflowRequest, "InterimSDNCTimeOutValueInHours")) {
+                       timeoutValue = "PT" + utils.getNodeText(sdncAdapterWorkflowRequest, "InterimSDNCTimeOutValueInHours") + "H"
+               } else if (utils.nodeExists(sdncAdapterWorkflowRequest, "SDNCTimeOutValueInMinutes")) {
+                       timeoutValue = "PT" + utils.getNodeText(sdncAdapterWorkflowRequest, "SDNCTimeOutValueInMinutes") + "M"
+               }
+               execution.setVariable("sdncTimeoutValue", timeoutValue)
+               utils.log("DEBUG", "Setting SDNC Timeout Value to " + timeoutValue, isDebugEnabled)
+
+               utils.log("DEBUG","=========== End Reset Callback Info SDNCAdapter ===========", isDebugEnabled)
+       }
+
+       public void prepareCSIMessage(Execution execution) {
+       
+       }
+
+       public void prepareDBMessage(Execution execution) {
+
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+               utils.log("DEBUG","=========== Begin Prepare DB Message SDNCAdapter ===========", isDebugEnabled)
+
+               // Create DB Message
+               def dbRequestId = execution.getVariable("att-mso-request-id")
+               String dbUpdateInterimStageCompletion = """
+                       <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+                               <SOAP-ENV:Body>
+                                       <DBAdapter:updateInterimStageCompletion xmlns:DBAdapter="http://com.att.mso/requestsdb">
+                                               <requestId>${dbRequestId}</requestId>
+                                               <interimStageCompletion>1</interimStageCompletion>
+                                               <lastModifiedBy>BPEL</lastModifiedBy>
+                               </DBAdapter:updateInterimStageCompletion>
+                               </SOAP-ENV:Body>
+                       </SOAP-ENV:Envelope>
+                       """
+
+               execution.setVariable("dbUpdateInterimStageCompletion", dbUpdateInterimStageCompletion)
+               utils.log("DEBUG","DB UpdateInterimStageCompletion:\n" + dbUpdateInterimStageCompletion, isDebugEnabled)
+
+               utils.log("DEBUG","=========== End Prepare DB Message SDNCAdapter ===========", isDebugEnabled)
+       }
+
+       public void prepareCCDMessage(Execution execution) {
+
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+               utils.log("DEBUG","=========== Begin Prepare CCD Message SDNCAdapter ===========", isDebugEnabled)
+
+               try {
+                       def sdncwfreq= execution.getVariable("sdncAdapterWorkflowRequest")
+                       def sdncRequestData = utils.getNodeXml(sdncwfreq, "SDNCRequestData", false)
+
+                       def ccdNotificationUrl = utils.getNodeText(sdncRequestData, 'notification-url')
+                       execution.setVariable('ccd-notification-url', ccdNotificationUrl)
+                       utils.log("DEBUG", 'ccd-notification-url: ' + ccdNotificationUrl, isDebugEnabled)
+
+                       def requestId = utils.getNodeText(sdncRequestData, 'request-id')
+                       def requestAction = utils.getNodeText(sdncRequestData, 'request-action')
+                       String payload ="""
+                               <ns:status-notification
+                                               xmlns:ns="http://ecomp.att.com/mso/statusnotification/schema/v1"
+                                               xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
+                                               xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
+                                       <msoservtypes:request-id>${requestId}</msoservtypes:request-id>
+                                       <msoservtypes:request-action>${requestAction}</msoservtypes:request-action>
+                                       <msoservtypes:source>CCD</msoservtypes:source>
+                                       <msoservtypes:ack-final-indicator>N</msoservtypes:ack-final-indicator>
+                                       <structuredtypes:parameter-list>
+                                               <structuredtypes:parameter>
+                                                       <structuredtypes:name>request-stage</structuredtypes:name>
+                                                       <structuredtypes:value>DataStagingComplete</structuredtypes:value>
+                                               </structuredtypes:parameter>
+                                       </structuredtypes:parameter-list>
+                               </ns:status-notification>
+                       """
+
+                       payload = utils.formatXml(payload)
+                       execution.setVariable('ccd-notification-payload', payload)
+                       utils.log("DEBUG", 'ccd-notification-payload:\n' + payload, isDebugEnabled)
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in prepareCCDMessage', e)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 9999, 'Internal Error') // TODO: what message and error code?
+               }
+
+               utils.log("DEBUG","=========== End Prepare CCD Message SDNCAdapter ===========", isDebugEnabled)
+       }
+
+       public String generateCurrentTimeInUtc(){
+               final  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+               sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+               final String utcTime = sdf.format(new Date());
+               return utcTime;
+       }
+
+       public void toggleSuccessIndicator(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("SDNCA_SuccessIndicator", true)
+               utils.log("DEBUG","Setting SDNCA Success Indicator to True", isDebugEnabled)
+       }
+
+       public void assignError(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               utils.log("DEBUG","=========== Started Assign Error ===========", isDebugEnabled)
+               WorkflowException wf = execution.getVariable("WorkflowException")
+               if(wf == null){
+                       exceptionUtil.buildWorkflowException(execution, 5000, "SDNCAdapter Encountered an Internal Error") // TODO: Not sure what message and error code we want here.....
+               }else{
+                       execution.setVariable("WorkflowException", wf)
+               }
+
+               utils.log("DEBUG","Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+               utils.log("DEBUG","=========== End Assign Error ===========", isDebugEnabled)
+       }
+
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/SDNCAdapterUtils.groovy
new file mode 100644 (file)
index 0000000..0a280b2
--- /dev/null
@@ -0,0 +1,837 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+
+/**
+ * @version 1.0
+ *
+ */
+class SDNCAdapterUtils {
+
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       private AbstractServiceTaskProcessor taskProcessor
+
+       public SDNCAdapterUtils(AbstractServiceTaskProcessor taskProcessor) {
+               this.taskProcessor = taskProcessor
+       }
+
+       String SDNCAdapterFeatureRequest(Execution execution, String requestName, String action, String callbackURL, String serviceOperation, String timeoutValueInMinutes) {
+               def utils=new MsoUtils()
+
+               def prefix = execution.getVariable('prefix')
+               def request = taskProcessor.getVariable(execution, requestName)
+               def requestInformation = utils.getNodeXml(request, 'request-information', false)
+               def serviceInformation = utils.getNodeXml(request, 'service-information', false)
+               def featureInformation = utils.getNodeXml(request, 'feature-information', false)
+               def featureParameters = utils.getNodeXml(request, 'feature-parameters', false)
+
+               def requestId = execution.getVariable('testReqId') // for junits
+               if(requestId==null){
+                       requestId = execution.getVariable("att-mso-request-id") + "-" +         System.currentTimeMillis()
+               }
+
+               def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+               def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+               def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
+               def nnsFeatureInformation = utils.removeXmlNamespaces(featureInformation)
+               def nnsFeatureParameters = utils.removeXmlNamespaces(featureParameters)
+
+               String sdncAdapterFeatureRequest = """
+                               <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                               <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+                                               <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+                                               <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+                                               <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+                                       </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData>
+                                               ${nnsRequestInformation}
+                                               ${nnsServiceInformation}
+                                               ${nnsFeatureInformation}
+                                               ${nnsFeatureParameters}
+                                       </sdncadapterworkflow:SDNCRequestData>
+                                       <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+                       """
+               sdncAdapterFeatureRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterFeatureRequest))
+               return sdncAdapterFeatureRequest
+       }
+
+       String SDNCAdapterActivateVnfRequest(Execution execution, String action, String callbackURL, String serviceOperation, String msoAction, String timeoutValueInMinutes) {
+               def utils=new MsoUtils()
+
+               def prefix = execution.getVariable('prefix')
+               def request = taskProcessor.getVariable(execution, prefix+'Request')
+               def requestInformation = utils.getNodeXml(request, 'request-information', false)
+               def serviceInformation = utils.getNodeXml(request, 'service-information', false)
+               def vnfInformationList = utils.getNodeXml(request, 'vnf-information-list', false)
+
+               def requestId = execution.getVariable('testReqId') // for junits
+               if(requestId==null){
+                       requestId = execution.getVariable("att-mso-request-id") + "-" +         System.currentTimeMillis()
+               }
+
+               def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+               def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+               def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
+               def nnsVnfInformationList = utils.removeXmlNamespaces(vnfInformationList)
+
+               String sdncAdapterActivateVnfRequest = """
+                               <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                               <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+                                               <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+                                               <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+                                               <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+                                               <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
+                                       </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData>
+                                               ${nnsRequestInformation}
+                                               ${nnsServiceInformation}
+                                               ${nnsVnfInformationList}
+                                       </sdncadapterworkflow:SDNCRequestData>
+                                       <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+                       """
+               sdncAdapterActivateVnfRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterActivateVnfRequest))
+               return sdncAdapterActivateVnfRequest
+       }
+
+       String SDNCAdapterL3ToHigherLayerRequest(Execution execution, String action, String callbackURL, String serviceOperation, String timeoutValueInMinutes) {
+               def utils=new MsoUtils()
+
+               def prefix = execution.getVariable('prefix')
+               def request = taskProcessor.getVariable(execution, prefix+'Request')
+
+               def requestInformation = """<request-information>
+                                                                               <request-id>${execution.getVariable("att-mso-request-id")}</request-id>
+                                                                               <request-action>torepl</request-action>
+                                                                               <source>${execution.getVariable(prefix+"source")}</source>
+                                                                               <notification-url>${execution.getVariable(prefix+"notificationUrl")}</notification-url>
+                                                                       </request-information>"""
+
+               // Change the value of the 'request-information'.'request-action' element
+               def xml = new XmlSlurper().parseText(requestInformation)
+               if("assign".equalsIgnoreCase(action)){
+                       xml.'request-action'.replaceBody('createTrinityBonding')
+               }else if("activate".equalsIgnoreCase(action)){
+                       xml.'request-action'.replaceBody('activateTrinityBonding')
+               }else if("delete".equalsIgnoreCase(action)){
+                       xml.'request-action'.replaceBody('deleteTrinityBonding')
+               }
+               requestInformation = utils.removeXmlPreamble(groovy.xml.XmlUtil.serialize(xml))
+               def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+
+               def requestId = execution.getVariable('testReqId') // for junits
+               if(requestId==null){
+                       requestId = execution.getVariable("att-mso-request-id") + "-" +         System.currentTimeMillis()
+               }
+
+               def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+               //Build Service Information
+               // Send serviceName from CANOPI to sdnc for service-type
+               def serviceInformation = """<service-information>
+                                                                             <service-type>${execution.getVariable(prefix+"serviceName")}</service-type>
+                                                                             <service-instance-id>${svcInstanceId}</service-instance-id>
+                                                                             <subscriber-name>${execution.getVariable(prefix+"subscriberName")}</subscriber-name>
+                                                                             <subscriber-global-id>${execution.getVariable(prefix+"subscriberGlobalId")}</subscriber-global-id>
+                                                                       </service-information>"""
+
+               //Build Additional Information - vpn or vni
+               // Send serviceType from CANOPI to SDNC for nbnc-request-information service-type
+               def service = execution.getVariable(prefix+"serviceType")
+               def customerId = execution.getVariable(prefix+"customerId")
+               def vpnId = execution.getVariable(prefix+"vpnId")
+               def vpnRt = execution.getVariable(prefix+"vpnRt")
+               def vpnService = execution.getVariable(prefix+"vpnService")
+               def vpnRegion = execution.getVariable(prefix+"vpnRegion")
+               def additionalInfo = ""
+               if("assign".equalsIgnoreCase(action)){
+                       additionalInfo = """<vpn-data-list>
+                                                                       <vpn-id>${vpnId}</vpn-id>
+                                                                       <vpn-rt>${vpnRt}</vpn-rt>
+                                                                       <vpn-service>${vpnService}</vpn-service>
+                                                                       <vpn-region>${vpnRegion}</vpn-region>
+                                                               </vpn-data-list>"""
+               }else if("activate".equalsIgnoreCase(action) || "delete".equalsIgnoreCase(action)){
+                       def vniId = execution.getVariable(prefix+'vniId')
+                       additionalInfo = "<vni-id>${vniId}</vni-id>"
+               }
+
+               //Set Interface Status
+               def interfaceStatus = "DISABLE"
+               if("activate".equalsIgnoreCase(action)){
+                       interfaceStatus = "ENABLE"
+               }
+
+               //Build SDNC Adapter Request
+               String sdncAdapterL3ToHLRequest = """
+                               <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                               <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+                                               <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+                                               <sdncadapter:SvcOperation>${serviceOperation}</sdncadapter:SvcOperation>
+                                               <sdncadapter:CallbackUrl>${callbackURL}</sdncadapter:CallbackUrl>
+                                       </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData>
+                                               ${nnsRequestInformation}
+                                               ${serviceInformation}
+                               <nbnc-request-information>
+                                                       <service-type>${service}</service-type>
+                                                       <customer-id>${customerId}</customer-id>
+                                                       <interface-status>${interfaceStatus}</interface-status>
+                                                       ${additionalInfo}
+                                               </nbnc-request-information>
+                                       </sdncadapterworkflow:SDNCRequestData>
+                                       <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutValueInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+                       """
+               sdncAdapterL3ToHLRequest = utils.removeXmlPreamble(utils.formatXML(sdncAdapterL3ToHLRequest))
+
+               return sdncAdapterL3ToHLRequest
+       }
+
+
+
+       private void SDNCAdapterActivateRequest(Execution execution, String resultVar, String svcAction,
+                       String svcOperation, String additionalData) {
+                       def utils=new MsoUtils()
+
+                       def prefix = execution.getVariable('prefix')
+                       def request = taskProcessor.getVariable(execution, prefix+'Request')
+                       def requestInformation = utils.getNodeXml(request, 'request-information', false)
+                       def serviceInformation = utils.getNodeXml(request, 'service-information', false)
+                       def serviceParameters = utils.getNodeXml(request, 'service-parameters', false)
+
+                       def requestId = execution.getVariable('testReqId') // for junits
+                       if(requestId==null){
+                               requestId = execution.getVariable("att-mso-request-id") + "-" +  System.currentTimeMillis()
+                       }
+
+                       def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
+                       def msoAction = 'gammainternet'
+
+                       def timeoutInMinutes = execution.getVariable('URN_mso_sdnc_timeout_firewall_minutes')
+
+                       def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+                       if (callbackUrl == null || callbackUrl.trim() == "") {
+                               logError('mso:workflow:sdncadapter:callback URN is not set')
+                               workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
+                       }
+
+                       def internetEvcAccessInformation = utils.getNodeXml(serviceParameters, 'internet-evc-access-information', false)
+                       def vrLan = utils.getNodeXml(serviceParameters, 'vr-lan', false)
+
+                       def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+                       def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
+                       def nnsInternetEvcAccessInformation = utils.removeXmlNamespaces(internetEvcAccessInformation)
+                       def nnsVrLan = utils.removeXmlNamespaces(vrLan)
+
+                       if (additionalData == null) {
+                               additionalData = ""
+                       }
+
+                       String content = """
+                               <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                               <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+                                               <sdncadapter:SvcAction>${svcAction}</sdncadapter:SvcAction>
+                                               <sdncadapter:SvcOperation>${svcOperation}</sdncadapter:SvcOperation>
+                                               <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                               <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
+                                       </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData>
+                                               ${additionalData}
+                                               ${nnsRequestInformation}
+                                               ${nnsServiceInformation}
+                                               ${nnsInternetEvcAccessInformation}
+                                               ${nnsVrLan}
+                                       </sdncadapterworkflow:SDNCRequestData>
+                                               <sdncadapterworkflow:SDNCTimeOutValueInMinutes>${timeoutInMinutes}</sdncadapterworkflow:SDNCTimeOutValueInMinutes>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+                       """
+
+                       content = utils.removeXmlPreamble(utils.formatXML(content))
+                       execution.setVariable(resultVar, content)
+       }
+
+       /**
+        * Builds an SDNC "reserve" request and stores it in the specified execution
+        * variable.
+        * @param execution the execution
+        * @param resultVar the execution variable in which the result will be stored
+        */
+       public void sdncReservePrep(Execution execution, String action, String resultVar) {
+               sdncPrep(execution, resultVar, action , 'service-configuration-operation', null, this.taskProcessor)
+       }
+
+       /**
+        * Builds a basic SDNC request and stores it in the specified execution variable.
+        * @param execution the execution
+        * @param resultVar the execution variable in which the result will be stored
+        * @param svcAction the svcAction element value
+        * @param svcOperation the svcOperation element value
+        * @param additionalData additional XML content to be inserted into the
+        *        RequestData element (may be null)
+        */
+       public void sdncPrep(Execution execution, String resultVar, String svcAction,
+                       String svcOperation, String additionalData, AbstractServiceTaskProcessor taskProcessor) {
+               def method = getClass().getSimpleName() + '.sdncPrep(' +
+                       'execution=' + execution.getId() +
+                       ', resultVar=' + resultVar +
+                       ', svcAction=' + svcAction +
+                       ', svcOperation=' + svcOperation +
+                       ', additionalData=' + (additionalData == null ? "no" : "yes") +
+                       ')'
+
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+               MsoUtils utils = taskProcessor.utils
+               try {
+                       def prefix = execution.getVariable('prefix')
+                       def request = taskProcessor.getVariable(execution, prefix+'Request')
+                       def requestInformation = utils.getNodeXml(request, 'request-information', false)
+                       def serviceInformation = utils.getNodeXml(request, 'service-information', false)
+                       def serviceParameters = utils.getChildNodes(request, 'service-parameters')
+                       def requestAction = utils.getNodeText1(request, 'request-action')
+
+                       def timeoutInMinutes = execution.getVariable('URN_mso_sdnc_timeout_firewall_minutes')
+
+                       def requestId = execution.getVariable('testReqId') // for junits
+                       if(requestId==null){
+                               requestId = execution.getVariable("att-mso-request-id") + "-" +         System.currentTimeMillis()
+                       }
+
+                       def svcInstanceId = execution.getVariable("att-mso-service-instance-id")
+                       def msoAction = 'gammainternet'
+
+                       def callbackUrl = (String) execution.getVariable('URN_mso_workflow_sdncadapter_callback')
+                       if (callbackUrl == null || callbackUrl.trim() == "") {
+                               taskProcessor.logError('mso:workflow:sdncadapter:callback URN is not set')
+                               taskProcessor.workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
+                       }
+
+                       def internetEvcAccessInformation = utils.getNodeXml(request, 'internet-evc-access-information', false)
+                       def vrLan = utils.getNodeXml(request, 'vr-lan', false)
+                       def vnfInformationList = utils.getNodeXml(request, 'vnf-information-list', false)
+
+                       def nnsRequestInformation = utils.removeXmlNamespaces(requestInformation)
+                       def nnsServiceInformation = utils.removeXmlNamespaces(serviceInformation)
+                       def nnsInternetEvcAccessInformation = utils.removeXmlNamespaces(internetEvcAccessInformation)
+                       def nnsVrLan = utils.removeXmlNamespaces(vrLan)
+                       def nnsVnfInformationList = utils.removeXmlNamespaces(vrLan)
+                       def nnsinternetSvcChangeDetails = ""
+
+                       if(requestAction!=null && requestAction.equals("ChangeLayer3ServiceProvRequest")){
+                               def internetSvcChangeDetails = utils.removeXmlNamespaces(serviceParameters)
+                               nnsinternetSvcChangeDetails = """<internet-service-change-details>
+                                                       ${internetSvcChangeDetails}
+                                               </internet-service-change-details>"""
+                       }
+
+                       if (additionalData == null) {
+                               additionalData = ""
+                       }
+
+                       String content = """
+                               <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1">
+                                       <sdncadapter:RequestHeader>
+                                               <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                               <sdncadapter:SvcInstanceId>${svcInstanceId}</sdncadapter:SvcInstanceId>
+                                               <sdncadapter:SvcAction>${svcAction}</sdncadapter:SvcAction>
+                                               <sdncadapter:SvcOperation>${svcOperation}</sdncadapter:SvcOperation>
+                                               <sdncadapter:CallbackUrl>${callbackUrl}</sdncadapter:CallbackUrl>
+                                               <sdncadapter:MsoAction>${msoAction}</sdncadapter:MsoAction>
+                                       </sdncadapter:RequestHeader>
+                                       <sdncadapterworkflow:SDNCRequestData>
+                                               ${additionalData}
+                                               ${nnsRequestInformation}
+                                               ${nnsServiceInformation}
+                                               ${nnsInternetEvcAccessInformation}
+                                               ${nnsVrLan}
+                                               ${nnsVnfInformationList}
+                                               ${nnsinternetSvcChangeDetails}
+                                       </sdncadapterworkflow:SDNCRequestData>
+                               </sdncadapterworkflow:SDNCAdapterWorkflowRequest>
+                       """
+
+                       content = utils.removeXmlPreamble(utils.formatXML(content))
+                       execution.setVariable(resultVar, content)
+                       taskProcessor.logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+
+                       taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       taskProcessor.logError('Caught exception in ' + method, e)
+                       taskProcessor.workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
+               }
+       }
+
+
+
+       /**
+        * Builds a topology SDNC request and return String request.
+        * As V2 will use 1607-style request, region instead of aic clli code
+        * @param execution, the execution
+        * @param requestXML, the incoming request for the flow
+        * @param serviceInstanceId, the serviceIntance (if available)
+        * @param callbackUrl, the call back url
+        * @param action, the action element value
+        * @param requestAction the svcOperation element value
+        * @param cloudRegionId the aai's cloud-region-id
+        * @param additionalData additional XML content to be inserted into the
+        *        RequestData element (may be null)
+        */
+        public String sdncTopologyRequestV2 (Execution execution, String requestXML, String serviceInstanceId, String callbackUrl, String action, String requestAction, String cloudRegionId, networkId, String additionalData) {
+                def utils=new MsoUtils()
+
+                String requestId = ""
+                try {
+                        requestId = execution.getVariable("att-mso-request-id")
+                } catch (Exception ex) {
+                        requestId = utils.getNodeText1(requestXML, "request-id")
+                }
+                
+                String aicCloudRegion = cloudRegionId
+                String tenantId = ""
+                if (utils.nodeExists(requestXML, "tenant-id")) {
+                        tenantId = utils.getNodeText1(requestXML, "tenant-id")
+                }
+                String networkType = ""
+                if (utils.nodeExists(requestXML, "network-type")) {
+                        networkType = utils.getNodeText1(requestXML, "network-type")
+                }       
+                String serviceId = ""
+                if (utils.nodeExists(requestXML, "service-id")) {
+                        serviceId = utils.getNodeText1(requestXML, "service-id")
+                }
+                String networkName = ""
+                if (utils.nodeExists(requestXML, "network-name")) {
+                        networkName = utils.getNodeText1(requestXML, "network-name")
+                }
+                String source = ""
+                if (utils.nodeExists(requestXML, "source")) {
+                        source = utils.getNodeText1(requestXML, "source")
+                }
+
+                // get resourceLink from subflow execution variable
+                String serviceType = ""
+                String subscriberName = ""
+                String siRelatedLink = execution.getVariable("GENGSI_siResourceLink")
+                if (siRelatedLink != null) {
+                        // get service type
+                        int serviceStart = siRelatedLink.indexOf("service-subscription/")
+                        int serviceEnd = siRelatedLink.indexOf("/service-instances/")
+                        serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+                        // get subscriber name
+                        int subscriberNameStart = siRelatedLink.indexOf("customers/customer/")
+                        int subscriberNameEnd = siRelatedLink.indexOf("/service-subscriptions/")
+                    subscriberName = siRelatedLink.substring(subscriberNameStart + 19, subscriberNameEnd)
+                }
+                
+                String content =
+                       """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                 xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                 xmlns:sdncadapter="http://domain2.att.com/workflow/sdnc/adapter/schema/v1"
+                                                 xmlns:ns5="http://ecomp.att.com/mso/request/types/v1">
+                                          <sdncadapter:RequestHeader>
+                                                 <sdncadapter:RequestId>${requestId}</sdncadapter:RequestId>
+                                                 <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+                                                 <sdncadapter:SvcAction>${action}</sdncadapter:SvcAction>
+                                                 <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+                                                 <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+                                          </sdncadapter:RequestHeader>
+                                          <sdncadapterworkflow:SDNCRequestData>
+                                             <request-information>
+                                                   <request-id>${requestId}</request-id>
+                                                   <request-action>${requestAction}</request-action>
+                                                   <source>${source}</source>
+                                                   <notification-url></notification-url>
+                                                   <order-number></order-number>
+                                                   <order-version></order-version>
+                                                </request-information>
+                                                <service-information>
+                                                   <service-id>${serviceId}</service-id>
+                                                               <service-type>${serviceType}</service-type>
+                                                   <service-instance-id>${serviceInstanceId}</service-instance-id>
+                                                   <subscriber-name>${subscriberName}</subscriber-name>
+                                                </service-information>
+                                                <network-request-information>
+                                                   <network-id>${networkId}</network-id>
+                                                   <network-type>${networkType}</network-type>
+                                                   <network-name>${networkName}</network-name>
+                                                   <tenant>${tenantId}</tenant>
+                                                   <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>
+                                                </network-request-information>
+                                          </sdncadapterworkflow:SDNCRequestData>
+                                  </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
+                       return content
+        }
+
+       /**
+        * Validates a workflow response.
+        * @param execution the execution
+        * @param responseVar the execution variable in which the response is stored
+        * @param responseCodeVar the execution variable in which the response code is stored
+        * @param errorResponseVar the execution variable in which the error response is stored
+        */
+
+       public void validateSDNCResponseOld(Execution execution, String responseVar,
+                       String responseCodeVar, String errorResponseVar) {
+               def method = getClass().getSimpleName() + '.validateWorkflowResponse(' +
+                       'execution=' + execution.getId() +
+                       ', responseVar=' + responseVar +
+                       ', responseCodeVar=' + responseCodeVar +
+                       ', errorResponseVar=' + errorResponseVar +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def prefix = execution.getVariable('prefix')
+                       execution.setVariable(prefix+'sdncResponseSuccess', false)
+                       def response = execution.getVariable(responseVar)
+                       taskProcessor.logDebug(responseVar + ' = ' +
+                               (response == null ? "" : System.lineSeparator()) +
+                               response, isDebugLogEnabled)
+
+                       def responseCode = execution.getVariable(responseCodeVar)
+                       taskProcessor.logDebug(responseCodeVar + ' = ' + responseCode, isDebugLogEnabled)
+
+                       def errorResponse = execution.getVariable(errorResponseVar)
+
+                       errorResponse = taskProcessor.utils.getNodeText1(errorResponse,"ErrorMessage")
+                       if (errorResponse == null) errorResponse = errorResponse
+
+                       taskProcessor.logDebug(errorResponseVar + ' = ' +
+                               (errorResponse == null ? "" : System.lineSeparator()) +
+                               errorResponse, isDebugLogEnabled)
+
+                       if ("200".equals(String.valueOf(responseCode)) || "201".equals(String.valueOf(responseCode))) {
+
+                               // we need to peer into the request data for error
+                               def String callbackRequestData = taskProcessor.utils.getNodeXml(response, 'RequestData', false)
+                               def String decodedXml = decodeXML(callbackRequestData)
+                               taskProcessor.utils.log("DEBUG","decodedXml:\n" + decodedXml, isDebugLogEnabled)
+
+                               def int requestDataResponseCode = 200
+                               def String requestDataResponseMessage = ''
+
+                               if (taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
+                                       try{
+                                       requestDataResponseCode  = ((String) taskProcessor.utils.getNodeText(decodedXml, "response-code")).toInteger()
+                                       }catch(Exception e){
+                                       //TODO proper handling of new, non numerical response codes in 1607 and new error handling for common API
+                                               requestDataResponseCode = 500
+                                       }
+                                       if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
+                                               requestDataResponseMessage  = taskProcessor.utils.getNodeText(decodedXml, "response-message")
+                                       }
+                               }
+
+                               taskProcessor.utils.log("DEBUG", "SDNC callback response-code: " + requestDataResponseCode, isDebugLogEnabled)
+                               taskProcessor.utils.log("DEBUG", "SDNC callback response-message: " + requestDataResponseMessage, isDebugLogEnabled)
+
+                               // if response-code is not Success (200, 201, etc) we need to throw an exception
+                               if (requestDataResponseCode < 200 || requestDataResponseCode > 299) {
+                                       ExceptionUtil exceptionUtil = new ExceptionUtil()
+                                       def convertedCode = exceptionUtil.MapSDNCResponseCodeToErrorCode(requestDataResponseCode.toString())
+                                       taskProcessor.workflowException(execution, "Received error from SDN-C: " + requestDataResponseMessage, convertedCode)
+
+                               }
+                       }
+                       else {
+                               taskProcessor.logWarn('Expected response code 200 or 201 in ' + responseCodeVar + ', got \'' + responseCode + '\'')
+                               taskProcessor.workflowException(execution, errorResponse, responseCode)
+                       }
+
+                       if (response == null || response.trim().equals("")) {
+                               taskProcessor.logWarn(responseVar + ' is empty');
+                               taskProcessor.workflowException(execution, errorResponse, responseCode)
+                       }
+
+                       execution.setVariable(prefix+'sdncResponseSuccess', true)
+                       taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       taskProcessor.logError('Caught exception in ' + method, e)
+                       taskProcessor.workflowException(execution, 'Internal Error- Unable to validate SDNC Response ' + e.getMessage(), 500)
+               }
+       }
+                       /**
+                        * Validates a workflow response.
+                        * @param execution the execution
+                        * @param responseVar the execution variable in which the response is stored
+                        * @param workflowException the WorkflowException Object returned from sdnc call
+                        */
+       public void validateSDNCResponse(Execution execution, String response, WorkflowException workflowException, boolean successIndicator){
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.utils.log("DEBUG", "SDNC Response is: " + response, isDebugLogEnabled)
+               taskProcessor.utils.log("DEBUG", "SuccessIndicator is: " + successIndicator, isDebugLogEnabled)
+
+               try {
+                       def prefix = execution.getVariable('prefix')
+                       execution.setVariable(prefix+'sdncResponseSuccess', false)
+                       taskProcessor.utils.log("DEBUG", "Response" + ' = ' + (response == null ? "" : System.lineSeparator()) + response, isDebugLogEnabled)
+
+                       if (successIndicator == true){
+                               if (response == null || response.trim().equals("")) {
+                                       taskProcessor.utils.log("DEBUG", response + ' is empty');
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "SDNCAdapter Workflow Response is Empty")
+                               }else{
+
+                                       // we need to peer into the request data for error
+                                       def String sdncAdapterWorkflowResponse = taskProcessor.utils.getNodeXml(response, 'response-data', false)
+                                       def String decodedXml = decodeXML(sdncAdapterWorkflowResponse).replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+
+                                       // change '&' to "&amp; (if present as data, ex: subscriber-name = 'FOUR SEASONS HEATING & COOLING_8310006378683'
+                                       decodedXml = decodedXml.replace("&", "&amp;")
+
+                                       taskProcessor.utils.log("DEBUG","decodedXml:\n" + decodedXml, isDebugLogEnabled)
+
+                                       int requestDataResponseCode = 200
+                                       def String requestDataResponseMessage = ''
+
+                                       try{
+                                               if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
+                                                       requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "response-message")
+                                               } else if (taskProcessor.utils.nodeExists(decodedXml, "ResponseMessage")) {
+                                                       requestDataResponseMessage = taskProcessor.utils.getNodeText(decodedXml, "ResponseMessage")
+                                               }
+                                       }catch(Exception e){
+                                               taskProcessor.utils.log("DEBUG", 'Error caught while decoding resposne ' + e.getMessage(), isDebugLogEnabled)
+                                       }
+
+                                       if(taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
+                                               taskProcessor.utils.log("DEBUG","response-code node Exist ", isDebugLogEnabled)
+                                               String code = taskProcessor.utils.getNodeText1(decodedXml, "response-code")
+                                               if(code.isEmpty() || code.equals("")){
+                                                       // if response-code is blank then Success
+                                                       taskProcessor.utils.log("DEBUG","response-code node is empty", isDebugLogEnabled)
+                                                       requestDataResponseCode = 0
+                                               }else{
+                                                       requestDataResponseCode  = code.toInteger()
+                                                       taskProcessor.utils.log("DEBUG","response-code is: " + requestDataResponseCode, isDebugLogEnabled)
+                                               }
+                                       }else if(taskProcessor.utils.nodeExists(decodedXml, "ResponseCode")){
+                                               taskProcessor.utils.log("DEBUG","ResponseCode node Exist ", isDebugLogEnabled)
+                                               String code = taskProcessor.utils.getNodeText1(decodedXml, "ResponseCode")
+                                               if(code.isEmpty() || code.equals("")){
+                                                       // if ResponseCode blank then Success
+                                                       taskProcessor.utils.log("DEBUG","ResponseCode node is empty", isDebugLogEnabled)
+                                                       requestDataResponseCode = 0
+                                               }else{
+                                                       requestDataResponseCode  = code.toInteger()
+                                                       taskProcessor.utils.log("DEBUG","ResponseCode is: " + requestDataResponseCode, isDebugLogEnabled)
+                                               }
+                                       }else{
+                                               taskProcessor.utils.log("DEBUG","A Response Code DOES NOT Exist.", isDebugLogEnabled)
+                                               // if a response code does not exist then Success
+                                               requestDataResponseCode = 0
+                                       }
+                                       try{
+
+                                               // if a response code is 0 or 200 then Success
+                                               if (requestDataResponseCode == 200 || requestDataResponseCode == 0) {
+                                                       execution.setVariable(prefix+'sdncResponseSuccess', true)
+                                                       taskProcessor.utils.log("DEBUG", "Setting sdncResponseSuccess to True ", isDebugLogEnabled)
+                                                       taskProcessor.utils.log("DEBUG", "Exited ValidateSDNCResponse Method", isDebugLogEnabled)
+                                               }else{
+                                                       ExceptionUtil exceptionUtil = new ExceptionUtil()
+                                                       String convertedCode = exceptionUtil.MapSDNCResponseCodeToErrorCode(requestDataResponseCode.toString())
+                                                       int convertedCodeInt = Integer.parseInt(convertedCode)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, convertedCodeInt, "Received error from SDN-C: " + requestDataResponseMessage)
+                                               }
+
+                                       }catch(Exception e){
+                                               //TODO proper handling of new, non numerical response codes in 1607 and new error handling for common API
+                                               requestDataResponseCode = 500
+                                       }
+
+                                       taskProcessor.utils.log("DEBUG", "SDNC callback response-code: " + requestDataResponseCode, isDebugLogEnabled)
+                                       taskProcessor.utils.log("DEBUG", "SDNC callback response-message: " + requestDataResponseMessage, isDebugLogEnabled)
+                               }
+
+                       }else {
+                               taskProcessor.utils.log("DEBUG", 'SDNCAdapter Subflow did NOT complete Successfully.  SuccessIndicator is False. ')
+                               if(workflowException != null){
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
+                               }else{
+                                       //TODO : what error code and error message use here
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - SDNCAdapter Subflow did NOT complete successfully.")
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       taskProcessor.utils.log("DEBUG", 'END of Validate SDNC Response', isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, 'Internal Error- Unable to validate SDNC Response ');
+               }
+       }
+
+       /**
+                        * Validates a workflow response.
+                        * @param execution the execution
+                        * @param responseVar the execution variable in which the response is stored
+                        * @param responseCodeVar the execution variable in which the response code is stored
+                        * @param errorResponseVar the execution variable in which the error response is stored
+                        */
+                       public void validateL3BondingSDNCResp(Execution execution, String response, WorkflowException workflowException, boolean success) {
+                               def method = getClass().getSimpleName() + '.validateL3BondingSDNCResp(' +
+                                       'execution=' + execution.getId() +
+                                       ', response=' + response +
+                                       ')'
+                               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+                               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+                               def prefix = execution.getVariable('prefix')
+                               CommonExceptionUtil commonExceptionUtil = new CommonExceptionUtil()
+
+                               try {
+                                       execution.setVariable(prefix+'sdncResponseSuccess', false)
+
+                                       taskProcessor.utils.log("sdncAdapter Success Indicator is: " + success, isDebugLogEnabled)
+                                       if (success == true) {
+
+                                               // we need to look inside the request data for error
+                                               def String callbackRequestData = taskProcessor.utils.getNodeXml(response, 'RequestData', false)
+                                               def String decodedXml = decodeXML(callbackRequestData)
+                                               taskProcessor.utils.log("DEBUG","decodedXml:\n" + decodedXml, isDebugLogEnabled)
+
+                                               def requestDataResponseCode = '200'
+                                               def requestDataResponseMessage = ''
+                                               int intDataResponseCode = 200
+
+                                               if (taskProcessor.utils.nodeExists(decodedXml, "response-code")) {
+
+                                                       requestDataResponseCode  = ((String) taskProcessor.utils.getNodeText(decodedXml, "response-code"))
+                                                       if (taskProcessor.utils.nodeExists(decodedXml, "response-message")) {
+                                                               requestDataResponseMessage  = taskProcessor.utils.getNodeText(decodedXml, "response-message")
+                                                       }
+                                               }else if(taskProcessor.utils.nodeExists(decodedXml, "ResponseCode")){
+                                                       requestDataResponseCode  = ((String) taskProcessor.utils.getNodeText1(decodedXml, "ResponseCode")).toInteger()
+                                               }else if(taskProcessor.utils.nodeExists(response, "ResponseCode")){
+                                                       requestDataResponseCode  = ((String) taskProcessor.utils.getNodeText1(response, "ResponseCode")).toInteger()
+                                                       requestDataResponseMessage  = taskProcessor.utils.getNodeText(response, "ResponseMessage")
+                                               }
+
+                                               taskProcessor.utils.log("DEBUG", "SDNC callback response-code: " + requestDataResponseCode, isDebugLogEnabled)
+                                               taskProcessor.utils.log("DEBUG", "SDNC callback response-message: " + requestDataResponseMessage, isDebugLogEnabled)
+
+                                               // Get the AAI Status to determine if rollback is needed on ASSIGN
+                                               def aai_status = ''
+                                               if (taskProcessor.utils.nodeExists(decodedXml, "aai-status")) {
+                                                       aai_status = ((String) taskProcessor.utils.getNodeText(decodedXml, "aai-status"))
+                                                       taskProcessor.utils.log("DEBUG", "SDNC sent AAI STATUS code: " + aai_status, isDebugLogEnabled)
+                                               }
+                                               if (aai_status != null && !aai_status.equals("")) {
+                                                       execution.setVariable(prefix+"AaiStatus",aai_status)
+                                                       taskProcessor.utils.log("DEBUG", "Set variable " + prefix + "AaiStatus: " + execution.getVariable(prefix+"AaiStatus"), isDebugLogEnabled)
+                                               }
+
+                                               // Get the result string to determine if rollback is needed on ASSIGN in Add Bonding flow only
+                                               def sdncResult = ''
+                                               if (taskProcessor.utils.nodeExists(decodedXml, "result")) {
+                                                       sdncResult = ((String) taskProcessor.utils.getNodeText(decodedXml, "result"))
+                                                       taskProcessor.utils.log("DEBUG", "SDNC sent result: " + sdncResult, isDebugLogEnabled)
+                                               }
+                                               if (sdncResult != null && !sdncResult.equals("")) {
+                                                       execution.setVariable(prefix+"SdncResult",sdncResult)
+                                                       taskProcessor.utils.log("DEBUG", "Set variable " + prefix + "SdncResult: " + execution.getVariable(prefix+"SdncResult"), isDebugLogEnabled)
+                                               }
+
+                                               try{
+                                                       intDataResponseCode = Integer.parseInt(String.valueOf(requestDataResponseCode))
+                                               }catch(Exception e){
+                                                       intDataResponseCode = 400
+                                               }
+
+                                               taskProcessor.utils.log("DEBUG", "intDataResponseCode " + intDataResponseCode , isDebugLogEnabled)
+
+                                               // if response-code is not Success (200, 201, etc) we need to throw an exception
+                                               if (intDataResponseCode != 200 &&  intDataResponseCode != 0) {
+                                                       execution.setVariable(prefix+'ResponseCode', intDataResponseCode)
+                                                       execution.setVariable("L3HLAB_rollback", true)
+                                                       def msg = commonExceptionUtil.mapSDNCAdapterExceptionToErrorResponse(response, execution)
+                                                       taskProcessor.commonWorkflowException(execution, intDataResponseCode, "Received error from SDN-C: " + msg)
+
+                                               }
+                                       }else {
+                                               taskProcessor.logWarn('sdncAdapter did not complete successfully, sdncAdapter Success Indicator was false ')
+                                               execution.setVariable("L3HLAB_rollback", true)
+                                               def msg = commonExceptionUtil.mapSDNCAdapterExceptionToErrorResponse(response, execution)
+                                               taskProcessor.commonWorkflowException(execution, responseCode, msg)
+                                       }
+
+                                       if (response == null || response.trim().equals("")) {
+                                               taskProcessor.logWarn('sdncAdapter workflow response is empty');
+                                               execution.setVariable("L3HLAB_rollback", true)
+                                               def msg = commonExceptionUtil.buildException("Exception occurred while validating SDNC response " , execution)
+                                               taskProcessor.commonWorkflowException(execution, intResponseCode, msg)
+                                       }
+
+                                       execution.setVariable(prefix+'sdncResponseSuccess', true)
+                                       taskProcessor.logDebug('Exited ' + method, isDebugLogEnabled)
+                               } catch (BpmnError e) {
+                                       throw e;
+                               } catch (Exception e) {
+                                       taskProcessor.logError('Caught exception in ' + method, e)
+                                       execution.setVariable(prefix+"ResponseCode",400)
+                                       execution.setVariable("L3HLAB_rollback", true)
+                                       def msg = commonExceptionUtil.buildException("Exception occurred while validating SDNC response: " + e.getMessage(), execution)
+                                       taskProcessor.commonWorkflowException(execution, 400, msg)
+                               }
+                       }
+
+       /**
+        * Decode XML - replace &amp; &lt; and &gt; with '&', '<' and '>'
+        * @param xml - the xml to be decoded
+        */
+       private String decodeXML(String xml) {
+               def String decodedXml = xml.replaceAll("&amp;", "&")
+               decodedXml = decodedXml.replaceAll("&lt;", "<")
+               decodedXml = decodedXml.replaceAll("&gt;", ">")
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/ServiceTaskProcessor.groovy
new file mode 100644 (file)
index 0000000..27699ca
--- /dev/null
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import org.camunda.bpm.engine.runtime.Execution
+
+
+/**
+ * @version 1.0
+ *
+ */
+public interface ServiceTaskProcessor {
+         public void preProcessRequest(Execution execution);
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIGenericVnf.groovy
new file mode 100644 (file)
index 0000000..16edaf1
--- /dev/null
@@ -0,0 +1,330 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.springframework.web.util.UriUtils
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
+
+       private XmlParser xmlParser = new XmlParser()
+
+       /**
+        * Initialize the flow's variables.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable('prefix', 'UAAIGenVnf_')
+               execution.setVariable('UAAIGenVnf_vnfId', null)
+               execution.setVariable('UAAIGenVnf_personaModelId', null)
+               execution.setVariable('UAAIGenVnf_personaModelVersion', null)
+               execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode' ,null)
+               execution.setVariable('UAAIGenVnf_getGenericVnfResponse', '')
+               execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', null)
+               execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', '')
+       }
+
+       /**
+        * Check for missing elements in the received request.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def xml = execution.getVariable('UpdateAAIGenericVnfRequest')
+                       logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+                       initProcessVariables(execution)
+
+                       def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
+                       execution.setVariable('UAAIGenVnf_vnfId', vnfId)
+
+                       def personaModelId = getRequiredNodeText(execution, xml,'persona-model-id')
+                       execution.setVariable('UAAIGenVnf_personaModelId', personaModelId)
+                       
+                       def personaModelVersion = getRequiredNodeText(execution, xml,'persona-model-version')
+                       execution.setVariable('UAAIGenVnf_personaModelVersion', personaModelVersion)
+                       
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Using the received vnfId, query AAI to get the corresponding Generic VNF.
+        * A 200 response is expected with the VF Module in the response body.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void getGenericVnf(Execution execution) {
+               def method = getClass().getSimpleName() + '.getGenericVnf(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('UAAIGenVnf_vnfId')
+
+                       // Construct endpoint
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8")
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       try {
+                               RESTConfig config = new RESTConfig(endPoint);
+                               def responseData = ''
+                               def aaiRequestId = UUID.randomUUID().toString()
+                               RESTClient client = new RESTClient(config).
+                                       addHeader('X-TransactionId', aaiRequestId).
+                                       addHeader('X-FromAppId', 'MSO').
+                                       addHeader('Content-Type', 'application/xml').
+                                       addHeader('Accept','application/xml');
+                               if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                       client.addAuthorizationHeader(basicAuthCred)
+                               }
+
+                               logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+                               APIResponse response = client.httpGet()
+
+                               responseData = response.getResponseBodyAsString()
+                               execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode', response.getStatusCode())
+                               execution.setVariable('UAAIGenVnf_getGenericVnfResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+                               execution.setVariable('UAAIGenVnf_getGenericVnfResponseCode', 500)
+                               execution.setVariable('UAAIGenVnf_getGenericVnfResponse', 'AAI GET Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in getGenericVnf(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Construct and send a PUT request to AAI to update the Generic VNF.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void updateGenericVnf(Execution execution) {
+               def method = getClass().getSimpleName() + '.updateGenericVnf(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('UAAIGenVnf_vnfId')
+                       def genericVnf = execution.getVariable('UAAIGenVnf_getGenericVnfResponse')
+                       def origRequest = execution.getVariable('UpdateAAIGenericVnfRequest')
+                       
+                       // Confirm resource-version is in retrieved Generic VNF
+                       def Node genericVnfNode = xmlParser.parseText(genericVnf)
+                       if (utils.getChildNode(genericVnfNode, 'resource-version') == null) {
+                               def msg = 'Can\'t update Generic VNF ' + vnfId + ' since \'resource-version\' is missing'
+                               logError(msg)
+                               throw new Exception(msg)
+                       }
+                       
+                       // Handle persona-model-id/persona-model-version
+                       def String newPersonaModelId = execution.getVariable('UAAIGenVnf_personaModelId')
+                       def String newPersonaModelVersion = execution.getVariable('UAAIGenVnf_personaModelVersion')
+                       
+                       // Confirm "new" persona-model-id is same as "current" persona-model-id
+                       def Node currPersonaModelIdNode = utils.getChildNode(genericVnfNode, 'persona-model-id')
+                       def String currPersonaModelId = ''
+                       if (currPersonaModelIdNode != null) {
+                               currPersonaModelId = currPersonaModelIdNode.text()
+                       }
+                       if (!newPersonaModelId.equals(currPersonaModelId)) {
+                               def msg = 'Can\'t update Generic VNF ' + vnfId + ' since there is \'persona-model-id\' mismatch between the current and new values'
+                               logError(msg)
+                               throw new Exception(msg)
+                       }
+                       
+                       // Construct payload
+                       updateGenericVnfNode(origRequest, genericVnfNode, 'persona-model-version')
+                       def payload = utils.nodeToString(genericVnfNode)
+
+                       // Construct endpoint
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8")
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       try {
+                               RESTConfig config = new RESTConfig(endPoint);
+                               def responseData = ''
+                               def aaiRequestId = UUID.randomUUID().toString()
+                               RESTClient client = new RESTClient(config).
+                                       addHeader('X-TransactionId', aaiRequestId).
+                                       addHeader('X-FromAppId', 'MSO').
+                                       addHeader('Content-Type', 'application/xml').
+                                       addHeader('Accept','application/xml');
+                               if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                       client.addAuthorizationHeader(basicAuthCred)
+                               }
+
+                               logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
+                               APIResponse response = client.httpPut(payload)
+
+                               responseData = response.getResponseBodyAsString()
+                               execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', response.getStatusCode())
+                               execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(),isDebugLogEnabled)
+                               execution.setVariable('UAAIGenVnf_updateGenericVnfResponseCode', 500)
+                               execution.setVariable('UAAIGenVnf_updateGenericVnfResponse', 'AAI PUT Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in updateGenericVnf(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Insert a new Node, replace the value of an existing Node, or delete an existing Node in the current
+        * Generic VNF Node, as necessary.
+        *
+        * If the Node with the same name already exists in current Generic VNF, but is not being updated, then do
+        * nothing. If the element is being updated and it already exists in the current Generic VNF, then check
+        * the value specified in the original request. If the value is 'DELETE', remove that Node from the
+        * current Generic VNF.  Otherwise, change the value to the specified new value. If the element is
+        * being updated but doesn't exist in the current Generic VNF, and the new value is not 'DELETE', then
+        * create an appropriate new node and add it to the Generic VNF.
+        *
+        * @param origRequest Incoming update request with Generic VNF element(s) to be updated.
+        * @param genericVnf Current Generic VNF retrieved from AAI.
+        * @param element Name of element to be inserted.
+        */
+       public void updateGenericVnfNode(String origRequest, Node genericVnfNode, String elementName) {
+
+               if (!utils.nodeExists(origRequest, elementName)) {
+                       return
+               }
+               def elementValue = utils.getNodeText(origRequest, elementName)
+
+               def Node childNode = utils.getChildNode(genericVnfNode, elementName)
+               if (childNode == null) {
+                       if (elementValue.equals('DELETE')) {
+                               // Element doesn't exist but is being deleted, so do nothing
+                               return
+                       }
+                       // Node doesn't exist, create a new Node as a child
+                       new Node(genericVnfNode, elementName, elementValue)
+               } else {
+                       if (elementValue.equals('DELETE')) {
+                               // Node exists, but should be deleted
+                               genericVnfNode.remove(childNode)
+                       } else {
+                               // Node already exists, just give it a new value
+                               childNode.setValue(elementValue)
+                       }
+               }
+       }
+
+       /**
+        * Generates a WorkflowException if the AAI query returns a response code other than 200.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void handleAAIQueryFailure(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logError('Error occurred attempting to query AAI, Response Code ' +
+                       execution.getVariable('UAAIGenVnf_getGenericVnfResponseCode') + ', Error Response ' +
+                       execution.getVariable('UAAIGenVnf_getGenericVnfResponse'))
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable('UAAIGenVnf_getGenericVnfResponse'))
+               execution.setVariable('WorkflowException', exception)
+
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+
+       /**
+        * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void handleUpdateGenericVnfFailure(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleUpdateGenericVnfFailure(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logError('Error occurred attempting to update Generic VNF in AAI, Response Code ' +
+                       execution.getVariable('UAAIGenVnf_updateGenericVnfResponseCode') + ', Error Response ' +
+                       execution.getVariable('UAAIGenVnf_updateGenericVnfResponse'))
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable('UAAIGenVnf_updateGenericVnfResponse'))
+               execution.setVariable('WorkflowException', exception)
+
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateAAIVfModule.groovy
new file mode 100644 (file)
index 0000000..b8b8b8b
--- /dev/null
@@ -0,0 +1,416 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.springframework.web.util.UriUtils
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class UpdateAAIVfModule extends AbstractServiceTaskProcessor {
+
+       private XmlParser xmlParser = new XmlParser()
+
+       /**
+        * Initialize the flow's variables.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable('prefix', 'UAAIVfMod_')
+               execution.setVariable('UAAIVfMod_vnfId', null)
+               execution.setVariable('UAAIVfMod_vfModuleId', null)
+               execution.setVariable('UAAIVfMod_orchestrationStatus', null)
+               execution.setVariable('UAAIVfMod_heatStackId', null)
+               execution.setVariable('UAAIVfMod_volumeGroupId', null)
+               execution.setVariable('UAAIVfMod_getVfModuleResponseCode' ,null)
+               execution.setVariable('UAAIVfMod_getVfModuleResponse', '')
+               execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', null)
+               execution.setVariable('UAAIVfMod_updateVfModuleResponse', '')
+       }
+
+       /**
+        * Check for missing elements in the received request.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def xml = execution.getVariable('UpdateAAIVfModuleRequest')
+                       logDebug('Received request xml:\n' + xml, isDebugLogEnabled)
+                       initProcessVariables(execution)
+
+                       def vnfId = getRequiredNodeText(execution, xml,'vnf-id')
+                       execution.setVariable('UAAIVfMod_vnfId', vnfId)
+
+                       def vfModuleId = getRequiredNodeText(execution, xml,'vf-module-id')
+                       execution.setVariable('UAAIVfMod_vfModuleId', vfModuleId)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Using the received vnfId and vfModuleId, query AAI to get the corresponding VF Module.
+        * A 200 response is expected with the VF Module in the response body.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void getVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.getVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('UAAIVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('UAAIVfMod_vfModuleId')
+
+                       // Construct endpoint
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + UriUtils.encode(vfModuleId, "UTF-8")
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       try {
+                               RESTConfig config = new RESTConfig(endPoint);
+                               def responseData = ''
+                               def aaiRequestId = UUID.randomUUID().toString()
+                               RESTClient client = new RESTClient(config).
+                                       addHeader('X-TransactionId', aaiRequestId).
+                                       addHeader('X-FromAppId', 'MSO').
+                                       addHeader('Content-Type', 'application/xml').
+                                       addHeader('Accept','application/xml');
+                               if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                       client.addAuthorizationHeader(basicAuthCred)
+                               }
+
+                               logDebug('sending GET to AAI endpoint \'' + endPoint + '\'', isDebugLogEnabled)
+                               APIResponse response = client.httpGet()
+
+                               responseData = response.getResponseBodyAsString()
+                               execution.setVariable('UAAIVfMod_getVfModuleResponseCode', response.getStatusCode())
+                               execution.setVariable('UAAIVfMod_getVfModuleResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI GET:' + ex.getMessage(),isDebugLogEnabled)
+                               execution.setVariable('UAAIVfMod_getVfModuleResponseCode', 500)
+                               execution.setVariable('UAAIVfMod_getVfModuleResponse', 'AAI GET Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in getVfModule(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Construct and send a PUT request to AAI to update the VF Module.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void updateVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.updateVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def vnfId = execution.getVariable('UAAIVfMod_vnfId')
+                       def vfModuleId = execution.getVariable('UAAIVfMod_vfModuleId')
+                       def vfModule = execution.getVariable('UAAIVfMod_getVfModuleResponse')
+                       def origRequest = execution.getVariable('UpdateAAIVfModuleRequest')
+                       def Node vfModuleNode = xmlParser.parseText(vfModule)
+                       
+                       // Confirm resource-version is in retrieved VF Module
+                       if (utils.getChildNode(vfModuleNode, 'resource-version') == null) {
+                               def msg = 'Can\'t update VF Module ' + vfModuleId + ' since \'resource-version\' is missing'
+                               logError(msg)
+                               throw new Exception(msg)
+                       }
+                       
+                       // TEMPORARY!!! Disable Volume Group Check
+                       // Check volume-group-id conditions
+                       //def checkVgiResult = checkVolumeGroupId(origRequest, vfModuleNode, isDebugLogEnabled)
+                       //if (checkVgiResult != null) {
+                       //      def msg = 'Can\'t update VF Module ' + vfModuleId + ': ' + checkVgiResult
+                       //      logError(msg)
+                       //      throw new Exception(msg)
+                       //}
+                       
+                       // Handle persona-model-id/persona-model-version
+                       def boolean doPersonaModelVersion = true
+                       def String newPersonaModelId = utils.getNodeText1(origRequest, 'persona-model-id')
+                       def String newPersonaModelVersion = utils.getNodeText1(origRequest, 'persona-model-version')
+                       if ((newPersonaModelId == null) || (newPersonaModelVersion == null)) {
+                               doPersonaModelVersion = false
+                       } else {
+                               // Confirm "new" persona-model-id is same as "current" persona-model-id
+                               def String currPersonaModelId = utils.getChildNodeText(vfModuleNode, 'persona-model-id')
+                               if (currPersonaModelId == null) {
+                                       currPersonaModelId = ''
+                               }
+                               if (!newPersonaModelId.equals(currPersonaModelId)) {
+                                       def msg = 'Can\'t update VF Module ' + vfModuleId + ' since there is \'persona-model-id\' mismatch between the current and new values'
+                                       logError(msg)
+                                       throw new Exception(msg)
+                               }
+                       }
+                       
+                       // Construct payload
+                       updateVfModuleNode(origRequest, vfModuleNode, 'orchestration-status')
+                       updateVfModuleNode(origRequest, vfModuleNode, 'heat-stack-id')
+                       if (doPersonaModelVersion) {
+                               updateVfModuleNode(origRequest, vfModuleNode, 'persona-model-version')
+                       }
+                       updateVfModuleNode(origRequest, vfModuleNode, 'contrail-service-instance-fqdn')
+                       def payload = utils.nodeToString(vfModuleNode)
+
+                       // Construct endpoint
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       def aai_uri = aaiUriUtil.getNetworkGenericVnfUri(execution)
+                       logDebug('AAI URI is: ' + aai_uri, isDebugLogEnabled)
+                       String endPoint = execution.getVariable('URN_aai_endpoint') + aai_uri + '/' + UriUtils.encode(vnfId, "UTF-8") + '/vf-modules/vf-module/' + UriUtils.encode(vfModuleId, "UTF-8")
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       try {
+                               RESTConfig config = new RESTConfig(endPoint);
+                               def responseData = ''
+                               def aaiRequestId = UUID.randomUUID().toString()
+                               RESTClient client = new RESTClient(config).
+                                       addHeader('X-TransactionId', aaiRequestId).
+                                       addHeader('X-FromAppId', 'MSO').
+                                       addHeader('Content-Type', 'application/xml').
+                                       addHeader('Accept','application/xml');
+                               if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                       client.addAuthorizationHeader(basicAuthCred)
+                               }
+
+                               logDebug('sending PUT to AAI endpoint \'' + endPoint + '\'' + 'with payload \n' + payload, isDebugLogEnabled)
+                               APIResponse response = client.httpPut(payload)
+
+                               responseData = response.getResponseBodyAsString()
+                               execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', response.getStatusCode())
+                               execution.setVariable('UAAIVfMod_updateVfModuleResponse', responseData)
+                               logDebug('Response code:' + response.getStatusCode(), isDebugLogEnabled)
+                               logDebug('Response:' + System.lineSeparator() + responseData, isDebugLogEnabled)
+                       } catch (Exception ex) {
+                               ex.printStackTrace()
+                               logDebug('Exception occurred while executing AAI PUT:' + ex.getMessage(),isDebugLogEnabled)
+                               execution.setVariable('UAAIVfMod_updateVfModuleResponseCode', 500)
+                               execution.setVariable('UAAIVfMod_updateVfModuleResponse', 'AAI PUT Failed:' + ex.getMessage())
+                       }
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in updateVfModule(): ' + e.getMessage())
+               }
+       }
+
+       /**
+        * Insert a new Node, replace the value of an existing Node, or delete an existing Node in the current
+        * VF Module Node, as necessary.
+        *
+        * If the Node with the same name already exists in current VF Module, but is not being updated, then do
+        * nothing. If the element is being updated and it already exists in the current VF Module, then check
+        * the value specified in the original request. If the value is 'DELETE', remove that Node from the
+        * current VF Module.  Otherwise, change the value to the specified new value. If the element is
+        * being updated but doesn't exist in the current VF Module, and the new value is not 'DELETE', then
+        * create an appropriate new node and add it to the VF Module.
+        *
+        * @param origRequest Incoming update request with VF Module elements to be updated.
+        * @param vfModule Current VF Module retrieved from AAI.
+        * @param element Name of element to be inserted.
+        */
+       private void updateVfModuleNode(String origRequest, Node vfModuleNode, String elementName) {
+
+               if (!utils.nodeExists(origRequest, elementName)) {
+                       return
+               }
+               def elementValue = utils.getNodeText(origRequest, elementName)
+
+               def Node childNode = utils.getChildNode(vfModuleNode, elementName)
+               if (childNode == null) {
+                       if (elementValue.equals('DELETE')) {
+                               // Element doesn't exist but is being deleted, so do nothing
+                               return
+                       }
+                       // Node doesn't exist, create a new Node as a child
+                       new Node(vfModuleNode, elementName, elementValue)
+               } else {
+                       if (elementValue.equals('DELETE')) {
+                               // Node exists, but should be deleted
+                               vfModuleNode.remove(childNode)
+                       } else {
+                               // Node already exists, just give it a new value
+                               childNode.setValue(elementValue)
+                       }
+               }
+       }
+       
+       /**
+        * Check the Volume Group ID from the incoming update request against the Volume Group ID from the
+        * given VF Module.  If they are equal or if they are both 'null', then that is acceptable and 'null'
+        * is returned.  Otherwise a message describing how the values are unacceptable/incompatible is returned.
+        * 
+        * @param origRequest Incoming update request with VF Module elements to be updated.
+        * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
+        * @param isDebugLogEnabled Is DEBUG log enabled?
+        * @return 'null' if the Volume Group IDs are acceptable. Otherwise return a message describing how the
+        * values are unacceptable/incompatible.
+        */
+       private String checkVolumeGroupId(String origRequest, Node vfModuleNode, String isDebugLogEnabled) {
+               def requestVolumeGroupId = utils.getNodeText1(origRequest, 'volume-group-id')
+               def currVolumeGroupId = getCurrVolumeGroupId(vfModuleNode)
+               
+               logDebug('Check volume-group-id: volume-group-id in original request is \'' + requestVolumeGroupId +
+                       '\', volume-group-id from VF Module is \'' + currVolumeGroupId + '\'', isDebugLogEnabled)
+               
+               def result = null
+               
+               if (requestVolumeGroupId == null) {
+                       if (currVolumeGroupId == null) {
+                               // This is OK
+                       } else {
+                               result = 'Cannot detach a volume group from an existing VF Module'
+                       }
+               } else {
+                       if (currVolumeGroupId == null) {
+                               result = 'Cannot add a volume gruop to an existing VF Module'
+                       } else {
+                               if (!requestVolumeGroupId.equals(currVolumeGroupId)) {
+                                       result = 'Cannot change the volume group on an existing VF Module'
+                               }
+                       }
+               }
+               
+               return result
+       }
+       
+       /**
+        * Find and return the value of the Volume Group ID for the specified VF Module.  If
+        * the value of the Volume Group ID cannot be found for any reason, 'null' is returned.
+        * 
+        * @param vfModuleNode VF Module (as a Node) retrieved from AAI.
+        * @return the value of the Volume Group ID for the specified VF Module.  If the
+        * value of the Volume Group ID cannot be found for any reason, 'null' is returned.
+        */
+       private String getCurrVolumeGroupId(Node vfModuleNode) {
+               def Node relationshipList = utils.getChildNode(vfModuleNode, 'relationship-list')
+               if (relationshipList == null) {
+                       return null
+               }
+               def NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+               for (Node relationshipNode in relationships) {
+                       def String relatedTo = utils.getChildNodeText(relationshipNode, 'related-to')
+                       if ((relatedTo != null) && relatedTo.equals('volume-group')) {
+                               def NodeList relationshipDataList = utils.getIdenticalChildren(relationshipNode, 'relationship-data')
+                               for (Node relationshipDataNode in relationshipDataList) {
+                                       def String relationshipKey = utils.getChildNodeText(relationshipDataNode, 'relationship-key')
+                                       if ((relationshipKey != null) && relationshipKey.equals('volume-group.volume-group-id')) {
+                                               return utils.getChildNodeText(relationshipDataNode, 'relationship-value')
+                                       }
+                               }
+                       }
+               }
+               return null
+       }
+
+       /**
+        * Generates a WorkflowException if the AAI query returns a response code other than 200.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void handleAAIQueryFailure(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleAAIQueryFailure(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logError('Error occurred attempting to query AAI, Response Code ' +
+                       execution.getVariable('UAAIVfMod_getVfModuleResponseCode') + ', Error Response ' +
+                       execution.getVariable('UAAIVfMod_getVfModuleResponse'))
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable('UAAIVfMod_getVfModuleResponse'))
+               execution.setVariable('WorkflowException', exception)
+
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+
+       /**
+        * Generates a WorkflowException if updating a VF Module in AAI returns a response code other than 200.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void handleUpdateVfModuleFailure(Execution execution) {
+               def method = getClass().getSimpleName() + '.handleUpdateVfModuleFailure(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               logError('Error occurred attempting to update VF Module in AAI, Response Code ' +
+                       execution.getVariable('UAAIVfMod_updateVfModuleResponseCode') + ', Error Response ' +
+                       execution.getVariable('UAAIVfMod_updateVfModuleResponse'))
+               String processKey = getProcessKey(execution);
+               WorkflowException exception = new WorkflowException(processKey, 5000,
+                       execution.getVariable('UAAIVfMod_updateVfModuleResponse'))
+               execution.setVariable('WorkflowException', exception)
+
+               logDebug('Exited ' + method, isDebugLogEnabled)
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateNetworkInstanceInfra.groovy
new file mode 100644 (file)
index 0000000..77f4768
--- /dev/null
@@ -0,0 +1,1664 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.json.JsonUtils;
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+
+/**
+ * This groovy class supports the <class>UpdateNetworkInstanceInfra.bpmn</class> process.
+ */
+public class UpdateNetworkInstanceInfra extends AbstractServiceTaskProcessor {
+       String Prefix="UPDNETI_"
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+       JsonUtils jsonUtil = new JsonUtils()
+       VidUtils vidUtils = new VidUtils(this)
+       NetworkUtils networkUtils = new NetworkUtils()
+       SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+       /**
+        * This method is executed during the preProcessRequest task of the <class>UpdateNetworkInstanceInfra.bpmn</class> process.
+        * @param execution
+        */
+       public InitializeProcessVariables(Execution execution){
+               /* Initialize all the process variables in this block */
+
+               execution.setVariable("UPDNETI_messageId", "")
+               execution.setVariable("BasicAuthHeaderValuePO", "")
+               execution.setVariable("BasicAuthHeaderValueSDNC", "")
+               execution.setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", "")
+               execution.setVariable("UPDNETI_networkRequest", "")
+               execution.setVariable("UPDNETI_networkInputs", "")
+               execution.setVariable("UPDNETI_networkOutputs", "")
+               execution.setVariable("UPDNETI_requestId", "")
+               execution.setVariable("UPDNETI_source", "")
+               execution.setVariable("UPDNETI_networkId", "")
+
+               execution.setVariable("UPDNETI_CompleteMsoProcessRequest", "")
+               execution.setVariable("UPDNETI_FalloutHandlerRequest", "")
+               execution.setVariable("UPDNETI_isSilentSuccess", false)
+               execution.setVariable("UPDNETI_isPONR", false)    // Point-of-no-return, means, rollback is not needed
+
+               // AAI query Cloud Region
+               execution.setVariable("UPDNETI_queryCloudRegionRequest","")
+               execution.setVariable("UPDNETI_queryCloudRegionReturnCode","")
+               execution.setVariable("UPDNETI_queryCloudRegionResponse","")
+               execution.setVariable("UPDNETI_cloudRegionPo","")
+               execution.setVariable("UPDNETI_cloudRegionSdnc","")
+               execution.setVariable("UPDNETI_isCloudRegionGood", false)
+
+               // AAI query Id
+               execution.setVariable("UPDNETI_queryIdAAIRequest","")
+               execution.setVariable("UPDNETI_queryIdAAIResponse", "")
+               execution.setVariable("UPDNETI_aaiIdReturnCode", "")
+
+               // AAI query vpn binding
+               execution.setVariable("UPDNETI_queryVpnBindingAAIRequest","")
+               execution.setVariable("UPDNETI_queryVpnBindingAAIResponse", "")
+               execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "")
+               execution.setVariable("UPDNETI_vpnBindings", null)
+               execution.setVariable("UPDNETI_vpnCount", 0)
+               execution.setVariable("UPDNETI_routeCollection", "")
+
+               // AAI query network policy
+               execution.setVariable("UPDNETI_queryNetworkPolicyAAIRequest","")
+               execution.setVariable("UPDNETI_queryNetworkPolicyAAIResponse", "")
+               execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "")
+               execution.setVariable("UPDNETI_networkPolicyUriList", null)
+               execution.setVariable("UPDNETI_networkPolicyCount", 0)
+               execution.setVariable("UPDNETI_networkCollection", "")
+
+               // AAI query route table reference
+               execution.setVariable("UPDNETI_queryNetworkTableRefAAIRequest","")
+               execution.setVariable("UPDNETI_queryNetworkTableRefAAIResponse", "")
+               execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "")
+               execution.setVariable("UPDNETI_networkTableRefUriList", null)
+               execution.setVariable("UPDNETI_networkTableRefCount", 0)
+               execution.setVariable("UPDNETI_tableRefCollection", "")
+               
+               // AAI requery Id
+               execution.setVariable("UPDNETI_requeryIdAAIRequest","")
+               execution.setVariable("UPDNETI_requeryIdAAIResponse", "")
+               execution.setVariable("UPDNETI_aaiRequeryIdReturnCode", "")
+
+               // AAI update contrail
+               execution.setVariable("UPDNETI_updateContrailAAIUrlRequest","")
+               execution.setVariable("UPDNETI_updateContrailAAIPayloadRequest","")
+               execution.setVariable("UPDNETI_updateContrailAAIResponse", "")
+               execution.setVariable("UPDNETI_aaiUpdateContrailReturnCode", "")
+
+               execution.setVariable("UPDNETI_updateNetworkRequest", "")
+               execution.setVariable("UPDNETI_updateNetworkResponse", "")
+               execution.setVariable("UPDNETI_rollbackNetworkRequest", "")
+               execution.setVariable("UPDNETI_rollbackNetworkResponse", "")
+               execution.setVariable("UPDNETI_networkReturnCode", "")
+               execution.setVariable("UPDNETI_rollbackNetworkReturnCode", "")
+               execution.setVariable("UPDNETI_isNetworkRollbackNeeded", false)
+
+               execution.setVariable("UPDNETI_changeAssignSDNCRequest", "")
+               execution.setVariable("UPDNETI_changeAssignSDNCResponse", "")
+               execution.setVariable("UPDNETI_rollbackSDNCRequest", "")
+               execution.setVariable("UPDNETI_rollbackSDNCResponse", "")
+               execution.setVariable("UPDNETI_sdncReturnCode", "")
+               execution.setVariable("UPDNETI_rollbackSDNCReturnCode", "")
+               execution.setVariable("UPDNETI_isSdncRollbackNeeded", false)
+               execution.setVariable("UPDNETI_sdncResponseSuccess", false)
+
+               execution.setVariable("UPDNETI_updateDBRequest", "")
+               execution.setVariable("UPDNETI_updateDBResponse", "")
+               execution.setVariable("UPDNETI_dbReturnCode", "")
+
+               execution.setVariable("UPDNETI_isVnfBindingPresent", false)
+               execution.setVariable("UPDNETI_Success", false)
+               execution.setVariable("UPDNETI_serviceInstanceId", "")
+               execution.setVariable("GENGS_type", "service-instance") // Setting for Generic Sub Flow use
+
+       }
+
+       // **************************************************
+       //     Pre or Prepare Request Section
+       // **************************************************
+       /**
+        * This method is executed during the preProcessRequest task of the <class>UpdateNetworkInstanceInfra.bpmn</class> process.
+        * @param execution
+        */
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside preProcessRequest UpdateNetworkInstanceInfra Request ***** ", isDebugEnabled)
+
+               // initialize flow variables
+               InitializeProcessVariables(execution)
+
+               // get Incoming request & validate json format
+               String updateNetworkJsonIncoming = execution.getVariable("bpmnRequest")
+               utils.logAudit(updateNetworkJsonIncoming)
+               try {
+                       def prettyJson = JsonOutput.prettyPrint(updateNetworkJsonIncoming.toString())
+                       utils.log("DEBUG", " Incoming message formatted . . . : " + '\n' + prettyJson, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
+                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+               }
+
+               // PO Authorization Info / headers Authorization=
+               String basicAuthValuePO = execution.getVariable("URN_mso_adapters_po_auth")
+               utils.log("DEBUG", " Obtained BasicAuth userid password for PO/SDNC adapter: " + basicAuthValuePO, isDebugEnabled)
+               try {
+                       def encodedString = utils.getBasicAuth(basicAuthValuePO, execution.getVariable("URN_mso_msoKey"))
+                       execution.setVariable("BasicAuthHeaderValuePO",encodedString)
+                       execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
+
+               } catch (IOException ex) {
+                       String dataErrorMessage = " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
+                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+               }
+
+               try {
+
+                       execution.setVariable("UPDNETI_UpdateNetworkInstanceInfraJsonRequest", updateNetworkJsonIncoming)
+
+                       // recreate the xml network-request
+                       String networkRequest =  vidUtils.createXmlNetworkRequestInfra(execution, updateNetworkJsonIncoming)
+                       execution.setVariable("UPDNETI_networkRequest", networkRequest)
+                       utils.log("DEBUG", " network-request - " + '\n' + networkRequest, isDebugEnabled)
+
+                       String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
+                       execution.setVariable("UPDNETI_networkInputs", networkInputs)
+                       utils.log("DEBUG", " networkInputs - " + '\n' + networkInputs, isDebugEnabled)
+
+                       String netId = utils.getNodeText1(networkRequest, "network-id")
+                       String netName = utils.getNodeText1(networkRequest, "network-name")
+                       String networkOutputs = 
+                          """<network-outputs>
+                   <network-id>${netId}</network-id>                   
+                   <network-name>${netName}</network-name>
+                 </network-outputs>"""
+                       execution.setVariable("UPDNETI_networkOutputs", networkOutputs)
+                       utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+
+                       String requestId = execution.getVariable("att-mso-request-id")
+                       if (requestId == null || requestId == "") {
+                               requestId = execution.getVariable("requestId")
+                       }
+                       execution.setVariable("UPDNETI_requestId", requestId)
+                       execution.setVariable("UPDNETI_source", utils.getNodeText1(networkRequest, "source"))
+
+                       // prepare messageId
+                       String messageId = execution.getVariable("UPDNETI_messageId")  // for testing
+                       if (messageId == null || messageId == "") {
+                               messageId = UUID.randomUUID()
+                               utils.log("DEBUG", " UPDNETI_messageId, random generated: " + messageId, isDebugEnabled)
+                       } else {
+                               utils.log("DEBUG", " UPDNETI_messageId, pre-assigned: " + messageId, isDebugEnabled)
+                       }
+                       execution.setVariable("UPDNETI_messageId", messageId)
+
+                       // validate 'backout-on-failure' to override 'URN_mso_rollback'
+                       boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
+                       execution.setVariable("UPDNETI_rollbackEnabled", rollbackEnabled)
+
+                       String networkId = ""
+                       if (utils.nodeExists(networkRequest, "network-id")) {
+                               networkId = utils.getNodeText1(networkRequest, "network-id")
+                               if (networkId == 'null' || networkId == "") {
+                                       sendSyncError(execution)
+                                       // missing value of networkId
+                                       String dataErrorMessage = "Variable 'network-id' value/element is missing."
+                                       utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               }
+                       }
+
+                       String lcpCloudRegion = ""
+                       if (utils.nodeExists(networkRequest, "aic-cloud-region")) {
+                               lcpCloudRegion = utils.getNodeText1(networkRequest, "aic-cloud-region")
+                           if ((lcpCloudRegion == 'null') || (lcpCloudRegion == "")) {
+                                       sendSyncError(execution)
+                                       String dataErrorMessage = "requestDetails has missing 'aic-cloud-region' value/element."
+                                       utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+                               }
+                       }
+
+                       String serviceInstanceId = ""
+                       if (utils.nodeExists(networkRequest, "service-instance-id")) {
+                               serviceInstanceId = utils.getNodeText1(networkRequest, "service-instance-id")
+                               if ((serviceInstanceId == 'null') || (lcpCloudRegion == "")) {
+                                       sendSyncError(execution)
+                                       String dataErrorMessage = "Variable 'serviceInstanceId' value/element is missing."
+                                       utils.log("DEBUG", " Invalid Request - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+                               }
+                       }
+
+                       execution.setVariable("UPDNETI_serviceInstanceId", serviceInstanceId)
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex){
+                       sendSyncError(execution)
+                        // caught exception
+                       String exceptionMessage = "Exception Encountered in UpdateNetworkInstanceInfra, PreProcessRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+       }
+
+       public void sendSyncResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+
+               utils.log("DEBUG", " ***** Inside sendSyncResponse of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       String serviceInstanceId = execution.getVariable("UPDNETI_serviceInstanceId")
+                       String requestId = execution.getVariable("att-mso-request-id")
+
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       String updateNetworkRestRequest = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+
+                       utils.log("DEBUG", " sendSyncResponse to APIH - " + "\n" + updateNetworkRestRequest, isDebugEnabled)
+                       sendWorkflowResponse(execution, 202, updateNetworkRestRequest)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. sendSyncResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+               }
+
+       }
+
+       public void callRESTQueryAAICloudRegion (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAICloudRegion of UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       String networkInputs  = execution.getVariable("UPDNETI_networkInputs")
+                       String cloudRegion = utils.getNodeText1(networkInputs, "aic-cloud-region")
+                       cloudRegion = UriUtils.encode(cloudRegion,"UTF-8")
+
+                       // Prepare AA&I url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       String aai_uri = aaiUtil.getCloudInfrastructureCloudRegionUri(execution)
+                       String queryCloudRegionRequest = "${aai_endpoint}${aai_uri}/" + cloudRegion
+                       utils.logAudit(queryCloudRegionRequest)
+                       execution.setVariable("UPDNETI_queryCloudRegionRequest", queryCloudRegionRequest)
+                       utils.log("DEBUG", " UPDNETI_queryCloudRegionRequest - " + "\n" + queryCloudRegionRequest, isDebugEnabled)
+
+                       String cloudRegionPo = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "PO", cloudRegion)
+                       String cloudRegionSdnc = aaiUtil.getAAICloudReqion(execution,  queryCloudRegionRequest, "SDNC", cloudRegion)
+
+                       if ((cloudRegionPo != "ERROR") && (cloudRegionSdnc != "ERROR")) {
+                               execution.setVariable("UPDNETI_cloudRegionPo", cloudRegionPo)
+                               execution.setVariable("UPDNETI_cloudRegionSdnc", cloudRegionSdnc)
+                               execution.setVariable("UPDNETI_isCloudRegionGood", true)
+
+                       } else {
+                           String dataErrorMessage = "QueryAAICloudRegion Unsuccessful. Return Code: " + execution.getVariable("UPDNETI_queryCloudRegionReturnCode")
+                           utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                       }
+
+                       utils.log("DEBUG", " is Cloud Region Good: " + execution.getVariable("UPDNETI_isCloudRegionGood"), isDebugEnabled)
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       // try error
+                       String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow - callRESTQueryAAICloudRegion() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAINetworkId(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkId of UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String networkRequest = execution.getVariable("UPDNETI_networkRequest")
+                       String networkId   = utils.getNodeText1(networkRequest, "network-id")
+                       networkId = UriUtils.encode(networkId,"UTF-8")
+                       execution.setVariable("UPDNETI_networkId", networkId)
+                       String messageId = execution.getVariable("UPDNETI_messageId")
+
+                       // Prepare AA&I url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                       String queryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
+                       utils.logAudit(queryIdAAIRequest)
+                       execution.setVariable("UPDNETI_queryIdAAIRequest", queryIdAAIRequest)
+                       utils.log("DEBUG", " UPDNETI_queryIdAAIRequest - " + "\n" + queryIdAAIRequest, isDebugEnabled)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(queryIdAAIRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+
+                       APIResponse response = client.get()
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("UPDNETI_aaiIdReturnCode", returnCode)
+
+                       utils.log("DEBUG", " ***** AAI Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                       if (returnCode=='200') {
+                               utils.logAudit(aaiResponseAsString)
+                               execution.setVariable("UPDNETI_queryIdAAIResponse", aaiResponseAsString)
+                               utils.log("DEBUG", " QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                       } else {
+                               if (returnCode=='404') {
+                                       String dataErrorMessage = "Response Error from QueryAAINetworkId is 404 (Not Found)."
+                                       utils.log("DEBUG", " AAI Query Failed. " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               } else {
+                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                          execution.setVariable("WorkflowException", exceptionObject)
+                                          throw new BpmnError("MSOWorkflowException")
+
+                                  } else {
+                                                       // aai all errors
+                                                       String dataErrorMessage = "Unexpected Response from QueryAAINetworkId - " + returnCode
+                                                       utils.log("DEBUG", "Unexpected Response from QueryAAINetworkId - " + dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                 }
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTQueryAAINetworkId() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTReQueryAAINetworkId(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTReQueryAAINetworkId of UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String networkId   = utils.getNodeText1(execution.getVariable("UPDNETI_changeAssignSDNCResponse"), "network-id")
+                       networkId = UriUtils.encode(networkId,"UTF-8")
+                       String messageId = execution.getVariable("UPDNETI_messageId")
+
+                       // Prepare AA&I url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                       String requeryIdAAIRequest = "${aai_endpoint}${aai_uri}/" + networkId
+                       utils.logAudit(requeryIdAAIRequest)
+                       execution.setVariable("UPDNETI_requeryIdAAIRequest", requeryIdAAIRequest)
+                       utils.log("DEBUG", " UPDNETI_requeryIdAAIRequest - " + "\n" + requeryIdAAIRequest, isDebugEnabled)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(requeryIdAAIRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+
+                       APIResponse response = client.get()
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("UPDNETI_aaiRequeryIdReturnCode", returnCode)
+                       utils.log("DEBUG", " ***** AAI ReQuery Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                       if (returnCode=='200') {
+                               utils.logAudit(aaiResponseAsString)
+                               execution.setVariable("UPDNETI_requeryIdAAIResponse", aaiResponseAsString)
+                               utils.log("DEBUG", " ReQueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                               String netId = utils.getNodeText1(aaiResponseAsString, "network-id")
+                               String netName = utils.getNodeText1(aaiResponseAsString, "network-name")
+                               String networkOutputs =
+                                  """<network-outputs>
+                   <network-id>${netId}</network-id>                   
+                   <network-name>${netName}</network-name>
+                 </network-outputs>"""
+                               execution.setVariable("UPDNETI_networkOutputs", networkOutputs)
+                               utils.log("DEBUG", " networkOutputs - " + '\n' + networkOutputs, isDebugEnabled)
+                               
+                       } else {
+                               if (returnCode=='404') {
+                                       String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)."
+                                       utils.log("DEBUG", " AAI ReQuery Failed. - " + dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               } else {
+                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                          execution.setVariable("WorkflowException", exceptionObject)
+                                          throw new BpmnError("MSOWorkflowException")
+
+                                          } else {
+                                                       // aai all errors
+                                                       String dataErrorMessage = "Unexpected Response from ReQueryAAINetworkId - " + returnCode
+                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                       }
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTReQueryAAINetworkId() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAINetworkVpnBinding(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkVpnBinding of UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+
+                       // get variables
+                       String messageId = execution.getVariable("UPDNETI_messageId")
+                       String queryIdAAIResponse   = execution.getVariable("UPDNETI_requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+                       String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+                       utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+                       // Check if Vnf Binding is present, then build a List of vnfBinding
+                       List vpnBindingUri = networkUtils.getVnfBindingObject(relationship)
+                       int vpnCount = vpnBindingUri.size()
+                       execution.setVariable("UPDNETI_vpnCount", vpnCount)
+                       utils.log("DEBUG", " UPDNETI_vpnCount - " + vpnCount, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       if (vpnCount > 0) {
+                               execution.setVariable("UPDNETI_vpnBindings", vpnBindingUri)
+                               utils.log("DEBUG", " vpnBindingUri List - " + vpnBindingUri, isDebugEnabled)
+
+                               String routeTargets = ""
+                               // AII loop call using list vpnBindings
+                               for (i in 0..vpnBindingUri.size()-1) {
+
+                                       int counting = i+1
+
+                                       // prepare url using vpnBinding
+                                       String queryVpnBindingAAIRequest = ""
+                                       String aai_uri = aaiUriUtil.getNetworkVpnBindingUri(execution)
+
+                                       // Note: By default, the vpnBinding url is found in 'related-link' of the response,
+                                       //       so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+                                       if (aai_uri == null || aai_uri == "") {
+                                               // using value of 'related-link' from response
+                                               if (vpnBindingUri[i].charAt(vpnBindingUri[i].length()-1) == '/') {
+                                                   queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i].substring(0, vpnBindingUri[i].length()-1)
+                                               } else {
+                                                   queryVpnBindingAAIRequest = "${aai_endpoint}" + vpnBindingUri[i]
+                                               }
+
+                                       } else {
+                                           // using uri value in URN mapping
+                                               String vpnBindingId = vpnBindingUri[i].substring(vpnBindingUri[i].indexOf("/vpn-binding/")+13, vpnBindingUri[i].length())
+                                               if (vpnBindingId.charAt(vpnBindingId.length()-1) == '/') {
+                                                       vpnBindingId = vpnBindingId.substring(0, vpnBindingId.length()-1)
+                                               }
+                                           queryVpnBindingAAIRequest = "${aai_endpoint}${aai_uri}/" + vpnBindingId
+                                       }
+
+                                       utils.logAudit(queryVpnBindingAAIRequest)
+                                       execution.setVariable("UPDNETI_queryVpnBindingAAIRequest", queryVpnBindingAAIRequest)
+                                       utils.log("DEBUG", " UPDNETI_queryVpnBindingAAIRequest, , vpnBinding #" + counting + " : " + "\n" + queryVpnBindingAAIRequest, isDebugEnabled)
+
+                                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                                       RESTConfig config = new RESTConfig(queryVpnBindingAAIRequest);
+                                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                                         .addHeader("Accept","application/xml");
+                                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                               client.addAuthorizationHeader(basicAuthCred)
+                                       }
+
+                                       APIResponse response = client.get()
+                                       String returnCode = response.getStatusCode()
+                                       execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", returnCode)
+                                       utils.log("DEBUG", " ***** AAI query vpn binding Response Code, vpnBinding #" + counting + " : " + returnCode, isDebugEnabled)
+
+                                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                                       if (returnCode=='200') {
+                                               utils.logAudit(aaiResponseAsString)
+                                               execution.setVariable("UPDNETI_queryVpnBindingAAIResponse", aaiResponseAsString)
+                                               utils.log("DEBUG", " AAI Query Vpn Binding Success REST Response, , vpnBinding #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                                               String routeTarget = ""
+                                               if (utils.nodeExists(aaiResponseAsString, "global-route-target")) {
+                                                       routeTarget  = utils.getNodeText1(aaiResponseAsString, "global-route-target")
+                                                       routeTargets += "<routeTargets>" + routeTarget + "</routeTargets>" + '\n'
+                                               }
+
+                                       } else {
+                                               if (returnCode=='404') {
+                                                       String dataErrorMessage = "Response Error from AAINetworkVpnBinding is 404 (Not Found)."
+                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                               } else {
+                                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                                          execution.setVariable("WorkflowException", exceptionObject)
+                                                          throw new BpmnError("MSOWorkflowException")
+
+                                                          } else {
+                                                                       // aai all errors
+                                                                       String dataErrorMessage = " Unexpected Response from AAINetworkVpnBinding - " + returnCode
+                                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                                         }
+                                               }
+                                       }
+
+                               } // end loop
+
+                               execution.setVariable("UPDNETI_routeCollection", routeTargets)
+                               utils.log("DEBUG", " UPDNETI_routeCollection - " + '\n' + routeTargets, isDebugEnabled)
+
+                       } else {
+                               // reset return code to success
+                               execution.setVariable("UPDNETI_aaiQqueryVpnBindingReturnCode", "200")
+                               String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                               String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                           String aaiStubResponse =
+                                       """     <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+                                                       <vpn-binding xmlns="${schemaVersion}">
+                                                     <global-route-target/>
+                                                       </vpn-binding>
+                                               </rest:payload>"""
+                               String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+                               execution.setVariable("UPDNETI_queryVpnBindingAAIResponse", aaiStubResponseAsXml)
+                               execution.setVariable("UPDNETI_routeCollection", "<routeTargets/>")
+                               utils.log("DEBUG", " No vpnBinding, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTQueryAAINetworkVpnBinding() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAINetworkPolicy(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkPolicy of UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String messageId = execution.getVariable("UPDNETI_messageId")
+                       String queryIdAAIResponse   = execution.getVariable("UPDNETI_requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+                       String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+                       utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+                       // Check if Network Policy is present, then build a List of network policy
+                       List networkPolicyUriList = networkUtils.getNetworkPolicyObject(relationship)
+                       int networkPolicyCount = networkPolicyUriList.size()
+                       execution.setVariable("UPDNETI_networkPolicyCount", networkPolicyCount)
+                       utils.log("DEBUG", " UPDNETI_networkPolicyCount - " + networkPolicyCount, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       if (networkPolicyCount > 0) {
+                               execution.setVariable("UPDNETI_networkPolicyUriList", networkPolicyUriList)
+                               utils.log("DEBUG", " networkPolicyUri List - " + networkPolicyUriList, isDebugEnabled)
+
+                               String networkPolicies = ""
+                               // AII loop call using list vpnBindings
+                               for (i in 0..networkPolicyUriList.size()-1) {
+
+                                       int counting = i+1
+
+                                       // prepare url using vpnBinding
+                                       String queryNetworkPolicyAAIRequest = ""
+
+                                       String aai_uri = aaiUriUtil.getNetworkPolicyUri(execution)
+
+                                       // Note: By default, the network policy url is found in 'related-link' of the response,
+                                       //       so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+                                       if (aai_uri == null || aai_uri == "") {
+                                               // using value of 'related-link' from response
+                                               if (networkPolicyUriList[i].charAt(networkPolicyUriList[i].length()-1) == '/') {
+                                                       queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i].substring(0, networkPolicyUriList[i].length()-1)
+                                               } else {
+                                                       queryNetworkPolicyAAIRequest = "${aai_endpoint}" + networkPolicyUriList[i]
+                                               }
+                                       } else {
+                                               // using uri value in URN mapping
+                                               String networkPolicyId = networkPolicyUriList[i].substring(networkPolicyUriList[i].indexOf("/network-policy/")+16, networkPolicyUriList[i].length())
+                                               println " networkPolicyId - " + networkPolicyId
+                                               if (networkPolicyId.charAt(networkPolicyId.length()-1) == '/') {
+                                                       networkPolicyId = networkPolicyId.substring(0, networkPolicyId.length()-1)
+                                               }
+                                               queryNetworkPolicyAAIRequest = "${aai_endpoint}${aai_uri}/" + networkPolicyId
+
+                                       }
+
+
+                                       utils.logAudit(queryNetworkPolicyAAIRequest)
+                                       execution.setVariable("UPDNETI_queryNetworkPolicyAAIRequest", queryNetworkPolicyAAIRequest)
+                                       utils.log("DEBUG", " UPDNETI_queryNetworkPolicyAAIRequest, , NetworkPolicy #" + counting + " : " + "\n" + queryNetworkPolicyAAIRequest, isDebugEnabled)
+
+                                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                                       RESTConfig config = new RESTConfig(queryNetworkPolicyAAIRequest);
+                                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                                         .addHeader("Accept","application/xml");
+                                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                               client.addAuthorizationHeader(basicAuthCred)
+                                       }
+
+                                       APIResponse response = client.get()
+                                       String returnCode = response.getStatusCode()
+                                       execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", returnCode)
+                                       utils.log("DEBUG", " ***** AAI query network policy Response Code, NetworkPolicy #" + counting + " : " + returnCode, isDebugEnabled)
+
+                                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                                       if (returnCode=='200') {
+                                               utils.logAudit(aaiResponseAsString)
+                                               execution.setVariable("UPDNETI_queryNetworkPolicyAAIResponse", aaiResponseAsString)
+                                               utils.log("DEBUG", " QueryAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                                               String networkPolicy = ""
+                                               if (utils.nodeExists(aaiResponseAsString, "network-policy-fqdn")) {
+                                                       networkPolicy  = utils.getNodeText1(aaiResponseAsString, "network-policy-fqdn")
+                                                       networkPolicies += "<policyFqdns>" + networkPolicy + "</policyFqdns>" + '\n'
+                                               }
+
+                                       } else {
+                                               if (returnCode=='404') {
+                                                       String dataErrorMessage = "Response Error from QueryAAINetworkPolicy is 404 (Not Found)."
+                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                               } else {
+                                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                                          execution.setVariable("WorkflowException", exceptionObject)
+                                                          throw new BpmnError("MSOWorkflowException")
+
+                                                          } else {
+                                                                       // aai all errors
+                                                                       String dataErrorMessage = "Unexpected Response from QueryAAINetworkPolicy - " + returnCode
+                                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                                         }
+                                               }
+                                       }
+
+                               } // end loop
+
+                               execution.setVariable("UPDNETI_networkCollection", networkPolicies)
+                               utils.log("DEBUG", " UPDNETI_networkCollection - " + '\n' + networkPolicies, isDebugEnabled)
+
+                       } else {
+                               // reset return code to success
+                               execution.setVariable("UPDNETI_aaiQqueryNetworkPolicyReturnCode", "200")
+                               String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                               String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                               String aaiStubResponse =
+                                       """     <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+                                                       <network-policy xmlns="${schemaVersion}">
+                                                         <network-policy-fqdn/>
+                            </network-policy>
+                                               </rest:payload>"""
+                               String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+                               execution.setVariable("UPDNETI_queryNetworkPolicyAAIResponse", aaiStubResponseAsXml)
+                               execution.setVariable("UPDNETI_networkCollection", "<policyFqdns/>")
+                               utils.log("DEBUG", " No net policies, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTQueryAAINetworkPolicy() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void callRESTQueryAAINetworkTableRef(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTQueryAAINetworkTableRef of UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String messageId = execution.getVariable("UPDNETI_messageId")
+                       String queryIdAAIResponse   = execution.getVariable("UPDNETI_requeryIdAAIResponse").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+                       String relationship = networkUtils.getFirstNodeXml(queryIdAAIResponse, "relationship-list").trim().replace("tag0:","").replace(":tag0","")
+                       utils.log("DEBUG", " relationship - " + relationship, isDebugEnabled)
+
+                       // Check if Network TableREf is present, then build a List of network policy
+                       List networkTableRefUriList = networkUtils.getNetworkTableRefObject(relationship)
+                       int networkTableRefCount = networkTableRefUriList.size()
+                       execution.setVariable("UPDNETI_networkTableRefCount", networkTableRefCount)
+                       utils.log("DEBUG", " UPDNETI_networkTableRefCount - " + networkTableRefCount, isDebugEnabled)
+
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+
+                       if (networkTableRefCount > 0) {
+                               execution.setVariable("UPDNETI_networkTableRefUriList", networkTableRefUriList)
+                               utils.log("DEBUG", " networkTableRefUri List - " + networkTableRefUriList, isDebugEnabled)
+
+                               // AII loop call using list vpnBindings
+                               String networkTableRefs = ""
+                               for (i in 0..networkTableRefUriList.size()-1) {
+
+                                       int counting = i+1
+
+                                       // prepare url using tableRef
+                                       String queryNetworkTableRefAAIRequest = ""
+
+                                       String aai_uri = aaiUriUtil.getNetworkTableReferencesUri(execution)
+
+                                       // Note: By default, the network policy url is found in 'related-link' of the response,
+                                       //       so, the default in URN mappings for this is set to "" (ie, space), unless forced to use the URN mapping.
+                                       if (aai_uri == null || aai_uri == "") {
+                                               // using value of 'related-link' from response
+                                               if (networkTableRefUriList[i].charAt(networkTableRefUriList[i].length()-1) == '/') {
+                                                       queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i].substring(0, networkTableRefUriList[i].length()-1)
+                                               } else {
+                                                       queryNetworkTableRefAAIRequest = "${aai_endpoint}" + networkTableRefUriList[i]
+                                               }
+                                       } else {
+                                               // using uri value in URN mapping
+                                               String networkTableRefId = networkTableRefUriList[i].substring(networkTableRefUriList[i].indexOf("/route-table-reference/")+23, networkTableRefUriList[i].length())
+
+                                               if (networkTableRefId.charAt(networkTableRefId.length()-1) == '/') {
+                                                       networkTableRefId = networkTableRefId.substring(0, networkTableRefId.length()-1)
+                                               }
+                                               queryNetworkTableRefAAIRequest = "${aai_endpoint}${aai_uri}/" + networkTableRefId
+
+                                       }
+
+
+                                       utils.logAudit(queryNetworkTableRefAAIRequest)
+                                       execution.setVariable("UPDNETI_queryNetworkTableRefAAIRequest", queryNetworkTableRefAAIRequest)
+                                       utils.log("DEBUG", " UPDNETI_queryNetworkTableRefAAIRequest, , NetworkTableRef #" + counting + " : " + "\n" + queryNetworkTableRefAAIRequest, isDebugEnabled)
+
+                                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                                       RESTConfig config = new RESTConfig(queryNetworkTableRefAAIRequest);
+                                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                                         .addHeader("Accept","application/xml");
+                                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                                               client.addAuthorizationHeader(basicAuthCred)
+                                       }
+
+                                       APIResponse response = client.get()
+                                       String returnCode = response.getStatusCode()
+                                       execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", returnCode)
+                                       utils.log("DEBUG", " ***** AAI query network Table Reference Response Code, NetworkTableRef #" + counting + " : " + returnCode, isDebugEnabled)
+
+                                       String aaiResponseAsString = response.getResponseBodyAsString()
+
+                                       if (returnCode=='200') {
+                                               utils.logAudit(aaiResponseAsString)
+                                               execution.setVariable("UPDNETI_queryNetworkTableRefAAIResponse", aaiResponseAsString)
+                                               utils.log("DEBUG", " QueryAAINetworkTableRef Success REST Response, , NetworkTableRef #" + counting + " : " + "\n" + aaiResponseAsString, isDebugEnabled)
+
+                                               String networkTableRef = ""
+                                               if (utils.nodeExists(aaiResponseAsString, "route-table-reference-fqdn")) {
+                                                       networkTableRef  = utils.getNodeText1(aaiResponseAsString, "route-table-reference-fqdn")
+                                                       networkTableRefs += "<routeTableFqdns>" + networkTableRef + "</routeTableFqdns>" + '\n'
+                                               }
+
+                                       } else {
+                                               if (returnCode=='404') {
+                                                       String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)."
+                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+                                                       
+                                               } else {
+                                                  if (aaiResponseAsString.contains("RESTFault")) {
+                                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                                                          execution.setVariable("WorkflowException", exceptionObject)
+                                                          throw new BpmnError("MSOWorkflowException")
+               
+                                                          } else {
+                                                                       // aai all errors
+                                                                       String dataErrorMessage = "Unexpected Response from QueryAAINetworkTableRef - " + returnCode
+                                                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                                                         }
+                                               }
+                                       }
+
+                               } // end loop
+
+                               execution.setVariable("UPDNETI_tableRefCollection", networkTableRefs)
+                               utils.log("DEBUG", " UPDNETI_tableRefCollection - " + '\n' + networkTableRefs, isDebugEnabled)
+
+                       } else {
+                               // reset return code to success
+                               execution.setVariable("UPDNETI_aaiQqueryNetworkTableRefReturnCode", "200")
+                               String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                               String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                               String aaiStubResponse =
+                                       """     <rest:payload contentType="text/xml" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+                                                       <route-table-references xmlns="${schemaVersion}">
+                                                         <route-table-reference-fqdn/>
+                            </route-table-references>
+                                               </rest:payload>"""
+                               String aaiStubResponseAsXml = utils.formatXml(aaiStubResponse)
+                               execution.setVariable("UPDNETI_queryNetworkTableRefAAIResponse", aaiStubResponseAsXml)
+                               execution.setVariable("UPDNETI_tableRefCollection", "<routeTableFqdns/>")
+                               utils.log("DEBUG", " No net table references, using this stub as response - " + '\n' + aaiStubResponseAsXml, isDebugEnabled)
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+                       
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+       
+       public void callRESTUpdateContrailAAINetwork(Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside callRESTUpdateContrailAAINetwork of UpdateNetworkInstanceInfra ***** " , isDebugEnabled)
+
+               try {
+                       // get variables
+                       String networkId   = utils.getNodeText1(execution.getVariable("UPDNETI_changeAssignSDNCResponse"), "network-id")
+                       networkId = UriUtils.encode(networkId,"UTF-8")
+                       String requeryIdAAIResponse   = execution.getVariable("UPDNETI_requeryIdAAIResponse")
+                       String updateNetworkResponse   = execution.getVariable("UPDNETI_updateNetworkResponse")
+                       String messageId = execution.getVariable("UPDNETI_messageId")
+
+                       // Prepare url
+                       String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+                       AaiUtil aaiUriUtil = new AaiUtil(this)
+                       String aai_uri = aaiUriUtil.getNetworkL3NetworkUri(execution)
+                       String updateContrailAAIUrlRequest = "${aai_endpoint}${aai_uri}/" + networkId
+
+                       utils.logAudit(updateContrailAAIUrlRequest)
+                       execution.setVariable("UPDNETI_updateContrailAAIUrlRequest", updateContrailAAIUrlRequest)
+                       utils.log("DEBUG", " UPDNETI_updateContrailAAIUrlRequest - " + "\n" + updateContrailAAIUrlRequest, isDebugEnabled)
+
+                       //Prepare payload (PUT)
+                       String schemaVersion = aaiUriUtil.getNamespaceFromUri(aai_uri)
+                       String payload = networkUtils.ContrailNetworkCreatedUpdate(requeryIdAAIResponse, updateNetworkResponse, schemaVersion)
+                       String payloadXml = utils.formatXml(payload)
+                       utils.logAudit(payloadXml)
+                       execution.setVariable("UPDNETI_updateContrailAAIPayloadRequest", payloadXml)
+                       utils.log("DEBUG", " 'payload' to Update Contrail - " + "\n" + payloadXml, isDebugEnabled)
+
+                       String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_aai_auth"),execution.getVariable("URN_mso_msoKey"))
+
+                       RESTConfig config = new RESTConfig(updateContrailAAIUrlRequest);
+                       RESTClient client = new RESTClient(config).addHeader("X-TransactionId", messageId)
+                                                                                                         .addHeader("X-FromAppId", "MSO")
+                                                                                                         .addHeader("Content-Type", "application/xml")
+                                                                                                         .addHeader("Accept","application/xml");
+                       if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+                               client.addAuthorizationHeader(basicAuthCred)
+                       }
+
+                       APIResponse response = client.httpPut(payload)
+                       String returnCode = response.getStatusCode()
+                       execution.setVariable("UPDNETI_aaiUpdateContrailReturnCode", returnCode)
+
+                       utils.log("DEBUG", " ***** AAI Update Contrail Response Code  : " + returnCode, isDebugEnabled)
+
+                       String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
+
+                       if (returnCode=='200') {
+                               utils.logAudit(aaiUpdateContrailResponseAsString)
+                               execution.setVariable("UPDNETI_updateContrailAAIResponse", aaiUpdateContrailResponseAsString)
+                               utils.log("DEBUG", " AAI Update Contrail Success REST Response - " + "\n" + aaiUpdateContrailResponseAsString, isDebugEnabled)
+                               // Point-of-no-return is set to false, rollback not needed.
+                               execution.setVariable("UPDNETI_isPONR", true)
+
+                       } else {
+                               if (returnCode=='404') {
+                                       String dataErrorMessage = " Response Error from UpdateContrailAAINetwork is 404 (Not Found)."
+                                       utils.log("DEBUG", dataErrorMessage, isDebugEnabled)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                               } else {
+                                  if (aaiUpdateContrailResponseAsString.contains("RESTFault")) {
+                                          WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiUpdateContrailResponseAsString, execution)
+                                          execution.setVariable("WorkflowException", exceptionObject)
+                                          throw new BpmnError("MSOWorkflowException")
+
+                                          } else {
+                                                       // aai all errors
+                                                       String errorMessage = "Unexpected Response from UpdateContrailAAINetwork - " + returnCode
+                                                       utils.log("DEBUG", errorMessage, isDebugEnabled)
+                                                       exceptionUtil.buildAndThrowWorkflowException(execution, "2500", errorMessage)
+                                         }
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = "Bpmn error encountered in UpdateNetworkInstanceInfra flow. callRESTUpdateContrailAAINetwork() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void prepareUpdateNetworkRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareUpdateNetworkRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+
+                       // get variables
+                       String requestId = execution.getVariable("UPDNETI_requestId")
+                       String messageId = execution.getVariable("UPDNETI_messageId")
+                       String source    = execution.getVariable("UPDNETI_source")
+
+                       String requestInput = execution.getVariable("UPDNETI_networkRequest")
+                       String queryIdResponse = execution.getVariable("UPDNETI_requeryIdAAIResponse")
+                       String cloudRegionId = execution.getVariable("UPDNETI_cloudRegionPo")
+                       String backoutOnFailure = execution.getVariable("UPDNETI_rollbackEnabled")
+
+                       // Prepare Network request
+                       String routeCollection = execution.getVariable("UPDNETI_routeCollection")
+                       String policyCollection = execution.getVariable("UPDNETI_networkCollection")
+                       String tableCollection = execution.getVariable("UPDNETI_tableRefCollection")
+                       String updateNetworkRequest = networkUtils.UpdateNetworkRequestV2(execution, requestId, messageId, requestInput, queryIdResponse, routeCollection, policyCollection, tableCollection, cloudRegionId, backoutOnFailure, source )
+                       // Format Response
+                       String buildUpdateNetworkRequestAsString = utils.formatXml(updateNetworkRequest)
+                       buildUpdateNetworkRequestAsString = buildUpdateNetworkRequestAsString.replace(":w1aac13n0", "").replace("w1aac13n0:", "")
+                       utils.logAudit(buildUpdateNetworkRequestAsString)
+
+                       execution.setVariable("UPDNETI_updateNetworkRequest", buildUpdateNetworkRequestAsString)
+                       utils.log("DEBUG", " UPDNETI_updateNetworkRequest - " + "\n" +  buildUpdateNetworkRequestAsString, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareUpdateNetworkRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void prepareSDNCRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareSDNCRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       // get variables
+                       String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+                       String updateNetworkInput = execution.getVariable("UPDNETI_networkRequest")
+                       String cloudRegionId = execution.getVariable("UPDNETI_cloudRegionSdnc")
+
+                       String networkId = ""
+                       if (utils.nodeExists(updateNetworkInput, "network-id")) {
+                          networkId = utils.getNodeText1(updateNetworkInput, "network-id")
+                       }
+                       if (networkId == null) {networkId = ""}
+
+                       String serviceInstanceId = utils.getNodeText1(updateNetworkInput, "service-instance-id")
+
+                       // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+                       String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "changeassign", "NetworkActivateRequest", cloudRegionId, networkId, null)
+
+                       String sndcTopologyUpdateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+                       utils.logAudit(sndcTopologyUpdateRequesAsString)
+                       execution.setVariable("UPDNETI_changeAssignSDNCRequest", sndcTopologyUpdateRequesAsString)
+                       utils.log("DEBUG", " UPDNETI_changeAssignSDNCRequest - " + "\n" +  sndcTopologyUpdateRequesAsString, isDebugEnabled)
+
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareSDNCRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void prepareDBRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       utils.log("DEBUG", " ***** Inside prepareDBRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+                       String networkOutputs = execution.getVariable("UPDNETI_networkOutputs")
+                       String networkName = ""
+                       try {
+                                networkName = utils.getNodeText1(networkOutputs, "network-name")
+                                if (networkName == null) {networkName = ""}
+                       } catch (Exception ex) {
+                               networkName = ""
+                               utils.log("DEBUG", " No 'network-name' found in '<network-outputs>' ! ", isDebugEnabled)
+                       }
+                       String networkId = ""
+                       try {
+                               networkId = utils.getNodeText1(networkOutputs, "network-id")
+                               if (networkId == null) {networkId = ""}
+                       } catch (Exception) {
+                               networkId = ""
+                               utils.log("DEBUG", " No 'network-id' found in '<network-outputs>' ! ", isDebugEnabled)
+                       }
+                       String requestId = execution.getVariable("UPDNETI_requestId")
+
+                       String statusMessage = "Network successfully updated."
+
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>COMPLETED</requestStatus>
+                                                               <progress>100</progress>
+                                                               <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
+                                <networkId>${networkId}</networkId>
+                                                       </ns:updateInfraRequest>
+                                               </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  String buildDeleteDBRequestAsString = utils.formatXml(dbRequest)
+                  execution.setVariable("UPDNETI_updateDBRequest", buildDeleteDBRequestAsString)
+                  utils.log("DEBUG", " DB Adapter Request - " + "\n" + buildDeleteDBRequestAsString, isDebugEnabled)
+                  utils.logAudit(buildDeleteDBRequestAsString)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareDBRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+       public void prepareDBRequestError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       utils.log("DEBUG", " ***** Inside prepareDBRequestError of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+                       String statusMessage = ""
+                       WorkflowException wfe = null
+                       if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+                               wfe = execution.getVariable("WorkflowException")
+                               statusMessage = wfe.getErrorMessage()
+                       } else {
+                          String workflowException = execution.getVariable("WorkflowException")
+                          try {
+                                 statusMessage = utils.getNodeText1(workflowException, "ErrorMessage")
+                          } catch (Exception ex) {
+                                 statusMessage = "Encountered Error during DB Update. " + ex.getMessage()
+                          }
+                       }
+                       String networkOutputs = execution.getVariable("UPDNETI_networkOutputs")
+                       String requestId = execution.getVariable("UPDNETI_requestId")
+                       String networkId = ""
+                       try {
+                               networkId = utils.getNodeText1(networkOutputs, "network-id")
+                               if (networkId == null) {networkId = ""}
+                       } catch (Exception) {
+                               networkId = ""
+                               utils.log("DEBUG", " No 'network-id' found in '<network-outputs>' ! ", isDebugEnabled)
+                       }
+                       String networkName = ""
+                       try {
+                                networkName = utils.getNodeText1(networkOutputs, "network-name")
+                                if (networkName == null) {networkName = ""}
+                       } catch (Exception ex) {
+                               networkName = ""
+                               utils.log("DEBUG", " No 'network-name' found in '<network-outputs>' ! ", isDebugEnabled)
+                       }
+                       String dbRequest =
+                                       """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+                                               <soapenv:Header/>
+                                               <soapenv:Body>
+                                                       <ns:updateInfraRequest xmlns:ns="http://com.att.mso/requestsdb">
+                                                               <requestId>${requestId}</requestId>
+                                                               <lastModifiedBy>BPMN</lastModifiedBy>
+                                                               <statusMessage>${statusMessage}</statusMessage>
+                                                               <responseBody></responseBody>
+                                                               <requestStatus>FAILED</requestStatus>
+                                                               <vnfOutputs>&lt;network-id&gt;${networkId}&lt;/network-id&gt;&lt;network-name&gt;${networkName}&lt;/network-names&gt;</vnfOutputs>
+                                                       </ns:updateInfraRequest>
+                                               </soapenv:Body>
+                                          </soapenv:Envelope>"""
+
+                  execution.setVariable("UPDNETI_updateDBRequest", dbRequest)
+                  utils.log("DEBUG", " DB Adapter Request - " + "\n" + dbRequest, isDebugEnabled)
+                  utils.logAudit(dbRequest)
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareDBRequestError() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+        }
+
+
+       // **************************************************
+       //     Post or Validate Response Section
+       // **************************************************
+
+       public void validateUpdateNetworkResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside validateUpdateNetworkResponse of UpdateNetworkInstanceInfra *****", isDebugEnabled)
+
+               try {
+                       String returnCode = execution.getVariable("UPDNETI_networkReturnCode")
+                       String networkResponse = execution.getVariable("UPDNETI_updateNetworkResponse")
+                       if (networkResponse==null)      {
+                               networkResponse="" // reset
+                       }
+
+                       utils.log("DEBUG", " Network Adapter update responseCode: " + returnCode, isDebugEnabled)
+
+                       String errorMessage = ""
+                       if (returnCode == "200") {
+                               execution.setVariable("UPDNETI_isNetworkRollbackNeeded", true)
+                               utils.logAudit(networkResponse)
+                               execution.setVariable("UPDNETI_updateNetworkResponse", networkResponse)
+                               utils.log("DEBUG", " Network Adapter update Success Response - " + "\n" + networkResponse, isDebugEnabled)
+
+                               // prepare rollback data
+                               String rollbackData = utils.getNodeXml(networkResponse, "rollback", false).replace("tag0:","").replace(":tag0","")
+                               String rollbackNetwork =
+                                       """<NetworkAdapter:rollbackNetwork xmlns:NetworkAdapter="http://com.att.mso/network">
+                                                       ${rollbackData}
+                                               </NetworkAdapter:rollbackNetwork>"""
+                               String rollbackNetworkXml = utils.formatXml(rollbackNetwork)
+                               execution.setVariable("UPDNETI_rollbackNetworkRequest", rollbackNetworkXml)
+                               utils.log("DEBUG", " Network Adapter rollback data - " + "\n" + rollbackNetworkXml, isDebugEnabled)
+
+                       } else { // network error
+                          if (returnCode.toInteger() > 399 && returnCode.toInteger() < 600) {   //4xx, 5xx
+                                  if (networkResponse.contains("updateNetworkError")) {
+                                          networkResponse = networkResponse.replace('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>', '')
+                                          errorMessage = utils.getNodeText1(networkResponse, "message")
+                                          errorMessage  = "Received error from Network Adapter: " + errorMessage
+                                          exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+                                  } else { // CatchAll exception
+                                          if (returnCode == "500") {
+                                                  errorMessage = "JBWEB000065: HTTP Status 500."
+                                      } else {
+                                              errorMessage = "Return code is " + returnCode
+                                      }
+                                          errorMessage  = "Received error from Network Adapter: " + errorMessage
+                                          exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+
+                                  }
+
+                          } else { // CatchAll exception
+                                  String dataErrorMessage  = "Received error from Network Adapter. Return code is: " + returnCode
+                                  exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+                          }
+
+                       }
+
+               } catch (BpmnError e) {
+                       throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. validateUpdateNetworkResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+
+       }
+
+       public void validateSDNCResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside validateSDNCResponse of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               String response = execution.getVariable("UPDNETI_changeAssignSDNCResponse")
+               WorkflowException workflowException = null
+               try {
+                       workflowException = execution.getVariable("UPDNETI_WorkflowException")
+                       //execution.setVariable("WorkflowException", workflowException)
+               } catch (Exception ex) {
+                       utils.log("DEBUG", " Sdnc 'WorkflowException' object is empty or null. ", isDebugEnabled)
+               }
+
+               boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
+
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
+               // reset variable
+               String changeAssignSDNCResponseDecodeXml = sdncAdapterUtils.decodeXML(execution.getVariable("UPDNETI_changeAssignSDNCResponse"))
+               changeAssignSDNCResponseDecodeXml = changeAssignSDNCResponseDecodeXml.replace("&", "&amp;").replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+               execution.setVariable("UPDNETI_changeAssignSDNCResponse", changeAssignSDNCResponseDecodeXml)
+
+               if (execution.getVariable("UPDNETI_sdncResponseSuccess") == true) {  // from sdnc util, prefix+'sdncResponseSuccess'
+                       execution.setVariable("UPDNETI_isSdncRollbackNeeded", true)
+                       utils.log("DEBUG", "Successfully Validated SDNC Response", isDebugEnabled)
+
+               } else {
+                       utils.log("DEBUG", "Did NOT Successfully Validated SDNC Response", isDebugEnabled)
+                       throw new BpmnError("MSOWorkflowException")
+               }
+
+       }
+
+
+       public void postProcessResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside postProcessResponse of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       // Display DB response: UPDNETI_updateDBResponse / UPDNETI_dbReturnCode
+                       String dbReturnCode = execution.getVariable("UPDNETI_dbReturnCode")
+                       utils.log("DEBUG", " ***** DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+                       String updateDBResponse =  execution.getVariable("UPDNETI_updateDBResponse")
+                       utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + updateDBResponse, isDebugEnabled)
+                       utils.logAudit(updateDBResponse)
+
+                       String source = execution.getVariable("UPDNETI_source")
+                       String requestId = execution.getVariable("UPDNETI_requestId")
+
+                       String msoCompletionRequest =
+                               """<aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                               xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                                               <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                                       <request-id>${requestId}</request-id>
+                                                       <action>UPDATE</action>
+                                                       <source>${source}</source>
+                                               </request-info>
+                                               <aetgt:mso-bpel-name>BPMN Network action: UPDATE</aetgt:mso-bpel-name>
+                                       </aetgt:MsoCompletionRequest>"""
+
+                               // Format Response
+                       String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+                       if (dbReturnCode == "200") {
+                               utils.logAudit(updateDBResponse)
+                               utils.logAudit(xmlMsoCompletionRequest)
+                               execution.setVariable("UPDNETI_Success", true)
+                               execution.setVariable("UPDNETI_CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+                               utils.log("DEBUG", " Overall SUCCESS Response going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+                               
+                       } else {
+                               String errorMessage = " DB Update failed, code: " + dbReturnCode
+                               utils.log("DEBUG", errorMessage, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+                               
+                       }
+
+
+               } catch (BpmnError e) {
+               throw e;
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. postProcessResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+        }
+
+
+       }
+
+       public void prepareSDNCRollbackRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Inside prepareSDNCRollbackRequest of UpdateNetworkInstanceInfra ***** ", isDebugEnabled)
+
+               try {
+                       // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException. 
+                       execution.setVariable("UPDNETI_WorkflowException", execution.getVariable("WorkflowException"))
+                       // get variables
+                       String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+                       String updateNetworkInput = execution.getVariable("UPDNETI_networkRequest")
+                       String cloudRegionId = execution.getVariable("UPDNETI_cloudRegionSdnc")
+                       String changeAssignSDNCResponse = execution.getVariable("UPDNETI_changeAssignSDNCResponse")
+                       String networkId = utils.getNodeText1(changeAssignSDNCResponse, "network-id")
+
+                       String serviceInstanceId = utils.getNodeText1(updateNetworkInput, "service-instance-id")
+
+                       // 2. prepare rollback topology via SDNC Adapter SUBFLOW call
+                       String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, updateNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null)
+                       String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
+                       execution.setVariable("UPDNETI_rollbackSDNCRequest", sndcTopologyRollbackRequestAsString)
+                       utils.log("DEBUG", " Preparing request for SDNC Topology assign's rollback/compensation . . . - " + "\n" +  sndcTopologyRollbackRequestAsString, isDebugEnabled)
+
+
+               } catch (Exception ex) {
+                       String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. prepareSDNCRollbackRequest() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+       }
+
+       public void validateRollbackResponses (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+                       // Note: Updates do not support rollback.  To restore a previous state, another Update would be needed to revert to the original settings.  
+                       // This would need to be managed by the client.
+                       String rollbackNetworkErrorMessages = ""
+                       Boolean isNetworkRollbackNeeded = execution.getVariable("UPDNETI_isNetworkRollbackNeeded")
+                       if (isNetworkRollbackNeeded == true) {
+                               rollbackNetworkErrorMessages = " + PO Network rollback is not supported for Update. Submit another Update to restore/rollback."
+                       }
+
+                       // validate SDNC rollback response
+                       String rollbackSdncErrorMessages = ""
+                       Boolean isSdncRollbackNeeded = execution.getVariable("UPDNETI_isSdncRollbackNeeded")
+                       if (isSdncRollbackNeeded == true) {
+                               String rollbackSDNCReturnCode = execution.getVariable("UPDNETI_rollbackSDNCReturnCode")
+                               String rollbackSDNCReturnInnerCode = ""
+                               String rollbackSDNCResponse = execution.getVariable("UPDNETI_rollbackSDNCResponse")
+                               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+                               rollbackSDNCResponse = sdncAdapterUtils.decodeXML(rollbackSDNCResponse)
+                               rollbackSDNCResponse = rollbackSDNCResponse.replace("&", "&amp;").replace('$', '').replace('<?xml version="1.0" encoding="UTF-8"?>', "")
+
+                               if (rollbackSDNCReturnCode == "200") {
+                                       if (utils.nodeExists(rollbackSDNCResponse, "response-code")) {
+                                               rollbackSDNCReturnInnerCode = utils.getNodeText1(rollbackSDNCResponse, "response-code")
+                                               if (rollbackSDNCReturnInnerCode == "200" || rollbackSDNCReturnInnerCode == "" || rollbackSDNCReturnInnerCode == "0") {
+                                               rollbackSdncErrorMessages = " + SNDC rollback completed."
+                                               } else {
+                                                       rollbackSdncErrorMessages = " + SDNC rollback failed. "
+                                               }
+                                       } else {
+                                         rollbackSdncErrorMessages = " + SNDC rollback completed."
+                                       }
+                               } else {
+                                         rollbackSdncErrorMessages = " + SDNC rollback failed. "
+                               }
+
+                               utils.log("DEBUG", " SDNC rollback Code - " + rollbackSDNCReturnCode, isDebugEnabled)
+                               utils.log("DEBUG", " SDNC rollback  Response - " + rollbackSDNCResponse, isDebugEnabled)
+
+                       }
+
+                       //WorkflowException wfe = execution.getVariable("WorkflowException")
+                       //String statusMessage = wfe.getErrorMessage()
+                       //int errorCode = wfe.getErrorCode()
+                       
+                       String statusMessage = ""
+                       int errorCode = 0
+                       WorkflowException wfe = execution.getVariable("WorkflowException")
+                       if (wfe instanceof WorkflowException) { 
+                         statusMessage = wfe.getErrorMessage()
+                         errorCode = wfe.getErrorCode()
+                       } else {
+                          if (execution.getVariable("UPDNETI_WorkflowException") instanceof WorkflowException) {
+                                 // get saved WorkflowException  
+                             WorkflowException swfe = execution.getVariable("UPDNETI_WorkflowException")
+                             statusMessage = swfe.getErrorMessage()
+                             errorCode =  swfe.getErrorCode()
+                          } else {
+                             statusMessage = "Encountered Error, please see previous tasks/activities/steps for error messages."
+                             errorCode = 7000
+                      }   
+                       } 
+
+                       // recreate WorkflowException to include the rollback Message
+                       statusMessage =  statusMessage + rollbackNetworkErrorMessages + rollbackSdncErrorMessages
+                       exceptionUtil.buildWorkflowException(execution, errorCode, statusMessage)
+
+               } catch (Exception ex) {
+                       execution.setVariable("WorkflowException", null)
+                       String exceptionMessage = " Bpmn error encountered in UpdateNetworkInstanceInfra flow. validateRollbackResponses() - " + ex.getMessage()
+                       utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+                       exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
+
+               }
+
+
+
+       }
+
+       // *******************************
+       //     Build Error Section
+       // *******************************
+
+       // Prepare for FalloutHandler
+       public void buildErrorResponse (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               utils.log("DEBUG", " ***** Prepare for FalloutHandler. FAILURE - prepare request for sub-process FalloutHandler. *****", isDebugEnabled)
+
+               String dbReturnCode = execution.getVariable("UPDNETI_dbReturnCode")
+               utils.log("DEBUG", " ***** DB Update Response Code  : " + dbReturnCode, isDebugEnabled)
+               String updateDBResponse =  execution.getVariable("UPDNETI_updateDBResponse")
+               utils.log("DEBUG", " ***** DB Update Response String: " + '\n' + updateDBResponse, isDebugEnabled)
+               utils.logAudit(updateDBResponse)
+
+               String falloutHandlerRequest = ""
+               String requestId = execution.getVariable("UPDNETI_requestId")
+               String source = execution.getVariable("UPDNETI_source")
+               try {
+                       execution.setVariable("UPDNETI_Success", false)
+                       WorkflowException wfe = execution.getVariable("WorkflowException")
+                       String errorCode = String.valueOf(wfe.getErrorCode())
+                       String errorMessage = wfe.getErrorMessage()
+                       falloutHandlerRequest =
+                           """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                             <request-id>${requestId}</request-id>
+                                             <action>UPDATE</action>
+                                             <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+
+                       utils.logAudit(falloutHandlerRequest)
+                       execution.setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("DEBUG", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               } catch (Exception ex) {
+                       String errorException = "  Bpmn error encountered in UpdateNetworkInstanceInfra flow. FalloutHandlerRequest,  buildErrorResponse() - " + ex.getMessage()
+                       utils.log("DEBUG", errorException, isDebugEnabled)
+                       falloutHandlerRequest =
+                       """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                                                    xmlns:ns="http://ecomp.att.com/mso/request/types/v1"
+                                                                    xmlns:wfsch="http://ecomp.att.com/mso/workflow/schema/v1">
+                                          <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                                             <request-id>${requestId}</request-id>
+                                             <action>UPDATE</action>
+                                             <source>${source}</source>
+                                          </request-info>
+                                               <aetgt:WorkflowException xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1">
+                                                       <aetgt:ErrorMessage>${errorException}</aetgt:ErrorMessage>
+                                                       <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+                                               </aetgt:WorkflowException>
+                                       </aetgt:FalloutHandlerRequest>"""
+
+                       execution.setVariable("UPDNETI_FalloutHandlerRequest", falloutHandlerRequest)
+                       utils.log("DEBUG", "  Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, isDebugEnabled)
+
+               }
+
+       }
+
+
+       public void sendSyncError (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix", Prefix)
+
+               try {
+
+                       String requestId = execution.getVariable("att-mso-request-id")
+
+                       // REST Error (for API Handler (APIH) Reply Task)
+                       String syncError = """{"requestReferences":{"instanceId":"","requestId":"${requestId}"}}""".trim()
+
+                       sendWorkflowResponse(execution, 500, syncError)
+
+               } catch (Exception ex) {
+                       utils.log("DEBUG", " Bpmn error encountered in UpdateNetworkInstanceInfra flow. sendSyncError() - " + ex.getMessage(), isDebugEnabled)
+               }
+
+       }
+
+
+       public void processJavaException(Execution execution){
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               execution.setVariable("prefix",Prefix)
+               try{
+                       utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+                       utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+                       utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+                       execution.setVariable("UnexpectedError", "Caught a Java Lang Exception")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+               }catch(BpmnError b){
+                       utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+                       throw b
+               }catch(Exception e){
+                       utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+                       execution.setVariable("UnexpectedError", "Exception in processJavaException method")  // Adding this line temporarily until this flows error handling gets updated
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+               }
+               utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleInfra.groovy
new file mode 100644 (file)
index 0000000..57c5269
--- /dev/null
@@ -0,0 +1,426 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.json.JsonSlurper
+import groovy.util.Node
+import groovy.util.XmlParser;
+import groovy.xml.QName
+
+import java.io.Serializable;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
+               
+       /**
+        * Initialize the flow's variables.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void initProcessVariables(Execution execution) {
+               execution.setVariable('prefix', 'UPDVfModI_')
+               execution.setVariable('UPDVfModI_Request', null)
+               execution.setVariable('UPDVfModI_requestInfo', null)
+               execution.setVariable('UPDVfModI_requestId', null)
+               execution.setVariable('UPDVfModI_source', null)
+               execution.setVariable('UPDVfModI_vnfInputs', null)
+               execution.setVariable('UPDVfModI_vnfId', null)
+               execution.setVariable('UPDVfModI_vfModuleId', null)
+               execution.setVariable('UPDVfModI_tenantId', null)
+               execution.setVariable('UPDVfModI_volumeGroupId', null)
+               execution.setVariable('UPDVfModI_vnfParams', null)
+               execution.setVariable('UPDVfModI_updateInfraRequest', null)
+               execution.setVariable('UpdateVfModuleSuccessIndicator', false)
+       }       
+       
+       /**
+        * Check for missing elements in the received request.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void preProcessRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               
+               initProcessVariables(execution)
+               
+               def prefix = "UPDVfModI_"
+               
+               execution.setVariable("isVidRequest", "false")
+               
+               def incomingRequest = execution.getVariable('bpmnRequest')
+               
+               utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled)
+               
+               // check if request is xml or json
+               try {
+                       def jsonSlurper = new JsonSlurper()
+                       Map reqMap = jsonSlurper.parseText(incomingRequest)
+                       utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
+                       
+                       def serviceInstanceId = execution.getVariable('serviceInstanceId')
+                       def vnfId = execution.getVariable('vnfId')
+                       
+                       def vidUtils = new VidUtils(this)
+                       
+                       String requestInXmlFormat = vidUtils.createXmlVfModuleRequest(execution, reqMap, 'UPDATE_VF_MODULE', serviceInstanceId)
+                       
+                       utils.log("DEBUG", " Request in XML format: " + requestInXmlFormat, isDebugLogEnabled)
+                       
+                       execution.setVariable(prefix + 'Request', requestInXmlFormat)
+                       execution.setVariable(prefix+'vnfId', vnfId)
+                       execution.setVariable("isVidRequest", "true")                   
+                       
+               }
+               catch(groovy.json.JsonException je) {
+                       utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
+                       workflowException(execution, "Invalid request format", 400)
+                       
+               }
+               catch(Exception e) {
+                       String restFaultMessage = e.getMessage()                        
+                       utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
+                       workflowException(execution, restFaultMessage, 400)
+               }
+                               
+
+               try {
+                       
+                       String request = validateInfraRequest(execution)
+                       
+                       def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+                       execution.setVariable('UPDVfModI_requestInfo', requestInfo)
+                       execution.setVariable('UPDVfModI_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+                       execution.setVariable('UPDVfModI_source', getNodeTextForce(requestInfo, 'source'))
+                       
+                       def vnfInputs = getRequiredNodeXml(execution, request, 'vnf-inputs')
+                       execution.setVariable('UPDVfModI_vnfInputs', vnfInputs)
+                       execution.setVariable('UPDVfModI_vnfId', getRequiredNodeText(execution, vnfInputs, 'vnf-id'))
+                       execution.setVariable('UPDVfModI_vfModuleId', getRequiredNodeText(execution, vnfInputs, 'vf-module-id'))
+                       execution.setVariable('UPDVfModI_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
+                       execution.setVariable('UPDVfModI_volumeGroupId', getNodeTextForce(vnfInputs, 'volume-group-id'))
+
+                       def vnfParams = utils.getNodeXml(request, 'vnf-params')
+                       execution.setVariable('UPDVfModI_vnfParams', vnfParams)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Prepare and send the sychronous response for this flow.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void sendSynchResponse(Execution execution) {
+               def method = getClass().getSimpleName() + '.sendSynchResponse(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               
+               try {
+                       def requestInfo = execution.getVariable('UPDVfModI_requestInfo')
+                       def requestId = execution.getVariable('UPDVfModI_requestId')
+                       def source = execution.getVariable('UPDVfModI_source')
+                       def progress = getNodeTextForce(requestInfo, 'progress')
+                       if (progress.isEmpty()) {
+                               progress = '0'
+                       }
+                       def startTime = getNodeTextForce(requestInfo, 'start-time')
+                       if (startTime.isEmpty()) {
+                               startTime = System.currentTimeMillis()
+                       }                       
+                               
+                       // RESTResponse (for API Handler (APIH) Reply Task)
+                       def vfModuleId = execution.getVariable("vfModuleId")
+                       String synchResponse = """{"requestReferences":{"instanceId":"${vfModuleId}","requestId":"${requestId}"}}""".trim()
+                       
+                       sendWorkflowResponse(execution, 200, synchResponse)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Prepare the Request for invoking the DoUpdateVfModule subflow.
+        * 
+        * NOTE: Currently, the method just logs passing through as the
+        * incoming Request to this main flow is used as the Request to
+        * the DoUpdateVfModule subflow. No preparation processing is
+        * necessary.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void prepDoUpdateVfModule(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepDoUpdateVfModule(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Prepare the Request for updating the DB for this Infra Request.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void prepUpdateInfraRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.prepUpdateInfraRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestId = execution.getVariable('UPDVfModI_requestId')
+                       def vnfId = execution.getVariable('UPDVfModI_vnfId')
+                       def vfModuleId = execution.getVariable('UPDVfModI_vfModuleId')
+                       def tenantId = execution.getVariable('UPDVfModI_tenantId')
+                       def volumeGroupId = execution.getVariable('UPDVfModI_volumeGroupId')
+                       
+                       String updateInfraRequest = """
+                               <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                                               xmlns:req="http://com.att.mso/requestsdb">
+                                       <soapenv:Header/>
+                                       <soapenv:Body>
+                                               <req:updateInfraRequest>
+                                                       <requestId>${requestId}</requestId>
+                                                       <lastModifiedBy>BPEL</lastModifiedBy>
+                                                       <requestStatus>COMPLETE</requestStatus>
+                                                       <progress>100</progress>
+                                                       <vnfOutputs>
+                                                               <vnf-id>${vnfId}</vnf-id>
+                                                               <vf-module-id>${vfModuleId}</vf-module-id>
+                                                               <tenant-id>${tenantId}</tenant-id>
+                                                               <volume-group-id>${volumeGroupId}</volume-group-id>
+                                                       </vnfOutputs>
+                                               </req:updateInfraRequest>
+                                       </soapenv:Body>
+                               </soapenv:Envelope>
+                       """
+
+                       updateInfraRequest = utils.formatXml(updateInfraRequest)
+                       execution.setVariable('UPDVfModI_updateInfraRequest', updateInfraRequest)
+                       logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage())
+               }
+       }
+       
+       /**
+        * Builds a "CompletionHandler" request and stores it in the specified execution variable.
+        * 
+        * @param execution the execution
+        * @param resultVar the execution variable in which the result will be stored
+        */
+       public void completionHandlerPrep(Execution execution, String resultVar) {
+               def method = getClass().getSimpleName() + '.completionHandlerPrep(' +
+                       'execution=' + execution.getId() +
+                       ', resultVar=' + resultVar +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def requestInfo = getVariable(execution, 'UPDVfModI_requestInfo')
+                       
+                       String content = """
+                               <sdncadapterworkflow:MsoCompletionRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1">
+                                       ${requestInfo}
+                                       <sdncadapterworkflow:mso-bpel-name>MSO_ACTIVATE_BPEL</sdncadapterworkflow:mso-bpel-name>
+                               </sdncadapterworkflow:MsoCompletionRequest>
+                       """
+
+                       content = utils.formatXml(content)
+                       logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+                       execution.setVariable(resultVar, content)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 2000, 'Internal Error')
+               }
+       }
+
+       /**
+        * Builds a "FalloutHandler" request and stores it in the specified execution variable.
+        * 
+        * @param execution the execution
+        * @param resultVar the execution variable in which the result will be stored
+        */
+       public void falloutHandlerPrep(Execution execution, String resultVar) {
+               def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
+                       'execution=' + execution.getId() +
+                       ', resultVar=' + resultVar +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+               
+               try {
+                       def prefix = execution.getVariable('prefix')
+                       def request = getVariable(execution, prefix+'Request')
+                       def requestInformation = utils.getNodeXml(request, 'request-info', false)
+                       
+                       def WorkflowException workflowException = execution.getVariable("WorkflowException")
+                       def errorResponseCode = workflowException.getErrorCode()
+                       def errorResponseMsg = workflowException.getErrorMessage()
+                       def encErrorResponseMsg = ""
+                       if (errorResponseMsg != null) {
+                               encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+                       }
+
+                       String content = """
+                               <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                               xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1"
+                                               xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
+                                               xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
+                                       ${requestInformation}
+                                       <sdncadapterworkflow:WorkflowException>
+                                               <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+                                               <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+                                       </sdncadapterworkflow:WorkflowException>        
+                               </sdncadapterworkflow:FalloutHandlerRequest>
+                       """
+                       content = utils.formatXml(content)
+                       logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
+                       execution.setVariable(resultVar, content)
+
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 2000, 'Internal Error')
+               }
+       }
+       
+       /**
+        * Validates the request, request id and service instance id.  If a problem is found,
+        * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
+        * method also sets up the log context for the workflow.
+        * @param execution the execution
+        * @return the validated request
+        */
+       public String validateInfraRequest(Execution execution) {
+               def method = getClass().getSimpleName() + '.validateInfraRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String processKey = getProcessKey(execution);
+               def prefix = execution.getVariable("prefix")
+
+               if (prefix == null) {
+                       createWorkflowException(execution, 1002, processKey + " prefix is null")
+               }
+
+               try {
+                       def request = execution.getVariable(prefix + 'Request')
+
+                       if (request == null) {
+                               request = execution.getVariable(processKey + 'Request')
+       
+                               if (request == null) {
+                                       request = execution.getVariable('bpmnRequest')
+                               }
+       
+                               setVariable(execution, processKey + 'Request', null);
+                               setVariable(execution, 'bpmnRequest', null);
+                               setVariable(execution, prefix + 'Request', request);
+                       }
+
+                       if (request == null) {
+                               createWorkflowException(execution, 1002, processKey + " request is null")
+                       }
+                       
+                       /*
+
+                       def requestId = execution.getVariable("att-mso-request-id")
+                       
+                       if (requestId == null) {
+                               createWorkflowException(execution, 1002, processKey + " request has no att-mso-request-id")
+                       }
+                       
+                       setVariable(execution, prefix + 'requestId', requestId)
+
+                       def serviceInstanceId = execution.getVariable("att-mso-service-instance-id")
+
+                       if (serviceInstanceId == null) {
+                               createWorkflowException(execution, 1002, processKey + " request message has no att-mso-service-instance-id")
+                       }
+
+                       utils.logContext(requestId, serviceInstanceId)
+                       */
+                       logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
+                       logDebug('Exited ' + method, isDebugLogEnabled)
+                       return request
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       logError('Caught exception in ' + method, e)
+                       createWorkflowException(execution, 1002, "Invalid Message")
+               }
+       }
+       
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/UpdateVfModuleVolumeInfraV1.groovy
new file mode 100644 (file)
index 0000000..b048df5
--- /dev/null
@@ -0,0 +1,530 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.json.JsonSlurper
+import java.util.concurrent.ExecutionException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+import org.springframework.web.util.UriUtils
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
+       
+       /**
+        * Initialize the flow's variables.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       private void initProcessVariables(Execution execution) {
+               execution.setVariable('prefix', 'UPDVfModVol_')
+               execution.setVariable('UPDVfModVol_Request', null)
+               execution.setVariable('UPDVfModVol_requestInfo', null)
+               execution.setVariable('UPDVfModVol_requestId', null)
+               execution.setVariable('UPDVfModVol_source', null)
+               execution.setVariable('UPDVfModVol_volumeInputs', null)
+               execution.setVariable('UPDVfModVol_volumeGroupId', null)
+               execution.setVariable('UPDVfModVol_vnfType', null)
+               execution.setVariable('UPDVfModVol_serviceId', null)
+               execution.setVariable('UPDVfModVol_aicCloudRegion', null)
+               execution.setVariable('UPDVfModVol_tenantId', null)
+               execution.setVariable('UPDVfModVol_volumeParams', null)
+               execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', null)
+               execution.setVariable('UPDVfModVol_volumeGroupTenantId', null)
+               execution.setVariable('UpdateVfModuleVolumeSuccessIndicator', false)
+       }
+       
+
+       /**
+        * Perform initial processing, such as request validation, initialization of variables, etc.
+        * * @param execution
+        */
+       public void preProcessRequest (Execution execution) {
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+               preProcessRequest(execution, isDebugEnabled)
+       }
+       
+       public void preProcessRequest(Execution execution, isDebugLogEnabled) {
+
+               initProcessVariables(execution)
+               String jsonRequest = validateRequest(execution)
+               
+               def request = ""
+               
+               try {
+                       def jsonSlurper = new JsonSlurper()
+                       Map reqMap = jsonSlurper.parseText(jsonRequest)
+                       
+                       def serviceInstanceId = execution.getVariable('serviceInstanceId')
+                       def volumeGroupId = execution.getVariable('volumeGroupId')
+                       //def vnfId = execution.getVariable('vnfId')
+                       
+                       def vidUtils = new VidUtils(this)
+                       request = vidUtils.createXmlVolumeRequest(reqMap, 'UPDATE_VF_MODULE_VOL', serviceInstanceId, volumeGroupId)
+                       
+                       execution.setVariable('UPDVfModVol_Request', request)
+                       execution.setVariable("UPDVfModVol_isVidRequest", true)
+                       
+                       //need to get persona-model-id aka model-invariantId to use later to validate vf-module relation in AAI
+                       
+                       def modelInvariantId = reqMap.requestDetails.modelInfo.modelInvariantId ?: ''
+                       execution.setVariable('UPDVfModVol_modelInvariantId', modelInvariantId)
+               
+                       utils.log("DEBUG", "XML request:\n" + request, isDebugLogEnabled)
+               }
+               catch(groovy.json.JsonException je) {
+                       utils.log("DEBUG", " Request is in XML format.", isDebugLogEnabled)
+                       // assume request is in XML format - proceed as usual to process XML request
+               }
+               
+               def requestId = execution.getVariable('att-mso-request-id')
+               
+               def requestInfo = getRequiredNodeXml(execution, request, 'request-info')
+               execution.setVariable('UPDVfModVol_requestInfo', requestInfo)
+               execution.setVariable('UPDVfModVol_requestId', requestId)
+               //execution.setVariable('UPDVfModVol_requestId', getRequiredNodeText(execution, requestInfo, 'request-id'))
+               execution.setVariable('UPDVfModVol_source', getNodeTextForce(requestInfo, 'source'))
+               
+               def volumeInputs = getRequiredNodeXml(execution, request, 'volume-inputs')
+               execution.setVariable('UPDVfModVol_volumeInputs', volumeInputs)
+               execution.setVariable('UPDVfModVol_volumeGroupId', getRequiredNodeText(execution, volumeInputs, 'volume-group-id'))
+               execution.setVariable('UPDVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
+               execution.setVariable('UPDVfModVol_vnfVersion', getRequiredNodeText(execution, volumeInputs, 'asdc-service-model-version'))
+               execution.setVariable('UPDVfModVol_serviceId', getRequiredNodeText(execution, volumeInputs, 'service-id'))
+               execution.setVariable('UPDVfModVol_aicCloudRegion', getRequiredNodeText(execution, volumeInputs, 'aic-cloud-region'))
+               execution.setVariable('UPDVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
+
+               def volumeParams = utils.getNodeXml(request, 'volume-params')
+               execution.setVariable('UPDVfModVol_volumeParams', volumeParams)
+       }
+
+       /**
+        * Prepare and send the synchronous response.
+        * 
+        * @param execution The flow's execution instance.
+        */
+       public void sendSynchResponse(Execution execution, isDebugLogEnabled) {
+
+               def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+               def requestId = execution.getVariable('UPDVfModVol_requestId')
+               def source = execution.getVariable('UPDVfModVol_source')
+               def progress = getNodeTextForce(requestInfo, 'progress')
+               if (progress.isEmpty()) {
+                       progress = '0'
+               }
+               def startTime = getNodeTextForce(requestInfo, 'start-time')
+               if (startTime.isEmpty()) {
+                       startTime = System.currentTimeMillis()
+               }
+               def volumeInputs = execution.getVariable('UPDVfModVol_volumeInputs')
+               
+               String xmlSyncResponse = """
+                       <volume-request xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                               <request-info>
+                                       <request-id>${requestId}</request-id>
+                                       <action>UPDATE_VF_MODULE_VOL</action>
+                                       <request-status>IN_PROGRESS</request-status>
+                                       <progress>${progress}</progress>
+                                       <start-time>${startTime}</start-time>
+                                       <source>${source}</source>
+                               </request-info>
+                               ${volumeInputs}
+                       </volume-request>
+               """
+
+               def syncResponse = ''
+               def isVidRequest = execution.getVariable('UPDVfModVol_isVidRequest')
+               
+               if(isVidRequest) {
+                       def volumeGroupId = execution.getVariable('volumeGroupId')
+                       syncResponse = """{"requestReferences":{"instanceId":"${volumeGroupId}","requestId":"${requestId}"}}""".trim()
+               } 
+               else {
+                       syncResponse = utils.formatXml(xmlSyncResponse)
+               }
+               
+               logDebug('Sync response: ' + syncResponse, isDebugLogEnabled)
+               execution.setVariable('UPDVfModVol_syncResponseSent', true)
+               sendWorkflowResponse(execution, 200, syncResponse)
+       }
+       
+       /**
+        * Prepare a Request for querying AAI for Volume Group information using the
+        * Volume Group Id and Aic Cloud Region.
+        * @param execution The flow's execution instance.
+        */
+       public void queryAAIForVolumeGroup(Execution execution, isDebugLogEnabled) {
+
+               def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+               def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(execution)
+               String queryAAIVolumeGroupRequest = aaiEndpoint + '/' + URLEncoder.encode(aicCloudRegion, "UTF-8") + "/volume-groups/volume-group/" + UriUtils.encode(volumeGroupId, "UTF-8")
+               
+               utils.logAudit('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest)
+               logDebug('Query AAI volume group by ID: ' + queryAAIVolumeGroupRequest, isDebugLogEnabled)
+               
+               APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVolumeGroupRequest)
+               
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+               
+               utils.logAudit("AAI query volume group by id return code: " + returnCode)
+               utils.logAudit("AAI query volume group by id response: " + aaiResponseAsString)
+               
+               logDebug("AAI Volume Group return code: " + returnCode, isDebugLogEnabled)
+               logDebug("AAI Volume Group response: " + aaiResponseAsString, isDebugLogEnabled)
+               
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               
+               if ((returnCode == '200') || (returnCode == '204')) {
+                       
+                       execution.setVariable('UPDVfModVol_aaiVolumeGroupResponse', aaiResponseAsString)
+                       //def heatStackId = getNodeTextForce(aaiResponseAsString, 'heat-stack-id')
+                       //execution.setVariable('UPDVfModVol_volumeGroupHeatStackId', heatStackId)
+                       
+                       def volumeGroupTenantId = getTenantIdFromVolumeGroup(aaiResponseAsString)
+                       if (volumeGroupTenantId == null) {
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Could not find Tenant Id element in Volume Group with Volume Group Id " + volumeGroupId
+                                       + ", AIC Cloud Region " + aicCloudRegion)
+                       }
+                       execution.setVariable('UPDVfModVol_volumeGroupTenantId', volumeGroupTenantId)
+                       logDebug("Received Tenant Id " + volumeGroupTenantId + " from AAI for Volume Group with Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion, isDebugLogEnabled)
+
+                       def relatedVfModuleLink = getRelatedVfModuleRelatedLink(aaiResponseAsString)
+                       logDebug("Related VF Module link: " + relatedVfModuleLink, isDebugLogEnabled)
+                       execution.setVariable('UPDVfModVol_relatedVfModuleLink', relatedVfModuleLink)
+                       
+               } 
+               else if (returnCode == '404') {
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Volume Group " + volumeGroupId + " not found at AAI")
+               } 
+               else {
+                       WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                       throw new BpmnError("MSOWorkflowException")
+               }
+       }
+       
+       /**
+        * Query AAI service instance
+        * @param execution
+        * @param isDebugEnabled
+        */
+       public void queryAAIForGenericVnf(Execution execution, isDebugEnabled) {
+               
+               def vnfId = execution.getVariable('vnfId')
+               
+               AaiUtil aaiUtil = new AaiUtil(this)
+               String aaiEndpoint = aaiUtil.getNetworkGenericVnfEndpoint(execution)
+               def String queryAAIRequest = aaiEndpoint + "/" + UriUtils.encode(vnfId, "UTF-8")
+               
+               utils.logAudit("AAI query generic vnf request: " + queryAAIRequest)
+               
+               APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIRequest)
+               
+               String returnCode = response.getStatusCode()
+               String aaiResponseAsString = response.getResponseBodyAsString()
+               aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+               
+               utils.logAudit("AAI query generic vnf return code: " + returnCode)
+               utils.logAudit("AAI query generic vnf response: " + aaiResponseAsString)
+
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               
+               if (returnCode=='200') {
+                       utils.log("DEBUG", 'Generic vnf ' + vnfId + ' found in AAI.', isDebugEnabled)
+                       execution.setVariable('UPDVfModVol_AAIQueryGenericVfnResponse', aaiResponseAsString)
+               } else {
+                       if (returnCode=='404') {
+                               def message = 'Generic vnf ' + vnfId + ' was not found in AAI. Return code: 404.'
+                               utils.log("DEBUG", message, isDebugEnabled)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, message)
+                       } else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       }
+       
+       /**
+        * Query AAI for VF Module using vf-module-id
+        * @param execution
+        * @param isDebugLogEnabled
+        */
+       public void queryAAIForVfModule(Execution execution, isDebugLogEnabled) {
+               
+                       AaiUtil aaiUtil = new AaiUtil(this)
+                       String queryAAIVfModuleRequest = execution.getVariable('UPDVfModVol_relatedVfModuleLink')
+                       execution.setVariable('UPDVfModVol_personaModelId', '')
+                       
+                       utils.logAudit('Query AAI VF Module: ' + queryAAIVfModuleRequest)
+                       logDebug('Query AAI VF Module: ' + queryAAIVfModuleRequest, isDebugLogEnabled)
+                       
+                       APIResponse response = aaiUtil.executeAAIGetCall(execution, queryAAIVfModuleRequest)
+                       
+                       String returnCode = response.getStatusCode()
+                       String aaiResponseAsString = response.getResponseBodyAsString()
+                       aaiResponseAsString = StringEscapeUtils.unescapeXml(aaiResponseAsString)
+                       
+                       utils.logAudit("AAI query vf-module: " + returnCode)
+                       utils.logAudit("AAI query vf-module response: " + aaiResponseAsString)
+                       
+                       logDebug("AAI query vf-module:: " + returnCode, isDebugLogEnabled)
+                       logDebug("AAI query vf-module response: " + aaiResponseAsString, isDebugLogEnabled)
+                       
+                       ExceptionUtil exceptionUtil = new ExceptionUtil()
+                       
+                       if ((returnCode == '200') || (returnCode == '204')) {
+                               def personaModelId =  utils.getNodeText1(aaiResponseAsString, 'persona-model-id')
+                               execution.setVariable('UPDVfModVol_personaModelId', personaModelId)
+                       }
+                       else if (returnCode == '404') {
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "VF Module not found at AAI")
+                       }
+                       else {
+                               WorkflowException aWorkflowException = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               }
+       /**
+        * 
+        */
+       public String getRelatedVfModuleRelatedLink(xml) {
+               def list = new XmlSlurper().parseText(xml)
+               def vfModuleRelationship = list.'**'.find { node -> node.'related-to'.text() == 'vf-module'     }
+               return vfModuleRelationship?.'related-link'?.text() ?: ''
+       }
+       
+       /**
+        * Prepare a Request for invoking the VnfAdapterRest subflow to do
+        * a Volume Group update.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepVnfAdapterRest(Execution execution, isDebugLogEnabled) {
+               
+               def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+               def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+               def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+               
+               def aaiVolumeGroupResponse = execution.getVariable('UPDVfModVol_aaiVolumeGroupResponse')
+               def volumeGroupHeatStackId = getNodeTextForce(aaiVolumeGroupResponse, 'heat-stack-id')
+               def volumeGroupName = getNodeTextForce(aaiVolumeGroupResponse, 'volume-group-name')
+               
+               def vnfType = execution.getVariable('UPDVfModVol_vnfType')
+               def vnfVersion = execution.getVariable('UPDVfModVol_vnfVersion')
+               
+               def aaiGenericVnfResponse = execution.getVariable('UPDVfModVol_AAIQueryGenericVfnResponse')
+               def vnfId = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-id')
+               def vnfName = utils.getNodeText1(aaiGenericVnfResponse, 'vnf-name')
+
+               
+               def volumeParamsXml = execution.getVariable('UPDVfModVol_volumeParams')
+               def volumeGroupParams = transformVolumeParamsToEntries(volumeParamsXml)
+               
+               def requestId = execution.getVariable('UPDVfModVol_requestId')
+               def serviceId = execution.getVariable('UPDVfModVol_serviceId')
+               
+               def messageId = execution.getVariable('att-mso-request-id') + '-' + System.currentTimeMillis()
+               def notificationUrl = execution.getVariable("URN_mso_workflow_vnfadapter_rest_callback")
+               def useQualifiedHostName = execution.getVariable("URN_mso_use_qualified_host")
+               if ('true'.equals(useQualifiedHostName)) {
+                               notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
+               }
+
+               String vnfAdapterRestRequest = """
+                       <updateVolumeGroupRequest>
+                               <cloudSiteId>${aicCloudRegion}</cloudSiteId>
+                               <tenantId>${tenantId}</tenantId>
+                               <vnfId>${vnfId}</vnfId>
+                               <vnfName>${vnfName}</vnfName>
+                               <volumeGroupId>${volumeGroupId}</volumeGroupId>
+                               <volumeGroupName>${volumeGroupName}</volumeGroupName>
+                               <volumeGroupStackId>${volumeGroupHeatStackId}</volumeGroupStackId>
+                               <vnfType>${vnfType}</vnfType>
+                               <vnfVersion>${vnfVersion}</vnfVersion>
+                               <vfModuleType></vfModuleType>
+                               <volumeGroupParams>
+                                       <entry>
+                                               <key>vnf_id</key>
+                                               <value>${vnfId}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vnf_name</key>
+                                               <value>${vnfName}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vf_module_id</key>
+                                               <value>${volumeGroupId}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vf_module_name</key>
+                                               <value>${volumeGroupName}</value>
+                                       </entry>
+                                       ${volumeGroupParams}
+                           </volumeGroupParams>
+                               <skipAAI>true</skipAAI>
+                           <msoRequest>
+                               <requestId>${requestId}</requestId>
+                               <serviceInstanceId>${serviceId}</serviceInstanceId>
+                           </msoRequest>
+                           <messageId>${messageId}</messageId>
+                           <notificationUrl>${notificationUrl}</notificationUrl>
+                       </updateVolumeGroupRequest>
+               """
+               vnfAdapterRestRequest = utils.formatXml(vnfAdapterRestRequest)
+               execution.setVariable('UPDVfModVol_vnfAdapterRestRequest', vnfAdapterRestRequest)
+               logDebug('Request for VNFAdapter Rest:\n' + vnfAdapterRestRequest, isDebugLogEnabled)
+       }
+       
+       /**
+        * Prepare a Request for updating the DB for this Infra request.
+        *
+        * @param execution The flow's execution instance.
+        */
+       public void prepDbInfraDbRequest(Execution execution, isDebugLogEnabled) {
+
+               def requestId = execution.getVariable('UPDVfModVol_requestId')
+               
+               String updateInfraRequest = """
+                       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                                       xmlns:req="http://com.att.mso/requestsdb">
+                               <soapenv:Header/>
+                               <soapenv:Body>
+                                       <req:updateInfraRequest>
+                                               <requestId>${requestId}</requestId>
+                                               <lastModifiedBy>BPEL</lastModifiedBy>
+                                               <requestStatus>COMPLETE</requestStatus>
+                                               <progress>100</progress>
+                                       </req:updateInfraRequest>
+                               </soapenv:Body>
+                       </soapenv:Envelope>
+               """
+
+               updateInfraRequest = utils.formatXml(updateInfraRequest)
+               execution.setVariable('UPDVfModVol_updateInfraRequest', updateInfraRequest)
+               logDebug('Request for Update Infra Request:\n' + updateInfraRequest, isDebugLogEnabled)
+       }
+       
+       /**
+        * Build a "CompletionHandler" request.
+        * @param execution The flow's execution instance.
+        */
+       public void prepCompletionHandlerRequest(Execution execution, requestId, action, source, isDebugLogEnabled) {
+
+               String content = """
+               <aetgt:MsoCompletionRequest xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"
+                                       xmlns:ns="http://ecomp.att.com/mso/request/types/v1">
+                       <request-info xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+                               <request-id>${requestId}</request-id>
+                               <action>CREATE</action>
+                               <source>${source}</source>
+                       </request-info>
+                       <aetgt:mso-bpel-name>BPMN VF Module Volume action: UPDATE</aetgt:mso-bpel-name>
+               </aetgt:MsoCompletionRequest>           
+               """
+
+               content = utils.formatXml(content)
+               logDebug('Request for Completion Handler:\n' + content, isDebugLogEnabled)
+               execution.setVariable('UPDVfModVol_CompletionHandlerRequest', content)
+       }
+       
+
+       /**
+        * Build a "FalloutHandler" request.
+        * @param execution The flow's execution instance.
+        */
+       public void prepFalloutHandler(Execution execution, isDebugLogEnabled) {
+               
+               def requestInfo = execution.getVariable('UPDVfModVol_requestInfo')
+               
+               def WorkflowException workflowException = execution.getVariable("WorkflowException")
+               def errorResponseCode = workflowException.getErrorCode()
+               def errorResponseMsg = workflowException.getErrorMessage()
+               def encErrorResponseMsg = ""
+               if (errorResponseMsg != null) {
+                       encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+               }
+
+               String content = """
+                       <sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow="http://ecomp.att.com/mso/workflow/schema/v1"
+                                       xmlns:reqtype="http://ecomp.att.com/mso/request/types/v1"
+                                       xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1"
+                                       xmlns:structuredtypes="http://ecomp.att.com/mso/structured/types/v1">
+                               ${requestInfo}
+                               <sdncadapterworkflow:WorkflowException>
+                                       <sdncadapterworkflow:ErrorMessage>${encErrorResponseMsg}</sdncadapterworkflow:ErrorMessage>
+                                       <sdncadapterworkflow:ErrorCode>${errorResponseCode}</sdncadapterworkflow:ErrorCode>
+                               </sdncadapterworkflow:WorkflowException>        
+                       </sdncadapterworkflow:FalloutHandlerRequest>
+               """
+               content = utils.formatXml(content)
+               logDebug('Request for Fallout Handler:\n' + content, isDebugLogEnabled)
+               execution.setVariable('UPDVfModVol_FalloutHandlerRequest', content)
+       }
+       
+       /**
+        * Create a WorkflowException for the error case where the Tenant Id from
+        * AAI did not match the Tenant Id in the incoming request.
+        * @param execution The flow's execution instance.
+        */
+       public void handleTenantIdMismatch(Execution execution, isDebugLogEnabled) {
+               
+               def volumeGroupId = execution.getVariable('UPDVfModVol_volumeGroupId')
+               def aicCloudRegion = execution.getVariable('UPDVfModVol_aicCloudRegion')
+               def tenantId = execution.getVariable('UPDVfModVol_tenantId')
+               def volumeGroupTenantId = execution.getVariable('UPDVfModVol_volumeGroupTenantId')
+               
+               def String errorMessage = "TenantId " + tenantId + " in incoming request does not match Tenant Id " + volumeGroupTenantId +
+                       " retrieved from AAI for Volume Group Id " + volumeGroupId + ", AIC Cloud Region " + aicCloudRegion 
+               
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               logError('Error in UpdateVfModuleVol: ' + errorMessage)
+               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+       }
+       
+       /**
+        * Create a WorkflowException for the error case where the Personal Model Id from
+        * AAI did not match the model invariant ID in the incoming request.
+        * @param execution The flow's execution instance.
+        */
+       public void handlePersonaModelIdMismatch(Execution execution, isDebugLogEnabled) {
+               
+               def modelInvariantId = execution.getVariable('UPDVfModVol_modelInvariantId')
+               def personaModelId = execution.getVariable('UPDVfModVol_personaModelId')
+               
+               def String errorMessage = "Model Invariant ID " + modelInvariantId + " in incoming request does not match persona model ID " + personaModelId +
+                       " retrieved from AAI for Volume Group Id "
+               
+               ExceptionUtil exceptionUtil = new ExceptionUtil()
+               logError('Error in UpdateVfModuleVol: ' + errorMessage)
+               exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
+       }
+       
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModule.groovy
new file mode 100644 (file)
index 0000000..9845281
--- /dev/null
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+import groovy.util.Node;
+
+import java.util.concurrent.ExecutionException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+public class VfModule implements Serializable {
+       
+       /**
+        * Class representing a VF Module Node. Fields of this class include indicators
+        * as to whether the VF Module is the only VF Module in its containing Generic VNF
+        * and whether the VF Module is the base VF Module in its containing Generic VNF.
+        */
+
+       private Node node
+       private Boolean onlyVfModule
+       private Boolean baseVfModule
+
+       /**
+        * Constructor.
+        *
+        * @param node Node representing the VF Module xml.
+        * @param onlyVfModule Is this VF Module the only VF Module in its containing Generic VNF?
+        */
+       public VfModule(Node node, boolean onlyVfModule) {
+               this.node = node
+               this.onlyVfModule = onlyVfModule
+               this.baseVfModule = getElementText('is-base-vf-module').equals('true')
+       }
+
+       /**
+        * Get the Node representing the VF Module xml.
+        *
+        * @return the Node representing the VF Module xml.
+        */
+       public Node getNode() {
+               return node
+       }
+
+       public String getElementText(String childNodeName) {
+               def Node childNode = (new MsoUtils()).getChildNode(node, childNodeName)
+               if (childNode == null) {
+                       return ''
+               } else {
+                       return childNode.text()
+               }
+       }
+
+       /**
+        * Is this VF Module the only VF Module in its containing Generic VNF?
+        *
+        * @return true if this VF Module is the only VF Module in its containing Generic VNF;
+        * false otherwise.
+        */
+       public boolean isOnlyVfModule() {
+               return onlyVfModule
+       }
+
+       /**
+        * Is this VF Module the base VF Module in its containing Generic VNF?
+        *
+        * @return true if this VF Module is the base VF Module in its containing Generic VNF;
+        * false otherwise.
+        */
+       public boolean isBaseVfModule() {
+               return baseVfModule
+       }
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VfModuleBase.groovy
new file mode 100644 (file)
index 0000000..ba920ce
--- /dev/null
@@ -0,0 +1,586 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts;
+
+//import groovy.util.Node;
+
+import java.util.concurrent.ExecutionException;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.apache.commons.lang3.*
+
+import javax.xml.parsers.DocumentBuilder
+import javax.xml.parsers.DocumentBuilderFactory
+
+import org.w3c.dom.Document
+import org.w3c.dom.Element
+import org.w3c.dom.NamedNodeMap
+import org.w3c.dom.Node
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource
+
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+
+public abstract class VfModuleBase extends AbstractServiceTaskProcessor {
+       
+       protected XmlParser xmlParser = new XmlParser()
+       
+       /**
+        * Get the XmlParser.
+        * 
+        * @return the XmlParser.
+        */
+       protected XmlParser getXmlParser() {
+               return xmlParser
+       }
+       
+       /**
+        * Find the VF Module with specified ID in the specified Generic VF.  If no such
+        * VF Module is found, null is returned.
+        * 
+        * @param genericVnf The Generic VNF in which to search for the specified VF Moduel.
+        * @param vfModuleId The ID of the VF Module for which to search.
+        * @return a VFModule object for the found VF Module or null if no VF Module is found.
+        */
+       protected VfModule findVfModule(String genericVnf, String vfModuleId) {
+               
+               def genericVnfNode = xmlParser.parseText(genericVnf)
+               def vfModulesNode = utils.getChildNode(genericVnfNode, 'vf-modules')
+               if (vfModulesNode == null) {
+                       return null
+               }
+               def vfModuleList = utils.getIdenticalChildren(vfModulesNode, 'vf-module')
+               for (vfModuleNode in vfModuleList) {
+                       def vfModuleIdNode = utils.getChildNode(vfModuleNode, 'vf-module-id')
+                       if ((vfModuleIdNode != null) && (vfModuleIdNode.text().equals(vfModuleId))) {
+                               return new VfModule(vfModuleNode, (vfModuleList.size() == 1))
+                       }
+               }
+               return null
+       }
+       
+       /**
+        * Transform all '*_network' parameter specifications from the incoming '*-params' root
+        * element to a corresponding list of 'vnf-networks' specifications (typically used when
+        * invoking the VNF Rest Adpater). Each element in '*-params' whose name attribute ends
+        * with '_network' is used to create an 'vnf-networks' element.
+        * 
+        * @param paramsNode A Node representing a '*-params' element.
+        * @return a String of 'vnf-networks' elements, one for each 'param' element whose name
+        * attribute ends with '_network'.
+        */
+       protected String transformNetworkParamsToVnfNetworks(String paramsRootXml) {
+               if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
+                       return ''
+               }
+               def String vnfNetworks = ''
+               try {
+                       paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
+                       def paramsNode = xmlParser.parseText(paramsRootXml)
+                       def params = utils.getIdenticalChildren(paramsNode, 'param')
+                       for (param in params) {
+                               def String attrName = (String) param.attribute('name')
+                               if (attrName.endsWith('_network')) {
+                                       def networkRole = attrName.substring(0, (attrName.length()-'_network'.length()))
+                                       def networkName = param.text()
+                                       String vnfNetwork = """
+                                               <vnf-networks>
+                                                       <network-role>${networkRole}</network-role>
+                                                       <network-name>${networkName}</network-name>
+                                               </vnf-networks>
+                                       """
+                                       vnfNetworks = vnfNetworks + vnfNetwork
+                               }
+                       }
+               } catch (Exception e) {
+                       logWarn('Exception transforming \'_network\' params to vnfNetworks', e)
+               }
+               return vnfNetworks
+       }
+       
+       /**
+        * Transform the parameter specifications from the incoming '*-params' root element to
+        * a corresponding list of 'entry's (typically used when invoking the VNF Rest Adpater).
+        * Each element in '*-params' is used to create an 'entry' element.
+        *
+        * @param paramsNode A Node representing a '*-params' element.
+        * @return a String of 'entry' elements, one for each 'param' element.
+        */
+       protected String transformParamsToEntries(String paramsRootXml) {
+               if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
+                       return ''
+               }
+               def String entries = ''
+               try {
+                       paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
+                       def paramsNode = xmlParser.parseText(paramsRootXml)
+                       def params = utils.getIdenticalChildren(paramsNode, 'param')
+                       for (param in params) {
+                               def key = (String) param.attribute('name')
+                               if (key == null) {
+                                       key = ''
+                               }
+                               def value = (String) param.text()
+                               String entry = """
+                                       <entry>
+                                               <key>${key}</key>
+                                               <value>${value}</value>
+                                       </entry>
+                               """
+                               entries = entries + entry
+                       }
+               } catch (Exception e) {
+                       logWarn('Exception transforming params to entries', e)
+               }
+               return entries
+       }
+       
+       /**
+        * Transform the parameter specifications from the incoming '*-params' root element to
+        * a corresponding list of 'entry's (typically used when invoking the VNF Rest Adpater).
+        * Each element in '*-params' is used to create an 'entry' element.
+        *
+        * @param paramsNode A Node representing a '*-params' element.
+        * @return a String of 'entry' elements, one for each 'param' element.
+        */
+       protected String transformVolumeParamsToEntries(String paramsRootXml) {
+               if ((paramsRootXml == null) || (paramsRootXml.isEmpty())) {
+                       return ''
+               }
+               def String entries = ''
+               try {
+                       paramsRootXml = utils.removeXmlNamespaces(paramsRootXml)
+                       def paramsNode = xmlParser.parseText(paramsRootXml)
+                       def params = utils.getIdenticalChildren(paramsNode, 'param')
+                       for (param in params) {
+                               def key = (String) param.attribute('name')
+                               if (key == null) {
+                                       key = ''
+                               }
+                               if ( !(key in ['vnf_id', 'vnf_name', 'vf_module_id', 'vf_module_name'])) {
+                                       def value = (String) param.text()
+                                       String entry = """
+                                               <entry>
+                                                       <key>${key}</key>
+                                                       <value>${value}</value>
+                                               </entry>
+                                       """
+                                       entries = entries + entry
+                               }
+                       }
+               } catch (Exception e) {
+                       logWarn('Exception transforming params to entries', e)
+               }
+               return entries
+       }
+       
+       /**
+        * Extract the Tenant Id from the Volume Group information returned by AAI.
+        * 
+        * @param volumeGroupXml Volume Group XML returned by AAI.
+        * @return the Tenant Id extracted from the Volume Group information. 'null' is returned if
+        * the Tenant Id is missing or could not otherwise be extracted.
+        */
+       protected String getTenantIdFromVolumeGroup(String volumeGroupXml) {
+               def groovy.util.Node volumeGroupNode = xmlParser.parseText(volumeGroupXml)
+               def groovy.util.Node relationshipList = utils.getChildNode(volumeGroupNode, 'relationship-list')
+               if (relationshipList != null) {
+                       def groovy.util.NodeList relationships = utils.getIdenticalChildren(relationshipList, 'relationship')
+                       for (groovy.util.Node relationship in relationships) {
+                               def groovy.util.Node relatedTo = utils.getChildNode(relationship, 'related-to')
+                               if ((relatedTo != null) && (relatedTo.text().equals('tenant'))) {
+                                       def groovy.util.NodeList relationshipDataList = utils.getIdenticalChildren(relationship, 'relationship-data')
+                                       for (groovy.util.Node relationshipData in relationshipDataList) {
+                                               def groovy.util.Node relationshipKey = utils.getChildNode(relationshipData, 'relationship-key')
+                                               if ((relationshipKey != null) && (relationshipKey.text().equals('tenant.tenant-id'))) {
+                                                       def groovy.util.Node relationshipValue = utils.getChildNode(relationshipData, 'relationship-value')
+                                                       if (relationshipValue != null) {
+                                                               return relationshipValue.text()
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
+               return null
+       }
+       
+       
+       /*
+        * Parses VNF parameters passed in on the incoming requests and SDNC parameters returned from SDNC get response 
+        * and puts them into the format expected by VNF adapter.
+        * @param vnfParamsMap -  map of VNF parameters passed in the request body
+        * @param sdncGetResponse - response string from SDNC GET topology request
+        * @param vnfId
+        * @param vnfName
+        * @param vfModuleId
+        * @param vfModuleName
+        * @return a String of key/value entries for vfModuleParams
+        */
+         
+        
+        protected String buildVfModuleParams(String vnfParams, String sdncGetResponse, String vnfId, String vnfName,
+                       String vfModuleId, String vfModuleName) {
+                       
+                       //Get SDNC Response Data                
+                       
+                       String data = utils.getNodeXml(sdncGetResponse, "response-data")
+                       data = data.replaceAll("&lt;", "<")
+                       data = data.replaceAll("&gt;", ">")
+
+                       String serviceData = utils.getNodeXml(data, "service-data")
+                       serviceData = utils.removeXmlPreamble(serviceData)
+                       serviceData = utils.removeXmlNamespaces(serviceData)
+                       String vnfRequestInfo = utils.getNodeXml(serviceData, "vnf-request-information")
+                       String oldVnfId = utils.getNodeXml(vnfRequestInfo, "vnf-id")
+                       oldVnfId = utils.removeXmlPreamble(oldVnfId)
+                       oldVnfId = utils.removeXmlNamespaces(oldVnfId)
+                       serviceData = serviceData.replace(oldVnfId, "")
+                       def vnfId1 = utils.getNodeText1(serviceData, "vnf-id")                  
+
+                       // Add-on data
+                       String vnfInfo =
+                               """<entry>
+                                               <key>vnf_id</key>
+                                               <value>${vnfId}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vnf_name</key>
+                                               <value>${vnfName}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vf_module_id</key>
+                                               <value>${vfModuleId}</value>
+                                       </entry>
+                                       <entry>
+                                               <key>vf_module_name</key>
+                                               <value>${vfModuleName}</value>
+                                       </entry>"""
+
+                       utils.logAudit("vnfInfo: " + vnfInfo)
+                       InputSource source = new InputSource(new StringReader(data));
+                       DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                       docFactory.setNamespaceAware(true)
+                       DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
+                       Document responseXml = docBuilder.parse(source)
+
+
+                       // Availability Zones Data
+                       String aZones = ""
+                       StringBuilder sbAZone = new StringBuilder()
+                       NodeList aZonesList = responseXml.getElementsByTagNameNS("*", "availability-zones")
+                       String aZonePosition = "0"
+                       for (int z = 0; z < aZonesList.getLength(); z++) {
+                               Node node = aZonesList.item(z)
+                               if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                       Element eElement = (Element) node
+                                       String aZoneValue = utils.getElementText(eElement, "availability-zone")
+                                       aZonePosition = z.toString()
+                                       String aZoneXml =
+                                                       """<entry>
+                                               <key>availability_zone_${aZonePosition}</key>
+                                               <value>${aZoneValue}</value>
+                               </entry>"""
+                                       aZones = sbAZone.append(aZoneXml)
+                               }
+                       }
+
+                       // VNF Networks Data
+                       String vnfNetworkNetId = ""
+                       String vnfNetworkNetName = ""
+                       String vnfNetworkSubNetId = ""
+                       String vnfNetworkV6SubNetId = ""
+                       String vnfNetworkNetFqdn = ""
+                       StringBuilder sbNet = new StringBuilder()
+                       StringBuilder sbNet2 = new StringBuilder()
+                       StringBuilder sbNet3 = new StringBuilder()
+                       StringBuilder sbNet4 = new StringBuilder()
+                       StringBuilder sbNet5 = new StringBuilder()
+                       NodeList vnfNetworkList = responseXml.getElementsByTagNameNS("*", "vnf-networks")
+                       for (int x = 0; x < vnfNetworkList.getLength(); x++) {
+                               Node node = vnfNetworkList.item(x)
+                               if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                       Element eElement = (Element) node
+                                       String vnfNetworkKey = utils.getElementText(eElement, "network-role")
+                                       String vnfNetworkNeutronIdValue = utils.getElementText(eElement, "neutron-id")
+                                       String vnfNetworkNetNameValue = utils.getElementText(eElement, "network-name")
+                                       String vnfNetworkSubNetIdValue = utils.getElementText(eElement, "subnet-id")
+                                       String vnfNetworkV6SubNetIdValue = utils.getElementText(eElement, "ipv6-subnet-id")
+                                       String vnfNetworkNetFqdnValue = utils.getElementText(eElement, "contrail-network-fqdn")
+                                       String vnfNetworkNetIdXml =
+                                                       """<entry>
+                                                               <key>${vnfNetworkKey}_net_id</key>
+                                                               <value>${vnfNetworkNeutronIdValue}</value>
+                                                       </entry>"""
+                                       vnfNetworkNetId = sbNet.append(vnfNetworkNetIdXml)
+                                       String vnfNetworkNetNameXml =
+                                                       """<entry>
+                                               <key>${vnfNetworkKey}_net_name</key>
+                                               <value>${vnfNetworkNetNameValue}</value>
+                               </entry>"""
+                                       vnfNetworkNetName = sbNet2.append(vnfNetworkNetNameXml)
+                                       String vnfNetworkSubNetIdXml =
+                                                       """<entry>
+                                               <key>${vnfNetworkKey}_subnet_id</key>
+                                               <value>${vnfNetworkSubNetIdValue}</value>
+                               </entry>"""
+                                       vnfNetworkSubNetId = sbNet3.append(vnfNetworkSubNetIdXml)
+                                       String vnfNetworkV6SubNetIdXml =
+                                                       """<entry>
+                                               <key>${vnfNetworkKey}_v6_subnet_id</key>
+                                               <value>${vnfNetworkV6SubNetIdValue}</value>
+                               </entry>"""
+                                       vnfNetworkV6SubNetId = sbNet5.append(vnfNetworkV6SubNetIdXml)
+                                       String vnfNetworkNetFqdnXml =
+                                                       """<entry>
+                                               <key>${vnfNetworkKey}_net_fqdn</key>
+                                               <value>${vnfNetworkNetFqdnValue}</value>
+                               </entry>"""
+                                       vnfNetworkNetFqdn = sbNet4.append(vnfNetworkNetFqdnXml)
+                               }
+                       }
+
+                       // VNF-VMS Data
+                       String vnfVMS = ""
+                       String vnfVMSPositions = ""
+                       String vmNetworks = ""
+                       String vmNetworksPositions = ""
+                       String vmNetworksPositionsV6 = ""
+                       String interfaceRoutePrefixes = ""
+                       def key
+                       def value
+                       def networkKey
+                       def networkValue
+                       def floatingIPKey
+                       def floatingIPKeyValue
+                       def floatingIPV6Key
+                       def floatingIPV6KeyValue
+                       StringBuilder sb = new StringBuilder()
+                       StringBuilder sbPositions = new StringBuilder()
+                       StringBuilder sbVmNetworks = new StringBuilder()
+                       StringBuilder sbNetworksPositions = new StringBuilder()
+                       StringBuilder sbInterfaceRoutePrefixes = new StringBuilder()
+                       StringBuilder sbNetworksPositionsV6 = new StringBuilder()
+
+                       NodeList vmsList = responseXml.getElementsByTagNameNS("*","vnf-vms")
+                       for (int x = 0; x < vmsList.getLength(); x++) {
+                               Node node = vmsList.item(x)
+                               if (node.getNodeType() == Node.ELEMENT_NODE) {
+                                       Element eElement = (Element) node
+                                       key = utils.getElementText(eElement, "vm-type")
+                                       String values
+                                       String position = "0"
+                                       StringBuilder sb1 = new StringBuilder()
+                                       NodeList valueList = eElement.getElementsByTagNameNS("*","vm-names")
+                                       NodeList vmNetworksList = eElement.getElementsByTagNameNS("*","vm-networks")
+                                       for(int i = 0; i < valueList.getLength(); i++){
+                                               Node node1 = valueList.item(i)
+                                               if (node1.getNodeType() == Node.ELEMENT_NODE) {
+                                                       Element eElement1 = (Element) node1
+                                                       value = utils.getElementText(eElement1, "vm-name")
+                                                       if (i != valueList.getLength() - 1) {
+                                                               values = sb1.append(value + ",")
+                                                       }
+                                                       else {
+                                                               values = sb1.append(value);
+                                                       }
+                                                       position = i.toString()
+                                                       String vnfPositionXml =
+                                                                       """<entry>
+                                                               <key>${key}_name_${position}</key>
+                                                               <value>${value}</value>
+                                                       </entry>"""
+                                                       vnfVMSPositions = sbPositions.append(vnfPositionXml)
+                                               }
+                                       }
+                                       for(int n = 0; n < vmNetworksList.getLength(); n++){
+                                               String floatingIpKeyValueStr = ""
+                                               String floatingIpV6KeyValueStr = ""
+                                               Node nodeNetworkKey = vmNetworksList.item(n)
+                                               if (nodeNetworkKey.getNodeType() == Node.ELEMENT_NODE) {
+                                                       Element eElementNetworkKey = (Element) nodeNetworkKey
+                                                       String ipAddressValues
+                                                       String ipV6AddressValues
+                                                       String networkPosition = "0"
+                                                       StringBuilder sb2 = new StringBuilder()
+                                                       StringBuilder sb3 = new StringBuilder()
+                                                       StringBuilder sb4 = new StringBuilder()
+                                                       networkKey = utils.getElementText(eElementNetworkKey, "network-role")
+                                                       floatingIPKey = key + '_' + networkKey + '_floating_ip'
+                                                       floatingIPKeyValue = utils.getElementText(eElementNetworkKey, "floating-ip")
+                                                       if(!floatingIPKeyValue.isEmpty()){                                                              
+                                                               floatingIpKeyValueStr = """<entry>
+                                                               <key>$floatingIPKey</key>
+                                                               <value>$floatingIPKeyValue</value>
+                                                       </entry>"""
+                                                       }
+                                                       floatingIPV6Key = key + '_' + networkKey + '_floating_v6_ip'
+                                                       floatingIPV6KeyValue = utils.getElementText(eElementNetworkKey, "floating-ip-v6")
+                                                       if(!floatingIPV6KeyValue.isEmpty()){                                                            
+                                                               floatingIpV6KeyValueStr = """<entry>
+                                                               <key>$floatingIPV6Key</key>
+                                                               <value>$floatingIPV6KeyValue</value>
+                                                       </entry>"""
+                                                       }
+                                                       NodeList networkIpsList = eElementNetworkKey.getElementsByTagNameNS("*","network-ips")
+                                                       for(int a = 0; a < networkIpsList.getLength(); a++){
+                                                               Node ipAddress = networkIpsList.item(a)
+                                                               if (ipAddress.getNodeType() == Node.ELEMENT_NODE) {
+                                                                       Element eElementIpAddress = (Element) ipAddress
+                                                                       String ipAddressValue = utils.getElementText(eElementIpAddress, "ip-address")
+                                                                       if (a != networkIpsList.getLength() - 1) {
+                                                                               ipAddressValues = sb2.append(ipAddressValue + ",")
+                                                                       }
+                                                                       else {
+                                                                               ipAddressValues = sb2.append(ipAddressValue);
+                                                                       }
+                                                                       networkPosition = a.toString()
+                                                                       String vmNetworksPositionsXml =
+                                                                                       """<entry>
+                                                                               <key>${key}_${networkKey}_ip_${networkPosition}</key>
+                                                                               <value>${ipAddressValue}</value>
+                                                                       </entry>"""
+                                                                       vmNetworksPositions = sbNetworksPositions.append(vmNetworksPositionsXml)
+                                                               }
+                                                       }
+                                                       vmNetworksPositions = sbNetworksPositions.append(floatingIpKeyValueStr).append(floatingIpV6KeyValueStr)
+                                               
+                                                       String vmNetworksXml =
+                                                                       """<entry>
+                                                               <key>${key}_${networkKey}_ips</key>
+                                                               <value>${ipAddressValues}</value>
+                                                       </entry>"""
+                                                       vmNetworks = sbVmNetworks.append(vmNetworksXml)
+                                                       
+                                                       NodeList interfaceRoutePrefixesList = eElementNetworkKey.getElementsByTagNameNS("*","interface-route-prefixes")
+                                                       String interfaceRoutePrefixValues = sb3.append("[")
+                                                       
+                                                       for(int a = 0; a < interfaceRoutePrefixesList.getLength(); a++){                                                                
+                                                               Node interfaceRoutePrefix = interfaceRoutePrefixesList.item(a)                                                          
+                                                               if (interfaceRoutePrefix.getNodeType() == Node.ELEMENT_NODE) {
+                                                                       Element eElementInterfaceRoutePrefix = (Element) interfaceRoutePrefix
+                                                                       String interfaceRoutePrefixValue = utils.getElementText(eElementInterfaceRoutePrefix, "interface-route-prefix")
+                                                                       if (a != interfaceRoutePrefixesList.getLength() - 1) {                                                                  
+                                                                               interfaceRoutePrefixValues = sb3.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}" + ",")
+                                                                       }
+                                                                       else {
+                                                                               interfaceRoutePrefixValues = sb3.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}")
+                                                                       }                                                                       
+                                                               }
+                                                       }
+                                                       interfaceRoutePrefixValues = sb3.append("]")
+                                                       if (interfaceRoutePrefixesList.getLength() > 0) {
+                                                               String interfaceRoutePrefixesXml = 
+                                                                                               """<entry>
+                                                                                       <key>${key}_${networkKey}_route_prefixes</key>
+                                                                                       <value>${interfaceRoutePrefixValues}</value>
+                                                                               </entry>"""                                     
+                                                               interfaceRoutePrefixes = sbInterfaceRoutePrefixes.append(interfaceRoutePrefixesXml)
+                                                       }
+                                                       
+                                                       NodeList networkIpsV6List = eElementNetworkKey.getElementsByTagNameNS("*","network-ips-v6")
+                                                       for(int a = 0; a < networkIpsV6List.getLength(); a++){
+                                                               Node ipV6Address = networkIpsV6List.item(a)
+                                                               if (ipV6Address.getNodeType() == Node.ELEMENT_NODE) {
+                                                                       Element eElementIpV6Address = (Element) ipV6Address
+                                                                       String ipV6AddressValue = utils.getElementText(eElementIpV6Address, "ip-address-ipv6")
+                                                                       if (a != networkIpsV6List.getLength() - 1) {
+                                                                               ipV6AddressValues = sb4.append(ipV6AddressValue + ",")
+                                                                       }
+                                                                       else {
+                                                                               ipV6AddressValues = sb4.append(ipV6AddressValue);
+                                                                       }
+                                                                       networkPosition = a.toString()
+                                                                       String vmNetworksPositionsV6Xml =
+                                                                                       """<entry>
+                                                                               <key>${key}_${networkKey}_v6_ip_${networkPosition}</key>
+                                                                               <value>${ipV6AddressValue}</value>
+                                                                       </entry>"""
+                                                                       vmNetworksPositionsV6 = sbNetworksPositionsV6.append(vmNetworksPositionsV6Xml)
+                                                               }
+                                                       }
+                                                       String vmNetworksV6Xml =
+                                                                       """<entry>
+                                                               <key>${key}_${networkKey}_v6_ips</key>
+                                                               <value>${ipV6AddressValues}</value>
+                                                       </entry>"""
+                                                       vmNetworks = sbVmNetworks.append(vmNetworksV6Xml)
+                                               }
+                                       }
+                                       String vnfXml =
+                                                       """<entry>
+                               <key>${key}_names</key>
+                               <value>${values}</value>
+                                       </entry>"""
+                                       vnfVMS = sb.append(vnfXml)
+                               }
+                       }
+               //SDNC Response Params
+                       String sdncResponseParams = ""
+                       List<String> sdncResponseParamsToSkip = ["vnf_id", "vf_module_id", "vnf_name", "vf_module_name"]
+                       String vnfParamsChildNodes = utils.getChildNodes(data, "vnf-parameters")
+                       if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
+                               // No SDNC params
+                       }else{                          
+                               NodeList paramsList = responseXml.getElementsByTagNameNS("*", "vnf-parameters")
+                               for (int z = 0; z < paramsList.getLength(); z++) {
+                                       Node node = paramsList.item(z)
+                                       Element eElement = (Element) node
+                                       String vnfParameterName = utils.getElementText(eElement, "vnf-parameter-name")
+                                       if (!sdncResponseParamsToSkip.contains(vnfParameterName)) {
+                                               String vnfParameterValue = utils.getElementText(eElement, "vnf-parameter-value")
+                                               String paraEntry =
+                                               """<entry>
+                                                       <key>${vnfParameterName}</key>
+                                                       <value>${vnfParameterValue}</value>
+                                               </entry>"""
+                                               sdncResponseParams = sb.append(paraEntry)
+                                       }
+                               }
+                       }
+
+
+               def vfModuleParams = """
+               ${vnfInfo}
+               ${aZones}
+               ${vnfNetworkNetId}
+               ${vnfNetworkNetName}
+               ${vnfNetworkSubNetId}
+               ${vnfNetworkV6SubNetId}
+               ${vnfNetworkNetFqdn}
+        ${vnfVMS}
+        ${vnfVMSPositions}
+               ${vmNetworks}
+               ${vmNetworksPositions}
+               ${vmNetworksPositionsV6}
+               ${interfaceRoutePrefixes}
+               ${vnfParams}
+               ${sdncResponseParams}"""
+               
+               return vfModuleParams
+               
+       }
+       
+       
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VidUtils.groovy
new file mode 100644 (file)
index 0000000..364c586
--- /dev/null
@@ -0,0 +1,362 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import org.json.JSONObject;
+import org.json.XML;
+
+import org.openecomp.mso.bpmn.core.xml.XmlTool;
+
+import groovy.json.JsonBuilder
+import groovy.json.JsonSlurper
+import groovy.util.slurpersupport.GPathResult
+import groovy.xml.QName
+
+class VidUtils {
+       
+       public MsoUtils utils = new MsoUtils()
+       private AbstractServiceTaskProcessor taskProcessor
+
+       public VidUtils(AbstractServiceTaskProcessor taskProcessor) {
+               this.taskProcessor = taskProcessor
+       }
+       
+       /**
+        * Create a volume-request XML using a JSON string
+        * @param jsonReq - JSON request from VID
+        * @param action
+        * @return
+        */
+       public String createXmlVolumeRequest(String jsonReq, String action, String serviceInstanceId) {
+               def jsonSlurper = new JsonSlurper()
+               try{
+                       Map reqMap = jsonSlurper.parseText(jsonReq)
+                       return createXmlVolumeRequest(reqMap, action, serviceInstanceId)
+               }
+               catch(Exception e) {
+                       throw e
+               }
+       }
+
+       /**
+        * Create a volume-request XML using a map
+        * @param requestMap - map created from VID JSON
+        * @param action
+        * @param serviceInstanceId
+        * @return
+        */
+       public String createXmlVolumeRequest(Map requestMap, String action, String serviceInstanceId) {
+               createXmlVolumeRequest(requestMap, action, serviceInstanceId, '')
+       }
+       
+
+       /**
+        * Create a volume-request XML using a map
+        * @param requestMap
+        * @param action
+        * @param serviceInstanceId
+        * @param volumeGroupId
+        * @return
+        */
+       public String createXmlVolumeRequest(Map requestMap, String action, String serviceInstanceId, String volumeGroupId) {
+               def vnfType = ''
+               def serviceName = ''
+               def modelCustomizationName = ''
+               def asdcServiceModelVersion = ''
+               
+               def suppressRollback = requestMap.requestDetails.requestInfo.suppressRollback
+               def rollbackEnabled = true
+               if(suppressRollback != null && suppressRollback == true) {
+                       rollbackEnabled = false
+               }
+               
+               def volGrpName = requestMap.requestDetails.requestInfo?.instanceName ?: ''
+               def serviceId = requestMap.requestDetails.requestParameters?.serviceId ?: ''
+               def relatedInstanceList = requestMap.requestDetails.relatedInstanceList
+               relatedInstanceList.each {
+                       if (it.relatedInstance.modelInfo?.modelType == 'service') {
+                               serviceName = it.relatedInstance.modelInfo?.modelName
+                               asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion
+                       }
+                       if (it.relatedInstance.modelInfo?.modelType == 'vnf') {
+                               modelCustomizationName = it.relatedInstance.modelInfo?.modelCustomizationName
+                       }
+               }
+               
+               vnfType = serviceName + '/' + modelCustomizationName
+               
+               def userParams = requestMap.requestDetails?.requestParameters?.userParams
+               def userParamsNode = ''
+               if(userParams != null) {
+                       userParamsNode = buildUserParams(userParams)
+               }
+               def xmlReq = """
+               <volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+                       <request-info>
+                               <action>${action}</action>
+                               <source>${requestMap.requestDetails.requestInfo.source}</source>
+                               <service-instance-id>${serviceInstanceId}</service-instance-id>
+                       </request-info>
+                       <volume-inputs>
+                               <volume-group-id>${volumeGroupId}</volume-group-id>
+                               <volume-group-name>${volGrpName}</volume-group-name>
+                               <vnf-type>${vnfType}</vnf-type>
+                               <vf-module-model-name>${requestMap.requestDetails.modelInfo.modelName}</vf-module-model-name>
+                               <asdc-service-model-version>${asdcServiceModelVersion}</asdc-service-model-version>
+                               <aic-cloud-region>${requestMap.requestDetails.cloudConfiguration.lcpCloudRegionId}</aic-cloud-region>
+                               <tenant-id>${requestMap.requestDetails.cloudConfiguration.tenantId}</tenant-id>
+                               <service-id>${serviceId}</service-id>
+                               <backout-on-failure>${rollbackEnabled}</backout-on-failure>
+                       </volume-inputs>
+                       <volume-params>
+                               $userParamsNode
+                       </volume-params>
+               </volume-request>
+               """
+               // return a pretty-print of the volume-request xml without the preamble
+               return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "") 
+       }
+       
+       /**
+        * A common method that can be used to build volume-params node from a map. 
+        * @param Map userParams
+        * @return
+        */
+       public String buildUserParams(userParams) {
+               if (userParams == null) return ""
+               def xml = ""
+               def key = ""
+               def value = ""
+               userParams.each {it ->
+                       key = it.name.replaceAll(/\B[A-Z]/) { '_' + it }.toLowerCase()
+                       value = it.value
+                       xml += "<param name=\"${key}\">${value}</param>"
+               }
+
+               return xml
+       }
+
+       /**
+        * A common method that can be used to extract 'requestDetails' 
+        * @param String json
+        * @return String json requestDetails  
+        */
+       @Deprecated
+       public getJsonRequestDetails(String jsonInput) {
+               String rtn = ""
+               if (jsonInput.isEmpty() || jsonInput == null) {
+                       return rtn
+               } else {
+                       def jsonMapObject = new JsonSlurper().parseText(jsonInput)
+                       if (jsonMapObject instanceof Map) {
+                               String jsonString = new JsonBuilder(jsonMapObject.requestDetails)
+                               rtn = '{'+"requestDetails"+":"+jsonString+'}'
+                               return rtn
+                       } else {
+                           return rtn
+                       }       
+               }
+       }
+       
+       /**
+        * A common method that can be used to extract 'requestDetails' in Xml
+        * @param String json
+        * @return String xml requestDetails
+        */
+       @Deprecated
+       public getJsonRequestDetailstoXml(String jsonInput) {
+               String rtn = null
+               def jsonString = getJsonRequestDetails(jsonInput)
+               if (jsonString == null) {
+                       return rtn
+               } else {
+                   JSONObject jsonObj = new JSONObject(jsonString)
+                       return XmlTool.normalize(XML.toString(jsonObj))
+               }
+       }
+       
+       /**
+        * Create a network-request XML using a map
+        * @param execution 
+        * @param xmlRequestDetails - requestDetails in xml 
+        * @return
+        */
+       public String createXmlNetworkRequestInfra(execution, def networkJsonIncoming) {
+       
+               def requestId = execution.getVariable("requestId")
+               def serviceInstanceId = execution.getVariable("serviceInstanceId")
+               def requestAction = execution.getVariable("requestAction")
+               def networkId = (execution.getVariable("networkId")) != null ? execution.getVariable("networkId") : ""
+               
+               def jsonSlurper = new JsonSlurper()
+               try {
+                       Map reqMap = jsonSlurper.parseText(networkJsonIncoming)
+                       def instanceName =  reqMap.requestDetails.requestInfo.instanceName
+                       def modelName = reqMap.requestDetails.modelInfo.modelName
+                       def lcpCloudRegionId = reqMap.requestDetails.cloudConfiguration.lcpCloudRegionId
+                       def tenantId = reqMap.requestDetails.cloudConfiguration.tenantId
+                       def serviceId = reqMap.requestDetails.requestInfo.productFamilyId 
+                       def backoutOnFailure = reqMap.requestDetails.requestInfo.suppressRollback
+               
+                       //def userParams = reqMap.requestDetails.requestParameters.userParams
+                       //def userParamsNode = buildUserParams(userParams)
+                       def userParams = reqMap.requestDetails?.requestParameters?.userParams
+                       def userParamsNode = ''
+                       if(userParams != null) {
+                               userParamsNode = buildUserParams(userParams)
+                       }
+               
+                       def xmlReq = """
+                       <network-request xmlns="http://www.w3.org/2001/XMLSchema"> 
+                        <request-info> 
+                   <request-id>${requestId}</request-id>
+                               <action>${requestAction}</action> 
+                               <source>VID</source> 
+                               <service-instance-id>${serviceInstanceId}</service-instance-id>
+                        </request-info> 
+                        <network-inputs> 
+                               <network-id>${networkId}</network-id> 
+                               <network-name>${instanceName}</network-name> 
+                               <network-type>${modelName}</network-type>
+                               <aic-cloud-region>${lcpCloudRegionId}</aic-cloud-region> 
+                               <tenant-id>${tenantId}</tenant-id>
+                               <service-id>${serviceId}</service-id> 
+                               <backout-on-failure>${backoutOnFailure}</backout-on-failure>
+                        </network-inputs> 
+                        <network-params>
+                               ${userParamsNode}
+                        </network-params> 
+                       </network-request>
+                       """
+                       // return a pretty-print of the volume-request xml without the preamble
+                       return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "")
+                       
+               } catch(Exception e) {
+                       throw e
+               }
+       }
+       
+       /**
+        * Create a vnf-request XML using a map
+        * @param requestMap - map created from VID JSON 
+        * @param action
+        * @return
+        */
+       public String createXmlVfModuleRequest(execution, Map requestMap, String action, String serviceInstanceId) {
+                               
+               //def relatedInstanceList = requestMap.requestDetails.relatedInstanceList
+               
+               //relatedInstanceList.each {
+               //      if (it.relatedInstance.modelInfo.modelType == 'vnf') {
+               //              vnfType = it.relatedInstance.modelInfo.modelName
+               //              vnfId = it.relatedInstance.modelInfo.modelInvariantId
+               //      }
+               //}
+               
+               def vnfName = ''
+               def asdcServiceModelInfo = ''
+                               
+               def relatedInstanceList = requestMap.requestDetails?.relatedInstanceList
+               
+               
+               if (relatedInstanceList != null) {
+                       relatedInstanceList.each {
+                               if (it.relatedInstance.modelInfo?.modelType == 'service') {
+                                       asdcServiceModelInfo = it.relatedInstance.modelInfo?.modelVersion
+                               }
+                               if (it.relatedInstance.modelInfo.modelType == 'vnf') {
+                                       vnfName = it.relatedInstance.instanceName ?: ''
+                               }
+                       }
+               }
+               
+               def vnfType = execution.getVariable('vnfType')
+               def vnfId = execution.getVariable('vnfId')
+
+               def vfModuleId = execution.getVariable('vfModuleId')
+               def volumeGroupId = execution.getVariable('volumeGroupId')
+               def userParams = requestMap.requestDetails?.requestParameters?.userParams
+               
+               
+               def userParamsNode = ''
+               if(userParams != null) {
+                       userParamsNode = buildUserParams(userParams)
+               }
+               
+               def isBaseVfModule = "false"
+               if (execution.getVariable('isBaseVfModule') == true) {
+                       isBaseVfModule = "true"         
+               }
+               
+               def requestId = execution.getVariable("att-mso-request-id")             
+               def vfModuleName = requestMap.requestDetails?.requestInfo?.instanceName ?: ''
+               def vfModuleModelName = requestMap.requestDetails?.modelInfo?.modelName ?: ''
+               def suppressRollback = requestMap.requestDetails?.requestInfo?.suppressRollback
+               def backoutOnFailure = "true"
+               if(suppressRollback != null && suppressRollback == true) {
+                       backoutOnFailure = "false"
+               }
+               
+               def serviceId = requestMap.requestDetails?.requestParameters?.serviceId ?: ''
+               def aicCloudRegion = requestMap.requestDetails?.cloudConfiguration?.lcpCloudRegionId ?: ''
+               def tenantId = requestMap.requestDetails?.cloudConfiguration?.tenantId ?: ''
+               def personaModelId = requestMap.requestDetails?.modelInfo?.modelInvariantId ?: ''
+               def personaModelVersion = requestMap.requestDetails?.modelInfo?.modelVersion ?: ''
+               
+               def xmlReq = """
+               <vnf-request>
+                       <request-info>
+                               <request-id>${requestId}</request-id>
+                               <action>${action}</action>
+                               <source>VID</source>
+                               <!-- new 1610 field -->
+                               <service-instance-id>${serviceInstanceId}</service-instance-id>
+                       </request-info>
+                       <vnf-inputs>
+                               <!-- not in use in 1610 -->
+                               <vnf-name>${vnfName}</vnf-name>                                 
+                               <vnf-type>${vnfType}</vnf-type>
+                               <vnf-id>${vnfId}</vnf-id>
+                               <volume-group-id>${volumeGroupId}</volume-group-id>
+                               <vf-module-id>${vfModuleId}</vf-module-id>
+                               <vf-module-name>${vfModuleName}</vf-module-name>                                
+                               <vf-module-model-name>${vfModuleModelName}</vf-module-model-name>
+                               <is-base-vf-module>${isBaseVfModule}</is-base-vf-module>
+                               <asdc-service-model-version>${asdcServiceModelInfo}</asdc-service-model-version>
+                               <aic-cloud-region>${aicCloudRegion}</aic-cloud-region>                          
+                               <tenant-id>${tenantId}</tenant-id>
+                               <service-id>${serviceId}</service-id>
+                               <backout-on-failure>${backoutOnFailure}</backout-on-failure>
+                               <persona-model-id>${personaModelId}</persona-model-id>
+                               <persona-model-version>${personaModelVersion}</persona-model-version>
+                       </vnf-inputs>
+                       <vnf-params>
+                               $userParamsNode
+                       </vnf-params>
+               </vnf-request>
+               """
+       
+               // return a pretty-print of the volume-request xml without the preamble
+               return groovy.xml.XmlUtil.serialize(xmlReq.normalize().replaceAll("\t", "").replaceAll("\n", "")).replaceAll("(<\\?[^<]*\\?>\\s*[\\r\\n]*)?", "") 
+       }
+       
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterRestV1.groovy
new file mode 100644 (file)
index 0000000..f952bee
--- /dev/null
@@ -0,0 +1,417 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import groovy.xml.XmlUtil
+
+import java.text.SimpleDateFormat
+import java.net.URLEncoder
+
+import org.apache.commons.codec.binary.Base64
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.rest.APIResponse
+import org.openecomp.mso.rest.RESTClient
+import org.openecomp.mso.rest.RESTConfig
+
+class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
+
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       // VNF Response Processing
+       public void preProcessRequest (Execution execution) {
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               def prefix="VNFREST_"
+               execution.setVariable("prefix", prefix)
+               setSuccessIndicator(execution, false)
+
+               try {
+                       String request = validateRequest(execution, "att-mso-request-id")
+
+                       // Get the request type (the name of the root element) from the request
+
+                       Node root = new XmlParser().parseText(request)
+                       String requestType = root.name()
+                       execution.setVariable(prefix + 'requestType', requestType)
+                       logDebug(getProcessKey(execution) + ': ' + prefix + 'requestType = ' + requestType, isDebugLogEnabled)
+
+                       utils.logAudit('VnfAdapterRestV1, request: ' + request)
+                       // Get the messageId from the request
+
+                       String messageId = getChildText(root, 'messageId')
+
+                       if (messageId == null || messageId.isEmpty()) {
+                               String msg = getProcessKey(execution) + ': no messageId in ' + requestType
+                               logError(msg)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                       }
+
+                       execution.setVariable(prefix + 'messageId', messageId)
+                       logDebug(getProcessKey(execution) + ': ' + prefix + 'messageId = ' + messageId, isDebugLogEnabled)
+
+                       // Get the notificationUrl from the request
+
+                       String notificationUrl = getChildText(root, 'notificationUrl')
+
+                       if (notificationUrl == null || notificationUrl.isEmpty()) {
+                               String msg = getProcessKey(execution) + ': no notificationUrl in ' + requestType
+                               logError(msg)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                       }
+
+                       execution.setVariable(prefix + 'notificationUrl', notificationUrl)
+                       logDebug(getProcessKey(execution) + ': ' + prefix + 'notificationUrl = ' + notificationUrl, isDebugLogEnabled)
+
+                       // Determine the VnfAdapter endpoint
+
+                       String vnfAdapterEndpoint = execution.getVariable("URN_mso_adapters_vnf_rest_endpoint")
+
+                       if (vnfAdapterEndpoint == null || vnfAdapterEndpoint.isEmpty()) {
+                               String msg = getProcessKey(execution) + ': mso:adapters:vnf:rest:endpoint URN mapping is not defined'
+                               logError(msg)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                       }
+
+                       while (vnfAdapterEndpoint.endsWith('/')) {
+                               vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, vnfAdapterEndpoint.length()-1)
+                       }
+
+                       String vnfAdapterMethod = null
+                       String vnfAdapterUrl = null
+                       String vnfAdapterRequest = request
+
+                       if ('createVfModuleRequest'.equals(requestType)) {
+                               String vnfId = getChildText(root, 'vnfId')
+
+                               if (vnfId == null || vnfId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               vnfAdapterMethod = 'POST'
+                               vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') + '/vf-modules'
+
+                       } else if ('updateVfModuleRequest'.equals(requestType)) {
+                               String vnfId = getChildText(root, 'vnfId')
+
+                               if (vnfId == null || vnfId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               String vfModuleId = getChildText(root, 'vfModuleId')
+
+                               if (vfModuleId == null || vfModuleId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               vnfAdapterMethod = 'PUT'
+                               vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
+                                       '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8')
+
+                       } else if ('deleteVfModuleRequest'.equals(requestType)) {
+                               String vnfId = getChildText(root, 'vnfId')
+
+                               if (vnfId == null || vnfId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               String vfModuleId = getChildText(root, 'vfModuleId')
+
+                               if (vfModuleId == null || vfModuleId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               vnfAdapterMethod = 'DELETE'
+                               vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
+                                       '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8')
+
+                       } else if ('rollbackVfModuleRequest'.equals(requestType)) {
+                               Node vfModuleRollbackNode = getChild(root, 'vfModuleRollback')
+
+                               if (vfModuleRollbackNode == null) {
+                                       String msg = getProcessKey(execution) + ': no vfModuleRollback in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               String vnfId = getChildText(vfModuleRollbackNode, 'vnfId')
+
+                               if (vnfId == null || vnfId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               String vfModuleId = getChildText(vfModuleRollbackNode, 'vfModuleId')
+
+                               if (vfModuleId == null || vfModuleId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               vnfAdapterMethod = 'DELETE'
+                               vnfAdapterUrl = vnfAdapterEndpoint + '/' + URLEncoder.encode(vnfId, 'UTF-8') +
+                                       '/vf-modules/' + URLEncoder.encode(vfModuleId, 'UTF-8') + '/rollback'
+
+                       } else if ('createVolumeGroupRequest'.equals(requestType)) {
+                               vnfAdapterMethod = 'POST'
+                               if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
+                                       vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
+                               }
+                               vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups'
+
+                       } else if ('updateVolumeGroupRequest'.equals(requestType)) {
+                               String volumeGroupId = getChildText(root, 'volumeGroupId')
+
+                               if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               vnfAdapterMethod = 'PUT'
+                               if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
+                                       vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
+                               }
+                               vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8')
+
+                       } else if ('deleteVolumeGroupRequest'.equals(requestType)) {
+                               String volumeGroupId = getChildText(root, 'volumeGroupId')
+
+                               if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
+                                       logError(msg)
+                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                               }
+
+                               vnfAdapterMethod = 'DELETE'
+                               if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
+                                       vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
+                               }
+                               vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8')
+
+                       } else if ('rollbackVolumeGroupRequest'.equals(requestType)) {
+                               String volumeGroupId = getChildText(root, 'volumeGroupId')
+
+                               if (volumeGroupId == null || volumeGroupId.isEmpty()) {
+                                       String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
+                                       logError(msg)
+                                       createWorkflowException(execution, 2000, msg)
+                               }
+
+                               vnfAdapterMethod = 'DELETE'
+                               if (vnfAdapterEndpoint.endsWith('v1/vnfs')) {
+                                       vnfAdapterEndpoint = vnfAdapterEndpoint.substring(0, (vnfAdapterEndpoint.length()-'/vnfs'.length()))
+                               }
+                               vnfAdapterUrl = vnfAdapterEndpoint + '/volume-groups/' + URLEncoder.encode(volumeGroupId, 'UTF-8')  + '/rollback'
+
+                       } else {
+                               String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
+                               logError(msg)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                       }
+
+                       execution.setVariable(prefix + 'vnfAdapterMethod', vnfAdapterMethod)
+                       logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterMethod = ' + vnfAdapterMethod, isDebugLogEnabled)
+                       execution.setVariable(prefix + 'vnfAdapterUrl', vnfAdapterUrl)
+                       logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterUrl = ' + vnfAdapterUrl, isDebugLogEnabled)
+                       execution.setVariable(prefix + 'vnfAdapterRequest', vnfAdapterRequest)
+                       logDebug(getProcessKey(execution) + ': ' + prefix + 'vnfAdapterRequest = \n' + vnfAdapterRequest, isDebugLogEnabled)
+
+                       // Get the Basic Auth credentials for the VnfAdapter
+
+                       String basicAuthValue = execution.getVariable("URN_mso_adapters_po_auth")
+
+                       if (basicAuthValue == null || basicAuthValue.isEmpty()) {
+                               logError(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined")
+                       } else {
+                               logDebug(getProcessKey(execution) + ": Obtained BasicAuth credentials for VnfAdapter:" +
+                                       basicAuthValue, isDebugLogEnabled)
+                               try {
+                                       def encodedString = utils.getBasicAuth(basicAuthValue, execution.getVariable("URN_mso_msoKey"))
+                                       execution.setVariable(prefix + 'basicAuthHeaderValue', encodedString)
+                               } catch (IOException ex) {
+                                       logError(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for VnfAdapter")
+                               }
+                       }
+
+               } catch (BpmnError e) {
+                       logDebug(" Rethrowing MSOWorkflowException", isDebugLogEnabled)
+                       throw e
+               } catch (Exception e) {
+                       String msg = 'Caught exception in ' + method + ": " + e
+                       logError(msg)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+               }
+       }
+
+       /**
+        * This method is used instead of an HTTP Connector task because the
+        * connector does not allow DELETE with a body.
+        */
+       public void sendRequestToVnfAdapter(Execution execution) {
+               def method = getClass().getSimpleName() + '.sendRequestToVnfAdapter(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String prefix = execution.getVariable('prefix')
+
+               try {
+                       String vnfAdapterMethod = execution.getVariable(prefix + 'vnfAdapterMethod')
+                       String vnfAdapterUrl = execution.getVariable(prefix + 'vnfAdapterUrl')
+                       String vnfAdapterRequest = execution.getVariable(prefix + 'vnfAdapterRequest')
+
+                       RESTConfig config = new RESTConfig(vnfAdapterUrl)
+                       RESTClient client = new RESTClient(config).
+                               addHeader("Content-Type", "application/xml").
+                               addAuthorizationHeader(execution.getVariable(prefix + "basicAuthHeaderValue"));
+
+                       APIResponse response;
+
+                       if ("GET".equals(vnfAdapterMethod)) {
+                               response = client.httpGet()
+                       } else if ("PUT".equals(vnfAdapterMethod)) {
+                               response = client.httpPut(vnfAdapterRequest)
+                       } else if ("POST".equals(vnfAdapterMethod)) {
+                               response = client.httpPost(vnfAdapterRequest)
+                       } else if ("DELETE".equals(vnfAdapterMethod)) {
+                               response = client.httpDelete(vnfAdapterRequest)
+                       } else {
+                               String msg = 'Unsupported HTTP method "' + vnfAdapterMethod + '" in ' + method + ": " + e
+                               logError(msg)
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+                       }
+
+                       execution.setVariable(prefix + "vnfAdapterStatusCode", response.getStatusCode())
+                       execution.setVariable(prefix + "vnfAdapterResponse", response.getResponseBodyAsString())
+               } catch (BpmnError e) {
+                       throw e
+               } catch (Exception e) {
+                       String msg = 'Caught exception in ' + method + ": " + e
+                       logError(msg)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
+               }
+       }
+
+       public void processCallback(Execution execution){
+               def method = getClass().getSimpleName() + '.processCallback(' +
+                       'execution=' + execution.getId() +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               logDebug('Entered ' + method, isDebugLogEnabled)
+
+               String prefix = execution.getVariable('prefix')
+               String callback = execution.getVariable(prefix + 'callback')
+
+               try {
+                       logDebug(getProcessKey(execution) + ": received callback:\n" + callback, isDebugLogEnabled)
+
+                       Node root = new XmlParser().parseText(callback)
+                       if (root.name().endsWith('Exception')) {
+                               vnfAdapterWorkflowException(execution, callback)
+                       }
+
+                       // The XML callback is available to the calling flow in any case,
+                       // even if a WorkflowException was generated.
+                       execution.setVariable(getProcessKey(execution) + 'Response', callback)
+                       // TODO: Should deprecate use of processKey+Response variable for the response. Will use "WorkflowResponse" instead.
+                       execution.setVariable("WorkflowResponse", callback)
+               } catch(BpmnError b){
+                       throw b
+               } catch (Exception e) {
+                       e.printStackTrace()
+                       callback = callback == null || String.valueOf(callback).isEmpty() ? "NONE" : callback
+                       String msg = "Received error from VnfAdapter: " + callback
+                       logDebug(getProcessKey(execution) + ': ' + msg, isDebugLogEnabled)
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7020, msg)
+               }
+       }
+
+       /**
+        * Tries to parse the response as XML to extract the information to create
+        * a WorkflowException.  If the response cannot be parsed, a more generic
+        * WorkflowException is created.
+        */
+       public void vnfAdapterWorkflowException(Execution execution, Object response) {
+               try {
+                       Node root = new XmlParser().parseText(response)
+                       String category = getChildText(root, "category")
+                       category = category == null || category.isEmpty() ? "" : " category='" + category + "'"
+                       String message = getChildText(root, "message")
+                       message = message == null || message.isEmpty() ? "" : " message='" + message + "'"
+                       String rolledBack = getChildText(root, "rolledBack")
+                       rolledBack = rolledBack == null || rolledBack.isEmpty() ? "" : " rolledBack='" + rolledBack + "'"
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7020, "Received " + root.name() +
+                               " from VnfAdapter:" + category + message + rolledBack);
+               }catch(BpmnError b){
+                       throw b
+               }catch (Exception e) {
+                       response = response == null || String.valueOf(response).isEmpty() ? "NONE" : response
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7020, "Received error from VnfAdapter: " + response)
+               }
+       }
+
+       /**
+        * Gets the named child of the specified node.
+        * @param node the node
+        * @param name the child name
+        * @return the child node, or null if no such child exists
+        */
+       private Node getChild(Node node, String name) {
+               for (Node child : node.children()) {
+                       if (child.name() == name) {
+                               return child
+                       }
+               }
+               return null
+       }
+
+       /**
+        * Gets the text of the named child of the specified node.
+        * @param node the node
+        * @param name the child name
+        * @return the child node text, or null if no such child exists
+        */
+       private String getChildText(Node node, String name) {
+               Node child = getChild(node, name)
+               return child == null ? null : child.text()
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/VnfAdapterUtils.groovy
new file mode 100644 (file)
index 0000000..e92af96
--- /dev/null
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution;
+
+class VnfAdapterUtils {
+
+       private AbstractServiceTaskProcessor taskProcessor
+
+       public VnfAdapterUtils(AbstractServiceTaskProcessor taskProcessor) {
+               this.taskProcessor = taskProcessor
+       }
+
+       ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+       public void validateVnfResponse(Execution execution, String responseVar, String responseCodeVar, String errorResponseVar) {
+               def method = getClass().getSimpleName() + '.validateVnfResponse(' +
+                       'execution=' + execution.getId() +
+                       ', responseVar=' + responseVar +
+                       ', responseCodeVar=' + responseCodeVar +
+                       ', errorResponseVar=' + errorResponseVar +
+                       ')'
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+               taskProcessor.logDebug('Entered ' + method, isDebugLogEnabled)
+
+               try {
+                       def prefix = execution.getVariable('prefix')
+
+                       def response = execution.getVariable(responseVar)
+                       def responseCode = execution.getVariable(responseCodeVar)
+                       def errorResponse = execution.getVariable(errorResponseVar)
+
+                       if (response.contains("WorkflowException")) {
+                               execution.setVariable(prefix + "ErrorResponse", response)
+                               //execution.setVariable(prefix + "ResponseCode", responseCode)
+                               taskProcessor.logDebug(" Sub Vnf flow Error WorkflowException Response - " + "\n" + response, isDebugLogEnabled)
+                               throw new BpmnError("MSOWorkflowException")
+                       }
+               } catch (BpmnError e) {
+                       throw e;
+               } catch (Exception e) {
+                       taskProcessor.logError('Caught exception in ' + method, e)
+                       taskProcessor.workflowException(execution, 'Internal Error- Unable to validate VNF Response ' + e.getMessage(), 500)
+               }
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/CommonCompletionRequest.groovy
new file mode 100644 (file)
index 0000000..3963c26
--- /dev/null
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts.beans
+
+import javax.xml.bind.annotation.XmlAccessType
+import javax.xml.bind.annotation.XmlAccessorType
+
+@XmlAccessorType(XmlAccessType.FIELD)
+class CommonCompletionRequest {
+               String source
+               String callbackURL
+               String basicAuthCred
+               String correlator
+               String startTime
+               String finishTime
+               String requestScope
+               String requestType
+               //complete, failed, inProgress
+               String requestState
+               //COMPLETED or FAILED
+               String status
+               //response message for callback
+               String message
+               //response body for db update
+               String response
+               int responseCode
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy b/bpmn/MSOGammaBPMN/src/main/groovy/com/att/bpm/scripts/beans/SAOTSTRequest.groovy
new file mode 100644 (file)
index 0000000..9c60bb9
--- /dev/null
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.bpm.scripts.beans
+import javax.xml.bind.annotation.XmlAccessType
+import javax.xml.bind.annotation.XmlAccessorType
+@XmlAccessorType(XmlAccessType.FIELD)
+class SAOTSTRequest {
+               String vlanId
+               String functionalArea
+               String problem
+               String descr
+               String activeOrg
+               String managingOrg
+               String workQueue
+               String reportedProduct
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/callback/wsdl/v1/SDNCCallbackAdapterPortType.java
new file mode 100644 (file)
index 0000000..f035b02
--- /dev/null
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.sdnc.adapter.callback.wsdl.v1;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterCallbackRequest;
+import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.4-b01
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "SDNCCallbackAdapterPortType", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/callback/wsdl/v1")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface SDNCCallbackAdapterPortType {
+
+
+    /**
+     *
+     * @param sdncAdapterCallbackRequest
+     * @return
+     *     returns com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse
+     */
+    @WebMethod(operationName = "SDNCAdapterCallback")
+    @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
+    public SDNCAdapterResponse sdncAdapterCallback(
+        @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackRequest")
+        SDNCAdapterCallbackRequest sdncAdapterCallbackRequest);
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/CallbackHeader.java
new file mode 100644 (file)
index 0000000..38f7bc5
--- /dev/null
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="ResponseCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="ResponseMessage" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "responseCode",
+    "responseMessage"
+}, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+@XmlRootElement(name = "CallbackHeader")
+public class CallbackHeader {
+
+    @XmlElement(name = "RequestId", required = true, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+    protected String requestId;
+    @XmlElement(name = "ResponseCode", required = true,namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+    protected String responseCode;
+    @XmlElement(name = "ResponseMessage", required = true,namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+    protected String responseMessage;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the responseCode property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getResponseCode() {
+        return responseCode;
+    }
+
+    /**
+     * Sets the value of the responseCode property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setResponseCode(String value) {
+        this.responseCode = value;
+    }
+
+    /**
+     * Gets the value of the responseMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getResponseMessage() {
+        return responseMessage;
+    }
+
+    /**
+     * Sets the value of the responseMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setResponseMessage(String value) {
+        this.responseMessage = value;
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/ObjectFactory.java
new file mode 100644 (file)
index 0000000..adb0a23
--- /dev/null
@@ -0,0 +1,91 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the com.att.domain2.workflow.sdnc.adapter.schema.v1 package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.att.domain2.workflow.sdnc.adapter.schema.v1
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link RequestHeader }
+     * 
+     */
+    public RequestHeader createRequestHeader() {
+        return new RequestHeader();
+    }
+
+    /**
+     * Create an instance of {@link SDNCAdapterResponse }
+     * 
+     */
+    public SDNCAdapterResponse createSDNCAdapterResponse() {
+        return new SDNCAdapterResponse();
+    }
+
+    /**
+     * Create an instance of {@link SDNCAdapterCallbackRequest }
+     * 
+     */
+    public SDNCAdapterCallbackRequest createSDNCAdapterCallbackRequest() {
+        return new SDNCAdapterCallbackRequest();
+    }
+
+    /**
+     * Create an instance of {@link CallbackHeader }
+     * 
+     */
+    public CallbackHeader createCallbackHeader() {
+        return new CallbackHeader();
+    }
+
+    /**
+     * Create an instance of {@link SDNCAdapterRequest }
+     * 
+     */
+    public SDNCAdapterRequest createSDNCAdapterRequest() {
+        return new SDNCAdapterRequest();
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/RequestHeader.java
new file mode 100644 (file)
index 0000000..40eeb11
--- /dev/null
@@ -0,0 +1,223 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="SvcInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="SvcAction" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="SvcOperation" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="CallbackUrl" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="MsoAction" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "svcInstanceId",
+    "svcAction",
+    "svcOperation",
+    "callbackUrl",
+    "msoAction"
+})
+@XmlRootElement(name = "RequestHeader")
+public class RequestHeader {
+
+    @XmlElement(name = "RequestId", required = true)
+    protected String requestId;
+    @XmlElement(name = "SvcInstanceId")
+    protected String svcInstanceId;
+    @XmlElement(name = "SvcAction", required = true)
+    protected String svcAction;
+    @XmlElement(name = "SvcOperation", required = true)
+    protected String svcOperation;
+    @XmlElement(name = "CallbackUrl", required = true)
+    protected String callbackUrl;
+    @XmlElement(name = "MsoAction")
+    protected String msoAction;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the svcInstanceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSvcInstanceId() {
+        return svcInstanceId;
+    }
+
+    /**
+     * Sets the value of the svcInstanceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSvcInstanceId(String value) {
+        this.svcInstanceId = value;
+    }
+
+    /**
+     * Gets the value of the svcAction property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSvcAction() {
+        return svcAction;
+    }
+
+    /**
+     * Sets the value of the svcAction property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSvcAction(String value) {
+        this.svcAction = value;
+    }
+
+    /**
+     * Gets the value of the svcOperation property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSvcOperation() {
+        return svcOperation;
+    }
+
+    /**
+     * Sets the value of the svcOperation property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSvcOperation(String value) {
+        this.svcOperation = value;
+    }
+
+    /**
+     * Gets the value of the callbackUrl property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCallbackUrl() {
+        return callbackUrl;
+    }
+
+    /**
+     * Sets the value of the callbackUrl property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCallbackUrl(String value) {
+        this.callbackUrl = value;
+    }
+
+    /**
+     * Gets the value of the msoAction property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMsoAction() {
+        return msoAction;
+    }
+
+    /**
+     * Sets the value of the msoAction property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMsoAction(String value) {
+        this.msoAction = value;
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterCallbackRequest.java
new file mode 100644 (file)
index 0000000..663983a
--- /dev/null
@@ -0,0 +1,129 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+
+import java.io.StringWriter;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://domain2.att.com/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
+ *         &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1", propOrder = {
+    "callbackHeader",
+    "requestData"
+})
+@XmlRootElement(name = "SDNCAdapterCallbackRequest", namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+public class SDNCAdapterCallbackRequest {
+
+    @XmlElement(name = "CallbackHeader", required = true, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+    protected CallbackHeader callbackHeader;
+    @XmlElement(name = "RequestData", required=false, namespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+    protected Object requestData;
+
+    /**
+     * Gets the value of the callbackHeader property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CallbackHeader }
+     *     
+     */
+    public CallbackHeader getCallbackHeader() {
+        return callbackHeader;
+    }
+
+    /**
+     * Sets the value of the callbackHeader property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CallbackHeader }
+     *     
+     */
+    public void setCallbackHeader(CallbackHeader value) {
+        this.callbackHeader = value;
+    }
+
+    /**
+     * Gets the value of the requestData property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getRequestData() {
+        return requestData;
+    }
+
+    /**
+     * Sets the value of the requestData property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setRequestData(Object value) {
+        this.requestData = value;
+    }
+
+       public String toString() {
+               StringWriter writer = new StringWriter();
+               try {
+                       JAXBContext context = JAXBContext
+                                       .newInstance(SDNCAdapterCallbackRequest.class);
+                       Marshaller m = context.createMarshaller();
+                       m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+                       m.marshal(this, writer);
+                       return writer.getBuffer().toString();
+               } catch (JAXBException e) {
+                       return "";
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterRequest.java
new file mode 100644 (file)
index 0000000..4de6309
--- /dev/null
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://domain2.att.com/workflow/sdnc/adapter/schema/v1}RequestHeader"/>
+ *         &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestHeader",
+    "requestData"
+})
+@XmlRootElement(name = "SDNCAdapterRequest")
+public class SDNCAdapterRequest {
+
+    @XmlElement(name = "RequestHeader", required = true)
+    protected RequestHeader requestHeader;
+    @XmlElement(name = "RequestData", required = true)
+    protected Object requestData;
+
+    /**
+     * Gets the value of the requestHeader property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestHeader }
+     *     
+     */
+    public RequestHeader getRequestHeader() {
+        return requestHeader;
+    }
+
+    /**
+     * Sets the value of the requestHeader property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestHeader }
+     *     
+     */
+    public void setRequestHeader(RequestHeader value) {
+        this.requestHeader = value;
+    }
+
+    /**
+     * Gets the value of the requestData property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getRequestData() {
+        return requestData;
+    }
+
+    /**
+     * Sets the value of the requestData property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setRequestData(Object value) {
+        this.requestData = value;
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/SDNCAdapterResponse.java
new file mode 100644 (file)
index 0000000..88fbd8f
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.sdnc.adapter.schema.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+@XmlRootElement(name = "SDNCAdapterResponse")
+public class SDNCAdapterResponse {
+
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/sdnc/adapter/schema/v1/package-info.java
new file mode 100644 (file)
index 0000000..002e655
--- /dev/null
@@ -0,0 +1,22 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package com.att.domain2.workflow.sdnc.adapter.schema.v1;
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/CreateVnfNotification.java
new file mode 100644 (file)
index 0000000..220441a
--- /dev/null
@@ -0,0 +1,459 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for createVnfNotification complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="createVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="outputs" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;sequence>
+ *                             &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                             &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                           &lt;/sequence>
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="rollback" type="{http://com.att.mso/vnfNotify}vnfRollback" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "createVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage",
+    "vnfId",
+    "outputs",
+    "rollback"
+})
+public class CreateVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+    protected String vnfId;
+    protected CreateVnfNotification.Outputs outputs;
+    protected VnfRollback rollback;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     * 
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     * 
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+
+    /**
+     * Gets the value of the outputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CreateVnfNotification.Outputs }
+     *     
+     */
+    public CreateVnfNotification.Outputs getOutputs() {
+        return outputs;
+    }
+
+    /**
+     * Sets the value of the outputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CreateVnfNotification.Outputs }
+     *     
+     */
+    public void setOutputs(CreateVnfNotification.Outputs value) {
+        this.outputs = value;
+    }
+
+    /**
+     * Gets the value of the rollback property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VnfRollback }
+     *     
+     */
+    public VnfRollback getRollback() {
+        return rollback;
+    }
+
+    /**
+     * Sets the value of the rollback property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VnfRollback }
+     *     
+     */
+    public void setRollback(VnfRollback value) {
+        this.rollback = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                 &lt;/sequence>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "entry"
+    })
+    public static class Outputs {
+
+        protected List<CreateVnfNotification.Outputs.Entry> entry;
+        
+        /**
+         * Gets the value of the entry property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the entry property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEntry().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link CreateVnfNotification.Outputs.Entry }
+         * 
+         * 
+         */
+        public List<CreateVnfNotification.Outputs.Entry> getEntry() {
+            if (entry == null) {
+                entry = new ArrayList<CreateVnfNotification.Outputs.Entry>();
+            }
+            return this.entry;
+        }
+
+        // Not a generated method
+        public String toString() {
+               StringBuilder out = new StringBuilder();
+               out.append("<outputs>\n");
+               if (entry != null) {
+                       for (Entry e : entry) {
+                               out.append(e.toString());
+                               out.append('\n');
+                       }
+               }
+               out.append("</outputs>");
+               return out.toString();
+        }
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *       &lt;/sequence>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "key",
+            "value"
+        })
+        public static class Entry {
+
+            protected String key;
+            protected String value;
+
+            /**
+             * Gets the value of the key property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getKey() {
+                return key;
+            }
+
+            /**
+             * Sets the value of the key property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setKey(String value) {
+                this.key = value;
+            }
+
+            /**
+             * Gets the value of the value property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getValue() {
+                return value;
+            }
+
+            /**
+             * Sets the value of the value property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setValue(String value) {
+                this.value = value;
+                
+            }
+            
+            // Not a generated method
+            public String toString() {
+               String entry = "";
+                       entry =
+               "<entry>"+ '\n' +
+              "   <key>"+key+"</key>" + '\n' +
+              "   <value>"+value+"</value>" + '\n' +
+              "</entry>";
+               return entry; 
+            }
+
+        }
+
+    }
+
+    // Not a generated method
+       public String toString() {
+       String createVnfNotification = "";
+       if (exception==null) {
+               createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                      "   <vnfId>"+vnfId+"</vnfId>" + '\n' +
+                                      (outputs == null ? "" : outputs.toString() + '\n') +
+                                      "   <rollback>"+rollback+"</rollback>" + '\n' +
+                                      "</ns2:createVnfNotification>";
+       } else {
+               createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                      (outputs == null ? "" : outputs.toString() + '\n') +
+                                  "   <exception>"+exception+"</exception>" + '\n' +
+                                  "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+                                      "</ns2:createVnfNotification>";
+       }
+       return createVnfNotification;
+       }    
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/DeleteVnfNotification.java
new file mode 100644 (file)
index 0000000..9ca53a8
--- /dev/null
@@ -0,0 +1,205 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import java.io.StringWriter;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterCallbackRequest;
+
+
+/**
+ * <p>Java class for deleteVnfNotification complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="deleteVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "deleteVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage"
+})
+public class DeleteVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     * 
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     * 
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+
+    /**
+     * Overrides toString() method 
+     * @return String type (deleteVnfNotification)
+     */
+    
+       public String toString() {
+       String deleteVnfNotification = "";
+       if (exception==null) {
+               deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                      "</ns2:deleteVnfNotification>";
+       } else {
+               deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                  "   <exception>"+exception+"</exception>" + '\n' +
+                                  "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+                                      "</ns2:deleteVnfNotification>";
+       }
+       return deleteVnfNotification;
+       }    
+
+/*     
+       public String toString() {
+               StringWriter writer = new StringWriter();
+               try {
+                       JAXBContext context = JAXBContext
+                                       .newInstance(DeleteVnfNotification.class);
+                       Marshaller m = context.createMarshaller();
+                       m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+                       m.marshal(this, writer);
+                       //System.out.println("toString() - " + writer.getBuffer().toString());                  
+                       return writer.getBuffer().toString();
+               } catch (JAXBException e) {
+                       //System.out.println("JAXBException - " + e.getStackTrace());                   
+                       return "";
+               }
+       }    
+*/     
+       
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoExceptionCategory.java
new file mode 100644 (file)
index 0000000..9d430ce
--- /dev/null
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for msoExceptionCategory.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="msoExceptionCategory">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="OPENSTACK"/>
+ *     &lt;enumeration value="IO"/>
+ *     &lt;enumeration value="INTERNAL"/>
+ *     &lt;enumeration value="USERDATA"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "msoExceptionCategory")
+@XmlEnum
+public enum MsoExceptionCategory {
+
+    OPENSTACK,
+    IO,
+    INTERNAL,
+    USERDATA;
+
+    public String value() {
+        return name();
+    }
+
+    public static MsoExceptionCategory fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/MsoRequest.java
new file mode 100644 (file)
index 0000000..9810306
--- /dev/null
@@ -0,0 +1,114 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for msoRequest complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="msoRequest">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="requestId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="serviceInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "msoRequest", propOrder = {
+    "requestId",
+    "serviceInstanceId"
+})
+public class MsoRequest {
+
+    protected String requestId;
+    protected String serviceInstanceId;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the serviceInstanceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    /**
+     * Sets the value of the serviceInstanceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceInstanceId(String value) {
+        this.serviceInstanceId = value;
+    }
+    
+    public String toString() {
+       String request = "";
+       request =
+       "<requestId>"+requestId+"</requestId>" + '\n' +
+       "<serviceInstanceId>"+serviceInstanceId+"</serviceInstanceId>";
+       return request; 
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/ObjectFactory.java
new file mode 100644 (file)
index 0000000..3c42f35
--- /dev/null
@@ -0,0 +1,208 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.openecomp.mso.adapters.vnf.async.client package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _RollbackVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "rollbackVnfNotification");
+    private final static QName _DeleteVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "deleteVnfNotification");
+    private final static QName _CreateVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "createVnfNotification");
+    private final static QName _UpdateVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "updateVnfNotification");
+    private final static QName _QueryVnfNotification_QNAME = new QName("http://com.att.mso/vnfNotify", "queryVnfNotification");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.mso.adapters.vnf.async.client
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link UpdateVnfNotification }
+     * 
+     */
+    public UpdateVnfNotification createUpdateVnfNotification() {
+        return new UpdateVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link UpdateVnfNotification.Outputs }
+     * 
+     */
+    public UpdateVnfNotification.Outputs createUpdateVnfNotificationOutputs() {
+        return new UpdateVnfNotification.Outputs();
+    }
+
+    /**
+     * Create an instance of {@link QueryVnfNotification }
+     * 
+     */
+    public QueryVnfNotification createQueryVnfNotification() {
+        return new QueryVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link QueryVnfNotification.Outputs }
+     * 
+     */
+    public QueryVnfNotification.Outputs createQueryVnfNotificationOutputs() {
+        return new QueryVnfNotification.Outputs();
+    }
+
+    /**
+     * Create an instance of {@link CreateVnfNotification }
+     * 
+     */
+    public CreateVnfNotification createCreateVnfNotification() {
+        return new CreateVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link CreateVnfNotification.Outputs }
+     * 
+     */
+    public CreateVnfNotification.Outputs createCreateVnfNotificationOutputs() {
+        return new CreateVnfNotification.Outputs();
+    }
+
+    /**
+     * Create an instance of {@link DeleteVnfNotification }
+     * 
+     */
+    public DeleteVnfNotification createDeleteVnfNotification() {
+        return new DeleteVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link RollbackVnfNotification }
+     * 
+     */
+    public RollbackVnfNotification createRollbackVnfNotification() {
+        return new RollbackVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link MsoRequest }
+     * 
+     */
+    public MsoRequest createMsoRequest() {
+        return new MsoRequest();
+    }
+
+    /**
+     * Create an instance of {@link VnfRollback }
+     * 
+     */
+    public VnfRollback createVnfRollback() {
+        return new VnfRollback();
+    }
+
+    /**
+     * Create an instance of {@link UpdateVnfNotification.Outputs.Entry }
+     * 
+     */
+    public UpdateVnfNotification.Outputs.Entry createUpdateVnfNotificationOutputsEntry() {
+        return new UpdateVnfNotification.Outputs.Entry();
+    }
+
+    /**
+     * Create an instance of {@link QueryVnfNotification.Outputs.Entry }
+     * 
+     */
+    public QueryVnfNotification.Outputs.Entry createQueryVnfNotificationOutputsEntry() {
+        return new QueryVnfNotification.Outputs.Entry();
+    }
+
+    /**
+     * Create an instance of {@link CreateVnfNotification.Outputs.Entry }
+     * 
+     */
+    public CreateVnfNotification.Outputs.Entry createCreateVnfNotificationOutputsEntry() {
+        return new CreateVnfNotification.Outputs.Entry();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link RollbackVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "rollbackVnfNotification")
+    public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) {
+        return new JAXBElement<RollbackVnfNotification>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link DeleteVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "deleteVnfNotification")
+    public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) {
+        return new JAXBElement<DeleteVnfNotification>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link CreateVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "createVnfNotification")
+    public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) {
+        return new JAXBElement<CreateVnfNotification>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link UpdateVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "updateVnfNotification")
+    public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) {
+        return new JAXBElement<UpdateVnfNotification>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link QueryVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://com.att.mso/vnfNotify", name = "queryVnfNotification")
+    public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) {
+        return new JAXBElement<QueryVnfNotification>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value);
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/QueryVnfNotification.java
new file mode 100644 (file)
index 0000000..ebbf867
--- /dev/null
@@ -0,0 +1,490 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification.Outputs.Entry;
+
+
+/**
+ * <p>Java class for queryVnfNotification complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="queryVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="vnfExists" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="status" type="{http://com.att.mso/vnfNotify}vnfStatus" minOccurs="0"/>
+ *         &lt;element name="outputs" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;sequence>
+ *                             &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                             &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                           &lt;/sequence>
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "queryVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage",
+    "vnfExists",
+    "vnfId",
+    "status",
+    "outputs"
+})
+public class QueryVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+    protected Boolean vnfExists;
+    protected String vnfId;
+    protected VnfStatus status;
+    protected QueryVnfNotification.Outputs outputs;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     * 
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     * 
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+
+    /**
+     * Gets the value of the vnfExists property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isVnfExists() {
+        return vnfExists;
+    }
+
+    /**
+     * Sets the value of the vnfExists property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setVnfExists(Boolean value) {
+        this.vnfExists = value;
+    }
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VnfStatus }
+     *     
+     */
+    public VnfStatus getStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VnfStatus }
+     *     
+     */
+    public void setStatus(VnfStatus value) {
+        this.status = value;
+    }
+
+    /**
+     * Gets the value of the outputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link QueryVnfNotification.Outputs }
+     *     
+     */
+    public QueryVnfNotification.Outputs getOutputs() {
+        return outputs;
+    }
+
+    /**
+     * Sets the value of the outputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link QueryVnfNotification.Outputs }
+     *     
+     */
+    public void setOutputs(QueryVnfNotification.Outputs value) {
+        this.outputs = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                 &lt;/sequence>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "entry"
+    })
+    public static class Outputs {
+
+        protected List<QueryVnfNotification.Outputs.Entry> entry;
+
+        /**
+         * Gets the value of the entry property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the entry property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEntry().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link QueryVnfNotification.Outputs.Entry }
+         * 
+         * 
+         */
+        public List<QueryVnfNotification.Outputs.Entry> getEntry() {
+            if (entry == null) {
+                entry = new ArrayList<QueryVnfNotification.Outputs.Entry>();
+            }
+            return this.entry;
+        }
+        
+        // Not a generated method
+        public String toString() {
+               StringBuilder out = new StringBuilder();
+               out.append("<outputs>\n");
+               if (entry != null) {
+                       for (Entry e : entry) {
+                               out.append(e.toString());
+                               out.append('\n');
+                       }
+               }
+               out.append("</outputs>");
+               return out.toString();
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *       &lt;/sequence>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "key",
+            "value"
+        })
+        public static class Entry {
+
+            protected String key;
+            protected String value;
+
+            /**
+             * Gets the value of the key property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getKey() {
+                return key;
+            }
+
+            /**
+             * Sets the value of the key property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setKey(String value) {
+                this.key = value;
+            }
+
+            /**
+             * Gets the value of the value property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getValue() {
+                return value;
+            }
+
+            /**
+             * Sets the value of the value property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setValue(String value) {
+                this.value = value;
+            }
+            
+            // Not a generated method
+            public String toString() {
+               String entry = "";
+                       entry =
+               "<entry>"+ '\n' +
+              "   <key>"+key+"</key>" + '\n' +
+              "   <value>"+value+"</value>" + '\n' +
+              "</entry>";
+               return entry; 
+            }
+
+        }
+
+    }
+    
+ // Not a generated method
+       public String toString() {
+       String queryVnfNotification = "";
+       if (exception==null) {
+               queryVnfNotification = "<ns2:queryVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                      "   <vnfExists>"+vnfExists+"</vnfExists>" + '\n' +
+                                      "   <vnfId>"+vnfId+"</vnfId>" + '\n' +
+                                      "   <status>"+status+"</status>" + '\n' +
+                                      (outputs == null ? "" : outputs.toString() + '\n') +                                           
+                                      "</ns2:queryVnfNotification>";
+       } else {
+               queryVnfNotification = "<ns2:queryVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                      (outputs == null ? "" : outputs.toString() + '\n') +
+                                  "   <exception>"+exception+"</exception>" + '\n' +
+                                  "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+                                      "</ns2:queryVnfNotification>";
+       }
+       return queryVnfNotification;
+       }    
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/RollbackVnfNotification.java
new file mode 100644 (file)
index 0000000..67c544d
--- /dev/null
@@ -0,0 +1,175 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for rollbackVnfNotification complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="rollbackVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "rollbackVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage"
+})
+public class RollbackVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     * 
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     * 
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+    
+    public String toString() {
+       String rollbackVnfNotification = "";
+       if (exception==null) {
+               rollbackVnfNotification = "<ns2:rollbackVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                      "</ns2:rollbackVnfNotification>";
+       } else {
+               rollbackVnfNotification = "<ns2:rollbackVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                  "   <exception>"+exception+"</exception>" + '\n' +
+                                  "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+                                      "</ns2:rollbackVnfNotification>";
+       }
+       return rollbackVnfNotification;
+
+    }
+    
+ }
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/UpdateVnfNotification.java
new file mode 100644 (file)
index 0000000..61ba439
--- /dev/null
@@ -0,0 +1,412 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for updateVnfNotification complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="updateVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://com.att.mso/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="outputs" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;sequence>
+ *                             &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                             &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                           &lt;/sequence>
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="rollback" type="{http://com.att.mso/vnfNotify}vnfRollback" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "updateVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage",
+    "outputs",
+    "rollback"
+})
+public class UpdateVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+    protected UpdateVnfNotification.Outputs outputs;
+    protected VnfRollback rollback;
+
+    /**
+     * Gets the value of the messageId property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     *
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     *
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     *
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+
+    /**
+     * Gets the value of the outputs property.
+     *
+     * @return
+     *     possible object is
+     *     {@link UpdateVnfNotification.Outputs }
+     *
+     */
+    public UpdateVnfNotification.Outputs getOutputs() {
+        return outputs;
+    }
+
+    /**
+     * Sets the value of the outputs property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link UpdateVnfNotification.Outputs }
+     *
+     */
+    public void setOutputs(UpdateVnfNotification.Outputs value) {
+        this.outputs = value;
+    }
+
+    /**
+     * Gets the value of the rollback property.
+     *
+     * @return
+     *     possible object is
+     *     {@link VnfRollback }
+     *
+     */
+    public VnfRollback getRollback() {
+        return rollback;
+    }
+
+    /**
+     * Sets the value of the rollback property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link VnfRollback }
+     *
+     */
+    public void setRollback(VnfRollback value) {
+        this.rollback = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     *
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     *
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                 &lt;/sequence>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     *
+     *
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "entry"
+    })
+    public static class Outputs {
+
+        protected List<UpdateVnfNotification.Outputs.Entry> entry;
+
+        /**
+         * Gets the value of the entry property.
+         *
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the entry property.
+         *
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEntry().add(newItem);
+         * </pre>
+         *
+         *
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link UpdateVnfNotification.Outputs.Entry }
+         *
+         *
+         */
+        public List<UpdateVnfNotification.Outputs.Entry> getEntry() {
+            if (entry == null) {
+                entry = new ArrayList<UpdateVnfNotification.Outputs.Entry>();
+            }
+            return this.entry;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         *
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         *
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *       &lt;/sequence>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         *
+         *
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "key",
+            "value"
+        })
+        public static class Entry {
+
+            protected String key;
+            protected String value;
+
+            /**
+             * Gets the value of the key property.
+             *
+             * @return
+             *     possible object is
+             *     {@link String }
+             *
+             */
+            public String getKey() {
+                return key;
+            }
+
+            /**
+             * Sets the value of the key property.
+             *
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *
+             */
+            public void setKey(String value) {
+                this.key = value;
+            }
+
+            /**
+             * Gets the value of the value property.
+             *
+             * @return
+             *     possible object is
+             *     {@link String }
+             *
+             */
+            public String getValue() {
+                return value;
+            }
+
+            /**
+             * Sets the value of the value property.
+             *
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *
+             */
+            public void setValue(String value) {
+                this.value = value;
+            }
+
+            public String toString() {
+               String entry = "";
+                       entry =
+              "   <key>"+key+"</key>" + '\n' +
+              "   <value>"+value+"</value>";
+               return entry;
+            }
+        }
+
+    }
+
+    public String toString(){
+       String updateVnfNotification = "";
+       if (exception==null) {
+               updateVnfNotification = "<ns2:updateVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                      "   <rollback>"+rollback+"</rollback>" + '\n' +
+                                      "</ns2:updateVnfNotification>";
+       } else {
+               updateVnfNotification = "<ns2:updateVnfNotification xmlns:ns2=\"http://com.att.mso/vnfNotify\"" + '\n' +
+                                      "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+                                      "   <messageId>"+messageId+"</messageId>" + '\n' +
+                                      "   <completed>"+completed+"</completed>" + '\n' +
+                                  "   <exception>"+exception+"</exception>" + '\n' +
+                                  "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+                                      "</ns2:updateVnfNotification>";
+       }
+
+       return updateVnfNotification;
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify.java
new file mode 100644 (file)
index 0000000..8aaed54
--- /dev/null
@@ -0,0 +1,177 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Action;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.8
+ * Generated source version: 2.2
+ * 
+ */
+@WebService(name = "vnfAdapterNotify", targetNamespace = "http://com.att.mso/vnfNotify")
+@XmlSeeAlso({
+    ObjectFactory.class
+})
+public interface VnfAdapterNotify {
+
+
+    /**
+     * 
+     * @param errorMessage
+     * @param exception
+     * @param messageId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/rollbackVnfNotificationRequest")
+    public void rollbackVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage);
+
+    /**
+     * 
+     * @param errorMessage
+     * @param vnfExists
+     * @param status
+     * @param exception
+     * @param outputs
+     * @param messageId
+     * @param vnfId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/queryVnfNotificationRequest")
+    public void queryVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "vnfExists", targetNamespace = "")
+        Boolean vnfExists,
+        @WebParam(name = "vnfId", targetNamespace = "")
+        String vnfId,
+        @WebParam(name = "status", targetNamespace = "")
+        VnfStatus status,
+        @WebParam(name = "outputs", targetNamespace = "")
+        com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.QueryVnfNotification.Outputs outputs);
+
+    /**
+     * 
+     * @param errorMessage
+     * @param exception
+     * @param rollback
+     * @param outputs
+     * @param messageId
+     * @param vnfId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/createVnfNotificationRequest")
+    public void createVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "vnfId", targetNamespace = "")
+        String vnfId,
+        @WebParam(name = "outputs", targetNamespace = "")
+        com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification.Outputs outputs,
+        @WebParam(name = "rollback", targetNamespace = "")
+        VnfRollback rollback);
+
+    /**
+     * 
+     * @param errorMessage
+     * @param exception
+     * @param rollback
+     * @param outputs
+     * @param messageId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/updateVnfNotificationRequest")
+    public void updateVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "outputs", targetNamespace = "")
+        com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.UpdateVnfNotification.Outputs outputs,
+        @WebParam(name = "rollback", targetNamespace = "")
+        VnfRollback rollback);
+
+    /**
+     * 
+     * @param errorMessage
+     * @param exception
+     * @param messageId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/deleteVnfNotificationRequest")
+    public void deleteVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage);
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfAdapterNotify_Service.java
new file mode 100644 (file)
index 0000000..ba3bca1
--- /dev/null
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.8
+ * Generated source version: 2.2
+ * 
+ */
+@WebServiceClient(name = "vnfAdapterNotify", targetNamespace = "http://com.att.mso/vnfNotify", wsdlLocation = "/VnfAdapterNotify.wsdl")
+public class VnfAdapterNotify_Service extends Service
+{
+
+    private final static URL VNFADAPTERNOTIFY_WSDL_LOCATION;
+    private final static WebServiceException VNFADAPTERNOTIFY_EXCEPTION;
+    private final static QName VNFADAPTERNOTIFY_QNAME = new QName("http://com.att.mso/vnfNotify", "vnfAdapterNotify");
+
+    static {
+        VNFADAPTERNOTIFY_WSDL_LOCATION = com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.VnfAdapterNotify_Service.class.getResource("/VnfAdapterNotify.wsdl");
+        WebServiceException e = null;
+        if (VNFADAPTERNOTIFY_WSDL_LOCATION == null) {
+            e = new WebServiceException("Cannot find '/VnfAdapterNotify.wsdl' wsdl. Place the resource correctly in the classpath.");
+        }
+        VNFADAPTERNOTIFY_EXCEPTION = e;
+    }
+
+    public VnfAdapterNotify_Service() {
+        super(__getWsdlLocation(), VNFADAPTERNOTIFY_QNAME);
+    }
+
+    public VnfAdapterNotify_Service(WebServiceFeature... features) {
+        super(__getWsdlLocation(), VNFADAPTERNOTIFY_QNAME, features);
+    }
+
+    public VnfAdapterNotify_Service(URL wsdlLocation) {
+        super(wsdlLocation, VNFADAPTERNOTIFY_QNAME);
+    }
+
+    public VnfAdapterNotify_Service(URL wsdlLocation, WebServiceFeature... features) {
+        super(wsdlLocation, VNFADAPTERNOTIFY_QNAME, features);
+    }
+
+    public VnfAdapterNotify_Service(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public VnfAdapterNotify_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+        super(wsdlLocation, serviceName, features);
+    }
+
+    /**
+     * 
+     * @return
+     *     returns VnfAdapterNotify
+     */
+    @WebEndpoint(name = "MsoVnfAdapterAsyncImplPort")
+    public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort() {
+        return super.getPort(new QName("http://com.att.mso/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class);
+    }
+
+    /**
+     * 
+     * @param features
+     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
+     * @return
+     *     returns VnfAdapterNotify
+     */
+    @WebEndpoint(name = "MsoVnfAdapterAsyncImplPort")
+    public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort(WebServiceFeature... features) {
+        return super.getPort(new QName("http://com.att.mso/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class, features);
+    }
+
+    private static URL __getWsdlLocation() {
+        if (VNFADAPTERNOTIFY_EXCEPTION!= null) {
+            throw VNFADAPTERNOTIFY_EXCEPTION;
+        }
+        return VNFADAPTERNOTIFY_WSDL_LOCATION;
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfRollback.java
new file mode 100644 (file)
index 0000000..4863023
--- /dev/null
@@ -0,0 +1,212 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for vnfRollback complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="vnfRollback">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="cloudSiteId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="msoRequest" type="{http://com.att.mso/vnfNotify}msoRequest" minOccurs="0"/>
+ *         &lt;element name="tenantCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="tenantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="vnfCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "vnfRollback", propOrder = {
+    "cloudSiteId",
+    "msoRequest",
+    "tenantCreated",
+    "tenantId",
+    "vnfCreated",
+    "vnfId"
+})
+public class VnfRollback {
+
+    protected String cloudSiteId;
+    protected MsoRequest msoRequest;
+    protected boolean tenantCreated;
+    protected String tenantId;
+    protected boolean vnfCreated;
+    protected String vnfId;
+
+    /**
+     * Gets the value of the cloudSiteId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCloudSiteId() {
+        return cloudSiteId;
+    }
+
+    /**
+     * Sets the value of the cloudSiteId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCloudSiteId(String value) {
+        this.cloudSiteId = value;
+    }
+
+    /**
+     * Gets the value of the msoRequest property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoRequest }
+     *     
+     */
+    public MsoRequest getMsoRequest() {
+        return msoRequest;
+    }
+
+    /**
+     * Sets the value of the msoRequest property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoRequest }
+     *     
+     */
+    public void setMsoRequest(MsoRequest value) {
+        this.msoRequest = value;
+    }
+
+    /**
+     * Gets the value of the tenantCreated property.
+     * 
+     */
+    public boolean isTenantCreated() {
+        return tenantCreated;
+    }
+
+    /**
+     * Sets the value of the tenantCreated property.
+     * 
+     */
+    public void setTenantCreated(boolean value) {
+        this.tenantCreated = value;
+    }
+
+    /**
+     * Gets the value of the tenantId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+
+    /**
+     * Gets the value of the vnfCreated property.
+     * 
+     */
+    public boolean isVnfCreated() {
+        return vnfCreated;
+    }
+
+    /**
+     * Sets the value of the vnfCreated property.
+     * 
+     */
+    public void setVnfCreated(boolean value) {
+        this.vnfCreated = value;
+    }
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+    
+    public String toString() {
+       String rollback = "";
+               rollback =
+       "<cloudSiteId>"+cloudSiteId+"</cloudSiteId>" + '\n' +
+       "<msoRequest>"+msoRequest.toString()+"</msoRequest>" + '\n' +
+       "<tenantCreated>"+tenantCreated+"</tenantCreated>" + '\n' +
+       "<tenantId>"+tenantId+"</tenantId>" + '\n' +
+       "<vnfCreated>"+vnfCreated+"</vnfCreated>" + '\n' +
+       "<vnfId>"+vnfId+"</vnfId>";
+       return rollback; 
+    }
+       
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/VnfStatus.java
new file mode 100644 (file)
index 0000000..b61a4b2
--- /dev/null
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for vnfStatus.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="vnfStatus">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="ACTIVE"/>
+ *     &lt;enumeration value="FAILED"/>
+ *     &lt;enumeration value="NOTFOUND"/>
+ *     &lt;enumeration value="UNKNOWN"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "vnfStatus")
+@XmlEnum
+public enum VnfStatus {
+
+    ACTIVE,
+    FAILED,
+    NOTFOUND,
+    UNKNOWN;
+
+    public String value() {
+        return name();
+    }
+
+    public static VnfStatus fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java b/bpmn/MSOGammaBPMN/src/main/java/com/att/domain2/workflow/vnf/async/adapter/callback/wsdl/v1/package-info.java
new file mode 100644 (file)
index 0000000..f3038a3
--- /dev/null
@@ -0,0 +1,22 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://com.att.mso/vnfNotify")
+package com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1;
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/MSOGammaApplication.java
new file mode 100644 (file)
index 0000000..4dadd8c
--- /dev/null
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma;
+
+import java.util.List;
+
+import org.camunda.bpm.application.PostDeploy;
+import org.camunda.bpm.application.PreUndeploy;
+import org.camunda.bpm.application.ProcessApplication;
+import org.camunda.bpm.application.ProcessApplicationInfo;
+import org.camunda.bpm.application.impl.ServletProcessApplication;
+import org.camunda.bpm.engine.ProcessEngine;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * @since Version 1.0
+ *
+ */
+@ProcessApplication("MSO Gamma Application")
+public class MSOGammaApplication extends ServletProcessApplication {
+       
+       private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       
+       @PostDeploy
+       public void postDeploy(ProcessEngine processEngineInstance) {
+               long startTime = System.currentTimeMillis();
+               
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Post deployment complete...");               
+       }
+       
+       @PreUndeploy
+       public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo, List<ProcessEngine> processEngines) {
+               long startTime = System.currentTimeMillis();
+               
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Pre Undeploy complete...");  
+               
+       }
+       
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/SDNCAdapterCallbackServiceImpl.java
new file mode 100644 (file)
index 0000000..4b3b8eb
--- /dev/null
@@ -0,0 +1,255 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.ws.rs.core.Context;
+import javax.xml.ws.WebServiceContext;
+
+import org.camunda.bpm.BpmPlatform;
+import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.RuntimeService;
+
+import com.att.domain2.workflow.sdnc.adapter.callback.wsdl.v1.SDNCCallbackAdapterPortType;
+import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterCallbackRequest;
+import com.att.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse;
+import org.openecomp.mso.bpmn.core.PropertyConfiguration;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+/**
+ * @version 1.0
+ *  
+ */
+@WebService(serviceName="SDNCAdapterCallbackService", targetNamespace="http://domain2.att.com/workflow/sdnc/adapter/schema/v1")
+public class SDNCAdapterCallbackServiceImpl implements SDNCCallbackAdapterPortType {
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       private final int DEFAULT_RETRY_ATTEMPTS = 60;
+       private final int DEFAULT_SLEEP_TIME = 500;
+
+       private final String logMarker = "[SDNC-CALLBACK]";
+
+       @Context WebServiceContext wsContext;
+
+       private volatile ProcessEngineServices pes4junit = null;
+
+       @WebMethod(operationName = "SDNCAdapterCallback")
+    @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
+    public SDNCAdapterResponse sdncAdapterCallback(
+            @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://domain2.att.com/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackRequest")
+            SDNCAdapterCallbackRequest sdncAdapterCallbackRequest) {
+
+               //Callback URL to use http://localhost:8080/mso/SDNCAdapterCallbackService
+               ProcessEngineServices pes = getProcessEngineServices();
+               RuntimeService runtimeService = pes.getRuntimeService();
+               String receivedRequestId = sdncAdapterCallbackRequest.getCallbackHeader().getRequestId();
+               msoLogger.setServiceName("MSO." + "sdncAdapter");
+               msoLogger.setLogContext(receivedRequestId, "N/A");
+               msoLogger.debug(logMarker + "Received callback response:" + sdncAdapterCallbackRequest.toString());
+               SDNCAdapterResponse sdncAdapterResponse;
+               long startTime = System.currentTimeMillis();
+
+               /* Check to make sure the process instance is reay for correlation*/
+               isReadyforCorrelation(runtimeService, receivedRequestId);
+
+               msoLogger.debug(logMarker + "*** Received MSO sdncAdapterCallbackService ******");
+               
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO sdncAdapterCallbackService");            
+               
+               msoLogger.debug(logMarker + "Callback response string:\n"  + sdncAdapterCallbackRequest.toString());
+
+               String reqId = receivedRequestId;
+               Map<String,Object> variables = new HashMap<String,Object>();
+               variables.put("SDNCA_requestId", reqId );
+               variables.put("sdncAdapterCallbackRequest", sdncAdapterCallbackRequest.toString());
+
+               /*Correlating the response with the running instance*/
+
+               // NOTE: the following loop is a workaround for problems we've had
+               // with reliability of the runtime service.  It seems that queries
+               // sometimes return results, and sometimes they don't.  This might
+               // be a problem in mysql only.  We aren't sure if it affects camunda
+               // on oracle or mariadb.  The workaround is to repeat the request
+               // a number of times until it succeeds.  If it doesn't succeed after
+               // 60 tries, then we give up.
+
+               int maxAttempts = DEFAULT_RETRY_ATTEMPTS;
+               int attempt = 1;
+               int sleepTime = DEFAULT_SLEEP_TIME;
+
+               Map<String,String> bpmnProperties = getMSOBPMNURNProperties();
+               if (bpmnProperties != null) {
+                       try {
+                               maxAttempts = Integer.parseInt(bpmnProperties.get("mso.callbackRetryAttempts"));
+                               msoLogger.debug(logMarker + "mso.callbackRetryAttempts=" + maxAttempts);
+                               sleepTime = Integer.parseInt(bpmnProperties.get("mso.callbackRetrySleepTime"));
+                               msoLogger.debug(logMarker + "mso.callbackRetrySleepTime:" + sleepTime);
+                       } catch (Exception ex) {
+                               
+                               msoLogger.info (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", logMarker 
+                                               + "Error parsing mso.callbackRetrySleepTime/mso.callbackRetryAttempts:" 
+                                               + sleepTime + ":" 
+                                               + maxAttempts);
+                               
+                               msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logMarker 
+                                               + "Error parsing mso.callbackRetrySleepTime/mso.callbackRetryAttempts:" 
+                                               + sleepTime + ":" 
+                                               + maxAttempts);
+                               
+                       }
+               }
+
+               while (true) {
+                       try {
+                               // sdncAdapterCallbackRequest is the message event name (defined in the bpmn process)
+                               runtimeService.createMessageCorrelation("sdncAdapterCallbackRequest")
+                                       .setVariables(variables)
+                                       .processInstanceVariableEquals("SDNCA_requestId", reqId).correlate();
+                               sdncAdapterResponse = new SDNCAdapterResponse();
+                               msoLogger.debug(logMarker + "***** Completed processing of MSO sdncAdapterCallbackService ******");
+                               
+                               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker 
+                                               + "Completed the execution of MSO SDNCAdapterCallbackService.");
+                               
+                               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                                               logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN", 
+                                               MsoLogger.getServiceName(), "sdncAdapterCallback");
+                               
+                               return sdncAdapterResponse;
+                       } catch(MismatchingMessageCorrelationException e) {
+                               msoLogger.debug(logMarker + "[CORM]correlation id mismatch (attempt " + attempt + "/" + maxAttempts + ")");
+                               if (attempt == maxAttempts) {
+                                       // Couldn't correlate requestId to any active flow
+                                       //MsoLogger logger = MsoLogger.getMsoLogger("SDNCAdapterCallbackService");
+                                       String msg =
+                                               "SDNC Adapter Callback Service received a SDNC Adapter Callback Request with RequestId '"
+                                                               + receivedRequestId
+                                                               + "' but that RequestId could not be correlated to any active process - ignoring the Request";
+                                       sdncAdapterResponse = new SDNCAdapterExceptionResponse(e);
+                                       
+                                       msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                                       MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+                                       
+                                       msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker 
+                                                       + "Completed the execution of MSO SDNCAdapterCallbackService." );
+                                       
+                                       msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                                                       logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN", 
+                                                       MsoLogger.getServiceName(), "sdncAdapterCallback");
+                                       
+                                       return sdncAdapterResponse;
+                               }
+
+                               try {
+                                       Thread.sleep(sleepTime);
+                               } catch (InterruptedException e2) {
+                                       String msg =
+                                               "SDNC Adapter Callback Service received a SDNC Adapter Callback Request with RequestId '"
+                                                               + receivedRequestId
+                                                               + "' but correlation was interrupted";
+                                       sdncAdapterResponse = new SDNCAdapterExceptionResponse(e);
+                                       
+                                       msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                                       MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+                                       
+                                       msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker 
+                                                       + "Completed the execution of MSO SDNCAdapterCallbackService.");
+                                       
+                                       msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                                                       logMarker + "Completed the execution of MSO SDNCAdapterCallbackService.", "BPMN", 
+                                                       MsoLogger.getServiceName(), "sdncAdapterCallback");
+                                       
+                                       return sdncAdapterResponse;
+                               }
+                       }
+
+                       attempt++;
+               }
+       }
+
+
+       private Map<String,String> getMSOBPMNURNProperties() {
+               PropertyConfiguration propertyConfiguration = PropertyConfiguration.getInstance();
+               Map<String,String> props = propertyConfiguration.getProperties("mso.bpmn.urn.properties");
+               return props;
+       }
+
+       private void isReadyforCorrelation(RuntimeService runtimeService,
+                       String receivedRequestId) {
+               long waitingInstances = runtimeService.createExecutionQuery() //
+                                                               .messageEventSubscriptionName("sdncAdapterCallbackRequest")
+                                                               .processVariableValueEquals("SDNCA_requestId", receivedRequestId).count();
+               //Workaround for performance testing, explicit wait for a second for the transactions to be committed
+               try {
+                       Thread.sleep(1000);
+               } catch (InterruptedException e1) {
+               }
+
+               int retries = 50;
+               while (waitingInstances==0 && retries > 0) {
+                 try {
+                       Thread.sleep(100);
+               } catch (InterruptedException e) {
+                       
+                       msoLogger.error (MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                       MsoLogger.ErrorCode.UnknownError, logMarker, e);
+                       
+               } // you can still play with the numbers
+                 waitingInstances = runtimeService.createExecutionQuery() //
+                         .messageEventSubscriptionName("sdncAdapterCallbackRequest")
+                         .processVariableValueEquals("SDNCA_requestId", receivedRequestId).count();
+                 retries--;
+               }
+       }
+
+       private ProcessEngineServices getProcessEngineServices() {
+               if (pes4junit == null) {
+                       return BpmPlatform.getDefaultProcessEngine();
+               } else {
+                       return pes4junit;
+               }
+       }
+
+       @WebMethod(exclude=true)
+       public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+               pes4junit = pes;
+       }
+
+       public class SDNCAdapterExceptionResponse extends SDNCAdapterResponse {
+               private Exception ex;
+
+               public SDNCAdapterExceptionResponse(Exception ex) {
+                       super();
+                       this.ex = ex;
+               }
+
+               public Exception getException() {
+                       return ex;
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterNotifyServiceImpl.java
new file mode 100644 (file)
index 0000000..509f9c6
--- /dev/null
@@ -0,0 +1,537 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.ws.rs.core.Context;
+import javax.xml.ws.Action;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.WebServiceContext;
+
+import org.camunda.bpm.BpmPlatform;
+import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.RuntimeService;
+
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification;
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.DeleteVnfNotification;
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.MsoExceptionCategory;
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.QueryVnfNotification;
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.RollbackVnfNotification;
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.UpdateVnfNotification;
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.VnfAdapterNotify;
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.VnfRollback;
+import com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.VnfStatus;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * This is the service class for VnfAdapterNotify
+ * TODO: Add addition VnfAdapterNotify Methods for remaining VnfAdapterNotify operations.
+ */
+
+@WebService(serviceName = "vnfAdapterNotify", targetNamespace = "http://com.att.mso/vnfNotify")
+public class VnfAdapterNotifyServiceImpl implements VnfAdapterNotify{
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+       private final String logMarker = "[VNF-NOTIFY]";
+
+       @Context WebServiceContext wsContext;
+
+       private volatile ProcessEngineServices pes4junit = null;
+
+    /**
+     *
+     * @param errorMessage
+     * @param exception
+     * @param messageId
+     * @param completed
+     */
+    @WebMethod(operationName = "rollbackVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/rollbackVnfNotificationRequest")
+    public void rollbackVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage) {
+
+
+
+               RollbackVnfNotification rollbackVnfNotification = new RollbackVnfNotification();
+
+               rollbackVnfNotification.setMessageId(messageId);
+               rollbackVnfNotification.setCompleted(completed);
+               rollbackVnfNotification.setException(exception);
+               rollbackVnfNotification.setErrorMessage(errorMessage);
+
+               ProcessEngineServices pes = getProcessEngineServices();
+               RuntimeService runtimeService = pes.getRuntimeService();
+
+               MsoLogger.setServiceName("MSO." + "vnfAdapterRollback");
+               MsoLogger.setLogContext(messageId, "N/A");
+               msoLogger.debug(logMarker + "Received RollbackVnfNotification" + rollbackVnfNotification.toString());
+
+               long startTime = System.currentTimeMillis();
+               try {
+
+                       /* Check to make sure the process instance is ready for correlation*/
+                       isReadyforCorrelation(runtimeService, messageId, "rollbackVnfNotificationCallback", "VNFRB_messageId");
+
+                       msoLogger.debug(logMarker + "*** Received MSO rollbackVnfNotification Callback ******");                        
+                       msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");                      
+                       msoLogger.debug(logMarker + "Rollback VNF Notification string:\n"  + rollbackVnfNotification.toString());
+
+                       System.out.println("testing ROllbackVnfNotification : " + rollbackVnfNotification.toString());
+
+                       Map<String,Object> variables = new HashMap<String,Object>();
+                       variables.put("VNFRB_messageId", messageId );
+                       variables.put("rollbackVnfNotificationCallback", rollbackVnfNotification.toString());
+
+                       /*Correlating the response with the running instance*/
+
+                       runtimeService.createMessageCorrelation("rollbackVnfNotificationCallback").setVariables(variables)
+                                 .processInstanceVariableEquals("VNFRB_messageId", messageId).correlate();
+
+                       msoLogger.debug(logMarker + "***** Completed processing of MSO VnfAdapterNotifyService ******");
+               } catch(MismatchingMessageCorrelationException e) {
+                       msoLogger.debug(logMarker + "[CORM]correlation id mismatch");
+                       String msg =
+                               "VNF Adapter Notify Service received a Create VNF Notification request with RequestId '"
+                               + messageId
+                               + "' but that RequestId could not be correlated to any active process - ignoring the request";
+                       
+                       msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                       MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg);
+                       
+               }               
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO Vnf Adapter Notify for Rollback VNF Notification.");
+               
+               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO Vnf Adapter Notify for Rollback VNF Notification.", "BPMN", 
+                               MsoLogger.getServiceName(), "rollbackVnfNotification");
+               
+               return;
+        }
+
+
+
+    /**
+     *
+     * @param errorMessage
+     * @param vnfExists
+     * @param status
+     * @param exception
+     * @param outputs
+     * @param messageId
+     * @param vnfId
+     * @param completed
+     */
+    @WebMethod(operationName = "queryVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/queryVnfNotificationRequest")
+    public void queryVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "vnfExists", targetNamespace = "")
+        Boolean vnfExists,
+        @WebParam(name = "vnfId", targetNamespace = "")
+        String vnfId,
+        @WebParam(name = "status", targetNamespace = "")
+        VnfStatus status,
+        @WebParam(name = "outputs", targetNamespace = "")
+        com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.QueryVnfNotification.Outputs outputs){
+
+       QueryVnfNotification queryVnfNotification = new QueryVnfNotification();
+
+       queryVnfNotification.setMessageId(messageId);
+       queryVnfNotification.setCompleted(completed);
+       queryVnfNotification.setException(exception);
+       queryVnfNotification.setErrorMessage(errorMessage);
+       queryVnfNotification.setVnfExists(vnfExists);
+       queryVnfNotification.setVnfId(vnfId);
+       queryVnfNotification.setStatus(status);
+       queryVnfNotification.setOutputs(outputs);
+
+
+       ProcessEngineServices pes = getProcessEngineServices();
+               RuntimeService runtimeService = pes.getRuntimeService();
+
+               msoLogger.setServiceName("MSO." + "vnf Adapter Query");
+               msoLogger.setLogContext(messageId, "N/A");
+               msoLogger.debug(logMarker + "Received QueryVnfNotification" + queryVnfNotification.toString());
+
+               System.out.println("Received QueryVnfNotification : " + queryVnfNotification.toString());
+
+               long startTime = System.currentTimeMillis();
+               try {
+
+                       /* Check to make sure the process instance is ready for correlation*/
+                       isReadyforCorrelation(runtimeService, messageId, "queryVnfNotificationCallback", "VNFQ_messageId");
+
+                       msoLogger.debug(logMarker + "*** Received MSO queryVnfNotification Callback ******");
+                       msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
+                       msoLogger.debug(logMarker + "Query VNF Notification string:\n"  + queryVnfNotification.toString());
+
+                       Map<String,Object> variables = new HashMap<String,Object>();
+                       variables.put("VNFQ_messageId", messageId );
+                       variables.put("queryVnfNotificationCallback", queryVnfNotification.toString());
+
+                       /*Correlating the response with the running instance*/
+
+                       runtimeService.createMessageCorrelation("queryVnfNotificationCallback").setVariables(variables)
+                                 .processInstanceVariableEquals("VNFQ_messageId", messageId).correlate();
+
+                       msoLogger.debug(logMarker + "***** Completed processing of MSO VnfAdapterNotifyService ******");
+               } catch(MismatchingMessageCorrelationException e) {
+                       msoLogger.debug(logMarker + "[CORM]correlation id mismatch");
+                       String msg =
+                               "VNF Adapter Notify Service received a Query VNF Notification request with RequestId '"
+                               + messageId
+                               + "' but that RequestId could not be correlated to any active process - ignoring the request";
+                       
+                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                       MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+               }
+
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO Vnf Adapter Notify for Query VNF Notification.");
+               
+               return;
+        }
+
+
+
+
+    /**
+     *
+     * @param errorMessage
+     * @param exception
+     * @param rollback
+     * @param outputs
+     * @param messageId
+     * @param vnfId
+     * @param completed
+     */
+       @WebMethod(operationName = "createVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/createVnfNotificationRequest")
+       public void createVnfNotification(
+                       @WebParam(name = "messageId", targetNamespace = "")
+               String messageId,
+               @WebParam(name = "completed", targetNamespace = "")
+               boolean completed,
+               @WebParam(name = "exception", targetNamespace = "")
+               MsoExceptionCategory exception,
+               @WebParam(name = "errorMessage", targetNamespace = "")
+               String errorMessage,
+               @WebParam(name = "vnfId", targetNamespace = "")
+               String vnfId,
+               @WebParam(name = "outputs", targetNamespace = "")
+               com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.CreateVnfNotification.Outputs outputs,
+               @WebParam(name = "rollback", targetNamespace = "")
+               VnfRollback rollback){
+
+               CreateVnfNotification createVnfNotification = new CreateVnfNotification();
+
+               createVnfNotification.setMessageId(messageId);
+               createVnfNotification.setCompleted(completed);
+               createVnfNotification.setException(exception);
+               createVnfNotification.setErrorMessage(errorMessage);
+               createVnfNotification.setVnfId(vnfId);
+               createVnfNotification.setOutputs(outputs);
+               createVnfNotification.setRollback(rollback);
+
+               ProcessEngineServices pes = getProcessEngineServices();
+               RuntimeService runtimeService = pes.getRuntimeService();
+
+               msoLogger.setServiceName("MSO." + "vnf Adapter Create");
+               msoLogger.setLogContext(messageId, "N/A");
+               msoLogger.debug(logMarker + "Received CreateVnfNotification - " + createVnfNotification.toString());
+
+               long startTime = System.currentTimeMillis();
+               try {
+
+                       /* Check to make sure the process instance is ready for correlation*/
+                       isReadyforCorrelation(runtimeService, messageId, "createVnfNotificationCallback", "VNFC_messageId");
+
+                       msoLogger.debug(logMarker + "*** Received MSO createVnfNotification Callback ******");
+                       msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
+                       
+                       msoLogger.debug(logMarker + "Create VNF Notification string:\n"  + createVnfNotification.toString());
+
+                       Map<String,Object> variables = new HashMap<String,Object>();
+                       variables.put("VNFC_messageId", messageId );
+                       variables.put("createVnfNotificationCallback", createVnfNotification.toString());
+
+                       /*Correlating the response with the running instance*/
+
+                       runtimeService.createMessageCorrelation("createVnfNotificationCallback").setVariables(variables)
+                                 .processInstanceVariableEquals("VNFC_messageId", messageId).correlate();
+
+                       msoLogger.debug(logMarker + "***** Completed processing of MSO VnfAdapterNotifyService ******");
+               } catch(MismatchingMessageCorrelationException e) {
+                       msoLogger.debug(logMarker + "[CORM]correlation id mismatch");
+                       String msg =
+                               "VNF Adapter Notify Service received a Create VNF Notification request with RequestId '"
+                               + messageId
+                               + "' but that RequestId could not be correlated to any active process - ignoring the request";
+                       
+                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                       MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+                       
+               }
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO Vnf Adapter Notify for Query VNF Notification.");
+               
+               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO Vnf Adapter Notify for Query VNF Notification.", "BPMN", 
+                               MsoLogger.getServiceName(), "createVnfNotification");
+               
+               return;
+        }
+
+    /**
+     *
+     * @param errorMessage
+     * @param exception
+     * @param rollback
+     * @param outputs
+     * @param messageId
+     * @param completed
+     */
+       @WebMethod(operationName = "updateVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/updateVnfNotificationRequest")
+    public void updateVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "outputs", targetNamespace = "")
+        com.att.domain2.workflow.vnf.async.adapter.callback.wsdl.v1.UpdateVnfNotification.Outputs outputs,
+        @WebParam(name = "rollback", targetNamespace = "")
+        VnfRollback rollback){
+
+       UpdateVnfNotification updateVnfNotification = new UpdateVnfNotification();
+
+       updateVnfNotification.setMessageId(messageId);
+       updateVnfNotification.setCompleted(completed);
+       updateVnfNotification.setException(exception);
+       updateVnfNotification.setErrorMessage(errorMessage);
+       updateVnfNotification.setOutputs(outputs);
+       updateVnfNotification.setRollback(rollback);
+
+               ProcessEngineServices pes = getProcessEngineServices();
+               RuntimeService runtimeService = pes.getRuntimeService();
+
+               msoLogger.setServiceName("MSO." + "vnf Adapter Update");
+               msoLogger.setLogContext(messageId, "N/A");
+               msoLogger.debug(logMarker + "Received UpdateVnfNotification - " + updateVnfNotification.toString());
+
+               long startTime = System.currentTimeMillis();
+               try {
+
+                       // Check to make sure the process instance is ready for correlation
+                       isReadyforCorrelation(runtimeService, messageId, "updateVnfNotificationCallback", "VNFU_messageId");
+
+                       msoLogger.debug(logMarker + "*** Received MSO updateVnfNotification Callback ******");
+                       msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
+                       
+                       msoLogger.debug(logMarker + "Update VNF Notification string:\n"  + updateVnfNotification.toString());
+
+                       Map<String,Object> variables = new HashMap<String,Object>();
+                       variables.put("VNFU_messageId", messageId );
+                       variables.put("updateVnfNotificationCallback", updateVnfNotification.toString());
+
+                       //Correlating the response with the running instance
+                       runtimeService.createMessageCorrelation("updateVnfNotificationCallback").setVariables(variables)
+                                 .processInstanceVariableEquals("VNFU_messageId", messageId).correlate();
+
+                       msoLogger.debug(logMarker + "***** Completed processing of MSO VnfAdapterNotifyService ******");
+                       
+               } catch(MismatchingMessageCorrelationException e) {
+                       msoLogger.debug(logMarker + "[CORM]correlation id mismatch");
+                       String msg =
+                               "VNF Adapter Notify Service received a Update VNF Notification request with RequestId '"
+                               + messageId
+                               + "' but that RequestId could not be correlated to any active process - ignoring the request";
+                       
+                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                       MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+                       
+               }
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO Vnf Adapter Notify for Update VNF Notification.");
+               
+               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO Vnf Adapter Notify for Update VNF Notification.", "BPMN", 
+                               MsoLogger.getServiceName(), "updateVnfNotification");
+               
+               return;
+        }
+
+    /**
+     *
+     * @param errorMessage
+     * @param exception
+     * @param messageId
+     * @param completed
+     */
+
+    //@WebService(serviceName="VNFAdapterDeleteCallbackV1", targetNamespace="http://com.att.mso/vnfNotify")
+    @WebMethod(operationName = "deleteVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://com.att.mso/vnfNotify", className = "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification")
+    @Action(input = "http://com.att.mso/notify/adapterNotify/deleteVnfNotificationRequest")
+    public void deleteVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage) {
+
+               //Callback URL to use http://localhost:8080/mso/services/VNFAdapterDeleteCallbackV1
+
+       //DeleteVnfNotification Class
+       DeleteVnfNotification deleteVnfNotification = new DeleteVnfNotification();
+       deleteVnfNotification.setMessageId(messageId);
+       deleteVnfNotification.setCompleted(completed);
+       deleteVnfNotification.setException(exception);
+       deleteVnfNotification.setErrorMessage(errorMessage);
+
+               ProcessEngineServices pes = getProcessEngineServices();
+               RuntimeService runtimeService = pes.getRuntimeService();
+
+               MsoLogger.setServiceName("MSO." + "vnfAdapterDelete");
+               MsoLogger.setLogContext(messageId, "N/A");
+               msoLogger.debug(logMarker + "Received DeleteVnfNotification callback: " + deleteVnfNotification.toString());
+
+               long startTime = System.currentTimeMillis();
+               try {
+
+                       /* Check to make sure the process instance is ready for correlation*/
+                       //isReadyforCorrelation(runtimeService, messageId, "deleteVnfACallback", "VNFDEL_uuid");
+
+                       msoLogger.debug(logMarker + " *** Received MSO deleteVnfACallback ******");                     
+                       msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO deleteVnfACallback ");           
+                       msoLogger.debug(logMarker + " Callback response string:\n"  + deleteVnfNotification.toString());
+
+                       Map<String,Object> variables = new HashMap<String,Object>();
+                       variables.put("VNFDEL_uuid", messageId);
+                       variables.put("deleteVnfACallback", deleteVnfNotification.toString());
+
+                       /*Correlating the response with the running instance*/
+
+                       runtimeService.createMessageCorrelation("deleteVnfACallback")
+                                 .setVariables(variables)
+                                 .processInstanceVariableEquals("VNFDEL_uuid", messageId).correlate();
+
+                       msoLogger.debug(logMarker + "***** Completed processing of MSO deleteVnfACallback ******");
+
+               } catch(MismatchingMessageCorrelationException e) {
+
+                       msoLogger.debug(logMarker + " [CORM]correlation id mismatch");
+                       // Couldn't correlate requestId to any active flow
+                       //MsoLogger logger = MsoLogger.getMsoLogger("SDNCAdapterCallbackService");
+
+                       String msg =
+                               "Vnf Adapter Callback Service received a Vnf Adapter Callback with messageId '"
+                               + messageId
+                               + "' but that messageId could not be correlated to any active process - ignoring the Request";
+                       
+                       msoLogger.error(MessageEnum.BPMN_SDNC_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                       MsoLogger.ErrorCode.UnknownError, logMarker + ":" + msg, e);
+
+               }
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO VNFAdapterDeleteCallbackV1.");
+               
+               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + "Completed the execution of MSO VNFAdapterDeleteCallbackV1.", "BPMN", 
+                               MsoLogger.getServiceName(), "deleteVnfNotification");
+               
+               return;
+       }
+
+       private void isReadyforCorrelation(RuntimeService runtimeService, String requestId, String responseName, String correlationValue) {
+
+               long waitingInstances = runtimeService.createExecutionQuery().messageEventSubscriptionName(responseName).processVariableValueEquals(correlationValue, requestId).count();
+               int retries = 50;
+               while (waitingInstances==0 && retries > 0) {
+                 try {
+                       Thread.sleep(100);
+               } catch (InterruptedException e) {
+                       // TODO Auto-generated catch block
+            // should I add new exception Message to MessageEnum???
+                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logMarker, e);
+                       
+               } // you can still play with the numbers
+                 waitingInstances = runtimeService.createExecutionQuery() //
+                         .messageEventSubscriptionName(responseName)
+                         .processVariableValueEquals(correlationValue, requestId).count();
+                 retries--;
+               }
+       }
+
+
+       private ProcessEngineServices getProcessEngineServices() {
+               if (pes4junit == null) {
+                       return BpmPlatform.getDefaultProcessEngine();
+               } else {
+                       return pes4junit;
+               }
+       }
+
+       @WebMethod(exclude=true)
+       public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+               pes4junit = pes;
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/VnfAdapterRestNotifyResource.java
new file mode 100644 (file)
index 0000000..5199322
--- /dev/null
@@ -0,0 +1,206 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.camunda.bpm.BpmPlatform;
+import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.RuntimeService;
+import org.slf4j.MDC;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Listens for REST notifications from the VNF Adapter and injects each one
+ * into a waiting BPMN processes.
+ */
+@Path("/vnfAdapterRestNotify")
+public class VnfAdapterRestNotifyResource {
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       private static final String LOGMARKER = "[VNF-REST-NOTIFY]";
+
+       private ProcessEngineServices pes4junit = null;
+       
+       @POST
+       @Path("/")
+       @Consumes(MediaType.APPLICATION_XML)
+       @Produces(MediaType.TEXT_PLAIN)
+       public Response notify(String content) {
+               LOGGER.debug(LOGMARKER + " Received VNF Adapter REST Notification:"
+                       + System.lineSeparator() + content);
+
+               String messageId = null;
+               long startTime = System.currentTimeMillis();
+               
+               try {
+                       DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+                       factory.setNamespaceAware(true);
+                       DocumentBuilder builder = factory.newDocumentBuilder();
+                       InputSource source = new InputSource(new StringReader(content));
+                       Document doc = builder.parse(source);
+                       doc.normalize();
+
+                       Element rootElement = doc.getDocumentElement();
+                       NodeList childList = rootElement.getChildNodes();
+
+                       for (int i = 0; i < childList.getLength(); i++) {
+                               Node childNode = childList.item(i);
+                               if (childNode.getNodeType() == Node.ELEMENT_NODE) {
+                                       Element childElement = (Element) childNode;
+
+                                       String childElementName = childElement.getLocalName();
+                                       if (childElementName == null) {
+                                               childElementName = childElement.getNodeName();
+                                       }
+
+                                       if ("messageId".equals(childElementName)) {
+                                               messageId = childElement.getTextContent();
+                                       }
+                               }
+                       }
+               } catch (Exception e) {
+                       String msg = "Failed to parse VNF Adapter REST Notification: " + e;
+                       LOGGER.debug(LOGMARKER + " " + msg);
+                       LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg, e);
+                       
+                       return Response.status(400).entity(e).build();
+               }
+
+               if (messageId == null || messageId.isEmpty()) {
+                       String msg = "No messageId in VNF Adapter REST Notification";
+                       LOGGER.debug(LOGMARKER + " " + msg);
+                       LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg);
+                       
+                       return Response.status(400).entity(msg).build();
+               }
+
+               MsoLogger.setServiceName("MSO." + "vnfAdapterRestNotify");
+               MsoLogger.setLogContext(messageId, "N/A");
+
+               LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO vnfAdapterRestNotify ");
+
+               try {
+                       ProcessEngineServices pes = getProcessEngineServices();
+                       RuntimeService runtimeService = pes.getRuntimeService();
+
+                       if (!isReadyforCorrelation(runtimeService, "VNFREST_messageId", messageId, "vnfAdapterRestCallbackMessage")) {
+                               String msg = "No process is waiting to receive vnfAdapterRestCallbackMessage with VNFREST_messageId='" + messageId + "'";
+                               LOGGER.debug(LOGMARKER + " " + msg);
+                               LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, LOGMARKER + ":" + msg);
+                               
+                               LOGGER.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                                               LOGMARKER + "Call to MSO vnfAdapterRestNotify ", "BPMN", MsoLogger.getServiceName(), "vnfAdapterRestNotify");
+                               
+                               LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Call to MSO VnfAdapterNotifyService ");
+                               
+                               
+                               return Response.status(500).entity(msg).build();
+                       }
+
+                       Map<String,Object> variables = new HashMap<String,Object>();
+                       variables.put("VNFREST_messageId", messageId);
+                       variables.put("VNFREST_callback", content);
+
+                       runtimeService.createMessageCorrelation("vnfAdapterRestCallbackMessage").setVariables(variables)
+                                 .processInstanceVariableEquals("VNFREST_messageId", messageId).correlate();
+
+                       LOGGER.debug(LOGMARKER + " Completed processing of VNF Adapter REST Notification");
+               } catch (MismatchingMessageCorrelationException e) {
+                       LOGGER.debug(LOGMARKER + "[CORM] correlation id mismatch");
+                       String msg = "vnfAdapterRestNotify received a notification with messageId='"
+                               + messageId + "' but it could not be correlated to any active process - ignoring the request";
+                       LOGGER.debug(msg);
+                       LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, LOGMARKER, e);
+                       
+                       LOGGER.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.InternalError, 
+                                       LOGMARKER + "Completed vnfAdapterRestNotify with error ", "BPMN", MsoLogger.getServiceName(), "vnfAdapterRestNotify");
+                       
+                       LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.InternalError, "Completed vnfAdapterRestNotify with error ");
+                       
+                       return Response.status(500).entity(msg).build();
+               }
+               LOGGER.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               LOGMARKER + "Completed vnfAdapterRestNotify", "BPMN", MsoLogger.getServiceName(), "vnfAdapterRestNotify");
+               
+               LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Completed vnfAdapterRestNotify");
+               
+               return Response.status(204).build();
+       }
+       
+       private boolean isReadyforCorrelation(RuntimeService runtimeService,
+                       String correlationVariable, String correlationValue, String messageName) {
+               long waitingInstances = runtimeService.createExecutionQuery()
+                       .messageEventSubscriptionName(messageName)
+                       .processVariableValueEquals(correlationVariable, correlationValue)
+                       .count();
+
+               int retries = 50;
+               while (waitingInstances == 0 && retries > 0) {
+                       try {
+                               Thread.sleep(100);
+                       } catch (InterruptedException e) {
+                               LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, LOGMARKER, e);
+                               
+                               return false;
+                       }
+
+                       waitingInstances = runtimeService.createExecutionQuery()
+                               .messageEventSubscriptionName(messageName)
+                               .processVariableValueEquals(correlationVariable, correlationValue)
+                               .count();
+
+                       retries--;
+               }
+               
+               return waitingInstances != 0;
+       }
+       
+       private ProcessEngineServices getProcessEngineServices() {
+               if (pes4junit == null) {
+                       return BpmPlatform.getDefaultProcessEngine();
+               } else {
+                       return pes4junit;
+               }
+       }
+
+       public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+               pes4junit = pes;
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowAsyncResource.java
new file mode 100644 (file)
index 0000000..2302b76
--- /dev/null
@@ -0,0 +1,302 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.ws.rs.Consumes;
+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.Response;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.impl.core.variable.VariableMapImpl;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.jboss.resteasy.annotations.Suspend;
+import org.jboss.resteasy.spi.AsynchronousResponse;
+import org.slf4j.MDC;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+
+/**
+ * 
+ * @version 1.0
+ * Asynchronous Workflow processing using JAX RS RESTeasy implementation
+ * Both Synchronous and Asynchronous BPMN process can benefit from this implementation since the workflow gets executed in the background
+ * and the server thread is freed up, server scales better to process more incoming requests
+ * 
+ * Usage: For synchronous process, when you are ready to send the response invoke the callback to write the response
+ * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process
+ */
+@Path("/async")
+public class WorkflowAsyncResource {
+
+       private WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
+       private ProcessEngineServices pes4junit = null;
+
+       private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+       private static final String logMarker = "[WRKFLOW-RESOURCE]";
+       private static final int DEFAULT_WAIT_TIME = 30000;     //default wait time
+       
+       /**
+        * 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
+        */
+       @POST
+       @Path("/services/{processKey}")
+       @Produces("application/json")
+       @Consumes("application/json")
+       public void startProcessInstanceByKey(final @Suspend(180000) AsynchronousResponse asyncResponse,
+                       @PathParam("processKey") String processKey, VariableMapImpl variableMap) {
+       
+               WorkflowResponse response = new WorkflowResponse();
+               long startTime = System.currentTimeMillis();
+               Map<String, Object> inputVariables = null;
+               WorkflowContext workflowContext = null;
+
+               try {
+                       inputVariables = getInputVariables(variableMap);        
+                       setLogContext(processKey, inputVariables);
+
+                       // This variable indicates that the flow was invoked asynchronously
+                       inputVariables.put("isAsyncProcess", "true");
+
+                       workflowContext = new WorkflowContext(processKey, getRequestId(inputVariables),
+                               asyncResponse, getWaitTime(inputVariables));
+
+                       msoLogger.debug("Adding the workflow context into holder: "
+                                       + workflowContext.getProcessKey() + ":"
+                                       + workflowContext.getRequestId() + ":"
+                                       + workflowContext.getTimeout());
+
+                       contextHolder.put(workflowContext);
+
+                       ProcessThread processThread = new ProcessThread(processKey, inputVariables);
+                       processThread.start();
+               } catch (Exception e) {
+                       setLogContext(processKey, inputVariables);
+
+                       if (workflowContext != null) {
+                               contextHolder.remove(workflowContext);
+                       }
+
+                       msoLogger.debug(logMarker + "Exception in startProcessInstance by key");
+                       response.setMessage("Fail" );
+                       response.setResponse("Error occurred while executing the process: " + e);
+                       response.setMessageCode(500);
+                       recordEvents(processKey, response, startTime);
+                       
+                       msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, logMarker 
+                                       + response.getMessage() + " for processKey: " 
+                                       + processKey + " with response: " + response.getResponse());
+                       
+                       Response errorResponse = Response.serverError().entity(response).build();
+                       asyncResponse.setResponse(errorResponse);
+               }
+       }
+       
+       /**
+        * 
+        * @version 1.0
+        *
+        */
+       class ProcessThread extends Thread {
+               private final String processKey;
+               private final Map<String,Object> inputVariables;
+
+               public ProcessThread(String processKey, Map<String, Object> inputVariables) {
+                       this.processKey = processKey;
+                       this.inputVariables = inputVariables;
+               }
+               
+               public void run() {
+
+                       String processInstanceId = null;
+                       long startTime = System.currentTimeMillis();
+                       
+                       try {
+                               setLogContext(processKey, inputVariables);
+
+                               // Note: this creates a random businessKey if it wasn't specified.
+                               String businessKey = getBusinessKey(inputVariables);
+                               
+                               msoLogger.debug(logMarker + "***Received MSO startProcessInstanceByKey with processKey: "
+                                       + processKey + " and variables: " + inputVariables);
+
+                               msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker
+                                               + "Call to MSO workflow/services in Camunda. Received MSO startProcessInstanceByKey with processKey:"
+                                               + processKey + " and variables: " + inputVariables);
+                               
+                               RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+                               ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(
+                                       processKey, businessKey, inputVariables);
+                               processInstanceId = processInstance.getId();
+
+                               msoLogger.debug(logMarker + "Process " + processKey + ":" + processInstanceId + " " +
+                                               (processInstance.isEnded() ? "ENDED" : "RUNNING"));
+                       } catch (Exception e) {
+
+                               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);
+
+                               // TODO: is the processInstanceId used by the API handler?  I don't think so.
+                               // It may be null here.
+                               WorkflowContextHolder.getInstance().processCallback(
+                                       processKey, processInstanceId,
+                                       getRequestId(inputVariables),
+                                       callbackResponse);
+                       }
+               }
+       }
+       
+       
+       /**
+        * Callback resource which is invoked from BPMN to process to send the workflow response
+        * 
+        * @param processKey
+        * @param processInstanceId
+        * @param requestId
+        * @param callbackResponse
+        * @return
+        */
+       @POST
+       @Path("/services/callback/{processKey}/{processInstanceId}/{requestId}")
+       @Produces("application/json")
+       @Consumes("application/json")
+       public Response processWorkflowCallback(
+                       @PathParam("processKey") String processKey,
+                       @PathParam("processInstanceId") String processInstanceId,
+                       @PathParam("requestId")String requestId,
+                       WorkflowCallbackResponse callbackResponse) {
+
+               msoLogger.debug(logMarker + "Process instance ID:" + processInstanceId + ":" + requestId + ":" + processKey + ":" + isProcessEnded(processInstanceId));
+               msoLogger.debug(logMarker + "About to process the callback request:" + callbackResponse.getResponse() + ":" + callbackResponse.getMessage() + ":" + callbackResponse.getStatusCode());
+               return contextHolder.processCallback(processKey, processInstanceId, requestId, callbackResponse);
+       }
+       
+       // Note: the business key is used to identify the process in unit tests
+       private String getBusinessKey(Map<String, Object> inputVariables) {
+               Object businessKey = inputVariables.get("att-mso-business-key");
+               if (businessKey == null ) {
+                       businessKey = UUID.randomUUID().toString();
+                       inputVariables.put("att-mso-business-key",  businessKey);
+               }
+               return businessKey.toString();
+       }
+
+       private String getRequestId(Map<String, Object> inputVariables) {
+               Object requestId = inputVariables.get("att-mso-request-id");
+               if (requestId == null ) {
+                       requestId = UUID.randomUUID().toString();
+                       inputVariables.put("att-mso-request-id",  requestId);
+               } 
+               return requestId.toString();
+       }
+
+       private long getWaitTime(Map<String, Object> inputVariables)
+       {
+               String timeout = inputVariables.get("att-mso-service-request-timeout") == null
+                               ? null : inputVariables.get("att-mso-service-request-timeout").toString();              
+
+               if (timeout != null) {
+                       try {
+                               return Long.parseLong(timeout)*1000;
+                       } catch (NumberFormatException nex) {
+                               msoLogger.debug("Invalid input for att-mso-service-request-timeout");
+                       }
+               }
+
+               return DEFAULT_WAIT_TIME;
+       }
+       
+       private void recordEvents(String processKey, WorkflowResponse response,
+                       long startTime) {
+               
+               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + response.getMessage() + " for processKey: "
+                               + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+               
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + response.getMessage() + "for processKey: " + processKey + " with response: " + response.getResponse());
+               
+       }
+
+       private void setLogContext(String processKey,
+                       Map<String, Object> inputVariables) {
+               MsoLogger.setServiceName("MSO." + processKey);
+               if (inputVariables != null) {
+                       MsoLogger.setLogContext(getKeyValueFromInputVariables(inputVariables,"att-mso-request-id"), getKeyValueFromInputVariables(inputVariables,"att-mso-service-instance-id"));
+               }
+       }
+
+       private String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {
+               if (inputVariables == null) return "";
+               Object requestId = inputVariables.get(key);
+               if (requestId != null) return requestId.toString();
+               return "N/A";
+       }
+
+       private boolean isProcessEnded(String processInstanceId) {
+               ProcessEngineServices pes = getProcessEngineServices();
+               return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;                
+       }
+       
+       
+       private ProcessEngineServices getProcessEngineServices() {
+               if (pes4junit == null) {
+                       return ProcessEngines.getDefaultProcessEngine();
+               } else {
+                       return pes4junit;
+               }
+       }
+       
+       public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+               pes4junit = pes;
+       }
+
+       private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
+               Map<String, Object> inputVariables = new HashMap<String,Object>();
+               @SuppressWarnings("unchecked")
+               Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
+               for (String vName : vMap.keySet()) {
+                       @SuppressWarnings("unchecked")
+                       Map<String, Object> valueMap = (Map<String,Object>)vMap.get(vName); // value, type
+                       inputVariables.put(vName, valueMap.get("value"));
+               }
+               return inputVariables;
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowCallbackResponse.java
new file mode 100644 (file)
index 0000000..425f0b2
--- /dev/null
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+/**
+ * @version 1.0
+ * Workflow Response bean to generate workflow response in JSON format
+ */
+public class WorkflowCallbackResponse {
+       
+       private String response;
+       private int statusCode;
+       private String message;
+       
+       public String getResponse() {
+               return response;
+       }
+       public void setResponse(String response) {
+               this.response = response;
+       }
+       public int getStatusCode() {
+               return statusCode;
+       }
+       public void setStatusCode(int statusCode) {
+               this.statusCode = statusCode;
+       }
+       public String getMessage() {
+               return message;
+       }
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContext.java
new file mode 100644 (file)
index 0000000..f44dfa9
--- /dev/null
@@ -0,0 +1,96 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.util.concurrent.Delayed;
+import java.util.concurrent.TimeUnit;
+
+import org.jboss.resteasy.spi.AsynchronousResponse;
+
+/**
+ * @version 1.0
+ * Workflow context object used to send timeout response, if workflow instance does not write the response in time
+ */
+public class WorkflowContext implements Delayed {
+       private final String processKey;
+       private final String requestId;
+       private final AsynchronousResponse asynchronousResponse;
+       private final long startTime;
+       private final long timeout;
+       
+       public WorkflowContext(String processKey, String requestId,
+                       AsynchronousResponse asynchronousResponse, long timeout) {
+               this.processKey = processKey;
+               this.requestId = requestId;
+               this.asynchronousResponse = asynchronousResponse;
+               this.timeout = timeout;
+               this.startTime = System.currentTimeMillis();
+       }
+       
+       public String getRequestId() {
+               return requestId;
+       }
+
+       public String getProcessKey() {
+               return processKey;
+       }
+
+       public AsynchronousResponse getAsynchronousResponse() {
+               return asynchronousResponse;
+       }
+
+       public long getTimeout() {
+               return timeout;
+       }
+
+       public long getStartTime() {
+               return startTime;
+       }
+
+       /**
+        * Required implementation by Delay queue
+        * Returns the elapsed time for this context
+        */
+       @Override
+       public long getDelay(TimeUnit unit) {
+               // 0 or negative means this object is considered to be expired
+               return unit.convert(startTime + timeout - System.currentTimeMillis(), unit);
+       }
+
+       /**
+        * Required implementation by Delay queue
+        * Compares the object to determine whether the object can be marked as expired
+        */
+       @Override
+       public int compareTo(Delayed object) {
+               WorkflowContext that = (WorkflowContext) object;
+               long thisEndTime = startTime + timeout;
+               long thatEndTime = that.startTime + that.timeout;
+
+               if (thisEndTime < thatEndTime) {
+                       return -1;
+               } else if (thisEndTime > thatEndTime) {
+                       return 1;
+               } else {
+                       return 0;
+               }
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowContextHolder.java
new file mode 100644 (file)
index 0000000..a42a6d6
--- /dev/null
@@ -0,0 +1,188 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.util.concurrent.DelayQueue;
+import java.util.concurrent.TimeUnit;
+
+import javax.ws.rs.core.Response;
+
+import org.jboss.resteasy.spi.AsynchronousResponse;
+import org.slf4j.MDC;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * Workflow Context Holder instance which can be accessed elsewhere either in groovy scripts or Java
+ * @version 1.0
+ *
+ */
+public class WorkflowContextHolder {
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       private static final String logMarker = "[WORKFLOW-CONTEXT-HOLDER]";
+       private static WorkflowContextHolder instance = null;
+
+       /**
+        * Delay Queue which holds workflow context holder objects
+        */
+       private final DelayQueue<WorkflowContext> responseQueue = new DelayQueue<WorkflowContext>();
+       private final TimeoutThread timeoutThread = new TimeoutThread();
+
+       private WorkflowContextHolder() {
+               timeoutThread.start();
+       }
+
+       /**
+        * Singleton holder which eliminates hot lock
+        * Since the JVM synchronizes static method there is no synchronization needed for this method
+        * @return
+        */
+       public static synchronized WorkflowContextHolder getInstance() {
+               if (instance == null) {
+                       instance = new WorkflowContextHolder();
+               }
+               return instance;
+       }
+       
+       public void put(WorkflowContext context) {
+               msoLogger.debug(logMarker + " Adding context to the queue: "
+                       + context.getRequestId());
+               responseQueue.put(context);
+       }
+       
+       public void remove(WorkflowContext context) {
+               msoLogger.debug(logMarker + " Removing context from the queue: "
+                       + context.getRequestId());
+               responseQueue.remove(context);
+       }
+       
+       public WorkflowContext getWorkflowContext(String requestId) {
+               // Note: DelayQueue interator is threadsafe
+               for (WorkflowContext context : responseQueue) {
+                       if (requestId.equals(context.getRequestId())) {
+                               msoLogger.debug("Found context for request id: " + requestId);
+                               return context;
+                       }
+               }
+
+               msoLogger.debug("Unable to find context for request id: " + requestId);
+               return null;
+       }
+       
+       /**
+        * Builds the callback response object to respond to client
+        * @param processKey
+        * @param processInstanceId
+        * @param requestId
+        * @param callbackResponse
+        * @return
+        */
+       public Response processCallback(String processKey, String processInstanceId,
+                       String requestId, WorkflowCallbackResponse callbackResponse) {
+               WorkflowResponse workflowResponse = new WorkflowResponse();
+               WorkflowContext workflowContext = getWorkflowContext(requestId);
+
+               if (workflowContext == null) {
+                       msoLogger.debug("Unable to correlate workflow context for request id: " + requestId
+                               + ":processInstance Id:" + processInstanceId
+                               + ":process key:" + processKey);
+                       workflowResponse.setMessage("Fail");
+                       workflowResponse.setMessageCode(400);
+                       workflowResponse.setResponse("Unable to correlate workflow context, bad request. Request Id: " + requestId);
+                       return Response.serverError().entity(workflowResponse).build();
+               }
+
+               responseQueue.remove(workflowContext);
+
+               msoLogger.debug("Using callback response for request id: " + requestId);
+               workflowResponse.setResponse(callbackResponse.getResponse());
+               workflowResponse.setProcessInstanceID(processInstanceId);
+               workflowResponse.setMessageCode(callbackResponse.getStatusCode());
+               workflowResponse.setMessage(callbackResponse.getMessage());
+               sendWorkflowResponseToClient(processKey, workflowContext, workflowResponse);
+               return Response.ok().entity(workflowResponse).build();
+       }
+       
+       /**
+        * Send the response to client asynchronously when invoked by the BPMN process
+        * @param processKey
+        * @param workflowContext
+        * @param workflowResponse
+        */
+       private void sendWorkflowResponseToClient(String processKey, WorkflowContext workflowContext,
+                       WorkflowResponse workflowResponse) {
+               msoLogger.debug(logMarker + "Sending the response for request id: " + workflowContext.getRequestId());
+               recordEvents(processKey, workflowResponse, workflowContext.getStartTime());
+               Response response = Response.status(workflowResponse.getMessageCode()).entity(workflowResponse).build();
+               AsynchronousResponse asyncResp = workflowContext.getAsynchronousResponse();
+               asyncResp.setResponse(response);
+       }
+
+       /**
+        * Timeout thread which monitors the delay queue for expired context and send timeout response
+        * to client
+        *
+        * */
+       private class TimeoutThread extends Thread {
+               public void run() {
+                       while (!isInterrupted()) {
+                               try {
+                                       WorkflowContext requestObject = responseQueue.take();                                   
+                                       msoLogger.debug("Time remaining for request id: " + requestObject.getRequestId() + ":" + requestObject.getDelay(TimeUnit.MILLISECONDS));
+                                       msoLogger.debug("Preparing timeout response for " + requestObject.getProcessKey() + ":" + ":" + requestObject.getRequestId());
+                                       WorkflowResponse response = new WorkflowResponse();
+                                       response.setMessage("Fail");
+                                       response.setResponse("Request timedout, request id:" + requestObject.getRequestId());
+                                       //response.setProcessInstanceID(requestObject.getProcessInstance().getProcessInstanceId());
+                                       recordEvents(requestObject.getProcessKey(), response, requestObject.getStartTime());
+                                       response.setMessageCode(500);
+                                       Response result = Response.status(500).entity(response).build();
+                                       requestObject.getAsynchronousResponse().setResponse(result);
+                                       msoLogger.debug("Sending timeout response for request id:" + requestObject.getRequestId() + ":response:" + response);
+                               } catch (InterruptedException e) {
+                                       break;
+                               } catch (Exception e) {
+                                       msoLogger.debug("WorkflowContextHolder timeout thread caught exception: " + e);
+                               msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+                                               MsoLogger.ErrorCode.UnknownError, "Error in WorkflowContextHolder timeout thread");
+                               
+                               }
+                       }
+
+                       msoLogger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
+               }
+       }
+       
+       private static void recordEvents(String processKey, WorkflowResponse response,
+                       long startTime) {
+
+               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               logMarker + response.getMessage() + " for processKey: "
+                               + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+               
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, logMarker 
+                               + response.getMessage() + " for processKey: " 
+                               + processKey + " with response: " + response.getResponse());
+               
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResource.java
new file mode 100644 (file)
index 0000000..1d90ac4
--- /dev/null
@@ -0,0 +1,627 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicLong;
+
+import javax.ws.rs.Consumes;
+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.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.camunda.bpm.engine.HistoryService;
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.history.HistoricVariableInstance;
+import org.camunda.bpm.engine.impl.core.variable.VariableMapImpl;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.variable.VariableMap;
+import org.camunda.bpm.engine.variable.Variables;
+import org.camunda.bpm.engine.variable.Variables.SerializationDataFormats;
+
+import org.openecomp.mso.bpmn.core.WorkflowException;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.slf4j.MDC;
+
+@Path("/workflow")
+public class WorkflowResource {
+       
+       private ProcessEngineServices pes4junit = null;
+
+       private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+       private static final String LOGMARKER = "[WRKFLOW-RESOURCE]";
+
+       private static final int DEFAULT_WAIT_TIME = 30000;
+
+       @Context
+       private UriInfo uriInfo = null;
+
+       /**
+        * Starts the process instance and responds to client synchronously
+        * If the request does not contain att-mso-service-request-timeout then it waits for the value specified in DEFAULT_WAIT_TIME
+        * Note: value specified in att-mso-service-request-timeout is in seconds
+        * During polling time, if there is an exception encountered in the process execution then polling is stopped and the error response is 
+        * returned to the client
+        * @param processKey
+        * @param variableMap
+        * @return
+        */
+       @POST
+       @Path("/services/{processKey}")
+       @Produces("application/json")
+       @Consumes("application/json")
+       public Response startProcessInstanceByKey(@PathParam("processKey") String processKey,
+                       VariableMapImpl variableMap) {
+
+               Map<String, Object> inputVariables = getInputVariables(variableMap);    
+               setLogContext(processKey, inputVariables);
+
+               WorkflowResponse workflowResponse = new WorkflowResponse();
+               long startTime = System.currentTimeMillis();
+               ProcessInstance processInstance = null;
+
+               try {
+                       //Kickoff the process
+                       ProcessThread thread = new ProcessThread(inputVariables,processKey,msoLogger);
+                       thread.start();
+
+                       Map<String, Object> responseMap = null;
+
+                       //wait for process to be completed
+                       long waitTime = getWaitTime(inputVariables);
+                       long now = System.currentTimeMillis();
+                       long start = now;
+                       long endTime = start + waitTime;
+                       long pollingInterval = 500;
+
+                       // TEMPORARY LOGIC FOR UNIT TEST REFACTORING
+                       // If this is a unit test (method is invoked directly), wait a max
+                       // of 5 seconds after process ended for a result.  In production,
+                       // wait up to 60 seconds.
+                       long timeToWaitAfterProcessEnded = uriInfo == null ? 5000 : 60000;
+                       AtomicLong timeProcessEnded = new AtomicLong(0);
+                       boolean endedWithNoResponse = false;
+
+                       while (now <= endTime) {
+                               Thread.sleep(pollingInterval);
+
+                               now = System.currentTimeMillis();
+
+                               // Increase the polling interval over time
+
+                               long elapsed = now - start;
+
+                               if (elapsed > 60000) {
+                                       pollingInterval = 5000;
+                               } else if (elapsed > 10000) {
+                                       pollingInterval = 1000;
+                               }
+                               Exception exception = thread.getException();
+                               if (exception != null) {
+                                       throw new Exception(exception);
+                               }
+
+                               processInstance = thread.getProcessInstance();
+
+                               if (processInstance == null) {
+                                       msoLogger.debug(LOGMARKER + processKey + " process has not been created yet");
+                                       continue;
+                               }
+
+                               String processInstanceId = processInstance.getId();
+                               workflowResponse.setProcessInstanceID(processInstanceId);                               
+
+                               responseMap = getResponseMap(processInstance, processKey, timeProcessEnded);
+
+                               if (responseMap == null) {
+                                       msoLogger.debug(LOGMARKER + processKey + " has not produced a response yet");
+
+                                       if (timeProcessEnded.longValue() != 0) {
+                                               long elapsedSinceEnded = System.currentTimeMillis() - timeProcessEnded.longValue();
+
+                                               if (elapsedSinceEnded > timeToWaitAfterProcessEnded) {
+                                                       endedWithNoResponse = true;
+                                                       break;
+                                               }
+                                       }
+                               } else {
+                                       processResponseMap(workflowResponse, responseMap);
+                                       recordEvents(processKey, workflowResponse, startTime);
+                                       return Response.status(workflowResponse.getMessageCode()).entity(workflowResponse).build();
+                               }
+                       }
+
+                       //if we dont get response after waiting then send timeout response
+
+                       String state;
+                       String processInstanceId;
+
+                       if (processInstance == null) {
+                               processInstanceId = "N/A";
+                               state = "NOT STARTED";
+                       } else {
+                               processInstanceId = processInstance.getProcessInstanceId();
+                               state = isProcessEnded(processInstanceId) ? "ENDED" : "NOT ENDED";
+                       }
+
+                       workflowResponse.setMessage("Fail");
+                       if (endedWithNoResponse) {
+                               workflowResponse.setResponse("Process ended without producing a response");
+                       } else {
+                               workflowResponse.setResponse("Request timed out, process state: " + state);
+                       }
+                       workflowResponse.setProcessInstanceID(processInstanceId);
+                       recordEvents(processKey, workflowResponse, startTime);
+                       workflowResponse.setMessageCode(500);
+                       return Response.status(500).entity(workflowResponse).build();
+               } catch (Exception ex) {
+                       msoLogger.debug(LOGMARKER + "Exception in startProcessInstance by key");
+                       ex.printStackTrace();
+                       workflowResponse.setMessage("Fail" );
+                       workflowResponse.setResponse("Error occurred while executing the process: " + ex.getMessage());
+                       if (processInstance != null) workflowResponse.setProcessInstanceID(processInstance.getId());
+                       
+                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG,  "BPMN", MDC.get(processKey), 
+                                       MsoLogger.ErrorCode.UnknownError, LOGMARKER + workflowResponse.getMessage()
+                                       + " for processKey: " + processKey + " with response: " + workflowResponse.getResponse());
+                       
+                       workflowResponse.setMessageCode(500);
+                       recordEvents(processKey, workflowResponse, startTime);
+                       return Response.status(500).entity(workflowResponse).build();
+               }
+       }
+
+       /**
+        * Returns the wait time, this is used by the resource on how long it should wait to send a response
+        * If none specified DEFAULT_WAIT_TIME is used
+        * @param inputVariables
+        * @return
+        */
+       private int getWaitTime(Map<String, Object> inputVariables)
+       {
+               String timeout = inputVariables.get("att-mso-service-request-timeout") == null
+                       ? null : inputVariables.get("att-mso-service-request-timeout").toString();              
+
+               if (timeout != null) {
+                       try {
+                               return Integer.parseInt(timeout)*1000;
+                       } catch (NumberFormatException nex) {
+                               msoLogger.debug("Invalid input for att-mso-service-request-timeout");
+                       }
+               }
+               return DEFAULT_WAIT_TIME;
+       }
+       
+       private void recordEvents(String processKey, WorkflowResponse response, long startTime) {
+               
+               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               LOGMARKER + response.getMessage() + " for processKey: "
+                               + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+               
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               LOGMARKER + response.getMessage() + " for processKey: "
+                               + processKey + " with response: " + response.getResponse());
+       }
+
+       private void setLogContext(String processKey, Map<String, Object> inputVariables) {
+               MsoLogger.setServiceName("MSO." + processKey);
+               if (inputVariables != null) {
+                       MsoLogger.setLogContext(getValueFromInputVariables(inputVariables, "att-mso-request-id"),
+                               getValueFromInputVariables(inputVariables, "att-mso-service-instance-id"));
+               }
+       }
+
+       private String getValueFromInputVariables(Map<String,Object> inputVariables, String key) {
+               Object value = inputVariables.get(key);
+               if (value == null) {
+                       return "N/A";
+               } else {
+                       return value.toString();
+               }
+       }
+       
+       /**
+        * Checks to see if the specified process is ended.
+        * @param processInstanceId the process instance ID
+        * @return true if the process is ended
+        */
+       private boolean isProcessEnded(String processInstanceId) {
+               ProcessEngineServices pes = getProcessEngineServices();
+               return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;        
+       }
+
+       private void processResponseMap(WorkflowResponse workflowResponse, Map<String, Object> responseMap) {
+               Object object = responseMap.get("Response");
+               String response = object == null ? null : String.valueOf(object);
+               if(response == null){
+                       object = responseMap.get("WorkflowResponse");
+                       response = object == null ? null : String.valueOf(object);
+               }
+
+               workflowResponse.setResponse(response); 
+
+               object = responseMap.get("ResponseCode");
+               String responseCode = object == null ? null : String.valueOf(object);
+
+               try {
+                       workflowResponse.setMessageCode(Integer.parseInt(responseCode));
+               } catch(NumberFormatException nex) {
+                       msoLogger.debug(LOGMARKER + "Failed to parse ResponseCode: " + responseCode);
+                       workflowResponse.setMessageCode(-1);
+               }
+
+               Object status = responseMap.get("Status");
+
+               if ("Success".equalsIgnoreCase(String.valueOf(status))) {
+                       workflowResponse.setMessage("Success");
+               } else if ("Fail".equalsIgnoreCase(String.valueOf(status))) {
+                       workflowResponse.setMessage("Fail");
+               } else {
+                       msoLogger.debug(LOGMARKER + "Unrecognized Status: " + responseCode);
+                       workflowResponse.setMessage("Fail");
+               }
+       }
+
+       /**
+        * @version 1.0
+        * Triggers the workflow in a separate thread
+        */
+       private class ProcessThread extends Thread {
+               private final Map<String,Object> inputVariables;
+               private final String processKey;
+               private final MsoLogger msoLogger;
+               private final String businessKey;
+               private ProcessInstance processInstance = null;
+               private Exception exception = null;
+
+               public ProcessThread(Map<String, Object> inputVariables, String processKey, MsoLogger msoLogger) {
+                       this.inputVariables = inputVariables;
+                       this.processKey = processKey;
+                       this.msoLogger = msoLogger;
+                       this.businessKey = UUID.randomUUID().toString();
+               }
+
+               /**
+                * If an exception occurs when starting the process instance, it may
+                * be obtained by calling this method.  Note that exceptions are only
+                * recorded while the process is executing in its original thread.
+                * Once a process is suspended, exception recording stops.
+                * @return the exception, or null if none has occurred
+                */
+               public Exception getException() {
+                       return exception;
+               }
+
+               
+               public ProcessInstance getProcessInstance() {
+                       return this.processInstance;
+               }
+               
+               /**
+                * Sets the process instance exception.
+                * @param exception the exception
+                */
+               private void setException(Exception exception) {
+                       this.exception = exception;
+               }
+
+               public void run() {
+                       setLogContext(processKey, inputVariables);
+
+                       long startTime = System.currentTimeMillis();
+                       
+                       try {
+                               msoLogger.debug(LOGMARKER + "***Received MSO startProcessInstanceByKey with processKey:"
+                                       + processKey + " and variables: " + inputVariables);
+                               
+                               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER
+                                               + "Call to MSO workflow/services in Camunda. Received MSO startProcessInstanceByKey with"
+                                               + " processKey:" + processKey
+                                               + " businessKey:" + businessKey
+                                               + " variables: " + inputVariables);
+                                               
+                               RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+
+                               // Note that this method doesn't return until the process suspends
+                               // itself or finishes.  We provide a business key so we can identify
+                               // the process instance immediately.
+                               processInstance = runtimeService.startProcessInstanceByKey(
+                                       processKey, inputVariables);
+
+                       } catch (Exception e) {
+                               msoLogger.debug(LOGMARKER + "ProcessThread caught an exception executing "
+                                       + processKey + ": " + e);
+                               setException(e);
+                       }
+               }
+
+       }
+
+       private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
+               VariableMap inputVariables = Variables.createVariables();
+               @SuppressWarnings("unchecked")
+               Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
+               for (String key : vMap.keySet()) { //variabe name vn
+                       @SuppressWarnings("unchecked")
+                       Map<String, Object> valueMap = (Map<String,Object>)vMap.get(key); //value, type
+                       inputVariables.putValueTyped(key, Variables
+                       .objectValue(valueMap.get("value"))
+                       .serializationDataFormat(SerializationDataFormats.JAVA) // tells the engine to use java serialization for persisting the value
+                       .create());
+               }
+               return inputVariables;
+       }
+
+       /**
+        * Attempts to get a response map from the specified process instance.
+        * @return the response map, or null if it is unavailable
+        */
+       private Map<String, Object> getResponseMap(ProcessInstance processInstance,
+                       String processKey, AtomicLong timeProcessEnded) {
+
+               String responseMapVariable = processKey + "ResponseMap";
+               String processInstanceId = processInstance.getId();
+
+               // Query the runtime service to see if a response map is ready.
+
+/*             RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+               List<Execution> executions = runtimeService.createExecutionQuery()
+                       .processInstanceId(processInstanceId).list();
+
+               for (Execution execution : executions) {
+                       @SuppressWarnings("unchecked")
+                       Map<String, Object> responseMap = (Map<String, Object>)
+                               getVariableFromExecution(runtimeService, execution.getId(),
+                                       responseMapVariable);
+
+                       if (responseMap != null) {
+                               msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
+                                       + " from process " + processInstanceId + " execution "
+                                       + execution.getId());
+                               return responseMap;
+                       }
+               }
+*/
+               //Querying history seem to return consistent results compared to querying the runtime service
+
+               boolean alreadyEnded = timeProcessEnded.longValue() != 0;
+
+               if (alreadyEnded || isProcessEnded(processInstance.getId())) {
+                       if (!alreadyEnded) {
+                               timeProcessEnded.set(System.currentTimeMillis());
+                       }
+
+                       // Query the history service to see if a response map exists.
+
+                       HistoryService historyService = getProcessEngineServices().getHistoryService();
+                       @SuppressWarnings("unchecked")
+                       Map<String, Object> responseMap = (Map<String, Object>)
+                               getVariableFromHistory(historyService, processInstance.getId(),
+                                       responseMapVariable);
+
+                       if (responseMap != null) {
+                               msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
+                                       + " from process " + processInstanceId + " history");
+                               return responseMap;
+                       }
+
+                       // Query the history service for old-style response variables.
+
+                       String prefix = (String) getVariableFromHistory(historyService, processInstanceId, "prefix");
+
+                       if (prefix != null) {
+                               
+                               // Check for 'WorkflowResponse' variable
+                               Object workflowResponseObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowResponse");
+                               String workflowResponse = workflowResponseObject == null ? null : String.valueOf(workflowResponseObject);
+                               msoLogger.debug(LOGMARKER + "WorkflowResponse: " + workflowResponse);
+                               
+                               if (workflowResponse != null) {
+                                       Object responseCodeObject = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+                                       String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);
+                                       msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+                                       responseMap = new HashMap<String, Object>();
+                                       responseMap.put("WorkflowResponse", workflowResponse);
+                                       responseMap.put("ResponseCode", responseCode);
+                                       responseMap.put("Status", "Success");
+                                       return responseMap;
+                               }
+                               
+                               
+                               // Check for 'WorkflowException' variable
+                               WorkflowException workflowException = null;
+                               String workflowExceptionText = null;
+
+                               Object workflowExceptionObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowException");
+                               if(workflowExceptionObject != null) {
+                                       if(workflowExceptionObject instanceof WorkflowException) {
+                                               workflowException = (WorkflowException) workflowExceptionObject;
+                                               workflowExceptionText = workflowException.toString();
+                                               responseMap = new HashMap<String, Object>();
+                                               responseMap.put("WorkflowException", workflowExceptionText);
+                                               responseMap.put("ResponseCode", workflowException.getErrorCode());
+                                               responseMap.put("Status", "Fail");
+                                               return responseMap;
+                                       }
+                                       else if (workflowExceptionObject instanceof String) {
+                                               Object object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+                                               String responseCode = object == null ? null : String.valueOf(object);
+                                               workflowExceptionText = (String) workflowExceptionObject;
+                                               responseMap = new HashMap<String, Object>();
+                                               responseMap.put("WorkflowException", workflowExceptionText);
+                                               responseMap.put("ResponseCode", responseCode);
+                                               responseMap.put("Status", "Fail");
+                                               return responseMap;
+                                       }
+                                       
+                               }
+                               msoLogger.debug(LOGMARKER + "WorkflowException: " + workflowExceptionText);
+                               
+                               // BEGIN LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+                               Object object = getVariableFromHistory(historyService, processInstanceId, processKey + "Response");
+                               String response = object == null ? null : String.valueOf(object);
+                               msoLogger.debug(LOGMARKER + processKey + "Response: " + response);
+
+                               if (response != null) {
+                                       object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+                                       String responseCode = object == null ? null : String.valueOf(object);
+                                       msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+                                       responseMap = new HashMap<String, Object>();
+                                       responseMap.put("Response", response);
+                                       responseMap.put("ResponseCode", responseCode);
+                                       responseMap.put("Status", "Success");
+                                       return responseMap;
+                               }
+       
+                               object = getVariableFromHistory(historyService, processInstanceId, prefix + "ErrorResponse");
+                               String errorResponse = object == null ? null : String.valueOf(object);
+                               msoLogger.debug(LOGMARKER + prefix + "ErrorResponse: " + errorResponse);
+
+                               if (errorResponse != null) {
+                                       object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+                                       String responseCode = object == null ? null : String.valueOf(object);
+                                       msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+                                       responseMap = new HashMap<String, Object>();
+                                       responseMap.put("Response", errorResponse);
+                                       responseMap.put("ResponseCode", responseCode);
+                                       responseMap.put("Status", "Fail");
+                                       return responseMap;
+                               }
+                               // END LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+                       }
+               }
+               return null;
+       }
+       
+       /**
+        * Gets a variable value from the specified execution.
+        * @return the variable value, or null if the variable could not be
+        * obtained
+        */
+       private Object getVariableFromExecution(RuntimeService runtimeService,
+                       String executionId, String variableName) {
+               try {
+                       return runtimeService.getVariable(executionId, variableName);
+               } catch (ProcessEngineException e) {
+                       // Most likely cause is that the execution no longer exists.
+                       msoLogger.debug("Error retrieving execution " + executionId
+                               + " variable " + variableName + ": " + e);
+                       return null;
+               }
+       }
+       
+       /**
+        * Gets a variable value from specified historical process instance.
+        * @return the variable value, or null if the variable could not be
+        * obtained
+        */
+       private Object getVariableFromHistory(HistoryService historyService,
+                       String processInstanceId, String variableName) {
+               try {
+                       HistoricVariableInstance v = historyService.createHistoricVariableInstanceQuery()
+                               .processInstanceId(processInstanceId).variableName(variableName).singleResult();
+                       return v == null ? null : v.getValue();
+               } catch (Exception e) {
+                       msoLogger.debug("Error retrieving process " + processInstanceId
+                               + " variable " + variableName + " from history: " + e);
+                       return null;
+               }
+       }
+       
+       @POST
+       @Path("/services/{processKey}/{processInstanceId}")
+       @Produces("application/json")
+       @Consumes("application/json")
+       public WorkflowResponse getProcessVariables(@PathParam("processKey") String processKey, @PathParam("processInstanceId") String processInstanceId) {
+               //TODO filter only set of variables
+               WorkflowResponse response = new WorkflowResponse();
+
+               long startTime = System.currentTimeMillis();
+               try {
+                       ProcessEngineServices engine = getProcessEngineServices();
+                       List<HistoricVariableInstance> variables = engine.getHistoryService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list();
+                       Map<String,String> variablesMap = new HashMap<String,String>();
+                       for (HistoricVariableInstance variableInstance: variables) {
+                               variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());
+                       }
+
+                       msoLogger.debug(LOGMARKER + "***Received MSO getProcessVariables with processKey:" + processKey + " and variables: " + variablesMap.toString());
+                       
+                       msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER 
+                                       + "Call to MSO workflow/services in Camunda. Received MSO getProcessVariables with processKey:" 
+                                       + processKey + " and variables: " 
+                                       + variablesMap.toString());
+                       
+                       
+                       response.setVariables(variablesMap);
+                       response.setMessage("Success");
+                       response.setResponse("Successfully retrieved the variables"); 
+                       response.setProcessInstanceID(processInstanceId);
+
+                       msoLogger.debug(LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: " + response.getResponse());
+               } catch (Exception ex) {
+                       response.setMessage("Fail");
+                       response.setResponse("Failed to retrieve the variables," + ex.getMessage()); 
+                       response.setProcessInstanceID(processInstanceId);
+                       
+                       msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MDC.get(processKey), MsoLogger.ErrorCode.UnknownError, LOGMARKER 
+                                       + response.getMessage() 
+                                       + " for processKey: " 
+                                       + processKey 
+                                       + " with response: " 
+                                       + response.getResponse());
+                       
+               }
+               
+               msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               LOGMARKER + response.getMessage() + " for processKey: "
+                               + processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+               
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+                               LOGMARKER + response.getMessage() + " for processKey: "
+                               + processKey + " with response: " + response.getResponse());
+               
+               return response;
+       }
+
+       private ProcessEngineServices getProcessEngineServices() {
+               if (pes4junit == null) {
+                       return ProcessEngines.getDefaultProcessEngine();
+               } else {
+                       return pes4junit;
+               }
+       }
+
+       public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+               pes4junit = pes;
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResourceApplication.java
new file mode 100644 (file)
index 0000000..1e1a20c
--- /dev/null
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+
+/**
+ * @version 1.0
+ * RESTeasy workflow application which wires synchronous and asynchronous response
+ *
+ */
+@ApplicationPath("/")
+public class WorkflowResourceApplication extends Application {
+    private Set<Object> singletons = new HashSet<Object>();
+    private Set<Class<?>> classes = new HashSet<Class<?>>();
+
+    public WorkflowResourceApplication() {
+        singletons.add(new WorkflowResource());
+        singletons.add(new WorkflowAsyncResource());
+        singletons.add(new VnfAdapterRestNotifyResource());
+    }
+
+    @Override
+    public Set<Class<?>> getClasses() {
+        return classes;
+    }
+
+    @Override
+    public Set<Object> getSingletons() {
+        return singletons;
+    }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/gamma/workflow/service/WorkflowResponse.java
new file mode 100644 (file)
index 0000000..37cc676
--- /dev/null
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.gamma.workflow.service;
+
+import java.util.Map;
+
+/**
+ * @version 1.0
+ * Synchronous workflow response bean 
+ *
+ */
+public class WorkflowResponse {
+
+       private String response;
+       private String message;
+       private String processInstanceID;
+       private Map<String,String> variables;
+       private int messageCode;
+       
+       public String getResponse() {
+               return response; 
+       }
+       public void setResponse(String response) {
+               this.response = response;
+       }
+       public String getMessage() {
+               return message;
+       }
+       public void setMessage(String message) {
+               this.message = message;
+       }
+       public String getProcessInstanceID() {
+               return processInstanceID;
+       }
+       public void setProcessInstanceID(String pID) {
+               this.processInstanceID = pID;
+       }
+       public Map<String, String> getVariables() {
+               return variables;
+       }
+       public void setVariables(Map<String, String> variables) {
+               this.variables = variables;
+       }
+       public void setMessageCode(int messageCode) {
+               this.messageCode = messageCode;
+       }
+       
+       public int getMessageCode() {
+               return messageCode;
+       }
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoHandler.java
new file mode 100644 (file)
index 0000000..66b170e
--- /dev/null
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.util;
+
+import java.security.GeneralSecurityException;
+
+public class CryptoHandler implements ICryptoHandler {
+
+       private static String msoKey = "aa3871669d893c7fb8abbcda31b88b4f";
+       //private static String msoAaiPwd = "mso0206";
+       private static String msoAaiEncryptedPwd = "C1FC4A39E16419DD41DFC1212843F440";
+
+       public String getMsoAaiPassword() {
+               try {
+                       return CryptoUtils.decrypt(msoAaiEncryptedPwd, msoKey);
+               } catch (GeneralSecurityException e) {
+                       return null;
+               }
+       }
+
+
+       public String encryptMsoPassword(String plainMsoPwd) {
+               try {
+                       return CryptoUtils.encrypt(plainMsoPwd, msoKey);
+               } catch (GeneralSecurityException e) {
+                       return null;
+               }
+       }
+
+
+       public String decryptMsoPassword(String encryptedPwd) {
+               try {
+                       return CryptoUtils.decrypt(encryptedPwd, msoKey);
+               } catch (GeneralSecurityException e) {
+                       return null;
+               }
+       }
+
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/CryptoUtils.java
new file mode 100644 (file)
index 0000000..e8b91bc
--- /dev/null
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.util;
+
+
+import java.security.GeneralSecurityException;
+import java.security.NoSuchAlgorithmException;
+
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+// import com.att.util.common.RttpBasicAuth;  
+
+//Need to add BPM error handler
+
+/**
+ * CryptoUtils adapted from RTTP client.
+ * 
+ */
+public class CryptoUtils {
+
+    public static final String AES = "AES";
+
+    /**
+    * encrypt a value and generate a keyfile 
+     * if the keyfile is not found then a new one is created
+    * @throws GeneralSecurityException 
+     * @throws IOException 
+     */
+    public static String encrypt(String value, String keyString) throws GeneralSecurityException
+    {
+        SecretKeySpec sks = getSecretKeySpec(keyString);
+        Cipher cipher = Cipher.getInstance(CryptoUtils.AES);
+        cipher.init(Cipher.ENCRYPT_MODE, sks, cipher.getParameters());
+        byte[] encrypted = cipher.doFinal(value.getBytes());
+        return byteArrayToHexString(encrypted);
+    }
+
+    /**
+    * decrypt a value  
+     * @throws GeneralSecurityException 
+     * @throws IOException 
+     */
+    public static String decrypt(String message, String keyString) throws GeneralSecurityException
+    {
+        SecretKeySpec sks = getSecretKeySpec(keyString);
+        Cipher cipher = Cipher.getInstance(CryptoUtils.AES);
+        cipher.init(Cipher.DECRYPT_MODE, sks);
+        byte[] decrypted = cipher.doFinal(hexStringToByteArray(message));
+        return new String(decrypted);
+    }
+
+    private static SecretKeySpec getSecretKeySpec(String keyString) throws NoSuchAlgorithmException
+    {
+        byte [] key = hexStringToByteArray(keyString);
+        SecretKeySpec sks = new SecretKeySpec(key, CryptoUtils.AES);
+        return sks;
+    }
+
+
+    private static String byteArrayToHexString(byte[] b){
+        StringBuffer sb = new StringBuffer(b.length * 2);
+        for (int i = 0; i < b.length; i++){
+            int v = b[i] & 0xff;
+            if (v < 16) {
+               sb.append('0');
+            }
+            sb.append(Integer.toHexString(v));
+    }
+        return sb.toString().toUpperCase();
+    }
+
+    private static byte[] hexStringToByteArray(String s) {
+        byte[] b = new byte[s.length() / 2];
+        for (int i = 0; i < b.length; i++){
+            int index = i * 2;
+            int v = Integer.parseInt(s.substring(index, index + 2), 16);
+            b[i] = (byte)v;
+        }
+        return b;
+    }
+
+    /**
+     * Not Used... 
+     * 
+    * Call Rttp utility jar to encrypt pwd
+    * @param clearPassword
+    * @return
+    * @throws GeneralSecurityException 
+     * @throws Exception
+    *
+    public static String encryptRttpPwd(String clearPassword) throws GeneralSecurityException {
+        try {
+            return RttpBasicAuth.encrypt(clearPassword);
+        } catch (Exception e) {
+            // wrap generic exception
+            throw new GeneralSecurityException(e);
+        }
+    }
+    */
+}
+
diff --git a/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java b/bpmn/MSOGammaBPMN/src/main/java/org/openecomp/mso/bpmn/util/ICryptoHandler.java
new file mode 100644 (file)
index 0000000..1ef96b6
--- /dev/null
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.bpmn.util;
+
+public interface ICryptoHandler {
+       public String getMsoAaiPassword();
+       public String encryptMsoPassword(String plainPwd);
+       public String decryptMsoPassword(String encryptedPwd);
+}
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml b/bpmn/MSOGammaBPMN/src/main/resources/META-INF/persistence.xml
new file mode 100644 (file)
index 0000000..605d6f3
--- /dev/null
@@ -0,0 +1,37 @@
+<?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=========================================================
+  -->
+
+<persistence version="2.0"
+  xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="
+        http://java.sun.com/xml/ns/persistence
+        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+
+  <persistence-unit name="primary">
+    <jta-data-source>java:jboss/datasources/ProcessEngine</jta-data-source>
+    <properties>
+      <!-- Properties for Hibernate -->
+      <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+      <property name="hibernate.show_sql" value="true" />
+    </properties>
+  </persistence-unit>
+
+</persistence>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml b/bpmn/MSOGammaBPMN/src/main/resources/META-INF/processes.xml
new file mode 100644 (file)
index 0000000..641e674
--- /dev/null
@@ -0,0 +1,81 @@
+<?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=========================================================
+  -->
+
+<process-application
+    xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <process-engine name="default">
+    <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
+    <datasource>java:jboss/datasources/ProcessEngine</datasource>
+    <properties>
+        <property name="history">full</property>
+        <property name="databaseSchemaUpdate">true</property>
+        <property name="authorizationEnabled">true</property>
+        <property name="jobExecutorDeploymentAware">true</property>
+        <property name="jobExecutorActivate">true</property>
+    </properties>
+    <plugins>
+
+      <!-- plugin enabling Process Application event listener support -->
+      <plugin>
+        <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
+      </plugin>
+      
+      <!-- plugin enabling integration of camunda Spin -->
+      <plugin>
+        <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
+      </plugin>
+
+      <!-- plugin enabling connect support -->
+      <plugin>
+        <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
+      </plugin>
+      
+      <plugin>
+        <class>org.openecomp.mso.bpmn.core.plugins.LoggingAndURNMappingPlugin</class>
+      </plugin>
+      
+      <!-- Needed until all subflows generate MSOWorkflowException events -->
+       <plugin>
+        <class>org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin</class>
+      </plugin>
+     
+        <!-- Optional Plugin for Camunda BPM Workbench -->
+ <!--     <plugin>
+        <class>org.camunda.bpm.debugger.server.EmbeddableDebugWebsocketBootstrap</class>
+        <properties>
+               <property name="httpPort">8088</property>
+        </properties>
+      </plugin>    -->      
+   </plugins>
+  </process-engine>
+       <process-archive name="MSOGammaBPMN">
+<!--     <process-engine>default</process-engine>
+ -->    <properties>
+      <property name="isDeleteUponUndeploy">false</property>
+      <property name="isScanForProcessDefinitions">true</property>
+    </properties>
+  </process-archive>
+
+</process-application>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/logback.xml b/bpmn/MSOGammaBPMN/src/main/resources/logback.xml
new file mode 100644 (file)
index 0000000..133fa54
--- /dev/null
@@ -0,0 +1,159 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration scan="true" scanPeriod="3 seconds" debug="true">
+  <!--<jmxConfigurator /> -->
+  <!-- directory path for all other type logs -->
+  <property name="logDir" value="/var/log/ecomp" />
+
+  <!-- directory path for debugging type logs -->
+  <property name="debugDir" value="/var/log/ecomp" />
+
+  <!--  specify the component name
+    <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC"  -->
+  <property name="componentName" value="MSO"></property>
+  <property name="subComponentName" value="BPMN"></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{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
+  <property name="debugPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%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" />
+  <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" />
+  <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+  <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
+
+
+  <!-- ============================================================================ -->
+  <!-- EELF Appenders -->
+  <!-- ============================================================================ -->
+
+  <!-- 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>256</queueSize>
+    <appender-ref ref="EELFAudit" />
+  </appender>
+
+  <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>256</queueSize>
+    <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>256</queueSize>
+    <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>256</queueSize>
+    <appender-ref ref="EELFDebug" />
+    <includeCallerData>true</includeCallerData>
+  </appender>
+
+
+  <!-- ============================================================================ -->
+  <!--  EELF loggers -->
+  <!-- ============================================================================ -->
+
+  <logger name="com.att.eelf.audit" level="info" additivity="false">
+    <appender-ref ref="asyncEELFAudit" />
+  </logger>
+
+  <logger name="com.att.eelf.metrics" level="info" additivity="false">
+    <appender-ref ref="asyncEELFMetrics" />
+  </logger>
+
+  <logger name="com.att.eelf.error" level="debug" additivity="false">
+    <appender-ref ref="asyncEELFError" />
+  </logger>
+  <root level="INFO">
+    <appender-ref ref="asyncEELFDebug" />
+  </root>
+
+</configuration>
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateNetworkInstanceInfra.bpmn
new file mode 100644 (file)
index 0000000..8ce38e4
--- /dev/null
@@ -0,0 +1,1297 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="CreateNetworkInstanceInfra" name="CreateNetworkInstanceInfra" isExecutable="true">\r
+    <bpmn2:startEvent id="createNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>\r
+    <bpmn2:endEvent id="aai_Error_EndEvent" name="AAI Name Error">\r
+      <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:inclusiveGateway id="InclusiveGateway">\r
+      <bpmn2:incoming>isNetworkActiveNo_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+    </bpmn2:inclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_21" sourceRef="InclusiveGateway" targetRef="callRESTQueryCloudRegion_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.prepareSDNCRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity"/>\r
+    <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.validateSDNCResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>sdncTopoNo_SequenceFlow</bpmn2:outgoing>\r
+      <bpmn2:outgoing>sdncTopoYes_SequenceFlow</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent"/>\r
+    <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTQueryNetworkId_ScriptTask">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask">\r
+      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent"/>\r
+    <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">\r
+      <bpmn2:incoming>sdncTopoNo_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask"/>\r
+    <bpmn2:callActivity id="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CRENWKI_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_rollbackSDNCReturnCode"/>\r
+        <camunda:out source="sdncAdapterResponse" target="CRENWKI_rollbackSDNCResponse"/>\r
+      </bpmn2:extensionElements>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" attachedToRef="callAssignSDNCAdapter_CallActivity">\r
+      <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign Adapter V1 Sub-process" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CRENWKI_assignSDNCRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:out source="sdncAdapterResponse" target="CRENWKI_assignSDNCResponse"/>\r
+        <camunda:out source="SDNCA_ResponseCode" target="CRENWKI_sdncReturnCode"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="WorkflowException" target="CRENWKI_WorkflowException"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+        <camunda:in variables="all"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask"/>\r
+    <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &amp; Completion Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>\r
+    <bpmn2:serviceTask id="callRollbackContrailNetwork_ServiceTask" name="Call Rollback Network" isForCompensation="true">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="payload">${CRENWKI_rollbackNetworkRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>\r
+                <camunda:entry key="content-type">application/xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CRENWKI_rollbackNetworkReturnCode">${statusCode}</camunda:outputParameter>\r
+            <camunda:outputParameter name="CRENWKI_rollbackNetworkResponse">${response}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:scriptTask id="validateCreatePONetwork_ScriptTask" name="Validate Create PO Network" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.validateCreateNetworkResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:exclusiveGateway id="isNetworkActive_ExclusiveGateway" name="Is Network Active?" default="isNetworkActiveNo_SequenceFlow">\r
+      <bpmn2:incoming>isAAIQueryNameYes_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>isNetworkActiveYes_SequenceFlow</bpmn2:outgoing>\r
+      <bpmn2:outgoing>isNetworkActiveNo_SequenceFlow</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="isNetworkActiveYes_SequenceFlow" name="Yes" sourceRef="isNetworkActive_ExclusiveGateway" targetRef="prepareDBInfraRequestSilentSucces_ScriptTask">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="isNetworkActiveNo_SequenceFlow" name="No" sourceRef="isNetworkActive_ExclusiveGateway" targetRef="InclusiveGateway"/>\r
+    <bpmn2:scriptTask id="prepareDBInfraRequestSilentSucces_ScriptTask" name="Prepare DB Infra Request for Active Network" scriptFormat="groovy">\r
+      <bpmn2:incoming>isNetworkActiveYes_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.prepareDBRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="prepareDBInfraRequestSilentSucces_ScriptTask" targetRef="silentSuccessCallDB_ServiceTask"/>\r
+    <bpmn2:serviceTask id="silentSuccessCallDB_ServiceTask" name="Call DB Infra Update (Silent Success)">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${CRENWKI_createDBRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CRENWKI_createDBRequest">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="CRENWKI_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_40" name="" sourceRef="silentSuccessCallDB_ServiceTask" targetRef="prepareSilentCompletion_ScriptTask"/>\r
+    <bpmn2:scriptTask id="prepareSilentCompletion_ScriptTask" name="Prepare Active Network Completion Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_41</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="prepareSilentCompletion_ScriptTask" targetRef="silentAccess_CallActivity"/>\r
+    <bpmn2:callActivity id="silentAccess_CallActivity" name="Call CompleteMsoProcess (Silent Success)" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CRENWKI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in variables="all"/>\r
+        <camunda:out variables="all"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_41</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="silentAccess_CallActivity" targetRef="EndEvent_5"/>\r
+    <bpmn2:endEvent id="EndEvent_5">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="isAAIQueryNameOk_ExclusiveGateway" name="Is Query Name Ok?" default="isAAIQueryNameNo_SequenceFlow">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>isAAIQueryNameNo_SequenceFlow</bpmn2:outgoing>\r
+      <bpmn2:outgoing>isAAIQueryNameYes_SequenceFlow</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="isAAIQueryNameNo_SequenceFlow" name="No" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="isReturnCode404_ExclusiveGateway"/>\r
+    <bpmn2:sequenceFlow id="isAAIQueryNameYes_SequenceFlow" name="Yes" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="isNetworkActive_ExclusiveGateway">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isAAIqueryNameGood") == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Code 404?" default="isReturnCode404_No_SequenceFlow">\r
+      <bpmn2:incoming>isAAIQueryNameNo_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>\r
+      <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="No" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="aai_Error_EndEvent"/>\r
+    <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="InclusiveGateway">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_aaiNameReturnCode" ) == "404"}
+
+]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">\r
+      <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow">\r
+        <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+        <bpmn2:outgoing>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:outgoing>\r
+        <bpmn2:outgoing>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="isRollbackOn_YesNetwork_SequenceFlow" name="Yes" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:sequenceFlow id="isRollbackOn_NoNetwork_SequenceFlow" name="No" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="InclusiveGateway_6"/>\r
+      <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">\r
+        <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="isRollbackOn_Network_ExclusiveGateway"/>\r
+      <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="isPONR?" default="isPONR_No_SequenceFlow">\r
+        <bpmn2:incoming>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing>\r
+        <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="InclusiveGateway_6">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isPONR") == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isNetworkOk_ExclusiveGateway"/>\r
+      <bpmn2:exclusiveGateway id="isNetworkOk_ExclusiveGateway" name="is Network Ok?" default="isNetworkOk_No_SequenceFlow">\r
+        <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:outgoing>isNetworkOk_No_SequenceFlow</bpmn2:outgoing>\r
+        <bpmn2:outgoing>isNetworkOk_Yes_SequenceFlow</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="isNetworkOk_No_SequenceFlow" name="No" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway"/>\r
+      <bpmn2:sequenceFlow id="isNetworkOk_Yes_SequenceFlow" name="Yes" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="networkContrailRollback_IntermediateThrowEvent">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isNetworkRollbackNeeded") == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway">\r
+        <bpmn2:incoming>isNetworkOk_No_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+        <bpmn2:outgoing>sdncOk_Yeso_ExclusiveGateway</bpmn2:outgoing>\r
+        <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="prepareSDNCRollbackRequest_ScriptTask">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="validateRollbacksResponse_ScriptTask_2"/>\r
+      <bpmn2:intermediateThrowEvent id="networkContrailRollback_IntermediateThrowEvent" name="Network Rollback">\r
+        <bpmn2:incoming>isNetworkOk_Yes_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+        <bpmn2:compensateEventDefinition id="network_CompensateEventDefinition" activityRef="callRollbackContrailNetwork_ServiceTask" waitForCompletion="false"/>\r
+      </bpmn2:intermediateThrowEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="networkContrailRollback_IntermediateThrowEvent" targetRef="sdncOk_ExclusiveGateway"/>\r
+      <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy">\r
+        <bpmn2:incoming>sdncOk_Yeso_ExclusiveGateway</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_53</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="sdncTopoRollback_IntermediateThrowEvent"/>\r
+      <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback">\r
+        <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing>\r
+        <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/>\r
+      </bpmn2:intermediateThrowEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_55" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="validateRollbacksResponse_ScriptTask_2"/>\r
+      <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>\r
+      <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">\r
+        <bpmn2:extensionElements>\r
+          <camunda:connector>\r
+            <camunda:connectorId>http-connector</camunda:connectorId>\r
+            <camunda:inputOutput>\r
+              <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+              <camunda:inputParameter name="payload">${CRENWKI_createDBRequest}</camunda:inputParameter>\r
+              <camunda:inputParameter name="headers">\r
+                <camunda:map>\r
+                  <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+                </camunda:map>\r
+              </camunda:inputParameter>\r
+              <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+              <camunda:outputParameter name="CRENWKI_createDBResponse">${response}</camunda:outputParameter>\r
+              <camunda:outputParameter name="CRENWKI_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+            </camunda:inputOutput>\r
+          </camunda:connector>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      </bpmn2:serviceTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>\r
+      <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in variables="all"/>\r
+          <camunda:out variables="all"/>\r
+          <camunda:in source="CRENWKI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+          <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+          <camunda:out source="FH_ResponseCode" target="FH_ResponseCode"/>\r
+          <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse"/>\r
+          <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>\r
+      <bpmn2:endEvent id="EndEvent_4">\r
+        <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:scriptTask id="validateRollbacksResponse_ScriptTask_2" name="Validate Rollback Responses" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming>\r
+        <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.validateRollbackResponses(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="validateRollbacksResponse_ScriptTask_2" targetRef="InclusiveGateway_6"/>\r
+      <bpmn2:inclusiveGateway id="InclusiveGateway_6">\r
+        <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>\r
+      </bpmn2:inclusiveGateway>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>\r
+      <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def buildErrorResponse = new CreateNetworkInstanceInfra()
+buildErrorResponse.buildErrorResponse(execution)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:boundaryEvent id="networkPOCompensation_BoundaryEvent" attachedToRef="callCreateNetwork_ServiceTask">\r
+      <bpmn2:compensateEventDefinition id="_CompensateEventDefinition_5" waitForCompletion="false"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:serviceTask id="callCreateNetwork_ServiceTask" name="Call Create Network">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="payload">${CRENWKI_createNetworkRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>\r
+                <camunda:entry key="content-type">application/xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CRENWKI_networkReturnCode">${statusCode}</camunda:outputParameter>\r
+            <camunda:outputParameter name="CRENWKI_createNetworkResponse">${response}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="callCreateNetwork_ServiceTask" targetRef="validateCreatePONetwork_ScriptTask"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateCreatePONetwork_ScriptTask" targetRef="callRESTReQueryNetworkID_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTReQueryNetworkID_ScriptTask" name="Call REST ReQuery Network Id in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQueryNetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.prepareDBRequest(execution)
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>\r
+    <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${CRENWKI_createDBRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CRENWKI_createDBResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="CRENWKI_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask"/>\r
+    <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in variables="all"/>\r
+        <camunda:out variables="all"/>\r
+        <camunda:in source="CRENWKI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.processJavaException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/>\r
+      <bpmn2:startEvent id="StartEvent_1">\r
+        <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/>\r
+      <bpmn2:endEvent id="EndEvent_1">\r
+        <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.preProcessRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>\r
+    <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>link</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new  CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="link" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance"/>\r
+    <bpmn2:callActivity id="callGetServiceInstance" name="Get&#xD;&#xA;Service&#xD;&#xA;Instance" calledElement="GenericGetService">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CRENWKI_serviceInstanceId" target="GENGS_serviceInstanceId"/>\r
+        <camunda:out source="GENGS_serviceInstance" target="CRENWKI_serviceInstance"/>\r
+        <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator"/>\r
+        <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator"/>\r
+        <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="GENGS_type" target="GENGS_type"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>link</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query Network Name In AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>siFoundYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.callRESTQueryAAINetworkName(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="isAAIQueryNameOk_ExclusiveGateway"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck"/>\r
+    <bpmn2:exclusiveGateway id="siFoundCheck" name="Service Instance Found?" default="siFoundNo">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>siFoundYes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>siFoundNo</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="callAAIQuery_scriptTask">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound"/>\r
+    <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>siFoundNo</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="callRESTQueryVpnBinding_ScriptTask" name="Call REST Query Vpn Binding in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask"/>\r
+    <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()
+CreateNetworkInstanceInfra.prepareCreateNetworkRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callCreateNetwork_ServiceTask"/>\r
+    <bpmn2:scriptTask id="callRESTQueryNetworkTableRef_ScriptTask" name="Call REST Query Network TableRef in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def CreateNetworkInstanceInfra = new CreateNetworkInstanceInfra()\r
+CreateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask"/>\r
+    <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity"/>\r
+    <bpmn2:association id="Association_3" sourceRef="networkPOCompensation_BoundaryEvent" targetRef="callRollbackContrailNetwork_ServiceTask"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateNetworkInstanceInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="192.0" y="185.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="193.0" y="226.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="350.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">\r
+        <di:waypoint xsi:type="dc:Point" x="228.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="350.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="249.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="929.0" y="58.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_62" bpmnElement="isAAIQueryNameOk_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1097.0" y="72.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="121.0" x="1063.0" y="51.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_62">\r
+        <di:waypoint xsi:type="dc:Point" x="1029.0" y="97.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1052.0" y="97.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1097.0" y="97.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1054.0" y="97.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateCreatePONetwork_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="1259.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="isAAIQueryNameNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_64">\r
+        <di:waypoint xsi:type="dc:Point" x="1122.0" y="122.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1122.0" y="180.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1129.0" y="120.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="isAAIQueryNameYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_73">\r
+        <di:waypoint xsi:type="dc:Point" x="1147.0" y="97.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1214.0" y="97.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1146.0" y="97.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1097.0" y="180.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="82.0" x="1037.0" y="165.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_EndEvent_118">\r
+        <di:waypoint xsi:type="dc:Point" x="1122.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1122.0" y="260.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1123.0" y="260.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1123.0" y="288.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1097.0" y="225.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_InclusiveGateway_4">\r
+        <di:waypoint xsi:type="dc:Point" x="1147.0" y="205.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1215.0" y="205.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1149.0" y="205.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="996.0" y="806.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="1105.0" y="288.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="97.0" x="1075.0" y="329.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callCreateNetwork_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="1101.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1343.0" y="276.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="137.0" y="1395.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">\r
+        <dc:Bounds height="567.0" width="1122.0" x="17.0" y="585.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="48.0" y="1040.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="67.0" x="33.0" y="1081.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="756.0" y="806.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1523.0" y="520.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="125.0" x="1487.0" y="569.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">\r
+        <di:waypoint xsi:type="dc:Point" x="1573.0" y="545.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1682.0" y="546.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1577.0" y="546.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_133">\r
+        <di:waypoint xsi:type="dc:Point" x="1523.0" y="545.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1443.0" y="546.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1500.0" y="546.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="347.0" y="1392.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="792.0" y="1390.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="564.0" y="1392.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="1682.0" y="528.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="74.0" x="1663.0" y="569.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1341.0" y="395.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="1323.0" y="434.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="82.0" x="1280.0" y="474.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19">\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="356.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="374.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="374.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="395.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1389.0" y="374.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">\r
+        <di:waypoint xsi:type="dc:Point" x="1441.0" y="435.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1499.0" y="435.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1473.0" y="435.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21">\r
+        <di:waypoint xsi:type="dc:Point" x="1323.0" y="447.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1290.0" y="438.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">\r
+        <di:waypoint xsi:type="dc:Point" x="450.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="516.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="481.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="516.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90">\r
+        <di:waypoint xsi:type="dc:Point" x="84.0" y="1058.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="131.0" y="1058.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="131.0" y="1057.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="161.0" y="1057.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="96.0" y="1058.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_128" bpmnElement="prepareDBInfraRequestSilentSucces_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1341.0" y="58.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_87" bpmnElement="silentSuccessCallDB_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1498.0" y="58.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_128" targetElement="_BPMNShape_ServiceTask_87">\r
+        <di:waypoint xsi:type="dc:Point" x="1441.0" y="98.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1498.0" y="98.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1456.0" y="98.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="470.0" y="867.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="96.0" x="440.0" y="906.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="prepareSilentCompletion_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1632.0" y="58.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_20" bpmnElement="silentAccess_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1766.0" y="58.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_55" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ServiceTask_87" targetElement="_BPMNShape_ScriptTask_130">\r
+        <di:waypoint xsi:type="dc:Point" x="1598.0" y="98.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1632.0" y="98.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1617.0" y="98.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_56" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_CallActivity_20">\r
+        <di:waypoint xsi:type="dc:Point" x="1732.0" y="98.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1766.0" y="98.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1740.0" y="98.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3">\r
+        <di:waypoint xsi:type="dc:Point" x="856.0" y="846.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="996.0" y="846.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="881.0" y="846.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1499.0" y="395.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">\r
+        <di:waypoint xsi:type="dc:Point" x="1549.0" y="475.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1549.0" y="492.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1548.0" y="492.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1548.0" y="520.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1545.0" y="503.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">\r
+        <di:waypoint xsi:type="dc:Point" x="564.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="447.0" y="1432.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="528.0" y="1432.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">\r
+        <di:waypoint xsi:type="dc:Point" x="347.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="292.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="292.0" y="1435.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="237.0" y="1435.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="290.0" y="1512.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1190.0" y="384.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_73" bpmnElement="isNetworkActive_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1214.0" y="72.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="113.0" x="1191.0" y="51.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="isNetworkActiveYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73" targetElement="_BPMNShape_ScriptTask_128">\r
+        <di:waypoint xsi:type="dc:Point" x="1264.0" y="97.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1328.0" y="97.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1328.0" y="98.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1341.0" y="98.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1269.0" y="97.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_44" bpmnElement="isNetworkActiveNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73" targetElement="_BPMNShape_InclusiveGateway_4">\r
+        <di:waypoint xsi:type="dc:Point" x="1239.0" y="122.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1240.0" y="180.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1238.0" y="123.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_45" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_InclusiveGateway_4" targetElement="_BPMNShape_ScriptTask_245">\r
+        <di:waypoint xsi:type="dc:Point" x="1265.0" y="205.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1304.0" y="205.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1304.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1344.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1272.0" y="205.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_4" bpmnElement="InclusiveGateway">\r
+        <dc:Bounds height="50.0" width="50.0" x="1215.0" y="180.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1297.0" y="175.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1343.0" y="506.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_88" bpmnElement="callRollbackContrailNetwork_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1190.0" y="1085.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQueryNetworkID_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1176.0" y="1390.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="984.0" y="1392.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135">\r
+        <di:waypoint xsi:type="dc:Point" x="1176.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1084.0" y="1432.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1143.0" y="1657.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">\r
+        <di:waypoint xsi:type="dc:Point" x="792.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="691.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="691.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="664.0" y="1432.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="773.0" y="1430.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ScriptTask_83">\r
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="926.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="926.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="892.0" y="1430.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="947.0" y="1432.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_32" bpmnElement="networkPOCompensation_BoundaryEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="1326.0" y="1137.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1344.0" y="1178.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_Association_3" bpmnElement="Association_3" sourceElement="_BPMNShape_BoundaryEvent_32" targetElement="_BPMNShape_ServiceTask_88">\r
+        <di:waypoint xsi:type="dc:Point" x="1326.0" y="1150.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1290.0" y="1139.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="624.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="704.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="739.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="717.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_49" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_156">\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="586.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="624.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="606.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="1181.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="1234.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="1234.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="1259.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="1418.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1343.0" y="970.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83">\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="1050.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="1101.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="1077.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="161.0" y="1032.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="98.0" x="138.0" y="1092.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_31" bpmnElement="networkContrailRollback_IntermediateThrowEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="169.0" y="764.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="107.0" x="121.0" y="739.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="isRollbackOn_YesNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_215">\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="1032.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="1004.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="186.0" y="1020.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="isRollbackOn_NoNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_InclusiveGateway_24">\r
+        <di:waypoint xsi:type="dc:Point" x="211.0" y="1057.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="1057.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="1004.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="211.0" y="1062.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1343.0" y="739.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_333">\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="819.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="835.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="835.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="851.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1390.0" y="828.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6">\r
+        <dc:Bounds height="50.0" width="50.0" x="336.0" y="954.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="361.0" y="1009.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="161.0" y="954.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="60.0" x="88.0" y="969.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_InclusiveGateway_24">\r
+        <di:waypoint xsi:type="dc:Point" x="211.0" y="979.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="979.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="204.0" y="983.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_216">\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="954.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="884.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="191.0" y="933.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_216" bpmnElement="isNetworkOk_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="161.0" y="834.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="95.0" x="68.0" y="849.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_86" bpmnElement="isNetworkOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217">\r
+        <di:waypoint xsi:type="dc:Point" x="211.0" y="859.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="273.0" y="859.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="211.0" y="863.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_90" bpmnElement="isNetworkOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_IntermediateThrowEvent_31">\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="834.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="816.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="188.0" y="816.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="188.0" y="800.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="188.0" y="816.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="336.0" y="756.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="78.0" x="323.0" y="722.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261">\r
+        <di:waypoint xsi:type="dc:Point" x="386.0" y="781.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="438.0" y="781.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="386.0" y="779.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_262">\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="806.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="362.0" y="845.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="366.0" y="806.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="169.0" y="1536.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="187.0" y="1577.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">\r
+        <di:waypoint xsi:type="dc:Point" x="187.0" y="1475.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="187.0" y="1536.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="184.0" y="1475.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1028.0" y="924.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1046.0" y="965.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">\r
+        <di:waypoint xsi:type="dc:Point" x="1046.0" y="886.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1046.0" y="924.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1043.0" y="888.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">\r
+        <di:waypoint xsi:type="dc:Point" x="676.0" y="846.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="756.0" y="846.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="686.0" y="846.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="576.0" y="806.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="576.0" y="940.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">\r
+        <di:waypoint xsi:type="dc:Point" x="626.0" y="940.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="626.0" y="886.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="623.0" y="927.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="1898.0" y="80.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1916.0" y="121.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_20" targetElement="_BPMNShape_EndEvent_181">\r
+        <di:waypoint xsi:type="dc:Point" x="1866.0" y="98.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1898.0" y="98.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1875.0" y="98.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="link" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_72">\r
+        <di:waypoint xsi:type="dc:Point" x="616.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="678.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="651.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="243.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="259.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="259.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="276.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1390.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1581.0" y="377.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124">\r
+        <di:waypoint xsi:type="dc:Point" x="1617.0" y="395.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1700.0" y="394.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1700.0" y="528.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1697.0" y="467.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">\r
+        <dc:Bounds height="79.0" width="100.0" x="438.0" y="742.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_IntermediateThrowEvent_31" targetElement="_BPMNShape_ExclusiveGateway_217">\r
+        <di:waypoint xsi:type="dc:Point" x="205.0" y="782.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="238.0" y="782.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_262" bpmnElement="validateRollbacksResponse_ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="312.0" y="845.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24" targetElement="_BPMNShape_ScriptTask_218">\r
+        <di:waypoint xsi:type="dc:Point" x="386.0" y="979.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="548.0" y="979.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="548.0" y="980.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="576.0" y="980.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="393.0" y="979.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261" targetElement="_BPMNShape_IntermediateThrowEvent_24">\r
+        <di:waypoint xsi:type="dc:Point" x="488.0" y="820.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="488.0" y="867.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="485.0" y="847.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_ScriptTask_262">\r
+        <di:waypoint xsi:type="dc:Point" x="470.0" y="885.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="412.0" y="885.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="448.0" y="885.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_262" targetElement="_BPMNShape_InclusiveGateway_24">\r
+        <di:waypoint xsi:type="dc:Point" x="362.0" y="925.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="954.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="358.0" y="948.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="1339.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1310.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1276.0" y="1430.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="1373.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">\r
+        <dc:Bounds height="188.0" width="394.0" x="21.0" y="381.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="54.0" y="458.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="72.0" y="499.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="169.0" y="436.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="330.0" y="458.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="348.0" y="499.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">\r
+        <di:waypoint xsi:type="dc:Point" x="90.0" y="476.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="476.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="129.0" y="476.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">\r
+        <di:waypoint xsi:type="dc:Point" x="269.0" y="476.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="330.0" y="476.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="301.0" y="476.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">\r
+        <dc:Bounds height="80.0" width="100.0" x="678.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="816.0" y="177.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="148.0" x="861.0" y="205.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244">\r
+        <di:waypoint xsi:type="dc:Point" x="778.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="816.0" y="202.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="791.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_62">\r
+        <di:waypoint xsi:type="dc:Point" x="841.0" y="177.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="841.0" y="98.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="929.0" y="98.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="845.0" y="111.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1039.0" y="275.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1057.0" y="316.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">\r
+        <dc:Bounds height="80.0" width="100.0" x="885.0" y="253.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331">\r
+        <di:waypoint xsi:type="dc:Point" x="841.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="841.0" y="293.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="885.0" y="293.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="848.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">\r
+        <di:waypoint xsi:type="dc:Point" x="985.0" y="293.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1039.0" y="293.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1004.0" y="293.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_333" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="851.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_333" targetElement="_BPMNShape_ScriptTask_157">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="931.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="950.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="950.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="970.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="943.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateServiceInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateServiceInstanceInfra.bpmn
new file mode 100644 (file)
index 0000000..46faf80
--- /dev/null
@@ -0,0 +1,466 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="CreateServiceInstanceInfra" name="CreateServiceInstanceInfra" isExecutable="true">\r
+    <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST PUT to create SI in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.callRESTCreateServiceInstanceInAAI(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_46" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>\r
+    <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>\r
+      <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">\r
+        <bpmn2:extensionElements>\r
+          <camunda:connector>\r
+            <camunda:connectorId>http-connector</camunda:connectorId>\r
+            <camunda:inputOutput>\r
+              <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+              <camunda:inputParameter name="payload">${CRESI_createDBInfraErrorRequest}</camunda:inputParameter>\r
+              <camunda:inputParameter name="headers">\r
+                <camunda:map>\r
+                  <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+                </camunda:map>\r
+              </camunda:inputParameter>\r
+              <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+              <camunda:outputParameter name="CRESI_errorDBInfraErrorResponse">${response}</camunda:outputParameter>\r
+              <camunda:outputParameter name="CRESI_errorDBInfraErrorErrorCode">${statusCode}</camunda:outputParameter>\r
+            </camunda:inputOutput>\r
+          </camunda:connector>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      </bpmn2:serviceTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>\r
+      <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.buildErrorResponse(execution)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="sendSyncError_ScriptTask"/>\r
+      <bpmn2:scriptTask id="sendSyncError_ScriptTask" name="Send Sync Ack Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.sendSyncError(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="sendSyncError_ScriptTask" targetRef="faultHandler_CallActivity"/>\r
+      <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in variables="all"/>\r
+          <camunda:out variables="all"/>\r
+          <camunda:in source="CRESI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="requestId" target="requestId"/>\r
+          <camunda:in source="serviceInstanceId" target="serviceInstanceId"/>\r
+          <camunda:out source="FH_ResponseCode" target="FH_ResponseCode"/>\r
+          <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse"/>\r
+          <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>\r
+      <bpmn2:endEvent id="EndEvent_4">\r
+        <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">\r
+        <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="subProcessStart_StartEvent" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.prepareDBRequest(execution)
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>\r
+    <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${CRESI_createDBRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CRESI_createDBResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="CRESI_createDBCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &amp; Completion Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>\r
+    <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in variables="all"/>\r
+        <camunda:out variables="all"/>\r
+        <camunda:in source="CRESI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="requestId" target="requestId"/>\r
+        <camunda:in source="serviceInstanceId" target="serviceInstanceId"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.preProcessRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>\r
+    <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Code 404?" default="isReturnCode404_No_SequenceFlow">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>\r
+      <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="No" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="aai_DuplicateFound_EndEvent"/>\r
+    <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="callRESTQueryNetworkId_ScriptTask">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRESI_queryAAISINameCode" ) == "404"}
+
+]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="callRESTQueryCustomerSIName_ScriptTask" name="Call REST Query for SI by Name in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.callRESTQueryAAISIName(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="callRESTQueryCustomerSIName_ScriptTask" targetRef="isReturnCode404_ExclusiveGateway"/>\r
+    <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query SubscriberId in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.callRESTQueryAAIGlobalSubscriberId(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="callRESTQueryCustomerSIName_ScriptTask"/>\r
+    <bpmn2:endEvent id="aai_DuplicateFound_EndEvent" name="Duplicate Found in AAI">\r
+      <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callAAIQuery_scriptTask"/>\r
+    <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">\r
+      <bpmn2:startEvent id="StartEvent_1">\r
+        <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:endEvent id="EndEvent_1">\r
+        <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/>\r
+      <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateServiceInstanceInfra = new CreateServiceInstanceInfra()
+CreateServiceInstanceInfra.processJavaException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:startEvent id="createNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateServiceInstanceInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="423.0" y="185.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="65.0" x="409.0" y="226.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="612.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">\r
+        <di:waypoint xsi:type="dc:Point" x="459.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="612.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="498.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="997.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ScriptTask_135">\r
+        <di:waypoint xsi:type="dc:Point" x="1097.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1176.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1122.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1368.0" y="177.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="82.0" x="1353.0" y="154.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_EndEvent_118">\r
+        <di:waypoint xsi:type="dc:Point" x="1418.0" y="202.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1477.0" y="202.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1536.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1418.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_ScriptTask_133">\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1392.0" y="264.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="312.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1395.0" y="226.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="810.0" y="611.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_DuplicateFound_EndEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="1536.0" y="185.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="125.0" x="1500.0" y="226.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1167.0" y="775.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">\r
+        <dc:Bounds height="301.0" width="751.0" x="346.0" y="427.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="408.0" y="633.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="67.0" x="393.0" y="674.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="678.0" y="477.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="775.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="456.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="614.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">\r
+        <di:waypoint xsi:type="dc:Point" x="712.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="803.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="743.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="803.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_ScriptTask_158">\r
+        <di:waypoint xsi:type="dc:Point" x="778.0" y="517.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="810.0" y="517.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="803.0" y="517.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="694.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="775.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="727.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">\r
+        <di:waypoint xsi:type="dc:Point" x="1344.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1306.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1306.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1267.0" y="815.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1298.0" y="815.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="312.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTQueryCustomerSIName_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1176.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_83">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="392.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="456.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="427.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="sendSyncError_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="810.0" y="477.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_57" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_CallActivity_3">\r
+        <di:waypoint xsi:type="dc:Point" x="860.0" y="557.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="860.0" y="611.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="857.0" y="573.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="1083.0" y="797.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1101.0" y="838.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="984.0" y="633.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1002.0" y="674.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">\r
+        <di:waypoint xsi:type="dc:Point" x="910.0" y="651.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="651.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="909.0" y="651.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">\r
+        <di:waypoint xsi:type="dc:Point" x="634.0" y="517.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="678.0" y="517.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="644.0" y="517.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="534.0" y="477.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="534.0" y="611.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">\r
+        <di:waypoint xsi:type="dc:Point" x="584.0" y="611.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="584.0" y="557.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="581.0" y="598.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_ScriptTask_62">\r
+        <di:waypoint xsi:type="dc:Point" x="903.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="997.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="911.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_218">\r
+        <di:waypoint xsi:type="dc:Point" x="444.0" y="651.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="534.0" y="651.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="451.0" y="651.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="536.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="614.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="575.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">\r
+        <di:waypoint xsi:type="dc:Point" x="1167.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1119.0" y="815.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1140.0" y="815.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ExclusiveGateway_64">\r
+        <di:waypoint xsi:type="dc:Point" x="1276.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1317.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1317.0" y="202.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1368.0" y="202.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1324.0" y="202.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="232.0" width="409.0" x="349.0" y="837.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="417.0" y="942.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="435.0" y="983.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="492.0" y="920.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="647.0" y="939.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="665.0" y="980.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">\r
+        <di:waypoint xsi:type="dc:Point" x="453.0" y="960.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="492.0" y="960.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="478.0" y="960.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">\r
+        <di:waypoint xsi:type="dc:Point" x="592.0" y="960.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="960.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="957.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="647.0" y="957.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="614.0" y="960.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleInfra.bpmn
new file mode 100644 (file)
index 0000000..0d08da3
--- /dev/null
@@ -0,0 +1,472 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_pNTO8MRhEeWv36YLr7PC3Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="CreateVfModuleInfra" name="CreateVfModuleInfra" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1" camunda:asyncAfter="true" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest"/>\r
+    <bpmn2:callActivity id="DoCreateVfModuleSubprocess" name="Do Create Vf Module" calledElement="DoCreateVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DoCreateVfModuleRequest" target="DoCreateVfModuleRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="isVidRequest" target="isVidRequest"/>\r
+        <camunda:in source="newVfModuleId" target="newVfModuleId"/>\r
+        <camunda:out source="DCVFM_vnfId" target="CVFMI_vnfId"/>\r
+        <camunda:out source="DCVFM_vfModuleId" target="CVFMI_vfModuleId"/>\r
+        <camunda:out source="RollbackData" target="RollbackData"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="WorkflowResponse" target="CVFMI_WorkflowResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="SendResponse" camunda:asyncAfter="true" name="Send Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.sendResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="SendResponse" targetRef="DoCreateVfModuleSubprocess"/>\r
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="To FinishLine">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:linkEventDefinition id="_LinkEventDefinition_34" name="FinishLine"/>\r
+    </bpmn2:intermediateThrowEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="DoCreateVfModuleSubprocess" targetRef="IntermediateThrowEvent_1"/>\r
+    <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="FinishLine">\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:linkEventDefinition id="_LinkEventDefinition_35" name="FinishLine"/>\r
+    </bpmn2:intermediateCatchEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="IntermediateCatchEvent_1" targetRef="PrepareUpdateInfraRequest"/>\r
+    <bpmn2:scriptTask id="PrepareUpdateInfraRequest" name="Prepare Update Infra Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:serviceTask id="ServiceTask_1" name="Update Infra Request">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${CVFMI_updateInfraRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>\r
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="PrepareUpdateInfraRequest" targetRef="ServiceTask_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ServiceTask_1" targetRef="UpdateInfraRequestResponseCheck"/>\r
+    <bpmn2:scriptTask id="PrepareMSOCompletionHandler" name="Prepare MSO Completion Handler" scriptFormat="groovy">\r
+      <bpmn2:incoming>updateInfraRequestResponseGood</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.postProcessResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PrepareMSOCompletionHandler" targetRef="MSOCompletionHandler"/>\r
+    <bpmn2:callActivity id="MSOCompletionHandler" name="MSO Completion Handler" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CVFMI_msoCompletionRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:exclusiveGateway id="UpdateInfraRequestResponseCheck" name="Success? " default="updateInfraRequestResponseBad">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>updateInfraRequestResponseBad</bpmn2:outgoing>\r
+      <bpmn2:outgoing>updateInfraRequestResponseGood</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="updateInfraRequestResponseBad" name="no" sourceRef="UpdateInfraRequestResponseCheck" targetRef="EndEvent_2"/>\r
+    <bpmn2:sequenceFlow id="updateInfraRequestResponseGood" name="yes" sourceRef="UpdateInfraRequestResponseCheck" targetRef="PrepareMSOCompletionHandler">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVFMI_dbResponseCode" ) == '200'}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>updateInfraRequestResponseBad</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_2" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:subProcess id="ErrorHandler" name="Error Handler" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="ValidateRollbackResponse" name="Validate Rollback Response" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.validateRollbackResponse(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ValidateRollbackResponse" targetRef="InclusiveGateway_1"/>\r
+      <bpmn2:callActivity id="ScriptTask_1" name="Do CreateVfModule Rollback" calledElement="DoCreateVfModuleRollback">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in source="RollbackData" target="RollbackData"/>\r
+          <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+          <camunda:in source="isVidRequest" target="isVidRequest"/>\r
+          <camunda:out source="MSOWorkflowException" target="RollbackWorkflowException"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_1" targetRef="ValidateRollbackResponse"/>\r
+      <bpmn2:startEvent id="StartEvent_2" name="Catch All Errors">\r
+        <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_2" targetRef="ExclusiveGateway_1"/>\r
+      <bpmn2:callActivity id="FalloutHandler" name="Fallout Handler" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in source="CVFMI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+          <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+          <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="FalloutHandler" targetRef="EndEvent_3"/>\r
+      <bpmn2:endEvent id="EndEvent_3">\r
+        <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:scriptTask id="PrepareFalloutHandler" name="Prepare Fallout Handler" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvfm = new CreateVfModuleInfra()
+cvfm.falloutHandlerPrep(execution, 'CVFMI_FalloutHandlerRequest')]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PrepareFalloutHandler" targetRef="FalloutHandler"/>\r
+      <bpmn2:inclusiveGateway id="InclusiveGateway_1">\r
+        <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+        <bpmn2:incoming>isRollbackOnNoSequenceFlow</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      </bpmn2:inclusiveGateway>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="InclusiveGateway_1" targetRef="PrepareFalloutHandler"/>\r
+      <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Is Rollback On? " default="isRollbackOnNoSequenceFlow">\r
+        <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+        <bpmn2:outgoing>isRollbackOnNoSequenceFlow</bpmn2:outgoing>\r
+        <bpmn2:outgoing>IsRollbackOnYesSequenceFlow</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="isRollbackOnNoSequenceFlow" name="no" sourceRef="ExclusiveGateway_1" targetRef="InclusiveGateway_1"/>\r
+      <bpmn2:scriptTask id="LogAndSaveOriginalException" name="Log and Save Original Exception" scriptFormat="groovy">\r
+        <bpmn2:incoming>IsRollbackOnYesSequenceFlow</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvfm = new CreateVfModuleInfra()
+cvfm.logAndSaveOriginalException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="IsRollbackOnYesSequenceFlow" name="yes" sourceRef="ExclusiveGateway_1" targetRef="LogAndSaveOriginalException">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVFMI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="LogAndSaveOriginalException" targetRef="ScriptTask_1"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="SetSuccessIndicator" name="Set Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[execution.setVariable("CreateVfModuleSuccessIndicator", true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_10"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="MSOCompletionHandler" targetRef="SetSuccessIndicator"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="SetSuccessIndicator" targetRef="EndEvent_1"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="ErrorHandler">\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_3"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_4"/>\r
+    <bpmn2:endEvent id="EndEvent_4">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_12"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModule = new CreateVfModuleInfra()
+createVfModule.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PreProcessRequest" targetRef="SendResponse"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmn2:error id="Error_2" errorCode="RESTFault" name="REST Fault"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="41.0" y="231.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">\r
+        <di:waypoint xsi:type="dc:Point" x="77.0" y="249.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="226.0" y="249.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="99.0" y="249.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="226.0" y="209.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="SendResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="432.0" y="209.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ServiceTask_86">\r
+        <di:waypoint xsi:type="dc:Point" x="326.0" y="249.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="432.0" y="249.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="348.0" y="249.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="DoCreateVfModuleSubprocess">\r
+        <dc:Bounds height="80.0" width="145.0" x="612.0" y="209.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_178">\r
+        <di:waypoint xsi:type="dc:Point" x="532.0" y="249.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="612.0" y="249.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_47" bpmnElement="IntermediateThrowEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="823.0" y="231.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="841.0" y="272.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_IntermediateThrowEvent_47">\r
+        <di:waypoint xsi:type="dc:Point" x="756.0" y="249.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="823.0" y="249.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_32" bpmnElement="IntermediateCatchEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="39.0" y="349.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="65.0" x="25.0" y="390.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="PrepareUpdateInfraRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="127.0" y="327.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="277.0" y="327.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_179" bpmnElement="UpdateInfraRequestResponseCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="443.0" y="341.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="68.0" x="435.0" y="308.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="PrepareMSOCompletionHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="552.0" y="327.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="MSOCompletionHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="708.0" y="327.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1020.0" y="349.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1038.0" y="390.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="452.0" y="469.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="470.0" y="510.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_IntermediateCatchEvent_32" targetElement="_BPMNShape_ScriptTask_219">\r
+        <di:waypoint xsi:type="dc:Point" x="75.0" y="367.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="127.0" y="367.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="105.0" y="367.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_219" targetElement="_BPMNShape_ServiceTask_103">\r
+        <di:waypoint xsi:type="dc:Point" x="227.0" y="367.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="277.0" y="367.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ExclusiveGateway_179">\r
+        <di:waypoint xsi:type="dc:Point" x="377.0" y="367.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="410.0" y="367.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="410.0" y="366.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="443.0" y="366.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="407.0" y="366.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="updateInfraRequestResponseBad" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_EndEvent_178">\r
+        <di:waypoint xsi:type="dc:Point" x="468.0" y="391.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="469.0" y="421.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="470.0" y="421.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="470.0" y="469.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="459.0" y="419.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="updateInfraRequestResponseGood" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_ScriptTask_220">\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="366.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="523.0" y="366.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="523.0" y="367.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="552.0" y="367.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="510.0" y="367.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_220" targetElement="_BPMNShape_ScriptTask_221">\r
+        <di:waypoint xsi:type="dc:Point" x="652.0" y="367.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="708.0" y="367.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="678.0" y="367.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="ErrorHandler" isExpanded="true">\r
+        <dc:Bounds height="385.0" width="925.0" x="48.0" y="540.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="72.0" y="844.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="98.0" x="60.0" y="886.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_222" bpmnElement="PrepareFalloutHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="564.0" y="672.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_223" bpmnElement="FalloutHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="708.0" y="672.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="864.0" y="694.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="882.0" y="735.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_44" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="955.0" y="690.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="970.0" y="731.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1049.0" y="690.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1067.0" y="731.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_222" targetElement="_BPMNShape_ScriptTask_223">\r
+        <di:waypoint xsi:type="dc:Point" x="664.0" y="712.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="708.0" y="712.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="689.0" y="712.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_223" targetElement="_BPMNShape_EndEvent_179">\r
+        <di:waypoint xsi:type="dc:Point" x="808.0" y="712.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="864.0" y="712.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="836.0" y="712.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_BoundaryEvent_44" targetElement="_BPMNShape_EndEvent_180">\r
+        <di:waypoint xsi:type="dc:Point" x="991.0" y="708.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1049.0" y="708.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1015.0" y="708.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="SetSuccessIndicator">\r
+        <dc:Bounds height="79.0" width="103.0" x="858.0" y="328.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_241">\r
+        <di:waypoint xsi:type="dc:Point" x="808.0" y="367.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="858.0" y="367.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_241" targetElement="_BPMNShape_EndEvent_177">\r
+        <di:waypoint xsi:type="dc:Point" x="960.0" y="367.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1020.0" y="367.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="205.0" y="836.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="102.0" x="193.0" y="901.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ValidateRollbackResponse">\r
+        <dc:Bounds height="79.0" width="103.0" x="312.0" y="554.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_25" bpmnElement="InclusiveGateway_1">\r
+        <dc:Bounds height="50.0" width="50.0" x="459.0" y="686.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="484.0" y="741.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ExclusiveGateway_223">\r
+        <di:waypoint xsi:type="dc:Point" x="108.0" y="862.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="156.0" y="862.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="156.0" y="861.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="205.0" y="861.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="153.0" y="862.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="isRollbackOnNoSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_InclusiveGateway_25">\r
+        <di:waypoint xsi:type="dc:Point" x="255.0" y="861.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="354.0" y="861.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="354.0" y="711.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="459.0" y="711.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="324.0" y="866.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_266" targetElement="_BPMNShape_InclusiveGateway_25">\r
+        <di:waypoint xsi:type="dc:Point" x="414.0" y="593.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="484.0" y="593.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="484.0" y="686.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="462.0" y="593.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_InclusiveGateway_25" targetElement="_BPMNShape_ScriptTask_222">\r
+        <di:waypoint xsi:type="dc:Point" x="509.0" y="711.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="527.0" y="711.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="527.0" y="712.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="564.0" y="712.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="533.0" y="712.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="79.0" width="103.0" x="179.0" y="554.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_267" targetElement="_BPMNShape_ScriptTask_266">\r
+        <di:waypoint xsi:type="dc:Point" x="281.0" y="593.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="312.0" y="593.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="294.0" y="593.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_283" bpmnElement="LogAndSaveOriginalException">\r
+        <dc:Bounds height="79.0" width="103.0" x="179.0" y="693.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="IsRollbackOnYesSequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_283">\r
+        <di:waypoint xsi:type="dc:Point" x="230.0" y="836.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="230.0" y="771.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="240.0" y="804.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_283" targetElement="_BPMNShape_ScriptTask_267">\r
+        <di:waypoint xsi:type="dc:Point" x="230.0" y="693.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="230.0" y="632.0"/>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVfModuleVolumeInfraV1.bpmn
new file mode 100644 (file)
index 0000000..9beaad9
--- /dev/null
@@ -0,0 +1,480 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_CyftwG_HEeaKe-v4u9MasA" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="CreateVfModuleVolumeInfraV1" name="CreateVfModuleVolumeInfraV1" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_createVfModuleVolumeInfraV1" camunda:asyncAfter="true">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_createVfModuleVolumeInfraV1" targetRef="ScriptTask_preProcessRequest"/>\r
+    <bpmn2:subProcess id="SubProcess_exceptionHandler" name="Exception Handler" triggeredByEvent="true">\r
+      <bpmn2:startEvent id="StartEvent_catchErrors" name="Catch Exceptions">\r
+        <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="StartEvent_catchErrors" targetRef="ExclusiveGateway_isSyncResponseSent"/>\r
+      <bpmn2:exclusiveGateway id="ExclusiveGateway_isSyncResponseSent" name="Sync response sent?" default="SequenceFlow_syncResponseNotSent">\r
+        <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_syncResponseSent</bpmn2:outgoing>\r
+        <bpmn2:outgoing>SequenceFlow_syncResponseNotSent</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_syncResponseSent" name="Yes" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_prefalloutHandlerRequest">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{CVMVINFRAV1_syncResponseSent == true}</bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:scriptTask id="ScriptTask_sendSyncErrorResp" name="Send sync error response" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_syncResponseNotSent</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('sendSyncError', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_syncResponseNotSent" name="No" sourceRef="ExclusiveGateway_isSyncResponseSent" targetRef="ScriptTask_sendSyncErrorResp"/>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_sendSyncErrorResp" targetRef="ScriptTask_prefalloutHandlerRequest"/>\r
+      <bpmn2:scriptTask id="ScriptTask_prefalloutHandlerRequest" name="Prepare Fallout Handler Request" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+        <bpmn2:incoming>SequenceFlow_syncResponseSent</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('prepareFalloutHandlerRequest', execution, isDebugLogEnabled)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="ScriptTask_prefalloutHandlerRequest" targetRef="CallActivity_callFalloutHandler"/>\r
+      <bpmn2:callActivity id="CallActivity_callFalloutHandler" name="Call Fallout Handler" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in source="CVMVINFRAV1_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+          <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+          <camunda:out source="FH_ResponseCode" target="FH_ResponseCode"/>\r
+          <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse"/>\r
+          <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse"/>\r
+          <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_callFalloutHandler" targetRef="EndEvent_4"/>\r
+      <bpmn2:endEvent id="EndEvent_4" name="End">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2"/>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_sendSyncAckResponse"/>\r
+    <bpmn2:scriptTask id="ScriptTask_sendSyncAckResponse" name="Send Sync Ack Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('sendSyncResponse', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_sendSyncAckResponse" targetRef="ExclusiveGateway_isVolGrpnamePresent"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_isVolGrpnamePresent" name="Is volume group name present?" default="SequenceFlow_volGrpNameMissing">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_volGrpNamePresent</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_volGrpNameMissing</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_volGrpNamePresent" name="" sourceRef="ExclusiveGateway_isVolGrpnamePresent" targetRef="CallActivity_callGenericGetSI">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{CVMVINFRAV1_volumeGroupName != null  && CVMVINFRAV1_volumeGroupName != "" }]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_volGrpNameMissing" name="" sourceRef="ExclusiveGateway_isVolGrpnamePresent" targetRef="ScriptTask_buildError"/>\r
+    <bpmn2:scriptTask id="ScriptTask_buildError" name="Build Error" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_volGrpNameMissing</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('buildWorkflowException', execution, 2500, "Volume group name not present in request.", isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_buildError" targetRef="EndEvent_2"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:callActivity id="CallActivity_callGenericGetSI" name="Call Generic Get Service Instance" calledElement="GenericGetService">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CVMVINFRAV1_serviceInstanceId" target="GENGS_serviceInstanceId"/>\r
+        <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator"/>\r
+        <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="CVMVINFRAV1_serviceType" target="GENGS_type"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_volGrpNamePresent</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:callActivity id="CallActivity_doCreateVfModuleVolumeV1" name="Call DoCreateVfModuleVolumeV1" calledElement="DoCreateVfModuleVolumeV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CVMVINFRAV1_Request" target="DoCreateVfModuleVolumeV1Request"/>\r
+        <camunda:in source="CVMVINFRAV1_vnfId" target="vnf-id"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="CVMVINFRAV1_volumeGroupId" target="volume-group-id"/>\r
+        <camunda:out source="DCVFMODVOLV1_SuccessIndicator" target="DCVFMODVOLV1_SuccessIndicator"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="CVMVINFRAV1_isVidRequest" target="is-vid-request"/>\r
+        <camunda:in source="test-volume-group-name" target="test-volume-group-name"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_serviceInstanceFound</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="CallActivity_doCreateVfModuleVolumeV1" targetRef="ScriptTask_prepareDbInfraRequest"/>\r
+    <bpmn2:scriptTask id="ScriptTask_setSuccessIndicator" name="Set Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('setSuccessIndicator', execution, true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_setSuccessIndicator" targetRef="EndEvent_3"/>\r
+    <bpmn2:callActivity id="CallActivity_completeMsoProcess" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CVMVINFRAV1_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CallActivity_completeMsoProcess" targetRef="ScriptTask_setSuccessIndicator"/>\r
+    <bpmn2:scriptTask id="ScriptTask_postCompletionRequest" name="Post Completion Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('postProcessResponse', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_postCompletionRequest" targetRef="CallActivity_completeMsoProcess"/>\r
+    <bpmn2:serviceTask id="ServiceTask_callDbInfraUpdate" name="Call DB Infra Update">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${CVMVINFRAV1_createDBRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CVMVINFRAV1_createDBResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="CVMVINFRAV1_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ServiceTask_callDbInfraUpdate" targetRef="ScriptTask_postCompletionRequest"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_prepareDbInfraRequest" name="Prepare DB Infra Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('prepareDbInfraSuccessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="ServiceTask_callDbInfraUpdate"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Is service instance found?" default="SequenceFlow_serviceInstanceNotFound">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_serviceInstanceFound</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_serviceInstanceNotFound</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="CallActivity_callGenericGetSI" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_serviceInstanceFound" name="Yes" sourceRef="ExclusiveGateway_1" targetRef="CallActivity_doCreateVfModuleVolumeV1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{GENGSI_SuccessIndicator == true && GENGSI_FoundIndicator == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_serviceInstanceNotFound" name="No" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_buildServiceInstanceNotFoundError"/>\r
+    <bpmn2:endEvent id="EndEvent_serviceInstanceNotFound">\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_buildServiceInstanceNotFoundError" name="Build Service Instance Not Found Error" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_serviceInstanceNotFound</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def createVfModuleVolumeInfraV1 = new CreateVfModuleVolumeInfraV1()
+createVfModuleVolumeInfraV1.executeMethod('buildWorkflowException', execution, 2500, "Service instance id not found in AAI: $CVMVINFRAV1_serviceInstanceId.", isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ScriptTask_buildServiceInstanceNotFoundError" targetRef="EndEvent_serviceInstanceNotFound"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleVolumeInfraV1">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_67" bpmnElement="StartEvent_createVfModuleVolumeInfraV1">\r
+        <dc:Bounds height="36.0" width="36.0" x="144.0" y="156.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="162.0" y="197.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_67" targetElement="_BPMNShape_ScriptTask_300">\r
+        <di:waypoint xsi:type="dc:Point" x="180.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="252.0" y="174.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="219.0" y="174.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="ScriptTask_preProcessRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="252.0" y="134.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="ScriptTask_sendSyncAckResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="408.0" y="134.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_249" bpmnElement="ExclusiveGateway_isVolGrpnamePresent" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="589.0" y="148.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="186.0" x="521.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="ScriptTask_buildError">\r
+        <dc:Bounds height="80.0" width="100.0" x="565.0" y="264.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_36" bpmnElement="CallActivity_doCreateVfModuleVolumeV1">\r
+        <dc:Bounds height="80.0" width="100.0" x="996.0" y="134.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_volGrpNamePresent" sourceElement="_BPMNShape_ExclusiveGateway_249" targetElement="_BPMNShape_CallActivity_51">\r
+        <di:waypoint xsi:type="dc:Point" x="639.0" y="173.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="685.0" y="173.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="685.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="720.0" y="174.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="680.0" y="173.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_249">\r
+        <di:waypoint xsi:type="dc:Point" x="508.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="589.0" y="173.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="547.0" y="173.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_300" targetElement="_BPMNShape_ScriptTask_301">\r
+        <di:waypoint xsi:type="dc:Point" x="352.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="408.0" y="174.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="371.0" y="174.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_volGrpNameMissing" sourceElement="_BPMNShape_ExclusiveGateway_249" targetElement="_BPMNShape_ScriptTask_302">\r
+        <di:waypoint xsi:type="dc:Point" x="614.0" y="198.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="615.0" y="264.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="612.0" y="234.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_233" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="598.0" y="389.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="616.0" y="430.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_302" targetElement="_BPMNShape_EndEvent_233">\r
+        <di:waypoint xsi:type="dc:Point" x="615.0" y="344.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="616.0" y="389.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="613.0" y="370.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="1898.0" y="156.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1916.0" y="197.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_exceptionHandler" isExpanded="true">\r
+        <dc:Bounds height="337.0" width="856.0" x="133.0" y="471.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_catchErrors">\r
+        <dc:Bounds height="36.0" width="36.0" x="204.0" y="555.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="109.0" x="168.0" y="596.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="876.0" y="555.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="924.0" y="562.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_304" bpmnElement="ScriptTask_prepareDbInfraRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="1160.0" y="134.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_103" bpmnElement="ServiceTask_callDbInfraUpdate">\r
+        <dc:Bounds height="80.0" width="100.0" x="1298.0" y="135.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="ScriptTask_postCompletionRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="1442.0" y="136.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_37" bpmnElement="CallActivity_completeMsoProcess">\r
+        <dc:Bounds height="80.0" width="100.0" x="1598.0" y="135.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_36" targetElement="_BPMNShape_ScriptTask_304">\r
+        <di:waypoint xsi:type="dc:Point" x="1096.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1160.0" y="174.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1115.0" y="174.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_304" targetElement="_BPMNShape_ServiceTask_103">\r
+        <di:waypoint xsi:type="dc:Point" x="1260.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1298.0" y="175.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1374.0" y="175.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ScriptTask_305">\r
+        <di:waypoint xsi:type="dc:Point" x="1398.0" y="175.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1442.0" y="176.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1417.0" y="176.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_305" targetElement="_BPMNShape_CallActivity_37">\r
+        <di:waypoint xsi:type="dc:Point" x="1542.0" y="176.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1598.0" y="175.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1653.0" y="176.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="ScriptTask_setSuccessIndicator">\r
+        <dc:Bounds height="80.0" width="100.0" x="1742.0" y="134.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_37" targetElement="_BPMNShape_ScriptTask_306">\r
+        <di:waypoint xsi:type="dc:Point" x="1698.0" y="175.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1742.0" y="174.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1767.0" y="174.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_306" targetElement="_BPMNShape_EndEvent_234">\r
+        <di:waypoint xsi:type="dc:Point" x="1842.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1866.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1866.0" y="175.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1898.0" y="174.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1963.0" y="175.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ExclusiveGateway_251">\r
+        <di:waypoint xsi:type="dc:Point" x="240.0" y="573.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="286.0" y="573.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="286.0" y="572.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="348.0" y="572.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="286.0" y="572.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_307" bpmnElement="ScriptTask_prefalloutHandlerRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="576.0" y="533.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_50" bpmnElement="CallActivity_callFalloutHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="720.0" y="533.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_307" targetElement="_BPMNShape_CallActivity_50">\r
+        <di:waypoint xsi:type="dc:Point" x="676.0" y="573.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="720.0" y="573.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="694.0" y="573.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_50" targetElement="_BPMNShape_EndEvent_235">\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="573.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="876.0" y="573.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="842.0" y="573.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_251" bpmnElement="ExclusiveGateway_isSyncResponseSent" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="348.0" y="547.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="129.0" x="309.0" y="602.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_syncResponseSent" sourceElement="_BPMNShape_ExclusiveGateway_251" targetElement="_BPMNShape_ScriptTask_307">\r
+        <di:waypoint xsi:type="dc:Point" x="398.0" y="572.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="572.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="573.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="576.0" y="573.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="450.0" y="572.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="ScriptTask_sendSyncErrorResp">\r
+        <dc:Bounds height="80.0" width="100.0" x="324.0" y="672.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_syncResponseNotSent" sourceElement="_BPMNShape_ExclusiveGateway_251" targetElement="_BPMNShape_ScriptTask_308">\r
+        <di:waypoint xsi:type="dc:Point" x="373.0" y="597.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="373.0" y="634.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="374.0" y="634.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="374.0" y="672.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="363.0" y="634.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_ScriptTask_307">\r
+        <di:waypoint xsi:type="dc:Point" x="424.0" y="712.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="608.0" y="712.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="626.0" y="712.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="626.0" y="613.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="530.0" y="712.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_51" bpmnElement="CallActivity_callGenericGetSI">\r
+        <dc:Bounds height="80.0" width="100.0" x="720.0" y="134.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="887.0" y="148.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="912.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_51" targetElement="_BPMNShape_ExclusiveGateway_254">\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="853.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="853.0" y="173.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="887.0" y="173.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_serviceInstanceFound" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_CallActivity_36">\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="173.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="966.0" y="173.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="966.0" y="174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="996.0" y="174.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_serviceInstanceNotFound">\r
+        <dc:Bounds height="36.0" width="36.0" x="895.0" y="389.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="913.0" y="430.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_serviceInstanceNotFound" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ScriptTask_312">\r
+        <di:waypoint xsi:type="dc:Point" x="912.0" y="198.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="912.0" y="264.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="919.0" y="226.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="ScriptTask_buildServiceInstanceNotFoundError">\r
+        <dc:Bounds height="80.0" width="100.0" x="862.0" y="264.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_312" targetElement="_BPMNShape_EndEvent_237">\r
+        <di:waypoint xsi:type="dc:Point" x="912.0" y="344.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="913.0" y="389.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="910.0" y="370.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVnfInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/CreateVnfInfra.bpmn
new file mode 100644 (file)
index 0000000..79d39ca
--- /dev/null
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_DkzPAHB4EeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="CreateVnfInfra" name="CreateVnfInfra" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1" camunda:asyncAfter="true">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization"/>\r
+    <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="sendResponse"/>\r
+    <bpmn2:scriptTask id="sendResponse" name="Send Sync Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.sendSyncResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendResponse" targetRef="callGetService"/>\r
+    <bpmn2:scriptTask id="buildWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>notFound</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="buildWorkflowException" targetRef="EndEvent_1"/>\r
+    <bpmn2:callActivity id="callGetService" name="Get&#xD;&#xA;Service&#xD;&#xA;Instance" calledElement="GenericGetService">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CREVI_serviceInstanceId" target="GENGS_serviceInstanceId"/>\r
+        <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator"/>\r
+        <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator"/>\r
+        <camunda:out source="GENGS_serviceInstance" target="CRTVI_serviceInstance"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="GENGS_type" target="GENGS_type"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="callGetService" targetRef="serviceInstanceFound"/>\r
+    <bpmn2:exclusiveGateway id="serviceInstanceFound" name="Service Instance Found?" default="notFound">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>notFound</bpmn2:outgoing>\r
+      <bpmn2:outgoing>found</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceInstanceFound" targetRef="buildWorkflowException"/>\r
+    <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="serviceInstanceFound" targetRef="callGetVnf">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true && execution.getVariable("GENGS_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:exclusiveGateway id="vnfExist" name="Vnf Already Exist?" default="vnfExistYes">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>vnfExistYes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>vnfExistNo</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="vnfExistYes" name="Yes" sourceRef="vnfExist" targetRef="vnfExistWorkflowException"/>\r
+    <bpmn2:sequenceFlow id="vnfExistNo" name="No" sourceRef="vnfExist" targetRef="prepareCreateGenericVnf">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_FoundIndicator" ) == false && execution.getVariable("GENGV_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:callActivity id="callGetVnf" name="Get&#xD;&#xA;Generic Vnf" calledElement="GenericGetVnf">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CREVI_vnfName" target="GENGV_vnfName"/>\r
+        <camunda:in source="CREVI_type" target="GENGV_type"/>\r
+        <camunda:out source="GENGV_vnf" target="CRTVI_genericVnf"/>\r
+        <camunda:out source="GENGV_FoundIndicator" target="GENGV_FoundIndicator"/>\r
+        <camunda:out source="GENGV_SuccessIndicator" target="GENGV_SuccessIndicator"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>found</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="callGetVnf" targetRef="vnfExist"/>\r
+    <bpmn2:scriptTask id="vnfExistWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>vnfExistYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 5000, "Generic Vnf Already Exist.")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="vnfExistWorkflowException" targetRef="EndEvent_2"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="prepareCreateGenericVnf" name="Prepare&#xD;&#xA;Create Vnf Payload" scriptFormat="groovy">\r
+      <bpmn2:incoming>vnfExistNo</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.prepareCreateGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareCreateGenericVnf" targetRef="callPutVnf"/>\r
+    <bpmn2:callActivity id="callPutVnf" name="Create (Put)&#xD;&#xA;Generic Vnf" calledElement="GenericPutVnf">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CREVI_genericVnfPayload" target="GENPV_vnfPayload"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="CREVI_vnfId" target="GENPV_vnfId"/>\r
+        <camunda:out source="GENPV_SuccessIndicator" target="GENPV_SuccessIndicator"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="CREVI_type" target="GENPV_type"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callPutVnf" targetRef="postProcess"/>\r
+    <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="processJavaError" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="processJavaError" targetRef="EndEvent_4"/>\r
+      <bpmn2:endEvent id="EndEvent_4">\r
+        <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="StartEvent_2" targetRef="processJavaError"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:subProcess id="bpmnErrorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:callActivity id="callFalloutHandler" name="Call&#xD;&#xA;FalloutHandler" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in source="CREVI_falloutRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="CREVI_requestId" target="requestId"/>\r
+          <camunda:in source="CREVI_serviceInstanceId" target="serviceInstanceId"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="callFalloutHandler" targetRef="EndEvent_5"/>\r
+      <bpmn2:scriptTask id="processError" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.prepareFalloutRequest(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="processError" targetRef="callFalloutHandler"/>\r
+      <bpmn2:endEvent id="EndEvent_5">\r
+        <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_34"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:scriptTask id="sendErrorResponse" name="Send Error Response" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.sendErrorResponse(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="sendErrorResponse" targetRef="processError"/>\r
+      <bpmn2:startEvent id="StartEvent_3">\r
+        <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_4"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="StartEvent_3" targetRef="sendErrorResponse"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="postProcess" name="Prepare Completion Handler" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+CreateVnfInfra createVnf = new CreateVnfInfra()
+createVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="postProcess" targetRef="callCompletionHandler"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_35"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:callActivity id="callCompletionHandler" name="Completion&#xD;&#xA;Handler" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CREVI_completionHandlerRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="CREVI_requestId" target="att-mso-request-id"/>\r
+        <camunda:in source="CREVI_serviceInstanceId" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompletionHandler" targetRef="EndEvent_3"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="Java Lang Exception"/>\r
+  <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVnfInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_68" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="96.0" y="222.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="114.0" y="263.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">\r
+        <dc:Bounds height="80.0" width="100.0" x="216.0" y="200.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ScriptTask_285">\r
+        <di:waypoint xsi:type="dc:Point" x="132.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="216.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="165.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="sendResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="360.0" y="200.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ScriptTask_286">\r
+        <di:waypoint xsi:type="dc:Point" x="316.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="360.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="347.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="callGetService">\r
+        <dc:Bounds height="80.0" width="100.0" x="504.0" y="200.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_286" targetElement="_BPMNShape_CallActivity_59">\r
+        <di:waypoint xsi:type="dc:Point" x="460.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="504.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="485.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="serviceInstanceFound" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="642.0" y="214.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="148.0" x="678.0" y="244.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229">\r
+        <di:waypoint xsi:type="dc:Point" x="604.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="626.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="626.0" y="239.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="642.0" y="239.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="617.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">\r
+        <dc:Bounds height="80.0" width="100.0" x="720.0" y="115.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293">\r
+        <di:waypoint xsi:type="dc:Point" x="667.0" y="214.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="667.0" y="155.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="720.0" y="155.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="666.0" y="174.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="876.0" y="137.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="894.0" y="178.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_EndEvent_225">\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="155.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="876.0" y="155.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="846.0" y="155.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_CallActivity_60">\r
+        <di:waypoint xsi:type="dc:Point" x="667.0" y="264.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="667.0" y="328.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="720.0" y="328.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="666.0" y="282.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="callGetVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="720.0" y="288.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_232" bpmnElement="vnfExist" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="854.0" y="302.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="114.0" x="890.0" y="332.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_CallActivity_60" targetElement="_BPMNShape_ExclusiveGateway_232">\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="328.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="854.0" y="327.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="804.0" y="330.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="vnfExistWorkflowException">\r
+        <dc:Bounds height="80.0" width="100.0" x="926.0" y="367.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="prepareCreateGenericVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="935.0" y="200.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="vnfExistYes" sourceElement="_BPMNShape_ExclusiveGateway_232" targetElement="_BPMNShape_ScriptTask_299">\r
+        <di:waypoint xsi:type="dc:Point" x="879.0" y="352.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="879.0" y="407.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="926.0" y="407.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="880.0" y="367.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="vnfExistNo" sourceElement="_BPMNShape_ExclusiveGateway_232" targetElement="_BPMNShape_ScriptTask_300">\r
+        <di:waypoint xsi:type="dc:Point" x="879.0" y="302.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="879.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="935.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="880.0" y="254.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_227" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1092.0" y="389.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1110.0" y="430.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_299" targetElement="_BPMNShape_EndEvent_227">\r
+        <di:waypoint xsi:type="dc:Point" x="1026.0" y="407.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1092.0" y="407.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1034.0" y="407.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="1608.0" y="222.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1626.0" y="263.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300" targetElement="_BPMNShape_CallActivity_61">\r
+        <di:waypoint xsi:type="dc:Point" x="1035.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1080.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1073.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_61" bpmnElement="callPutVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="1080.0" y="200.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_61" targetElement="_BPMNShape_ScriptTask_325">\r
+        <di:waypoint xsi:type="dc:Point" x="1180.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1236.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1223.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_32" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="169.0" width="313.0" x="253.0" y="696.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_76" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="277.0" y="763.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="295.0" y="804.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_308" bpmnElement="processJavaError">\r
+        <dc:Bounds height="80.0" width="100.0" x="360.0" y="741.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_234" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="505.0" y="763.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="523.0" y="804.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_StartEvent_76" targetElement="_BPMNShape_ScriptTask_308">\r
+        <di:waypoint xsi:type="dc:Point" x="313.0" y="781.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="360.0" y="781.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="331.0" y="781.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_308" targetElement="_BPMNShape_EndEvent_234">\r
+        <di:waypoint xsi:type="dc:Point" x="460.0" y="781.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="505.0" y="781.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="477.0" y="781.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_33" bpmnElement="bpmnErrorHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="232.0" width="601.0" x="109.0" y="433.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_77" bpmnElement="StartEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="133.0" y="532.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="151.0" y="573.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_235" bpmnElement="EndEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="649.0" y="532.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="667.0" y="573.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_62" bpmnElement="callFalloutHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="493.0" y="510.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_309" bpmnElement="processError">\r
+        <dc:Bounds height="80.0" width="100.0" x="361.0" y="510.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_77" targetElement="_BPMNShape_ScriptTask_312">\r
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="550.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="229.0" y="550.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="172.0" y="550.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_309" targetElement="_BPMNShape_CallActivity_62">\r
+        <di:waypoint xsi:type="dc:Point" x="461.0" y="550.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="550.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="486.0" y="550.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_62" targetElement="_BPMNShape_EndEvent_235">\r
+        <di:waypoint xsi:type="dc:Point" x="593.0" y="550.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="649.0" y="550.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="618.0" y="550.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_312" bpmnElement="sendErrorResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="229.0" y="510.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_312" targetElement="_BPMNShape_ScriptTask_309">\r
+        <di:waypoint xsi:type="dc:Point" x="329.0" y="550.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="550.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="342.0" y="550.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_325" bpmnElement="postProcess">\r
+        <dc:Bounds height="80.0" width="100.0" x="1236.0" y="200.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_325" targetElement="_BPMNShape_CallActivity_69">\r
+        <di:waypoint xsi:type="dc:Point" x="1336.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1380.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1347.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_69" bpmnElement="callCompletionHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="1380.0" y="200.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_69" targetElement="_BPMNShape_EndEvent_228">\r
+        <di:waypoint xsi:type="dc:Point" x="1480.0" y="240.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1608.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1541.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteNetworkInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteNetworkInstanceInfra.bpmn
new file mode 100644 (file)
index 0000000..fc6d7f5
--- /dev/null
@@ -0,0 +1,1007 @@
+<?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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">
+  <bpmn2:process id="DeleteNetworkInstanceInfra" name="DeleteNetworkInstanceInfra" isExecutable="true">
+    <bpmn2:startEvent id="deleteNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+    </bpmn2:startEvent>
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="deleteNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>
+    <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query In AAI" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def callRESTDeleteAAI = new DeleteNetworkInstanceInfra()
+callRESTDeleteAAI.callRESTQueryAAI(execution)]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="isRelationshipExists_ExclusiveGateway"/>
+    <bpmn2:callActivity id="callDeleteSDNCAdapter_CallActivity" name="Call SDNC Delete Adapter V1 Sub-process" calledElement="sdncAdapter">
+      <bpmn2:extensionElements>
+        <camunda:in source="DELNWKI_deleteSDNCRequest" target="sdncAdapterWorkflowRequest"/>
+        <camunda:out source="sdncAdapterResponse" target="DELNWKI_deleteSDNCResponse"/>
+        <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_sdncReturnCode"/>
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
+        <camunda:out source="WorkflowException" target="WorkflowException"/>
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
+    </bpmn2:callActivity>
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callDeleteSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask"/>
+    <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" name="Compesation" attachedToRef="callDeleteSDNCAdapter_CallActivity">
+      <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
+    </bpmn2:boundaryEvent>
+    <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">
+      <bpmn2:incoming>sdncTopoDeleteYes_SequenceFlow</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def prepareDBRequest = new DeleteNetworkInstanceInfra()
+prepareDBRequest.prepareDBRequest(execution)
+
+]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def validateSDNCResponse = new DeleteNetworkInstanceInfra()
+validateSDNCResponse.validateSDNCResponse(execution)
+]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoDeleteOk_ExclusiveGateway"/>
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="validateSDNCResponse_ScriptTask">
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_87" errorRef="Error_3"/>
+    </bpmn2:boundaryEvent>
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="BoundaryEvent_1" targetRef="sndcError_EndEvent"/>
+    <bpmn2:exclusiveGateway id="isSdncTopoDeleteOk_ExclusiveGateway" name="Is SDNC Delete Ok?" default="sdncTopoDeleteNo_SequenceFlow">
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
+      <bpmn2:outgoing>sdncTopoDeleteNo_SequenceFlow</bpmn2:outgoing>
+      <bpmn2:outgoing>sdncTopoDeleteYes_SequenceFlow</bpmn2:outgoing>
+    </bpmn2:exclusiveGateway>
+    <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+      <bpmn2:incoming>sdncTopoDeleteNo_SequenceFlow</bpmn2:incoming>
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_3"/>
+    </bpmn2:endEvent>
+    <bpmn2:sequenceFlow id="sdncTopoDeleteNo_SequenceFlow" name="No" sourceRef="isSdncTopoDeleteOk_ExclusiveGateway" targetRef="sndcError_EndEvent"/>
+    <bpmn2:sequenceFlow id="sdncTopoDeleteYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoDeleteOk_ExclusiveGateway" targetRef="prepareDBInfraRequest_ScriptTask">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_sdncResponseSuccess" ) == true}
+]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>
+    <bpmn2:callActivity id="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter">
+      <bpmn2:extensionElements>
+        <camunda:in source="DELNWKI_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest"/>
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
+        <camunda:out source="SDNCA_ResponseCode" target="DELNWKI_rollbackSDNCReturnCode"/>
+        <camunda:out source="sdncAdapterResponse" target="DELNWKI_rollbackSDNCResponse"/>
+        <camunda:out source="WorkflowException" target="WorkflowException"/>
+      </bpmn2:extensionElements>
+    </bpmn2:callActivity>
+    <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">
+      <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
+        <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
+      </bpmn2:startEvent>
+      <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="isRollbackON_ExclusiveGateway"/>
+      <bpmn2:exclusiveGateway id="isRollbackON_ExclusiveGateway" name="Is Rollback ON?" default="isRollbackOnNo_SequenceFlow">
+        <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
+        <bpmn2:outgoing>isRollbackOnNo_SequenceFlow</bpmn2:outgoing>
+        <bpmn2:outgoing>isRollbackOnYes_SequenceFlow</bpmn2:outgoing>
+      </bpmn2:exclusiveGateway>
+      <bpmn2:sequenceFlow id="isRollbackOnNo_SequenceFlow" name="No" sourceRef="isRollbackON_ExclusiveGateway" targetRef="InclusiveGateway_1"/>
+      <bpmn2:sequenceFlow id="isRollbackOnYes_SequenceFlow" name="Yes" sourceRef="isRollbackON_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("URN_mso_rollback") == true}
+
+]]></bpmn2:conditionExpression>
+      </bpmn2:sequenceFlow>
+      <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="is PONR?" default="isPONR_No_SequenceFlow">
+        <bpmn2:incoming>isRollbackOnYes_SequenceFlow</bpmn2:incoming>
+        <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>
+        <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing>
+      </bpmn2:exclusiveGateway>
+      <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isSdncOk_ExclusiveGateway"/>
+      <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="InclusiveGateway_2">
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isPONR") == true}]]></bpmn2:conditionExpression>
+      </bpmn2:sequenceFlow>
+      <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">
+        <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
+        <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def buildErrorResponse = new DeleteNetworkInstanceInfra()
+buildErrorResponse.buildErrorResponse(execution)
+]]></bpmn2:script>
+      </bpmn2:scriptTask>
+      <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/>
+      <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">
+        <bpmn2:extensionElements>
+          <camunda:in variables="all"/>
+          <camunda:out variables="all"/>
+          <camunda:in source="DELNWKI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
+          <camunda:in source="att-mso-service-instance-id" target="att-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_25</bpmn2:incoming>
+        <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>
+      </bpmn2:callActivity>
+      <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_2"/>
+      <bpmn2:endEvent id="EndEvent_2">
+        <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
+      </bpmn2:endEvent>
+      <bpmn2:exclusiveGateway id="isSdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="isSdncOk_No_SequenceFlow">
+        <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
+        <bpmn2:outgoing>isSdncOk_Yes_SequenceFlow</bpmn2:outgoing>
+        <bpmn2:outgoing>isSdncOk_No_SequenceFlow</bpmn2:outgoing>
+      </bpmn2:exclusiveGateway>
+      <bpmn2:sequenceFlow id="isSdncOk_Yes_SequenceFlow" name="Yes" sourceRef="isSdncOk_ExclusiveGateway" targetRef="sdncTopoRollback_IntermediateThrowEvent">
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+      </bpmn2:sequenceFlow>
+      <bpmn2:sequenceFlow id="isSdncOk_No_SequenceFlow" name="No" sourceRef="isSdncOk_ExclusiveGateway" targetRef="InclusiveGateway_2"/>
+      <bpmn2:serviceTask id="dbUpdateError_ServiceTask" name="Call DB Update Error">
+        <bpmn2:extensionElements>
+          <camunda:connector>
+            <camunda:connectorId>http-connector</camunda:connectorId>
+            <camunda:inputOutput>
+              <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+              <camunda:inputParameter name="payload">${DELNWKI_deleteDBRequest}</camunda:inputParameter>
+              <camunda:inputParameter name="headers">
+                <camunda:map>
+                  <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                </camunda:map>
+              </camunda:inputParameter>
+              <camunda:inputParameter name="method">POST</camunda:inputParameter>
+              <camunda:outputParameter name="DELNWKI_deleteDBResponse">${response}</camunda:outputParameter>
+              <camunda:outputParameter name="DELNWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
+            </camunda:inputOutput>
+          </camunda:connector>
+        </bpmn2:extensionElements>
+        <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
+        <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
+      </bpmn2:serviceTask>
+      <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="dbUpdateError_ServiceTask" targetRef="prepareFalloutHandler_ScriptTask"/>
+      <bpmn2:scriptTask id="prepareDBUpdateErrorRequest_ScriptTask" name="Prepare DB Update Error Request" scriptFormat="groovy">
+        <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
+        <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def prepareDBRequest = new DeleteNetworkInstanceInfra()
+prepareDBRequest.prepareDBRequestError(execution)]]></bpmn2:script>
+      </bpmn2:scriptTask>
+      <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="prepareDBUpdateErrorRequest_ScriptTask" targetRef="dbUpdateError_ServiceTask"/>
+      <bpmn2:inclusiveGateway id="InclusiveGateway_1">
+        <bpmn2:incoming>isRollbackOnNo_SequenceFlow</bpmn2:incoming>
+        <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
+        <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
+      </bpmn2:inclusiveGateway>
+      <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="InclusiveGateway_1" targetRef="prepareDBUpdateErrorRequest_ScriptTask"/>
+      <bpmn2:inclusiveGateway id="InclusiveGateway_2">
+        <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>
+        <bpmn2:incoming>isSdncOk_No_SequenceFlow</bpmn2:incoming>
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
+        <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
+      </bpmn2:inclusiveGateway>
+      <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InclusiveGateway_2" targetRef="InclusiveGateway_1"/>
+      <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback">
+        <bpmn2:incoming>isSdncOk_Yes_SequenceFlow</bpmn2:incoming>
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
+        <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/>
+      </bpmn2:intermediateThrowEvent>
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="InclusiveGateway_2"/>
+    </bpmn2:subProcess>
+    <bpmn2:exclusiveGateway id="isAAIQueryOk_ExclusiveGateway_2" name="Is AAI Query Ok?" default="querySuccessNo_SequenceFlow">
+      <bpmn2:incoming>isRelationshipExistNo_SequenceFlow</bpmn2:incoming>
+      <bpmn2:outgoing>querySuccessYes_SequenceFlow</bpmn2:outgoing>
+      <bpmn2:outgoing>querySuccessNo_SequenceFlow</bpmn2:outgoing>
+    </bpmn2:exclusiveGateway>
+    <bpmn2:sequenceFlow id="querySuccessYes_SequenceFlow" name="Yes" sourceRef="isAAIQueryOk_ExclusiveGateway_2" targetRef="isResponseEmpty_ExclusiveGateway_2">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isAAIGood") == true}
+
+]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
+    <bpmn2:sequenceFlow id="querySuccessNo_SequenceFlow" name="No" sourceRef="isAAIQueryOk_ExclusiveGateway_2" targetRef="isReturnCode404_ExclusiveGateway"/>
+    <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Return Code 404?" default="isReturnCode404_No_SequenceFlow">
+      <bpmn2:incoming>querySuccessNo_SequenceFlow</bpmn2:incoming>
+      <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>
+      <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>
+    </bpmn2:exclusiveGateway>
+    <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="No" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="aai_Error_EndEvent"/>
+    <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="silentSucces_InclusiveGateway">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_aaiReturnCode" ) == "404"}
+
+]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
+    <bpmn2:endEvent id="aai_Error_EndEvent" name="AAI Error">
+      <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_3"/>
+    </bpmn2:endEvent>
+    <bpmn2:exclusiveGateway id="isResponseEmpty_ExclusiveGateway_2" name="Is Resp Empty?" default="isResponseEmptyNo_SequenceFlow">
+      <bpmn2:incoming>querySuccessYes_SequenceFlow</bpmn2:incoming>
+      <bpmn2:outgoing>isResponseEmptyNo_SequenceFlow</bpmn2:outgoing>
+      <bpmn2:outgoing>isResponseEmptyYes_SequenceFlow</bpmn2:outgoing>
+    </bpmn2:exclusiveGateway>
+    <bpmn2:sequenceFlow id="isResponseEmptyNo_SequenceFlow" name="No" sourceRef="isResponseEmpty_ExclusiveGateway_2" targetRef="callRESTQueryCloudRegion_ScriptTask"/>
+    <bpmn2:sequenceFlow id="isResponseEmptyYes_SequenceFlow" name="Yes" sourceRef="isResponseEmpty_ExclusiveGateway_2" targetRef="silentSucces_InclusiveGateway">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isSilentSuccess") == true}
+]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
+    <bpmn2:inclusiveGateway id="silentSucces_InclusiveGateway" name="Joint">
+      <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>
+      <bpmn2:incoming>isResponseEmptyYes_SequenceFlow</bpmn2:incoming>
+      <bpmn2:outgoing>silentSuccess_SequenceFlow</bpmn2:outgoing>
+    </bpmn2:inclusiveGateway>
+    <bpmn2:sequenceFlow id="silentSuccess_SequenceFlow" name="Silent Success" sourceRef="silentSucces_InclusiveGateway" targetRef="prepareDBInfraRequestSilentSucces_ScriptTask"/>
+    <bpmn2:scriptTask id="prepareDBInfraRequestSilentSucces_ScriptTask" name="Prepare DB Infra Request Silent Success" scriptFormat="groovy">
+      <bpmn2:incoming>silentSuccess_SequenceFlow</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def prepareDBRequest = new DeleteNetworkInstanceInfra()
+prepareDBRequest.prepareDBRequest(execution)]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="prepareDBInfraRequestSilentSucces_ScriptTask" targetRef="silentSuccessCallDB_ServiceTask"/>
+    <bpmn2:serviceTask id="silentSuccessCallDB_ServiceTask" name="Call DB Infra Update">
+      <bpmn2:extensionElements>
+        <camunda:connector>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="payload">${DELNWKI_deleteDBRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="DELNWKI_deleteDBResponse">${response}</camunda:outputParameter>
+            <camunda:outputParameter name="DELNWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
+          </camunda:inputOutput>
+        </camunda:connector>
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>
+    </bpmn2:serviceTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_40" name="" sourceRef="silentSuccessCallDB_ServiceTask" targetRef="prepareSilentCompletion_ScriptTask"/>
+    <bpmn2:scriptTask id="prepareSilentCompletion_ScriptTask" name="Prepare Silent Completion Request" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_41</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def postProcessResponse = new DeleteNetworkInstanceInfra()
+postProcessResponse.postProcessResponse(execution)]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="prepareSilentCompletion_ScriptTask" targetRef="silentAccess_CallActivity"/>
+    <bpmn2:callActivity id="silentAccess_CallActivity" name="Call CompleteMsoProcess (Silent Success)" calledElement="CompleteMsoProcess">
+      <bpmn2:extensionElements>
+        <camunda:in source="DELNWKI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
+        <camunda:in variables="all"/>
+        <camunda:out variables="all"/>
+        <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_41</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
+    </bpmn2:callActivity>
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="silentAccess_CallActivity" targetRef="EndEvent_1"/>
+    <bpmn2:endEvent id="EndEvent_1">
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
+    </bpmn2:endEvent>
+    <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">
+      <bpmn2:incoming>isResponseEmptyNo_SequenceFlow</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteNetworkInstanceInfra = new DeleteNetworkInstanceInfra()
+DeleteNetworkInstanceInfra.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask"/>
+    <bpmn2:exclusiveGateway id="isRelationshipExists_ExclusiveGateway" name="Is Relationship Exists?" default="isRelationshipExistNo_SequenceFlow">
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
+      <bpmn2:outgoing>isRelationshipExistNo_SequenceFlow</bpmn2:outgoing>
+      <bpmn2:outgoing>isRelationshipExistYes_SequenceFlow</bpmn2:outgoing>
+    </bpmn2:exclusiveGateway>
+    <bpmn2:sequenceFlow id="isRelationshipExistNo_SequenceFlow" name="No" sourceRef="isRelationshipExists_ExclusiveGateway" targetRef="isAAIQueryOk_ExclusiveGateway_2"/>
+    <bpmn2:sequenceFlow id="isRelationshipExistYes_SequenceFlow" name="Yes" sourceRef="isRelationshipExists_ExclusiveGateway" targetRef="relationshipError_EndEvent">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELNWKI_isVfRelationshipExist") == true}]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
+    <bpmn2:endEvent id="relationshipError_EndEvent" name="Relationship Error">
+      <bpmn2:incoming>isRelationshipExistYes_SequenceFlow</bpmn2:incoming>
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89" errorRef="Error_3"/>
+    </bpmn2:endEvent>
+    <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">
+      <bpmn2:extensionElements>
+        <camunda:connector>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="payload">${DELNWKI_deleteDBRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="DELNWKI_deleteDBResponse">${response}</camunda:outputParameter>
+            <camunda:outputParameter name="DELNWKI_dbReturnCode">${statusCode}</camunda:outputParameter>
+          </camunda:inputOutput>
+        </camunda:connector>
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
+    </bpmn2:serviceTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask"/>
+    <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &amp; Completion Request" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def postProcessResponse = new DeleteNetworkInstanceInfra()
+postProcessResponse.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="DELNWKI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>
+        <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_35</bpmn2:outgoing>
+    </bpmn2:callActivity>
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>
+    <bpmn2:endEvent id="EndEvent_3">
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
+    </bpmn2:endEvent>
+    <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def prepareSDNCRequest = new DeleteNetworkInstanceInfra()
+prepareSDNCRequest.prepareSDNCRequest(execution)
+]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callDeleteSDNCAdapter_CallActivity"/>
+    <bpmn2:scriptTask id="validateDeletePONetwork_ScriptTask" name="Validate Delete PO Network" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def validateNetworkResponse = new DeleteNetworkInstanceInfra()
+validateNetworkResponse.validateNetworkResponse(execution)]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="validateDeletePONetwork_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask"/>
+    <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Network Request" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def prepareNetworkRequest = new DeleteNetworkInstanceInfra()
+prepareNetworkRequest.prepareNetworkRequest(execution)
+]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="sendRequestToNewworkAdapater_ScriptTask"/>
+    <bpmn2:scriptTask id="sendRequestToNewworkAdapater_ScriptTask" name="Send Request to Network Adapter" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def prepareNetworkRequest = new DeleteNetworkInstanceInfra()
+prepareNetworkRequest.sendRequestToVnfAdapter(execution)]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="sendRequestToNewworkAdapater_ScriptTask" targetRef="validateDeletePONetwork_ScriptTask"/>
+    <bpmn2:subProcess id="SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+      <bpmn2:startEvent id="StartEvent_1">
+        <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_91" errorRef="Error_1"/>
+      </bpmn2:startEvent>
+      <bpmn2:endEvent id="EndEvent_4">
+        <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
+      </bpmn2:endEvent>
+      <bpmn2:scriptTask id="unexpectedError_DeleteNetworkInfra_ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
+        <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
+        <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def CreateNetworkV2 = new DeleteNetworkInstanceInfra()
+DeleteNetworkInstanceInfra.processJavaException(execution)]]></bpmn2:script>
+      </bpmn2:scriptTask>
+      <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_1" targetRef="unexpectedError_DeleteNetworkInfra_ScriptTask_1"/>
+      <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="unexpectedError_DeleteNetworkInfra_ScriptTask_1" targetRef="EndEvent_4"/>
+    </bpmn2:subProcess>
+    <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 com.att.bpm.scripts.*
+def preProcessRequest = new DeleteNetworkInstanceInfra()
+preProcessRequest.preProcessRequest(execution)
+]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>
+    <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sendSyncResponse = new  DeleteNetworkInstanceInfra()
+sendSyncResponse.sendSyncResponse(execution)]]></bpmn2:script>
+    </bpmn2:scriptTask>
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callAAIQuery_scriptTask"/>
+    <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity"/>
+  </bpmn2:process>
+  <bpmn2:error id="Error_3" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>
+  <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteNetworkInstanceInfra">
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">
+        <dc:Bounds height="36.0" width="36.0" x="96.0" y="185.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="34.0" x="97.0" y="226.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="262.0" y="163.0"/>
+      </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="132.0" y="203.0"/>
+        <di:waypoint xsi:type="dc:Point" x="262.0" y="203.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="216.0" y="203.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="816.0" y="163.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_62" bpmnElement="isAAIQueryOk_ExclusiveGateway_2" isMarkerVisible="true">
+        <dc:Bounds height="50.0" width="50.0" x="984.0" y="72.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="108.0" x="956.0" y="51.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_224">
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="163.0"/>
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="122.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="862.0" y="135.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateDeletePONetwork_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="1102.0" y="550.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="querySuccessYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_65">
+        <di:waypoint xsi:type="dc:Point" x="1009.0" y="122.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1009.0" y="177.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="29.0" x="1008.0" y="120.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="querySuccessNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_64">
+        <di:waypoint xsi:type="dc:Point" x="1034.0" y="97.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1126.0" y="97.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="22.0" x="1036.0" y="97.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
+        <dc:Bounds height="50.0" width="50.0" x="1126.0" y="72.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="124.0" x="1090.0" y="51.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_EndEvent_118">
+        <di:waypoint xsi:type="dc:Point" x="1176.0" y="97.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1212.0" y="97.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1212.0" y="98.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1281.0" y="98.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="22.0" x="1176.0" y="97.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_InclusiveGateway_2">
+        <di:waypoint xsi:type="dc:Point" x="1151.0" y="122.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1151.0" y="177.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="29.0" x="1152.0" y="120.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">
+        <dc:Bounds height="80.0" width="100.0" x="696.0" y="684.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_65" bpmnElement="isResponseEmpty_ExclusiveGateway_2" isMarkerVisible="true">
+        <dc:Bounds height="50.0" width="50.0" x="984.0" y="177.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="95.0" x="1016.0" y="163.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="isResponseEmptyNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_65" targetElement="_BPMNShape_ScriptTask_250">
+        <di:waypoint xsi:type="dc:Point" x="1009.0" y="227.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1010.0" y="269.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="22.0" x="1016.0" y="227.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="isResponseEmptyYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_65" targetElement="_BPMNShape_InclusiveGateway_2">
+        <di:waypoint xsi:type="dc:Point" x="1034.0" y="202.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1126.0" y="202.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="29.0" x="1034.0" y="202.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">
+        <dc:Bounds height="36.0" width="36.0" x="1281.0" y="80.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="59.0" x="1270.0" y="121.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_66" bpmnElement="prepareNetworkRequest_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="960.0" y="417.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_66" targetElement="_BPMNShape_ScriptTask_242">
+        <di:waypoint xsi:type="dc:Point" x="1060.0" y="457.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1104.0" y="457.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1071.0" y="457.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="1102.0" y="687.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_67">
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="630.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="687.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1149.0" y="641.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">
+        <dc:Bounds height="80.0" width="100.0" x="1102.0" y="1416.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">
+        <dc:Bounds height="512.0" width="902.0" x="0.0" y="576.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">
+        <dc:Bounds height="36.0" width="36.0" x="60.0" y="945.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="67.0" x="45.0" y="987.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="396.0" y="684.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoDeleteOk_ExclusiveGateway" isMarkerVisible="true">
+        <dc:Bounds height="50.0" width="50.0" x="1272.0" y="988.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="157.0" x="1221.0" y="1047.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoDeleteNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">
+        <di:waypoint xsi:type="dc:Point" x="1322.0" y="1013.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1372.0" y="1013.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1372.0" y="1014.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1407.0" y="1014.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="22.0" x="1326.0" y="1017.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoDeleteYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_83">
+        <di:waypoint xsi:type="dc:Point" x="1272.0" y="1013.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1245.0" y="1013.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1245.0" y="1014.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1204.0" y="1014.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="29.0" x="1249.0" y="1017.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="1104.0" y="1272.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="1104.0" y="974.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">
+        <dc:Bounds height="80.0" width="100.0" x="1104.0" y="1140.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">
+        <dc:Bounds height="36.0" width="36.0" x="1407.0" y="996.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="74.0" x="1388.0" y="1037.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callDeleteSDNCAdapter_CallActivity">
+        <dc:Bounds height="80.0" width="100.0" x="1104.0" y="851.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent">
+        <dc:Bounds height="36.0" width="36.0" x="1086.0" y="890.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1101.0" y="931.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19">
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="767.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="798.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="798.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="851.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1149.0" y="786.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">
+        <di:waypoint xsi:type="dc:Point" x="1204.0" y="891.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1246.0" y="891.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1236.0" y="891.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21">
+        <di:waypoint xsi:type="dc:Point" x="1086.0" y="922.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1045.0" y="953.0"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">
+        <di:waypoint xsi:type="dc:Point" x="362.0" y="203.0"/>
+        <di:waypoint xsi:type="dc:Point" x="432.0" y="203.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="393.0" y="203.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="432.0" y="163.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_72">
+        <di:waypoint xsi:type="dc:Point" x="96.0" y="963.0"/>
+        <di:waypoint xsi:type="dc:Point" x="144.0" y="962.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="108.0" y="963.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_242" targetElement="_BPMNShape_ScriptTask_63">
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="497.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="523.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="523.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="550.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1149.0" y="528.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_2" bpmnElement="silentSucces_InclusiveGateway">
+        <dc:Bounds height="50.0" width="50.0" x="1126.0" y="177.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="33.0" x="1136.0" y="227.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="silentSuccess_SequenceFlow" sourceElement="_BPMNShape_InclusiveGateway_2" targetElement="_BPMNShape_ScriptTask_128">
+        <di:waypoint xsi:type="dc:Point" x="1176.0" y="202.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1238.0" y="202.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1238.0" y="203.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1307.0" y="203.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="94.0" x="1179.0" y="177.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_128" bpmnElement="prepareDBInfraRequestSilentSucces_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="1307.0" y="163.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_87" bpmnElement="silentSuccessCallDB_ServiceTask">
+        <dc:Bounds height="80.0" width="100.0" x="1453.0" y="163.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_128" targetElement="_BPMNShape_ServiceTask_87">
+        <di:waypoint xsi:type="dc:Point" x="1407.0" y="203.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1453.0" y="203.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1422.0" y="203.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent">
+        <dc:Bounds height="36.0" width="36.0" x="244.0" y="696.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="96.0" x="194.0" y="666.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="prepareSilentCompletion_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="1453.0" y="307.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_20" bpmnElement="silentAccess_CallActivity">
+        <dc:Bounds height="80.0" width="100.0" x="1453.0" y="428.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_55" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ServiceTask_87" targetElement="_BPMNShape_ScriptTask_130">
+        <di:waypoint xsi:type="dc:Point" x="1503.0" y="243.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1503.0" y="307.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1500.0" y="265.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_56" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_CallActivity_20">
+        <di:waypoint xsi:type="dc:Point" x="1503.0" y="387.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1503.0" y="428.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1500.0" y="417.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3">
+        <di:waypoint xsi:type="dc:Point" x="496.0" y="724.0"/>
+        <di:waypoint xsi:type="dc:Point" x="696.0" y="724.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="521.0" y="724.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="1246.0" y="851.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">
+        <di:waypoint xsi:type="dc:Point" x="1296.0" y="931.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1297.0" y="988.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1294.0" y="960.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="1054.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="1140.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1151.0" y="1076.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="1220.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="1272.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1151.0" y="1238.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="1352.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="1384.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="1384.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="1416.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1151.0" y="1377.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_72" bpmnElement="isRollbackON_ExclusiveGateway" isMarkerVisible="true">
+        <dc:Bounds height="50.0" width="50.0" x="144.0" y="937.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="100.0" x="130.0" y="987.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="isRollbackOnNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_72" targetElement="_BPMNShape_InclusiveGateway_27">
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="962.0"/>
+        <di:waypoint xsi:type="dc:Point" x="244.0" y="962.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="22.0" x="192.0" y="968.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="isRollbackOnYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_72" targetElement="_BPMNShape_ExclusiveGateway_218">
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="937.0"/>
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="890.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="29.0" x="180.0" y="917.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity">
+        <dc:Bounds height="80.0" width="100.0" x="945.0" y="951.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_242" bpmnElement="sendRequestToNewworkAdapater_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="1104.0" y="417.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_27" bpmnElement="InclusiveGateway_1">
+        <dc:Bounds height="50.0" width="50.0" x="244.0" y="937.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="0.0" width="0.0" x="269.0" y="992.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_44" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_InclusiveGateway_28">
+        <di:waypoint xsi:type="dc:Point" x="280.0" y="714.0"/>
+        <di:waypoint xsi:type="dc:Point" x="334.0" y="714.0"/>
+        <di:waypoint xsi:type="dc:Point" x="334.0" y="864.0"/>
+        <di:waypoint xsi:type="dc:Point" x="294.0" y="865.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="284.0" y="714.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_45" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_InclusiveGateway_27" targetElement="_BPMNShape_ScriptTask_243">
+        <di:waypoint xsi:type="dc:Point" x="294.0" y="962.0"/>
+        <di:waypoint xsi:type="dc:Point" x="396.0" y="963.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="309.0" y="962.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_179" bpmnElement="EndEvent_1">
+        <dc:Bounds height="36.0" width="36.0" x="1485.0" y="548.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="0.0" width="0.0" x="1503.0" y="589.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_46" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_CallActivity_20" targetElement="_BPMNShape_EndEvent_179">
+        <di:waypoint xsi:type="dc:Point" x="1503.0" y="508.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1503.0" y="548.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1500.0" y="530.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_180" bpmnElement="EndEvent_2">
+        <dc:Bounds height="36.0" width="36.0" x="828.0" y="706.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="0.0" width="0.0" x="846.0" y="747.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_49" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_180">
+        <di:waypoint xsi:type="dc:Point" x="796.0" y="724.0"/>
+        <di:waypoint xsi:type="dc:Point" x="828.0" y="724.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="816.0" y="724.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_218" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">
+        <dc:Bounds height="50.0" width="50.0" x="144.0" y="840.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="64.0" x="82.0" y="855.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_50" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_218" targetElement="_BPMNShape_ExclusiveGateway_219">
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="840.0"/>
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="804.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="22.0" x="174.0" y="820.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_51" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_218" targetElement="_BPMNShape_InclusiveGateway_28">
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="865.0"/>
+        <di:waypoint xsi:type="dc:Point" x="244.0" y="865.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="29.0" x="189.0" y="865.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_182" bpmnElement="EndEvent_3">
+        <dc:Bounds height="36.0" width="36.0" x="1135.0" y="1545.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="0.0" width="0.0" x="1153.0" y="1586.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_182">
+        <di:waypoint xsi:type="dc:Point" x="1153.0" y="1496.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1153.0" y="1514.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1153.0" y="1545.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1150.0" y="1510.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_28" bpmnElement="InclusiveGateway_2">
+        <dc:Bounds height="50.0" width="50.0" x="244.0" y="840.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="0.0" width="0.0" x="269.0" y="895.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_219" bpmnElement="isSdncOk_ExclusiveGateway" isMarkerVisible="true">
+        <dc:Bounds height="50.0" width="50.0" x="144.0" y="754.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="78.0" x="60.0" y="769.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_57" bpmnElement="isSdncOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_219" targetElement="_BPMNShape_IntermediateThrowEvent_24">
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="754.0"/>
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="714.0"/>
+        <di:waypoint xsi:type="dc:Point" x="244.0" y="714.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="29.0" x="180.0" y="741.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="isSdncOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_219" targetElement="_BPMNShape_InclusiveGateway_28">
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="779.0"/>
+        <di:waypoint xsi:type="dc:Point" x="269.0" y="779.0"/>
+        <di:waypoint xsi:type="dc:Point" x="269.0" y="840.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="22.0" x="194.0" y="784.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_59" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_InclusiveGateway_28" targetElement="_BPMNShape_InclusiveGateway_27">
+        <di:waypoint xsi:type="dc:Point" x="269.0" y="890.0"/>
+        <di:waypoint xsi:type="dc:Point" x="269.0" y="937.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="266.0" y="914.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_243" bpmnElement="prepareDBUpdateErrorRequest_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="396.0" y="923.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_98" bpmnElement="dbUpdateError_ServiceTask">
+        <dc:Bounds height="80.0" width="100.0" x="396.0" y="804.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_243" targetElement="_BPMNShape_ServiceTask_98">
+        <di:waypoint xsi:type="dc:Point" x="446.0" y="923.0"/>
+        <di:waypoint xsi:type="dc:Point" x="446.0" y="884.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="443.0" y="901.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ServiceTask_98" targetElement="_BPMNShape_ScriptTask_79">
+        <di:waypoint xsi:type="dc:Point" x="446.0" y="804.0"/>
+        <di:waypoint xsi:type="dc:Point" x="446.0" y="764.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="443.0" y="784.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_ScriptTask_62">
+        <di:waypoint xsi:type="dc:Point" x="532.0" y="203.0"/>
+        <di:waypoint xsi:type="dc:Point" x="816.0" y="203.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="540.0" y="203.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_250" bpmnElement="callRESTQueryCloudRegion_ScriptTask">
+        <dc:Bounds height="80.0" width="100.0" x="960.0" y="269.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_52" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_250" targetElement="_BPMNShape_ScriptTask_66">
+        <di:waypoint xsi:type="dc:Point" x="1010.0" y="349.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1010.0" y="417.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1007.0" y="366.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_41" bpmnElement="BoundaryEvent_1">
+        <dc:Bounds height="36.0" width="36.0" x="1328.0" y="833.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_BoundaryEvent_41" targetElement="_BPMNShape_EndEvent_124">
+        <di:waypoint xsi:type="dc:Point" x="1364.0" y="851.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1387.0" y="850.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1425.0" y="850.0"/>
+        <di:waypoint xsi:type="dc:Point" x="1425.0" y="996.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="6.0" width="6.0" x="1422.0" y="940.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="isRelationshipExists_ExclusiveGateway" isMarkerVisible="true">
+        <dc:Bounds height="50.0" width="50.0" x="840.0" y="72.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="139.0" x="797.0" y="51.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="isRelationshipExistNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_62">
+        <di:waypoint xsi:type="dc:Point" x="890.0" y="97.0"/>
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="97.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="22.0" x="890.0" y="97.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_216" bpmnElement="relationshipError_EndEvent">
+        <dc:Bounds height="36.0" width="36.0" x="730.0" y="80.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="109.0" x="701.0" y="117.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_61" bpmnElement="isRelationshipExistYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_EndEvent_216">
+        <di:waypoint xsi:type="dc:Point" x="840.0" y="97.0"/>
+        <di:waypoint xsi:type="dc:Point" x="800.0" y="97.0"/>
+        <di:waypoint xsi:type="dc:Point" x="800.0" y="98.0"/>
+        <di:waypoint xsi:type="dc:Point" x="766.0" y="98.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="22.0" width="29.0" x="816.0" y="97.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_29" bpmnElement="SubProcess_1" isExpanded="true">
+        <dc:Bounds height="175.0" width="326.0" x="0.0" y="369.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_73" bpmnElement="StartEvent_1">
+        <dc:Bounds height="36.0" width="36.0" x="36.0" y="432.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="0.0" width="0.0" x="54.0" y="473.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_222" bpmnElement="EndEvent_4">
+        <dc:Bounds height="36.0" width="36.0" x="240.0" y="432.0"/>
+        <bpmndi:BPMNLabel>
+          <dc:Bounds height="0.0" width="0.0" x="258.0" y="473.0"/>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_272" bpmnElement="unexpectedError_DeleteNetworkInfra_ScriptTask_1">
+        <dc:Bounds height="80.0" width="100.0" x="108.0" y="410.0"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_73" targetElement="_BPMNShape_ScriptTask_272">
+        <di:waypoint xsi:type="dc:Point" x="72.0" y="450.0"/>
+        <di:waypoint xsi:type="dc:Point" x="108.0" y="450.0"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_272" targetElement="_BPMNShape_EndEvent_222">
+        <di:waypoint xsi:type="dc:Point" x="208.0" y="450.0"/>
+        <di:waypoint xsi:type="dc:Point" x="240.0" y="450.0"/>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteServiceInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteServiceInstanceInfra.bpmn
new file mode 100644 (file)
index 0000000..7a5c30a
--- /dev/null
@@ -0,0 +1,554 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DeleteServiceInstanceInfra" name="DeleteServiceInstanceInfra" isExecutable="true">\r
+    <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>\r
+      <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">\r
+        <bpmn2:extensionElements>\r
+          <camunda:connector>\r
+            <camunda:connectorId>http-connector</camunda:connectorId>\r
+            <camunda:inputOutput>\r
+              <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+              <camunda:inputParameter name="payload">${DELSI_createDBInfraErrorRequest}</camunda:inputParameter>\r
+              <camunda:inputParameter name="headers">\r
+                <camunda:map>\r
+                  <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+                </camunda:map>\r
+              </camunda:inputParameter>\r
+              <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+              <camunda:outputParameter name="DELSI_errorDBInfraErrorResponse">${response}</camunda:outputParameter>\r
+              <camunda:outputParameter name="DELSI_errorDBInfraErrorErrorCode">${statusCode}</camunda:outputParameter>\r
+            </camunda:inputOutput>\r
+          </camunda:connector>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      </bpmn2:serviceTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>\r
+      <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.buildErrorResponse(execution)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="sendSyncError_ScriptTask"/>\r
+      <bpmn2:scriptTask id="sendSyncError_ScriptTask" name="Send Sync Ack Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.sendSyncError(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="sendSyncError_ScriptTask" targetRef="faultHandler_CallActivity"/>\r
+      <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in variables="all"/>\r
+          <camunda:out variables="all"/>\r
+          <camunda:in source="DELSI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="requestId" target="requestId"/>\r
+          <camunda:in source="serviceInstanceId" target="serviceInstanceId"/>\r
+          <camunda:out source="FH_ResponseCode" target="FH_ResponseCode"/>\r
+          <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse"/>\r
+          <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>\r
+      <bpmn2:endEvent id="EndEvent_4">\r
+        <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">\r
+        <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="subProcessStart_StartEvent" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${DELSI_createDBRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="DELSI_dbResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="DELSI_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &amp; Completion Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>\r
+    <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in variables="all"/>\r
+        <camunda:out variables="all"/>\r
+        <camunda:in source="DELSI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="requestId" target="requestId"/>\r
+        <camunda:in source="serviceInstanceId" target="serviceInstanceId"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.preProcessRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>\r
+    <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance"/>\r
+    <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">\r
+      <bpmn2:startEvent id="StartEvent_1">\r
+        <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:endEvent id="EndEvent_1">\r
+        <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/>\r
+      <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.processJavaException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="SI found?" default="isReturnCode404_Yes_SequenceFlow">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>\r
+      <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="YES" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="processResponse">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="prepareDBInfraRequestSilentSucces_ScriptTask" name="Prepare DB Infra Request Silent Success" scriptFormat="groovy">\r
+      <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.prepareDBRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:serviceTask id="silentSuccessCallDB_ServiceTask" name="Call DB Infra Update">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${DELSI_createDBRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="DELSI_dbResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="DELSI_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:scriptTask id="prepareSilentCompletion_ScriptTask" name="Prepare Silent Completion Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:callActivity id="silentAccess_CallActivity" name="Call CompleteMsoProcess (Silent Success)" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DELSI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="prepareDBInfraRequestSilentSucces_ScriptTask" targetRef="silentSuccessCallDB_ServiceTask"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="silentSuccessCallDB_ServiceTask" targetRef="prepareSilentCompletion_ScriptTask"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="prepareSilentCompletion_ScriptTask" targetRef="silentAccess_CallActivity"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="silentAccess_CallActivity" targetRef="EndEvent_2"/>\r
+    <bpmn2:startEvent id="createNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callGetServiceInstance" targetRef="isReturnCode404_ExclusiveGateway"/>\r
+    <bpmn2:callActivity id="callGetServiceInstance" name="Get&#xD;&#xA;Service&#xD;&#xA;Instance" calledElement="GenericGetService">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DELSI_serviceInstanceId" target="GENGS_serviceInstanceId"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator"/>\r
+        <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator"/>\r
+        <camunda:out source="GENGS_service" target="DELSI_serviceInstance"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink"/>\r
+        <camunda:in source="GENGS_type" target="GENGS_type"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()
+DeleteServiceInstanceInfra.prepareDBRequest(execution)
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>\r
+    <bpmn2:callActivity id="callDeleteSIsub_CallActivity" name="Call Delete SI subprocess" calledElement="GenericDeleteService">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DELSI_globalSubscriberId" target="GENDS_globalCustomerId"/>\r
+        <camunda:in source="serviceInstanceId" target="GENDS_serviceInstanceId"/>\r
+        <camunda:in source="serviceType" target="GENDS_serviceType"/>\r
+        <camunda:in source="GENGS_type" target="GENDS_type"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_46" name="" sourceRef="callDeleteSIsub_CallActivity" targetRef="prepareDBInfraRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="processResponse" name="Process Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def DeleteServiceInstanceInfra = new DeleteServiceInstanceInfra()\r
+DeleteServiceInstanceInfra.processGetServiceInstanceResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="processResponse" targetRef="callDeleteSIsub_CallActivity"/>\r
+    <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="NO" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="prepareDBInfraRequestSilentSucces_ScriptTask"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteServiceInstanceInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createNetwork_startEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="403.0" y="185.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="65.0" x="389.0" y="226.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="612.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">\r
+        <di:waypoint xsi:type="dc:Point" x="439.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="612.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="478.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_CallActivity_73" targetElement="_BPMNShape_ExclusiveGateway_64">\r
+        <di:waypoint xsi:type="dc:Point" x="1132.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1172.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1172.0" y="205.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1212.0" y="205.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1157.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1212.0" y="180.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="82.0" x="1197.0" y="157.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_ScriptTask_333">\r
+        <di:waypoint xsi:type="dc:Point" x="1237.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1237.0" y="283.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="33.0" x="1221.0" y="242.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="810.0" y="611.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1167.0" y="775.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">\r
+        <dc:Bounds height="301.0" width="751.0" x="346.0" y="427.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="408.0" y="633.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="67.0" x="393.0" y="674.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="678.0" y="477.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="775.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1188.0" y="614.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="614.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">\r
+        <di:waypoint xsi:type="dc:Point" x="712.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="803.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="743.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="803.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_ScriptTask_158">\r
+        <di:waypoint xsi:type="dc:Point" x="778.0" y="517.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="810.0" y="517.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="803.0" y="517.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="694.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="775.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1391.0" y="727.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">\r
+        <di:waypoint xsi:type="dc:Point" x="1344.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1306.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1306.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1267.0" y="815.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1298.0" y="815.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_CallActivity_61" targetElement="_BPMNShape_ScriptTask_83">\r
+        <di:waypoint xsi:type="dc:Point" x="1238.0" y="560.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1238.0" y="614.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1235.0" y="595.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="sendSyncError_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="810.0" y="477.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_57" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_CallActivity_3">\r
+        <di:waypoint xsi:type="dc:Point" x="860.0" y="557.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="860.0" y="611.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="857.0" y="573.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="1083.0" y="797.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1101.0" y="838.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="984.0" y="633.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1002.0" y="674.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">\r
+        <di:waypoint xsi:type="dc:Point" x="910.0" y="651.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="651.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="909.0" y="651.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">\r
+        <di:waypoint xsi:type="dc:Point" x="634.0" y="517.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="678.0" y="517.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="644.0" y="517.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="534.0" y="477.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="534.0" y="611.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">\r
+        <di:waypoint xsi:type="dc:Point" x="584.0" y="611.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="584.0" y="557.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="581.0" y="598.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_73">\r
+        <di:waypoint xsi:type="dc:Point" x="903.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1032.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="911.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_218">\r
+        <di:waypoint xsi:type="dc:Point" x="444.0" y="651.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="534.0" y="651.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="451.0" y="651.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">\r
+        <di:waypoint xsi:type="dc:Point" x="1288.0" y="654.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1344.0" y="654.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1324.0" y="654.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">\r
+        <di:waypoint xsi:type="dc:Point" x="1167.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1119.0" y="815.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1140.0" y="815.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="232.0" width="409.0" x="349.0" y="837.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="417.0" y="942.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="435.0" y="983.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="492.0" y="920.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="647.0" y="939.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="665.0" y="980.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269">\r
+        <di:waypoint xsi:type="dc:Point" x="453.0" y="960.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="492.0" y="960.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="478.0" y="960.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219">\r
+        <di:waypoint xsi:type="dc:Point" x="592.0" y="960.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="960.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="957.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="647.0" y="957.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="614.0" y="960.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="prepareDBInfraRequestSilentSucces_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1344.0" y="168.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_104" bpmnElement="silentSuccessCallDB_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1500.0" y="166.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_286" bpmnElement="prepareSilentCompletion_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1488.0" y="312.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1512.0" y="521.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1530.0" y="562.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="silentAccess_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1480.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ServiceTask_104">\r
+        <di:waypoint xsi:type="dc:Point" x="1444.0" y="208.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1472.0" y="208.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1472.0" y="206.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1500.0" y="206.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ServiceTask_104" targetElement="_BPMNShape_ScriptTask_286">\r
+        <di:waypoint xsi:type="dc:Point" x="1550.0" y="246.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1550.0" y="279.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1538.0" y="279.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1538.0" y="312.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_286" targetElement="_BPMNShape_CallActivity_60">\r
+        <di:waypoint xsi:type="dc:Point" x="1538.0" y="392.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1538.0" y="406.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1530.0" y="406.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1530.0" y="420.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_CallActivity_60" targetElement="_BPMNShape_EndEvent_220">\r
+        <di:waypoint xsi:type="dc:Point" x="1530.0" y="500.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1530.0" y="521.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_61" bpmnElement="callDeleteSIsub_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1188.0" y="480.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_73" bpmnElement="callGetServiceInstance">\r
+        <dc:Bounds height="80.0" width="100.0" x="1032.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_333" bpmnElement="processResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="1187.0" y="283.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_333" targetElement="_BPMNShape_CallActivity_61">\r
+        <di:waypoint xsi:type="dc:Point" x="1237.0" y="363.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1237.0" y="421.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1238.0" y="421.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1238.0" y="480.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_ScriptTask_285">\r
+        <di:waypoint xsi:type="dc:Point" x="1262.0" y="205.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1303.0" y="205.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1303.0" y="208.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1344.0" y="208.0"/>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleInfra.bpmn
new file mode 100644 (file)
index 0000000..d30042c
--- /dev/null
@@ -0,0 +1,324 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_F0omAMXGEeW834CKd-K10Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DeleteVfModuleInfra" name="DeleteVfModuleInfra" isExecutable="true">\r
+    <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def dvfm = new DeleteVfModuleInfra()\r
+dvfm.sendSynchResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7"/>\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Pre-Process Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def dvfm = new DeleteVfModuleInfra()\r
+dvfm.preProcessRequest(execution)\r
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_1"/>\r
+    <bpmn2:scriptTask id="ScriptTask_7" name="DoDeleteVfModule (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def dvfm = new DeleteVfModuleInfra()\r
+dvfm.prepDoDeleteVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="ScriptTask_6" name="DoDeleteVfModule" calledElement="DoDeleteVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DeleteVfModuleRequest" target="DoDeleteVfModuleRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="isVidRequest" target="isVidRequest"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_6"/>\r
+    <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DELVfModI_CompletionHandlerRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4"/>\r
+    <bpmn2:endEvent id="EndEvent_1" name="TheEnd">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[// The following variable is checked by the unit test\r
+execution.setVariable("DeleteVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1"/>\r
+    <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def dvfm = new DeleteVfModuleInfra()\r
+dvfm.completionHandlerPrep(execution, 'DELVfModI_CompletionHandlerRequest')\r
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_5"/>\r
+    <bpmn2:serviceTask id="ScriptTask_8" name="UpdateInfraRequest">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${DELVfModI_updateInfraRequest}</camunda:inputParameter>\r
+            <camunda:outputParameter name="DELVfModI_updateInfraRequestResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="DELVfModI_updateInfraRequestResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_8" targetRef="ScriptTask_10"/>\r
+    <bpmn2:scriptTask id="ScriptTask_5" name="Update Infra Request (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def dvfm = new DeleteVfModuleInfra()\r
+dvfm.prepUpdateInfraRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_5" targetRef="ScriptTask_8"/>\r
+    <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">\r
+      <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">\r
+        <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_3"/>\r
+      <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def dvfm = new DeleteVfModuleInfra()\r
+dvfm.falloutHandlerPrep(execution, 'DELVfModI_FalloutHandlerRequest')\r
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2"/>\r
+      <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in source="DELVfModI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+          <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+          <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:endEvent id="EndEvent_2">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3"/>\r
+    <bpmn2:startEvent id="StartEvent_1" camunda:asyncAfter="true" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_2"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="144.0" y="72.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="145.0" y="113.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="605.0" y="370.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="50.0" x="598.0" y="411.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">\r
+        <di:waypoint xsi:type="dc:Point" x="180.0" y="90.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="299.0" y="90.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="230.0" y="90.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="299.0" y="50.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">\r
+        <di:waypoint xsi:type="dc:Point" x="399.0" y="90.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="449.0" y="90.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="433.0" y="90.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="449.0" y="50.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125" targetElement="_BPMNShape_ScriptTask_130">\r
+        <di:waypoint xsi:type="dc:Point" x="498.0" y="130.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="498.0" y="160.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="199.0" y="160.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="199.0" y="190.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="717.0" y="169.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">\r
+        <dc:Bounds height="80.0" width="100.0" x="449.0" y="348.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">\r
+        <di:waypoint xsi:type="dc:Point" x="549.0" y="388.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="605.0" y="388.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="723.0" y="186.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">\r
+        <dc:Bounds height="80.0" width="100.0" x="149.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">\r
+        <dc:Bounds height="80.0" width="100.0" x="149.0" y="348.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="299.0" y="348.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">\r
+        <di:waypoint xsi:type="dc:Point" x="249.0" y="388.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="299.0" y="388.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="271.0" y="394.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="241.0" width="565.0" x="65.0" y="536.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="129.0" y="630.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="98.0" x="98.0" y="671.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="209.0" y="608.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">\r
+        <di:waypoint xsi:type="dc:Point" x="165.0" y="648.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="209.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="209.0" y="948.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">\r
+        <di:waypoint xsi:type="dc:Point" x="309.0" y="648.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="377.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="325.0" y="648.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="533.0" y="630.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="551.0" y="671.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="612.0" y="630.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="627.0" y="671.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="704.0" y="630.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="722.0" y="671.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">\r
+        <di:waypoint xsi:type="dc:Point" x="648.0" y="648.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="704.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="693.0" y="948.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="377.0" y="608.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">\r
+        <di:waypoint xsi:type="dc:Point" x="399.0" y="388.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="449.0" y="388.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="439.0" y="356.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">\r
+        <di:waypoint xsi:type="dc:Point" x="477.0" y="648.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="533.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="373.0" y="456.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">\r
+        <dc:Bounds height="80.0" width="100.0" x="299.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_ScriptTask_181">\r
+        <di:waypoint xsi:type="dc:Point" x="249.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="299.0" y="230.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_182" bpmnElement="ScriptTask_5">\r
+        <dc:Bounds height="80.0" width="100.0" x="453.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_183" bpmnElement="ScriptTask_8">\r
+        <dc:Bounds height="80.0" width="100.0" x="598.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_181" targetElement="_BPMNShape_ScriptTask_182">\r
+        <di:waypoint xsi:type="dc:Point" x="399.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="453.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="613.0" y="314.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_182" targetElement="_BPMNShape_ScriptTask_183">\r
+        <di:waypoint xsi:type="dc:Point" x="553.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="598.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="575.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_183" targetElement="_BPMNShape_ScriptTask_133">\r
+        <di:waypoint xsi:type="dc:Point" x="647.0" y="270.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="647.0" y="304.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="199.0" y="304.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="199.0" y="348.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="345.0" y="280.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVfModuleVolumeInfraV1.bpmn
new file mode 100644 (file)
index 0000000..4939255
--- /dev/null
@@ -0,0 +1,567 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DeleteVfModuleVolumeInfraV1" name="DeleteVfModuleVolumeInfraV1" isExecutable="true">\r
+    <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('preProcessRequest', execution, isDebugLogEnabled)
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>\r
+    <bpmn2:startEvent id="deleteNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="deleteNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('sendSyncResponse', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="ScriptTask_callRestCloudRegion"/>\r
+    <bpmn2:scriptTask id="ScriptTask_callRestCloudRegion" name="Call REST Query Cloud Region " scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def delVfModuleVol = new DeleteVfModuleVolumeInfraV1()
+delVfModuleVol.executeMethod('callRESTQueryAAICloudRegion', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:scriptTask id="prepareVnfAdapterDelete_ScriptTask_1" name="Prepare Vnf Adapter Delete" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareVnfAdapterDeleteRequest', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="prepareVnfAdapterDelete_ScriptTask_1" targetRef="callVnfAdapterDeleteSubflow_CallActivity"/>\r
+    <bpmn2:endEvent id="EndEvent_5">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="TenantId Match?" default="SequenceFlow_21">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ExclusiveGateway_3" targetRef="prepareVnfAdapterDelete_ScriptTask_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVfModVol_tenantId") == execution.getVariable("DELVfModVol_volumeGroupTenantId")}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_2"/>\r
+    <bpmn2:callActivity id="callVnfAdapterDeleteSubflow_CallActivity" name="Call Vnf Adapter Delete subflow" calledElement="vnfAdapterRestV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DELVfModVol_deleteVnfARequest" target="vnfAdapterRestV1Request"/>\r
+        <camunda:out source="vnfAdapterRestV1Response" target="DELVfModVol_deleteVnfAResponse"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in variables="all"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="VNFREST_SuccessIndicator" target="VNFREST_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callVnfAdapterDeleteSubflow_CallActivity" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Query AAI for Volume Group Info" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('queryAAIForVolumeGroup', execution, isDebugLogEnabled)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="callAAIQuery_scriptTask" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Handle TenantId Mismatch" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('handleTenantIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_5"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_callRestCloudRegion" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="is Cloud Region Ok?" default="SequenceFlow_4">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_3"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ExclusiveGateway_1" targetRef="callAAIQuery_scriptTask">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVfModVol_isCloudRegionGood") == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">\r
+      <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">\r
+        <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="ExclusiveGateway_synResponseSent"/>\r
+      <bpmn2:exclusiveGateway id="ExclusiveGateway_synResponseSent" name="Sync response sent?" default="SequenceFlow_responseNotSent">\r
+        <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_responseNotSent</bpmn2:outgoing>\r
+        <bpmn2:outgoing>SequenceFlow_responseSent</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:scriptTask id="ScriptTask_4" name="Send Sync Ack Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_responseNotSent</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new  DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('sendSyncError', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_responseNotSent" name="No" sourceRef="ExclusiveGateway_synResponseSent" targetRef="ScriptTask_4"/>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_responseSent" name="Yes" sourceRef="ExclusiveGateway_synResponseSent" targetRef="prepareFalloutHandler_ScriptTask">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DELVfModVol_syncResponseSent == true}</bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_responseSent</bpmn2:incoming>\r
+        <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareFalloutHandler', execution, isDebugLogEnabled)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/>\r
+      <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in variables="all"/>\r
+          <camunda:out variables="all"/>\r
+          <camunda:in source="DELVfModVol_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+          <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+          <camunda:out source="FH_ResponseCode" target="FH_ResponseCode"/>\r
+          <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse"/>\r
+          <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_1"/>\r
+      <bpmn2:endEvent id="EndEvent_1">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_4" targetRef="prepareFalloutHandler_ScriptTask"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareDBRequest', execution, isDebugLogEnabled)
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>\r
+    <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Prepare Completion Handler Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('prepareCompletionHandlerRequest', execution, isDebugLogEnabled)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>\r
+    <bpmn2:scriptTask id="ScriptTask_3" name="Set Success" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("DELVfModVol_TransactionSuccessIndicator", true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ScriptTask_3" targetRef="EndEvent_2"/>\r
+    <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in variables="all"/>\r
+        <camunda:out variables="all"/>\r
+        <camunda:in source="DELVfModVol_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_3"/>\r
+    <bpmn2:endEvent id="EndEvent_2" name="End">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="TerminateEventDefinition_3"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${DELVfModVol_updateInfraRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="DELVfModVol_createDBResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="DELVfModVol_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTDeleteVolGrpId_ScriptTask" name="Call REST Delete AAI Vol Grp Id" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_vnfAdapterCallOK</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def deleteVfMod = new DeleteVfModuleVolumeInfraV1()
+deleteVfMod.executeMethod('deleteVolGrpId', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTDeleteVolGrpId_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Is call to VNF Adapter OK?" default="SequenceFlow_vnfAdapterCallNotOK">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_vnfAdapterCallOK</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_vnfAdapterCallNotOK</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterCallOK" name="" sourceRef="ExclusiveGateway_2" targetRef="callRESTDeleteVolGrpId_ScriptTask">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{VNFREST_SuccessIndicator == true}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:endEvent id="EndEvent_6">\r
+      <bpmn2:incoming>SequenceFlow_vnfAdapterCallNotOK</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_5" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterCallNotOK" name="" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_6"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_2" errorCode="java.lang.Exception" name="java.lang.Exception"/>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleVolumeInfraV1">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="deleteNetwork_startEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="103.0" y="94.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="65.0" x="89.0" y="135.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="355.0" y="72.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">\r
+        <di:waypoint xsi:type="dc:Point" x="139.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="355.0" y="112.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="116.0" y="12.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_62" bpmnElement="callAAIQuery_scriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="864.0" y="72.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="438.0" y="360.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="993.0" y="985.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">\r
+        <dc:Bounds height="337.0" width="660.0" x="37.0" y="288.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="60.0" y="383.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="67.0" x="45.0" y="424.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="288.0" y="360.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="993.0" y="877.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="993.0" y="660.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="993.0" y="769.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">\r
+        <di:waypoint xsi:type="dc:Point" x="455.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="496.0" y="112.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="486.0" y="112.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="496.0" y="72.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_255">\r
+        <di:waypoint xsi:type="dc:Point" x="96.0" y="401.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="118.0" y="401.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="118.0" y="400.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="144.0" y="400.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="99.0" y="401.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3">\r
+        <di:waypoint xsi:type="dc:Point" x="388.0" y="400.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="438.0" y="400.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="413.0" y="400.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="849.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="877.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1258.0" y="857.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="957.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="985.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1289.0" y="898.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTDeleteVolGrpId_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="993.0" y="528.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_83">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="608.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="660.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1291.0" y="557.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="740.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="769.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1258.0" y="751.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_22" bpmnElement="callVnfAdapterDeleteSubflow_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="993.0" y="300.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="prepareVnfAdapterDelete_ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="993.0" y="180.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_CallActivity_22">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="260.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="300.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1112.0" y="280.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_22" targetElement="_BPMNShape_ExclusiveGateway_252">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="380.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="401.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1042.0" y="401.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1042.0" y="422.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1039.0" y="415.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="588.0" y="382.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="606.0" y="423.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_163">\r
+        <di:waypoint xsi:type="dc:Point" x="538.0" y="400.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="588.0" y="400.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="558.0" y="400.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_167" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1025.0" y="1201.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1029.0" y="1242.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_241">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="1065.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="1093.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1258.0" y="1083.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_4">\r
+        <dc:Bounds height="80.0" width="100.0" x="120.0" y="492.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_ScriptTask_251">\r
+        <di:waypoint xsi:type="dc:Point" x="596.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="623.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="623.0" y="115.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="636.0" y="115.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="613.0" y="112.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_203">\r
+        <di:waypoint xsi:type="dc:Point" x="964.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1017.0" y="111.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1067.0" y="113.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_203" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1017.0" y="86.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="102.0" x="984.0" y="60.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_240" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="1104.0" y="72.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_203" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="1042.0" y="136.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="180.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1040.0" y="122.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_203" targetElement="_BPMNShape_ScriptTask_240">\r
+        <di:waypoint xsi:type="dc:Point" x="1067.0" y="111.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1085.0" y="111.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1085.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1104.0" y="112.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1216.0" y="113.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="1242.0" y="95.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1260.0" y="136.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_240" targetElement="_BPMNShape_EndEvent_178">\r
+        <di:waypoint xsi:type="dc:Point" x="1204.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1222.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1222.0" y="113.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1242.0" y="113.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1220.0" y="113.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="993.0" y="1093.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_241" targetElement="_BPMNShape_EndEvent_167">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="1173.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="1201.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1040.0" y="1320.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="ScriptTask_callRestCloudRegion">\r
+        <dc:Bounds height="80.0" width="100.0" x="636.0" y="75.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="774.0" y="89.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="125.0" x="735.0" y="40.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_215" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="781.0" y="170.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="799.0" y="211.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_EndEvent_215">\r
+        <di:waypoint xsi:type="dc:Point" x="798.0" y="139.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="798.0" y="153.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="799.0" y="153.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="799.0" y="170.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="796.0" y="166.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_251" targetElement="_BPMNShape_ExclusiveGateway_223">\r
+        <di:waypoint xsi:type="dc:Point" x="736.0" y="115.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="754.0" y="115.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="754.0" y="114.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="774.0" y="114.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="752.0" y="114.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_62">\r
+        <di:waypoint xsi:type="dc:Point" x="824.0" y="114.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="844.0" y="114.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="844.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="864.0" y="112.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="841.0" y="113.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1017.0" y="422.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="164.0" x="960.0" y="477.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_vnfAdapterCallOK" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_ScriptTask_134">\r
+        <di:waypoint xsi:type="dc:Point" x="1042.0" y="472.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="528.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1040.0" y="500.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_6">\r
+        <dc:Bounds height="36.0" width="36.0" x="1168.0" y="430.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1186.0" y="471.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_vnfAdapterCallNotOK" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_EndEvent_236">\r
+        <di:waypoint xsi:type="dc:Point" x="1067.0" y="447.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1117.0" y="447.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1117.0" y="448.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1168.0" y="448.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_synResponseSent" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="144.0" y="375.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="129.0" x="106.0" y="439.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_responseNotSent" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_234">\r
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="425.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="458.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="170.0" y="458.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="170.0" y="492.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="159.0" y="458.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_responseSent" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_79">\r
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="400.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="288.0" y="400.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="204.0" y="400.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_234" targetElement="_BPMNShape_ScriptTask_79">\r
+        <di:waypoint xsi:type="dc:Point" x="220.0" y="532.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="254.0" y="532.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="532.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="508.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="482.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="337.0" y="440.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="317.0" y="532.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/DeleteVnfInfra.bpmn
new file mode 100644 (file)
index 0000000..28d005c
--- /dev/null
@@ -0,0 +1,458 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_9MhrcHqVEea26OhQB97uCQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DeleteVnfInfra" name="DeleteVnfInfra" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>\r
+    <bpmn2:scriptTask id="sendSyncResponse" name="Send Sync Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.sendSyncResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="sendSyncResponse"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncResponse" targetRef="callGetVnf"/>\r
+    <bpmn2:callActivity id="callGetVnf" name="Get&#xD;&#xA;Generic Vnf" calledElement="GenericGetVnf">\r
+      <bpmn2:extensionElements>\r
+        <camunda:out source="GENGV_vnf" target="DELVI_genericVnf"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="GENGV_SuccessIndicator" target="GENGV_SuccessIndicator"/>\r
+        <camunda:out source="GENGV_FoundIndicator" target="GENGV_FoundIndicator"/>\r
+        <camunda:in source="DELVI_type" target="GENGV_type"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="DELVI_vnfId" target="GENGV_vnfId"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callGetVnf" targetRef="vnfFoundCheck"/>\r
+    <bpmn2:exclusiveGateway id="vnfFoundCheck" name="Vnf Found?" default="notFound">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>vnfFound</bpmn2:outgoing>\r
+      <bpmn2:outgoing>notFound</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="vnfFound" name="Yes" sourceRef="vnfFoundCheck" targetRef="processResponse">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_FoundIndicator") == true && execution.getVariable("GENGV_SuccessIndicator") == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="vnfFoundCheck" targetRef="IntermediateThrowEvent_1"/>\r
+    <bpmn2:scriptTask id="processResponse" name="Process Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>vnfFound</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.processGetVnfResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="processResponse" targetRef="vnfInUseCheck"/>\r
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="Skip Delete">\r
+      <bpmn2:incoming>notFound</bpmn2:incoming>\r
+      <bpmn2:linkEventDefinition id="LinkEventDefinition_1" name="Skip Delete"/>\r
+    </bpmn2:intermediateThrowEvent>\r
+    <bpmn2:exclusiveGateway id="vnfInUseCheck" name="Vnf In Use?" default="notInUse">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>inUse</bpmn2:outgoing>\r
+      <bpmn2:outgoing>notInUse</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="inUse" name="Yes" sourceRef="vnfInUseCheck" targetRef="createWorkflowExceptionInUse">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DELVI_vnfInUse") == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="notInUse" name="No" sourceRef="vnfInUseCheck" targetRef="callDeleteVnf"/>\r
+    <bpmn2:scriptTask id="createWorkflowExceptionInUse" name="Create Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>inUse</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Can't Delete Generic Vnf. Generic Vnf is still in use.")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="createWorkflowExceptionInUse" targetRef="EndEvent_1"/>\r
+    <bpmn2:callActivity id="callDeleteVnf" name="Delete&#xD;&#xA;Generic Vnf" calledElement="GenericDeleteVnf">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DELVI_vnfId" target="GENDV_vnfId"/>\r
+        <camunda:in source="DELVI_type" target="GENDV_type"/>\r
+        <camunda:out source="GENDV_SuccessIndicator" target="GENDV_SuccessIndicator"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="DELVI_resourceVersion" target="GENDV_resourceVersion"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>notInUse</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_93" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="callDeleteVnf" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:subProcess id="bpmnErrorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="prepareFalloutHandlerRequest" name="Prepare Fallout Request" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+\r
+String requestInfo = execution.getVariable("DELVI_requestInfo")\r
+ExceptionUtil ex = new ExceptionUtil()\r
+String falloutHandlerRequest = ex.processMainflowsBPMNException(execution, requestInfo)\r
+\r
+execution.setVariable("DELVI_falloutHandlerRequest", falloutHandlerRequest )]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="prepareFalloutHandlerRequest" targetRef="callFalloutHandler"/>\r
+      <bpmn2:callActivity id="callFalloutHandler" name="Fallout&#xD;&#xA;Handler" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in source="DELVI_falloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="DELVI_requestId" target="requestId"/>\r
+          <camunda:in source="DELVI_serviceInstanceId" target="serviceInstanceId"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callFalloutHandler" targetRef="EndEvent_3"/>\r
+      <bpmn2:endEvent id="EndEvent_3">\r
+        <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_37"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_94"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="StartEvent_2" targetRef="sendErrorResponse"/>\r
+      <bpmn2:scriptTask id="sendErrorResponse" name="Send Error Response" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.sendErrorResponse(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="sendErrorResponse" targetRef="prepareFalloutHandlerRequest"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:endEvent id="EndEvent_4">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="StartEvent_3">\r
+        <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException"/>\r
+      <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ExclusiveGateway_2" targetRef="postProcess"/>\r
+    <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="Skip Delete">\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:linkEventDefinition id="LinkEventDefinition_2" name="Skip Delete"/>\r
+    </bpmn2:intermediateCatchEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="IntermediateCatchEvent_1" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:scriptTask id="postProcess" name="Prepare Completion Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+DeleteVnfInfra deleteVnf = new DeleteVnfInfra()
+deleteVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="postProcess" targetRef="callCompletionHandler"/>\r
+    <bpmn2:callActivity id="callCompletionHandler" name="Completion&#xD;&#xA;Handler" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DELVI_completionHandlerRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="DELVI_requestId" target="att-mso-request-id"/>\r
+        <camunda:in source="DELVI_serviceInstanceId" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="callCompletionHandler" targetRef="EndEvent_2"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36"/>\r
+    </bpmn2:endEvent>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmn2:error id="Error_2" errorCode="java.lang.Exception" name="Java Lang Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVnfInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="90.0" y="210.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="108.0" y="251.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">\r
+        <dc:Bounds height="80.0" width="100.0" x="216.0" y="188.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">\r
+        <di:waypoint xsi:type="dc:Point" x="126.0" y="228.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="216.0" y="228.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="164.0" y="228.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="sendSyncResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="364.0" y="188.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_311" targetElement="_BPMNShape_ScriptTask_313">\r
+        <di:waypoint xsi:type="dc:Point" x="316.0" y="228.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="364.0" y="228.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="341.0" y="228.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_314" bpmnElement="processResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="704.0" y="291.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_313" targetElement="_BPMNShape_CallActivity_63">\r
+        <di:waypoint xsi:type="dc:Point" x="464.0" y="228.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="504.0" y="228.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="487.0" y="228.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_63" bpmnElement="callGetVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="504.0" y="188.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_236" bpmnElement="vnfInUseCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="840.0" y="305.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="73.0" x="890.0" y="335.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_314" targetElement="_BPMNShape_ExclusiveGateway_236">\r
+        <di:waypoint xsi:type="dc:Point" x="804.0" y="331.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="840.0" y="330.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="799.0" y="325.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_63" targetElement="_BPMNShape_ExclusiveGateway_237">\r
+        <di:waypoint xsi:type="dc:Point" x="604.0" y="228.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="634.0" y="227.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="630.0" y="227.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="createWorkflowExceptionInUse">\r
+        <dc:Bounds height="80.0" width="100.0" x="912.0" y="196.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_64" bpmnElement="callDeleteVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="912.0" y="384.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="inUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="_BPMNShape_ScriptTask_315">\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="305.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="236.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="912.0" y="236.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="867.0" y="258.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="notInUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="_BPMNShape_CallActivity_64">\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="355.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="424.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="912.0" y="424.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="870.0" y="384.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1100.0" y="218.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1118.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_315" targetElement="_BPMNShape_EndEvent_236">\r
+        <di:waypoint xsi:type="dc:Point" x="1012.0" y="236.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1100.0" y="236.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1062.0" y="236.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_237" bpmnElement="vnfFoundCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="634.0" y="202.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="72.0" x="672.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="vnfFound" sourceElement="_BPMNShape_ExclusiveGateway_237" targetElement="_BPMNShape_ScriptTask_314">\r
+        <di:waypoint xsi:type="dc:Point" x="659.0" y="252.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="659.0" y="331.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="704.0" y="331.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="659.0" y="288.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_2" bpmnElement="IntermediateThrowEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="740.0" y="102.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="73.0" x="722.0" y="143.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_237" targetElement="_BPMNShape_IntermediateThrowEvent_2">\r
+        <di:waypoint xsi:type="dc:Point" x="659.0" y="202.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="659.0" y="120.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="740.0" y="120.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="662.0" y="144.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1524.0" y="406.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1542.0" y="447.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_238" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1062.0" y="398.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1087.0" y="453.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_CallActivity_64" targetElement="_BPMNShape_ExclusiveGateway_238">\r
+        <di:waypoint xsi:type="dc:Point" x="1012.0" y="424.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1062.0" y="423.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1036.0" y="423.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_238" targetElement="_BPMNShape_ScriptTask_326">\r
+        <di:waypoint xsi:type="dc:Point" x="1112.0" y="423.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="424.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1128.0" y="423.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_2" bpmnElement="IntermediateCatchEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1069.0" y="492.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="73.0" x="1051.0" y="533.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_IntermediateCatchEvent_2" targetElement="_BPMNShape_ExclusiveGateway_238">\r
+        <di:waypoint xsi:type="dc:Point" x="1087.0" y="492.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1087.0" y="448.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1084.0" y="462.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_34" bpmnElement="bpmnErrorHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="207.0" width="589.0" x="132.0" y="442.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_80" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="144.0" y="528.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="162.0" y="569.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_238" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="672.0" y="528.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="690.0" y="569.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_66" bpmnElement="callFalloutHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="516.0" y="506.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_317" bpmnElement="sendErrorResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="240.0" y="506.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="prepareFalloutHandlerRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="377.0" y="506.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_StartEvent_80" targetElement="_BPMNShape_ScriptTask_317">\r
+        <di:waypoint xsi:type="dc:Point" x="180.0" y="546.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="240.0" y="546.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="201.0" y="546.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_317" targetElement="_BPMNShape_ScriptTask_318">\r
+        <di:waypoint xsi:type="dc:Point" x="340.0" y="546.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="377.0" y="546.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="353.0" y="546.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_318" targetElement="_BPMNShape_CallActivity_66">\r
+        <di:waypoint xsi:type="dc:Point" x="477.0" y="546.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="516.0" y="546.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="491.0" y="546.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_66" targetElement="_BPMNShape_EndEvent_238">\r
+        <di:waypoint xsi:type="dc:Point" x="616.0" y="546.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="672.0" y="546.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="635.0" y="546.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="157.0" width="312.0" x="271.0" y="696.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="300.0" y="757.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="318.0" y="798.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="516.0" y="757.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="534.0" y="798.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">\r
+        <dc:Bounds height="80.0" width="100.0" x="378.0" y="735.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="775.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="378.0" y="775.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="354.0" y="775.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">\r
+        <di:waypoint xsi:type="dc:Point" x="478.0" y="775.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="516.0" y="775.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="494.0" y="775.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_326" bpmnElement="postProcess">\r
+        <dc:Bounds height="80.0" width="100.0" x="1152.0" y="384.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_326" targetElement="_BPMNShape_CallActivity_71">\r
+        <di:waypoint xsi:type="dc:Point" x="1252.0" y="424.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1296.0" y="424.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1271.0" y="424.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_71" bpmnElement="callCompletionHandler">\r
+        <dc:Bounds height="80.0" width="100.0" x="1296.0" y="384.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_CallActivity_71" targetElement="_BPMNShape_EndEvent_237">\r
+        <di:waypoint xsi:type="dc:Point" x="1396.0" y="424.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1524.0" y="424.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1411.0" y="424.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateNetworkInstanceInfra.bpmn
new file mode 100644 (file)
index 0000000..8a203d1
--- /dev/null
@@ -0,0 +1,1014 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_MagIIMOUEeW8asg-vCEgWQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="UpdateNetworkInstanceInfra" name="UpdateNetworkInstanceInfra" isExecutable="true">\r
+    <bpmn2:startEvent id="updateNetwork_startEvent" camunda:asyncAfter="true" name="Start Flow">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="updateNetwork_startEvent" targetRef="preProcessRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare SDNC Topology Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareSDNCRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity"/>\r
+    <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.validateSDNCResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>sdncTopoNo_SequenceFlow</bpmn2:outgoing>\r
+      <bpmn2:outgoing>sdncTopoYes_SequenceFlow</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent"/>\r
+    <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTReQuery1NetworkID_ScriptTask">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask">\r
+      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="BoundaryEvent_4" targetRef="sndcError_EndEvent"/>\r
+    <bpmn2:endEvent id="sndcError_EndEvent" name="SNDC Error">\r
+      <bpmn2:incoming>sdncTopoNo_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_57" errorRef="Error_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:callActivity id="callRollbackSDNCAdapter_CallActivity" name="Call Rollback SDNC Adapter" isForCompensation="true" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="UPDNETI_rollbackSDNCRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_rollbackSDNCReturnCode"/>\r
+        <camunda:out source="sdncAdapterResponse" target="UPDNETI_rollbackSDNCResponse"/>\r
+      </bpmn2:extensionElements>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:boundaryEvent id="sndcCompensation_BoundaryEvent" attachedToRef="callAssignSDNCAdapter_CallActivity">\r
+      <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign Adapter V1 Sub-process" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="UPDNETI_changeAssignSDNCRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:out source="sdncAdapterResponse" target="UPDNETI_changeAssignSDNCResponse"/>\r
+        <camunda:out source="SDNCA_ResponseCode" target="UPDNETI_sdncReturnCode"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="WorkflowException" target="UPDNETI_WorkflowException"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+        <camunda:in variables="all"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="callAssignSDNCAdapter_CallActivity" targetRef="validateSDNCResponse_ScriptTask"/>\r
+    <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process &amp; Completion Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.postProcessResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity"/>\r
+    <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Exception / FalloutHandler " triggeredByEvent="true">\r
+      <bpmn2:exclusiveGateway id="isRollbackOn_Network_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_NoNetwork_SequenceFlow">\r
+        <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+        <bpmn2:outgoing>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:outgoing>\r
+        <bpmn2:outgoing>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="isRollbackOn_YesNetwork_SequenceFlow" name="Yes" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_rollbackEnabled") == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:sequenceFlow id="isRollbackOn_NoNetwork_SequenceFlow" name="No" sourceRef="isRollbackOn_Network_ExclusiveGateway" targetRef="InclusiveGateway_6"/>\r
+      <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">\r
+        <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="subProcessStart_StartEvent" targetRef="isRollbackOn_Network_ExclusiveGateway"/>\r
+      <bpmn2:exclusiveGateway id="isPONR_ExclusiveGateway" name="isPONR?" default="isPONR_No_SequenceFlow">\r
+        <bpmn2:incoming>isRollbackOn_YesNetwork_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:outgoing>isPONR_Yes_SequenceFlow</bpmn2:outgoing>\r
+        <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="InclusiveGateway_6">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isPONR") == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isNetworkOk_ExclusiveGateway"/>\r
+      <bpmn2:exclusiveGateway id="isNetworkOk_ExclusiveGateway" name="is Network Ok?" default="isNetworkOk_No_SequenceFlow">\r
+        <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:outgoing>isNetworkOk_No_SequenceFlow</bpmn2:outgoing>\r
+        <bpmn2:outgoing>isNetworkOk_Yes_SequenceFlow</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="isNetworkOk_No_SequenceFlow" name="No" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway"/>\r
+      <bpmn2:sequenceFlow id="isNetworkOk_Yes_SequenceFlow" name="Yes" sourceRef="isNetworkOk_ExclusiveGateway" targetRef="sdncOk_ExclusiveGateway">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isNetworkRollbackNeeded") == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is Sdnc Ok?" default="sdncOk_No_ExclusiveGateway">\r
+        <bpmn2:incoming>isNetworkOk_No_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:incoming>isNetworkOk_Yes_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:outgoing>sdncOk_Yeso_ExclusiveGateway</bpmn2:outgoing>\r
+        <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="prepareSDNCRollbackRequest_ScriptTask">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("UPDNETI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="validateRollbacksResponse_ScriptTask_2"/>\r
+      <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy">\r
+        <bpmn2:incoming>sdncOk_Yeso_ExclusiveGateway</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_53</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="prepareSDNCRollbackRequest_ScriptTask" targetRef="sdncTopoRollback_IntermediateThrowEvent"/>\r
+      <bpmn2:intermediateThrowEvent id="sdncTopoRollback_IntermediateThrowEvent" name="SDNC Rollback">\r
+        <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing>\r
+        <bpmn2:compensateEventDefinition id="sndc_CompensateEventDefinition" activityRef="callRollbackSDNCAdapter_CallActivity" waitForCompletion="true"/>\r
+      </bpmn2:intermediateThrowEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_55" name="" sourceRef="sdncTopoRollback_IntermediateThrowEvent" targetRef="validateRollbacksResponse_ScriptTask_2"/>\r
+      <bpmn2:scriptTask id="prepareDBInfraErrorRequest_ScriptTask" name="Prepare DB Infra Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareDBRequestError(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="prepareDBInfraErrorRequest_ScriptTask" targetRef="callDBInfraErrorUpdate_ServiceTask_1"/>\r
+      <bpmn2:serviceTask id="callDBInfraErrorUpdate_ServiceTask_1" name="Call DB Infra Error Update">\r
+        <bpmn2:extensionElements>\r
+          <camunda:connector>\r
+            <camunda:connectorId>http-connector</camunda:connectorId>\r
+            <camunda:inputOutput>\r
+              <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+              <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter>\r
+              <camunda:inputParameter name="headers">\r
+                <camunda:map>\r
+                  <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+                </camunda:map>\r
+              </camunda:inputParameter>\r
+              <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+              <camunda:outputParameter name="UPDNETI_updateDBResponse">${response}</camunda:outputParameter>\r
+              <camunda:outputParameter name="UPDNETI_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+            </camunda:inputOutput>\r
+          </camunda:connector>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      </bpmn2:serviceTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="callDBInfraErrorUpdate_ServiceTask_1" targetRef="prepareFalloutHandler_ScriptTask"/>\r
+      <bpmn2:callActivity id="faultHandler_CallActivity" name="Call FalloutHandlerV1" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in variables="all"/>\r
+          <camunda:out variables="all"/>\r
+          <camunda:in source="UPDNETI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+          <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+          <camunda:out source="FH_ResponseCode" target="FH_ResponseCode"/>\r
+          <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse"/>\r
+          <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="faultHandler_CallActivity" targetRef="EndEvent_4"/>\r
+      <bpmn2:endEvent id="EndEvent_4">\r
+        <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:scriptTask id="validateRollbacksResponse_ScriptTask_2" name="Validate Rollback Responses" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming>\r
+        <bpmn2:incoming>sdncOk_No_ExclusiveGateway</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.validateRollbackResponses(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="validateRollbacksResponse_ScriptTask_2" targetRef="InclusiveGateway_6"/>\r
+      <bpmn2:inclusiveGateway id="InclusiveGateway_6">\r
+        <bpmn2:incoming>isRollbackOn_NoNetwork_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:incoming>isPONR_Yes_SequenceFlow</bpmn2:incoming>\r
+        <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>\r
+      </bpmn2:inclusiveGateway>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="InclusiveGateway_6" targetRef="prepareDBInfraErrorRequest_ScriptTask"/>\r
+      <bpmn2:scriptTask id="prepareFalloutHandler_ScriptTask" name="Prepare FalloutHandler" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def buildErrorResponse = new UpdateNetworkInstanceInfra()
+buildErrorResponse.buildErrorResponse(execution)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="prepareFalloutHandler_ScriptTask" targetRef="faultHandler_CallActivity"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="callRESTReQuery2NetworkID_ScriptTask" name="Call REST ReQuery2 Network Id in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQuery2NetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_46" name="PONR" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="prepareDBInfraRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="prepareDBInfraRequest_ScriptTask" name="Prepare DB Infra Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareDBRequest(execution)
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="prepareDBInfraRequest_ScriptTask" targetRef="callDBInfra_ServiceTask"/>\r
+    <bpmn2:serviceTask id="callDBInfra_ServiceTask" name="Call DB Infra Update">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${UPDNETI_updateDBRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="UPDNETI_createDBResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="UPDNETI_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="callDBInfra_ServiceTask" targetRef="postProcessAndCompletionRequest_ScriptTask"/>\r
+    <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in variables="all"/>\r
+        <camunda:out variables="all"/>\r
+        <camunda:in source="UPDNETI_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode"/>\r
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="EndEvent_3"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.processJavaException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/>\r
+      <bpmn2:startEvent id="StartEvent_1">\r
+        <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/>\r
+      <bpmn2:endEvent id="EndEvent_1">\r
+        <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.preProcessRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTQueryCloudRegion_ScriptTask" name="Call REST Query Cloud Region " scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>siFoundYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_ScriptTask"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_97" errorRef="Error_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>siFoundNo</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="workflowExceptionSINotFound" targetRef="EndEvent_2"/>\r
+    <bpmn2:exclusiveGateway id="siFoundCheck" name="is SI Found?" default="siFoundNo">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>siFoundYes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>siFoundNo</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="callRESTQueryNetworkId_ScriptTask">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound"/>\r
+    <bpmn2:callActivity id="callGetServiceInstance" name="Get&#xD;&#xA;Service&#xD;&#xA;Instance" calledElement="GenericGetService">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="UPDNETI_serviceInstanceId" target="GENGS_serviceInstanceId"/>\r
+        <camunda:out source="GENGS_serviceInstance" target="UPDNETI_serviceInstanceId"/>\r
+        <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator"/>\r
+        <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator"/>\r
+        <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="GENGS_type" target="GENGS_type"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck"/>\r
+    <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new  UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.sendSyncResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="callGetServiceInstance"/>\r
+    <bpmn2:scriptTask id="validateUpdatePONetwork_ScriptTask" name="Validate Update PO Network" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.validateUpdateNetworkResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="validateUpdatePONetwork_ScriptTask" targetRef="callRESTReQuery2NetworkID_ScriptTask"/>\r
+    <bpmn2:serviceTask id="callUpdateNetwork_ServiceTask" name="Call Update Network">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="payload">${UPDNETI_updateNetworkRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_network_rest_endpoint}/${UPDNETI_networkId}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>\r
+                <camunda:entry key="content-type">application/xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">PUT</camunda:inputParameter>\r
+            <camunda:outputParameter name="UPDNETI_networkReturnCode">${statusCode}</camunda:outputParameter>\r
+            <camunda:outputParameter name="UPDNETI_updateNetworkResponse">${response}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="callUpdateNetwork_ServiceTask" targetRef="validateUpdatePONetwork_ScriptTask"/>\r
+    <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.prepareUpdateNetworkRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callUpdateNetwork_ServiceTask"/>\r
+    <bpmn2:scriptTask id="callRESTQueryNetworkTableRef_ScriptTask" name="Call REST Query Network TableRef in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTReQuery1NetworkID_ScriptTask" name="Call REST ReQuery1 Network Id in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()\r
+UpdateNetworkInstanceInfra.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callRESTReQuery1NetworkID_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTQueryVpnBinding_ScriptTask" name="Call REST Query Vpn Binding in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask"/>\r
+    <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def UpdateNetworkInstanceInfra = new UpdateNetworkInstanceInfra()
+UpdateNetworkInstanceInfra.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask"/>\r
+    <bpmn2:association id="Association_1" sourceRef="sndcCompensation_BoundaryEvent" targetRef="callRollbackSDNCAdapter_CallActivity"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="java.lang.Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkInstanceInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="updateNetwork_startEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="192.0" y="185.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="193.0" y="226.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="350.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">\r
+        <di:waypoint xsi:type="dc:Point" x="228.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="350.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="249.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateUpdatePONetwork_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1343.0" y="1311.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_3" bpmnElement="faultHandler_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="996.0" y="806.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callUpdateNetwork_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1176.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_67" bpmnElement="prepareSDNCTopoRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1343.0" y="276.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="137.0" y="1395.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_16" bpmnElement="subProcessException_SubProcess" isExpanded="true">\r
+        <dc:Bounds height="567.0" width="1122.0" x="17.0" y="585.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="subProcessStart_StartEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="48.0" y="1040.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="67.0" x="33.0" y="1081.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="prepareFalloutHandler_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="756.0" y="806.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_67" bpmnElement="isSdncTopoOk_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1523.0" y="520.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="125.0" x="1487.0" y="569.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">\r
+        <di:waypoint xsi:type="dc:Point" x="1573.0" y="545.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1682.0" y="546.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1577.0" y="546.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_336">\r
+        <di:waypoint xsi:type="dc:Point" x="1523.0" y="545.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="545.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="576.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1500.0" y="545.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="347.0" y="1392.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="prepareDBInfraRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="792.0" y="1390.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="callDBInfra_ServiceTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="564.0" y="1392.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_124" bpmnElement="sndcError_EndEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="1682.0" y="528.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="74.0" x="1663.0" y="569.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_19" bpmnElement="callAssignSDNCAdapter_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1341.0" y="395.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="sndcCompensation_BoundaryEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="1323.0" y="434.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="82.0" x="1280.0" y="474.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19">\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="356.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="374.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="374.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="395.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1389.0" y="374.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">\r
+        <di:waypoint xsi:type="dc:Point" x="1441.0" y="435.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1499.0" y="435.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1473.0" y="435.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_CallActivity_21">\r
+        <di:waypoint xsi:type="dc:Point" x="1323.0" y="447.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1290.0" y="438.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127">\r
+        <di:waypoint xsi:type="dc:Point" x="450.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="516.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="481.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="516.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90">\r
+        <di:waypoint xsi:type="dc:Point" x="84.0" y="1058.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="131.0" y="1058.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="131.0" y="1057.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="161.0" y="1057.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="96.0" y="1058.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_24" bpmnElement="sdncTopoRollback_IntermediateThrowEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="470.0" y="867.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="96.0" x="440.0" y="906.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_CallActivity_3">\r
+        <di:waypoint xsi:type="dc:Point" x="856.0" y="846.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="996.0" y="846.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="881.0" y="846.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_131" bpmnElement="validateSDNCResponse_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1499.0" y="395.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">\r
+        <di:waypoint xsi:type="dc:Point" x="1549.0" y="475.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1549.0" y="492.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1548.0" y="492.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1548.0" y="520.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1545.0" y="503.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_80">\r
+        <di:waypoint xsi:type="dc:Point" x="564.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="506.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="447.0" y="1432.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="528.0" y="1432.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4">\r
+        <di:waypoint xsi:type="dc:Point" x="347.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="292.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="292.0" y="1435.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="237.0" y="1435.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="290.0" y="1512.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_21" bpmnElement="callRollbackSDNCAdapter_CallActivity">\r
+        <dc:Bounds height="80.0" width="100.0" x="1190.0" y="384.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="callRESTQueryNetworkId_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="984.0" y="100.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_134" bpmnElement="callRESTReQuery2NetworkID_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1176.0" y="1390.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_135" bpmnElement="callRESTUpdateContrailNetwork_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="984.0" y="1392.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135">\r
+        <di:waypoint xsi:type="dc:Point" x="1176.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1084.0" y="1432.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1143.0" y="1657.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_58" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_ServiceTask_86">\r
+        <di:waypoint xsi:type="dc:Point" x="792.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="691.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="691.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="664.0" y="1432.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="773.0" y="1430.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_65" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ScriptTask_135" targetElement="_BPMNShape_ScriptTask_83">\r
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="926.0" y="1432.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="926.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="892.0" y="1430.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="947.0" y="1432.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="callRESTQueryVpnBinding_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1341.0" y="688.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215">\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="768.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="810.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1388.0" y="781.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63">\r
+        <di:waypoint xsi:type="dc:Point" x="1392.0" y="1256.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="1311.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1284.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="prepareNetworkRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1342.0" y="1052.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83">\r
+        <di:waypoint xsi:type="dc:Point" x="1392.0" y="1132.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1392.0" y="1176.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1389.0" y="1159.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="isRollbackOn_Network_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="161.0" y="1032.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="98.0" x="138.0" y="1092.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="isRollbackOn_YesNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_215">\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="1032.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="1004.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="186.0" y="1020.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="isRollbackOn_NoNetwork_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_InclusiveGateway_24">\r
+        <di:waypoint xsi:type="dc:Point" x="211.0" y="1057.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="1057.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="1004.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="211.0" y="1062.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="callRESTQueryNetworkPolicy_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1341.0" y="810.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_335">\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="890.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="926.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1388.0" y="900.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_InclusiveGateway_24" bpmnElement="InclusiveGateway_6">\r
+        <dc:Bounds height="50.0" width="50.0" x="336.0" y="954.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="361.0" y="1009.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="isPONR_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="161.0" y="954.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="60.0" x="88.0" y="969.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_InclusiveGateway_24">\r
+        <di:waypoint xsi:type="dc:Point" x="211.0" y="979.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="979.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="204.0" y="983.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_216">\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="954.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="884.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="191.0" y="933.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_216" bpmnElement="isNetworkOk_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="161.0" y="834.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="95.0" x="68.0" y="849.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_86" bpmnElement="isNetworkOk_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217">\r
+        <di:waypoint xsi:type="dc:Point" x="211.0" y="859.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="273.0" y="859.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="211.0" y="863.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_90" bpmnElement="isNetworkOk_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_216" targetElement="_BPMNShape_ExclusiveGateway_217">\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="834.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="781.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="273.0" y="781.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="781.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="192.0" y="814.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_217" bpmnElement="sdncOk_ExclusiveGateway" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="336.0" y="756.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="78.0" x="323.0" y="722.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261">\r
+        <di:waypoint xsi:type="dc:Point" x="386.0" y="781.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="438.0" y="781.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="386.0" y="779.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_262">\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="806.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="362.0" y="845.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="366.0" y="806.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="169.0" y="1536.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="187.0" y="1577.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_EndEvent_177">\r
+        <di:waypoint xsi:type="dc:Point" x="187.0" y="1475.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="187.0" y="1536.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="184.0" y="1475.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1028.0" y="924.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1046.0" y="965.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_3" targetElement="_BPMNShape_EndEvent_178">\r
+        <di:waypoint xsi:type="dc:Point" x="1046.0" y="886.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1046.0" y="924.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1043.0" y="888.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_97" targetElement="_BPMNShape_ScriptTask_79">\r
+        <di:waypoint xsi:type="dc:Point" x="676.0" y="846.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="756.0" y="846.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="686.0" y="846.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_97" bpmnElement="callDBInfraErrorUpdate_ServiceTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="576.0" y="806.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="prepareDBInfraErrorRequest_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="576.0" y="940.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_ServiceTask_97">\r
+        <di:waypoint xsi:type="dc:Point" x="626.0" y="940.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="626.0" y="886.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="623.0" y="927.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_245" bpmnElement="callRESTQueryCloudRegion_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1200.0" y="100.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67">\r
+        <di:waypoint xsi:type="dc:Point" x="1300.0" y="140.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="140.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="259.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="276.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1314.0" y="140.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_38" bpmnElement="BoundaryEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1581.0" y="377.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124">\r
+        <di:waypoint xsi:type="dc:Point" x="1617.0" y="395.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1700.0" y="394.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1700.0" y="528.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1697.0" y="467.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_261" bpmnElement="prepareSDNCRollbackRequest_ScriptTask">\r
+        <dc:Bounds height="79.0" width="100.0" x="438.0" y="742.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_262" bpmnElement="validateRollbacksResponse_ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="312.0" y="845.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_76" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_InclusiveGateway_24" targetElement="_BPMNShape_ScriptTask_218">\r
+        <di:waypoint xsi:type="dc:Point" x="386.0" y="979.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="548.0" y="979.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="548.0" y="980.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="576.0" y="980.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="393.0" y="979.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_84" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ScriptTask_261" targetElement="_BPMNShape_IntermediateThrowEvent_24">\r
+        <di:waypoint xsi:type="dc:Point" x="488.0" y="820.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="488.0" y="867.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="485.0" y="847.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_IntermediateThrowEvent_24" targetElement="_BPMNShape_ScriptTask_262">\r
+        <di:waypoint xsi:type="dc:Point" x="470.0" y="885.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="441.0" y="885.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="412.0" y="885.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="448.0" y="885.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_262" targetElement="_BPMNShape_InclusiveGateway_24">\r
+        <di:waypoint xsi:type="dc:Point" x="362.0" y="925.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="361.0" y="954.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="358.0" y="948.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134">\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="1391.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1310.0" y="1430.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1276.0" y="1430.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1390.0" y="1425.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">\r
+        <dc:Bounds height="188.0" width="394.0" x="21.0" y="381.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="54.0" y="458.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="72.0" y="499.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="169.0" y="436.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="330.0" y="458.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="348.0" y="499.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">\r
+        <di:waypoint xsi:type="dc:Point" x="90.0" y="476.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="476.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="129.0" y="476.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">\r
+        <di:waypoint xsi:type="dc:Point" x="269.0" y="476.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="330.0" y="476.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="301.0" y="476.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">\r
+        <dc:Bounds height="80.0" width="100.0" x="686.0" y="163.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="836.0" y="177.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="79.0" x="891.0" y="195.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244">\r
+        <di:waypoint xsi:type="dc:Point" x="786.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="805.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="805.0" y="202.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="836.0" y="202.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="799.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_133">\r
+        <di:waypoint xsi:type="dc:Point" x="861.0" y="177.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="861.0" y="140.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="910.0" y="140.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="868.0" y="157.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_247" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1155.0" y="278.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1173.0" y="319.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">\r
+        <dc:Bounds height="80.0" width="100.0" x="984.0" y="256.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331">\r
+        <di:waypoint xsi:type="dc:Point" x="861.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="861.0" y="296.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="296.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="871.0" y="233.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ScriptTask_331" targetElement="_BPMNShape_EndEvent_247">\r
+        <di:waypoint xsi:type="dc:Point" x="1084.0" y="296.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1155.0" y="296.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1103.0" y="296.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_245">\r
+        <di:waypoint xsi:type="dc:Point" x="1084.0" y="140.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1200.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1127.0" y="140.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_CallActivity_72">\r
+        <di:waypoint xsi:type="dc:Point" x="616.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="686.0" y="203.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="632.0" y="203.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_335" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1341.0" y="926.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_335" targetElement="_BPMNShape_ScriptTask_157">\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="1006.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1392.0" y="1052.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1388.0" y="1028.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_336" bpmnElement="callRESTReQuery1NetworkID_ScriptTask">\r
+        <dc:Bounds height="80.0" width="100.0" x="1343.0" y="576.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_336" targetElement="_BPMNShape_ScriptTask_156">\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="656.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1393.0" y="672.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="672.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1391.0" y="688.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1390.0" y="666.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleInfra.bpmn
new file mode 100644 (file)
index 0000000..fdd2b65
--- /dev/null
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_F0omAMXGEeW834CKd-K10Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="UpdateVfModuleInfra" name="UpdateVfModuleInfra" isExecutable="true">\r
+    <bpmn2:scriptTask id="ScriptTask_1" name="Send Synch Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.sendSynchResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7"/>\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Pre-Process Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.preProcessRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_1"/>\r
+    <bpmn2:scriptTask id="ScriptTask_7" name="DoUpdateVfModule (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.prepDoUpdateVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="ScriptTask_6" name="DoUpdateVfModule" calledElement="DoUpdateVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="UPDVfModI_Request" target="DoUpdateVfModuleRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_6"/>\r
+    <bpmn2:callActivity id="CallActivity_1" name="Completion Handler" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="UPDVfModI_CompletionHandlerRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_4"/>\r
+    <bpmn2:endEvent id="EndEvent_1" name="TheEnd">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_5"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_4" name="Set Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleInfraSuccessIndicator", true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_1"/>\r
+    <bpmn2:scriptTask id="ScriptTask_10" name="Completion Handler (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.completionHandlerPrep(execution, 'UPDVfModI_CompletionHandlerRequest')
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_10" targetRef="CallActivity_1"/>\r
+    <bpmn2:subProcess id="SubProcess_1" name="Error Handler" triggeredByEvent="true">\r
+      <bpmn2:startEvent id="StartEvent_3" name="Catch All Errors">\r
+        <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_3"/>\r
+      <bpmn2:scriptTask id="ScriptTask_3" name="Fallout Handler (prep)" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvfm = new UpdateVfModuleInfra()
+uvfm.falloutHandlerPrep(execution, 'UPDVfModI_FalloutHandlerRequest')
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ScriptTask_3" targetRef="CallActivity_2"/>\r
+      <bpmn2:callActivity id="CallActivity_2" name="Fallout Handler" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in source="UPDVfModI_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+          <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+          <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:endEvent id="EndEvent_2">\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_2" targetRef="EndEvent_2"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="TerminateEventDefinition_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_3"/>\r
+    <bpmn2:startEvent id="StartEvent_1" camunda:asyncAfter="true" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_10"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleInfra">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="149.0" y="72.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="150.0" y="113.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_125" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="605.0" y="370.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="50.0" x="598.0" y="411.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">\r
+        <di:waypoint xsi:type="dc:Point" x="185.0" y="90.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="299.0" y="90.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="235.0" y="90.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="299.0" y="50.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ScriptTask_125">\r
+        <di:waypoint xsi:type="dc:Point" x="399.0" y="90.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="449.0" y="90.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="433.0" y="90.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_125" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="449.0" y="50.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_125" targetElement="_BPMNShape_ScriptTask_130">\r
+        <di:waypoint xsi:type="dc:Point" x="498.0" y="130.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="498.0" y="160.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="199.0" y="160.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="199.0" y="190.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="717.0" y="169.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="ScriptTask_4">\r
+        <dc:Bounds height="80.0" width="100.0" x="449.0" y="348.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_127" targetElement="_BPMNShape_EndEvent_125">\r
+        <di:waypoint xsi:type="dc:Point" x="549.0" y="388.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="605.0" y="388.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="723.0" y="186.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_130" bpmnElement="ScriptTask_7">\r
+        <dc:Bounds height="80.0" width="100.0" x="149.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_133" bpmnElement="ScriptTask_10">\r
+        <dc:Bounds height="80.0" width="100.0" x="149.0" y="348.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_27" bpmnElement="CallActivity_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="299.0" y="348.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_CallActivity_27">\r
+        <di:waypoint xsi:type="dc:Point" x="249.0" y="388.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="299.0" y="388.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="271.0" y="394.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_17" bpmnElement="SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="241.0" width="565.0" x="65.0" y="536.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="129.0" y="630.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="98.0" x="98.0" y="671.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_136" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="209.0" y="608.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_136">\r
+        <di:waypoint xsi:type="dc:Point" x="165.0" y="648.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="209.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="209.0" y="948.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_136" targetElement="_BPMNShape_CallActivity_28">\r
+        <di:waypoint xsi:type="dc:Point" x="309.0" y="648.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="377.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="325.0" y="648.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_126" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="533.0" y="630.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="551.0" y="671.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_43" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="612.0" y="630.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="627.0" y="671.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="704.0" y="630.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="722.0" y="671.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_BoundaryEvent_43" targetElement="_BPMNShape_EndEvent_127">\r
+        <di:waypoint xsi:type="dc:Point" x="648.0" y="648.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="704.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="693.0" y="948.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_28" bpmnElement="CallActivity_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="377.0" y="608.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_27" targetElement="_BPMNShape_ScriptTask_127">\r
+        <di:waypoint xsi:type="dc:Point" x="399.0" y="388.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="449.0" y="388.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="439.0" y="356.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_28" targetElement="_BPMNShape_EndEvent_126">\r
+        <di:waypoint xsi:type="dc:Point" x="477.0" y="648.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="533.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="373.0" y="456.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_181" bpmnElement="ScriptTask_6">\r
+        <dc:Bounds height="80.0" width="100.0" x="299.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_130" targetElement="_BPMNShape_ScriptTask_181">\r
+        <di:waypoint xsi:type="dc:Point" x="249.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="299.0" y="230.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_181" targetElement="_BPMNShape_ScriptTask_133">\r
+        <di:waypoint xsi:type="dc:Point" x="399.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="624.0" y="233.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="624.0" y="294.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="99.0" y="294.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="99.0" y="388.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="149.0" y="388.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="500.0" y="232.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/process/Infrastructure/UpdateVfModuleVolumeInfraV1.bpmn
new file mode 100644 (file)
index 0000000..b98a4de
--- /dev/null
@@ -0,0 +1,516 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_ZBLUcCkQEeaY6ZhIaNLwzg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="UpdateVfModuleVolumeInfraV1" name="UpdateVfModuleVolumeInfraV1" isExecutable="true">\r
+    <bpmn2:endEvent id="EndEvent_4" name="TheEnd">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:callActivity id="CallActivity_completionHandler" name="Completion Handler" calledElement="CompleteMsoProcess">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="UPDVfModVol_CompletionHandlerRequest" target="CompleteMsoProcessRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="CMSO_ResponseCode" target="UPDVfModVol_CMSO_ResponseCode"/>\r
+        <camunda:out source="CMSO_ErrorResponse" target="UPDVfModVol_CMSO_ErrorResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="CallActivity_completionHandler" targetRef="ScriptTask_postProcessTemp"/>\r
+    <bpmn2:serviceTask id="ServiceTask_callUpdateInfraDb" name="Call Update Infra DB">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${UPDVfModVol_updateInfraRequest}</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">aapplication/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="UPDVfModVol_createDBResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="UPDVfModVol_dbReturnCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ServiceTask_callUpdateInfraDb" targetRef="ScriptTask_prepCompletionHandlerRequest"/>\r
+    <bpmn2:scriptTask id="ScriptTask_prepVnfRest" name="Prepare VNF Adapter Rest Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepVnfAdapterRest', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ScriptTask_prepVnfRest" targetRef="CallActivity_callVNFAdapterRest"/>\r
+    <bpmn2:scriptTask id="ScriptTask_prepCompletionHandlerRequest" name="Prep Completion Handler Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepCompletionHandlerRequest', execution, UPDVfModVol_requestId, 'UPDATE', UPDVfModVol_source, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_prepCompletionHandlerRequest" targetRef="CallActivity_completionHandler"/>\r
+    <bpmn2:callActivity id="CallActivity_callVNFAdapterRest" name="VNFAdapterRest" calledElement="vnfAdapterRestV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:out source="vnfAdapterRestV1Response" target="UPDVfModVol_vnfAdapterRestResponse"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="UPDVfModVol_vnfAdapterRestRequest" target="vnfAdapterRestV1Request"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="CallActivity_callVNFAdapterRest" targetRef="ScriptTask_prepDbInfraRequest"/>\r
+    <bpmn2:scriptTask id="ScriptTask_prepDbInfraRequest" name="Prep DB Infra Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepDbInfraDbRequest', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_prepDbInfraRequest" targetRef="ServiceTask_callUpdateInfraDb"/>\r
+    <bpmn2:scriptTask id="ScriptTask_postProcessTemp" name="Set Success" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[// The following variable is checked by the unit test
+execution.setVariable("UpdateVfModuleVolumeSuccessIndicator", true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ScriptTask_postProcessTemp" targetRef="EndEvent_4"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2">\r
+      <bpmn2:incoming>SequenceFlow_noVfModuleRelation</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_personaModelIdMatchYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:subProcess id="SubProcess_errorHandler" name="Error Handler" triggeredByEvent="true">\r
+      <bpmn2:startEvent id="StartEvent_catchAllErrors" name="Catch All Errors">\r
+        <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_77"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:endEvent id="EndEvent_3">\r
+        <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_catchAllErrors" targetRef="ScriptTask_preFalloutHandler"/>\r
+      <bpmn2:scriptTask id="ScriptTask_preFalloutHandler" name="Fallout Handler (prep)" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('prepFalloutHandler', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_preFalloutHandler" targetRef="CallActivity_falloutHandler"/>\r
+      <bpmn2:callActivity id="CallActivity_falloutHandler" name="Fallout Handler" calledElement="FalloutHandler">\r
+        <bpmn2:extensionElements>\r
+          <camunda:in source="UPDVfModVol_FalloutHandlerRequest" target="FalloutHandlerRequest"/>\r
+          <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+          <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+          <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+          <camunda:out source="FH_ResponseCode" target="UPDVfModVol_FH_ResponseCode"/>\r
+          <camunda:out source="FH_ErrorResponse" target="UPDVfModVol_FH_ErrorResponse"/>\r
+          <camunda:out source="FalloutHandlerResponse" target="UPDVfModVol_FalloutHandlerResponse"/>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      </bpmn2:callActivity>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="CallActivity_falloutHandler" targetRef="EndEvent_3"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_prepVnfRest"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_personaModelIdMatch" name="Persona Model ID match?">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_personaModelIdMatchYes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_personaModelidMatchNo</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_personaModelIdMatchYes" name="Yes" sourceRef="ExclusiveGateway_personaModelIdMatch" targetRef="ExclusiveGateway_2">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{UPDVfModVol_modelInvariantId == UPDVfModVol_personaModelId}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_personaModelidMatchNo" name="No" sourceRef="ExclusiveGateway_personaModelIdMatch" targetRef="ScriptTask_handlePersonaModelIdMismatch"/>\r
+    <bpmn2:scriptTask id="ScriptTask_queryAaiForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_YesVfModuleRelation</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('queryAAIForVfModule', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_queryAaiForVfModule" targetRef="ExclusiveGateway_personaModelIdMatch"/>\r
+    <bpmn2:scriptTask id="ScriptTask_handlePersonaModelIdMismatch" name="Handle Persona Model ID Mismatch" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_personaModelidMatchNo</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('handlePersonaModelIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="ScriptTask_handlePersonaModelIdMismatch" targetRef="EndEvent_personaModelIdMismatch"/>\r
+    <bpmn2:endEvent id="EndEvent_personaModelIdMismatch">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Pre-process Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_sendSynchResponse"/>\r
+    <bpmn2:startEvent id="StartEvent_1" camunda:asyncAfter="true" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_preProcessRequest"/>\r
+    <bpmn2:scriptTask id="ScriptTask_sendSynchResponse" name="Send Synch Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('sendSynchResponse', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_sendSynchResponse" targetRef="ScriptTask_queryAaiGenricVnf"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="VF-MODULE relation?" default="SequenceFlow_noVfModuleRelation">\r
+      <bpmn2:incoming>SequenceFlow_tenantIsMatch</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_YesVfModuleRelation</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_noVfModuleRelation</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_YesVfModuleRelation" name="Yes" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_queryAaiForVfModule">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{UPDVfModVol_relatedVfModuleLink != ''}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_noVfModuleRelation" name="No" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_isTenantMatch" name="TenantId Match?" default="SequenceFlow_NoTenantMatch">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_NoTenantMatch</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_tenantIsMatch</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_NoTenantMatch" name="No" sourceRef="ExclusiveGateway_isTenantMatch" targetRef="ScriptTask_tenantIdMismatch"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_tenantIsMatch" name="Yes" sourceRef="ExclusiveGateway_isTenantMatch" targetRef="ExclusiveGateway_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{UPDVfModVol_tenantId == UPDVfModVol_volumeGroupTenantId}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="ScriptTask_tenantIdMismatch" name="Handle TenantId Mismatch" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_NoTenantMatch</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('handleTenantIdMismatch', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_tenantIdMismatch" targetRef="EndEvent_2"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_76" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_queryAAI" name="Query AAI for Volume Group Info" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvmv = new UpdateVfModuleVolumeInfraV1()
+uvmv.executeMethod('queryAAIForVolumeGroup', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_queryAAI" targetRef="ExclusiveGateway_isTenantMatch"/>\r
+    <bpmn2:scriptTask id="ScriptTask_queryAaiGenricVnf" name="Query AAI for Generic VNF" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def uvmv = new UpdateVfModuleVolumeInfraV1()\r
+uvmv.executeMethod('queryAAIForGenericVnf', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_queryAaiGenricVnf" targetRef="ScriptTask_queryAAI"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateVfModuleVolumeInfraV1">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_62" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="37.0" width="37.0" x="191.0" y="131.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="192.0" y="173.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_StartEvent_62" targetElement="_BPMNShape_ScriptTask_231">\r
+        <di:waypoint xsi:type="dc:Point" x="227.0" y="149.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="268.0" y="149.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="268.0" y="150.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="295.0" y="150.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="248.0" y="149.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_42" bpmnElement="CallActivity_callVNFAdapterRest">\r
+        <dc:Bounds height="80.0" width="100.0" x="591.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_230" bpmnElement="ScriptTask_postProcessTemp">\r
+        <dc:Bounds height="80.0" width="109.0" x="1318.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_231" bpmnElement="ScriptTask_preProcessRequest">\r
+        <dc:Bounds height="78.0" width="109.0" x="295.0" y="111.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_232" bpmnElement="ScriptTask_sendSynchResponse">\r
+        <dc:Bounds height="76.0" width="109.0" x="454.0" y="112.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_231" targetElement="_BPMNShape_ScriptTask_232">\r
+        <di:waypoint xsi:type="dc:Point" x="403.0" y="150.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="454.0" y="150.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="418.0" y="150.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_233" bpmnElement="ScriptTask_prepDbInfraRequest">\r
+        <dc:Bounds height="80.0" width="109.0" x="730.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_101" bpmnElement="ServiceTask_callUpdateInfraDb">\r
+        <dc:Bounds height="80.0" width="109.0" x="868.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_233" targetElement="_BPMNShape_ServiceTask_101">\r
+        <di:waypoint xsi:type="dc:Point" x="838.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="868.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="853.0" y="491.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ServiceTask_101" targetElement="_BPMNShape_ScriptTask_234">\r
+        <di:waypoint xsi:type="dc:Point" x="976.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1014.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="959.0" y="497.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_234" bpmnElement="ScriptTask_prepCompletionHandlerRequest">\r
+        <dc:Bounds height="80.0" width="109.0" x="1014.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_43" bpmnElement="CallActivity_completionHandler">\r
+        <dc:Bounds height="61.0" width="109.0" x="1162.0" y="429.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_234" targetElement="_BPMNShape_CallActivity_43">\r
+        <di:waypoint xsi:type="dc:Point" x="1122.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1162.0" y="459.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1134.0" y="477.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_CallActivity_43" targetElement="_BPMNShape_ScriptTask_230">\r
+        <di:waypoint xsi:type="dc:Point" x="1270.0" y="459.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1318.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1216.0" y="521.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_235" bpmnElement="ScriptTask_queryAAI">\r
+        <dc:Bounds height="73.0" width="109.0" x="742.0" y="113.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_126" bpmnElement="ExclusiveGateway_isTenantMatch" isMarkerVisible="true">\r
+        <dc:Bounds height="34.0" width="34.0" x="931.0" y="132.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="102.0" x="898.0" y="113.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_236" bpmnElement="ScriptTask_tenantIdMismatch">\r
+        <dc:Bounds height="75.0" width="97.0" x="1064.0" y="112.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_235" targetElement="_BPMNShape_ExclusiveGateway_126">\r
+        <di:waypoint xsi:type="dc:Point" x="850.0" y="149.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="931.0" y="149.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="877.0" y="149.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_NoTenantMatch" sourceElement="_BPMNShape_ExclusiveGateway_126" targetElement="_BPMNShape_ScriptTask_236">\r
+        <di:waypoint xsi:type="dc:Point" x="965.0" y="149.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1064.0" y="149.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="986.0" y="149.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="49.0" width="49.0" x="1225.0" y="125.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1249.0" y="179.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_236" targetElement="_BPMNShape_EndEvent_169">\r
+        <di:waypoint xsi:type="dc:Point" x="1160.0" y="149.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1225.0" y="149.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1179.0" y="149.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_tenantIsMatch" sourceElement="_BPMNShape_ExclusiveGateway_126" targetElement="_BPMNShape_ExclusiveGateway_254">\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="166.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="244.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="915.0" y="173.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_CallActivity_42" targetElement="_BPMNShape_ScriptTask_233">\r
+        <di:waypoint xsi:type="dc:Point" x="691.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="730.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="712.0" y="531.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_232" targetElement="_BPMNShape_ScriptTask_318">\r
+        <di:waypoint xsi:type="dc:Point" x="562.0" y="150.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="581.0" y="150.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="581.0" y="149.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="612.0" y="149.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="578.0" y="150.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="ScriptTask_prepVnfRest">\r
+        <dc:Bounds height="80.0" width="109.0" x="454.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_237" targetElement="_BPMNShape_CallActivity_42">\r
+        <di:waypoint xsi:type="dc:Point" x="562.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="591.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="446.0" y="460.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_18" bpmnElement="SubProcess_errorHandler" isExpanded="true">\r
+        <dc:Bounds height="187.0" width="781.0" x="250.0" y="786.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="StartEvent_catchAllErrors">\r
+        <dc:Bounds height="37.0" width="37.0" x="301.0" y="844.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="98.0" x="270.0" y="886.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_238" bpmnElement="ScriptTask_preFalloutHandler">\r
+        <dc:Bounds height="61.0" width="109.0" x="445.0" y="832.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_44" bpmnElement="CallActivity_falloutHandler">\r
+        <dc:Bounds height="61.0" width="109.0" x="639.0" y="832.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_238" targetElement="_BPMNShape_CallActivity_44">\r
+        <di:waypoint xsi:type="dc:Point" x="553.0" y="862.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="639.0" y="862.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="573.0" y="946.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_170" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="37.0" width="37.0" x="862.0" y="844.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="880.0" y="886.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_CallActivity_44" targetElement="_BPMNShape_EndEvent_170">\r
+        <di:waypoint xsi:type="dc:Point" x="747.0" y="862.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="862.0" y="862.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="765.0" y="1030.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_171" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="43.0" width="43.0" x="1461.0" y="438.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="50.0" x="1457.0" y="486.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ScriptTask_230" targetElement="_BPMNShape_EndEvent_171">\r
+        <di:waypoint xsi:type="dc:Point" x="1426.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1461.0" y="459.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1442.0" y="467.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_238">\r
+        <di:waypoint xsi:type="dc:Point" x="337.0" y="862.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="445.0" y="862.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="385.0" y="1030.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_254" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="34.0" width="34.0" x="931.0" y="244.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="135.0" x="881.0" y="283.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_YesVfModuleRelation" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ScriptTask_313">\r
+        <di:waypoint xsi:type="dc:Point" x="931.0" y="261.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="634.0" y="261.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="634.0" y="262.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="405.0" y="262.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="729.0" y="261.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_313" bpmnElement="ScriptTask_queryAaiForVfModule">\r
+        <dc:Bounds height="80.0" width="109.0" x="297.0" y="222.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_255" bpmnElement="ExclusiveGateway_personaModelIdMatch" isMarkerVisible="true">\r
+        <dc:Bounds height="34.0" width="34.0" x="333.0" y="346.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="156.0" x="272.0" y="385.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_313" targetElement="_BPMNShape_ExclusiveGateway_255">\r
+        <di:waypoint xsi:type="dc:Point" x="350.0" y="302.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="350.0" y="329.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="350.0" y="346.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="347.0" y="318.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_personaModelIdMatchYes" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ExclusiveGateway_256">\r
+        <di:waypoint xsi:type="dc:Point" x="367.0" y="363.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="491.0" y="363.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="398.0" y="363.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="34.0" width="34.0" x="491.0" y="346.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="508.0" y="385.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_noVfModuleRelation" sourceElement="_BPMNShape_ExclusiveGateway_254" targetElement="_BPMNShape_ExclusiveGateway_256">\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="278.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="363.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="701.0" y="363.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="525.0" y="363.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="795.0" y="363.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_personaModelidMatchNo" sourceElement="_BPMNShape_ExclusiveGateway_255" targetElement="_BPMNShape_ScriptTask_315">\r
+        <di:waypoint xsi:type="dc:Point" x="350.0" y="380.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="350.0" y="401.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="351.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="350.0" y="409.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="ScriptTask_handlePersonaModelIdMismatch">\r
+        <dc:Bounds height="80.0" width="109.0" x="297.0" y="460.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_172" bpmnElement="EndEvent_personaModelIdMismatch">\r
+        <dc:Bounds height="43.0" width="43.0" x="330.0" y="600.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="351.0" y="648.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_315" targetElement="_BPMNShape_EndEvent_172">\r
+        <di:waypoint xsi:type="dc:Point" x="351.0" y="540.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="351.0" y="600.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="348.0" y="560.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_ScriptTask_237">\r
+        <di:waypoint xsi:type="dc:Point" x="508.0" y="380.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="508.0" y="420.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_318" bpmnElement="ScriptTask_queryAaiGenricVnf">\r
+        <dc:Bounds height="75.0" width="97.0" x="612.0" y="112.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_318" targetElement="_BPMNShape_ScriptTask_235">\r
+        <di:waypoint xsi:type="dc:Point" x="708.0" y="149.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="742.0" y="149.0"/>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn
new file mode 100644 (file)
index 0000000..158c4b7
--- /dev/null
@@ -0,0 +1,1024 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_EsMs0HcuEeW2U_kkOHX1ZQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="CompleteMsoProcess" name="CompleteMsoProcess" isExecutable="true">\r
+    <bpmn2:scriptTask id="preProcessRequest" name="Pre-Process Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def preProcessRequestData = new CompleteMsoProcess()
+preProcessRequestData.preProcessRequest(execution)
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest" targetRef="ExclusiveGateway_5"/>\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start With Message ">\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:messageEventDefinition id="MessageEventDefinition_1" messageRef="Message_2"/>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_1" targetRef="preProcessRequest"/>\r
+    <bpmn2:parallelGateway id="ExclusiveGateway_5">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_45</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_46</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_45" name="" sourceRef="ExclusiveGateway_5" targetRef="ParallelGateway_3"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_46" name="" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:exclusiveGateway id="ParallelGateway_3" name="Notification Url Present?" default="SequenceFlow_40">\r
+      <bpmn2:incoming>SequenceFlow_45</bpmn2:incoming>\r
+      <bpmn2:outgoing>if_notifcationURLExists</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="if_notifcationURLExists" name="Yes" sourceRef="ParallelGateway_3" targetRef="ExclusiveGateway_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_notification-url-Ok") ==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_40" name="No" sourceRef="ParallelGateway_3" targetRef="ParallelGateway_5"/>\r
+    <bpmn2:parallelGateway id="ExclusiveGateway_1">\r
+      <bpmn2:incoming>if_notifcationURLExists</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_87</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_73</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_87" name="" sourceRef="ExclusiveGateway_1" targetRef="UpdateFinalNotifyAckStatus"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_73" name="" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_11"/>\r
+    <bpmn2:subProcess id="subProcessExceptionCompleteMSO" name="Sub Process Exception Complete MSO" triggeredByEvent="true">\r
+      <bpmn2:endEvent id="endEventExceptionCompleteMSO">\r
+        <bpmn2:extensionElements>\r
+          <camunda:connector>\r
+            <camunda:inputOutput>\r
+              <camunda:outputParameter name="DB_ADAPTER_ERROR">${CMSO_updateRequestResponse}</camunda:outputParameter>\r
+            </camunda:inputOutput>\r
+          </camunda:connector>\r
+        </bpmn2:extensionElements>\r
+        <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="MessageEventDefinition_3"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="startEventExceptionCompleteMSO">\r
+        <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_4"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="startEventExceptionCompleteMSO" targetRef="endEventExceptionCompleteMSO"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="ScriptTask_6" name="Build Error Message" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_58</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_59</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
+import com.att.bpm.scripts.*
+def buildDataErrorMessage = new CompleteMsoProcess()
+buildDataErrorMessage.buildDataError(execution, "Complete --updateFinal NotifyAck Status Success-- Failed")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_59" name="" sourceRef="ScriptTask_6" targetRef="EndEvent_10"/>\r
+    <bpmn2:serviceTask id="updateFinalNotifyAckStatus" name="updateFinal NotifyAck Status">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CMSO_updateFinalNotifyAckStatusSuccessPayload")}]]></camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_53</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_53" name="" sourceRef="updateFinalNotifyAckStatus" targetRef="ExclusiveGateway_15"/>\r
+    <bpmn2:endEvent id="EndEvent_14">\r
+      <bpmn2:incoming>SequenceFlow_44</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_15" default="SequenceFlow_58">\r
+      <bpmn2:incoming>SequenceFlow_53</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_54</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_58</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_54" name="" sourceRef="ExclusiveGateway_15" targetRef="ParallelGateway_5">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_58" name="" sourceRef="ExclusiveGateway_15" targetRef="ScriptTask_6"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="updateFinalNotifyAckStatus">\r
+      <bpmn2:outgoing>SequenceFlow_44</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_85" errorRef="Error_1"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_44" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_14"/>\r
+    <bpmn2:parallelGateway id="ParallelGateway_9">\r
+      <bpmn2:incoming>SequenceFlow_63</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_70</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_70" name="" sourceRef="ParallelGateway_9" targetRef="prepareUpdateFinalAckStatus"/>\r
+    <bpmn2:scriptTask id="prepareUpdateFinalAckStatus" name="Prepare DB Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_70</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def updateFinal= new CompleteMsoProcess()\r
+updateFinal.updateFinalNotifyAckStatusSuccessPayload(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareUpdateFinalAckStatus" targetRef="updateFinalNotifyAckStatus"/>\r
+    <bpmn2:endEvent id="EndEvent_10">\r
+      <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_10" errorRef="Error_3"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_16" default="SequenceFlow_61">\r
+      <bpmn2:incoming>SequenceFlow_60</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_63</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="ExclusiveGateway_16" targetRef="ScriptTask_7"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_63" name="" sourceRef="ExclusiveGateway_16" targetRef="ParallelGateway_9">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="ScriptTask_7" name="Build Error Message" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_61</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_62</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
+import com.att.bpm.scripts.*
+def buildDataErrorMessage = new CompleteMsoProcess()
+buildDataErrorMessage.buildDataError(execution, "Complete -- Update Final Notify Ack Status -- Failed")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_62" name="" sourceRef="ScriptTask_7" targetRef="EndEvent_11"/>\r
+    <bpmn2:endEvent id="EndEvent_11">\r
+      <bpmn2:incoming>SequenceFlow_62</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_11" errorRef="Error_3"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_17">\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_92</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ExclusiveGateway_17" targetRef="ParallelGateway_9"/>\r
+    <bpmn2:scriptTask id="ScriptTask_1" name="Set Delivery Status Variable" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[if(execution.getVariable("CCDStatusCode")==204){\r
+       execution.setVariable("CMSO_deliveryStatus", true)\r
+}\r
+\r
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_17"/>\r
+    <bpmn2:serviceTask id="ServiceTask_1" name="Notify CCD Success">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url"><![CDATA[${execution.getVariable("CMSO_notification-url")}]]></camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="Content-Type">text/xml</camunda:entry>\r
+                <camunda:entry key="Authorization"/>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> NOTIFY CCD Payload @@@@"
+import com.att.bpm.scripts.*
+def notifyCCDSuccess = new CompleteMsoProcess()
+return notifyCCDSuccess.notifyCCDSuccessPayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CCDResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="CCDStatusCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ServiceTask_1" targetRef="ScriptTask_1"/>\r
+    <bpmn2:serviceTask id="NotifyOMXSuccessFailureViaCSI" name="Notify OMX Success Failure Via CSI">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_csi_networkstatus_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[import com.att.bpm.scripts.*
+def notifyOMXSuccessFailureViaCSI = new CompleteMsoProcess()
+return notifyOMXSuccessFailureViaCSI.notifyOMXSuccessFailureViaCSIPayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:outputParameter name="CMSO_notifyOMXSuccessFailureViaCSIResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="CMSO_notifyOMXSuccessFailureViaCSIResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+        <camunda:properties>\r
+          <camunda:property/>\r
+        </camunda:properties>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_65</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_65" name="" sourceRef="NotifyOMXSuccessFailureViaCSI" targetRef="setdeliverysuccessstatustofalse"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_11" name="OMX Source?" default="SequenceFlow_16">\r
+      <bpmn2:incoming>SequenceFlow_73</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="Yes" sourceRef="ExclusiveGateway_11" targetRef="NotifyOMXSuccessFailureViaCSI">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_source").equals("OMX")}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="No" sourceRef="ExclusiveGateway_11" targetRef="ServiceTask_1"/>\r
+    <bpmn2:scriptTask id="setdeliverysuccessstatustofalse" name="Set Delivery Status Variable" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_65</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_92</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[if(execution.getVariable("CMSO_notifyOMXSuccessFailureViaCSIResponseCode")==200){\r
+       execution.setVariable("CMSO_deliveryStatus", true)\r
+}\r
+\r
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_92" name="" sourceRef="setdeliverysuccessstatustofalse" targetRef="ExclusiveGateway_17"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_3" name="" attachedToRef="UpdateFinalNotifyAckStatus">\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_80" errorRef="Error_1"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="BoundaryEvent_3" targetRef="EndEvent_2"/>\r
+    <bpmn2:serviceTask id="UpdateFinalNotifyAckStatus" name="Update Final Notify Ack Status">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> UpdateFinalNotifyAckStatus"
+import com.att.bpm.scripts.*
+def updateFinalNotifyAckStatus= new CompleteMsoProcess()
+return updateFinalNotifyAckStatus.updateFinalNotifyAckStatusPayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_87</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_60</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_60" name="" sourceRef="UpdateFinalNotifyAckStatus" targetRef="ExclusiveGateway_16"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_13">\r
+      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ParallelGateway_7">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="ParallelGateway_7" targetRef="ParallelGateway_6"/>\r
+    <bpmn2:endEvent id="EndEvent_4">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_5" errorRef="Error_3"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_3" name="Prepare&#xD;&#xA;Update DB Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_72</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def completeMsoProcess = new CompleteMsoProcess()\r
+completeMsoProcess.setUpdateDBstatustoSuccessPayload(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_3" targetRef="updateInfraRequest"/>\r
+    <bpmn2:endEvent id="EndEvent_5">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_3"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Active Request?" default="SequenceFlow_72">\r
+      <bpmn2:incoming>SequenceFlow_46</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_72</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_81</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_72" name="No" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_3"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_81" name="Yes" sourceRef="ExclusiveGateway_3" targetRef="prepareUpdateRequest">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_request_id-Ok") ==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="BuildErrorMessage1" name="Build Error Message" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
+import com.att.bpm.scripts.*
+def buildDataErrorMessage = new CompleteMsoProcess()
+buildDataErrorMessage.buildDataError(execution, "Complete --Update DB status to SUCCESS-- Failed")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="BuildErrorMessage1" targetRef="EndEvent_5"/>\r
+    <bpmn2:scriptTask id="prepareUpdateRequest" name="Prepare&#xD;&#xA;Update DB Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_81</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_49</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def completeMsoProcess = new CompleteMsoProcess()\r
+completeMsoProcess.updateDBStatusToSuccessPayload(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_49" name="" sourceRef="prepareUpdateRequest" targetRef="updateDBStatus"/>\r
+    <bpmn2:serviceTask id="updateInfraRequest" name="Update DB status to SUCCESS">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CMSO_setUpdateDBstatustoSuccessPayload")}]]></camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="updateInfraRequest" targetRef="ExclusiveGateway_7"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_6" name="" attachedToRef="updateDBStatus">\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_83" errorRef="Error_1"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="BoundaryEvent_6" targetRef="EndEvent_12"/>\r
+    <bpmn2:scriptTask id="BuildErrorMessage" name="Build Error Message" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[//println "INSIDE --> Build Error Message @@@@"
+//println "CMSO_updateRequestResponse IS --> " + execution.getVariable("CMSO_updateRequestResponse")
+import com.att.bpm.scripts.*
+def buildDataErrorMessage = new CompleteMsoProcess()
+buildDataErrorMessage.buildDataError(execution, "Complete MSO  -- Update DB status to SUCCESS -- Failed")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="BuildErrorMessage" targetRef="EndEvent_4"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_10" default="SequenceFlow_25">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ExclusiveGateway_10" targetRef="ParallelGateway_7">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ExclusiveGateway_10" targetRef="BuildErrorMessage1"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_7" default="SequenceFlow_1">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="ExclusiveGateway_7" targetRef="ParallelGateway_7">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CMSO_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ExclusiveGateway_7" targetRef="BuildErrorMessage"/>\r
+    <bpmn2:serviceTask id="updateDBStatus" name="Update DB status to SUCCESS">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("CMSO_updateDBStatusToSuccessPayload")}]]></camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CMSO_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="CMSO_updateRequestResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_49</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="updateDBStatus" targetRef="ExclusiveGateway_10"/>\r
+    <bpmn2:endEvent id="EndEvent_12">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_7" name="" attachedToRef="updateInfraRequest">\r
+      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_84" errorRef="Error_1"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="BoundaryEvent_7" targetRef="EndEvent_13"/>\r
+    <bpmn2:exclusiveGateway id="ParallelGateway_5">\r
+      <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_54</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ParallelGateway_5" targetRef="ParallelGateway_6"/>\r
+    <bpmn2:parallelGateway id="ParallelGateway_6">\r
+      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="ParallelGateway_6" targetRef="Done"/>\r
+    <bpmn2:scriptTask id="Done" name="Prepare Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[println "INSIDE --> Complete MSO Process Done SUCCESSFULLY"
+import com.att.bpm.scripts.*
+def postProcessResponseData = new CompleteMsoProcess()
+postProcessResponseData.postProcessResponse(execution)
+println "CompleteMsoProcess Response -->" + "\n" + execution.getVariable("CompletionHandlerResponse")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="Done" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>\r
+    </bpmn2:endEvent>\r
+  </bpmn2:process>\r
+  <bpmn2:message id="Message_2" name="CompleteMsoProcessRequest"/>\r
+  <bpmn2:error id="Error_3" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmn2:error id="Error_1" errorCode="java.lang.Exception" name="Java Lang Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CompleteMsoProcess">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_41" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="156.0" y="827.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="126.0" x="144.0" y="868.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_55" bpmnElement="ExclusiveGateway_1">\r
+        <dc:Bounds height="50.0" width="50.0" x="662.0" y="506.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="687.0" y="561.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_81" bpmnElement="NotifyOMXSuccessFailureViaCSI">\r
+        <dc:Bounds height="80.0" width="100.0" x="820.0" y="253.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_82" bpmnElement="UpdateFinalNotifyAckStatus">\r
+        <dc:Bounds height="80.0" width="100.0" x="820.0" y="577.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_4" bpmnElement="ParallelGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="576.0" y="643.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="146.0" x="616.0" y="676.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="if_notifcationURLExists" sourceElement="_BPMNShape_ParallelGateway_4" targetElement="_BPMNShape_ExclusiveGateway_55">\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="643.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="531.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="662.0" y="531.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="601.0" y="573.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="updateFinalNotifyAckStatus">\r
+        <dc:Bounds height="80.0" width="100.0" x="1425.0" y="492.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_6" bpmnElement="ParallelGateway_5" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1656.0" y="643.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1681.0" y="698.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_59" bpmnElement="ExclusiveGateway_5">\r
+        <dc:Bounds height="50.0" width="50.0" x="470.0" y="819.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="495.0" y="874.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_7" bpmnElement="ParallelGateway_6">\r
+        <dc:Bounds height="50.0" width="50.0" x="1769.0" y="819.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1794.0" y="874.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ParallelGateway_6" targetElement="_BPMNShape_ParallelGateway_7">\r
+        <di:waypoint xsi:type="dc:Point" x="1706.0" y="668.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1794.0" y="668.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1794.0" y="819.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1791.0" y="617.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_34" bpmnElement="preProcessRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="324.0" y="805.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_34" targetElement="_BPMNShape_ExclusiveGateway_59">\r
+        <di:waypoint xsi:type="dc:Point" x="424.0" y="845.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="470.0" y="844.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="433.0" y="845.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_41" targetElement="_BPMNShape_ScriptTask_34">\r
+        <di:waypoint xsi:type="dc:Point" x="192.0" y="845.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="324.0" y="845.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="221.0" y="845.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_60" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="734.0" y="1068.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="100.0" x="782.0" y="1083.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_9" bpmnElement="ParallelGateway_7" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1214.0" y="1068.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1239.0" y="1123.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ParallelGateway_9" targetElement="_BPMNShape_ParallelGateway_7">\r
+        <di:waypoint xsi:type="dc:Point" x="1264.0" y="1093.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1794.0" y="1093.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1794.0" y="869.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1688.0" y="1149.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ParallelGateway_4" targetElement="_BPMNShape_ParallelGateway_6">\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="693.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="813.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1187.0" y="813.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1681.0" y="813.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1681.0" y="693.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="604.0" y="737.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_51" bpmnElement="updateInfraRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="973.0" y="1144.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_52" bpmnElement="updateDBStatus">\r
+        <dc:Bounds height="80.0" width="100.0" x="970.0" y="963.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_47" bpmnElement="SequenceFlow_45" sourceElement="_BPMNShape_ExclusiveGateway_59" targetElement="_BPMNShape_ParallelGateway_4">\r
+        <di:waypoint xsi:type="dc:Point" x="495.0" y="819.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="495.0" y="668.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="576.0" y="668.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="492.0" y="973.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_64" bpmnElement="prepareUpdateRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="822.0" y="963.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_48" bpmnElement="SequenceFlow_46" sourceElement="_BPMNShape_ExclusiveGateway_59" targetElement="_BPMNShape_ExclusiveGateway_60">\r
+        <di:waypoint xsi:type="dc:Point" x="495.0" y="869.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="495.0" y="1093.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="734.0" y="1093.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="492.0" y="990.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_50" bpmnElement="SequenceFlow_49" sourceElement="_BPMNShape_ScriptTask_64" targetElement="_BPMNShape_ScriptTask_52">\r
+        <di:waypoint xsi:type="dc:Point" x="922.0" y="1003.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="970.0" y="1003.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="937.0" y="1003.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_73" bpmnElement="setdeliverysuccessstatustofalse">\r
+        <dc:Bounds height="80.0" width="100.0" x="959.0" y="253.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_11" bpmnElement="ParallelGateway_9">\r
+        <dc:Bounds height="50.0" width="50.0" x="1200.0" y="506.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1225.0" y="561.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_71" bpmnElement="SequenceFlow_70" sourceElement="_BPMNShape_ParallelGateway_11" targetElement="_BPMNShape_ScriptTask_326">\r
+        <di:waypoint xsi:type="dc:Point" x="1250.0" y="531.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1284.0" y="532.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1109.0" y="531.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_73" bpmnElement="SequenceFlow_72" sourceElement="_BPMNShape_ExclusiveGateway_60" targetElement="_BPMNShape_ScriptTask_88">\r
+        <di:waypoint xsi:type="dc:Point" x="759.0" y="1118.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="759.0" y="1184.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="822.0" y="1184.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="761.0" y="1141.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_82" bpmnElement="SequenceFlow_81" sourceElement="_BPMNShape_ExclusiveGateway_60" targetElement="_BPMNShape_ScriptTask_64">\r
+        <di:waypoint xsi:type="dc:Point" x="759.0" y="1068.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="759.0" y="1003.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="822.0" y="1003.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="758.0" y="1022.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_88" bpmnElement="SequenceFlow_87" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_ServiceTask_82">\r
+        <di:waypoint xsi:type="dc:Point" x="687.0" y="556.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="687.0" y="617.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="617.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="686.0" y="573.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_13" bpmnElement="subProcessExceptionCompleteMSO" isExpanded="true">\r
+        <dc:Bounds height="169.0" width="427.0" x="264.0" y="1388.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_110" bpmnElement="endEventExceptionCompleteMSO">\r
+        <dc:Bounds height="36.0" width="36.0" x="564.0" y="1455.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="582.0" y="1496.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_51" bpmnElement="startEventExceptionCompleteMSO">\r
+        <dc:Bounds height="36.0" width="36.0" x="360.0" y="1455.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="378.0" y="1496.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_63" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1132.0" y="1158.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1157.0" y="1213.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_51" targetElement="_BPMNShape_ExclusiveGateway_63">\r
+        <di:waypoint xsi:type="dc:Point" x="1073.0" y="1184.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1132.0" y="1183.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1255.0" y="1227.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_63" targetElement="_BPMNShape_ParallelGateway_9">\r
+        <di:waypoint xsi:type="dc:Point" x="1182.0" y="1183.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1239.0" y="1183.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1239.0" y="1118.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1158.0" y="1141.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_111" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1269.0" y="1271.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1287.0" y="1312.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_76" bpmnElement="BuildErrorMessage">\r
+        <dc:Bounds height="80.0" width="100.0" x="1108.0" y="1249.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ExclusiveGateway_63" targetElement="_BPMNShape_ScriptTask_76">\r
+        <di:waypoint xsi:type="dc:Point" x="1157.0" y="1208.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1158.0" y="1249.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1199.0" y="1035.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_76" targetElement="_BPMNShape_EndEvent_111">\r
+        <di:waypoint xsi:type="dc:Point" x="1208.0" y="1289.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1269.0" y="1289.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1236.0" y="1289.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_77" bpmnElement="Done">\r
+        <dc:Bounds height="80.0" width="100.0" x="1860.0" y="805.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_66" bpmnElement="ExclusiveGateway_10" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1132.0" y="977.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1157.0" y="1032.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_52" targetElement="_BPMNShape_ExclusiveGateway_66">\r
+        <di:waypoint xsi:type="dc:Point" x="1070.0" y="1003.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1132.0" y="1002.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1261.0" y="1003.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_66" targetElement="_BPMNShape_ParallelGateway_9">\r
+        <di:waypoint xsi:type="dc:Point" x="1182.0" y="1002.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1239.0" y="1002.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1239.0" y="1068.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1348.0" y="1003.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="BuildErrorMessage1">\r
+        <dc:Bounds height="80.0" width="100.0" x="1108.0" y="856.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ExclusiveGateway_66" targetElement="_BPMNShape_ScriptTask_79">\r
+        <di:waypoint xsi:type="dc:Point" x="1157.0" y="977.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1158.0" y="936.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1242.0" y="957.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_113" bpmnElement="EndEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="1269.0" y="878.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1287.0" y="919.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ParallelGateway_7" targetElement="_BPMNShape_ScriptTask_77">\r
+        <di:waypoint xsi:type="dc:Point" x="1819.0" y="844.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1860.0" y="845.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1806.0" y="845.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_71" bpmnElement="ExclusiveGateway_15" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1571.0" y="506.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1596.0" y="561.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_53" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ExclusiveGateway_71">\r
+        <di:waypoint xsi:type="dc:Point" x="1525.0" y="532.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1571.0" y="531.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1544.0" y="532.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_55" bpmnElement="SequenceFlow_54" sourceElement="_BPMNShape_ExclusiveGateway_71" targetElement="_BPMNShape_ParallelGateway_6">\r
+        <di:waypoint xsi:type="dc:Point" x="1621.0" y="531.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1681.0" y="531.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1681.0" y="643.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1463.0" y="531.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_83" bpmnElement="ScriptTask_6">\r
+        <dc:Bounds height="80.0" width="100.0" x="1546.0" y="381.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_59" bpmnElement="SequenceFlow_58" sourceElement="_BPMNShape_ExclusiveGateway_71" targetElement="_BPMNShape_ScriptTask_83">\r
+        <di:waypoint xsi:type="dc:Point" x="1596.0" y="506.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1596.0" y="461.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1574.0" y="484.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="EndEvent_10">\r
+        <dc:Bounds height="36.0" width="36.0" x="1684.0" y="403.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1702.0" y="444.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ScriptTask_83" targetElement="_BPMNShape_EndEvent_118">\r
+        <di:waypoint xsi:type="dc:Point" x="1646.0" y="421.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1684.0" y="421.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1476.0" y="421.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_72" bpmnElement="ExclusiveGateway_16" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="967.0" y="591.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="992.0" y="646.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_61" bpmnElement="SequenceFlow_60" sourceElement="_BPMNShape_ServiceTask_82" targetElement="_BPMNShape_ExclusiveGateway_72">\r
+        <di:waypoint xsi:type="dc:Point" x="920.0" y="617.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="967.0" y="616.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="937.0" y="617.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_84" bpmnElement="ScriptTask_7">\r
+        <dc:Bounds height="80.0" width="100.0" x="943.0" y="681.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_62" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ExclusiveGateway_72" targetElement="_BPMNShape_ScriptTask_84">\r
+        <di:waypoint xsi:type="dc:Point" x="992.0" y="641.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="992.0" y="666.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="993.0" y="666.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="993.0" y="681.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1006.0" y="638.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_119" bpmnElement="EndEvent_11">\r
+        <dc:Bounds height="36.0" width="36.0" x="1081.0" y="703.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1099.0" y="744.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_63" bpmnElement="SequenceFlow_62" sourceElement="_BPMNShape_ScriptTask_84" targetElement="_BPMNShape_EndEvent_119">\r
+        <di:waypoint xsi:type="dc:Point" x="1043.0" y="721.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1081.0" y="721.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="990.0" y="704.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_64" bpmnElement="SequenceFlow_63" sourceElement="_BPMNShape_ExclusiveGateway_72" targetElement="_BPMNShape_ParallelGateway_11">\r
+        <di:waypoint xsi:type="dc:Point" x="1017.0" y="616.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1225.0" y="616.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1225.0" y="556.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="963.0" y="617.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_66" bpmnElement="SequenceFlow_65" sourceElement="_BPMNShape_ServiceTask_81" targetElement="_BPMNShape_ScriptTask_73">\r
+        <di:waypoint xsi:type="dc:Point" x="920.0" y="293.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="959.0" y="293.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="941.0" y="343.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_74" bpmnElement="SequenceFlow_73" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_ExclusiveGateway_85">\r
+        <di:waypoint xsi:type="dc:Point" x="687.0" y="506.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="687.0" y="397.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="742.0" y="397.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="765.0" y="515.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="SequenceFlow_92" sourceElement="_BPMNShape_ScriptTask_73" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="1059.0" y="293.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1132.0" y="293.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1132.0" y="372.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1137.0" y="346.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_EndEvent_113">\r
+        <di:waypoint xsi:type="dc:Point" x="1208.0" y="896.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1269.0" y="896.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1225.0" y="896.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_85" bpmnElement="ExclusiveGateway_11" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="742.0" y="372.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="86.0" x="789.0" y="394.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ExclusiveGateway_85" targetElement="_BPMNShape_ServiceTask_81">\r
+        <di:waypoint xsi:type="dc:Point" x="767.0" y="372.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="768.0" y="293.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="293.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="771.0" y="335.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_17" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1107.0" y="372.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1132.0" y="427.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ParallelGateway_11">\r
+        <di:waypoint xsi:type="dc:Point" x="1157.0" y="397.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1225.0" y="397.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1225.0" y="506.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1210.0" y="475.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_85" targetElement="_BPMNShape_ServiceTask_94">\r
+        <di:waypoint xsi:type="dc:Point" x="767.0" y="422.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="768.0" y="487.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="487.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="774.0" y="443.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_94" bpmnElement="ServiceTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="820.0" y="447.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ServiceTask_94" targetElement="_BPMNShape_ScriptTask_86">\r
+        <di:waypoint xsi:type="dc:Point" x="920.0" y="487.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="959.0" y="487.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="933.0" y="487.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_86" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="959.0" y="447.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_86" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="1059.0" y="487.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1132.0" y="487.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1132.0" y="422.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1072.0" y="507.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_128" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="2077.0" y="827.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="2095.0" y="868.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_77" targetElement="_BPMNShape_EndEvent_128">\r
+        <di:waypoint xsi:type="dc:Point" x="1960.0" y="845.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="2077.0" y="845.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1982.0" y="845.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_23" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1458.0" y="474.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1473.0" y="515.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_25" bpmnElement="BoundaryEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="851.0" y="639.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="866.0" y="680.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_28" bpmnElement="BoundaryEvent_6">\r
+        <dc:Bounds height="36.0" width="36.0" x="1001.0" y="945.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1016.0" y="986.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_29" bpmnElement="BoundaryEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="1002.0" y="1206.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1292.0" y="1088.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_215" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="851.0" y="708.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="869.0" y="749.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_BoundaryEvent_25" targetElement="_BPMNShape_EndEvent_215">\r
+        <di:waypoint xsi:type="dc:Point" x="869.0" y="675.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="869.0" y="708.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="866.0" y="684.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_218" bpmnElement="EndEvent_12">\r
+        <dc:Bounds height="36.0" width="36.0" x="1001.0" y="864.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1019.0" y="905.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_BoundaryEvent_28" targetElement="_BPMNShape_EndEvent_218">\r
+        <di:waypoint xsi:type="dc:Point" x="1019.0" y="945.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1019.0" y="900.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1180.0" y="927.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_13">\r
+        <dc:Bounds height="36.0" width="36.0" x="1002.0" y="1292.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1020.0" y="1333.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_BoundaryEvent_29" targetElement="_BPMNShape_EndEvent_219">\r
+        <di:waypoint xsi:type="dc:Point" x="1020.0" y="1242.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1020.0" y="1292.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="847.0" y="747.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_14">\r
+        <dc:Bounds height="36.0" width="36.0" x="1458.0" y="395.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1476.0" y="436.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_46" bpmnElement="SequenceFlow_44" sourceElement="_BPMNShape_BoundaryEvent_23" targetElement="_BPMNShape_EndEvent_220">\r
+        <di:waypoint xsi:type="dc:Point" x="1476.0" y="474.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1476.0" y="431.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1369.0" y="474.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_88" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="822.0" y="1144.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_88" targetElement="_BPMNShape_ScriptTask_51">\r
+        <di:waypoint xsi:type="dc:Point" x="922.0" y="1184.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="973.0" y="1184.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="939.0" y="1208.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_326" bpmnElement="prepareUpdateFinalAckStatus">\r
+        <dc:Bounds height="80.0" width="100.0" x="1284.0" y="492.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_326" targetElement="_BPMNShape_ServiceTask_86">\r
+        <di:waypoint xsi:type="dc:Point" x="1384.0" y="532.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1425.0" y="532.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1366.0" y="532.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_StartEvent_51" targetElement="_BPMNShape_EndEvent_110">\r
+        <di:waypoint xsi:type="dc:Point" x="396.0" y="1473.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="564.0" y="1473.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="519.0" y="1473.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModule.bpmn
new file mode 100644 (file)
index 0000000..46b4e1f
--- /dev/null
@@ -0,0 +1,830 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_pNTO8MRhEeWv36YLr7PC3Q" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DoCreateVfModule" name="DoCreateVfModule" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="PreProcessRequest"/>\r
+    <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="DoCreateVfModule">\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+      <bpmn2:linkEventDefinition id="_LinkEventDefinition_26" name="DoCreateVfModule"/>\r
+    </bpmn2:intermediateCatchEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateCatchEvent_1" targetRef="IsVolumeGroupIdSpecified"/>\r
+    <bpmn2:exclusiveGateway id="IsVolumeGroupIdSpecified" name="Is volume_group_id specified?" default="SequenceFlow_11">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="no" sourceRef="IsVolumeGroupIdSpecified" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:callActivity id="ConfirmVolumeGroupTenant" name="Confirm Volume Group Tenant" calledElement="ConfirmVolumeGroupTenant">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFM_volumeGroupId" target="volumeGroupId"/>\r
+        <camunda:in source="DCVFM_tenantId" target="tenantId"/>\r
+        <camunda:in source="DCVFM_cloudRegionForVolume" target="aicCloudRegion"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="ConfirmVolumeGroupTenantResponse" target="DCVFM_volumeGroupStackId"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_43</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ConfirmVolumeGroupTenant" targetRef="IsVolumeGroupNameSpecified"/>\r
+    <bpmn2:exclusiveGateway id="IsVolumeGroupNameSpecified" name="Is volume_group_name specified?" default="SequenceFlow_21">\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="IsVolumeGroupNameSpecified" targetRef="ConfirmVolumeName">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupNamePresent(execution)]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="IsVolumeGroupNameSpecified" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:callActivity id="ConfirmVolumeName" name="Confirm Volume Group Name" calledElement="ConfirmVolumeGroupName">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFM_volumeGroupId" target="ConfirmVolumeGroupName_volumeGroupId"/>\r
+        <camunda:in source="DCVFM_volumeGroupName" target="ConfirmVolumeGroupName_volumeGroupName"/>\r
+        <camunda:in source="DCVFM_cloudRegionForVolume" target="ConfirmVolumeGroupName_aicCloudRegion"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="WorkflowResponse" target="DCVM_confirmResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ConfirmVolumeName" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_4">\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_4" targetRef="CreateAAIVfModule"/>\r
+    <bpmn2:callActivity id="CallSDNCAdapterVDModuleTopologyAssign" name="Call SDNC Adapter: VF Module Topology Assign" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFM_assignSDNCRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="sdncAdapterResponse" target="DCVFM_assignSDNCAdapterResponse"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="PostProcessSDNCAssignRequest" name="PostProcess SDNC Assign  Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "assign")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:scriptTask id="PreProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCAssignRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterVDModuleTopologyAssign"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="CallSDNCAdapterVDModuleTopologyAssign" targetRef="PostProcessSDNCAssignRequest"/>\r
+    <bpmn2:scriptTask id="PreProcessSDNCGetRequest" name="PreProcess SDNC GET Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCGetRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="CallSDNCAdapterVFModuleTopologyGET" name="Call SDNC Adapter: VF Module Topology GET" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFM_getSDNCRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="sdncAdapterResponse" target="DCVFM_getSDNCAdapterResponse"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="PreProcessSDNCGetRequest"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="PreProcessSDNCGetRequest" targetRef="CallSDNCAdapterVFModuleTopologyGET"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="CallSDNCAdapterVFModuleTopologyGET" targetRef="PostProcessSDNCGetRequest"/>\r
+    <bpmn2:scriptTask id="PostProcessSDNCGetRequest" name="PostProcess SDNC GET Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+String response = execution.getVariable("DCVFM_getSDNCAdapterResponse")
+
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "get")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="UpdateAAIVfModule_1" name="UpdateAAIVfModule" calledElement="UpdateAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFM_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="WorkflowResponse" target="DCVM_updateAAIVfModuleResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="PreProcessUpdateAAIVfModule_1" name="PreProcess Update AAIVfModule" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessUpdateAAIVfModuleRequestOrch(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:scriptTask id="PreProcessSDNCActivateRequest" name="PreProcess SDNC Activate Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessSDNCActivateRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="CallSDNCAdapterVFModuleTopologyActivate" name="Call SDNC Adapter: VF Module Topology Activate" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFM_activateSDNCRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="sdncAdapterResponse" target="DCVFM_activateSDNCAdapterResponse"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="PostProcessSDNCActivateRequest" name="PostProcess SDNC Activate Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+      
+      String response = execution.getVariable("DCVFM_activateSDNCAdapterResponse")
+      
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.validateSDNCResponse(execution, response, "activate")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Is volume_group_id specified?" default="SequenceFlow_30">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="ExclusiveGateway_5" targetRef="PrepareCreateAAIVfModuleVolumeGroupRequest">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_30" name="no" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_6"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="PreProcessUpdateAAIVfModule_1" targetRef="UpdateAAIVfModule_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="UpdateAAIVfModule_1" targetRef="PreProcessSDNCActivateRequest"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PreProcessSDNCActivateRequest" targetRef="CallSDNCAdapterVFModuleTopologyActivate"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="CallSDNCAdapterVFModuleTopologyActivate" targetRef="PostProcessSDNCActivateRequest"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PostProcessSDNCActivateRequest" targetRef="ExclusiveGateway_5"/>\r
+    <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="UpdateAndActivate">\r
+      <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>\r
+      <bpmn2:linkEventDefinition id="_LinkEventDefinition_30" name="UpdateAndActivate"/>\r
+    </bpmn2:intermediateCatchEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="IntermediateCatchEvent_3" targetRef="PreProcessUpdateAAIVfModule_1"/>\r
+    <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_2" name="Provision">\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:linkEventDefinition id="_LinkEventDefinition_29" name="Provision"/>\r
+    </bpmn2:intermediateCatchEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="IntermediateCatchEvent_2" targetRef="PreProcessSDNCAssignRequest"/>\r
+    <bpmn2:scriptTask id="PrepareCreateAAIVfModuleVolumeGroupRequest" name="Prepare CreateAAIVfModuleVolumeGroup Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def doCreateVfModule = new DoCreateVfModule()\r
+doCreateVfModule.prepareCreateAAIVfModuleVolumeGroupRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="CreateAAIVfModuleVolumeGroup" name="CreateAAIVfModuleVolumeGroup" calledElement="CreateAAIVfModuleVolumeGroup">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFM_createAAIVfModuleVolumeGroupRequest" target="CreateAAIVfModuleVolumeGroupRequest"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="WorkflowResponse" target="DCVM_updateAAIVfModuleResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="CreateAAIVfModuleVolumeGroup" targetRef="ExclusiveGateway_6"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PrepareCreateAAIVfModuleVolumeGroupRequest" targetRef="CreateAAIVfModuleVolumeGroup"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_6">\r
+      <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ExclusiveGateway_6" targetRef="ScriptTask_setSuccess"/>\r
+    <bpmn2:scriptTask id="PreProcessVNFAdapterRequest" name="PreProcess VNF Adapter Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessVNFAdapterRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="CallVNFAdapterVFModuleCreate" name="Call VNF Adapter to create VF Module" calledElement="vnfAdapterRestV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFM_createVnfARequest" target="vnfAdapterRestV1Request"/>\r
+        <camunda:out source="vnfAdapterRestV1Response" target="DCVFM_createVnfAResponse"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in variables="all"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="PostProcessVNFAdapterRequest" name="PostProcess VNF Adapter Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessVNFAdapterRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="To UpdateAndActivate">\r
+      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>\r
+      <bpmn2:linkEventDefinition id="_LinkEventDefinition_31" name="UpdateAndActivate"/>\r
+    </bpmn2:intermediateThrowEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="PostProcessSDNCGetRequest" targetRef="PreProcessVNFAdapterRequest"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="PreProcessVNFAdapterRequest" targetRef="CallVNFAdapterVFModuleCreate"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="CallVNFAdapterVFModuleCreate" targetRef="PostProcessVNFAdapterRequest"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="PostProcessVNFAdapterRequest" targetRef="IntermediateThrowEvent_2"/>\r
+    <bpmn2:callActivity id="CreateAAIVfModule" name="CreateAAIVfModule" calledElement="CreateAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="CreateAAIVfModuleRequest" target="CreateAAIVfModuleRequest"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:in source="isVidRequest" target="isVidRequest"/>\r
+        <camunda:in source="newVfModuleId" target="newVfModuleId"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="CreateAAIVfModuleResponse" target="DCVFM_createVfModuleResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_3" name="To Provision">\r
+      <bpmn2:incoming>SequenceFlow_41</bpmn2:incoming>\r
+      <bpmn2:linkEventDefinition id="_LinkEventDefinition_28" name="Provision"/>\r
+    </bpmn2:intermediateThrowEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2">\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_41</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:scriptTask id="PostProcessCreateAAIVfModule" name="PostProcess CreateAAIVfModule" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.postProcessCreateAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="CreateAAIVfModule" targetRef="PostProcessCreateAAIVfModule"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="PostProcessCreateAAIVfModule" targetRef="IsBaseVfModule"/>\r
+    <bpmn2:exclusiveGateway id="IsBaseVfModule" name="Is Base VF Module?" default="SequenceFlow_36">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_36" name="no" sourceRef="IsBaseVfModule" targetRef="QueryAAIVfModule"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="yes" sourceRef="IsBaseVfModule" targetRef="ExclusiveGateway_2">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DCVFM_isBaseVfModule") == "true"]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="QueryAAIVfModule" name="Query AAI Vf Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="QueryAAIVfModule" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="ExclusiveGateway_2" targetRef="IntermediateThrowEvent_3"/>\r
+    <bpmn2:scriptTask id="ScriptTask_setSuccess" name="Set Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.setSuccessIndicator(execution, true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_setSuccess" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_8"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="QueryCloudRegion" name="Query Cloud Region" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_43</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.queryCloudRegion(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_40" name="yes" sourceRef="IsVolumeGroupIdSpecified" targetRef="QueryCloudRegion">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+return doCreateVfModule.isVolumeGroupIdPresent(execution)]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_43" name="" sourceRef="QueryCloudRegion" targetRef="ConfirmVolumeGroupTenant"/>\r
+    <bpmn2:subProcess id="SubProcess_1" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="ScriptTask_1" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.processBPMNException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_2"/>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_1"/>\r
+      <bpmn2:endEvent id="EndEvent_2">\r
+        <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModule = new DoCreateVfModule()
+doCreateVfModule.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="PreProcessRequest" targetRef="IntermediateThrowEvent_1"/>\r
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="To DoCreateVfModule">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:linkEventDefinition id="_LinkEventDefinition_25" name="DoCreateVfModule"/>\r
+    </bpmn2:intermediateThrowEvent>\r
+  </bpmn2:process>\r
+  <bpmn2:message id="Message_1" name="DoCreateVfModuleRequest"/>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModule">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_50" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="41.0" y="231.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">\r
+        <di:waypoint xsi:type="dc:Point" x="77.0" y="249.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="150.0" y="249.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="99.0" y="249.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="150.0" y="209.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_156" bpmnElement="CreateAAIVfModule">\r
+        <dc:Bounds height="92.0" width="121.0" x="696.0" y="348.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_24" bpmnElement="IntermediateCatchEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="36.0" y="376.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="114.0" x="0.0" y="417.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_22" bpmnElement="IntermediateThrowEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="338.0" y="231.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="132.0" x="290.0" y="272.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_157" bpmnElement="CallSDNCAdapterVDModuleTopologyAssign">\r
+        <dc:Bounds height="94.0" width="121.0" x="266.0" y="672.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="CallSDNCAdapterVFModuleTopologyGET">\r
+        <dc:Bounds height="97.0" width="133.0" x="744.0" y="670.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_90" bpmnElement="IsVolumeGroupIdSpecified" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="144.0" y="368.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="178.0" x="89.0" y="347.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ConfirmVolumeGroupTenant">\r
+        <dc:Bounds height="89.0" width="118.0" x="209.0" y="528.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_91" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="559.0" y="368.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="584.0" y="423.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ExclusiveGateway_91">\r
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="559.0" y="393.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="209.0" y="393.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="CallVNFAdapterVFModuleCreate">\r
+        <dc:Bounds height="97.0" width="121.0" x="1236.0" y="672.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="UpdateAAIVfModule_1">\r
+        <dc:Bounds height="97.0" width="117.0" x="268.0" y="816.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="CallSDNCAdapterVFModuleTopologyActivate">\r
+        <dc:Bounds height="99.0" width="119.0" x="590.0" y="814.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_92" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="935.0" y="839.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="178.0" x="886.0" y="811.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="CreateAAIVfModuleVolumeGroup">\r
+        <dc:Bounds height="112.0" width="121.0" x="1193.0" y="972.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_92" targetElement="_BPMNShape_Task_7">\r
+        <di:waypoint xsi:type="dc:Point" x="960.0" y="889.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="960.0" y="1028.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1020.0" y="1028.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="947.0" y="914.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_93" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1318.0" y="840.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1343.0" y="895.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_176" targetElement="_BPMNShape_ExclusiveGateway_93">\r
+        <di:waypoint xsi:type="dc:Point" x="1313.0" y="1028.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1343.0" y="1028.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1343.0" y="930.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1343.0" y="890.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1336.0" y="1028.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_92" targetElement="_BPMNShape_ExclusiveGateway_93">\r
+        <di:waypoint xsi:type="dc:Point" x="985.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1151.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1151.0" y="865.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1318.0" y="865.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="1015.0" y="864.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_IntermediateCatchEvent_24" targetElement="_BPMNShape_ExclusiveGateway_90">\r
+        <di:waypoint xsi:type="dc:Point" x="72.0" y="394.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="120.0" y="394.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="120.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="144.0" y="393.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="117.0" y="394.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_101" bpmnElement="IsVolumeGroupNameSpecified" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="360.0" y="547.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="200.0" x="309.0" y="496.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_ExclusiveGateway_101">\r
+        <di:waypoint xsi:type="dc:Point" x="327.0" y="572.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="360.0" y="572.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="338.0" y="572.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_3" bpmnElement="ConfirmVolumeName">\r
+        <dc:Bounds height="89.0" width="109.0" x="453.0" y="528.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_101" targetElement="_BPMNShape_Task_3">\r
+        <di:waypoint xsi:type="dc:Point" x="410.0" y="572.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="453.0" y="572.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="410.0" y="576.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_101" targetElement="_BPMNShape_ExclusiveGateway_91">\r
+        <di:waypoint xsi:type="dc:Point" x="385.0" y="547.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="385.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="559.0" y="393.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="392.0" y="450.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_Task_3" targetElement="_BPMNShape_ExclusiveGateway_91">\r
+        <di:waypoint xsi:type="dc:Point" x="561.0" y="572.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="584.0" y="572.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="584.0" y="418.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="581.0" y="492.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_IntermediateThrowEvent_22">\r
+        <di:waypoint xsi:type="dc:Point" x="250.0" y="249.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="338.0" y="249.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="287.0" y="249.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_91" targetElement="_BPMNShape_ScriptTask_156">\r
+        <di:waypoint xsi:type="dc:Point" x="609.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="628.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="628.0" y="394.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="696.0" y="394.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="633.0" y="394.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="PreProcessSDNCAssignRequest">\r
+        <dc:Bounds height="94.0" width="121.0" x="109.0" y="674.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="PostProcessSDNCAssignRequest">\r
+        <dc:Bounds height="94.0" width="121.0" x="435.0" y="674.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_44" bpmnElement="IntermediateThrowEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="1537.0" y="374.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="76.0" x="1517.0" y="415.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_29" bpmnElement="IntermediateCatchEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="24.0" y="706.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="58.0" x="13.0" y="747.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_IntermediateCatchEvent_29" targetElement="_BPMNShape_ScriptTask_178">\r
+        <di:waypoint xsi:type="dc:Point" x="60.0" y="724.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="81.0" y="724.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="81.0" y="721.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="109.0" y="721.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="78.0" y="722.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_ScriptTask_157">\r
+        <di:waypoint xsi:type="dc:Point" x="229.0" y="721.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="248.0" y="721.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="248.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="266.0" y="719.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ScriptTask_179">\r
+        <di:waypoint xsi:type="dc:Point" x="386.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="411.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="411.0" y="721.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="435.0" y="721.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_213" bpmnElement="PreProcessSDNCGetRequest">\r
+        <dc:Bounds height="94.0" width="121.0" x="588.0" y="672.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_214" bpmnElement="PostProcessSDNCGetRequest">\r
+        <dc:Bounds height="94.0" width="121.0" x="924.0" y="672.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_ScriptTask_213">\r
+        <di:waypoint xsi:type="dc:Point" x="555.0" y="721.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="572.0" y="721.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="572.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="588.0" y="719.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_213" targetElement="_BPMNShape_ScriptTask_158">\r
+        <di:waypoint xsi:type="dc:Point" x="708.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="726.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="726.0" y="718.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="744.0" y="718.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_ScriptTask_214">\r
+        <di:waypoint xsi:type="dc:Point" x="876.0" y="718.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="899.0" y="718.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="899.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="924.0" y="719.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="897.0" y="719.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="PreProcessUpdateAAIVfModule_1">\r
+        <dc:Bounds height="97.0" width="118.0" x="109.0" y="816.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_33" bpmnElement="PreProcessSDNCActivateRequest">\r
+        <dc:Bounds height="98.0" width="118.0" x="435.0" y="815.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_4" bpmnElement="PostProcessSDNCActivateRequest">\r
+        <dc:Bounds height="95.0" width="121.0" x="752.0" y="816.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ScriptTask_174">\r
+        <di:waypoint xsi:type="dc:Point" x="227.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="268.0" y="864.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_174" targetElement="_BPMNShape_Task_33">\r
+        <di:waypoint xsi:type="dc:Point" x="384.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="435.0" y="864.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_Task_33" targetElement="_BPMNShape_ScriptTask_175">\r
+        <di:waypoint xsi:type="dc:Point" x="553.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="571.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="571.0" y="863.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="590.0" y="863.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_175" targetElement="_BPMNShape_Task_4">\r
+        <di:waypoint xsi:type="dc:Point" x="708.0" y="863.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="752.0" y="863.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_4" targetElement="_BPMNShape_ExclusiveGateway_92">\r
+        <di:waypoint xsi:type="dc:Point" x="872.0" y="863.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="904.0" y="863.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="904.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="935.0" y="864.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_175" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1620.0" y="846.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1638.0" y="887.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_93" targetElement="_BPMNShape_ScriptTask_218">\r
+        <di:waypoint xsi:type="dc:Point" x="1368.0" y="865.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="865.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="863.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1433.0" y="863.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1378.0" y="865.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_45" bpmnElement="IntermediateThrowEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1596.0" y="702.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="134.0" x="1547.0" y="743.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_30" bpmnElement="IntermediateCatchEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="24.0" y="846.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="116.0" x="0.0" y="887.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_IntermediateCatchEvent_30" targetElement="_BPMNShape_Task_2">\r
+        <di:waypoint xsi:type="dc:Point" x="60.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="109.0" y="864.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="86.0" y="864.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_7" bpmnElement="PrepareCreateAAIVfModuleVolumeGroupRequest">\r
+        <dc:Bounds height="112.0" width="121.0" x="1020.0" y="972.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_Task_7" targetElement="_BPMNShape_ScriptTask_176">\r
+        <di:waypoint xsi:type="dc:Point" x="1140.0" y="1028.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1193.0" y="1028.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_25" bpmnElement="PreProcessVNFAdapterRequest">\r
+        <dc:Bounds height="96.0" width="121.0" x="1073.0" y="672.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_35" bpmnElement="PostProcessVNFAdapterRequest">\r
+        <dc:Bounds height="92.0" width="116.0" x="1397.0" y="674.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_214" targetElement="_BPMNShape_Task_25">\r
+        <di:waypoint xsi:type="dc:Point" x="1044.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1059.0" y="719.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1059.0" y="720.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1073.0" y="720.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_Task_25" targetElement="_BPMNShape_ScriptTask_173">\r
+        <di:waypoint xsi:type="dc:Point" x="1193.0" y="720.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1236.0" y="720.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_Task_35">\r
+        <di:waypoint xsi:type="dc:Point" x="1356.0" y="720.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1397.0" y="720.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_Task_35" targetElement="_BPMNShape_IntermediateThrowEvent_45">\r
+        <di:waypoint xsi:type="dc:Point" x="1513.0" y="720.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1596.0" y="720.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_215" bpmnElement="QueryAAIVfModule">\r
+        <dc:Bounds height="92.0" width="125.0" x="1224.0" y="516.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_211" bpmnElement="IsBaseVfModule" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1128.0" y="368.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="124.0" x="1092.0" y="336.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_212" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1408.0" y="368.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1433.0" y="423.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ExclusiveGateway_211" targetElement="_BPMNShape_ScriptTask_215">\r
+        <di:waypoint xsi:type="dc:Point" x="1153.0" y="418.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1153.0" y="562.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1224.0" y="562.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="1122.0" y="450.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ExclusiveGateway_211" targetElement="_BPMNShape_ExclusiveGateway_212">\r
+        <di:waypoint xsi:type="dc:Point" x="1178.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1408.0" y="393.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="1285.0" y="393.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_216" bpmnElement="PostProcessCreateAAIVfModule">\r
+        <dc:Bounds height="92.0" width="125.0" x="897.0" y="348.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_216">\r
+        <di:waypoint xsi:type="dc:Point" x="816.0" y="394.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="897.0" y="394.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_216" targetElement="_BPMNShape_ExclusiveGateway_211">\r
+        <di:waypoint xsi:type="dc:Point" x="1021.0" y="394.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1075.0" y="394.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1075.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1128.0" y="393.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1072.0" y="394.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ExclusiveGateway_212">\r
+        <di:waypoint xsi:type="dc:Point" x="1348.0" y="562.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1378.0" y="562.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1378.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1408.0" y="393.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_ExclusiveGateway_212" targetElement="_BPMNShape_IntermediateThrowEvent_44">\r
+        <di:waypoint xsi:type="dc:Point" x="1458.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1497.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1497.0" y="392.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1537.0" y="392.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_218" bpmnElement="ScriptTask_setSuccess">\r
+        <dc:Bounds height="95.0" width="128.0" x="1433.0" y="817.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_218" targetElement="_BPMNShape_EndEvent_175">\r
+        <di:waypoint xsi:type="dc:Point" x="1561.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1596.0" y="864.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1596.0" y="865.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1620.0" y="864.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1593.0" y="865.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_254" bpmnElement="QueryCloudRegion">\r
+        <dc:Bounds height="81.0" width="134.0" x="101.0" y="440.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ExclusiveGateway_90" targetElement="_BPMNShape_ScriptTask_254">\r
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="418.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="169.0" y="429.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="429.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="440.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="180.0" y="417.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_43" sourceElement="_BPMNShape_ScriptTask_254" targetElement="_BPMNShape_ScriptTask_172">\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="520.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="524.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="581.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="208.0" y="581.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="209.0" y="581.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="165.0" y="574.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="203.0" width="405.0" x="103.0" y="1020.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_55" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="132.0" y="1104.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="150.0" y="1145.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="444.0" y="1104.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="462.0" y="1145.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_284" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="81.0" width="134.0" x="239.0" y="1081.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_55" targetElement="_BPMNShape_ScriptTask_284">\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="1122.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="239.0" y="1121.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="189.0" y="1122.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_284" targetElement="_BPMNShape_EndEvent_181">\r
+        <di:waypoint xsi:type="dc:Point" x="373.0" y="1121.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="444.0" y="1122.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="400.0" y="1121.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleRollback.bpmn
new file mode 100644 (file)
index 0000000..49e612f
--- /dev/null
@@ -0,0 +1,520 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DoCreateVfModuleRollback" name="DoCreateVfModuleRollback" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Rollback PrepareUpdateAAIVfModule?" default="SequenceFlow_9">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:scriptTask id="PrepareUpdateAAIVfModulePrep" name="PrepareUpdateAAIVfModule Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke&#xD;&#xA;PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="PrepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="PUAAIVfMod_heatStackId" target="DCVFMR_heatStackId"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="yes" sourceRef="ExclusiveGateway_1" targetRef="PrepareUpdateAAIVfModulePrep">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackPrepareUpdateVfModule") == "true"}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="InvokePrepareUpdateAAIVfModule"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="no" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Rollback VNF Adapter Create?" default="SequenceFlow_15">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter&#xD;&#xA;Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepVNFAdapterRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1"/>\r
+    <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke&#xD;&#xA;VNFAdapterRestV1" calledElement="vnfAdapterRestV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="vnfAdapterRestV1Request" target="vnfAdapterRestV1Request"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="vnfAdapterRestV1Response" target="DoDVfMod_DoCreateVfModuleRollbackResponse"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="yes" sourceRef="ExclusiveGateway_2" targetRef="VNFAdapterPrep">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackVnfAdapterCreate") == "true"}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="InvokeVNFAdapterRestV1" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="no" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule&#xD;&#xA;Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepUpdateAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateAAIVfModulePrep" targetRef="InvokeUpdateAAIVfModule"/>\r
+    <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke&#xD;&#xA;UpdateAAIVfModule" calledElement="UpdateAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="InvokeUpdateAAIVfModule" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Rollback Update AAI Vf Module?" default="SequenceFlow_17">\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="yes" sourceRef="ExclusiveGateway_3" targetRef="UpdateAAIVfModulePrep">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackUpdateAAIVfModule") == "true"}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="no" sourceRef="ExclusiveGateway_3" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_4" name="Rollback SDNC Request?" default="SequenceFlow_20">\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="ExclusiveGateway_4" targetRef="SDNCAdapterPrep2">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true" || execution.getVariable("DCVFMR_rollbackSDNCRequestActivate") == "true"}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="no" sourceRef="ExclusiveGateway_4" targetRef="ExclusiveGateway_5"/>\r
+    <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter&#xD;&#xA;Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepSDNCAdapterRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="InvokeSDNCAdapterV1_2"/>\r
+    <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke&#xD;&#xA;SDNCAdapterV1" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="sdncAdapterResponse" target="DCVFMR_DoCreateVfModuleRollbackResponse"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Delete AAI VF Modlue?" default="SequenceFlow_21">\r
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="ExclusiveGateway_5" targetRef="EndEvent_9"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="yes" sourceRef="ExclusiveGateway_5" targetRef="DeleteAAIVfModulePrep">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVFMR_rollbackCreateAAIVfModule") == "true"}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke&#xD;&#xA;DeleteAAIVfModule" calledElement="DeleteAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest"/>\r
+        <camunda:in source="isVidRequest" target="isVidRequest"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="InvokeDeleteAAIVfModule" targetRef="EndEvent_9"/>\r
+    <bpmn2:endEvent id="EndEvent_9">\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule&#xD;&#xA;Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.prepDeleteAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="DeleteAAIVfModulePrep" targetRef="InvokeDeleteAAIVfModule"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="InvokeSDNCAdapterV1_2" targetRef="ScriptTask_1"/>\r
+    <bpmn2:scriptTask id="ScriptTask_1" name="Validate SDNC Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.sdncValidateResponse(execution, DCVFMR_DoCreateVfModuleRollbackResponse)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_5"/>\r
+    <bpmn2:subProcess id="SubProcess_1" name="Rollback Error Handling" triggeredByEvent="true">\r
+      <bpmn2:startEvent id="CatchExceptions" name="Catch Exceptions">\r
+        <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:endEvent id="EndEvent_1">\r
+        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CatchExceptions" targetRef="LogSaveWorkflowException"/>\r
+      <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.logWorkflowException(execution, 'DoCreateVfModuleRollback caught an event')
+dcvfmr.saveWorkflowException(execution, 'DCVFMR_CaughtWorkflowException1')]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="LogSaveWorkflowException" targetRef="EndEvent_1"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_86"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_2"/>\r
+    <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dcvfmr = new DoCreateVfModuleRollback()
+dcvfmr.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="InitializeVariables" targetRef="ExclusiveGateway_1"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmn2:message id="Message_1" name="DoCreateVfModuleRollbackRequest"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleRollback">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="13.0" y="100.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="31.0" y="141.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">\r
+        <dc:Bounds height="80.0" width="100.0" x="203.0" y="78.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="49.0" y="118.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="203.0" y="118.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="74.0" y="118.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="725.0" y="23.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="PrepareUpdateAAIVfModulePrep">\r
+        <dc:Bounds height="80.0" width="100.0" x="552.0" y="23.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">\r
+        <dc:Bounds height="80.0" width="100.0" x="104.0" y="269.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">\r
+        <dc:Bounds height="80.0" width="100.0" x="262.0" y="269.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_170" targetElement="_BPMNShape_CallActivity_13">\r
+        <di:waypoint xsi:type="dc:Point" x="204.0" y="309.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="262.0" y="309.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="221.0" y="309.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">\r
+        <dc:Bounds height="80.0" width="100.0" x="552.0" y="264.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="732.0" y="264.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">\r
+        <dc:Bounds height="80.0" width="100.0" x="74.0" y="504.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="214.0" y="504.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">\r
+        <dc:Bounds height="80.0" width="100.0" x="591.0" y="507.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="747.0" y="507.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_CallActivity_15">\r
+        <di:waypoint xsi:type="dc:Point" x="174.0" y="544.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="214.0" y="544.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="191.0" y="544.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_CallActivity_16">\r
+        <di:waypoint xsi:type="dc:Point" x="691.0" y="547.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="747.0" y="547.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="704.0" y="547.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">\r
+        <dc:Bounds height="36.0" width="36.0" x="929.0" y="615.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="947.0" y="656.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_16" targetElement="_BPMNShape_EndEvent_169">\r
+        <di:waypoint xsi:type="dc:Point" x="847.0" y="547.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="947.0" y="547.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="947.0" y="615.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="872.0" y="547.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="404.0" y="92.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="228.0" x="326.0" y="167.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ExclusiveGateway_223">\r
+        <di:waypoint xsi:type="dc:Point" x="303.0" y="118.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="383.0" y="118.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="383.0" y="117.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="404.0" y="117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="323.0" y="118.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="912.0" y="92.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="184.0" x="846.0" y="167.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ScriptTask_168">\r
+        <di:waypoint xsi:type="dc:Point" x="429.0" y="92.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="429.0" y="63.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="503.0" y="63.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="552.0" y="63.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="473.0" y="63.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="652.0" y="63.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="725.0" y="63.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_224">\r
+        <di:waypoint xsi:type="dc:Point" x="825.0" y="63.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="862.0" y="63.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="63.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="92.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="888.0" y="63.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ExclusiveGateway_224">\r
+        <di:waypoint xsi:type="dc:Point" x="454.0" y="117.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="912.0" y="117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="676.0" y="117.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ScriptTask_170">\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="142.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="29.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="29.0" y="308.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="104.0" y="309.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="571.0" y="229.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="414.0" y="343.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="195.0" x="342.0" y="398.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_CallActivity_13" targetElement="_BPMNShape_ExclusiveGateway_225">\r
+        <di:waypoint xsi:type="dc:Point" x="362.0" y="309.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="383.0" y="309.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="439.0" y="309.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="439.0" y="343.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="421.0" y="309.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_171">\r
+        <di:waypoint xsi:type="dc:Point" x="464.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="485.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="485.0" y="304.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="552.0" y="304.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="502.0" y="309.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_CallActivity_14">\r
+        <di:waypoint xsi:type="dc:Point" x="652.0" y="304.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="732.0" y="304.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="660.0" y="304.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="912.0" y="343.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="155.0" x="860.0" y="398.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_225">\r
+        <di:waypoint xsi:type="dc:Point" x="962.0" y="117.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1025.0" y="117.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1025.0" y="212.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="19.0" y="212.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="19.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="414.0" y="368.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="792.0" y="187.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ExclusiveGateway_226">\r
+        <di:waypoint xsi:type="dc:Point" x="464.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="912.0" y="368.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="678.0" y="368.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_14" targetElement="_BPMNShape_ExclusiveGateway_226">\r
+        <di:waypoint xsi:type="dc:Point" x="832.0" y="304.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="304.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="343.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="907.0" y="304.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ScriptTask_172">\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="393.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="464.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="483.0" y="464.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="34.0" y="464.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="34.0" y="544.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="74.0" y="544.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="576.0" y="464.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="476.0" y="607.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="142.0" x="430.0" y="662.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ExclusiveGateway_227">\r
+        <di:waypoint xsi:type="dc:Point" x="962.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1029.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1029.0" y="448.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="25.0" y="448.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="25.0" y="632.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="476.0" y="632.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="792.0" y="418.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_EndEvent_169">\r
+        <di:waypoint xsi:type="dc:Point" x="526.0" y="632.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="781.0" y="632.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="781.0" y="633.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="929.0" y="633.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="762.0" y="632.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ScriptTask_173">\r
+        <di:waypoint xsi:type="dc:Point" x="526.0" y="632.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="551.0" y="632.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="551.0" y="576.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="551.0" y="547.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="591.0" y="547.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="561.0" y="553.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="348.0" y="504.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_15" targetElement="_BPMNShape_ScriptTask_255">\r
+        <di:waypoint xsi:type="dc:Point" x="314.0" y="544.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="348.0" y="544.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="330.0" y="544.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_ExclusiveGateway_227">\r
+        <di:waypoint xsi:type="dc:Point" x="448.0" y="544.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="501.0" y="544.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="501.0" y="607.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="498.0" y="549.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="150.0" width="469.0" x="48.0" y="708.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_59" bpmnElement="CatchExceptions">\r
+        <dc:Bounds height="36.0" width="36.0" x="66.0" y="759.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="109.0" x="60.0" y="804.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_281" bpmnElement="LogSaveWorkflowException">\r
+        <dc:Bounds height="80.0" width="100.0" x="204.0" y="737.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="379.0" y="758.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="499.0" y="754.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="623.0" y="754.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="641.0" y="795.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_59" targetElement="_BPMNShape_ScriptTask_281">\r
+        <di:waypoint xsi:type="dc:Point" x="102.0" y="777.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="204.0" y="777.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="147.0" y="777.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_281" targetElement="_BPMNShape_EndEvent_188">\r
+        <di:waypoint xsi:type="dc:Point" x="304.0" y="777.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="341.0" y="777.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="341.0" y="776.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="379.0" y="776.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_BoundaryEvent_55" targetElement="_BPMNShape_EndEvent_189">\r
+        <di:waypoint xsi:type="dc:Point" x="535.0" y="772.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="623.0" y="772.0"/>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/DoCreateVfModuleVolumeV1.bpmn
new file mode 100644 (file)
index 0000000..9477aac
--- /dev/null
@@ -0,0 +1,675 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_FhrCQG2BEeaNdqnn65BT4A" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DoCreateVfModuleVolumeV1" name="DoCreateVfModuleVolumeV1" isExecutable="true">\r
+    <bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('preProcessRequest', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_preProcessRequest" targetRef="ScriptTask_callRestAaiCloudRegion"/>\r
+    <bpmn2:scriptTask id="ScriptTask_callRestAaiCloudRegion" name="Call REST AAI Cloud Region" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAICloudRegion', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ScriptTask_callRestAaiCloudRegion" targetRef="ScriptTask_callRestAaiQueryGenericVnf"/>\r
+    <bpmn2:scriptTask id="ScriptTask_createVolGrpExistsException" name="Build Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_volGrpName404No</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('buildWorkflowException', execution, 2500, "Volume group $DCVFMODVOLV1_volumeGroupName already exists in the system.", isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ScriptTask_createVolGrpExistsException" targetRef="EndEvent_6"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_aaiReturnCode404" name="AAI Return Code is 404?" default="SequenceFlow_volGrpName404No">\r
+      <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_volGrpName404Yes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_volGrpName404No</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_volGrpName404Yes" name="Yes" sourceRef="ExclusiveGateway_aaiReturnCode404" targetRef="ScriptTask_callRestAaiCreateVolumeGrp">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_AaiReturnCode == '404'}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_volGrpName404No" name="No" sourceRef="ExclusiveGateway_aaiReturnCode404" targetRef="ScriptTask_createVolGrpExistsException"/>\r
+    <bpmn2:scriptTask id="ScriptTask_callRestAaiQueryGenericVnf" name="Call REST AAI Query Generic VNF" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAIGenericVnf', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_callRestAaiQueryGenericVnf" targetRef="ScriptTask_callRestAaiQueryVolGrpName"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_catchAaiError" name="" attachedToRef="ScriptTask_callRestAaiQueryVolGrpName">\r
+      <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_3" errorRef="Error_1"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="BoundaryEvent_catchAaiError" targetRef="ExclusiveGateway_aaiReturnCode404"/>\r
+    <bpmn2:scriptTask id="ScriptTask_callRestAaiQueryVolGrpName" name="Call REST AAI Query Volume Grp Name" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_callRestAaiQueryVolGrpName" targetRef="ExclusiveGateway_aaiReturnCode404"/>\r
+    <bpmn2:scriptTask id="ScriptTask_callRestAaiCreateVolumeGrp" name="Call REST AAI Create Volume Group" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_volGrpName404Yes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTCreateAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_callRestAaiCreateVolumeGrp" targetRef="ScriptTask_prepareVnfAdapterCreate"/>\r
+    <bpmn2:callActivity id="CallActivity_callVnfAdapterCreate" name="Call VNF Adapter Create" calledElement="vnfAdapterRestV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFMODVOLV1_createVnfARequest" target="vnfAdapterRestV1Request"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="vnfAdapterRestV1Response" target="DCVFMODVOLV1_createVnfAResponse"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="VNFREST_vnfAdapterStatusCode" target="DCVFMODVOLV1_createVnfAReturnCode"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="VNFREST_SuccessIndicator" target="VNFREST_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="CallActivity_callVnfAdapterCreate" targetRef="ExclusiveGateway_isVnfAdaptyerCallSuccess"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_5" name="" attachedToRef="ScriptTask_callRestAaiVolumeGrp">\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_5"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="BoundaryEvent_5" targetRef="ExclusiveGateway_isRollbakcEnabled1"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_isVnfAdaptyerCallSuccess" name="Is VNF Adapter call success?" default="SequenceFlow_vnfAdapterFail">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_vnfAdapterFail</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_vnfAdapterSuccess</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterFail" name="No" sourceRef="ExclusiveGateway_isVnfAdaptyerCallSuccess" targetRef="ExclusiveGateway_isRollbackEnabled2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_vnfAdapterSuccess" name="Yes" sourceRef="ExclusiveGateway_isVnfAdaptyerCallSuccess" targetRef="ScriptTask_callRestAaiRequeryVolGrpNm">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{VNFREST_SuccessIndicator == true}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="ScriptTask_callRestAaiRequeryVolGrpNm" name="Call REST AAI Requery Volume Group Name" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_vnfAdapterSuccess</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTQueryAAIVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="ScriptTask_callRestAaiRequeryVolGrpNm" targetRef="ScriptTask_callRestAaiVolumeGrp"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_compensateCreateVolGrp" name="" attachedToRef="ScriptTask_callRestAaiCreateVolumeGrp">\r
+      <bpmn2:compensateEventDefinition id="CompensateEventDefinition_2" waitForCompletion="true"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_prepareDbInfraRequest" name="Set Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('setSuccessIndicator', execution, true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_prepareDbInfraRequest" targetRef="EndEvent_1"/>\r
+    <bpmn2:scriptTask id="ScriptTask_deleteVolumeGroup" name="Delete Volume Group" isForCompensation="true" scriptFormat="groovy">\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTDeleteAAIVolumeGroup', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:scriptTask id="ScriptTask_callRestAaiVolumeGrp" name="Call REST AAI Update Volume Group" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('callRESTUpdateCreatedVolGrpName', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_callRestAaiVolumeGrp" targetRef="ScriptTask_prepareDbInfraRequest"/>\r
+    <bpmn2:endEvent id="EndEvent_1" name="End">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_prepareVnfAdapterCreate" name="Prepare VNF Adapter Create Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def doCreateVfModuleVolumeV1 = new DoCreateVfModuleVolumeV1()
+doCreateVfModuleVolumeV1.executeMethod('prepareVnfAdapterCreateRequest', execution, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_prepareVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCreate"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_compensateVnfAdapterCreate" name="" attachedToRef="CallActivity_callVnfAdapterCreate">\r
+      <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup" name="Rollback AAI Create Volume Group">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackAaiCreateVolumeGroup" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>\r
+    </bpmn2:intermediateThrowEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup" targetRef="EndEvent_4"/>\r
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackVnfAdapterCreate" name="Rollback VNF Adapter Create">\r
+      <bpmn2:incoming>SequenceFlow_rollbackIsEnabled1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:compensateEventDefinition id="CompensateEventDefinition_3" activityRef="CallActivity_callVnfAdapterCreate" waitForCompletion="true"/>\r
+    </bpmn2:intermediateThrowEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="IntermediateThrowEvent_rollbackVnfAdapterCreate" targetRef="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_isRollbakcEnabled1" name="Is rollback enabled?" default="SequenceFlow_rollbackIsNotEnabled1">\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_rollbackIsEnabled1</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_rollbackIsNotEnabled1</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsEnabled1" name="Yes" sourceRef="ExclusiveGateway_isRollbakcEnabled1" targetRef="IntermediateThrowEvent_rollbackVnfAdapterCreate">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsNotEnabled1" name="No" sourceRef="ExclusiveGateway_isRollbakcEnabled1" targetRef="EndEvent_4"/>\r
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf" name="Rollback AAI Create Volume Group">\r
+      <bpmn2:incoming>SequenceFlow_rollbackIsEnabled2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+      <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackCreateVolGrpName1" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>\r
+    </bpmn2:intermediateThrowEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf" targetRef="EndEvent_5"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_isRollbackEnabled2" name="Is rollback enabled?" default="SequenceFlow_rollbackIsNotEnabled2">\r
+      <bpmn2:incoming>SequenceFlow_vnfAdapterFail</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_rollbackIsEnabled2</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_rollbackIsNotEnabled2</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsEnabled2" name="Yes" sourceRef="ExclusiveGateway_isRollbackEnabled2" targetRef="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_rollbackIsNotEnabled2" name="No" sourceRef="ExclusiveGateway_isRollbackEnabled2" targetRef="EndEvent_5"/>\r
+    <bpmn2:startEvent id="StartEvent_doCreateVfModuleVolume" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_doCreateVfModuleVolume" targetRef="ScriptTask_preProcessRequest"/>\r
+    <bpmn2:callActivity id="CallActivity_callVnfAdapterCallback" name="Call VNF Adapter Rollback" isForCompensation="true" calledElement="vnfAdapterRestV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DCVFMODVOLV1_rollbackVnfARequest" target="vnfAdapterRestV1Request"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:out source="vnfAdapterRestV1Response" target="CCINVOL_rollbackVnfAResponse"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:subProcess id="SubProcess_catchTriggeredException" name="Catch Triggered MsoException" triggeredByEvent="true">\r
+      <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_rollbackAaiCreateVolume21" name="Rollback Create AAi Volume Group">\r
+        <bpmn2:incoming>SequenceFlow_rollbackEnabledYes91</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+        <bpmn2:compensateEventDefinition id="CompensateEventDefinition_rollbackdreateVolume21" activityRef="ScriptTask_callRestAaiCreateVolumeGrp" waitForCompletion="true"/>\r
+      </bpmn2:intermediateThrowEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="IntermediateThrowEvent_rollbackAaiCreateVolume21" targetRef="EndEvent_3"/>\r
+      <bpmn2:exclusiveGateway id="ExclusiveGateway_isRolbackEnabled90" name="Is Rollback Enabled?" default="SequenceFlow_rollbackNotEnabled92">\r
+        <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_rollbackEnabledYes91</bpmn2:outgoing>\r
+        <bpmn2:outgoing>SequenceFlow_rollbackNotEnabled92</bpmn2:outgoing>\r
+      </bpmn2:exclusiveGateway>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_rollbackEnabledYes91" name="Yes" sourceRef="ExclusiveGateway_isRolbackEnabled90" targetRef="IntermediateThrowEvent_rollbackAaiCreateVolume21">\r
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{DCVFMODVOLV1_rollbackEnabled == true}</bpmn2:conditionExpression>\r
+      </bpmn2:sequenceFlow>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_rollbackNotEnabled92" name="No" sourceRef="ExclusiveGateway_isRolbackEnabled90" targetRef="EndEvent_3"/>\r
+      <bpmn2:startEvent id="StartEvent_catchAllErrors" name="Catch MsoException">\r
+        <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_4" errorRef="Error_2"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="StartEvent_catchAllErrors" targetRef="ExclusiveGateway_isRolbackEnabled90"/>\r
+      <bpmn2:endEvent id="EndEvent_3">\r
+        <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+        <bpmn2:incoming>SequenceFlow_rollbackNotEnabled92</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_catchError2" name="" attachedToRef="ScriptTask_callRestAaiRequeryVolGrpNm">\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="ErrorEventDefinition_9"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="BoundaryEvent_catchError2" targetRef="ExclusiveGateway_isRollbakcEnabled1"/>\r
+    <bpmn2:endEvent id="EndEvent_4" name="End">\r
+      <bpmn2:incoming>SequenceFlow_rollbackIsNotEnabled1</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_5" name="End">\r
+      <bpmn2:incoming>SequenceFlow_rollbackIsNotEnabled2</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_6" name="End">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:textAnnotation id="TextAnnotation_2">\r
+      <bpmn2:text>WorkflowException should already have been created in VNF create subflow</bpmn2:text>\r
+    </bpmn2:textAnnotation>\r
+    <bpmn2:association id="Association_2" sourceRef="TextAnnotation_2" targetRef="EndEvent_5"/>\r
+    <bpmn2:association id="Association_3" sourceRef="BoundaryEvent_compensateCreateVolGrp" targetRef="ScriptTask_deleteVolumeGroup"/>\r
+    <bpmn2:association id="Association_1" sourceRef="BoundaryEvent_compensateVnfAdapterCreate" targetRef="CallActivity_callVnfAdapterCallback"/>\r
+    <bpmn2:textAnnotation id="TextAnnotation_1">\r
+      <bpmn2:text>Catch MsoException triggered  by Plugin. The vnfAdapterRest subflow is currently not directly throwing the BPMNError(MSOException.</bpmn2:text>\r
+    </bpmn2:textAnnotation>\r
+    <bpmn2:association id="Association_4" sourceRef="TextAnnotation_1" targetRef="SubProcess_catchTriggeredException"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmn2:error id="Error_2" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleVolumeV1">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_65" bpmnElement="StartEvent_doCreateVfModuleVolume">\r
+        <dc:Bounds height="36.0" width="36.0" x="252.0" y="129.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="253.0" y="170.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="ScriptTask_preProcessRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="420.0" y="107.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_287" bpmnElement="ScriptTask_callRestAaiCloudRegion">\r
+        <dc:Bounds height="80.0" width="100.0" x="588.0" y="106.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="ScriptTask_callRestAaiQueryVolGrpName">\r
+        <dc:Bounds height="80.0" width="100.0" x="937.0" y="107.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_247" bpmnElement="ExclusiveGateway_aaiReturnCode404" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1118.0" y="121.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="128.0" x="1079.0" y="176.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="ScriptTask_callRestAaiCreateVolumeGrp">\r
+        <dc:Bounds height="80.0" width="100.0" x="252.0" y="396.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="ScriptTask_prepareVnfAdapterCreate">\r
+        <dc:Bounds height="80.0" width="100.0" x="420.0" y="396.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_32" bpmnElement="CallActivity_callVnfAdapterCreate">\r
+        <dc:Bounds height="80.0" width="100.0" x="576.0" y="396.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="ScriptTask_callRestAaiRequeryVolGrpNm">\r
+        <dc:Bounds height="80.0" width="100.0" x="923.0" y="396.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="ScriptTask_callRestAaiVolumeGrp">\r
+        <dc:Bounds height="80.0" width="100.0" x="1068.0" y="396.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_294" bpmnElement="ScriptTask_prepareDbInfraRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="1068.0" y="648.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1100.0" y="782.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1104.0" y="823.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_65" targetElement="_BPMNShape_ScriptTask_285">\r
+        <di:waypoint xsi:type="dc:Point" x="288.0" y="147.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="420.0" y="147.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="315.0" y="147.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_volGrpName404Yes" sourceElement="_BPMNShape_ExclusiveGateway_247" targetElement="_BPMNShape_ScriptTask_289">\r
+        <di:waypoint xsi:type="dc:Point" x="1143.0" y="171.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1144.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="811.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="301.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="302.0" y="396.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="573.0" y="232.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ScriptTask_290">\r
+        <di:waypoint xsi:type="dc:Point" x="352.0" y="436.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="420.0" y="436.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="383.0" y="544.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_CallActivity_32">\r
+        <di:waypoint xsi:type="dc:Point" x="520.0" y="436.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="576.0" y="436.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="545.0" y="544.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ScriptTask_287">\r
+        <di:waypoint xsi:type="dc:Point" x="520.0" y="147.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="560.0" y="147.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="560.0" y="146.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="588.0" y="146.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="557.0" y="147.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_287" targetElement="_BPMNShape_ScriptTask_311">\r
+        <di:waypoint xsi:type="dc:Point" x="688.0" y="146.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="720.0" y="146.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="720.0" y="147.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="750.0" y="147.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="713.0" y="146.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_248" bpmnElement="ExclusiveGateway_isVnfAdaptyerCallSuccess" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="768.0" y="410.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="179.0" x="704.0" y="465.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_32" targetElement="_BPMNShape_ExclusiveGateway_248">\r
+        <di:waypoint xsi:type="dc:Point" x="676.0" y="436.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="715.0" y="436.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="715.0" y="435.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="768.0" y="435.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="712.0" y="435.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_296" bpmnElement="ScriptTask_createVolGrpExistsException">\r
+        <dc:Bounds height="80.0" width="100.0" x="1248.0" y="106.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_296" targetElement="_BPMNShape_EndEvent_241">\r
+        <di:waypoint xsi:type="dc:Point" x="1348.0" y="146.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1414.0" y="146.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1373.0" y="146.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_BoundaryEvent_62" targetElement="_BPMNShape_ExclusiveGateway_247">\r
+        <di:waypoint xsi:type="dc:Point" x="1037.0" y="89.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1037.0" y="59.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1143.0" y="59.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1143.0" y="121.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1050.0" y="59.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_volGrpName404No" sourceElement="_BPMNShape_ExclusiveGateway_247" targetElement="_BPMNShape_ScriptTask_296">\r
+        <di:waypoint xsi:type="dc:Point" x="1168.0" y="146.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1248.0" y="146.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1196.0" y="146.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_vnfAdapterFail" sourceElement="_BPMNShape_ExclusiveGateway_248" targetElement="_BPMNShape_ExclusiveGateway_253">\r
+        <di:waypoint xsi:type="dc:Point" x="793.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="793.0" y="538.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="786.0" y="495.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_vnfAdapterSuccess" sourceElement="_BPMNShape_ExclusiveGateway_248" targetElement="_BPMNShape_ScriptTask_292">\r
+        <di:waypoint xsi:type="dc:Point" x="818.0" y="435.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="870.0" y="435.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="870.0" y="436.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="923.0" y="436.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="856.0" y="436.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_ScriptTask_293">\r
+        <di:waypoint xsi:type="dc:Point" x="1023.0" y="436.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1068.0" y="436.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1043.0" y="436.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_3" bpmnElement="TextAnnotation_2">\r
+        <dc:Bounds height="73.0" width="152.0" x="573.0" y="759.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_Association_2" bpmnElement="Association_2" sourceElement="_BPMNShape_TextAnnotation_3" targetElement="_BPMNShape_EndEvent_240">\r
+        <di:waypoint xsi:type="dc:Point" x="725.0" y="806.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="775.0" y="813.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="ScriptTask_deleteVolumeGroup">\r
+        <dc:Bounds height="80.0" width="100.0" x="372.0" y="518.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_57" bpmnElement="BoundaryEvent_compensateCreateVolGrp">\r
+        <dc:Bounds height="36.0" width="36.0" x="334.0" y="458.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="349.0" y="499.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_Association_3" bpmnElement="Association_3" sourceElement="_BPMNShape_BoundaryEvent_57" targetElement="_BPMNShape_ScriptTask_299">\r
+        <di:waypoint xsi:type="dc:Point" x="367.0" y="494.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="388.0" y="518.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_3" bpmnElement="IntermediateThrowEvent_rollbackAaiCreateVolumeGroup">\r
+        <dc:Bounds height="36.0" width="36.0" x="1370.0" y="555.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="210.0" x="1283.0" y="596.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_60" bpmnElement="BoundaryEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="1150.0" y="378.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1165.0" y="419.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_BoundaryEvent_60" targetElement="_BPMNShape_ExclusiveGateway_252">\r
+        <di:waypoint xsi:type="dc:Point" x="1168.0" y="378.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1168.0" y="347.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1364.0" y="347.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1193.0" y="387.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_IntermediateThrowEvent_3" targetElement="_BPMNShape_EndEvent_239">\r
+        <di:waypoint xsi:type="dc:Point" x="1388.0" y="591.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1388.0" y="717.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1383.0" y="715.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_35" bpmnElement="CallActivity_callVnfAdapterCallback">\r
+        <dc:Bounds height="80.0" width="100.0" x="537.0" y="518.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_61" bpmnElement="BoundaryEvent_compensateVnfAdapterCreate">\r
+        <dc:Bounds height="36.0" width="36.0" x="583.0" y="458.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="598.0" y="499.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_Association_1" bpmnElement="Association_1" sourceElement="_BPMNShape_BoundaryEvent_61" targetElement="_BPMNShape_CallActivity_35">\r
+        <di:waypoint xsi:type="dc:Point" x="598.0" y="494.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="594.0" y="518.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_4" bpmnElement="IntermediateThrowEvent_rollbackVnfAdapterCreate">\r
+        <dc:Bounds height="36.0" width="36.0" x="1370.0" y="458.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="177.0" x="1300.0" y="499.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_IntermediateThrowEvent_4" targetElement="_BPMNShape_IntermediateThrowEvent_3">\r
+        <di:waypoint xsi:type="dc:Point" x="1388.0" y="494.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1388.0" y="555.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1385.0" y="534.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_ScriptTask_294">\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="476.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1115.0" y="670.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_294" targetElement="_BPMNShape_EndEvent_226">\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="728.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="782.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1115.0" y="863.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="ScriptTask_callRestAaiQueryGenericVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="750.0" y="106.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_311" targetElement="_BPMNShape_ScriptTask_288">\r
+        <di:waypoint xsi:type="dc:Point" x="850.0" y="146.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="886.0" y="146.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="886.0" y="147.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="147.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="883.0" y="147.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_62" bpmnElement="BoundaryEvent_catchAaiError">\r
+        <dc:Bounds height="36.0" width="36.0" x="1019.0" y="89.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1034.0" y="130.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_247">\r
+        <di:waypoint xsi:type="dc:Point" x="1037.0" y="147.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1077.0" y="147.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1077.0" y="146.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="146.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_5" bpmnElement="IntermediateThrowEvent_rollbackCreateVolGrpFromCallVnf">\r
+        <dc:Bounds height="36.0" width="36.0" x="775.0" y="648.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="210.0" x="818.0" y="656.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_IntermediateThrowEvent_5" targetElement="_BPMNShape_EndEvent_240">\r
+        <di:waypoint xsi:type="dc:Point" x="793.0" y="684.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="793.0" y="798.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="790.0" y="732.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_252" bpmnElement="ExclusiveGateway_isRollbakcEnabled1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1364.0" y="322.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="121.0" x="1329.0" y="377.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_rollbackIsEnabled1" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_IntermediateThrowEvent_4">\r
+        <di:waypoint xsi:type="dc:Point" x="1389.0" y="372.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1389.0" y="412.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1388.0" y="412.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1388.0" y="458.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1385.0" y="433.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_rollbackIsNotEnabled1" sourceElement="_BPMNShape_ExclusiveGateway_252" targetElement="_BPMNShape_EndEvent_239">\r
+        <di:waypoint xsi:type="dc:Point" x="1414.0" y="347.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1524.0" y="347.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1524.0" y="550.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1524.0" y="735.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1406.0" y="735.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1513.0" y="392.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_253" bpmnElement="ExclusiveGateway_isRollbackEnabled2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="768.0" y="538.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="793.0" y="593.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_rollbackIsEnabled2" sourceElement="_BPMNShape_ExclusiveGateway_253" targetElement="_BPMNShape_IntermediateThrowEvent_5">\r
+        <di:waypoint xsi:type="dc:Point" x="793.0" y="588.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="793.0" y="648.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_rollbackIsNotEnabled2" sourceElement="_BPMNShape_ExclusiveGateway_253" targetElement="_BPMNShape_EndEvent_240">\r
+        <di:waypoint xsi:type="dc:Point" x="818.0" y="563.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="906.0" y="563.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="906.0" y="815.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="811.0" y="816.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="768.0" y="695.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_2" bpmnElement="SubProcess_catchTriggeredException" isExpanded="true">\r
+        <dc:Bounds height="337.0" width="608.0" x="287.0" y="936.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_catchAllErrors">\r
+        <dc:Bounds height="36.0" width="36.0" x="348.0" y="1112.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="127.0" x="303.0" y="1153.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_6" bpmnElement="IntermediateThrowEvent_rollbackAaiCreateVolume21">\r
+        <dc:Bounds height="36.0" width="36.0" x="540.0" y="1008.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="210.0" x="453.0" y="1049.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ExclusiveGateway_256">\r
+        <di:waypoint xsi:type="dc:Point" x="384.0" y="1130.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="454.0" y="1130.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="454.0" y="1129.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="532.0" y="1129.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="409.0" y="1130.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_IntermediateThrowEvent_6" targetElement="_BPMNShape_EndEvent_238">\r
+        <di:waypoint xsi:type="dc:Point" x="576.0" y="1026.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="804.0" y="1026.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="729.0" y="1026.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_TextAnnotation_4" bpmnElement="TextAnnotation_1">\r
+        <dc:Bounds height="97.0" width="229.0" x="123.0" y="792.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_Association_4" bpmnElement="Association_4" sourceElement="_BPMNShape_TextAnnotation_4" targetElement="_BPMNShape_SubProcess_2">\r
+        <di:waypoint xsi:type="dc:Point" x="301.0" y="888.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="366.0" y="936.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_64" bpmnElement="BoundaryEvent_catchError2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1005.0" y="378.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_BoundaryEvent_64" targetElement="_BPMNShape_ExclusiveGateway_252">\r
+        <di:waypoint xsi:type="dc:Point" x="1023.0" y="378.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1023.0" y="290.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1389.0" y="294.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1389.0" y="322.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1118.0" y="291.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_256" bpmnElement="ExclusiveGateway_isRolbackEnabled90" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="532.0" y="1104.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="128.0" x="493.0" y="1159.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_rollbackEnabledYes91" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_IntermediateThrowEvent_6">\r
+        <di:waypoint xsi:type="dc:Point" x="557.0" y="1104.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="557.0" y="1074.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="558.0" y="1074.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="558.0" y="1044.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="564.0" y="1084.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_rollbackNotEnabled92" sourceElement="_BPMNShape_ExclusiveGateway_256" targetElement="_BPMNShape_EndEvent_238">\r
+        <di:waypoint xsi:type="dc:Point" x="582.0" y="1129.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="657.0" y="1129.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="822.0" y="1129.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="822.0" y="1044.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="636.0" y="1134.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_238" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="804.0" y="1008.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="822.0" y="1049.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1370.0" y="717.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1374.0" y="758.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_240" bpmnElement="EndEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="775.0" y="798.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="793.0" y="839.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_241" bpmnElement="EndEvent_6">\r
+        <dc:Bounds height="36.0" width="36.0" x="1414.0" y="128.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1418.0" y="169.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
new file mode 100644 (file)
index 0000000..e5856bb
--- /dev/null
@@ -0,0 +1,1102 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_3SPHsLr9EeWak-hhutJWuQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="FalloutHandler" name="Fallout Handler" isExecutable="true">\r
+    <bpmn2:parallelGateway id="ParallelGateway_1">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_6"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_16" name="source == OMX?" default="SequenceFlow_56">\r
+      <bpmn2:incoming>SequenceFlow_54</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_55</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_56</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_55" name="yes" sourceRef="ExclusiveGateway_16" targetRef="ServiceTask_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_source").equals("OMX")}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_56" name="no" sourceRef="ExclusiveGateway_16" targetRef="ServiceTask_1"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_9" name="CSI Notify Success?" default="SequenceFlow_42">\r
+      <bpmn2:incoming>SequenceFlow_40</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_41</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_42</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_41" name="" sourceRef="ExclusiveGateway_9" targetRef="ParallelGateway_3">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_notifyCSIResponseCode")==200}
+
+]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_42" name="" sourceRef="ExclusiveGateway_9" targetRef="ScriptTask_5"/>\r
+    <bpmn2:serviceTask id="ServiceTask_4" name="Notify CSI">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_csi_networkstatus_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[import com.att.bpm.scripts.*
+def notifyCSI = new FalloutHandler()
+return notifyCSI.notifyCSIPayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:outputParameter name="FH_notifyCSIResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="FH_notifyCSIResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_55</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_40</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_40" name="" sourceRef="ServiceTask_4" targetRef="ExclusiveGateway_9"/>\r
+    <bpmn2:parallelGateway id="ParallelGateway_2">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_54</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ParallelGateway_2" targetRef="ScriptTask_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_54" name="" sourceRef="ParallelGateway_2" targetRef="ExclusiveGateway_16"/>\r
+    <bpmn2:exclusiveGateway id="ParallelGateway_3">\r
+      <bpmn2:incoming>SequenceFlow_41</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_45</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_62</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_62" name="" sourceRef="ParallelGateway_3" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_4">\r
+      <bpmn2:incoming>SequenceFlow_62</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_63</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_63" name="" sourceRef="ExclusiveGateway_4" targetRef="ParallelGateway_7"/>\r
+    <bpmn2:scriptTask id="ScriptTask_5" name="Handle CSI Notification Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_42</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_50</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_45</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[execution.setVariable("FH_success", false)
+execution.setVariable("FH_NOTIFY_STATUS", "FAILED")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_45" name="" sourceRef="ScriptTask_5" targetRef="ParallelGateway_3"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_5" name="Connect Fault" attachedToRef="ServiceTask_4">\r
+      <bpmn2:outgoing>SequenceFlow_50</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_91" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_50" name="" sourceRef="BoundaryEvent_5" targetRef="ScriptTask_5"/>\r
+    <bpmn2:serviceTask id="ServiceTask_1" name="Notify CCD">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url"><![CDATA[${execution.getVariable("FH_notification-url")}]]></camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="Content-Type">text/xml</camunda:entry>\r
+                <camunda:entry key="Authorization"/>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> NOTIFY CCD"
+import com.att.bpm.scripts.*
+def notifyCCD = new FalloutHandler()
+return notifyCCD.notifyCCDFailurePayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:outputParameter name="FH_notifyCCDResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="FH_notifyCCDStatusCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_56</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_52</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_52" name="" sourceRef="ServiceTask_1" targetRef="ExclusiveGateway_15"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_19">\r
+      <bpmn2:incoming>SequenceFlow_75</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_48</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="ExclusiveGateway_19" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_15" name="CCD Notify Success?" default="SequenceFlow_47">\r
+      <bpmn2:incoming>SequenceFlow_52</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_75</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_47</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_75" name="" sourceRef="ExclusiveGateway_15" targetRef="ExclusiveGateway_19">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_notifyCCDStatusCode")==204}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_47" name="" sourceRef="ExclusiveGateway_15" targetRef="ScriptTask_3"/>\r
+    <bpmn2:scriptTask id="ScriptTask_3" name="Handle CCD Notification Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_47</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_51</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_48</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[execution.setVariable("FH_success", false)
+execution.setVariable("FH_NOTIFY_STATUS", "FAILED")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_48" name="" sourceRef="ScriptTask_3" targetRef="ExclusiveGateway_19"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_6" name="Connect Fault" attachedToRef="ServiceTask_1">\r
+      <bpmn2:outgoing>SequenceFlow_51</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_51" sourceRef="BoundaryEvent_6" targetRef="ScriptTask_3"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Notification URL exists?" default="SequenceFlow_23">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="yes" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_2">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_notification-url-Ok") ==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="no" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_4"/>\r
+    <bpmn2:scriptTask id="ScriptTask_8" name="Pre-Process Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def preProcessRequestData = new FalloutHandler()
+preProcessRequestData.preProcessRequest(execution)
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ScriptTask_8" targetRef="ParallelGateway_1"/>\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_8"/>\r
+    <bpmn2:parallelGateway id="ParallelGateway_7">\r
+      <bpmn2:incoming>SequenceFlow_63</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="ParallelGateway_7" targetRef="ServiceTask_5"/>\r
+    <bpmn2:serviceTask id="ServiceTask_5" name="Update Request Status">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request"
+import com.att.bpm.scripts.*
+def updateRequest= new FalloutHandler()
+return updateRequest.updateRequestPayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:outputParameter name="FH_updateRequestResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="FH_updateRequestResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="ServiceTask_5" targetRef="ExclusiveGateway_5"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_4" name="Connect Fault" attachedToRef="ServiceTask_5">\r
+      <bpmn2:outgoing>SequenceFlow_74</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_88" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:parallelGateway id="ParallelGateway_6">\r
+      <bpmn2:incoming>SequenceFlow_37</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ParallelGateway_6" targetRef="ScriptTask_2"/>\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Post Process Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def falloutHandler = new FalloutHandler()
+falloutHandler.postProcessResponse(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_6"/>\r
+    <bpmn2:exclusiveGateway id="ParallelGateway_4">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ParallelGateway_4" targetRef="ParallelGateway_6"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_6" default="SequenceFlow_26">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ExclusiveGateway_6" targetRef="ServiceTask_3">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_request_id-Ok") ==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="ExclusiveGateway_6" targetRef="ServiceTask_2"/>\r
+    <bpmn2:serviceTask id="ServiceTask_3" name="Update Request Gamma">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request Gamma"
+import com.att.bpm.scripts.*
+def updateRequestGamma= new FalloutHandler()
+return updateRequestGamma.updateRequestGammaPayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:outputParameter name="FH_updateRequestGammaResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="FH_updateRequestGammaResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ServiceTask_3" targetRef="ExclusiveGateway_7"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_2" name="Connect Fault" attachedToRef="ServiceTask_3">\r
+      <bpmn2:outgoing>SequenceFlow_72</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:exclusiveGateway id="ParallelGateway_5">\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_37</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_37" name="" sourceRef="ParallelGateway_5" targetRef="ParallelGateway_6"/>\r
+    <bpmn2:endEvent id="EndEvent_6" name="Normal End">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="Connect Fault" attachedToRef="ScriptTask_1">\r
+      <bpmn2:outgoing>SequenceFlow_71</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_87" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_71" name="" sourceRef="BoundaryEvent_1" targetRef="ScriptTask_9"/>\r
+    <bpmn2:serviceTask id="ScriptTask_1" name="Update Response Status to SENDING">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Response Status to pending ..."
+import com.att.bpm.scripts.*
+def updateResponseStatus= new FalloutHandler()
+return updateResponseStatus.updateResponseStatusPayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:outputParameter name="FH_updateResponseStatusResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="FH_updateResponseStatusResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_43</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_43" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_72" name="" sourceRef="BoundaryEvent_2" targetRef="ScriptTask_6"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_74" name="" sourceRef="BoundaryEvent_4" targetRef="ScriptTask_10"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Update Success?" default="SequenceFlow_68">\r
+      <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_68</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_5" targetRef="ParallelGateway_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestResponseCode")==200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_68" name="" sourceRef="ExclusiveGateway_5" targetRef="ScriptTask_10"/>\r
+    <bpmn2:scriptTask id="ScriptTask_10" name="Build Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_68</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_74</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_77</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def falloutHandler = new FalloutHandler()
+falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestResponseCode")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_77" name="" sourceRef="ScriptTask_10" targetRef="EndEvent_10"/>\r
+    <bpmn2:endEvent id="EndEvent_10">\r
+      <bpmn2:incoming>SequenceFlow_77</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_TerminateEventDefinition_10" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_12">\r
+      <bpmn2:incoming>SequenceFlow_78</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_TerminateEventDefinition_14" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_9" name="Build Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_71</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_78</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def falloutHandler = new FalloutHandler()
+falloutHandler.buildDBWorkflowException(execution, "FH_updateResponseStatusResponseCode")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Update Success?" default="SequenceFlow_6">\r
+      <bpmn2:incoming>SequenceFlow_43</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_9"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ExclusiveGateway_2" targetRef="ParallelGateway_7">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateResponseStatusResponseCode")==200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_78" name="" sourceRef="ScriptTask_9" targetRef="EndEvent_12"/>\r
+    <bpmn2:scriptTask id="ScriptTask_6" name="Build Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_72</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_79</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def falloutHandler = new FalloutHandler()
+falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestGammaResponseCode")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_79" name="" sourceRef="ScriptTask_6" targetRef="EndEvent_13"/>\r
+    <bpmn2:endEvent id="EndEvent_13">\r
+      <bpmn2:incoming>SequenceFlow_79</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_TerminateEventDefinition_15" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_7" name="Update Success?" default="SequenceFlow_31">\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="ExclusiveGateway_7" targetRef="ScriptTask_6"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ExclusiveGateway_7" targetRef="ParallelGateway_5">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestGammaResponseCode")==200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="ScriptTask_7" name="Build Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_80</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_73</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def falloutHandler = new FalloutHandler()
+falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestInfraResponseCode")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_73" name="" sourceRef="ScriptTask_7" targetRef="EndEvent_14"/>\r
+    <bpmn2:serviceTask id="ServiceTask_2" name="Update Request Infra">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">\r
+              <camunda:script scriptFormat="groovy"><![CDATA[//println"INSIDE --> update Request Infra"
+import com.att.bpm.scripts.*
+def updateRequestInfra= new FalloutHandler()
+return updateRequestInfra.updateRequestInfraPayload(execution)]]></camunda:script>\r
+            </camunda:inputParameter>\r
+            <camunda:outputParameter name="FH_updateRequestInfraResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="FH_updateRequestInfraResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_30" name="" sourceRef="ServiceTask_2" targetRef="ExclusiveGateway_8"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_8" name="Update Success?" default="SequenceFlow_32">\r
+      <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ExclusiveGateway_8" targetRef="ScriptTask_7"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="ExclusiveGateway_8" targetRef="ParallelGateway_5">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("FH_updateRequestInfraResponseCode")==200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_3" name="Connect Fault" attachedToRef="ServiceTask_2">\r
+      <bpmn2:outgoing>SequenceFlow_80</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_90" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_80" name="" sourceRef="BoundaryEvent_3" targetRef="ScriptTask_7"/>\r
+    <bpmn2:endEvent id="EndEvent_14">\r
+      <bpmn2:incoming>SequenceFlow_73</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_TerminateEventDefinition_16" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:subProcess id="SubProcess_1" name="Event Handler" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="ScriptTask_4" name="Handle Event" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+execution.setVariable("FH_success", false)\r
+def falloutHandler = new FalloutHandler()\r
+\r
+// This does not (and cannot) throw exceptions\r
+falloutHandler.postProcessResponse(execution)\r
+\r
+// Clear any WorkflowException object that might be in the execution, but keep a copy in FH_WorkflowException\r
+def wfe = execution.getVariable("WorkflowException")\r
+execution.setVariable("WorkflowException", null)\r
+execution.setVariable("FH_WorkflowException", wfe)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_2"/>\r
+      <bpmn2:endEvent id="EndEvent_2" name="Error End">\r
+        <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_8"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_4"/>\r
+    </bpmn2:subProcess>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSOWorkflowException"/>\r
+  <bpmn2:error id="Error_2" errorCode="java.lang.Exception" name="Java Lang Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="FalloutHandler">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_52" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="108.0" y="900.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="109.0" y="937.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_12" bpmnElement="ParallelGateway_1">\r
+        <dc:Bounds height="50.0" width="50.0" x="311.0" y="892.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="336.0" y="947.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_74" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="384.0" y="744.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="145.0" x="252.0" y="726.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_74">\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="892.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="769.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="384.0" y="769.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="404.0" y="849.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_13" bpmnElement="ParallelGateway_2">\r
+        <dc:Bounds height="50.0" width="50.0" x="482.0" y="438.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="507.0" y="493.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ExclusiveGateway_74" targetElement="_BPMNShape_ParallelGateway_13">\r
+        <di:waypoint xsi:type="dc:Point" x="409.0" y="744.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="410.0" y="463.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="482.0" y="463.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="422.0" y="468.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_85" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="552.0" y="594.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ParallelGateway_13" targetElement="_BPMNShape_ScriptTask_85">\r
+        <di:waypoint xsi:type="dc:Point" x="507.0" y="488.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="508.0" y="634.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="552.0" y="634.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="504.0" y="545.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_75" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="729.0" y="608.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="109.0" x="701.0" y="658.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_75" targetElement="_BPMNShape_ScriptTask_254">\r
+        <di:waypoint xsi:type="dc:Point" x="754.0" y="608.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="754.0" y="548.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="765.0" y="637.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_14" bpmnElement="ParallelGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1022.0" y="102.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1047.0" y="157.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_88" bpmnElement="ServiceTask_4">\r
+        <dc:Bounds height="80.0" width="100.0" x="677.0" y="103.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_89" bpmnElement="ScriptTask_5">\r
+        <dc:Bounds height="80.0" width="100.0" x="898.0" y="30.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_89" bpmnElement="ServiceTask_5">\r
+        <dc:Bounds height="80.0" width="100.0" x="1216.0" y="424.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_78" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1397.0" y="438.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="109.0" x="1373.0" y="488.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ServiceTask_89" targetElement="_BPMNShape_ExclusiveGateway_78">\r
+        <di:waypoint xsi:type="dc:Point" x="1316.0" y="464.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1397.0" y="463.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1361.0" y="464.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_15" bpmnElement="ParallelGateway_4" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1472.0" y="744.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1497.0" y="799.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_78" targetElement="_BPMNShape_ParallelGateway_15">\r
+        <di:waypoint xsi:type="dc:Point" x="1447.0" y="463.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1497.0" y="463.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1497.0" y="744.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1502.0" y="478.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_74" targetElement="_BPMNShape_ParallelGateway_15">\r
+        <di:waypoint xsi:type="dc:Point" x="409.0" y="794.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="410.0" y="835.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1497.0" y="835.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1497.0" y="794.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="425.0" y="810.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_79" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="381.0" y="1105.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="406.0" y="1160.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_79">\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="942.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="1130.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="381.0" y="1130.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="381.0" y="1082.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ExclusiveGateway_79" targetElement="_BPMNShape_ServiceTask_90">\r
+        <di:waypoint xsi:type="dc:Point" x="406.0" y="1105.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="406.0" y="1039.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="461.0" y="1039.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="403.0" y="1081.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ExclusiveGateway_79" targetElement="_BPMNShape_ServiceTask_91">\r
+        <di:waypoint xsi:type="dc:Point" x="406.0" y="1155.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="406.0" y="1287.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="457.0" y="1287.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="403.0" y="1233.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_90" bpmnElement="ServiceTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="461.0" y="999.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_91" bpmnElement="ServiceTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="457.0" y="1247.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_80" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="644.0" y="1013.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="109.0" x="615.0" y="1068.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ServiceTask_90" targetElement="_BPMNShape_ExclusiveGateway_80">\r
+        <di:waypoint xsi:type="dc:Point" x="561.0" y="1039.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="644.0" y="1038.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="598.0" y="1041.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_81" bpmnElement="ExclusiveGateway_8" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="643.0" y="1262.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="109.0" x="614.0" y="1317.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ServiceTask_91" targetElement="_BPMNShape_ExclusiveGateway_81">\r
+        <di:waypoint xsi:type="dc:Point" x="557.0" y="1287.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="595.0" y="1287.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="595.0" y="1286.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="643.0" y="1287.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="602.0" y="1288.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ExclusiveGateway_80" targetElement="_BPMNShape_ScriptTask_252">\r
+        <di:waypoint xsi:type="dc:Point" x="669.0" y="1013.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="670.0" y="961.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="673.0" y="988.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ExclusiveGateway_81" targetElement="_BPMNShape_ScriptTask_253">\r
+        <di:waypoint xsi:type="dc:Point" x="668.0" y="1262.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="668.0" y="1245.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="668.0" y="1214.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="675.0" y="1294.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_16" bpmnElement="ParallelGateway_5" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="822.0" y="1105.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="847.0" y="1160.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ExclusiveGateway_80" targetElement="_BPMNShape_ParallelGateway_16">\r
+        <di:waypoint xsi:type="dc:Point" x="694.0" y="1038.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="847.0" y="1038.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="847.0" y="1105.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="728.0" y="1029.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ExclusiveGateway_81" targetElement="_BPMNShape_ParallelGateway_16">\r
+        <di:waypoint xsi:type="dc:Point" x="693.0" y="1287.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="847.0" y="1287.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="847.0" y="1155.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="844.0" y="1211.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_17" bpmnElement="ParallelGateway_6">\r
+        <dc:Bounds height="50.0" width="50.0" x="1535.0" y="878.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1560.0" y="933.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_37" sourceElement="_BPMNShape_ParallelGateway_16" targetElement="_BPMNShape_ParallelGateway_17">\r
+        <di:waypoint xsi:type="dc:Point" x="872.0" y="1130.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1560.0" y="1130.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1560.0" y="928.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="764.0" y="1134.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ParallelGateway_15" targetElement="_BPMNShape_ParallelGateway_17">\r
+        <di:waypoint xsi:type="dc:Point" x="1522.0" y="769.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1560.0" y="769.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1560.0" y="878.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1663.0" y="830.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_82" bpmnElement="ExclusiveGateway_9" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="827.0" y="117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="126.0" x="872.0" y="154.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_40" sourceElement="_BPMNShape_ScriptTask_88" targetElement="_BPMNShape_ExclusiveGateway_82">\r
+        <di:waypoint xsi:type="dc:Point" x="777.0" y="143.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="827.0" y="142.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="799.0" y="147.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_41" bpmnElement="SequenceFlow_41" sourceElement="_BPMNShape_ExclusiveGateway_82" targetElement="_BPMNShape_ParallelGateway_14">\r
+        <di:waypoint xsi:type="dc:Point" x="852.0" y="167.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="852.0" y="199.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1047.0" y="199.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1047.0" y="152.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="849.0" y="168.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_42" sourceElement="_BPMNShape_ExclusiveGateway_82" targetElement="_BPMNShape_ScriptTask_89">\r
+        <di:waypoint xsi:type="dc:Point" x="852.0" y="117.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="852.0" y="69.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="898.0" y="69.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="831.0" y="150.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_52" targetElement="_BPMNShape_ScriptTask_99">\r
+        <di:waypoint xsi:type="dc:Point" x="144.0" y="918.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="180.0" y="918.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="159.0" y="918.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_99" bpmnElement="ScriptTask_8">\r
+        <dc:Bounds height="80.0" width="100.0" x="180.0" y="878.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_14" bpmnElement="SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="167.0" width="329.0" x="115.0" y="1396.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_100" bpmnElement="ScriptTask_4">\r
+        <dc:Bounds height="80.0" width="100.0" x="228.0" y="1440.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_127" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="372.0" y="1462.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="392.0" y="1506.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_100" targetElement="_BPMNShape_EndEvent_127">\r
+        <di:waypoint xsi:type="dc:Point" x="328.0" y="1480.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="372.0" y="1480.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="256.0" y="1491.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="144.0" y="1462.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="162.0" y="1506.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ScriptTask_100">\r
+        <di:waypoint xsi:type="dc:Point" x="180.0" y="1480.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="228.0" y="1480.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="201.0" y="1480.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_84" bpmnElement="ParallelGateway_7">\r
+        <dc:Bounds height="50.0" width="50.0" x="1129.0" y="438.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1154.0" y="493.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_75" targetElement="_BPMNShape_ExclusiveGateway_84">\r
+        <di:waypoint xsi:type="dc:Point" x="779.0" y="633.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="633.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="488.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1103.0" y="600.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ExclusiveGateway_84" targetElement="_BPMNShape_ServiceTask_89">\r
+        <di:waypoint xsi:type="dc:Point" x="1179.0" y="463.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1216.0" y="464.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1036.0" y="301.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_101" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="1632.0" y="864.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ParallelGateway_17" targetElement="_BPMNShape_ScriptTask_101">\r
+        <di:waypoint xsi:type="dc:Point" x="1585.0" y="903.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1632.0" y="904.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1752.0" y="904.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_99" targetElement="_BPMNShape_ParallelGateway_12">\r
+        <di:waypoint xsi:type="dc:Point" x="280.0" y="918.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="311.0" y="917.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="293.0" y="918.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_95" bpmnElement="ServiceTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="677.0" y="342.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_94" bpmnElement="ExclusiveGateway_15" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="827.0" y="356.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="132.0" x="859.0" y="403.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_52" bpmnElement="SequenceFlow_52" sourceElement="_BPMNShape_ServiceTask_95" targetElement="_BPMNShape_ExclusiveGateway_94">\r
+        <di:waypoint xsi:type="dc:Point" x="777.0" y="382.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="827.0" y="381.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="800.0" y="401.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_95" bpmnElement="ExclusiveGateway_16" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="576.0" y="218.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="104.0" x="482.0" y="209.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_54" sourceElement="_BPMNShape_ParallelGateway_13" targetElement="_BPMNShape_ExclusiveGateway_95">\r
+        <di:waypoint xsi:type="dc:Point" x="507.0" y="438.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="508.0" y="243.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="576.0" y="243.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="503.0" y="390.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_55" bpmnElement="SequenceFlow_55" sourceElement="_BPMNShape_ExclusiveGateway_95" targetElement="_BPMNShape_ScriptTask_88">\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="143.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="677.0" y="143.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="629.0" y="117.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_56" bpmnElement="SequenceFlow_56" sourceElement="_BPMNShape_ExclusiveGateway_95" targetElement="_BPMNShape_ServiceTask_95">\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="268.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="327.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="383.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="677.0" y="382.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="626.0" y="356.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_102" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="898.0" y="282.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_98" bpmnElement="ExclusiveGateway_19" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1022.0" y="349.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1047.0" y="404.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_62" bpmnElement="SequenceFlow_62" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ExclusiveGateway_106">\r
+        <di:waypoint xsi:type="dc:Point" x="1072.0" y="127.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1106.0" y="127.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1106.0" y="211.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1084.0" y="168.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_63" bpmnElement="SequenceFlow_63" sourceElement="_BPMNShape_ExclusiveGateway_106" targetElement="_BPMNShape_ExclusiveGateway_84">\r
+        <di:waypoint xsi:type="dc:Point" x="1131.0" y="236.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="236.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1154.0" y="438.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1134.0" y="255.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_75" bpmnElement="SequenceFlow_75" sourceElement="_BPMNShape_ExclusiveGateway_94" targetElement="_BPMNShape_ExclusiveGateway_98">\r
+        <di:waypoint xsi:type="dc:Point" x="852.0" y="406.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="852.0" y="446.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1047.0" y="446.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1047.0" y="399.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="976.0" y="446.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_129" bpmnElement="EndEvent_6">\r
+        <dc:Bounds height="36.0" width="36.0" x="1766.0" y="886.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1784.0" y="927.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_101" targetElement="_BPMNShape_EndEvent_129">\r
+        <di:waypoint xsi:type="dc:Point" x="1732.0" y="904.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1766.0" y="904.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1746.0" y="904.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_30" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="585.0" y="576.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="87.0" x="607.0" y="521.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_31" bpmnElement="BoundaryEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="494.0" y="981.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="87.0" x="522.0" y="937.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_32" bpmnElement="BoundaryEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="490.0" y="1229.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="87.0" x="522.0" y="1191.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_33" bpmnElement="BoundaryEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1249.0" y="406.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="87.0" x="1272.0" y="353.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_106" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1081.0" y="211.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1106.0" y="266.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ExclusiveGateway_98" targetElement="_BPMNShape_ExclusiveGateway_106">\r
+        <di:waypoint xsi:type="dc:Point" x="1072.0" y="374.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1106.0" y="373.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1106.0" y="319.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1106.0" y="261.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1103.0" y="361.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_43" bpmnElement="SequenceFlow_43" sourceElement="_BPMNShape_ScriptTask_85" targetElement="_BPMNShape_ExclusiveGateway_75">\r
+        <di:waypoint xsi:type="dc:Point" x="652.0" y="634.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="683.0" y="634.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="683.0" y="633.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="729.0" y="633.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="694.0" y="682.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_45" bpmnElement="SequenceFlow_45" sourceElement="_BPMNShape_ScriptTask_89" targetElement="_BPMNShape_ParallelGateway_14">\r
+        <di:waypoint xsi:type="dc:Point" x="998.0" y="69.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1047.0" y="69.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1047.0" y="102.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1042.0" y="150.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_47" bpmnElement="SequenceFlow_47" sourceElement="_BPMNShape_ExclusiveGateway_94" targetElement="_BPMNShape_ScriptTask_102">\r
+        <di:waypoint xsi:type="dc:Point" x="852.0" y="356.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="852.0" y="322.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="898.0" y="322.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="855.0" y="377.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_48" bpmnElement="SequenceFlow_48" sourceElement="_BPMNShape_ScriptTask_102" targetElement="_BPMNShape_ExclusiveGateway_98">\r
+        <di:waypoint xsi:type="dc:Point" x="998.0" y="322.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1047.0" y="322.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1047.0" y="349.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1033.0" y="377.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_48" bpmnElement="BoundaryEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="759.0" y="85.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="87.0" x="785.0" y="4.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_50" bpmnElement="SequenceFlow_50" sourceElement="_BPMNShape_BoundaryEvent_48" targetElement="_BPMNShape_ScriptTask_89">\r
+        <di:waypoint xsi:type="dc:Point" x="777.0" y="85.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="777.0" y="0.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="0.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="30.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_49" bpmnElement="BoundaryEvent_6">\r
+        <dc:Bounds height="36.0" width="36.0" x="759.0" y="324.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="87.0" x="785.0" y="261.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_51" bpmnElement="SequenceFlow_51" sourceElement="_BPMNShape_BoundaryEvent_49" targetElement="_BPMNShape_ScriptTask_102">\r
+        <di:waypoint xsi:type="dc:Point" x="777.0" y="324.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="777.0" y="252.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="252.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="282.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="87.0" x="785.0" y="256.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_10">\r
+        <dc:Bounds height="36.0" width="36.0" x="1506.0" y="324.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1577.0" y="373.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_68" bpmnElement="SequenceFlow_68" sourceElement="_BPMNShape_ExclusiveGateway_78" targetElement="_BPMNShape_ScriptTask_255">\r
+        <di:waypoint xsi:type="dc:Point" x="1422.0" y="438.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1423.0" y="382.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1428.0" y="401.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_12">\r
+        <dc:Bounds height="36.0" width="36.0" x="835.0" y="490.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="853.0" y="531.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_71" bpmnElement="SequenceFlow_71" sourceElement="_BPMNShape_BoundaryEvent_30" targetElement="_BPMNShape_ScriptTask_254">\r
+        <di:waypoint xsi:type="dc:Point" x="603.0" y="576.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="603.0" y="508.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="704.0" y="508.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="600.0" y="604.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_13">\r
+        <dc:Bounds height="36.0" width="36.0" x="762.0" y="903.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="780.0" y="944.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_72" bpmnElement="SequenceFlow_72" sourceElement="_BPMNShape_BoundaryEvent_31" targetElement="_BPMNShape_ScriptTask_252">\r
+        <di:waypoint xsi:type="dc:Point" x="512.0" y="981.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="512.0" y="921.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="620.0" y="921.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="509.0" y="963.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_230" bpmnElement="EndEvent_14">\r
+        <dc:Bounds height="36.0" width="36.0" x="759.0" y="1156.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="777.0" y="1197.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_73" bpmnElement="SequenceFlow_73" sourceElement="_BPMNShape_ScriptTask_253" targetElement="_BPMNShape_EndEvent_230">\r
+        <di:waypoint xsi:type="dc:Point" x="719.0" y="1174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="759.0" y="1174.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="732.0" y="1184.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_252" bpmnElement="ScriptTask_6">\r
+        <dc:Bounds height="80.0" width="100.0" x="620.0" y="881.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_253" bpmnElement="ScriptTask_7">\r
+        <dc:Bounds height="80.0" width="100.0" x="619.0" y="1134.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_254" bpmnElement="ScriptTask_9">\r
+        <dc:Bounds height="80.0" width="100.0" x="704.0" y="468.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="ScriptTask_10">\r
+        <dc:Bounds height="80.0" width="100.0" x="1373.0" y="302.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_74" bpmnElement="SequenceFlow_74" sourceElement="_BPMNShape_BoundaryEvent_33" targetElement="_BPMNShape_ScriptTask_255">\r
+        <di:waypoint xsi:type="dc:Point" x="1267.0" y="406.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1267.0" y="342.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1373.0" y="342.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1278.0" y="342.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="SequenceFlow_77" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_EndEvent_226">\r
+        <di:waypoint xsi:type="dc:Point" x="1473.0" y="342.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1506.0" y="342.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1482.0" y="342.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_78" bpmnElement="SequenceFlow_78" sourceElement="_BPMNShape_ScriptTask_254" targetElement="_BPMNShape_EndEvent_228">\r
+        <di:waypoint xsi:type="dc:Point" x="804.0" y="508.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="835.0" y="508.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_79" bpmnElement="SequenceFlow_79" sourceElement="_BPMNShape_ScriptTask_252" targetElement="_BPMNShape_EndEvent_229">\r
+        <di:waypoint xsi:type="dc:Point" x="720.0" y="921.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="762.0" y="921.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="738.0" y="921.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_80" bpmnElement="SequenceFlow_80" sourceElement="_BPMNShape_BoundaryEvent_32" targetElement="_BPMNShape_ScriptTask_253">\r
+        <di:waypoint xsi:type="dc:Point" x="508.0" y="1229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="508.0" y="1174.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="619.0" y="1174.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="533.0" y="1174.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteService.bpmn
new file mode 100644 (file)
index 0000000..52364a0
--- /dev/null
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_wAtdAGrUEeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="GenericDeleteService" name="GenericDeleteService" isExecutable="true">\r
+    <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="processError" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsBPMNException(execution)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="processError" targetRef="EndEvent_3"/>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="processError"/>\r
+      <bpmn2:endEvent id="EndEvent_3">\r
+        <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_25"/>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:subProcess id="javaExceptionSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:endEvent id="EndEvent_2">\r
+        <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:scriptTask id="processJavaError" name="Process Error">\r
+        <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsJavaException(execution)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:startEvent id="StartEvent_3">\r
+        <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="StartEvent_3" targetRef="processJavaError"/>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="processJavaError" targetRef="EndEvent_2"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization"/>\r
+    <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericDeleteService deleteService  = new GenericDeleteService()\r
+deleteService.preProcessRequest(execution)\r
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="initialization" targetRef="resourceVersionCheck"/>\r
+    <bpmn2:exclusiveGateway id="resourceVersionCheck" name="Resource Version Provided?" default="yes">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>no</bpmn2:outgoing>\r
+      <bpmn2:outgoing>yes</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="no" name="No" sourceRef="resourceVersionCheck" targetRef="queryForResourceVersion">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDS_resourceVersionProvidedFlag" ) == false}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="yes" name="Yes" sourceRef="resourceVersionCheck" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericDeleteService deleteService  = new GenericDeleteService()\r
+deleteService.setSuccessIndicator(execution, true)\r
+\r
+execution.setVariable("WorkflowResponse", " ")  //for junits\r
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2">\r
+      <bpmn2:incoming>yes</bpmn2:incoming>\r
+      <bpmn2:incoming>siExistYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="deleteServiceInstance"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_24"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="deleteServiceInstance" name="DELETE&#xD;&#xA;Service Instance" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericDeleteService deleteService  = new GenericDeleteService()\r
+deleteService.deleteServiceObject(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="deleteServiceInstance" targetRef="toggleSuccess"/>\r
+    <bpmn2:scriptTask id="queryForResourceVersion" name="Query SI Resource Version" scriptFormat="groovy">\r
+      <bpmn2:incoming>no</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericDeleteService deleteService  = new GenericDeleteService()\r
+deleteService.getServiceResourceVersion(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="queryForResourceVersion" targetRef="siExistCheck"/>\r
+    <bpmn2:exclusiveGateway id="siExistCheck" name="Service Exist?">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>siExistYes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>siExistNo</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="siExistYes" name="Yes" sourceRef="siExistCheck" targetRef="ExclusiveGateway_2">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="siExistNo" name="No" sourceRef="siExistCheck" targetRef="EndEvent_4"/>\r
+    <bpmn2:endEvent id="EndEvent_4">\r
+      <bpmn2:incoming>siExistNo</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_38"/>\r
+    </bpmn2:endEvent>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericDeleteService">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="84.0" y="221.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="102.0" y="262.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="initialization">\r
+        <dc:Bounds height="80.0" width="100.0" x="216.0" y="199.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="resourceVersionCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="365.0" y="213.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="169.0" x="401.0" y="243.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_268" bpmnElement="queryForResourceVersion">\r
+        <dc:Bounds height="80.0" width="100.0" x="457.0" y="100.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="600.0" y="213.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="625.0" y="268.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="deleteServiceInstance">\r
+        <dc:Bounds height="80.0" width="100.0" x="684.0" y="199.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_213" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1006.0" y="221.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1024.0" y="262.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="169.0" width="321.0" x="155.0" y="384.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_267">\r
+        <di:waypoint xsi:type="dc:Point" x="120.0" y="239.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="216.0" y="239.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="147.0" y="239.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_267" targetElement="_BPMNShape_ExclusiveGateway_224">\r
+        <di:waypoint xsi:type="dc:Point" x="316.0" y="239.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="365.0" y="238.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="217.0" y="238.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="no" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ScriptTask_268">\r
+        <di:waypoint xsi:type="dc:Point" x="390.0" y="213.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="390.0" y="140.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="457.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="392.0" y="179.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_268" targetElement="_BPMNShape_ExclusiveGateway_241">\r
+        <di:waypoint xsi:type="dc:Point" x="557.0" y="140.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="600.0" y="139.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="492.0" y="140.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_269">\r
+        <di:waypoint xsi:type="dc:Point" x="650.0" y="238.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="684.0" y="239.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="556.0" y="239.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_ScriptTask_272">\r
+        <di:waypoint xsi:type="dc:Point" x="784.0" y="239.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="826.0" y="239.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="778.0" y="239.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="yes" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_225">\r
+        <di:waypoint xsi:type="dc:Point" x="390.0" y="263.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="390.0" y="310.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="517.0" y="310.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="310.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="263.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="389.0" y="278.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_23" bpmnElement="javaExceptionSubProcess" isExpanded="true">\r
+        <dc:Bounds height="157.0" width="306.0" x="163.0" y="576.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_65" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="180.0" y="451.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="198.0" y="492.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="192.0" y="637.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="210.0" y="678.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_216" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="408.0" y="637.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="426.0" y="678.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_217" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="420.0" y="451.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="438.0" y="492.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="processError">\r
+        <dc:Bounds height="80.0" width="100.0" x="266.0" y="429.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_271" bpmnElement="processJavaError">\r
+        <dc:Bounds height="80.0" width="100.0" x="267.0" y="615.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_65" targetElement="_BPMNShape_ScriptTask_270">\r
+        <di:waypoint xsi:type="dc:Point" x="216.0" y="469.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="266.0" y="469.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="232.0" y="469.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_217">\r
+        <di:waypoint xsi:type="dc:Point" x="366.0" y="469.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="420.0" y="469.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="384.0" y="469.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ScriptTask_271">\r
+        <di:waypoint xsi:type="dc:Point" x="228.0" y="655.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="267.0" y="655.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_271" targetElement="_BPMNShape_EndEvent_216">\r
+        <di:waypoint xsi:type="dc:Point" x="367.0" y="655.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="408.0" y="655.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_272" bpmnElement="toggleSuccess">\r
+        <dc:Bounds height="80.0" width="100.0" x="826.0" y="199.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_272" targetElement="_BPMNShape_EndEvent_213">\r
+        <di:waypoint xsi:type="dc:Point" x="926.0" y="239.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1006.0" y="239.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="828.0" y="239.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_241" bpmnElement="siExistCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="600.0" y="114.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="59.0" x="596.0" y="94.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="siExistYes" sourceElement="_BPMNShape_ExclusiveGateway_241" targetElement="_BPMNShape_ExclusiveGateway_225">\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="164.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="213.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="624.0" y="168.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="siExistNo" sourceElement="_BPMNShape_ExclusiveGateway_241" targetElement="_BPMNShape_EndEvent_241">\r
+        <di:waypoint xsi:type="dc:Point" x="650.0" y="139.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="733.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="664.0" y="140.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_241" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="733.0" y="122.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="751.0" y="163.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericDeleteVnf.bpmn
new file mode 100644 (file)
index 0000000..b20a26a
--- /dev/null
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_oBLSkHqWEea26OhQB97uCQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="GenericDeleteVnf" name="GenericDeleteVnf" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
+deleteVnf.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="initialization" targetRef="resourceVersionCheck"/>\r
+    <bpmn2:exclusiveGateway id="resourceVersionCheck" name="Resource Version Provided?" default="resourceVersionProvided">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>resourceVariableNotProvided</bpmn2:outgoing>\r
+      <bpmn2:outgoing>resourceVersionProvided</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="resourceVariableNotProvided" name="No" sourceRef="resourceVersionCheck" targetRef="queryForResourceVersion">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDV_resourceVersionProvided") == false}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="resourceVersionProvided" name="Yes" sourceRef="resourceVersionCheck" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="processBPMNError" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="processBPMNError" targetRef="EndEvent_2"/>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_2" targetRef="processBPMNError"/>\r
+      <bpmn2:endEvent id="EndEvent_2">\r
+        <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_40"/>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="queryForResourceVersion" name="Query SI Resource Version" scriptFormat="groovy">\r
+      <bpmn2:incoming>resourceVariableNotProvided</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()\r
+deleteVnf.getVnfResourceVersion(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="queryForResourceVersion" targetRef="vnfFoundCheck"/>\r
+    <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
+deleteVnf.setSuccessIndicator(execution, true)
+
+execution.setVariable("WorkflowResponse", " ")  //for junits]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>\r
+    <bpmn2:scriptTask id="deleteVnf" name="DELETE&#xD;&#xA;Vnf" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericDeleteVnf deleteVnf= new GenericDeleteVnf()
+deleteVnf.deleteVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="deleteVnf" targetRef="toggleSuccess"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>vnfFoundNo</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_41"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="vnfFoundCheck" name="Vnf Found?" default="vnfFoundNo">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>vnfFoundYes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>vnfFoundNo</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="vnfFoundYes" name="Yes" sourceRef="vnfFoundCheck" targetRef="ExclusiveGateway_2">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDV_FoundIndicator") == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="vnfFoundNo" name="No" sourceRef="vnfFoundCheck" targetRef="EndEvent_3"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2">\r
+      <bpmn2:incoming>resourceVersionProvided</bpmn2:incoming>\r
+      <bpmn2:incoming>vnfFoundYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="deleteVnf"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_39"/>\r
+    </bpmn2:endEvent>\r
+  </bpmn2:process>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericDeleteVnf">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_78" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="74.0" y="216.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="92.0" y="257.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_310" bpmnElement="initialization">\r
+        <dc:Bounds height="80.0" width="100.0" x="192.0" y="194.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_78" targetElement="_BPMNShape_ScriptTask_310">\r
+        <di:waypoint xsi:type="dc:Point" x="110.0" y="234.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="192.0" y="234.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_239" bpmnElement="resourceVersionCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="326.0" y="208.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="169.0" x="360.0" y="238.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_310" targetElement="_BPMNShape_ExclusiveGateway_239">\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="466.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="220.0" y="466.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="191.0" y="466.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_320" bpmnElement="queryForResourceVersion">\r
+        <dc:Bounds height="80.0" width="100.0" x="408.0" y="96.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_321" bpmnElement="deleteVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="658.0" y="194.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_240" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="562.0" y="208.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="587.0" y="263.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_322" bpmnElement="toggleSuccess">\r
+        <dc:Bounds height="80.0" width="100.0" x="802.0" y="194.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_240" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1001.0" y="216.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1019.0" y="257.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="resourceVariableNotProvided" sourceElement="_BPMNShape_ExclusiveGateway_239" targetElement="_BPMNShape_ScriptTask_320">\r
+        <di:waypoint xsi:type="dc:Point" x="351.0" y="208.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="351.0" y="136.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="408.0" y="136.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="354.0" y="165.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="resourceVersionProvided" sourceElement="_BPMNShape_ExclusiveGateway_239" targetElement="_BPMNShape_ExclusiveGateway_240">\r
+        <di:waypoint xsi:type="dc:Point" x="351.0" y="258.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="351.0" y="312.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="459.0" y="312.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="587.0" y="312.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="587.0" y="258.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="351.0" y="276.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_320" targetElement="_BPMNShape_ExclusiveGateway_242">\r
+        <di:waypoint xsi:type="dc:Point" x="508.0" y="136.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="562.0" y="135.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="558.0" y="135.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_240" targetElement="_BPMNShape_ScriptTask_321">\r
+        <di:waypoint xsi:type="dc:Point" x="612.0" y="233.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="658.0" y="234.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="633.0" y="234.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_321" targetElement="_BPMNShape_ScriptTask_322">\r
+        <di:waypoint xsi:type="dc:Point" x="758.0" y="234.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="802.0" y="234.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="777.0" y="234.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_322" targetElement="_BPMNShape_EndEvent_240">\r
+        <di:waypoint xsi:type="dc:Point" x="902.0" y="234.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1001.0" y="234.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="949.0" y="234.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_310" targetElement="_BPMNShape_ExclusiveGateway_239">\r
+        <di:waypoint xsi:type="dc:Point" x="292.0" y="234.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="326.0" y="233.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="311.0" y="233.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_36" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="157.0" width="304.0" x="117.0" y="387.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_82" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="132.0" y="448.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="150.0" y="489.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_242" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="372.0" y="448.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="390.0" y="489.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_323" bpmnElement="processBPMNError">\r
+        <dc:Bounds height="80.0" width="100.0" x="220.0" y="426.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_323" targetElement="_BPMNShape_EndEvent_242">\r
+        <di:waypoint xsi:type="dc:Point" x="320.0" y="466.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="372.0" y="466.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="343.0" y="466.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_242" bpmnElement="vnfFoundCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="562.0" y="110.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="72.0" x="552.0" y="90.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_243" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="708.0" y="118.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="726.0" y="159.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="vnfFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_242" targetElement="_BPMNShape_ExclusiveGateway_240">\r
+        <di:waypoint xsi:type="dc:Point" x="587.0" y="160.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="587.0" y="208.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="587.0" y="165.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="vnfFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_242" targetElement="_BPMNShape_EndEvent_243">\r
+        <di:waypoint xsi:type="dc:Point" x="612.0" y="135.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="708.0" y="136.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="637.0" y="135.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetService.bpmn
new file mode 100644 (file)
index 0000000..cbaec1a
--- /dev/null
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_D5VzAHElEeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="GenericGetService" name="GenericGetService" isExecutable="true">\r
+    <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericGetService getService = new GenericGetService()\r
+getService.preProcessRequest(execution)\r
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl"/>\r
+    <bpmn2:exclusiveGateway id="getUrl" name="Get Url?" default="getUrlNo">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrl" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2"/>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException"/>\r
+      <bpmn2:endEvent id="EndEvent_2">\r
+        <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericGetService getService = new GenericGetService()\r
+getService.setSuccessIndicator(execution, true)\r
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>\r
+    <bpmn2:scriptTask id="getServiceInstance" name="GET&#xD;&#xA;Service Instance" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericGetService getService = new GenericGetService()\r
+getService.getServiceObject(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2">\r
+      <bpmn2:incoming>getUrlNo</bpmn2:incoming>\r
+      <bpmn2:incoming>foundYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance"/>\r
+    <bpmn2:scriptTask id="obtainServiceUrlById" name="Obtain Service URL Using&#xD;&#xA;Id" scriptFormat="groovy">\r
+      <bpmn2:incoming>obtainById</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericGetService getService = new GenericGetService()\r
+getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:scriptTask id="obtainServiceUrlByName" name="Obtain Service Url Using&#xD;&#xA;Name" scriptFormat="groovy">\r
+      <bpmn2:incoming>obtainByName</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+GenericGetService getService = new GenericGetService()\r
+getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:exclusiveGateway id="obtain" name="Obtain By?" default="obtainById">\r
+      <bpmn2:incoming>getUrlYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>obtainById</bpmn2:outgoing>\r
+      <bpmn2:outgoing>obtainByName</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById"/>\r
+    <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>foundYes</bpmn2:outgoing>\r
+      <bpmn2:outgoing>notFound</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>notFound</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>\r
+  </bpmn2:process>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="108.0" y="264.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="126.0" y="305.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">\r
+        <dc:Bounds height="80.0" width="100.0" x="228.0" y="242.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">\r
+        <di:waypoint xsi:type="dc:Point" x="144.0" y="282.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="228.0" y="282.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="177.0" y="282.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="372.0" y="256.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="70.0" x="408.0" y="286.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">\r
+        <di:waypoint xsi:type="dc:Point" x="328.0" y="282.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="372.0" y="281.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="350.0" y="281.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">\r
+        <dc:Bounds height="80.0" width="100.0" x="528.0" y="197.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="738.0" y="256.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="763.0" y="311.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">\r
+        <dc:Bounds height="80.0" width="100.0" x="820.0" y="242.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">\r
+        <di:waypoint xsi:type="dc:Point" x="397.0" y="256.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="397.0" y="170.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="446.0" y="170.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="397.0" y="213.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">\r
+        <di:waypoint xsi:type="dc:Point" x="628.0" y="237.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="671.0" y="237.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="671.0" y="195.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="668.0" y="221.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">\r
+        <di:waypoint xsi:type="dc:Point" x="788.0" y="281.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="282.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="798.0" y="281.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">\r
+        <di:waypoint xsi:type="dc:Point" x="397.0" y="306.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="397.0" y="370.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="763.0" y="370.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="763.0" y="306.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="400.0" y="324.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">\r
+        <dc:Bounds height="80.0" width="100.0" x="960.0" y="242.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">\r
+        <di:waypoint xsi:type="dc:Point" x="920.0" y="282.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="960.0" y="282.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="937.0" y="282.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1133.0" y="264.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1151.0" y="305.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">\r
+        <di:waypoint xsi:type="dc:Point" x="1060.0" y="282.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1133.0" y="282.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1100.0" y="282.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="169.0" width="325.0" x="152.0" y="468.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="176.0" y="535.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="194.0" y="576.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="416.0" y="535.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="434.0" y="576.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">\r
+        <dc:Bounds height="80.0" width="100.0" x="265.0" y="513.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">\r
+        <di:waypoint xsi:type="dc:Point" x="212.0" y="553.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="265.0" y="553.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="233.0" y="553.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">\r
+        <di:waypoint xsi:type="dc:Point" x="365.0" y="553.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="416.0" y="553.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="385.0" y="553.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">\r
+        <dc:Bounds height="80.0" width="100.0" x="528.0" y="59.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="446.0" y="145.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="71.0" x="496.0" y="162.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="646.0" y="145.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="671.0" y="200.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">\r
+        <di:waypoint xsi:type="dc:Point" x="471.0" y="195.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="471.0" y="236.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="528.0" y="237.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="16.0" x="476.0" y="207.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">\r
+        <di:waypoint xsi:type="dc:Point" x="471.0" y="145.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="471.0" y="99.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="528.0" y="99.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="40.0" x="471.0" y="115.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">\r
+        <di:waypoint xsi:type="dc:Point" x="628.0" y="99.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="671.0" y="99.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="671.0" y="145.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="665.0" y="99.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="738.0" y="145.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="59.0" x="735.0" y="125.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">\r
+        <di:waypoint xsi:type="dc:Point" x="696.0" y="170.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="738.0" y="170.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="704.0" y="170.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">\r
+        <di:waypoint xsi:type="dc:Point" x="763.0" y="195.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="763.0" y="256.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="762.0" y="205.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">\r
+        <di:waypoint xsi:type="dc:Point" x="788.0" y="170.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="877.0" y="171.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="798.0" y="170.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="877.0" y="153.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="895.0" y="194.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericGetVnf.bpmn
new file mode 100644 (file)
index 0000000..4fe0321
--- /dev/null
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_eb5eEHR6EeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="GenericGetVnf" name="GenericGetVnf" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericGetVnf genericGetVnf = new GenericGetVnf ()
+genericGetVnf.preProcessRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="vnfIdProvided"/>\r
+    <bpmn2:exclusiveGateway id="vnfIdProvided" name="Vnf Id Provided?" default="noVnfId">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>noVnfId</bpmn2:outgoing>\r
+      <bpmn2:outgoing>haveVnfId</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="noVnfId" name="No" sourceRef="vnfIdProvided" targetRef="getVnfByName"/>\r
+    <bpmn2:sequenceFlow id="haveVnfId" name="Yes" sourceRef="vnfIdProvided" targetRef="getGenericVnf">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_getVnfByName") == false}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="getVnfByName" name="GET Vnf By Name" scriptFormat="groovy">\r
+      <bpmn2:incoming>noVnfId</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericGetVnf genericGetVnf = new GenericGetVnf()
+genericGetVnf.getVnfByName(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="getVnfByName" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_2" targetRef="toggleSuccess"/>\r
+    <bpmn2:scriptTask id="getGenericVnf" name="GET Vnf By&#xD;&#xA;Id" scriptFormat="groovy">\r
+      <bpmn2:incoming>haveVnfId</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericGetVnf genericGetVnf = new GenericGetVnf()
+genericGetVnf.getVnfById(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="getGenericVnf" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:endEvent id="EndEvent_3">\r
+        <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_31"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:scriptTask id="proccessBPMNError" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+ExceptionUtil ex = new ExceptionUtil()
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="proccessBPMNError" targetRef="EndEvent_3"/>\r
+      <bpmn2:startEvent id="catchMSOWorkflowException">\r
+        <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="catchMSOWorkflowException" targetRef="proccessBPMNError"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericGetVnf genericGetVnf = new GenericGetVnf()
+genericGetVnf.setSuccessIndicator(execution, true)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_28"/>\r
+    </bpmn2:endEvent>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetVnf">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="110.0" y="271.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="128.0" y="312.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_295" bpmnElement="intialization">\r
+        <dc:Bounds height="80.0" width="100.0" x="228.0" y="249.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_230" bpmnElement="vnfIdProvided" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="372.0" y="263.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="99.0" x="419.0" y="292.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_295">\r
+        <di:waypoint xsi:type="dc:Point" x="146.0" y="289.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="228.0" y="289.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_295" targetElement="_BPMNShape_ExclusiveGateway_230">\r
+        <di:waypoint xsi:type="dc:Point" x="328.0" y="289.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="372.0" y="288.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="347.0" y="288.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_296" bpmnElement="getVnfByName">\r
+        <dc:Bounds height="80.0" width="100.0" x="456.0" y="156.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_231" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="600.0" y="263.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="625.0" y="318.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="noVnfId" sourceElement="_BPMNShape_ExclusiveGateway_230" targetElement="_BPMNShape_ScriptTask_296">\r
+        <di:waypoint xsi:type="dc:Point" x="397.0" y="263.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="397.0" y="196.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="456.0" y="196.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="399.0" y="219.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="haveVnfId" sourceElement="_BPMNShape_ExclusiveGateway_230" targetElement="_BPMNShape_ScriptTask_297">\r
+        <di:waypoint xsi:type="dc:Point" x="397.0" y="313.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="397.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="456.0" y="368.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="396.0" y="328.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_297" bpmnElement="getGenericVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="456.0" y="328.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_298" bpmnElement="toggleSuccess">\r
+        <dc:Bounds height="80.0" width="100.0" x="696.0" y="249.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="888.0" y="271.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="906.0" y="312.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_231" targetElement="_BPMNShape_ScriptTask_298">\r
+        <di:waypoint xsi:type="dc:Point" x="650.0" y="288.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="696.0" y="289.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="673.0" y="289.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_298" targetElement="_BPMNShape_EndEvent_226">\r
+        <di:waypoint xsi:type="dc:Point" x="796.0" y="289.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="888.0" y="289.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="829.0" y="289.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_296" targetElement="_BPMNShape_ExclusiveGateway_231">\r
+        <di:waypoint xsi:type="dc:Point" x="556.0" y="196.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="196.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="263.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="622.0" y="205.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_297" targetElement="_BPMNShape_ExclusiveGateway_231">\r
+        <di:waypoint xsi:type="dc:Point" x="556.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="368.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="625.0" y="313.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="621.0" y="368.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_30" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="169.0" width="313.0" x="168.0" y="468.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_74" bpmnElement="catchMSOWorkflowException">\r
+        <dc:Bounds height="36.0" width="36.0" x="180.0" y="535.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="198.0" y="576.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="proccessBPMNError">\r
+        <dc:Bounds height="80.0" width="100.0" x="275.0" y="513.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_231" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="432.0" y="535.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="450.0" y="576.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_StartEvent_74" targetElement="_BPMNShape_ScriptTask_302">\r
+        <di:waypoint xsi:type="dc:Point" x="216.0" y="553.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="275.0" y="553.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="238.0" y="553.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_302" targetElement="_BPMNShape_EndEvent_231">\r
+        <di:waypoint xsi:type="dc:Point" x="375.0" y="553.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="432.0" y="553.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="402.0" y="553.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/GenericPutVnf.bpmn
new file mode 100644 (file)
index 0000000..bcda933
--- /dev/null
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_ZkRI4HntEea26OhQB97uCQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="GenericPutVnf" name="GenericPutVnf" isExecutable="true">\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericPutVnf genericPutVnf = new GenericPutVnf()
+genericPutVnf.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="putVnf"/>\r
+    <bpmn2:subProcess id="processBPMNExceptionSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:endEvent id="EndEvent_2">\r
+        <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_43"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_96"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+\r
+ExceptionUtil ex = new ExceptionUtil()\r
+ex.processSubflowsBPMNException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="StartEvent_2" targetRef="processBPMNException"/>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="processBPMNException" targetRef="EndEvent_2"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="putVnf" name="PUT Vnf" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericPutVnf genericPutVnf = new GenericPutVnf()
+genericPutVnf.putVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="putVnf" targetRef="toggleSuccess"/>\r
+    <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+GenericPutVnf genericPutVnf = new GenericPutVnf()
+genericPutVnf.setSuccessIndicator(execution, true)
+
+execution.setVariable("WorkflowResponse", " ")  //for junits]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_42"/>\r
+    </bpmn2:endEvent>\r
+  </bpmn2:process>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericPutVnf">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_75" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="116.0" y="233.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="134.0" y="274.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_305" bpmnElement="intialization">\r
+        <dc:Bounds height="80.0" width="100.0" x="240.0" y="211.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_306" bpmnElement="putVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="384.0" y="211.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_307" bpmnElement="toggleSuccess">\r
+        <dc:Bounds height="80.0" width="100.0" x="528.0" y="211.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_233" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="732.0" y="233.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="750.0" y="274.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_75" targetElement="_BPMNShape_ScriptTask_305">\r
+        <di:waypoint xsi:type="dc:Point" x="152.0" y="251.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="240.0" y="251.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_305" targetElement="_BPMNShape_ScriptTask_306">\r
+        <di:waypoint xsi:type="dc:Point" x="340.0" y="251.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="384.0" y="251.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="365.0" y="251.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_306" targetElement="_BPMNShape_ScriptTask_307">\r
+        <di:waypoint xsi:type="dc:Point" x="484.0" y="251.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="528.0" y="251.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="513.0" y="251.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_307" targetElement="_BPMNShape_EndEvent_233">\r
+        <di:waypoint xsi:type="dc:Point" x="628.0" y="251.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="732.0" y="251.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="678.0" y="251.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_31" bpmnElement="processBPMNExceptionSubProcess" isExpanded="true">\r
+        <dc:Bounds height="169.0" width="322.0" x="174.0" y="396.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_83" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="204.0" y="463.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="222.0" y="504.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_244" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="432.0" y="463.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="450.0" y="504.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_324" bpmnElement="processBPMNException">\r
+        <dc:Bounds height="80.0" width="100.0" x="286.0" y="441.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_StartEvent_83" targetElement="_BPMNShape_ScriptTask_324">\r
+        <di:waypoint xsi:type="dc:Point" x="240.0" y="481.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="286.0" y="481.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_324" targetElement="_BPMNShape_EndEvent_244">\r
+        <di:waypoint xsi:type="dc:Point" x="386.0" y="481.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="432.0" y="481.0"/>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn
new file mode 100644 (file)
index 0000000..fc9f0a1
--- /dev/null
@@ -0,0 +1,810 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_l2hJ8CccEeW3d--PaFJMbg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="sdncAdapter" name="SDNC Adapter" isExecutable="true">\r
+    <bpmn2:exclusiveGateway id="isResponseOK" name="is Response Ok?" default="badSynchronousResponse">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>badSynchronousResponse</bpmn2:outgoing>\r
+      <bpmn2:outgoing>goodSynchronousResponse</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="badSynchronousResponse" name="Bad synchronous response" sourceRef="isResponseOK" targetRef="setBadResponse"/>\r
+    <bpmn2:sequenceFlow id="goodSynchronousResponse" name="Good synchronous response" sourceRef="isResponseOK" targetRef="resetCallbackRequest">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("SDNCA_ResponseCode")=='200'}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="setBadResponse" name="Set Bad Response&#xD;&#xA;Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>badSynchronousResponse</bpmn2:incoming>\r
+      <bpmn2:outgoing>Exception</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+int responseCode = execution.getVariable("SDNCA_ResponseCode")
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 7000, "Could not communicate with the SDNC Adapter" )]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="Exception" name="Exception" sourceRef="setBadResponse" targetRef="badResponseEndFlow"/>\r
+    <bpmn2:serviceTask id="invokeSDNCAdapter" camunda:class="" name="Invoke SDNC Adapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_sdnc_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+                <camunda:entry key="Authorization">#{BasicAuthHeaderValue}</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${sdncAdapterRequest}</camunda:inputParameter>\r
+            <camunda:outputParameter name="sdncAdapterWorkflowResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="SDNCA_ResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" sourceRef="invokeSDNCAdapter" targetRef="isResponseOK"/>\r
+    <bpmn2:endEvent id="badResponseEndFlow" name="Bad Response End Flow">\r
+      <bpmn2:incoming>Exception</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_77" errorRef="Error_3"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:startEvent id="SDNCAdapter_Start" name="Incoming Message">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+      <bpmn2:messageEventDefinition id="_MessageEventDefinition_3" messageRef="Message_1"/>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="SDNCAdapter_Start" targetRef="processMessage"/>\r
+    <bpmn2:scriptTask id="processMessage" name="Process message" scriptFormat="groovy">\r
+      <bpmn2:extensionElements>\r
+        <camunda:inputOutput>\r
+          <camunda:inputParameter name="ScriptObject">\r
+            <camunda:map>\r
+              <camunda:entry key="MethodName">massageSDNCRequestScript</camunda:entry>\r
+              <camunda:entry key="Params"/>\r
+            </camunda:map>\r
+          </camunda:inputParameter>\r
+        </camunda:inputOutput>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.preProcessRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" sourceRef="processMessage" targetRef="invokeSDNCAdapter"/>\r
+    <bpmn2:exclusiveGateway id="timeOutCheck">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:incoming>timeOut</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:scriptTask id="returnWorkflowResult" name="Return workflow result" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.postProcessResponse(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" sourceRef="returnWorkflowResult" targetRef="timeoutError"/>\r
+    <bpmn2:exclusiveGateway id="timeoutError" name="Did Timeout occur?" default="noTimeoutError">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>noTimeoutError</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="noTimeoutError" name="No Timeout" sourceRef="timeoutError" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_19" name="Timeout" sourceRef="timeoutError" targetRef="setTimeoutEx">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("asynchronousResponseTimeout")==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:subProcess id="SubProcess" name="Wait for asynchronous message">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:endEvent id="eEndEventSubprocess" name="End Event Subprocess">\r
+        <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="StartEvent" name="Start Event">\r
+        <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_18" sourceRef="StartEvent" targetRef="IntermediateCatchEvent"/>\r
+      <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent" name="Catch Event">\r
+        <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+        <bpmn2:messageEventDefinition id="MessageEventDefinition_2" messageRef="Message_2"/>\r
+      </bpmn2:intermediateCatchEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_16" sourceRef="IntermediateCatchEvent" targetRef="eEndEventSubprocess"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" sourceRef="SubProcess" targetRef="timeOutCheck"/>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="Boundary Event" attachedToRef="SubProcess">\r
+      <bpmn2:outgoing>timeOut</bpmn2:outgoing>\r
+      <bpmn2:timerEventDefinition id="TimerEventDefinition_1">\r
+        <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${sdncTimeoutValue}</bpmn2:timeDuration>\r
+      </bpmn2:timerEventDefinition>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="timeOut" name="Timed out" sourceRef="BoundaryEvent_1" targetRef="timeOutCheck"/>\r
+    <bpmn2:scriptTask id="setTimeoutEx" name="Set Timeout&#xD;&#xA;Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+      <bpmn2:outgoing>Error</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildWorkflowException(execution, 500, "SDNC Callback Timeout Error" )
+
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="Error" name="Error" sourceRef="setTimeoutEx" targetRef="endEventException"/>\r
+    <bpmn2:endEvent id="endEventException" name="Timeout Exception">\r
+      <bpmn2:incoming>Error</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="timeOutCheck" targetRef="returnWorkflowResult"/>\r
+    <bpmn2:scriptTask id="resetCallbackRequest" name="Reset callback request and set timer value" scriptFormat="groovy">\r
+      <bpmn2:incoming>goodSynchronousResponse</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.resetCallbackRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="resetCallbackRequest" targetRef="SubProcess"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Check final indicator" default="Done">\r
+      <bpmn2:incoming>noTimeoutError</bpmn2:incoming>\r
+      <bpmn2:outgoing>Done</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="Done" name="Done" sourceRef="ExclusiveGateway_1" targetRef="toggleSuccessIndicator"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_30" name="Not Done" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_3">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("continueListening")==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="toggleSuccessIndicator" name="Toggle Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>Done</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.toggleSuccessIndicator(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="toggleSuccessIndicator" targetRef="endEventFlow"/>\r
+    <bpmn2:endEvent id="endEventFlow" name="End Event Flow">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:inputOutput>\r
+            <camunda:outputParameter name="sdncAdapterResponse">${sdncAdapterWorkflowResponse}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:messageEventDefinition id="_MessageEventDefinition_6"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:parallelGateway id="ParallelGateway_3">\r
+      <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ParallelGateway_3" targetRef="toggleSuccess"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_26" name="Continue listening for asynchronous message" sourceRef="ParallelGateway_3" targetRef="resetCallbackRequest"/>\r
+    <bpmn2:subProcess id="errorHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:startEvent id="catchErrors" name="Catch">\r
+        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_78" errorRef="Error_3"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="catchErrors" targetRef="assignError"/>\r
+      <bpmn2:scriptTask id="assignError" name="Assign Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.assignError(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="assignError" targetRef="EndEvent_5"/>\r
+      <bpmn2:endEvent id="EndEvent_5">\r
+        <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_5">\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_3">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('source').equals('CCD')}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_3" name="Prepare CCD Message" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.prepareCCDMessage(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_3" targetRef="notifyCCD"/>\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Prepare CSI Message" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.prepareCSIMessage(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_2" targetRef="notifyCSI"/>\r
+    <bpmn2:scriptTask id="ScriptTask_1" name="Prepare DB Message" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.prepareDBMessage(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_1" targetRef="notifyDB"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_4">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:serviceTask id="notifyDB" camunda:class="" name="Notify DB">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_mso_adapters_db_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${dbUpdateInterimStageCompletion}</camunda:inputParameter>\r
+            <camunda:outputParameter name="dbUpdateInterimStageCompletionResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="dbUpdateInterimStageCompletionResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:serviceTask id="notifyCCD" name="Notify CCD">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url"><![CDATA[${execution.getVariable("ccd-notification-url")}]]></camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="Content-Type">text/xml</camunda:entry>\r
+                <camunda:entry key="Authorization"/>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload"><![CDATA[${execution.getVariable("ccd-notification-payload")}]]></camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:outputParameter name="CCDResponse"><![CDATA[${statusCode == null || statusCode == 204 ? "" : response}]]></camunda:outputParameter>\r
+            <camunda:outputParameter name="CCDResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="notifyCCD" targetRef="EndEvent_4"/>\r
+    <bpmn2:serviceTask id="notifyCSI" camunda:class="" name="Notify CSI">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:connectorId>soap-http-connector</camunda:connectorId>\r
+          <camunda:inputOutput>\r
+            <camunda:inputParameter name="url">${URN_csi_networkstatus_endpoint}</camunda:inputParameter>\r
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>\r
+            <camunda:inputParameter name="headers">\r
+              <camunda:map>\r
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>\r
+              </camunda:map>\r
+            </camunda:inputParameter>\r
+            <camunda:inputParameter name="payload">${csiSendManagedNetworkNotificationRequest}</camunda:inputParameter>\r
+            <camunda:outputParameter name="csiSendManagedNetworkStatusNotificationResponse">${response}</camunda:outputParameter>\r
+            <camunda:outputParameter name="csiSendManagedNetworkStatusNotificationResponseCode">${statusCode}</camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+    </bpmn2:serviceTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="notifyCSI" targetRef="EndEvent_3"/>\r
+    <bpmn2:parallelGateway id="ParallelGateway_1">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+    </bpmn2:parallelGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ParallelGateway_1" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ParallelGateway_1" targetRef="ScriptTask_1"/>\r
+    <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def sdnc= new SDNCAdapter()
+sdnc.toggleSuccessIndicator(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="toggleSuccess" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Service Config Activate?" default="SequenceFlow_23">\r
+      <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="Yes" sourceRef="ExclusiveGateway_2" targetRef="ParallelGateway_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("serviceConfigActivate")==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="No" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_2" name="" attachedToRef="notifyDB">\r
+      <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_79" errorRef="Error_2"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:endEvent id="EndEvent_6">\r
+      <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="BoundaryEvent_2" targetRef="EndEvent_6"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="notifyDB" targetRef="EndEvent_2"/>\r
+  </bpmn2:process>\r
+  <bpmn2:message id="Message_1" name="sdncAdapterWorkflowRequest"/>\r
+  <bpmn2:message id="Message_2" name="sdncAdapterCallbackRequest"/>\r
+  <bpmn2:error id="Error_3" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmn2:signal id="Signal_1" name="InterimStatus"/>\r
+  <bpmn2:error id="Error_2" errorCode="java.lang.Exception" name="Java Lang Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="sdncAdapter">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_33" bpmnElement="SDNCAdapter_Start">\r
+        <dc:Bounds height="36.0" width="36.0" x="111.0" y="161.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="115.0" x="72.0" y="202.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_62" bpmnElement="invokeSDNCAdapter">\r
+        <dc:Bounds height="80.0" width="100.0" x="342.0" y="139.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_29" bpmnElement="isResponseOK" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="519.0" y="153.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="106.0" x="569.0" y="182.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_64" bpmnElement="endEventFlow">\r
+        <dc:Bounds height="36.0" width="36.0" x="1560.0" y="366.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="96.0" x="1595.0" y="373.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_65" bpmnElement="badResponseEndFlow">\r
+        <dc:Bounds height="36.0" width="36.0" x="762.0" y="104.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="149.0" x="804.0" y="111.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="badSynchronousResponse" sourceElement="_BPMNShape_ExclusiveGateway_29" targetElement="_BPMNShape_ScriptTask_24">\r
+        <di:waypoint xsi:type="dc:Point" x="544.0" y="153.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="544.0" y="122.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="600.0" y="122.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="164.0" x="441.0" y="99.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_33" targetElement="_BPMNShape_ScriptTask_3">\r
+        <di:waypoint xsi:type="dc:Point" x="147.0" y="179.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="179.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="171.0" y="179.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="goodSynchronousResponse" sourceElement="_BPMNShape_ExclusiveGateway_29" targetElement="_BPMNShape_ScriptTask_27">\r
+        <di:waypoint xsi:type="dc:Point" x="544.0" y="203.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="544.0" y="246.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="172.0" x="459.0" y="208.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_68" bpmnElement="returnWorkflowResult">\r
+        <dc:Bounds height="80.0" width="100.0" x="1104.0" y="237.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_3" bpmnElement="processMessage">\r
+        <dc:Bounds height="80.0" width="100.0" x="194.0" y="139.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_3" targetElement="_BPMNShape_ServiceTask_62">\r
+        <di:waypoint xsi:type="dc:Point" x="294.0" y="179.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="342.0" y="179.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="30.0" x="300.0" y="153.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ServiceTask_68" targetElement="_BPMNShape_ExclusiveGateway_53">\r
+        <di:waypoint xsi:type="dc:Point" x="1204.0" y="277.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1248.0" y="276.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="37.0" x="1211.0" y="251.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ServiceTask_62" targetElement="_BPMNShape_ExclusiveGateway_29">\r
+        <di:waypoint xsi:type="dc:Point" x="442.0" y="179.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="480.0" y="179.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="480.0" y="178.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="519.0" y="178.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="37.0" x="468.0" y="153.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_16" bpmnElement="IntermediateCatchEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="764.0" y="259.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="76.0" x="714.0" y="294.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_11" bpmnElement="SubProcess" isExpanded="true">\r
+        <dc:Bounds height="97.0" width="314.0" x="624.0" y="228.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_38" bpmnElement="StartEvent">\r
+        <dc:Bounds height="36.0" width="36.0" x="660.0" y="259.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="70.0" x="627.0" y="294.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_90" bpmnElement="eEndEventSubprocess">\r
+        <dc:Bounds height="36.0" width="36.0" x="865.0" y="259.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="138.0" x="805.0" y="294.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_SubProcess_11" targetElement="_BPMNShape_ExclusiveGateway_51">\r
+        <di:waypoint xsi:type="dc:Point" x="938.0" y="276.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="996.0" y="276.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="967.0" y="254.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_21" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="781.0" y="307.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="97.0" x="704.0" y="340.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_91" bpmnElement="endEventException">\r
+        <dc:Bounds height="36.0" width="36.0" x="1488.0" y="74.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="114.0" x="1523.0" y="81.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="timeOut" sourceElement="_BPMNShape_BoundaryEvent_21" targetElement="_BPMNShape_ExclusiveGateway_51">\r
+        <di:waypoint xsi:type="dc:Point" x="799.0" y="343.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="799.0" y="365.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1021.0" y="365.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1021.0" y="301.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="63.0" x="874.0" y="340.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_24" bpmnElement="setBadResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="600.0" y="82.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="Exception" sourceElement="_BPMNShape_ScriptTask_24" targetElement="_BPMNShape_EndEvent_65">\r
+        <di:waypoint xsi:type="dc:Point" x="700.0" y="122.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="762.0" y="122.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="64.0" x="699.0" y="99.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_25" bpmnElement="setTimeoutEx">\r
+        <dc:Bounds height="80.0" width="100.0" x="1299.0" y="52.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="Error" sourceElement="_BPMNShape_ScriptTask_25" targetElement="_BPMNShape_EndEvent_91">\r
+        <di:waypoint xsi:type="dc:Point" x="1399.0" y="92.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1488.0" y="92.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="1416.0" y="70.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_IntermediateCatchEvent_16" targetElement="_BPMNShape_EndEvent_90">\r
+        <di:waypoint xsi:type="dc:Point" x="800.0" y="277.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="277.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="822.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_38" targetElement="_BPMNShape_IntermediateCatchEvent_16">\r
+        <di:waypoint xsi:type="dc:Point" x="696.0" y="277.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="764.0" y="277.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="718.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_51" bpmnElement="timeOutCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="996.0" y="251.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="81.0" x="982.0" y="228.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_53" bpmnElement="timeoutError" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1248.0" y="251.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="118.0" x="1300.0" y="266.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="noTimeoutError" sourceElement="_BPMNShape_ExclusiveGateway_53" targetElement="_BPMNShape_ExclusiveGateway_54">\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="301.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="359.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="72.0" x="1280.0" y="324.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_53" targetElement="_BPMNShape_ScriptTask_25">\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="251.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="92.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1299.0" y="92.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="82.0" x="1280.0" y="168.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1248.0" y="359.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="123.0" x="1127.0" y="373.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="Done" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_247">\r
+        <di:waypoint xsi:type="dc:Point" x="1298.0" y="384.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1383.0" y="384.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="36.0" x="1316.0" y="384.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_27" bpmnElement="resetCallbackRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="494.0" y="246.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_27" targetElement="_BPMNShape_SubProcess_11">\r
+        <di:waypoint xsi:type="dc:Point" x="594.0" y="286.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="609.0" y="286.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="624.0" y="285.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="607.0" y="286.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ExclusiveGateway_51" targetElement="_BPMNShape_ServiceTask_68">\r
+        <di:waypoint xsi:type="dc:Point" x="1046.0" y="276.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1075.0" y="276.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1075.0" y="277.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1104.0" y="277.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ParallelGateway_14">\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="409.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="467.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="60.0" x="1273.0" y="423.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_55" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1248.0" y="663.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="145.0" x="1105.0" y="678.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_28" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="1173.0" y="858.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_ParallelGateway_12">\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="713.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="770.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1273.0" y="720.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_89" bpmnElement="notifyCSI">\r
+        <dc:Bounds height="80.0" width="100.0" x="1173.0" y="984.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_28" targetElement="_BPMNShape_ServiceTask_89">\r
+        <di:waypoint xsi:type="dc:Point" x="1223.0" y="938.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1223.0" y="984.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1220.0" y="976.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_75" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="1345.0" y="858.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_12" bpmnElement="ParallelGateway_1">\r
+        <dc:Bounds height="50.0" width="50.0" x="1248.0" y="770.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1273.0" y="825.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ExclusiveGateway_100">\r
+        <di:waypoint xsi:type="dc:Point" x="1248.0" y="795.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1105.0" y="795.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1105.0" y="872.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1136.0" y="807.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ParallelGateway_12" targetElement="_BPMNShape_ScriptTask_75">\r
+        <di:waypoint xsi:type="dc:Point" x="1298.0" y="795.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1394.0" y="795.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1395.0" y="858.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1376.0" y="807.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_90" bpmnElement="notifyDB">\r
+        <dc:Bounds height="80.0" width="100.0" x="1345.0" y="984.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_75" targetElement="_BPMNShape_ServiceTask_90">\r
+        <di:waypoint xsi:type="dc:Point" x="1395.0" y="938.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1395.0" y="984.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1392.0" y="967.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ParallelGateway_14" bpmnElement="ParallelGateway_3">\r
+        <dc:Bounds height="50.0" width="50.0" x="1248.0" y="467.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1273.0" y="522.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ScriptTask_255">\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="517.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1274.0" y="552.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1270.0" y="533.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_96" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1444.0" y="671.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1462.0" y="712.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_EndEvent_96">\r
+        <di:waypoint xsi:type="dc:Point" x="1298.0" y="688.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1444.0" y="689.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1320.0" y="688.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_97" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1377.0" y="1117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1395.0" y="1158.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_98" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="1205.0" y="1117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1223.0" y="1158.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ServiceTask_89" targetElement="_BPMNShape_EndEvent_98">\r
+        <di:waypoint xsi:type="dc:Point" x="1223.0" y="1064.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1223.0" y="1117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1220.0" y="1187.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ScriptTask_27">\r
+        <di:waypoint xsi:type="dc:Point" x="1248.0" y="492.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="544.0" y="492.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="544.0" y="326.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="269.0" x="684.0" y="467.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_100" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1080.0" y="872.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1105.0" y="927.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_100" targetElement="_BPMNShape_ScriptTask_28">\r
+        <di:waypoint xsi:type="dc:Point" x="1130.0" y="897.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1173.0" y="898.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1148.0" y="897.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_167" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="941.0" y="858.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_100" targetElement="_BPMNShape_ScriptTask_167">\r
+        <di:waypoint xsi:type="dc:Point" x="1080.0" y="897.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1041.0" y="898.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1042.0" y="898.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_96" bpmnElement="notifyCCD">\r
+        <dc:Bounds height="80.0" width="100.0" x="942.0" y="984.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_167" targetElement="_BPMNShape_ServiceTask_96">\r
+        <di:waypoint xsi:type="dc:Point" x="991.0" y="938.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="992.0" y="984.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="987.0" y="974.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_150" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="974.0" y="1117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="992.0" y="1158.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ServiceTask_96" targetElement="_BPMNShape_EndEvent_150">\r
+        <di:waypoint xsi:type="dc:Point" x="991.0" y="1064.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="991.0" y="1090.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="992.0" y="1117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="990.0" y="1103.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_247" bpmnElement="toggleSuccessIndicator">\r
+        <dc:Bounds height="80.0" width="100.0" x="1383.0" y="344.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_247" targetElement="_BPMNShape_EndEvent_64">\r
+        <di:waypoint xsi:type="dc:Point" x="1483.0" y="384.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1560.0" y="384.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1499.0" y="384.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_19" bpmnElement="errorHandlingSubProcess" isExpanded="true">\r
+        <dc:Bounds height="193.0" width="353.0" x="248.0" y="866.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="catchErrors">\r
+        <dc:Bounds height="36.0" width="36.0" x="283.0" y="945.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="40.0" x="281.0" y="986.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_213" bpmnElement="EndEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="523.0" y="945.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="541.0" y="986.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_249" bpmnElement="assignError">\r
+        <dc:Bounds height="80.0" width="100.0" x="367.0" y="923.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_249">\r
+        <di:waypoint xsi:type="dc:Point" x="319.0" y="963.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="367.0" y="963.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="346.0" y="963.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_249" targetElement="_BPMNShape_EndEvent_213">\r
+        <di:waypoint xsi:type="dc:Point" x="467.0" y="963.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="523.0" y="963.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="492.0" y="963.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="toggleSuccess">\r
+        <dc:Bounds height="80.0" width="100.0" x="1224.0" y="552.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_ExclusiveGateway_55">\r
+        <di:waypoint xsi:type="dc:Point" x="1274.0" y="632.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1274.0" y="646.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="646.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1273.0" y="663.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1271.0" y="646.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_22" bpmnElement="BoundaryEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1427.0" y="1005.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_214" bpmnElement="EndEvent_6">\r
+        <dc:Bounds height="36.0" width="36.0" x="1488.0" y="1005.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1506.0" y="1046.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_BoundaryEvent_22" targetElement="_BPMNShape_EndEvent_214">\r
+        <di:waypoint xsi:type="dc:Point" x="1463.0" y="1023.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1488.0" y="1023.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_40" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ServiceTask_90" targetElement="_BPMNShape_EndEvent_97">\r
+        <di:waypoint xsi:type="dc:Point" x="1395.0" y="1064.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1395.0" y="1117.0"/>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupName.bpmn
new file mode 100644 (file)
index 0000000..74e962f
--- /dev/null
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="ConfirmVolumeGroupName" name="ConfirmVolumeGroupName" isExecutable="true">\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_2">\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVGN_queryVolumeGroupResponseCode") != 200 && execution.getVariable("CVGN_queryVolumeGroupResponseCode") != 404}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="AAIQueryFailure" name="AAI Query Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvgn= new ConfirmVolumeGroupName()
+cvgn.handleAAIQueryFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>\r
+    <bpmn2:endEvent id="EndEvent_7">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="QueryAAIForVolumeGroupId" name="Query AAI for&#xD;&#xA;Volume Group Id" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvgn= new ConfirmVolumeGroupName()
+cvgn.queryAAIForVolumeGroupId(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVolumeGroupId" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvgn= new ConfirmVolumeGroupName()
+cvgn.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InitializeVariables" targetRef="QueryAAIForVolumeGroupId"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ExclusiveGateway_3" targetRef="CheckAAIQueryResult"/>\r
+    <bpmn2:scriptTask id="CheckAAIQueryResult" name="Check AAI Query Result" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvgn= new ConfirmVolumeGroupName()
+cvgn.checkAAIQueryResult(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CheckAAIQueryResult" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:scriptTask id="VolumeGroupNotInName" name="Volume Group Not In Name" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvgn= new ConfirmVolumeGroupName()
+cvgn.handleVolumeGroupNameNoMatch(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_7">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVGN_volumeGroupNameMatches")==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_1" targetRef="VolumeGroupNotInName"/>\r
+    <bpmn2:endEvent id="EndEvent_4">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:inputOutput>\r
+            <camunda:outputParameter name="WorkflowResponse"><![CDATA[<aetgt:CreateVfModuleResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"                   xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+ <ns:response>SUCCESS</ns:response>
+   </aetgt:CreateVfModuleResponse>]]></camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="VolumeGroupNotInName" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_70" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables"/>\r
+  </bpmn2:process>\r
+  <bpmn2:message id="Message_1" name="ConfirmVolumeGroupNameRequest"/>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateAAIVfModule">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="43.0" y="199.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="61.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">\r
+        <dc:Bounds height="80.0" width="100.0" x="204.0" y="178.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="79.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="120.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="120.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="204.0" y="218.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="101.0" y="217.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="912.0" y="199.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="930.0" y="240.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="468.0" y="191.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="493.0" y="246.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="518.0" y="297.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="241.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="259.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="259.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="297.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="547.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="550.0" y="416.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="568.0" y="457.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="377.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="416.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="565.0" y="388.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVolumeGroupId">\r
+        <dc:Bounds height="80.0" width="100.0" x="336.0" y="178.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="304.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="218.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="324.0" y="218.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="436.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="216.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="468.0" y="216.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="449.0" y="217.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="720.0" y="415.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="738.0" y="456.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_177" bpmnElement="CheckAAIQueryResult">\r
+        <dc:Bounds height="80.0" width="100.0" x="624.0" y="177.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_177">\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="216.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="551.0" y="216.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="551.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="624.0" y="217.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="548.0" y="217.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_103" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="801.0" y="191.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="826.0" y="246.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_177" targetElement="_BPMNShape_ExclusiveGateway_103">\r
+        <di:waypoint xsi:type="dc:Point" x="724.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="762.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="762.0" y="216.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="801.0" y="216.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="735.0" y="217.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_103" targetElement="_BPMNShape_EndEvent_92">\r
+        <di:waypoint xsi:type="dc:Point" x="851.0" y="216.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="869.0" y="216.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="869.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="912.0" y="217.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="855.0" y="216.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="VolumeGroupNotInName">\r
+        <dc:Bounds height="80.0" width="100.0" x="688.0" y="297.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_103" targetElement="_BPMNShape_ScriptTask_179">\r
+        <di:waypoint xsi:type="dc:Point" x="826.0" y="241.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="826.0" y="269.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="738.0" y="269.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="738.0" y="297.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="822.0" y="269.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_EndEvent_162">\r
+        <di:waypoint xsi:type="dc:Point" x="738.0" y="377.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="738.0" y="415.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="735.0" y="391.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/ConfirmVolumeGroupTenant.bpmn
new file mode 100644 (file)
index 0000000..7da59a3
--- /dev/null
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_jPy0EB7JEeaR94RQz1cKqQ" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="ConfirmVolumeGroupTenant" name="ConfirmVolumeGroupTenant" isExecutable="true">\r
+    <bpmn2:scriptTask id="queryAAIForVolumeGroup" name="Query AAI Volume Group" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
+volume.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:exclusiveGateway id="tenantIdMatchCheck" name="Tenant Ids&#xD;&#xA;Match?" default="idsMatchNo">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>idsMatchNo</bpmn2:outgoing>\r
+      <bpmn2:outgoing>idsMatchYes</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="queryAAIForVolumeGroup" targetRef="tenantIdMatchCheck"/>\r
+    <bpmn2:sequenceFlow id="idsMatchNo" name="No" sourceRef="tenantIdMatchCheck" targetRef="assignError"/>\r
+    <bpmn2:sequenceFlow id="idsMatchYes" name="Yes" sourceRef="tenantIdMatchCheck" targetRef="tenantNamesMatchCheck">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("tenantIdsMatch")==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_2"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="assignError" name="Assign Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>idsMatchNo</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
+volume.assignWorkflowException(execution, "does not belong to your tenant")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="assignError" targetRef="EndEvent_3"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_75" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="assignVolumeHeatId" name="Assign Volume Heat Id" scriptFormat="groovy">\r
+      <bpmn2:incoming>groupNamesMatchYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
+volume.assignVolumeHeatId(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="assignVolumeHeatId" targetRef="EndEvent_1"/>\r
+    <bpmn2:scriptTask id="assignErrorNames" name="Assign Workflow Exception" scriptFormat="groovy">\r
+      <bpmn2:incoming>groupNamesMatchNo</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+ConfirmVolumeGroupTenant volume = new ConfirmVolumeGroupTenant()
+volume.assignWorkflowException(execution, "name does not match")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="assignErrorNames" targetRef="EndEvent_2"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_74" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="tenantNamesMatchCheck" name="Volume Group&#xD;&#xA;Names Match?" default="groupNamesMatchNo">\r
+      <bpmn2:incoming>idsMatchYes</bpmn2:incoming>\r
+      <bpmn2:outgoing>groupNamesMatchNo</bpmn2:outgoing>\r
+      <bpmn2:outgoing>groupNamesMatchYes</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="groupNamesMatchNo" name="No" sourceRef="tenantNamesMatchCheck" targetRef="assignErrorNames"/>\r
+    <bpmn2:sequenceFlow id="groupNamesMatchYes" name="Yes" sourceRef="tenantNamesMatchCheck" targetRef="assignVolumeHeatId">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("groupNamesMatch")==true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="queryAAIForVolumeGroup"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ConfirmVolumeGroupTenant">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_61" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="129.0" y="324.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="147.0" y="365.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="queryAAIForVolumeGroup">\r
+        <dc:Bounds height="80.0" width="100.0" x="252.0" y="302.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_61" targetElement="_BPMNShape_ScriptTask_237">\r
+        <di:waypoint xsi:type="dc:Point" x="165.0" y="342.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="252.0" y="342.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="179.0" y="342.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_209" bpmnElement="tenantIdMatchCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="384.0" y="316.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="76.0" x="414.0" y="347.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_237" targetElement="_BPMNShape_ExclusiveGateway_209">\r
+        <di:waypoint xsi:type="dc:Point" x="352.0" y="342.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="368.0" y="342.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="368.0" y="341.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="384.0" y="341.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_210" bpmnElement="tenantNamesMatchCheck" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="460.0" y="216.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="99.0" x="494.0" y="246.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_238" bpmnElement="assignError">\r
+        <dc:Bounds height="80.0" width="100.0" x="456.0" y="400.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="idsMatchNo" sourceElement="_BPMNShape_ExclusiveGateway_209" targetElement="_BPMNShape_ScriptTask_238">\r
+        <di:waypoint xsi:type="dc:Point" x="409.0" y="366.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="409.0" y="440.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="456.0" y="440.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="414.0" y="400.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="idsMatchYes" sourceElement="_BPMNShape_ExclusiveGateway_209" targetElement="_BPMNShape_ExclusiveGateway_210">\r
+        <di:waypoint xsi:type="dc:Point" x="409.0" y="316.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="409.0" y="241.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="460.0" y="241.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="411.0" y="266.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_239" bpmnElement="assignErrorNames">\r
+        <dc:Bounds height="80.0" width="100.0" x="555.0" y="296.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="groupNamesMatchNo" sourceElement="_BPMNShape_ExclusiveGateway_210" targetElement="_BPMNShape_ScriptTask_239">\r
+        <di:waypoint xsi:type="dc:Point" x="485.0" y="266.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="485.0" y="336.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="555.0" y="336.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="491.0" y="296.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_240" bpmnElement="assignVolumeHeatId">\r
+        <dc:Bounds height="80.0" width="100.0" x="555.0" y="120.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="groupNamesMatchYes" sourceElement="_BPMNShape_ExclusiveGateway_210" targetElement="_BPMNShape_ScriptTask_240">\r
+        <di:waypoint xsi:type="dc:Point" x="485.0" y="216.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="485.0" y="160.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="555.0" y="160.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="487.0" y="173.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_200" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="738.0" y="142.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="756.0" y="183.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_240" targetElement="_BPMNShape_EndEvent_200">\r
+        <di:waypoint xsi:type="dc:Point" x="655.0" y="160.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="738.0" y="160.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="692.0" y="160.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_210" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="709.0" y="318.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="727.0" y="359.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_211" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="605.0" y="422.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="623.0" y="463.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_238" targetElement="_BPMNShape_EndEvent_211">\r
+        <di:waypoint xsi:type="dc:Point" x="556.0" y="440.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="605.0" y="440.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="591.0" y="440.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_239" targetElement="_BPMNShape_EndEvent_210">\r
+        <di:waypoint xsi:type="dc:Point" x="655.0" y="336.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="709.0" y="336.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="680.0" y="336.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModule.bpmn
new file mode 100644 (file)
index 0000000..8970324
--- /dev/null
@@ -0,0 +1,519 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="CreateAAIVfModule" name="CreateAAIVfModule" isExecutable="true">\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_5" default="SequenceFlow_7">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_5" targetRef="ExclusiveGateway_6">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("CAAIVfMod_newGenericVnf") == true && execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404) || execution.getVariable("CAAIVfMod_isBaseVfModule") == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_5" targetRef="ScriptTask_2"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_22">\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="ProcessAAISearch"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") != 200 && execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") != 404}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="AAIQueryFailure" name="AAI Query Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.handleAAIQueryFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>\r
+    <bpmn2:endEvent id="EndEvent_7">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ProcessAAISearch" name="Process AAI Generic Vnf Query" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.processAAIGenericVnfQuery(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ProcessAAISearch" targetRef="ExclusiveGateway_5"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_5">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_7">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_28" name="Generic Vnf does not exist&#xD;&#xA; and Vnf Id != null or&#xD;&#xA;Generic Vnf does exist&#xD;&#xA;and Vnf Id == null" sourceRef="ExclusiveGateway_5" targetRef="CreateGenericVnfFailure">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("CAAIVfMod_newGenericVnf") == false && execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 404) || (execution.getVariable("CAAIVfMod_newGenericVnf") == true && execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") == 200)}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="CreateGenericVnfFailure" name="Create Generic Vnf Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.handleCreateVfModuleFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:endEvent id="EndEvent_8">\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_69" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="CreateGenericVnfFailure" targetRef="EndEvent_8"/>\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Parse For Add-on Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.parseForAddOnModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="ScriptTask_2" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:scriptTask id="ScriptTask_8" name="Create Add-on Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.createVfModule(execution, false)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ScriptTask_8" targetRef="ExclusiveGateway_7"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_4" default="SequenceFlow_33">\r
+      <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_33" name="Vnf Module Exists&#xD;&#xA;" sourceRef="ExclusiveGateway_4" targetRef="CreateGenericVnfFailure"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="ExclusiveGateway_4" targetRef="ScriptTask_8">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CAAIVfMod_moduleExists") != true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="QueryAAIForGenericVnf" name="Query AAI for&#xD;&#xA;Generic Vnf" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVnf" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InitializeVariables" targetRef="QueryAAIForGenericVnf"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="CreateVfModuleFailure" name="Create Vf Module Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.handleCreateVfModuleFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="CreateVfModuleFailure" targetRef="EndEvent_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_1" targetRef="CreateVfModuleFailure"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ExclusiveGateway_7" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CAAIVfMod_createVfModuleResponseCode") == 200 || execution.getVariable("CAAIVfMod_createVfModuleResponseCode") == 201}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" default="SequenceFlow_26">\r
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_26" name="Create Generic Vnf&#xD;&#xA;Failure" sourceRef="ExclusiveGateway_2" targetRef="CreateGenericVnfFailure"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CAAIVfMod_createGenericVnfResponseCode") == 200 || execution.getVariable("CAAIVfMod_createGenericVnfResponseCode") == 201}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_6" name="Is VID Request?" default="SequenceFlow_9">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="No" sourceRef="ExclusiveGateway_6" targetRef="ScriptTask_3"/>\r
+    <bpmn2:scriptTask id="ScriptTask_3" name="Create Generic Vnf" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.createGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="ScriptTask_3" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="Yes" sourceRef="ExclusiveGateway_6" targetRef="ScriptTask_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("isVidRequest") =="true"}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="ScriptTask_4" name="Create Base Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.createVfModule(execution, true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_4" targetRef="ExclusiveGateway_7"/>\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+      <bpmn2:messageEventDefinition id="_MessageEventDefinition_6" messageRef="Message_1"/>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables"/>\r
+    <bpmn2:scriptTask id="ScriptTask_1" name="Parse for Base Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def cvm = new CreateAAIVfModule()\r
+cvm.parseForBaseModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_8"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_8" default="SequenceFlow_13">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ExclusiveGateway_8" targetRef="ScriptTask_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("CAAIVfMod_baseModuleConflict") != true) && (execution.getVariable("CAAIVfMod_moduleExists") != true)}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="Base Module Conflict" sourceRef="ExclusiveGateway_8" targetRef="ExclusiveGateway_2"/>\r
+  </bpmn2:process>\r
+  <bpmn2:message id="Message_1" name="CreateAAIVfModuleRequest"/>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateAAIVfModule">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="65.0" y="240.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="83.0" y="281.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">\r
+        <dc:Bounds height="80.0" width="100.0" x="204.0" y="216.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="101.0" y="258.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="160.0" y="258.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="160.0" y="256.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="204.0" y="256.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="123.0" y="258.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="ProcessAAISearch">\r
+        <dc:Bounds height="80.0" width="100.0" x="518.0" y="117.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_50" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="630.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="655.0" y="285.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_52" bpmnElement="ExclusiveGateway_7" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1120.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1145.0" y="285.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_47" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="718.0" y="93.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ExclusiveGateway_225">\r
+        <di:waypoint xsi:type="dc:Point" x="655.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="655.0" y="88.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="601.0" y="133.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_48" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="695.0" y="391.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ScriptTask_48">\r
+        <di:waypoint xsi:type="dc:Point" x="655.0" y="280.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="655.0" y="431.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="695.0" y="431.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="574.0" y="256.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1216.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1241.0" y="285.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1224.0" y="454.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1242.0" y="495.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_115" bpmnElement="ScriptTask_4">\r
+        <dc:Bounds height="80.0" width="100.0" x="996.0" y="24.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_115" targetElement="_BPMNShape_ExclusiveGateway_52">\r
+        <di:waypoint xsi:type="dc:Point" x="1096.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1145.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1145.0" y="177.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1145.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1282.0" y="51.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="468.0" y="229.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="493.0" y="284.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="158.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="158.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="490.0" y="192.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="518.0" y="335.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="279.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="297.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="297.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="335.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="547.0" y="297.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_50">\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="197.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="255.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="630.0" y="255.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="565.0" y="250.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="550.0" y="454.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="568.0" y="495.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="415.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="454.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="565.0" y="426.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="CreateGenericVnfFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="837.0" y="213.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_99" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="861.0" y="107.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="886.0" y="162.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_47" targetElement="_BPMNShape_ExclusiveGateway_99">\r
+        <di:waypoint xsi:type="dc:Point" x="818.0" y="133.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="839.0" y="133.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="839.0" y="132.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="861.0" y="132.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="839.0" y="132.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ScriptTask_158">\r
+        <di:waypoint xsi:type="dc:Point" x="886.0" y="157.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="887.0" y="213.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="126.0" x="899.0" y="162.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ScriptTask_115">\r
+        <di:waypoint xsi:type="dc:Point" x="911.0" y="132.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="953.0" y="132.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1045.0" y="132.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1045.0" y="104.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="959.0" y="132.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ScriptTask_158">\r
+        <di:waypoint xsi:type="dc:Point" x="680.0" y="255.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="758.0" y="255.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="758.0" y="253.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="837.0" y="253.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="170.0" x="669.0" y="260.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_8">\r
+        <dc:Bounds height="36.0" width="36.0" x="987.0" y="235.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_EndEvent_161">\r
+        <di:waypoint xsi:type="dc:Point" x="937.0" y="253.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="987.0" y="253.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_100" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="863.0" y="403.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="888.0" y="458.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ScriptTask_48" targetElement="_BPMNShape_ExclusiveGateway_100">\r
+        <di:waypoint xsi:type="dc:Point" x="795.0" y="431.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="822.0" y="431.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="822.0" y="428.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="863.0" y="428.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="817.0" y="431.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ExclusiveGateway_100" targetElement="_BPMNShape_ScriptTask_158">\r
+        <di:waypoint xsi:type="dc:Point" x="888.0" y="403.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="888.0" y="348.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="887.0" y="348.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="887.0" y="293.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="122.0" x="889.0" y="344.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_159" bpmnElement="ScriptTask_8">\r
+        <dc:Bounds height="80.0" width="100.0" x="996.0" y="389.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ExclusiveGateway_100" targetElement="_BPMNShape_ScriptTask_159">\r
+        <di:waypoint xsi:type="dc:Point" x="913.0" y="428.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="954.0" y="428.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="954.0" y="429.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="996.0" y="429.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="955.0" y="429.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_159" targetElement="_BPMNShape_ExclusiveGateway_52">\r
+        <di:waypoint xsi:type="dc:Point" x="1096.0" y="429.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1108.0" y="429.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1145.0" y="429.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1145.0" y="280.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1142.0" y="379.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForGenericVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="336.0" y="216.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="304.0" y="256.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="256.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="324.0" y="256.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="436.0" y="256.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="256.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="254.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="468.0" y="254.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="449.0" y="255.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="CreateVfModuleFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="1192.0" y="324.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">\r
+        <di:waypoint xsi:type="dc:Point" x="1242.0" y="404.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1242.0" y="454.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">\r
+        <di:waypoint xsi:type="dc:Point" x="1241.0" y="280.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1241.0" y="302.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1242.0" y="302.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1242.0" y="324.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ExclusiveGateway_52" targetElement="_BPMNShape_ExclusiveGateway_54">\r
+        <di:waypoint xsi:type="dc:Point" x="1170.0" y="255.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1216.0" y="255.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_164" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1316.0" y="237.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_164">\r
+        <di:waypoint xsi:type="dc:Point" x="1266.0" y="255.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1316.0" y="255.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="630.0" y="38.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="100.0" x="617.0" y="18.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_47">\r
+        <di:waypoint xsi:type="dc:Point" x="680.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="699.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="699.0" y="133.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="718.0" y="133.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="669.0" y="93.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_162">\r
+        <di:waypoint xsi:type="dc:Point" x="680.0" y="63.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="702.0" y="63.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="702.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="724.0" y="40.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="688.0" y="54.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_8" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="863.0" y="14.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="888.0" y="69.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_162" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="724.0" y="0.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_162" targetElement="_BPMNShape_ExclusiveGateway_226">\r
+        <di:waypoint xsi:type="dc:Point" x="824.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="843.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="843.0" y="39.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="863.0" y="39.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="840.0" y="39.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ScriptTask_115">\r
+        <di:waypoint xsi:type="dc:Point" x="913.0" y="39.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="954.0" y="39.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="954.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="996.0" y="64.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="951.0" y="52.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ExclusiveGateway_99">\r
+        <di:waypoint xsi:type="dc:Point" x="888.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="888.0" y="85.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="886.0" y="85.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="886.0" y="107.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="884.0" y="85.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/CreateAAIVfModuleVolumeGroup.bpmn
new file mode 100644 (file)
index 0000000..bbdd21a
--- /dev/null
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="CreateAAIVfModuleVolumeGroup" name="CreateAAIVfModuleVolumeGroup" isExecutable="true">\r
+    <bpmn2:documentation>This flow expects its incoming request to be in the variable 'CreateAAIVfModuleVolumeGroupRequest'.  This flow produces no output.</bpmn2:documentation>\r
+    <bpmn2:scriptTask id="QueryAAIForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvfvg = new CreateAAIVfModuleVolumeGroup()
+cvfvg.getVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVfModule" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:endEvent id="EndEvent_7">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvfvg = new CreateAAIVfModuleVolumeGroup()
+cvfvg.handleAAIQueryFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_4" name="TheEnd">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:inputOutput>\r
+            <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"                   xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+ <ns:GlobalCustomerId>${CCV1_subscriberglobalid}</ns:GlobalCustomerId>
+   </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateVfModule">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('CAAIVfModVG_getVfModuleResponseCode') == 200}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;VF Module not  found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>\r
+    <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvfvg = new CreateAAIVfModuleVolumeGroup()
+cvfvg.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest"/>\r
+    <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvfvg = new CreateAAIVfModuleVolumeGroup()
+cvfvg.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForVfModule"/>\r
+    <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module with Volume Group" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def cvfvg = new CreateAAIVfModuleVolumeGroup()
+cvfvg.updateVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('CAAIVfModVG_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateAAIVfModuleVolumeGroup">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="60.0" y="212.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="61.0" y="253.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="168.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="672.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1016.0" y="212.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="50.0" x="1009.0" y="253.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="841.0" y="204.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="866.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">\r
+        <di:waypoint xsi:type="dc:Point" x="891.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="993.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="993.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1016.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="929.0" y="229.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="493.0" y="204.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="518.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">\r
+        <di:waypoint xsi:type="dc:Point" x="543.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="607.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="607.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="672.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="558.0" y="229.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="468.0" y="60.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="204.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="130.0" x="528.0" y="152.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="500.0" y="0.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="518.0" y="41.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="60.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="36.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="515.0" y="49.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="268.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="288.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="229.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="449.0" y="229.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">\r
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">\r
+        <di:waypoint xsi:type="dc:Point" x="772.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="797.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="797.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="841.0" y="229.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="801.0" y="229.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">\r
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="204.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="172.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="867.0" y="172.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="867.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="157.0" x="883.0" y="158.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="96.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="148.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DeleteAAIVfModule.bpmn
new file mode 100644 (file)
index 0000000..d043619
--- /dev/null
@@ -0,0 +1,482 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DeleteAAIVfModule" name="DeleteAAIVfModule" isExecutable="true">\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_5" default="SequenceFlow_8">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_5" targetRef="DeleteVfModule">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DAAIVfMod_moduleExists") == true &&  (execution.getVariable("DAAIVfMod_isBaseModule") == false || (execution.getVariable("DAAIVfMod_isBaseModule") == true && execution.getVariable("DAAIVfMod_isLastModule") == true ))}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_22">\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="ParseForAddonModule"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") != 200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="AAIQueryFailure" name="AAI Query Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.handleAAIQueryFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>\r
+    <bpmn2:endEvent id="EndEvent_7">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ParseForAddonModule" name="Parse For Vf Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.parseForVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ParseForAddonModule" targetRef="ExclusiveGateway_5"/>\r
+    <bpmn2:scriptTask id="DeleteVfModule" name="Delete Vf Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.deleteVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="DeleteVfModule" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" default="SequenceFlow_26">\r
+      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_26" name="Delete Vf Module&#xD;&#xA;Failure" sourceRef="ExclusiveGateway_2" targetRef="DeleteVfModuleFailure"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_6">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 200 || execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 204) && execution.getVariable("DAAIVfMod_isLastModule") == true}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="DeleteVfModuleFailure" name="Delete Vf Module Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.handleDeleteVfModuleFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="DeleteVfModuleFailure" targetRef="EndEvent_8"/>\r
+    <bpmn2:scriptTask id="QueryAAIForGenericVnf" name="Query AAI for&#xD;&#xA;Generic Vnf" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVnf" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="Vf Module&#xD;&#xA;Does Not Exist or&#xD;&#xA;Base Module is Not&#xD;&#xA;the Last Vf Module" sourceRef="ExclusiveGateway_5" targetRef="DeleteVfModuleFailure"/>\r
+    <bpmn2:endEvent id="EndEvent_8">\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_69" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 200 || execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 204) && execution.getVariable("DAAIVfMod_isLastModule") == false} ]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="QueryAAIForGenericVnf1" name="Query AAI for Generif VNF 1" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.queryAAIForGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="QueryAAIForGenericVnf1" targetRef="ExclusiveGateway_4"/>\r
+    <bpmn2:scriptTask id="DeleteGenericVnfFailure" name="Delete Generic Vnf Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.handleDeleteGenericVnfFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="DeleteGenericVnfFailure" targetRef="EndEvent_2"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_5">\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_1" targetRef="DeleteGenericVnfFailure"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{((execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 200 || execution.getVariable("DAAIVfMod_deleteVfModuleResponseCode") == 204) && execution.getVariable("DAAIVfMod_isLastModule") == false) || (execution.getVariable("DAAIVfMod_deleteGenericVnfResponseCode") == 200 || execution.getVariable("DAAIVfMod_deleteGenericVnfResponseCode") == 204)}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="AAIQueryFailure1" name="AAI Query Failure 1" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.handleAAIQueryFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="AAIQueryFailure1" targetRef="EndEvent_3"/>\r
+    <bpmn2:endEvent id="EndEvent_3">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_70" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="DeleteGenericVnf" name="Delete Generic Vnf" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.deleteGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="DeleteGenericVnf" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:scriptTask id="ParseForGenericVNFResourceVersion" name="Parse for Generic VNF Resource Version" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.parseForResourceVersion(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ParseForGenericVNFResourceVersion" targetRef="DeleteGenericVnf"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_4" default="SequenceFlow_13">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ExclusiveGateway_4" targetRef="AAIQueryFailure1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") != 200}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ExclusiveGateway_4" targetRef="ParseForGenericVNFResourceVersion"/>\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+      <bpmn2:messageEventDefinition id="_MessageEventDefinition_6" messageRef="Message_1"/>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables"/>\r
+    <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DeleteAAIVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="InitializeVariables" targetRef="QueryAAIForGenericVnf"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_6" name="Is VID Request?" default="SequenceFlow_3">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="no" sourceRef="ExclusiveGateway_6" targetRef="QueryAAIForGenericVnf1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="yes" sourceRef="ExclusiveGateway_6" targetRef="EndEvent_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("isVidRequest") =="true"}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmn2:message id="Message_1" name="DeleteAAIVfModuleRequest"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteAAIVfModule">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="59.0" y="200.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="77.0" y="241.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">\r
+        <dc:Bounds height="80.0" width="100.0" x="192.0" y="178.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="95.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="192.0" y="218.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="117.0" y="218.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="ParseForAddonModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="518.0" y="79.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_50" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="630.0" y="192.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="655.0" y="247.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_47" bpmnElement="DeleteVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="695.0" y="0.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ScriptTask_47">\r
+        <di:waypoint xsi:type="dc:Point" x="655.0" y="192.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="655.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="695.0" y="40.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="579.0" y="73.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1681.0" y="297.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1706.0" y="352.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="1689.0" y="564.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1707.0" y="605.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_115" bpmnElement="DeleteGenericVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="1582.0" y="0.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="468.0" y="191.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="493.0" y="246.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="191.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="120.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="120.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="490.0" y="154.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="518.0" y="297.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="241.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="259.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="259.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="297.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="547.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_50">\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="159.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="630.0" y="217.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="565.0" y="212.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="550.0" y="416.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="568.0" y="457.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="377.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="568.0" y="416.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="565.0" y="388.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_158" bpmnElement="DeleteVfModuleFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="837.0" y="175.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_99" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="861.0" y="14.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="886.0" y="69.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_47" targetElement="_BPMNShape_ExclusiveGateway_99">\r
+        <di:waypoint xsi:type="dc:Point" x="795.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="861.0" y="39.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="817.0" y="40.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ScriptTask_158">\r
+        <di:waypoint xsi:type="dc:Point" x="886.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="886.0" y="98.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="887.0" y="98.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="887.0" y="175.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="126.0" x="887.0" y="100.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ExclusiveGateway_226">\r
+        <di:waypoint xsi:type="dc:Point" x="911.0" y="39.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1068.0" y="39.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="959.0" y="39.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_8">\r
+        <dc:Bounds height="36.0" width="36.0" x="869.0" y="299.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="887.0" y="340.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_158" targetElement="_BPMNShape_EndEvent_161">\r
+        <di:waypoint xsi:type="dc:Point" x="887.0" y="255.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="887.0" y="299.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="884.0" y="280.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForGenericVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="336.0" y="178.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="292.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="218.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="299.0" y="218.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="436.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="218.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="216.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="468.0" y="216.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="449.0" y="217.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="DeleteGenericVnfFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="1656.0" y="432.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">\r
+        <di:waypoint xsi:type="dc:Point" x="1706.0" y="512.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1707.0" y="564.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1703.0" y="515.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">\r
+        <di:waypoint xsi:type="dc:Point" x="1706.0" y="347.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1706.0" y="432.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1703.0" y="390.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ExclusiveGateway_50" targetElement="_BPMNShape_ScriptTask_158">\r
+        <di:waypoint xsi:type="dc:Point" x="680.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="758.0" y="217.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="758.0" y="215.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="837.0" y="215.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="94.0" x="708.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ExclusiveGateway_99" targetElement="_BPMNShape_ExclusiveGateway_54">\r
+        <di:waypoint xsi:type="dc:Point" x="911.0" y="39.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1008.0" y="39.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1008.0" y="140.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1008.0" y="322.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1681.0" y="322.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1005.0" y="197.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_115" targetElement="_BPMNShape_ExclusiveGateway_54">\r
+        <di:waypoint xsi:type="dc:Point" x="1632.0" y="80.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1632.0" y="322.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1681.0" y="322.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1629.0" y="187.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1806.0" y="305.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1824.0" y="346.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_162">\r
+        <di:waypoint xsi:type="dc:Point" x="1731.0" y="322.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1806.0" y="323.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1753.0" y="322.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_242" bpmnElement="QueryAAIForGenericVnf1">\r
+        <dc:Bounds height="80.0" width="100.0" x="1166.0" y="0.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_213" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1325.0" y="15.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1350.0" y="70.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_242" targetElement="_BPMNShape_ExclusiveGateway_213">\r
+        <di:waypoint xsi:type="dc:Point" x="1266.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1325.0" y="40.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1292.0" y="40.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_243" bpmnElement="AAIQueryFailure1">\r
+        <dc:Bounds height="80.0" width="100.0" x="1300.0" y="117.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_244" bpmnElement="ParseForGenericVNFResourceVersion">\r
+        <dc:Bounds height="80.0" width="100.0" x="1440.0" y="0.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_181" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="1332.0" y="244.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1350.0" y="285.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_ScriptTask_243">\r
+        <di:waypoint xsi:type="dc:Point" x="1350.0" y="65.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1349.0" y="90.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1350.0" y="90.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1350.0" y="117.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1347.0" y="95.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_243" targetElement="_BPMNShape_EndEvent_181">\r
+        <di:waypoint xsi:type="dc:Point" x="1350.0" y="197.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1350.0" y="244.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1347.0" y="226.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_ScriptTask_244">\r
+        <di:waypoint xsi:type="dc:Point" x="1375.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1440.0" y="40.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1394.0" y="40.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_244" targetElement="_BPMNShape_ScriptTask_115">\r
+        <di:waypoint xsi:type="dc:Point" x="1540.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1582.0" y="40.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1565.0" y="40.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_6" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1068.0" y="14.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="100.0" x="1044.0" y="-6.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ScriptTask_242">\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="39.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1142.0" y="39.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1142.0" y="40.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1166.0" y="40.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_EndEvent_162">\r
+        <di:waypoint xsi:type="dc:Point" x="1093.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1093.0" y="289.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1823.0" y="289.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1823.0" y="305.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="1104.0" y="146.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoDeleteVfModule.bpmn
new file mode 100644 (file)
index 0000000..06aeafb
--- /dev/null
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DoDeleteVfModule" name="DoDeleteVfModule" isExecutable="true">\r
+    <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule&#xD;&#xA;Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="UpdateAAIVfModulePrep" targetRef="InvokeUpdateAAIVfModule"/>\r
+    <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke&#xD;&#xA;UpdateAAIVfModule" calledElement="UpdateAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_31" name="" sourceRef="InvokeUpdateAAIVfModule" targetRef="SDNCAdapterPrep2"/>\r
+    <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke&#xD;&#xA;PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="PrepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="PUAAIVfMod_heatStackId" target="DoDVfMod_heatStackId"/>\r
+        <camunda:out source="PUAAIVfMod_outVfModule" target="DoDVfMod_vfModuleFromAAI"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_42</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="VNFAdapterPrep"/>\r
+    <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke&#xD;&#xA;SDNCAdapterV1" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="sdncAdapterResponse" target="DoDVfMod_doDeleteVfModuleResponse"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="InvokeSDNCAdapterV1_2" targetRef="validateSDNCResponse"/>\r
+    <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter&#xD;&#xA;Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepVNFAdapterRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapterRestV1"/>\r
+    <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter&#xD;&#xA;Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepSDNCAdapterRequest(execution, "delete")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="InvokeSDNCAdapterV1_2"/>\r
+    <bpmn2:callActivity id="InvokeVNFAdapterRestV1" name="Invoke&#xD;&#xA;VNFAdapterRestV1" calledElement="vnfAdapterRestV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="vnfAdapterRestV1Request" target="vnfAdapterRestV1Request"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="vnfAdapterRestV1Response" target="DoDVfMod_doDeleteVfModuleResponse"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="InvokeVNFAdapterRestV1" targetRef="UpdateAAIVfModulePrep"/>\r
+    <bpmn2:endEvent id="EndEvent_9">\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke&#xD;&#xA;DeleteAAIVfModule" calledElement="DeleteAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest"/>\r
+        <camunda:in source="isVidRequest" target="isVidRequest"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="InvokeDeleteAAIVfModule" targetRef="EndEvent_9"/>\r
+    <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule&#xD;&#xA;Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.prepDeleteAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="DeleteAAIVfModulePrep" targetRef="InvokeDeleteAAIVfModule"/>\r
+    <bpmn2:scriptTask id="validateSDNCResponse" name="Validate SDNC Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.sdncValidateResponse(execution, DoDVfMod_doDeleteVfModuleResponse)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="validateSDNCResponse" targetRef="DeleteAAIVfModulePrep"/>\r
+    <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="InitializeVariables" targetRef="PrepareUpdateAAIVfModulePrep"/>\r
+    <bpmn2:scriptTask id="PrepareUpdateAAIVfModulePrep" name="PrepareUpdateAAIVfModule Prep" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_42</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def dvm = new DoDeleteVfModule()
+dvm.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_42" name="" sourceRef="PrepareUpdateAAIVfModulePrep" targetRef="InvokePrepareUpdateAAIVfModule"/>\r
+    <bpmn2:startEvent id="StartEvent_1">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+      <bpmn2:messageEventDefinition id="_MessageEventDefinition_6" messageRef="Message_1"/>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmn2:message id="Message_1" name="DoDeleteVfModuleRequest"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVfModule">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="34.0" y="57.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="52.0" y="98.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">\r
+        <dc:Bounds height="80.0" width="100.0" x="144.0" y="36.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="70.0" y="75.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="144.0" y="76.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="104.0" y="0.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="480.0" y="36.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="PrepareUpdateAAIVfModulePrep">\r
+        <dc:Bounds height="80.0" width="100.0" x="315.0" y="36.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_168">\r
+        <di:waypoint xsi:type="dc:Point" x="244.0" y="76.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="315.0" y="76.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="269.0" y="0.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">\r
+        <dc:Bounds height="80.0" width="100.0" x="83.0" y="187.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapterRestV1">\r
+        <dc:Bounds height="80.0" width="100.0" x="216.0" y="188.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_170" targetElement="_BPMNShape_CallActivity_13">\r
+        <di:waypoint xsi:type="dc:Point" x="183.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="216.0" y="228.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="24.0" y="81.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">\r
+        <dc:Bounds height="80.0" width="100.0" x="347.0" y="187.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_CallActivity_13" targetElement="_BPMNShape_ScriptTask_171">\r
+        <di:waypoint xsi:type="dc:Point" x="316.0" y="228.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="331.0" y="228.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="331.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="347.0" y="227.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="44.0" y="79.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="479.0" y="187.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_CallActivity_14">\r
+        <di:waypoint xsi:type="dc:Point" x="447.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="479.0" y="227.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="76.0" y="79.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">\r
+        <dc:Bounds height="80.0" width="100.0" x="84.0" y="343.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="216.0" y="343.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">\r
+        <dc:Bounds height="80.0" width="100.0" x="480.0" y="343.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="605.0" y="343.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_31" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_CallActivity_14" targetElement="_BPMNShape_ScriptTask_172">\r
+        <di:waypoint xsi:type="dc:Point" x="579.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="623.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="623.0" y="308.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="53.0" y="308.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="53.0" y="383.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="84.0" y="383.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="596.0" y="139.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_CallActivity_15">\r
+        <di:waypoint xsi:type="dc:Point" x="184.0" y="383.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="200.0" y="383.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="200.0" y="384.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="216.0" y="384.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="209.0" y="236.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_CallActivity_15" targetElement="_BPMNShape_ScriptTask_251">\r
+        <di:waypoint xsi:type="dc:Point" x="316.0" y="383.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="348.0" y="383.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="329.0" y="383.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_CallActivity_16">\r
+        <di:waypoint xsi:type="dc:Point" x="580.0" y="383.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="605.0" y="383.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="593.0" y="383.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">\r
+        <dc:Bounds height="36.0" width="36.0" x="738.0" y="365.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="756.0" y="406.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_16" targetElement="_BPMNShape_EndEvent_169">\r
+        <di:waypoint xsi:type="dc:Point" x="705.0" y="383.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="738.0" y="383.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="730.0" y="383.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_42" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="415.0" y="76.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="480.0" y="76.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="440.0" y="0.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ScriptTask_170">\r
+        <di:waypoint xsi:type="dc:Point" x="580.0" y="76.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="620.0" y="76.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="620.0" y="156.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="48.0" y="156.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="48.0" y="199.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="48.0" y="227.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="83.0" y="227.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="596.0" y="0.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_251" bpmnElement="validateSDNCResponse">\r
+        <dc:Bounds height="80.0" width="100.0" x="348.0" y="343.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_251" targetElement="_BPMNShape_ScriptTask_173">\r
+        <di:waypoint xsi:type="dc:Point" x="448.0" y="383.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="480.0" y="383.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="453.0" y="383.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/DoUpdateVfModule.bpmn
new file mode 100644 (file)
index 0000000..2e96035
--- /dev/null
@@ -0,0 +1,650 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="DoUpdateVfModule" name="DoUpdateVfModule" isExecutable="true">\r
+    <bpmn2:documentation>This flow expects its incoming request to be in the variable 'DoUpdateVfModuleRequest'.  This flow produces no output.</bpmn2:documentation>\r
+    <bpmn2:scriptTask id="PrepareUpdateAAIVfModule_prep" name="Prepare Update AAI Vf Module (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepPrepareUpdateAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="PrepareUpdateAAIVfModule_prep" targetRef="ScriptTask_1"/>\r
+    <bpmn2:callActivity id="ScriptTask_1" name="Prepare Update AAI Vf Module" calledElement="PrepareUpdateAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DOUPVfMod_prepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="PUAAIVfMod_outVfModule" target="DOUPVfMod_vfModule"/>\r
+        <camunda:out source="PUAAIVfMod_vnfName" target="DOUPVfMod_vnfNameFromAAI"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="PrepareUpdateAAIVfModule_prep"/>\r
+    <bpmn2:subProcess id="SubProcess_1" name="Catch Exception" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="ScriptTask_16" name="Handle Exception" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.handleWorkflowException(execution)]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:endEvent id="EndEvent_3">\r
+        <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+        <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_11"/>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ScriptTask_16" targetRef="EndEvent_3"/>\r
+      <bpmn2:startEvent id="StartEvent_3">\r
+        <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="StartEvent_3" targetRef="ScriptTask_16"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:endEvent id="EndEvent_5">\r
+      <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_12"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">\r
+      <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_70"/>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_5"/>\r
+    <bpmn2:scriptTask id="ScriptTask_10" name="Update AAI Vf Module (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepUpdateAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="ScriptTask_10" targetRef="ScriptTask_11"/>\r
+    <bpmn2:callActivity id="ScriptTask_11" name="UpdateAAIVfModule" calledElement="UpdateAAIVfModule">\r
+      <bpmn2:extensionElements>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:in source="DOUPVfMod_updateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="ScriptTask_11" targetRef="ScriptTask_12"/>\r
+    <bpmn2:scriptTask id="ScriptTask_12" name="SDNC Topology Activate (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyAct(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="ScriptTask_12" targetRef="ScriptTask_13"/>\r
+    <bpmn2:callActivity id="ScriptTask_13" name="SDNCAdapter Topology Activate" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DOUPVfMod_sdncTopologyRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ScriptTask_13" targetRef="ScriptTask_17"/>\r
+    <bpmn2:scriptTask id="ScriptTask_17" name="Set Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[// This variable is checked by the unit test
+execution.setVariable('DoUpdateVfModuleSuccessIndicator', true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_17" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1" name="TheEnd">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_10"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_14" name="Update AAI Generic Vnf (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="ScriptTask_14" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:callActivity id="CallActivity_1" name="UpdateAAIGenericVnf" calledElement="UpdateAAIGenericVnf">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DOUPVfMod_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="CallActivity_1" targetRef="ScriptTask_10"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Skip Update&#xD;&#xA;Generic Vnf?" default="SequenceFlow_14">\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="Do the update" sourceRef="ExclusiveGateway_1" targetRef="CallActivity_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="Skip the update" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_10">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy">${execution.getVariable('DOUPVfMod_skipUpdateGenericVnf')} == true</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest"/>\r
+    <bpmn2:scriptTask id="ScriptTask_4" name="SDNC Topology Change/Assign (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyChg(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="ScriptTask_4" targetRef="ScriptTask_5"/>\r
+    <bpmn2:callActivity id="ScriptTask_5" name="SDNC Adapter Topology Change/Assign" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DOUPVfMod_sdncTopologyRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="sdncAdapterResponse" target="DOUPVfMod_sdncChangeAssignResponse"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:callActivity id="ScriptTask_9" name="VnfAdapterRest" calledElement="vnfAdapterRestV1">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DOUPVfMod_vnfAdapterRestRequest" target="vnfAdapterRestV1Request"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="vnfAdapterRestV1Response" target="DOUPVfMod_vnfAdapterRestResponse"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="ScriptTask_9" targetRef="ScriptTask_14"/>\r
+    <bpmn2:scriptTask id="ScriptTask_8" name="VNF Adapter (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepVnfAdapterRest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_21" name="" sourceRef="ScriptTask_8" targetRef="ScriptTask_9"/>\r
+    <bpmn2:scriptTask id="ScriptTask_15" name="Validate SDNC Query Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncTopologyResponse")
+def duvm = new DoUpdateVfModule()
+duvm.validateSDNCResponse(execution, response, "query")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:callActivity id="ScriptTask_7" name="SDNCAdapter Topology Query" calledElement="sdncAdapter">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DOUPVfMod_sdncTopologyRequest" target="sdncAdapterWorkflowRequest"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+        <camunda:out source="sdncAdapterResponse" target="DOUPVfMod_sdncTopologyResponse"/>\r
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:scriptTask id="ScriptTask_18" name="Validate SDNC Change/Assign Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+String response = execution.getVariable("DOUPVfMod_sdncChangeAssignResponse")
+def duvm = new DoUpdateVfModule()
+duvm.validateSDNCResponse(execution, response, "changeassign")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_5" targetRef="ScriptTask_18"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_18" targetRef="ScriptTask_6"/>\r
+    <bpmn2:scriptTask id="ScriptTask_6" name="SDNC Topology Query (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepSDNCTopologyQuery(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="ScriptTask_6" targetRef="ScriptTask_7"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_15"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="ScriptTask_15" targetRef="ScriptTask_8"/>\r
+    <bpmn2:exclusiveGateway id="IsBaseVfModule" name="Is Base VF Module?" default="SequenceFlow_30">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_30</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_1" targetRef="IsBaseVfModule"/>\r
+    <bpmn2:callActivity id="ScriptTask_3" name="Confirm VolumeGroup Tenant" calledElement="ConfirmVolumeGroupTenant">\r
+      <bpmn2:extensionElements>\r
+        <camunda:in source="DOUPVfMod_volumeGroupId" target="volumeGroupId"/>\r
+        <camunda:in source="DOUPVfMod_tenantId" target="tenantId"/>\r
+        <camunda:in source="DOUPVfMod_aicCloudRegion" target="aicCloudRegion"/>\r
+        <camunda:in source="att-mso-request-id" target="att-mso-request-id"/>\r
+        <camunda:in source="att-mso-service-instance-id" target="att-mso-service-instance-id"/>\r
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled"/>\r
+        <camunda:out source="WorkflowException" target="WorkflowException"/>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+    </bpmn2:callActivity>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="ScriptTask_3" targetRef="ScriptTask_4"/>\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Confirm VolumeGroup Tenant (prep)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def duvm = new DoUpdateVfModule()
+duvm.prepConfirmVolumeGroupTenant(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="ScriptTask_2" targetRef="ScriptTask_3"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="VolumeGroupId &#xD;&#xA;present?" default="SequenceFlow_16">\r
+      <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="Yes" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_2">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy">${execution.getVariable('DOUPVfMod_volumeGroupId').isEmpty()} == false</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="No" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_4"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_28" name="yes" sourceRef="IsBaseVfModule" targetRef="ExclusiveGateway_3">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DOUPVfMod_isBaseVfModule") == "true"]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="QueryAAIVfModule" name="Query AAI Vf Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_30</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*\r
+def doUpdateVfModule = new DoUpdateVfModule()\r
+doUpdateVfModule.queryAAIVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_30" name="no" sourceRef="IsBaseVfModule" targetRef="QueryAAIVfModule"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="QueryAAIVfModule" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3">\r
+      <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>\r
+      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="ExclusiveGateway_3" targetRef="ExclusiveGateway_2"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateVfModule">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="150.0" y="214.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="151.0" y="255.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="300.0" y="192.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="186.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="300.0" y="232.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="208.0" y="232.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="PrepareUpdateAAIVfModule_prep">\r
+        <dc:Bounds height="80.0" width="100.0" x="456.0" y="192.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="400.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="456.0" y="232.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="492.0" y="232.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_164" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="624.0" y="192.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ScriptTask_164">\r
+        <di:waypoint xsi:type="dc:Point" x="556.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="624.0" y="232.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="575.0" y="232.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_88" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1039.0" y="206.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="109.0" x="1011.0" y="172.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_165" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="1152.0" y="192.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_88" targetElement="_BPMNShape_ScriptTask_165">\r
+        <di:waypoint xsi:type="dc:Point" x="1089.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1118.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1152.0" y="232.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="29.0" x="1099.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_166" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="100.0" x="1308.0" y="192.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_165" targetElement="_BPMNShape_ScriptTask_166">\r
+        <di:waypoint xsi:type="dc:Point" x="1252.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1308.0" y="232.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1271.0" y="232.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_167" bpmnElement="ScriptTask_4">\r
+        <dc:Bounds height="80.0" width="100.0" x="72.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="ScriptTask_5">\r
+        <dc:Bounds height="80.0" width="100.0" x="239.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_169" bpmnElement="ScriptTask_6">\r
+        <dc:Bounds height="80.0" width="100.0" x="535.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_167" targetElement="_BPMNShape_ScriptTask_168">\r
+        <di:waypoint xsi:type="dc:Point" x="172.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="239.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="197.0" y="460.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_88" targetElement="_BPMNShape_ScriptTask_167">\r
+        <di:waypoint xsi:type="dc:Point" x="1064.0" y="256.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1064.0" y="351.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="122.0" y="351.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="122.0" y="420.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="22.0" x="1073.0" y="271.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_166" targetElement="_BPMNShape_ScriptTask_167">\r
+        <di:waypoint xsi:type="dc:Point" x="1358.0" y="272.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1358.0" y="352.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="639.0" y="352.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="122.0" y="352.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="122.0" y="420.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="927.0" y="352.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="ScriptTask_7">\r
+        <dc:Bounds height="80.0" width="100.0" x="684.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_169" targetElement="_BPMNShape_ScriptTask_170">\r
+        <di:waypoint xsi:type="dc:Point" x="635.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="684.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="648.0" y="460.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="ScriptTask_8">\r
+        <dc:Bounds height="80.0" width="100.0" x="996.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="ScriptTask_9">\r
+        <dc:Bounds height="80.0" width="100.0" x="1176.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_ScriptTask_172">\r
+        <di:waypoint xsi:type="dc:Point" x="1096.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1176.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1133.0" y="460.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="ScriptTask_10">\r
+        <dc:Bounds height="80.0" width="100.0" x="466.0" y="636.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_174" bpmnElement="ScriptTask_11">\r
+        <dc:Bounds height="80.0" width="100.0" x="624.0" y="636.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_ScriptTask_219">\r
+        <di:waypoint xsi:type="dc:Point" x="1226.0" y="500.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1226.0" y="576.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="576.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="636.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="821.0" y="576.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_ScriptTask_174">\r
+        <di:waypoint xsi:type="dc:Point" x="566.0" y="676.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="624.0" y="676.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="591.0" y="676.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_175" bpmnElement="ScriptTask_12">\r
+        <dc:Bounds height="80.0" width="100.0" x="804.0" y="636.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_176" bpmnElement="ScriptTask_13">\r
+        <dc:Bounds height="80.0" width="100.0" x="984.0" y="636.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ScriptTask_174" targetElement="_BPMNShape_ScriptTask_175">\r
+        <di:waypoint xsi:type="dc:Point" x="724.0" y="676.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="804.0" y="676.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="695.0" y="674.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_175" targetElement="_BPMNShape_ScriptTask_176">\r
+        <di:waypoint xsi:type="dc:Point" x="904.0" y="676.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="676.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="902.0" y="676.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="1016.0" y="876.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="50.0" x="1009.0" y="917.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_21" bpmnElement="SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="198.0" width="475.0" x="239.0" y="924.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_179" bpmnElement="ScriptTask_16">\r
+        <dc:Bounds height="80.0" width="100.0" x="399.0" y="984.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_163" bpmnElement="EndEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="617.0" y="1006.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="635.0" y="1047.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_179" targetElement="_BPMNShape_EndEvent_163">\r
+        <di:waypoint xsi:type="dc:Point" x="499.0" y="1024.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="617.0" y="1024.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="555.0" y="1024.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_46" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="696.0" y="1005.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="711.0" y="1046.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_164" bpmnElement="EndEvent_5">\r
+        <dc:Bounds height="36.0" width="36.0" x="814.0" y="1005.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="832.0" y="1046.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_BoundaryEvent_46" targetElement="_BPMNShape_EndEvent_164">\r
+        <di:waypoint xsi:type="dc:Point" x="732.0" y="1023.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="814.0" y="1023.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="770.0" y="1023.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_56" bpmnElement="StartEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="305.0" y="1006.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="323.0" y="1047.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_StartEvent_56" targetElement="_BPMNShape_ScriptTask_179">\r
+        <di:waypoint xsi:type="dc:Point" x="341.0" y="1024.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="399.0" y="1024.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="302.0" y="1084.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_180" bpmnElement="ScriptTask_17">\r
+        <dc:Bounds height="80.0" width="100.0" x="984.0" y="768.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_180" targetElement="_BPMNShape_EndEvent_162">\r
+        <di:waypoint xsi:type="dc:Point" x="1034.0" y="848.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1034.0" y="876.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1031.0" y="868.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_176" targetElement="_BPMNShape_ScriptTask_180">\r
+        <di:waypoint xsi:type="dc:Point" x="1034.0" y="716.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1034.0" y="768.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1031.0" y="741.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_219" bpmnElement="ScriptTask_14">\r
+        <dc:Bounds height="80.0" width="100.0" x="144.0" y="636.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_2" bpmnElement="CallActivity_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="300.0" y="636.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_CallActivity_2" targetElement="_BPMNShape_ScriptTask_173">\r
+        <di:waypoint xsi:type="dc:Point" x="400.0" y="676.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="466.0" y="676.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="431.0" y="676.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_219" targetElement="_BPMNShape_ExclusiveGateway_213">\r
+        <di:waypoint xsi:type="dc:Point" x="194.0" y="716.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="195.0" y="793.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="284.0" y="793.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="324.0" y="793.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="191.0" y="746.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_213" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="324.0" y="768.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="349.0" y="823.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_CallActivity_2">\r
+        <di:waypoint xsi:type="dc:Point" x="349.0" y="768.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="350.0" y="716.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="80.0" x="357.0" y="733.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ExclusiveGateway_213" targetElement="_BPMNShape_ScriptTask_173">\r
+        <di:waypoint xsi:type="dc:Point" x="374.0" y="793.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="515.0" y="793.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="516.0" y="716.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="97.0" x="380.0" y="768.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="ScriptTask_15">\r
+        <dc:Bounds height="80.0" width="100.0" x="840.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="ScriptTask_18">\r
+        <dc:Bounds height="80.0" width="100.0" x="384.0" y="420.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_ScriptTask_221">\r
+        <di:waypoint xsi:type="dc:Point" x="339.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="384.0" y="460.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_169">\r
+        <di:waypoint xsi:type="dc:Point" x="484.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="535.0" y="460.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="511.0" y="460.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_170" targetElement="_BPMNShape_ScriptTask_220">\r
+        <di:waypoint xsi:type="dc:Point" x="784.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="840.0" y="460.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ScriptTask_220" targetElement="_BPMNShape_ScriptTask_171">\r
+        <di:waypoint xsi:type="dc:Point" x="940.0" y="460.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="996.0" y="460.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_214" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="965.0" y="206.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="990.0" y="261.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_215" bpmnElement="IsBaseVfModule" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="770.0" y="206.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="795.0" y="261.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="QueryAAIVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="849.0" y="72.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_164" targetElement="_BPMNShape_ExclusiveGateway_215">\r
+        <di:waypoint xsi:type="dc:Point" x="724.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="747.0" y="232.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="747.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="770.0" y="231.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ExclusiveGateway_214">\r
+        <di:waypoint xsi:type="dc:Point" x="820.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="965.0" y="231.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="888.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ExclusiveGateway_214" targetElement="_BPMNShape_ExclusiveGateway_88">\r
+        <di:waypoint xsi:type="dc:Point" x="1015.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1039.0" y="231.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1015.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_215" targetElement="_BPMNShape_ScriptTask_285">\r
+        <di:waypoint xsi:type="dc:Point" x="795.0" y="206.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="795.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="849.0" y="112.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="770.0" y="151.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_285" targetElement="_BPMNShape_ExclusiveGateway_214">\r
+        <di:waypoint xsi:type="dc:Point" x="949.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="966.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="990.0" y="112.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="990.0" y="206.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="987.0" y="136.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/PrepareUpdateAAIVfModule.bpmn
new file mode 100644 (file)
index 0000000..bd16398
--- /dev/null
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="PrepareUpdateAAIVfModule" name="PrepareUpdateAAIVfModule" isExecutable="true">\r
+    <bpmn2:documentation><![CDATA[This flow expects its incoming request to be in the variable 'PrepareUpdateAAIVfModuleRequest'.  This flow has 2 outputs: The heat stack ID is placed in the variable 'PUAAIVfMod_heatStackId'.
+and the updated VF Module (type=VfModule) is placed in the variable 'PUAAIVfMod_outVfModule'.]]></bpmn2:documentation>\r
+    <bpmn2:scriptTask id="QueryAAIForGenericVnf" name="Query AAI for Generic Vnf" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def puvm = new PrepareUpdateAAIVfModule()
+puvm.getGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVnf" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="ScriptTask_1">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_getVnfResponseCode') == 200}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;Generic Vnf not  found" sourceRef="ExclusiveGateway_3" targetRef="VnfNotFound"/>\r
+    <bpmn2:scriptTask id="ScriptTask_1" name="Validate VF Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def puvm= new PrepareUpdateAAIVfModule()
+puvm.validateVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:scriptTask id="VnfNotFound" name="Handle Generic Vnf Not found" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def puvm= new PrepareUpdateAAIVfModule()
+puvm.handleVnfNotFound(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="VnfNotFound" targetRef="EndEvent_7"/>\r
+    <bpmn2:endEvent id="EndEvent_7">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" default="SequenceFlow_12">\r
+      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Handle VF Module Validation Error" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def puvm= new PrepareUpdateAAIVfModule()
+puvm.handleVfModuleValidationError(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_12" name="VF Module invalid or&#xD;&#xA;not found" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="ScriptTask_2" targetRef="EndEvent_1"/>\r
+    <bpmn2:endEvent id="EndEvent_1">\r
+      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_69" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_4" name="TheEnd">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:inputOutput>\r
+            <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"                   xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+ <ns:GlobalCustomerId>${CCV1_subscriberglobalid}</ns:GlobalCustomerId>
+   </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def puvm= new PrepareUpdateAAIVfModule()
+puvm.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>\r
+    <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def puvm= new PrepareUpdateAAIVfModule()
+puvm.updateVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="ExclusiveGateway_2" targetRef="UpdateVfModule">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('PUAAIVfMod_vfModuleOK')}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest"/>\r
+    <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def puvm= new PrepareUpdateAAIVfModule()
+puvm.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForGenericVnf"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="PrepareUpdateAAIVfModule">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="37.0" y="212.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="38.0" y="253.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="181.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="73.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="181.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="95.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="81.0" y="540.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="425.0" y="560.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="50.0" x="418.0" y="601.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="250.0" y="554.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="275.0" y="609.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">\r
+        <di:waypoint xsi:type="dc:Point" x="300.0" y="579.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="402.0" y="579.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="402.0" y="578.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="425.0" y="578.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="338.0" y="579.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="257.0" y="348.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="275.0" y="389.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="499.0" y="206.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="524.0" y="261.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_162">\r
+        <di:waypoint xsi:type="dc:Point" x="549.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="601.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="661.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="564.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="VnfNotFound">\r
+        <dc:Bounds height="80.0" width="100.0" x="475.0" y="72.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">\r
+        <di:waypoint xsi:type="dc:Point" x="524.0" y="206.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="524.0" y="173.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="525.0" y="173.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="525.0" y="152.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="135.0" x="526.0" y="160.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="507.0" y="5.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="525.0" y="46.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">\r
+        <di:waypoint xsi:type="dc:Point" x="525.0" y="72.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="525.0" y="41.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="522.0" y="61.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForGenericVnf">\r
+        <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="281.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="301.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="499.0" y="231.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="449.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="225.0" y="408.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">\r
+        <di:waypoint xsi:type="dc:Point" x="275.0" y="408.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="275.0" y="384.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="300.0" y="740.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">\r
+        <di:waypoint xsi:type="dc:Point" x="181.0" y="580.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="206.0" y="580.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="206.0" y="579.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="250.0" y="579.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="174.0" y="711.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">\r
+        <di:waypoint xsi:type="dc:Point" x="275.0" y="554.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="275.0" y="520.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="276.0" y="520.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="276.0" y="488.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="157.0" x="280.0" y="504.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_162" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="661.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_87" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="829.0" y="204.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="854.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_162" targetElement="_BPMNShape_ExclusiveGateway_87">\r
+        <di:waypoint xsi:type="dc:Point" x="761.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="795.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="795.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="829.0" y="229.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="792.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_163" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="805.0" y="72.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="837.0" y="5.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="855.0" y="46.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ExclusiveGateway_87" targetElement="_BPMNShape_ScriptTask_163">\r
+        <di:waypoint xsi:type="dc:Point" x="854.0" y="204.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="854.0" y="178.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="855.0" y="178.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="855.0" y="152.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="133.0" x="864.0" y="160.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_163" targetElement="_BPMNShape_EndEvent_161">\r
+        <di:waypoint xsi:type="dc:Point" x="855.0" y="72.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="855.0" y="41.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="852.0" y="54.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ExclusiveGateway_87" targetElement="_BPMNShape_Task_2">\r
+        <di:waypoint xsi:type="dc:Point" x="854.0" y="254.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="854.0" y="302.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="131.0" y="302.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="131.0" y="540.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="399.0" y="302.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIGenericVnf.bpmn
new file mode 100644 (file)
index 0000000..32206bd
--- /dev/null
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="UpdateAAIGenericVnf" name="UpdateAAIGenericVnf" isExecutable="true">\r
+    <bpmn2:documentation>This flow expects its incoming request to be in the variable 'UpdateAAIGenericVnfRequest'.  This flow produces no output.</bpmn2:documentation>\r
+    <bpmn2:scriptTask id="QueryAAIForGenericVNF" name="Query AAI for Generic VNF" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def ugv = new UpdateAAIGenericVnf()
+ugv.getGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForGenericVNF" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIGenVnf_updateGenericVnfResponseCode') == 200}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update Generic VNF Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateGenericVNFFailure"/>\r
+    <bpmn2:scriptTask id="HandleUpdateGenericVNFFailure" name="Handle Update Generic VNF Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def ugv = new UpdateAAIGenericVnf()
+ugv.handleUpdateGenericVnfFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateGenericVNFFailure" targetRef="EndEvent_2"/>\r
+    <bpmn2:endEvent id="EndEvent_4" name="TheEnd">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:inputOutput>\r
+            <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"                   xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+ <ns:GlobalCustomerId>${CCV1_subscriberglobalid}</ns:GlobalCustomerId>
+   </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="UpdateGenericVNF" name="Update Generic VNF" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def ugv = new UpdateAAIGenericVnf()
+ugv.updateGenericVnf(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateGenericVNF" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateGenericVNF">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIGenVnf_getGenericVnfResponseCode') == 200}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;Generic VNF not  found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>\r
+    <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def ugv = new UpdateAAIGenericVnf()
+ugv.handleAAIQueryFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>\r
+    <bpmn2:endEvent id="EndEvent_7">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest"/>\r
+    <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def ugv = new UpdateAAIGenericVnf()
+ugv.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForGenericVNF"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateAAIGenericVnf">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="43.0" y="212.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="44.0" y="253.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="168.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="79.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="168.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="101.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateGenericVNF">\r
+        <dc:Bounds height="80.0" width="100.0" x="683.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="984.0" y="214.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="50.0" x="977.0" y="255.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="840.0" y="206.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="865.0" y="261.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">\r
+        <di:waypoint xsi:type="dc:Point" x="890.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="984.0" y="232.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="904.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="500.0" y="204.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="525.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">\r
+        <di:waypoint xsi:type="dc:Point" x="550.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="683.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="565.0" y="229.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="476.0" y="60.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">\r
+        <di:waypoint xsi:type="dc:Point" x="525.0" y="204.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="525.0" y="190.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="526.0" y="190.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="526.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="142.0" x="543.0" y="149.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="508.0" y="0.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="526.0" y="41.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">\r
+        <di:waypoint xsi:type="dc:Point" x="526.0" y="60.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="526.0" y="36.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="523.0" y="49.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForGenericVNF">\r
+        <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="268.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="288.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="500.0" y="229.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="450.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateGenericVNFFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">\r
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">\r
+        <di:waypoint xsi:type="dc:Point" x="783.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="840.0" y="231.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="813.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="206.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="169.0" x="867.0" y="157.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VfModularity/UpdateAAIVfModule.bpmn
new file mode 100644 (file)
index 0000000..fabd9c2
--- /dev/null
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_Wblj8GyfEeWUWLTvug7ZOg" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="UpdateAAIVfModule" name="UpdateAAIVfModule" isExecutable="true">\r
+    <bpmn2:documentation>This flow expects its incoming request to be in the variable 'UpdateAAIVfModuleRequest'.  This flow produces no output.</bpmn2:documentation>\r
+    <bpmn2:scriptTask id="QueryAAIForVfModule" name="Query AAI for VF Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_39</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvm = new UpdateAAIVfModule()
+uvm.getVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_39" name="" sourceRef="QueryAAIForVfModule" targetRef="ExclusiveGateway_3"/>\r
+    <bpmn2:endEvent id="EndEvent_7">\r
+      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_68" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="AAIQueryFailure" name="Handle AAI Query Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvm= new UpdateAAIVfModule()
+uvm.handleAAIQueryFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="AAIQueryFailure" targetRef="EndEvent_7"/>\r
+    <bpmn2:endEvent id="EndEvent_2">\r
+      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_50" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_4" name="TheEnd">\r
+      <bpmn2:extensionElements>\r
+        <camunda:connector>\r
+          <camunda:inputOutput>\r
+            <camunda:outputParameter name="CreateCustomerV1Response"><![CDATA[<aetgt:CreateCustomerResponse xmlns:aetgt="http://ecomp.att.com/mso/workflow/schema/v1"                   xmlns:ns="http://ecomp.att.com/mso/workflow/schema/v1">
+ <ns:GlobalCustomerId>${CCV1_subscriberglobalid}</ns:GlobalCustomerId>
+   </aetgt:CreateCustomerResponse>]]></camunda:outputParameter>\r
+          </camunda:inputOutput>\r
+        </camunda:connector>\r
+      </bpmn2:extensionElements>\r
+      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" default="SequenceFlow_23">\r
+      <bpmn2:incoming>SequenceFlow_39</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="ExclusiveGateway_3" targetRef="UpdateVfModule">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIVfMod_getVfModuleResponseCode') == 200}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="AAI Query failure or&#xD;&#xA;VF Module not  found" sourceRef="ExclusiveGateway_3" targetRef="AAIQueryFailure"/>\r
+    <bpmn2:scriptTask id="HandleUpdateVfModuleFailure" name="Handle Update VF Module Failure" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvm= new UpdateAAIVfModule()
+uvm.handleUpdateVfModuleFailure(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="HandleUpdateVfModuleFailure" targetRef="EndEvent_2"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_4">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_13" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_4">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable('UAAIVfMod_updateVfModuleResponseCode') == 200}</bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_4" name="Update VF Module Failure" sourceRef="ExclusiveGateway_1" targetRef="HandleUpdateVfModuleFailure"/>\r
+    <bpmn2:scriptTask id="UpdateVfModule" name="Update VF Module" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvm= new UpdateAAIVfModule()
+uvm.updateVfModule(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateVfModule" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="ProcessReceivedRequest"/>\r
+    <bpmn2:scriptTask id="ProcessReceivedRequest" name="Process Received Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def uvm= new UpdateAAIVfModule()
+uvm.preProcessRequest(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="ProcessReceivedRequest" targetRef="QueryAAIForVfModule"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateAAIVfModule">\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="69.0" y="212.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="70.0" y="253.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="ProcessReceivedRequest">\r
+        <dc:Bounds height="80.0" width="100.0" x="180.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">\r
+        <di:waypoint xsi:type="dc:Point" x="105.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="180.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="127.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_Task_2" bpmnElement="UpdateVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="672.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_92" bpmnElement="EndEvent_4">\r
+        <dc:Bounds height="36.0" width="36.0" x="1016.0" y="212.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="50.0" x="1009.0" y="253.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_54" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="840.0" y="206.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="865.0" y="261.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_EndEvent_92">\r
+        <di:waypoint xsi:type="dc:Point" x="890.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="993.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="993.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1016.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="928.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_120" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="848.0" y="0.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="866.0" y="41.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_86" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="493.0" y="204.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="518.0" y="259.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_Task_2">\r
+        <di:waypoint xsi:type="dc:Point" x="543.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="607.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="607.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="672.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="558.0" y="229.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_155" bpmnElement="AAIQueryFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="468.0" y="60.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_86" targetElement="_BPMNShape_ScriptTask_155">\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="204.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="130.0" x="528.0" y="152.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="500.0" y="0.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="518.0" y="41.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_ScriptTask_155" targetElement="_BPMNShape_EndEvent_160">\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="60.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="518.0" y="36.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="515.0" y="49.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="QueryAAIForVfModule">\r
+        <dc:Bounds height="80.0" width="100.0" x="336.0" y="190.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_22" targetElement="_BPMNShape_ScriptTask_160">\r
+        <di:waypoint xsi:type="dc:Point" x="280.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="336.0" y="230.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="300.0" y="230.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="SequenceFlow_39" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_86">\r
+        <di:waypoint xsi:type="dc:Point" x="436.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="452.0" y="229.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="493.0" y="229.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="449.0" y="229.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_161" bpmnElement="HandleUpdateVfModuleFailure">\r
+        <dc:Bounds height="80.0" width="100.0" x="816.0" y="60.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_161" targetElement="_BPMNShape_EndEvent_120">\r
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="60.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="866.0" y="36.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="863.0" y="51.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_Task_2" targetElement="_BPMNShape_ExclusiveGateway_54">\r
+        <di:waypoint xsi:type="dc:Point" x="772.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="797.0" y="230.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="797.0" y="231.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="840.0" y="231.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="801.0" y="231.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_161">\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="206.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="865.0" y="172.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="867.0" y="172.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="867.0" y="140.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="157.0" x="883.0" y="160.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn b/bpmn/MSOGammaBPMN/src/main/resources/subprocess/VnfAdapterRestV1.bpmn
new file mode 100644 (file)
index 0000000..04f9d02
--- /dev/null
@@ -0,0 +1,442 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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://activiti.org/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_GraPIIyxEeWmdMDkx6Uftw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://activiti.org/bpmn">\r
+  <bpmn2:process id="vnfAdapterRestV1" name="vnfAdapterRestV1" isExecutable="true">\r
+    <bpmn2:scriptTask id="ScriptTask_2" name="Log Response" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+def statusCode = execution.getVariable('VNFREST_vnfAdapterStatusCode')
+String response = String.valueOf(execution.getVariable('VNFREST_vnfAdapterResponse'))
+def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+def processKey = vnfAdapterRestV1.getProcessKey(execution)
+vnfAdapterRestV1.logDebug(processKey + " received response from VnfAdapter: statusCode=" + statusCode +
+       " response=" + (response.isEmpty() ? "" : "\n") + response, isDebugLogEnabled)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:scriptTask id="ScriptTask_3" name="Workflow Exception (no connection)">\r
+      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Failed to communicate with VnfAdapter")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:scriptTask id="ScriptTask_4" name="Workflow Exception (bad response)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_36</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+
+String res = execution.getVariable(VNFREST_vnfAdapterResponse)
+
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+vnfAdapterRestV1.vnfAdapterWorkflowException(execution, res)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_2" targetRef="ExclusiveGateway_1"/>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" default="SequenceFlow_23">\r
+      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_17" name="404" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_3">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("VNFREST_vnfAdapterStatusCode") == '404'}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_23" name="other" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_4"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_24" name="2xx" sourceRef="ExclusiveGateway_1" targetRef="waitForAsyncMessage">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("VNFREST_vnfAdapterStatusCode") == '200' || execution.getVariable("VNFREST_vnfAdapterStatusCode") == '202'}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="Timeout" attachedToRef="waitForAsyncMessage">\r
+      <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>\r
+      <bpmn2:timerEventDefinition id="TimerEventDefinition_1">\r
+        <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">${URN_mso_po_timeout}</bpmn2:timeDuration>\r
+      </bpmn2:timerEventDefinition>\r
+    </bpmn2:boundaryEvent>\r
+    <bpmn2:subProcess id="waitForAsyncMessage" name="Wait for Callback">\r
+      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_28</bpmn2:outgoing>\r
+      <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="Catch Event">\r
+        <bpmn2:incoming>SequenceFlow_25</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_26</bpmn2:outgoing>\r
+        <bpmn2:messageEventDefinition id="MessageEventDefinition_1" messageRef="Message_1"/>\r
+      </bpmn2:intermediateCatchEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_26" name="" sourceRef="IntermediateCatchEvent_1" targetRef="EndEvent_2"/>\r
+      <bpmn2:startEvent id="StartEvent_3">\r
+        <bpmn2:outgoing>SequenceFlow_25</bpmn2:outgoing>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_25" name="" sourceRef="StartEvent_3" targetRef="IntermediateCatchEvent_1"/>\r
+      <bpmn2:endEvent id="EndEvent_2">\r
+        <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="BoundaryEvent_1" targetRef="ScriptTask_5"/>\r
+    <bpmn2:scriptTask id="ScriptTask_5" name="Workflow Exception (timeout)" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_27</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def exceptionUtil = new ExceptionUtil()
+exceptionUtil.buildAndThrowWorkflowException(execution, 7010, "VnfAdapter Callback Timeout Error")]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_28" name="" sourceRef="waitForAsyncMessage" targetRef="ScriptTask_6"/>\r
+    <bpmn2:scriptTask id="ScriptTask_6" name="Process Callback" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_28</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_33</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+vnfAdapterRestV1.processCallback(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_33" name="" sourceRef="ScriptTask_6" targetRef="ExclusiveGateway_2"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="ScriptTask_5" targetRef="EndEvent_8"/>\r
+    <bpmn2:endEvent id="EndEvent_8">\r
+      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_21" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="ScriptTask_3" targetRef="EndEvent_9"/>\r
+    <bpmn2:endEvent id="EndEvent_9">\r
+      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_22" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:endEvent id="EndEvent_10">\r
+      <bpmn2:incoming>SequenceFlow_36</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_23" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_36" name="" sourceRef="ScriptTask_4" targetRef="EndEvent_10"/>\r
+    <bpmn2:endEvent id="EndEvent_7">\r
+      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>\r
+      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_20" errorRef="Error_1"/>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Callback&#xD;&#xA;Exception?" default="SequenceFlow_31">\r
+      <bpmn2:incoming>SequenceFlow_33</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_31</bpmn2:outgoing>\r
+      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>\r
+    </bpmn2:exclusiveGateway>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_31" name="no" sourceRef="ExclusiveGateway_2" targetRef="ScriptTask_setSuccess"/>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_32" name="yes" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_7">\r
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("WorkflowException") != null}]]></bpmn2:conditionExpression>\r
+    </bpmn2:sequenceFlow>\r
+    <bpmn2:scriptTask id="ScriptTask_setSuccess" name="Set Success Indicator" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_31</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+vnfAdapterRestV1.setSuccessIndicator(execution, true)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="ScriptTask_setSuccess" targetRef="EndEvent_6"/>\r
+    <bpmn2:endEvent id="EndEvent_6" name="End Flow">\r
+      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>\r
+    </bpmn2:endEvent>\r
+    <bpmn2:scriptTask id="ScriptTask_7" name="Send Request to Vnf Adapter" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+vnfAdapterRestV1.sendRequestToVnfAdapter(execution)]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="ScriptTask_7" targetRef="ScriptTask_2"/>\r
+    <bpmn2:subProcess id="SubProcess_1" name="Error Handling Sub Process" triggeredByEvent="true">\r
+      <bpmn2:scriptTask id="ScriptTask_8" name="Process Error" scriptFormat="groovy">\r
+        <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>\r
+        <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>\r
+        <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def exUtil = new ExceptionUtil()
+exUtil.processSubflowsBPMNException(execution)
+]]></bpmn2:script>\r
+      </bpmn2:scriptTask>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_8" targetRef="EndEvent_1"/>\r
+      <bpmn2:endEvent id="EndEvent_1">\r
+        <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>\r
+      </bpmn2:endEvent>\r
+      <bpmn2:startEvent id="StartEvent_2">\r
+        <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>\r
+        <bpmn2:errorEventDefinition id="_ErrorEventDefinition_89"/>\r
+      </bpmn2:startEvent>\r
+      <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="StartEvent_2" targetRef="ScriptTask_8"/>\r
+    </bpmn2:subProcess>\r
+    <bpmn2:scriptTask id="ScriptTask_1" name="Pre-Process Request" scriptFormat="groovy">\r
+      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>\r
+      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>\r
+      <bpmn2:script><![CDATA[import com.att.bpm.scripts.*
+def vnfAdapterRestV1 = new VnfAdapterRestV1()
+vnfAdapterRestV1.preProcessRequest(execution)
+]]></bpmn2:script>\r
+    </bpmn2:scriptTask>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="ScriptTask_1" targetRef="ScriptTask_7"/>\r
+    <bpmn2:startEvent id="StartEvent_1" name="Start">\r
+      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>\r
+    </bpmn2:startEvent>\r
+    <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/>\r
+  </bpmn2:process>\r
+  <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>\r
+  <bpmn2:message id="Message_1" name="vnfAdapterRestCallbackMessage"/>\r
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">\r
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="vnfAdapterRestV1">\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_56" bpmnElement="ScriptTask_1">\r
+        <dc:Bounds height="80.0" width="100.0" x="204.0" y="148.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_14" bpmnElement="waitForAsyncMessage" isExpanded="true">\r
+        <dc:Bounds height="154.0" width="265.0" x="744.0" y="275.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_58" bpmnElement="ScriptTask_6">\r
+        <dc:Bounds height="80.0" width="100.0" x="1046.0" y="311.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_59" bpmnElement="ScriptTask_5">\r
+        <dc:Bounds height="80.0" width="100.0" x="827.0" y="492.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_24" bpmnElement="BoundaryEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="859.0" y="411.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="52.0" x="894.0" y="441.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_20" bpmnElement="IntermediateCatchEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="863.0" y="330.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="76.0" x="843.0" y="371.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_78" bpmnElement="ScriptTask_4">\r
+        <dc:Bounds height="80.0" width="97.0" x="744.0" y="148.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_79" bpmnElement="ScriptTask_2">\r
+        <dc:Bounds height="80.0" width="100.0" x="492.0" y="148.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_54" bpmnElement="StartEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="84.0" y="170.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="34.0" x="85.0" y="211.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_168" bpmnElement="ScriptTask_3">\r
+        <dc:Bounds height="80.0" width="97.0" x="744.0" y="24.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_54" targetElement="_BPMNShape_ScriptTask_56">\r
+        <di:waypoint xsi:type="dc:Point" x="120.0" y="188.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="204.0" y="188.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="130.0" y="188.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_105" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="624.0" y="162.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="649.0" y="217.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_79" targetElement="_BPMNShape_ExclusiveGateway_105">\r
+        <di:waypoint xsi:type="dc:Point" x="592.0" y="188.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="624.0" y="187.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="611.0" y="187.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ExclusiveGateway_105" targetElement="_BPMNShape_ScriptTask_168">\r
+        <di:waypoint xsi:type="dc:Point" x="649.0" y="162.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="649.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="744.0" y="64.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="688.0" y="64.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_105" targetElement="_BPMNShape_ScriptTask_78">\r
+        <di:waypoint xsi:type="dc:Point" x="674.0" y="187.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="709.0" y="187.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="709.0" y="188.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="744.0" y="188.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="35.0" x="684.0" y="188.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_25" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_105" targetElement="_BPMNShape_SubProcess_14">\r
+        <di:waypoint xsi:type="dc:Point" x="649.0" y="212.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="649.0" y="353.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="708.0" y="353.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="744.0" y="353.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="688.0" y="328.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_55" bpmnElement="StartEvent_3">\r
+        <dc:Bounds height="36.0" width="36.0" x="768.0" y="330.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="786.0" y="371.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_27" bpmnElement="SequenceFlow_25" sourceElement="_BPMNShape_StartEvent_55" targetElement="_BPMNShape_IntermediateCatchEvent_20">\r
+        <di:waypoint xsi:type="dc:Point" x="804.0" y="348.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="863.0" y="348.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="833.0" y="348.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_156" bpmnElement="EndEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="948.0" y="330.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="966.0" y="371.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_IntermediateCatchEvent_20" targetElement="_BPMNShape_EndEvent_156">\r
+        <di:waypoint xsi:type="dc:Point" x="899.0" y="348.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="929.0" y="348.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="929.0" y="347.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="948.0" y="348.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="926.0" y="348.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_BoundaryEvent_24" targetElement="_BPMNShape_ScriptTask_59">\r
+        <di:waypoint xsi:type="dc:Point" x="877.0" y="447.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="877.0" y="492.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="874.0" y="472.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_28" sourceElement="_BPMNShape_SubProcess_14" targetElement="_BPMNShape_ScriptTask_58">\r
+        <di:waypoint xsi:type="dc:Point" x="1008.0" y="351.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1046.0" y="351.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1023.0" y="351.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_106" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">\r
+        <dc:Bounds height="50.0" width="50.0" x="1188.0" y="325.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="38.0" width="71.0" x="1179.0" y="288.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_158" bpmnElement="EndEvent_6">\r
+        <dc:Bounds height="36.0" width="36.0" x="1463.0" y="333.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="60.0" x="1451.0" y="374.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_31" sourceElement="_BPMNShape_ExclusiveGateway_106" targetElement="_BPMNShape_ScriptTask_236">\r
+        <di:waypoint xsi:type="dc:Point" x="1238.0" y="350.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1308.0" y="350.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="20.0" x="1248.0" y="350.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_159" bpmnElement="EndEvent_7">\r
+        <dc:Bounds height="36.0" width="36.0" x="1196.0" y="426.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="1214.0" y="467.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ExclusiveGateway_106" targetElement="_BPMNShape_EndEvent_159">\r
+        <di:waypoint xsi:type="dc:Point" x="1213.0" y="375.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1213.0" y="392.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1214.0" y="392.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1214.0" y="426.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="22.0" width="27.0" x="1223.0" y="390.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_33" sourceElement="_BPMNShape_ScriptTask_58" targetElement="_BPMNShape_ExclusiveGateway_106">\r
+        <di:waypoint xsi:type="dc:Point" x="1146.0" y="351.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1173.0" y="351.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1173.0" y="350.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1188.0" y="350.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1170.0" y="350.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_160" bpmnElement="EndEvent_8">\r
+        <dc:Bounds height="36.0" width="36.0" x="974.0" y="514.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="992.0" y="555.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_36" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_59" targetElement="_BPMNShape_EndEvent_160">\r
+        <di:waypoint xsi:type="dc:Point" x="927.0" y="532.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="974.0" y="532.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="951.0" y="532.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_161" bpmnElement="EndEvent_9">\r
+        <dc:Bounds height="36.0" width="36.0" x="891.0" y="46.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="909.0" y="87.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_37" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_168" targetElement="_BPMNShape_EndEvent_161">\r
+        <di:waypoint xsi:type="dc:Point" x="840.0" y="64.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="891.0" y="64.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="865.0" y="64.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_162" bpmnElement="EndEvent_10">\r
+        <dc:Bounds height="36.0" width="36.0" x="892.0" y="170.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="910.0" y="211.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_36" sourceElement="_BPMNShape_ScriptTask_78" targetElement="_BPMNShape_EndEvent_162">\r
+        <di:waypoint xsi:type="dc:Point" x="840.0" y="188.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="892.0" y="188.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_236" bpmnElement="ScriptTask_setSuccess">\r
+        <dc:Bounds height="83.0" width="97.0" x="1308.0" y="309.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_ScriptTask_236" targetElement="_BPMNShape_EndEvent_158">\r
+        <di:waypoint xsi:type="dc:Point" x="1404.0" y="350.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1422.0" y="350.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1422.0" y="351.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="1463.0" y="351.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="1419.0" y="351.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_237" bpmnElement="ScriptTask_7">\r
+        <dc:Bounds height="83.0" width="97.0" x="360.0" y="146.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_56" targetElement="_BPMNShape_ScriptTask_237">\r
+        <di:waypoint xsi:type="dc:Point" x="304.0" y="188.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="344.0" y="188.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="344.0" y="187.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="360.0" y="187.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="317.0" y="188.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_237" targetElement="_BPMNShape_ScriptTask_79">\r
+        <di:waypoint xsi:type="dc:Point" x="456.0" y="187.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="474.0" y="187.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="474.0" y="188.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="492.0" y="188.0"/>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_24" bpmnElement="SubProcess_1" isExpanded="true">\r
+        <dc:Bounds height="181.0" width="382.0" x="180.0" y="532.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_2">\r
+        <dc:Bounds height="36.0" width="36.0" x="225.0" y="605.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="243.0" y="646.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_207" bpmnElement="EndEvent_1">\r
+        <dc:Bounds height="36.0" width="36.0" x="477.0" y="605.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="0.0" width="0.0" x="495.0" y="646.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_266" bpmnElement="ScriptTask_8">\r
+        <dc:Bounds height="83.0" width="97.0" x="323.0" y="581.0"/>\r
+      </bpmndi:BPMNShape>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ScriptTask_266">\r
+        <di:waypoint xsi:type="dc:Point" x="261.0" y="623.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="323.0" y="622.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="273.0" y="623.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_266" targetElement="_BPMNShape_EndEvent_207">\r
+        <di:waypoint xsi:type="dc:Point" x="419.0" y="622.0"/>\r
+        <di:waypoint xsi:type="dc:Point" x="477.0" y="623.0"/>\r
+        <bpmndi:BPMNLabel>\r
+          <dc:Bounds height="6.0" width="6.0" x="445.0" y="623.0"/>\r
+        </bpmndi:BPMNLabel>\r
+      </bpmndi:BPMNEdge>\r
+    </bpmndi:BPMNPlane>\r
+  </bpmndi:BPMNDiagram>\r
+</bpmn2:definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/urn.properties b/bpmn/MSOGammaBPMN/src/main/resources/urn.properties
new file mode 100644 (file)
index 0000000..44967b7
--- /dev/null
@@ -0,0 +1,30 @@
+###
+# ============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=========================================================
+###
+
+# URN mappings for this project.
+
+# TODO: Remove all the non-URN stuff that's in here.
+# TODO: Implement a real URN mapping capability.
+
+#AAIEndPoint= http://localhost:8080/SoapUIMocks
+#AAIEndPoint= http://calypso-36.cif.att.com:8080/SoapUIMocks
+AAIEndPoint= http://localhost:8090/
+SDNCEndPoint=http://localhost:8090/SDNCAdapter/
+msoRollback = true
diff --git a/bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl b/bpmn/MSOGammaBPMN/src/main/resources/wsdl/VnfAdapterNotify.wsdl
new file mode 100644 (file)
index 0000000..471745c
--- /dev/null
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+             xmlns:wsp="http://www.w3.org/ns/ws-policy"
+             xmlns:tns="http://com.att.mso/vnfNotify"
+             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+             xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
+             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+             xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+             xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+             name="vnfAdapterNotify"
+             targetNamespace="http://com.att.mso/vnfNotify">
+  <types>
+      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                 targetNamespace="http://com.att.mso/vnfNotify"
+                 version="1.0">
+
+         <xs:element name="createVnfNotification" type="tns:createVnfNotification"/>
+      
+         <xs:element name="updateVnfNotification" type="tns:updateVnfNotification"/>
+
+         <xs:element name="deleteVnfNotification" type="tns:deleteVnfNotification"/>
+
+         <xs:element name="queryVnfNotification" type="tns:queryVnfNotification"/>
+
+         <xs:element name="rollbackVnfNotification" type="tns:rollbackVnfNotification"/>
+
+         <xs:complexType name="queryVnfNotification">
+            <xs:sequence>
+               <xs:element name="messageId" type="xs:string"/>
+               <xs:element name="completed" type="xs:boolean"/>
+               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+               <xs:element minOccurs="0" name="vnfExists" type="xs:boolean"/>
+               <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
+               <xs:element minOccurs="0" name="status" type="tns:vnfStatus"/>
+               <xs:element minOccurs="0" name="outputs">
+                  <xs:complexType>
+                     <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
+                           <xs:complexType>
+                              <xs:sequence>
+                                 <xs:element minOccurs="0" name="key" type="xs:string"/>
+                                 <xs:element minOccurs="0" name="value" type="xs:string"/>
+                              </xs:sequence>
+                           </xs:complexType>
+                        </xs:element>
+                     </xs:sequence>
+                  </xs:complexType>
+               </xs:element>
+            </xs:sequence>
+         </xs:complexType>
+
+         <xs:complexType name="deleteVnfNotification">
+            <xs:sequence>
+               <xs:element name="messageId" type="xs:string"/>
+               <xs:element name="completed" type="xs:boolean"/>
+               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+            </xs:sequence>
+         </xs:complexType>
+
+         <xs:complexType name="rollbackVnfNotification">
+            <xs:sequence>
+               <xs:element name="messageId" type="xs:string"/>
+               <xs:element name="completed" type="xs:boolean"/>
+               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+            </xs:sequence>
+         </xs:complexType>
+
+         <xs:complexType name="createVnfNotification">
+            <xs:sequence>
+               <xs:element name="messageId" type="xs:string"/>
+               <xs:element name="completed" type="xs:boolean"/>
+               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+               <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
+               <xs:element minOccurs="0" name="outputs">
+                  <xs:complexType>
+                     <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
+                           <xs:complexType>
+                              <xs:sequence>
+                                 <xs:element minOccurs="0" name="key" type="xs:string"/>
+                                 <xs:element minOccurs="0" name="value" type="xs:string"/>
+                              </xs:sequence>
+                           </xs:complexType>
+                        </xs:element>
+                     </xs:sequence>
+                  </xs:complexType>
+               </xs:element>
+               <xs:element minOccurs="0" name="rollback" type="tns:vnfRollback"/>
+            </xs:sequence>
+         </xs:complexType>
+      
+         <xs:complexType name="updateVnfNotification">
+            <xs:sequence>
+               <xs:element name="messageId" type="xs:string"/>
+               <xs:element name="completed" type="xs:boolean"/>
+               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
+               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
+               <xs:element minOccurs="0" name="outputs">
+                  <xs:complexType>
+                     <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
+                           <xs:complexType>
+                              <xs:sequence>
+                                 <xs:element minOccurs="0" name="key" type="xs:string"/>
+                                 <xs:element minOccurs="0" name="value" type="xs:string"/>
+                              </xs:sequence>
+                           </xs:complexType>
+                        </xs:element>
+                     </xs:sequence>
+                  </xs:complexType>
+               </xs:element>
+               <xs:element minOccurs="0" name="rollback" type="tns:vnfRollback"/>
+            </xs:sequence>
+         </xs:complexType>
+
+         <xs:complexType name="vnfRollback">
+            <xs:sequence>
+               <xs:element minOccurs="0" name="cloudSiteId" type="xs:string"/>
+               <xs:element minOccurs="0" name="msoRequest" type="tns:msoRequest"/>
+               <xs:element name="tenantCreated" type="xs:boolean"/>
+               <xs:element minOccurs="0" name="tenantId" type="xs:string"/>
+               <xs:element name="vnfCreated" type="xs:boolean"/>
+               <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
+            </xs:sequence>
+         </xs:complexType>
+
+         <xs:complexType name="msoRequest">
+            <xs:sequence>
+               <xs:element minOccurs="0" name="requestId" type="xs:string"/>
+               <xs:element minOccurs="0" name="serviceInstanceId" type="xs:string"/>
+            </xs:sequence>
+         </xs:complexType>
+
+         <xs:simpleType name="msoExceptionCategory">
+            <xs:restriction base="xs:string">
+               <xs:enumeration value="OPENSTACK"/>
+               <xs:enumeration value="IO"/>
+               <xs:enumeration value="INTERNAL"/>
+               <xs:enumeration value="USERDATA"/>
+            </xs:restriction>
+         </xs:simpleType>
+
+         <xs:simpleType name="vnfStatus">
+            <xs:restriction base="xs:string">
+               <xs:enumeration value="ACTIVE"/>
+               <xs:enumeration value="FAILED"/>
+               <xs:enumeration value="NOTFOUND"/>
+               <xs:enumeration value="UNKNOWN"/>
+            </xs:restriction>
+         </xs:simpleType>
+      </xs:schema>
+  </types>
+  <message name="rollbackVnfNotification">
+      <part element="tns:rollbackVnfNotification" name="parameters"/>
+  </message>
+  <message name="queryVnfNotification">
+      <part element="tns:queryVnfNotification" name="parameters"/>
+  </message>
+  <message name="createVnfNotification">
+      <part element="tns:createVnfNotification" name="parameters"/>
+  </message>
+  <message name="updateVnfNotification">
+      <part element="tns:updateVnfNotification" name="parameters"/>
+  </message>
+  <message name="deleteVnfNotification">
+      <part element="tns:deleteVnfNotification" name="parameters"/>
+  </message>
+  <portType name="vnfAdapterNotify">
+      <operation name="rollbackVnfNotification">
+         <input message="tns:rollbackVnfNotification"
+                wsam:Action="http://com.att.mso/notify/adapterNotify/rollbackVnfNotificationRequest"/>
+      </operation>
+      <operation name="queryVnfNotification">
+         <input message="tns:queryVnfNotification"
+                wsam:Action="http://com.att.mso/notify/adapterNotify/queryVnfNotificationRequest"/>
+      </operation>
+      <operation name="createVnfNotification">
+         <input message="tns:createVnfNotification"
+                wsam:Action="http://com.att.mso/notify/adapterNotify/createVnfNotificationRequest"/>
+      </operation>
+      <operation name="updateVnfNotification">
+         <input message="tns:updateVnfNotification"
+                wsam:Action="http://com.att.mso/notify/adapterNotify/updateVnfNotificationRequest"/>
+      </operation>
+      <operation name="deleteVnfNotification">
+         <input message="tns:deleteVnfNotification"
+                wsam:Action="http://com.att.mso/notify/adapterNotify/deleteVnfNotificationRequest"/>
+      </operation>
+  </portType>
+  <binding name="MsoVnfAdapterAsyncImplPortBinding" type="tns:vnfAdapterNotify">
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+      <operation name="rollbackVnfNotification">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+      </operation>
+      <operation name="queryVnfNotification">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+      </operation>
+      <operation name="createVnfNotification">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+      </operation>
+      <operation name="updateVnfNotification">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+      </operation>
+      <operation name="deleteVnfNotification">
+         <soap:operation soapAction=""/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+      </operation>
+  </binding>
+  <service name="vnfAdapterNotify">
+      <port binding="tns:MsoVnfAdapterAsyncImplPortBinding"
+            name="MsoVnfAdapterAsyncImplPort">
+         <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+      </port>
+  </service>
+</definitions>
\ No newline at end of file
diff --git a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..130f95e
--- /dev/null
@@ -0,0 +1,31 @@
+<!--
+  ============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=========================================================
+  -->
+
+<jboss-deployment-structure>
+       <deployment>
+               <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
+               <exclusions>
+                       <module name="org.apache.log4j" />
+                       <module name="org.slf4j" />
+                       <module name="org.slf4j.impl" />
+               </exclusions>
+       </deployment>
+</jboss-deployment-structure>
+
diff --git a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-web.xml b/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644 (file)
index 0000000..42717c5
--- /dev/null
@@ -0,0 +1,26 @@
+<?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 jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+<jboss-web>
+  <security-domain>other</security-domain>
+  <context-root>/mso</context-root>
+</jboss-web>  
diff --git a/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml b/bpmn/MSOGammaBPMN/src/main/webapp/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..e046d15
--- /dev/null
@@ -0,0 +1,102 @@
+<?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=========================================================
+  -->
+
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+  <display-name>MSO Gamma BPMN Workflow Servlet</display-name>
+
+  <!-- <load-on-startup>1</load-on-startup> -->        
+
+  <servlet>
+    <servlet-name>resteasy-servlet</servlet-name>
+    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+    <init-param>
+      <param-name>javax.ws.rs.Application</param-name>
+      <param-value>org.openecomp.mso.bpmn.gamma.workflow.service.WorkflowResourceApplication</param-value>
+    </init-param>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>resteasy-servlet</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>   
+       
+  <!--
+  <context-param>
+    <param-name>resteasy.scan</param-name>
+    <param-value>false</param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.scan.providers</param-name>
+    <param-value>true</param-value>
+  </context-param>
+  <context-param>
+    <param-name>resteasy.scan.resources</param-name>
+    <param-value>false</param-value>
+  </context-param>
+  -->  
+   <context-param>
+       <param-name>mso.configuration</param-name>
+       <param-value></param-value>
+  </context-param>
+
+  <context-param>
+    <param-name>log.configuration</param-name>
+    <param-value>logback.bpmn.xml</param-value>
+  </context-param>
+
+  <context-param>
+    <param-name>resteasy.resources</param-name>
+    <param-value>org.openecomp.mso.logger.MsoLoggingServlet,org.openecomp.mso.bpmn.core.HealthCheckHandler</param-value>
+  </context-param>
+  
+  <filter>
+    <filter-name>LogFilter</filter-name>
+    <filter-class>org.openecomp.mso.logger.LogFilter</filter-class>    
+  </filter>
+
+  <filter-mapping>
+    <filter-name>LogFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+       
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>HTTPBasicAuth</web-resource-name>
+      <description>Authentication for Client Apps</description>
+      <url-pattern>/workflow/*</url-pattern>
+      <http-method>GET</http-method>
+      <http-method>POST</http-method>
+    </web-resource-collection>
+    <auth-constraint>
+      <role-name>BPMN-Client</role-name>
+    </auth-constraint>
+  </security-constraint>
+
+  <login-config>
+       <auth-method>BASIC</auth-method>
+    <realm-name>ApplicationRealm</realm-name>
+  </login-config>
+
+  <security-role>
+    <role-name>BPMN-Client</role-name>
+  </security-role>
+       
+</web-app>
diff --git a/bpmn/MSORESTClient/pom.xml b/bpmn/MSORESTClient/pom.xml
new file mode 100644 (file)
index 0000000..97d9971
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       
+       <parent>
+               <groupId>org.openecomp.mso</groupId>
+               <artifactId>bpmn</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>MSORESTClient</artifactId>
+       
+       <packaging>jar</packaging>
+       
+       <name>MSO REST Client API</name>
+       
+       <dependencies>
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpmime</artifactId>
+                       <version>4.5</version>
+               </dependency>
+               <dependency>
+                       <groupId>com.metaparadigm</groupId>
+                       <artifactId>json-rpc</artifactId>
+                       <version>1.0</version>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-all</artifactId>
+                       <version>1.10.19</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
+       <build>
+       <finalName>MSORESTClient</finalName>
+                       <plugins>
+               <!--    <plugin>
+                       </plugin>    -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>3.1</version>
+                               <configuration>
+                                       <source>1.7</source>
+                                       <target>1.7</target>
+                               </configuration>
+                       </plugin>
+               </plugins>
+               
+       </build>
+</project>
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java
new file mode 100644 (file)
index 0000000..dfb9f36
--- /dev/null
@@ -0,0 +1,143 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.rest;
+
+import java.io.IOException;
+
+import org.apache.http.Header;
+import org.apache.http.HttpResponse;
+import org.apache.http.util.EntityUtils;
+
+/**
+ * An immutable class that encapsulates an API response.
+ * 
+ * @version 1.0
+ * @since 1.0
+ */
+public class APIResponse {
+    private final int statusCode;
+    private final byte[] responseBody;
+    private final HttpHeader[] headers;
+
+    /**
+     * Internal method used to create http headers using the specified
+     * HttpResponse object.
+     *
+     * @param httpResponse used to create headers
+     * @return http headers
+     */
+    private HttpHeader[] buildHeaders(final HttpResponse httpResponse) {
+        final Header[] headers = httpResponse.getAllHeaders();
+
+        HttpHeader[] httpHeaders = new HttpHeader[headers.length];
+        for (int i = 0; i < headers.length; ++i) {
+            final Header header = headers[i];
+            final String name = header.getName();
+            final String value = header.getValue(); 
+            final HttpHeader httpHeader = new HttpHeader(name, value);
+            httpHeaders[i] = httpHeader;
+        } 
+
+        return httpHeaders;
+    }
+
+    /**
+     * Create an APIResponse object using the specified HttpResponse object.
+     *
+     * @param httpResponse used to create the APIResponse
+     *
+     * @throws RESTException if unable to read from the HttpResponse object
+     */
+    public APIResponse(final HttpResponse httpResponse) throws RESTException {
+        try {
+            this.statusCode = httpResponse.getStatusLine().getStatusCode();
+
+            if (httpResponse.getEntity() == null)
+            {
+                this.responseBody = null;
+            }
+            else
+            {
+                this.responseBody = EntityUtils.toByteArray(httpResponse.getEntity());
+            }
+
+            this.headers = buildHeaders(httpResponse);
+        } catch (IOException ioe) {
+            throw new RESTException(ioe);
+        }
+    }
+
+    /**
+     * Gets the http status code returned by the api server.
+     * <p>
+     * For example, status code 200 represents 'OK.' 
+     *
+     * @return status code
+     */
+    public int getStatusCode() {
+        return this.statusCode;
+    }
+
+    /**
+     * Gets the http response body as a byte array.
+     *
+     * @return http response body
+     */
+    public byte[] getResponseBodyAsByteArray() {
+        return this.responseBody;
+    }
+
+    /**
+     * Gets the http response body as a string.
+     *
+     * @return http response body
+     */
+    public String getResponseBodyAsString() {
+        if (this.responseBody != null) {
+            return new String(this.responseBody);
+        } else {
+            return "";
+        }
+    }
+
+    /**
+     * Gets a list of all the headers returned by the API response.
+     *
+     * @return an array of all the HttpHeaders 
+     */
+    public HttpHeader[] getAllHeaders() {
+        // avoid exposing internals, create copy
+        HttpHeader[] copy = new HttpHeader[this.headers.length];
+        for (int i = 0; i < this.headers.length; ++i) {
+            copy[i] = headers[i];
+        }
+        return copy;
+    }
+
+    public String getFirstHeader(String name) {
+        for (HttpHeader header : headers) {
+            if (header.getName().equals(name)) {
+                return header.getValue();
+            }
+        }
+        return null;
+    }
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HostNameVerifier.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HostNameVerifier.java
new file mode 100644 (file)
index 0000000..f597fdf
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.rest;
+
+import javax.net.ssl.SSLException;
+
+import org.apache.http.conn.ssl.AbstractVerifier;
+
+/**
+ * @version 1.0
+ * Place holder to validate host name, for now just invokes the super class method
+ *
+ */
+public class HostNameVerifier extends AbstractVerifier {
+
+    public final void verify(
+            final String host,
+            final String[] cns,
+            final String[] subjectAlts) throws SSLException {
+       try {
+               verify(host, cns, subjectAlts, true);
+       } catch (SSLException sex) {
+               
+       }
+    }
+       
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java
new file mode 100644 (file)
index 0000000..e0d6c30
--- /dev/null
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.rest;
+
+/**
+ * An immutable class used to wrap an http header.
+ *
+ * @version 1.0
+ * @since 1.0
+ */
+public class HttpHeader {
+    private final String name;
+    private final String value;
+
+    /**
+     * Create an http header using the specified name and value
+     *
+     * @param name name of http header
+     * @param value value of http header
+     */
+    public HttpHeader(final String name, final String value) {
+        if (name == null) {
+            throw new IllegalArgumentException("Name may not be null.");
+        }
+
+        this.name = name;
+        this.value = value;
+    }
+
+    /**
+     * Gets the header name.
+     * 
+     * @return header name
+     */
+    public String getName() {
+        return this.name;
+    }
+
+    /**
+     * Gets the header value.
+     * 
+     * @return header value 
+     */
+    public String getValue() {
+        return this.value;
+    }
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
new file mode 100644 (file)
index 0000000..5c20004
--- /dev/null
@@ -0,0 +1,618 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.rest;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Set;
+
+import javax.net.ssl.SSLSocketFactory;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpHost;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPatch;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.http.message.AbstractHttpMessage;
+import org.apache.http.util.EntityUtils;
+
+/**
+ * Client used to send RESTFul requests.
+ * <p>
+ * Many of the methods return a reference to the 'this,' thereby allowing 
+ * method chaining. 
+ * <br>
+ * An example of usage can be found below:
+ * <pre>
+ * RESTClient client;
+ * try {
+ *     client = new RESTClient("http://www.openecomp.org");
+ *     APIResponse response = client
+ *         .setHeader("Accept", "application/json")
+ *         .setHeader("Clientid", "clientid")
+ *         .setHeader("header", "value")
+ *         .httpPost("postbody");
+ *     if (response.getStatusCode() == 200) {
+ *         System.out.println("Success!");
+ *     }
+ *  } catch (RESTException re) {
+ *      // Handle Exception
+ *  }
+ * </pre>
+ *
+ * @version 1.0
+ * @since 1.0
+ */
+public class RESTClient {
+    private final String proxyHost;
+    private final int proxyPort;
+
+    private final String URL;
+
+    private final LinkedHashMap<String, List<String>> headers;
+    private final LinkedHashMap<String, List<String>> parameters;
+    
+    private HttpEntity httpEntity;
+    private HttpClient unitTestClient;
+
+    /**
+     * Internal method used to build an APIResponse using the specified 
+     * HttpResponse object.
+     *
+     * @param response response wrapped inside an APIResponse object
+     * @return api response
+     */
+    private APIResponse buildResponse(HttpResponse response) 
+            throws RESTException {
+
+        return new APIResponse(response);
+    }
+
+    /**
+     * Used to release any resources used by the connection.
+     * @param response HttpResponse object used for releasing the connection
+     * @throws RESTException if unable to release connection
+     *
+     */
+    private void releaseConnection(HttpResponse response) throws RESTException {
+        try {
+            EntityUtils.consume(response.getEntity());
+        } catch (IOException ioe) {
+            throw new RESTException(ioe);
+        }
+    }
+
+    /**
+     * Sets headers to the http message.
+     *
+     * @param httpMsg http message to set headers for
+     */
+    private void addInternalHeaders(AbstractHttpMessage httpMsg) {
+        if (headers.isEmpty()) {
+            return;
+        }
+
+        final Set<String> keySet = headers.keySet();
+        for (final String key : keySet) {
+            final List<String> values = headers.get(key);
+            for (final String value : values) {
+                httpMsg.addHeader(key, value);
+            }
+        }
+    }
+
+    /**
+     * Builds the query part of a URL.
+     *
+     * @return query
+     */
+    private String buildQuery() {
+        if (this.parameters.size() == 0) {
+            return "";
+        }
+
+        StringBuilder sb = new StringBuilder();
+        String charSet = "UTF-8";
+        try {
+            Iterator<String> keyitr = this.parameters.keySet().iterator();
+            for (int i = 0; keyitr.hasNext(); ++i) {
+                if (i > 0) {
+                    sb.append("&");
+                }
+
+                final String name = keyitr.next();
+                final List<String> values = this.parameters.get(name);
+                for(final String value : values) {
+                    sb.append(URLEncoder.encode(name, charSet));
+                    sb.append("=");
+                    sb.append(URLEncoder.encode(value, charSet));
+                }
+            }
+        } catch (UnsupportedEncodingException e) {
+            // should not occur
+            e.printStackTrace();
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Creates an http client that can be used for sending http requests.
+     *
+     * @return created http client
+     *
+     * @throws RESTException if unable to create http client.
+     */
+    private CloseableHttpClient createClient() throws RESTException {
+        //TODO - we may want to trust self signed certificate at some point - add implementation here
+        HttpClientBuilder clientBuilder;
+
+               try {
+                       SSLConnectionSocketFactory sslSocketFactory = new SSLConnectionSocketFactory(
+                                       (SSLSocketFactory) SSLSocketFactory.getDefault(),
+                                       new HostNameVerifier());
+                       Registry<ConnectionSocketFactory> registry = RegistryBuilder
+                                       .<ConnectionSocketFactory> create()
+                                       .register("http",
+                                                       PlainConnectionSocketFactory.getSocketFactory())
+                                       .register("https", sslSocketFactory).build();
+                       PoolingHttpClientConnectionManager manager = new PoolingHttpClientConnectionManager(
+                                       registry);
+                       clientBuilder = HttpClientBuilder.create().setConnectionManager(
+                                       manager);
+               } catch (Exception ex) {
+                       throw new RESTException(ex.getMessage());
+               }
+               clientBuilder.disableRedirectHandling();
+
+               if ((this.proxyHost != null) && (this.proxyPort != -1)) {
+                       HttpHost proxy = new HttpHost(this.proxyHost, this.proxyPort);
+                       clientBuilder.setProxy(proxy);
+               }
+
+               return clientBuilder.build();
+    }
+
+    /**
+     * Creates a RESTClient with the specified URL, proxy host, and proxy port.
+     *
+     * @param URL URL to send request to
+     * @param proxyHost proxy host to use for sending request
+     * @param proxyPort proxy port to use for sendin request
+     *
+     * @throws RESTException if unable to create a RESTClient
+     */
+    public RESTClient(String URL, String proxyHost, int proxyPort)
+            throws RESTException {
+        this(new RESTConfig(URL, proxyHost, proxyPort));
+    }
+
+    /**
+     * Creates a RESTClient with the specified URL. No proxy host nor port will
+     * be used. 
+     *
+     * @param URL URL to send request to
+     *
+     * @throws RESTException if unable to create a RESTClient
+     */
+    public RESTClient(String URL) throws RESTException {
+        this(new RESTConfig(URL));
+    }
+    
+    /**
+     * Creates a RESTClient with the RESTConfig object.
+     *
+     * @param RESTConfig config to use for sending request
+     *
+     * @throws RESTException if unable to create a RESTClient
+     */
+    public RESTClient(RESTConfig cfg) throws RESTException {
+        this.headers = new LinkedHashMap<String, List<String>>();
+        this.parameters = new LinkedHashMap<String, List<String>>();
+        this.URL = cfg.getURL();
+        this.proxyHost = cfg.getProxyHost();
+        this.proxyPort = cfg.getProxyPort();
+    }
+
+    /**
+     * Adds parameter to be sent during http request.
+     * <p>
+     * Does not remove any parameters with the same name, thus allowing 
+     * duplicates.
+     *
+     * @param name name of parameter
+     * @param value value of parametr
+     * @return a reference to 'this', which can be used for method chaining
+     */
+    public RESTClient addParameter(String name, String value) {
+        if (!parameters.containsKey(name)) {
+            parameters.put(name, new ArrayList<String>());
+        }
+
+        List<String> values = parameters.get(name);
+        values.add(value);
+
+        return this;
+    }
+
+    /**
+     * Sets parameter to be sent during http request.
+     * <p>
+     * Removes any parameters with the same name, thus disallowing duplicates.
+     *
+     * @param name name of parameter
+     * @param value value of parametr
+     * @return a reference to 'this', which can be used for method chaining
+     */
+    public RESTClient setParameter(String name, String value) {
+        if (parameters.containsKey(name)) {
+            parameters.get(name).clear();
+        }
+
+        addParameter(name, value);
+
+        return this;
+    }
+
+    /**
+     * Adds http header to be sent during http request.
+     * <p>
+     * Does not remove any headers with the same name, thus allowing 
+     * duplicates.
+     *
+     * @param name name of header 
+     * @param value value of header 
+     * @return a reference to 'this', which can be used for method chaining
+     */
+    public RESTClient addHeader(String name, String value) {
+        if (!headers.containsKey(name)) {
+            headers.put(name, new ArrayList<String>());
+        }
+
+        List<String> values = headers.get(name);
+        values.add(value);
+
+        return this;
+    }
+
+    /**
+     * Sets http header to be sent during http request.
+     * <p>
+     * Does not remove any headers with the same name, thus allowing 
+     * duplicates.
+     *
+     * @param name name of header 
+     * @param value value of header 
+     * @return a reference to 'this', which can be used for method chaining
+     */
+    public RESTClient setHeader(String name, String value) {
+        if (headers.containsKey(name)) {
+            headers.get(name).clear();
+        }
+
+        addHeader(name, value);
+
+        return this;
+    }
+    
+    /**
+     * Convenience method for adding the authorization header using the 
+     * specified OAuthToken object.
+     *
+     * @param token token to use for setting authorization
+     * @return a reference to 'this,' which can be used for method chaining
+     */
+    public RESTClient addAuthorizationHeader(String token) {
+        this.addHeader("Authorization", token);
+        return this;
+    }
+
+    /**
+     * Alias for httpGet().
+     *
+     * @see RESTClient#httpGet()
+     */
+    public APIResponse get() throws RESTException {
+        return httpGet();
+    }
+
+    /**
+     * Sends an http GET request using the parameters and headers previously
+     * set.
+     *
+     * @return api response
+     *
+     * @throws RESTException if request was unsuccessful
+     */
+    public APIResponse httpGet() throws RESTException {
+        HttpResponse response = null;
+
+        try (CloseableHttpClient httpClient = createClient()) {
+            String query = "";
+            if (!buildQuery().equals("")) {
+                query = "?" + buildQuery();
+            }
+            HttpGet httpGet = new HttpGet(this.getURL() + query);
+            addInternalHeaders(httpGet);
+
+            response = httpClient.execute(httpGet);
+
+            APIResponse apiResponse = buildResponse(response);
+            return apiResponse;
+        } catch (IOException ioe) {
+            throw new RESTException(ioe);
+        } finally {
+            if (response != null) {
+                this.releaseConnection(response);
+            }
+        }
+    }
+
+    /**
+     * Alias for httpPost()
+     *
+     * @see RESTClient#httpPost()
+     */
+    public APIResponse post() throws RESTException {
+        return httpPost();
+    }
+
+    /**
+     * Sends an http POST request.
+     * <p>
+     * POST body will be set to the values set using add/setParameter()
+     *
+     * @return api response
+     *
+     * @throws RESTException if POST was unsuccessful
+     */
+    public APIResponse httpPost() throws RESTException {
+            APIResponse response = httpPost(buildQuery()); 
+            return response;
+    }
+
+    /**
+     * Sends an http POST request using the specified body.
+     *
+     * @return api response
+     *
+     * @throws RESTException if POST was unsuccessful
+     */
+    public APIResponse httpPost(String body) throws RESTException {
+        HttpResponse response = null;
+        try (CloseableHttpClient httpClient = createClient()) {
+            HttpPost httpPost = new HttpPost(this.getURL());
+            addInternalHeaders(httpPost);
+            if (body != null && !body.equals("")) {
+                httpEntity = new StringEntity(body);
+                httpPost.setEntity(new StringEntity(body));
+            }
+
+            response = httpClient.execute(httpPost);
+
+            return buildResponse(response);
+        } catch (IOException e) {
+            throw new RESTException(e);
+        } finally {
+            if (response != null) {
+                this.releaseConnection(response);
+            }
+        }
+    }
+
+    /**
+     * 
+     * @param body Data to PUT
+     * @return API response
+     * @throws RESTException 
+     */
+    public APIResponse httpPut(String body) throws RESTException {
+        HttpResponse response = null;
+        try (CloseableHttpClient httpClient = createClient()) {
+
+            String query = "";
+            if (!buildQuery().equals("")) {
+                query = "?" + buildQuery();
+            }
+            HttpPut httpPut = new HttpPut(this.getURL() + query);
+            addInternalHeaders(httpPut);
+            if (body != null && !body.equals("")) {
+                httpEntity = new StringEntity(body);
+                httpPut.setEntity(httpEntity);
+            }
+
+            response = httpClient.execute(httpPut);
+
+            return buildResponse(response);
+        } catch (IOException e) {
+            throw new RESTException(e);
+        } finally {
+            if (response != null) {
+                this.releaseConnection(response);
+            }
+        }
+    }
+
+    /**
+     * Alias for httpPatch().
+     *
+     * @see RESTClient#httpPatch()
+     */
+    public APIResponse patch(String body) throws RESTException {
+        return httpPatch(body);
+    }
+
+    /**
+     * 
+     * @param body Data to PATCH
+     * @return API response
+     * @throws RESTException 
+     */
+    public APIResponse httpPatch(String body) throws RESTException {
+        HttpResponse response = null;
+        try (CloseableHttpClient httpClient = createClient()) {
+            String query = "";
+            if (!buildQuery().equals("")) {
+                query = "?" + buildQuery();
+            }
+            HttpPatch httpPatch = new HttpPatch(this.getURL() + query);
+            addInternalHeaders(httpPatch);
+            if (body != null && !body.equals("")) {
+                httpEntity = new StringEntity(body);
+                httpPatch.setEntity(httpEntity);
+            }
+
+            response = httpClient.execute(httpPatch);
+
+            return buildResponse(response);
+        } catch (IOException e) {
+            throw new RESTException(e);
+        } finally {
+            if (response != null) {
+                this.releaseConnection(response);
+            }
+        }
+    }
+
+    /**
+     * Alias for httpDelete().
+     *
+     * @see RESTClient#httpDelete()
+     */
+    public APIResponse delete() throws RESTException {
+        return httpDelete();
+    }
+
+    /**
+     * Sends an http DELETE request using the parameters and headers previously
+     * set.
+     *
+     * @return api response
+     *
+     * @throws RESTException if request was unsuccessful
+     */
+    public APIResponse httpDelete() throws RESTException {
+       return httpDelete(null);
+    }
+
+    /**
+     * Sends an http DELETE request with a body, using the parameters and headers
+     * previously set.
+     *
+     * @return api response
+     *
+     * @throws RESTException if request was unsuccessful
+     */
+    public APIResponse httpDelete(String body) throws RESTException {
+        HttpResponse response = null;
+
+        try (CloseableHttpClient httpClient = createClient()){
+
+            String query = "";
+            if (!buildQuery().equals("")) {
+                query = "?" + buildQuery();
+            }
+            HttpDeleteWithBody httpDelete = new HttpDeleteWithBody(this.getURL() + query);
+            addInternalHeaders(httpDelete);
+            if (body != null && !body.equals("")) {
+                httpEntity = new StringEntity(body);
+                httpDelete.setEntity(httpEntity);
+            }
+
+            response = httpClient.execute(httpDelete);
+
+            APIResponse apiResponse = buildResponse(response);
+            return apiResponse;
+        } catch (IOException ioe) {
+            throw new RESTException(ioe);
+        } finally {
+            if (response != null) {
+                this.releaseConnection(response);
+            }
+        }
+    }
+
+    public String getURL() {
+        return URL;
+    }
+    public LinkedHashMap<String,List<String>> getHeaders() {
+        return headers;
+    }
+    public LinkedHashMap<String,List<String>> getParameters() {
+        return parameters;
+    }
+    public HttpEntity getHttpEntity() {
+        return httpEntity;
+    }
+
+       public HttpClient getUnitTestClient() {
+               return unitTestClient;
+       }
+
+       public void setUnitTestClient(HttpClient unitTestClient) {
+               this.unitTestClient = unitTestClient;
+       }    
+       
+       /**
+        * Allows inclusion of a request body with DELETE.
+        */
+       private class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
+           public static final String METHOD_NAME = "DELETE";
+        
+           public String getMethod() {
+               return METHOD_NAME;
+           }
+        
+           public HttpDeleteWithBody(final String uri) {
+               super();
+               setURI(URI.create(uri));
+           }
+        
+           public HttpDeleteWithBody(final URI uri) {
+               super();
+               setURI(uri);
+           }
+        
+           public HttpDeleteWithBody() {
+               super();
+           }
+       }
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTConfig.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTConfig.java
new file mode 100644 (file)
index 0000000..a668506
--- /dev/null
@@ -0,0 +1,131 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.rest;
+
+/**
+ * Configuration values to be used by the RESTClient.
+ *
+ * @version 1.0
+ *
+ */
+public class RESTConfig {
+    private final String URL;
+
+    private final boolean trustAllCerts;
+    private final String proxyHost;
+    private final int proxyPort;
+
+    /**
+     * Creates a RESTConfig with the specified URL.
+     * <p>
+     * By default, no proxy will be used, and only valid certificates will
+     * be used.
+     *
+     * @param URL url to set
+     */
+    public RESTConfig(final String URL) {
+        this(URL, null, -1, false);
+    }
+
+    /**
+     * Creates a RESTConfig with the specified URL and whether to trust all
+     * certificates.
+     * <p>
+     * Trusting all certificates is useful for testing self-signed
+     * certificates. By default, no proxy will be used.
+     *
+     * @param URL url to set
+     * @param trustAllCerts whether to trust all certificates
+     */
+    public RESTConfig(final String URL, final boolean trustAllCerts) {
+        this(URL, null, -1, trustAllCerts);
+    }
+    
+    /**
+     * Creates a RESTConfig with the specified URL and proxy.
+     * <p>
+     * By default, only valid certificates will be allowed.
+     *
+     * @param URL url to set
+     * @param proxyHost proxy host to set 
+     * @param proxyPort proxy port to set
+     */
+    public RESTConfig(final String URL, final String proxyHost, 
+            final int proxyPort) {
+
+        this(URL, proxyHost, proxyPort, false);
+    }
+
+    /**
+     * Creates a RESTConfig object with the specified URL, proxy host, proxy
+     * port, and whether to trust all certificates. Allowing all certificates
+     * is useful for testing self-signed certificates.
+     *
+     * @param URL url to set
+     * @param proxyHost proxy host to set
+     * @param proxyPort porxy port to set
+     * @param trustAllCerts whether to trust all certificates
+     */
+    public RESTConfig(final String URL, final String proxyHost, 
+            final int proxyPort, boolean trustAllCerts) {
+        
+        this.URL = URL;
+        this.proxyHost = proxyHost;
+        this.proxyPort = proxyPort;
+        this.trustAllCerts = trustAllCerts;
+    }
+
+    /**
+     * Gets the URL to use.
+     *
+     * @return URL to use
+     */
+    public String getURL() {
+        return this.URL;
+    }
+
+    /**
+     * Gets whether to trust all certificates.
+     * 
+     * @return true if to trust all certificates, false otherwise
+     */
+    public boolean trustAllCerts() {
+        return this.trustAllCerts;
+    }
+    
+    /**
+     * Gets proxy host or null if proxy host has not been set.
+     *
+     * @return proxy host
+     */
+    public String getProxyHost() {
+        return this.proxyHost;
+    }
+
+    /**
+     * Gets proxy port or -1 if no proxy port has been set.
+     *
+     * @return proxy port
+     */
+    public int getProxyPort() {
+        return this.proxyPort;
+    }
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTException.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTException.java
new file mode 100644 (file)
index 0000000..1c28aa1
--- /dev/null
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.rest;
+
+/**
+ * A custom exception class. 
+ *
+ * @version 1.0
+ *
+ */
+public class RESTException extends Exception {
+    private static final long serialVersionUID = -6874042744590915838L;
+    // http status code
+    private final int statusCode;
+
+    // error message
+    private final String errorMessage;
+    
+    /**
+     * {@inheritDoc}
+     * @see Exception#RESTException(String)
+     */
+    public RESTException(final String errorMessage) {
+        this(-1, errorMessage);
+    }
+
+    /**
+     * {@inheritDoc}
+     * @see Exception#RESTException(Throwable)
+     */
+    public RESTException(final Throwable cause) {
+        super(cause);
+        this.statusCode = -1;
+        this.errorMessage = cause.getMessage();
+    }
+
+    /**
+     * Creates a RESTException with the specified status code and error 
+     * message.
+     *
+     * @param statusCode http status code
+     * @param errorMessage http error message
+     */
+    public RESTException(final int statusCode, final String errorMessage) {
+        super(statusCode + ":" + errorMessage);
+        this.statusCode = statusCode;
+        this.errorMessage = errorMessage;
+    }
+
+    /**
+     * Gets the status code or -1 if none has been set.
+     *
+     * @return status code
+     */
+    public int getStatusCode() {
+        return this.statusCode;
+    }
+
+    /**
+     * Gets the error message.
+     *
+     * @return error message
+     */
+    public String getErrorMessage() {
+        return this.errorMessage; 
+    }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
new file mode 100644 (file)
index 0000000..87a3f47
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:46:25 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.util.Locale;
+import org.apache.http.HttpResponse;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.ReasonPhraseCatalog;
+import org.apache.http.StatusLine;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.EnglishReasonPhraseCatalog;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class APIResponseESTest extends APIResponseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "Uc");
+      basicHttpResponse0.addHeader("Uc", "org.apache.http.entity.ContentType");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      assertEquals(0, aPIResponse0.getStatusCode());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      int int0 = aPIResponse0.getStatusCode();
+      assertEquals(1471, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      ProtocolVersion protocolVersion0 = mock(ProtocolVersion.class, new ViolatedAssumptionAnswer());
+      StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
+      doReturn(protocolVersion0).when(statusLine0).getProtocolVersion();
+      doReturn("Gi|Heay:?O.-\7fPvSJFp").when(statusLine0).getReasonPhrase();
+      doReturn((-1730834464), (-1730834464)).when(statusLine0).getStatusCode();
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse(statusLine0);
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      int int0 = aPIResponse0.getStatusCode();
+      assertEquals((-1730834464), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+      byte[] byteArray0 = new byte[3];
+      ByteArrayEntity byteArrayEntity0 = new ByteArrayEntity(byteArray0);
+      basicHttpResponse0.setEntity(byteArrayEntity0);
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      byte[] byteArray1 = aPIResponse0.getResponseBodyAsByteArray();
+      assertFalse(byteArray1.equals((Object)byteArray0));
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      ProtocolVersion protocolVersion0 = new ProtocolVersion("", 548, 548);
+      BasicStatusLine basicStatusLine0 = new BasicStatusLine(protocolVersion0, 1196, " len: ");
+      EnglishReasonPhraseCatalog englishReasonPhraseCatalog0 = EnglishReasonPhraseCatalog.INSTANCE;
+      Locale locale0 = Locale.ITALY;
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((StatusLine) basicStatusLine0, (ReasonPhraseCatalog) englishReasonPhraseCatalog0, locale0);
+      StringEntity stringEntity0 = new StringEntity("");
+      basicHttpResponse0.setEntity(stringEntity0);
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      byte[] byteArray0 = aPIResponse0.getResponseBodyAsByteArray();
+      assertArrayEquals(new byte[] {}, byteArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "'");
+      basicHttpResponse0.addHeader("'", "'");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      String string0 = aPIResponse0.getFirstHeader("'");
+      assertEquals("'", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      APIResponse aPIResponse0 = null;
+      try {
+        aPIResponse0 = new APIResponse((HttpResponse) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.rest.APIResponse", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      ProtocolVersion protocolVersion0 = new ProtocolVersion("=", 1, 2);
+      BasicStatusLine basicStatusLine0 = new BasicStatusLine(protocolVersion0, 1, "=");
+      EnglishReasonPhraseCatalog englishReasonPhraseCatalog0 = EnglishReasonPhraseCatalog.INSTANCE;
+      Locale locale0 = Locale.UK;
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((StatusLine) basicStatusLine0, (ReasonPhraseCatalog) englishReasonPhraseCatalog0, locale0);
+      basicHttpResponse0.setStatusLine(protocolVersion0, 1);
+      APIResponse aPIResponse0 = null;
+      try {
+        aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Unknown category for status code 1
+         //
+         verifyException("org.apache.http.util.Args", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
+      basicHttpResponse0.addHeader("", "");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      String string0 = aPIResponse0.getFirstHeader(",n6_`^Oyzn6YprnX");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
+      basicHttpResponse0.addHeader("", "");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      String string0 = aPIResponse0.getFirstHeader("");
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
+      basicHttpResponse0.addHeader("", "");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      HttpHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
+      assertNotNull(httpHeaderArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      HttpHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
+      assertNotNull(httpHeaderArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "c");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      String string0 = aPIResponse0.getResponseBodyAsString();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+      byte[] byteArray0 = new byte[3];
+      ByteArrayEntity byteArrayEntity0 = new ByteArrayEntity(byteArray0);
+      basicHttpResponse0.setEntity(byteArrayEntity0);
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      String string0 = aPIResponse0.getResponseBodyAsString();
+      assertEquals("\u0000\u0000\u0000", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "c");
+      basicHttpResponse0.addHeader("c", "c");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      aPIResponse0.getResponseBodyAsString();
+      basicHttpResponse0.getStatusLine();
+      aPIResponse0.getStatusCode();
+      HttpHeader[] httpHeaderArray0 = new HttpHeader[2];
+      HttpHeader httpHeader0 = mock(HttpHeader.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(httpHeader0).getName();
+      httpHeaderArray0[0] = httpHeader0;
+      HttpHeader httpHeader1 = mock(HttpHeader.class, new ViolatedAssumptionAnswer());
+      httpHeaderArray0[1] = httpHeader1;
+      PrivateAccess.setVariable((Class<APIResponse>) APIResponse.class, aPIResponse0, "headers", (Object) httpHeaderArray0);
+      // Undeclared exception!
+      try { 
+        aPIResponse0.getFirstHeader("");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
+      APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
+      byte[] byteArray0 = aPIResponse0.getResponseBodyAsByteArray();
+      assertNull(byteArray0);
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..59f09a0
--- /dev/null
@@ -0,0 +1,140 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:46:25 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class APIResponseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.APIResponse"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(APIResponseESTestscaffolding.class.getClassLoader() ,
+      "org.apache.http.HttpVersion",
+      "org.apache.http.message.BasicNameValuePair",
+      "org.apache.http.message.HeaderGroup",
+      "org.apache.http.message.HeaderValueParser",
+      "org.apache.http.message.BasicStatusLine",
+      "org.apache.http.message.BasicHeaderValueParser",
+      "org.apache.http.message.BasicLineFormatter",
+      "org.apache.http.entity.ByteArrayEntity",
+      "org.apache.http.Header",
+      "org.apache.http.StatusLine",
+      "org.apache.http.util.EntityUtils",
+      "org.apache.http.message.BasicHttpResponse",
+      "org.apache.http.FormattedHeader",
+      "org.apache.http.RequestLine",
+      "org.apache.http.HttpMessage",
+      "org.apache.http.message.AbstractHttpMessage",
+      "org.apache.http.Consts",
+      "org.apache.http.protocol.HTTP",
+      "org.apache.http.util.ByteArrayBuffer",
+      "org.apache.http.ParseException",
+      "org.apache.http.HeaderIterator",
+      "org.apache.http.entity.AbstractHttpEntity",
+      "org.openecomp.mso.rest.RESTException",
+      "org.apache.http.util.Args",
+      "org.apache.http.ReasonPhraseCatalog",
+      "org.apache.http.HttpEntity",
+      "org.apache.http.entity.ContentType",
+      "org.apache.http.message.LineFormatter",
+      "org.apache.http.entity.StringEntity",
+      "org.openecomp.mso.rest.HttpHeader",
+      "org.apache.http.HeaderElement",
+      "org.apache.http.message.BufferedHeader",
+      "org.openecomp.mso.rest.APIResponse",
+      "org.apache.http.util.CharArrayBuffer",
+      "org.apache.http.ProtocolVersion",
+      "org.apache.http.util.TextUtils",
+      "org.apache.http.impl.EnglishReasonPhraseCatalog",
+      "org.apache.http.params.HttpParams",
+      "org.apache.http.message.BasicHeader",
+      "org.apache.http.HttpResponse",
+      "org.apache.http.NameValuePair",
+      "org.apache.http.message.ParserCursor"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(APIResponseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.apache.http.message.HeaderGroup",
+      "org.apache.http.ProtocolVersion",
+      "org.apache.http.message.BasicStatusLine",
+      "org.apache.http.message.BasicLineFormatter",
+      "org.apache.http.util.CharArrayBuffer",
+      "org.apache.http.HttpVersion",
+      "org.apache.http.impl.EnglishReasonPhraseCatalog",
+      "org.apache.http.message.BasicHeader",
+      "org.apache.http.message.BasicHeaderValueParser",
+      "org.apache.http.Consts",
+      "org.apache.http.protocol.HTTP",
+      "org.apache.http.message.BasicNameValuePair",
+      "org.apache.http.message.BufferedHeader",
+      "org.apache.http.ParseException",
+      "org.apache.http.entity.AbstractHttpEntity",
+      "org.apache.http.util.ByteArrayBuffer",
+      "org.apache.http.entity.ContentType"
+    );
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
new file mode 100644 (file)
index 0000000..2104349
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:47:07 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HttpHeaderESTest extends HttpHeaderESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      HttpHeader httpHeader0 = new HttpHeader("Fw", "WD#>QF/v6_|_A");
+      String string0 = httpHeader0.getValue();
+      assertEquals("WD#>QF/v6_|_A", string0);
+      assertEquals("Fw", httpHeader0.getName());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      HttpHeader httpHeader0 = new HttpHeader("", "");
+      String string0 = httpHeader0.getValue();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      HttpHeader httpHeader0 = new HttpHeader("Nae may no be null.", "Nae may no be null.");
+      PrivateAccess.setVariable((Class<HttpHeader>) HttpHeader.class, httpHeader0, "name", (Object) null);
+      String string0 = httpHeader0.getName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      HttpHeader httpHeader0 = new HttpHeader("", "EIqJp");
+      String string0 = httpHeader0.getName();
+      assertEquals("EIqJp", httpHeader0.getValue());
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      HttpHeader httpHeader0 = null;
+      try {
+        httpHeader0 = new HttpHeader((String) null, (String) null);
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Name may not be null.
+         //
+         verifyException("org.openecomp.mso.rest.HttpHeader", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      HttpHeader httpHeader0 = new HttpHeader("Nae may no be null.", "Nae may no be null.");
+      String string0 = httpHeader0.getName();
+      assertEquals("Nae may no be null.", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      HttpHeader httpHeader0 = new HttpHeader("|SJ`pSz:BCB1o8~", (String) null);
+      String string0 = httpHeader0.getValue();
+      assertNull(string0);
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
new file mode 100644 (file)
index 0000000..e59f7da
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:47:07 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class HttpHeaderESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.HttpHeader"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HttpHeaderESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.rest.HttpHeader"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTest.java
new file mode 100644 (file)
index 0000000..1a9e05a
--- /dev/null
@@ -0,0 +1,1068 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:49:09 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.io.InputStream;
+import java.util.LinkedHashMap;
+import java.util.List;
+import org.apache.http.Header;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.StatusLine;
+import org.apache.http.client.HttpClient;
+import org.apache.http.entity.InputStreamEntity;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RESTClientESTest extends RESTClientESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException");
+      HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(httpClient0).toString();
+      doReturn((HttpResponse) null).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
+      rESTClient0.setUnitTestClient(httpClient0);
+      // Undeclared exception!
+      try { 
+        rESTClient0.patch("<;xR");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.rest.APIResponse", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      RESTConfig rESTConfig0 = mock(RESTConfig.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(rESTConfig0).getProxyHost();
+      doReturn(0).when(rESTConfig0).getProxyPort();
+      doReturn((String) null).when(rESTConfig0).getURL();
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(httpClient0).toString();
+      rESTClient0.setUnitTestClient(httpClient0);
+      HttpClient httpClient1 = rESTClient0.getUnitTestClient();
+      assertSame(httpClient1, httpClient0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient((String) null, "Jhhlq!Y8o>CaA", (-3767));
+      String string0 = rESTClient0.getURL();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("", "=&http.request_sent=http.request_sent", 783, true);
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      String string0 = rESTClient0.getURL();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("http");
+      RESTClient rESTClient1 = rESTClient0.setParameter("http", "http");
+      LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient1.getParameters();
+      assertEquals(1, linkedHashMap0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
+      RESTClient rESTClient1 = rESTClient0.setHeader(",%LX:SC+'3!nt", ",[o<:aGQK");
+      LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient1.getHeaders();
+      assertEquals(1, linkedHashMap0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("");
+      InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
+      InputStreamEntity inputStreamEntity0 = new InputStreamEntity(inputStream0);
+      StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
+      doReturn(0).when(statusLine0).getStatusCode();
+      HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
+      doReturn(inputStreamEntity0, (HttpEntity) null, (HttpEntity) null).when(httpResponse0).getEntity();
+      doReturn(statusLine0).when(httpResponse0).getStatusLine();
+      HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      doReturn("Q[z^W").when(httpClient0).toString();
+      doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
+      rESTClient0.setUnitTestClient(httpClient0);
+      HttpClient httpClient1 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        rESTClient0.post();
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Entity may not be null
+         //
+         verifyException("org.apache.http.util.Args", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("");
+      RESTClient rESTClient1 = rESTClient0.setParameter((String) null, "7%d/ia+s(I~@<PK");
+      // Undeclared exception!
+      try { 
+        rESTClient1.post();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      RESTConfig rESTConfig0 = mock(RESTConfig.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(rESTConfig0).getProxyHost();
+      doReturn(0).when(rESTConfig0).getProxyPort();
+      doReturn((String) null).when(rESTConfig0).getURL();
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      // Undeclared exception!
+      try { 
+        rESTClient0.post();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("UTF-8");
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      RESTClient rESTClient1 = rESTClient0.addParameter((String) null, "");
+      // Undeclared exception!
+      try { 
+        rESTClient1.patch("DELETE");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("!{usNmLQ_Gt.C_98");
+      // Undeclared exception!
+      try { 
+        rESTClient0.patch("https");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in path at index 1: !{usNmLQ_Gt.C_98
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("");
+      rESTClient0.addParameter("", (String) null);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPut("");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/", (-697));
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPut("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in path at index 11: szM4DVVoiAs`]T/
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient((String) null);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost(" I3^~h5yoFuif");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("&", false);
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      rESTClient0.setHeader((String) null, "/G$0vW$R4vUaL)*tz");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost("/G$0vW$R4vUaL)*tz");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Header name may not be null
+         //
+         verifyException("org.apache.http.util.Args", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("oO!CF58JhSCm6t");
+      rESTClient0.addParameter((String) null, "oO!CF58JhSCm6t");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient((String) null, "F(Oy=<SOmNE9", (-1932735280));
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("JAl/&Uq6mM8Kf8", false);
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost();
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("\7f&8\7fjW\"", "\7f&8\7fjW\"", (-1));
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost();
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in path at index 0: \7f&8\7fjW\"
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient(")7l9={q>0E4sV]T");
+      RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ")7l9={q>0E4sV]T");
+      // Undeclared exception!
+      try { 
+        rESTClient1.httpPatch((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("[59t(J)");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPatch("[59t(J)");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in path at index 0: [59t(J)
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("A29%23fZqv%7F*%405=%7F%7Frdbt-X%22DB%2FhCrUn", "=", (-1));
+      HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(httpClient0).toString();
+      doReturn((HttpResponse) null).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
+      rESTClient0.setUnitTestClient(httpClient0);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpGet();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.rest.APIResponse", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("\7f*;R");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpGet();
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in path at index 0: \7f*;R
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("compatibility");
+      RESTClient rESTClient1 = rESTClient0.addParameter("https", "https");
+      RESTClient rESTClient2 = rESTClient1.setHeader("compatibility", "https");
+      RESTClient rESTClient3 = rESTClient2.setParameter("4#'mD<\"jNh?>_vfI:]", "Char array buffer");
+      InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
+      InputStreamEntity inputStreamEntity0 = new InputStreamEntity(inputStream0);
+      StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
+      doReturn(0).when(statusLine0).getStatusCode();
+      rESTClient3.addHeader("2b?N", "https");
+      HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
+      doReturn(inputStreamEntity0, (HttpEntity) null, (HttpEntity) null).when(httpResponse0).getEntity();
+      doReturn(statusLine0).when(httpResponse0).getStatusLine();
+      HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      doReturn("GiQ=e\7fHBwH9zA4COa").when(httpClient0).toString();
+      doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
+      rESTClient2.setUnitTestClient(httpClient0);
+      // Undeclared exception!
+      try { 
+        rESTClient3.httpDelete("");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Entity may not be null
+         //
+         verifyException("org.apache.http.util.Args", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient(")TZ;T]b%B[FkT4", "%y@{Wz}c3J-!m", 1772);
+      RESTClient rESTClient1 = rESTClient0.addParameter("$y*O^k0", (String) null);
+      // Undeclared exception!
+      try { 
+        rESTClient1.httpDelete((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("Length Required");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpDelete("Length Required");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in path at index 6: Length Required
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("yhPl=c#;<s`V", false);
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      rESTClient0.addParameter("yhPl=c#;<s`V", (String) null);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpDelete();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("2cSq'/FF]W'K.S^k=<=", "2cSq'/FF]W'K.S^k=<=", 2605);
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpDelete();
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in path at index 8: 2cSq'/FF]W'K.S^k=<=
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient(")7l9={q>0E4sV]T");
+      RESTClient rESTClient1 = rESTClient0.addParameter((String) null, ")7l9={q>0E4sV]T");
+      // Undeclared exception!
+      try { 
+        rESTClient1.get();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("z8UR?=)5pTtS]*");
+      // Undeclared exception!
+      try { 
+        rESTClient0.get();
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("JB<\7fTRwDR@k.-C$=w3", "|N", 0);
+      // Undeclared exception!
+      try { 
+        rESTClient0.get();
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in path at index 2: JB<\7fTRwDR@k.-C$=w3
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("YoeLljo%3A%5C%3D=http", "http.protocol.element-charset", (-1908874351));
+      RESTClient rESTClient1 = rESTClient0.setParameter("I/O exception (", (String) null);
+      // Undeclared exception!
+      try { 
+        rESTClient1.delete();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URLEncoder", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("\":VYxeR;PP]jO_[f'");
+      // Undeclared exception!
+      try { 
+        rESTClient0.delete();
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Illegal character in scheme name at index 0: \":VYxeR;PP]jO_[f'
+         //
+         verifyException("java.net.URI", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      RESTClient rESTClient0 = null;
+      try {
+        rESTClient0 = new RESTClient((RESTConfig) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.rest.RESTClient", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("");
+      rESTClient0.addParameter("", "");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPatch("lr");
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("", "netscape", 1);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost("");
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig((String) null);
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpGet();
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test37()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("K.7:dc=", "K.7:dc=", 0);
+      try { 
+        rESTClient0.httpPost();
+        fail("Expecting exception: Exception");
+      
+      } catch(Exception e) {
+         //
+         // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: K.7:dc=
+         //
+         verifyException("org.openecomp.mso.rest.RESTClient", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test38()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException=", "EWh2BZ[]:q+%4S#7K", (-1847));
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpDelete();
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test39()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
+      String string0 = rESTClient0.getURL();
+      assertEquals(",%LX:SC+'3!nt", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test40()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("compatibility");
+      InputStream inputStream0 = mock(InputStream.class, new ViolatedAssumptionAnswer());
+      doReturn((-3113)).when(inputStream0).read(any(byte[].class));
+      HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
+      doReturn(201).when(statusLine0).getStatusCode();
+      HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      doReturn(inputStream0).when(httpEntity1).getContent();
+      doReturn(0L, (long)(-2116360694)).when(httpEntity1).getContentLength();
+      HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      doReturn(false).when(httpEntity2).isStreaming();
+      HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
+      doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
+      doReturn(statusLine0).when(httpResponse0).getStatusLine();
+      HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      doReturn("GiQ=e\7fHBwH9zA4COa").when(httpClient0).toString();
+      doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
+      rESTClient0.setUnitTestClient(httpClient0);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpDelete("");
+        fail("Expecting exception: IndexOutOfBoundsException");
+      
+      } catch(IndexOutOfBoundsException e) {
+         //
+         // off: 0 len: -3113 b.length: 4096
+         //
+         verifyException("org.apache.http.util.ByteArrayBuffer", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test41()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("compatibility");
+      HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
+      doReturn(201).when(statusLine0).getStatusCode();
+      Header[] headerArray0 = new Header[0];
+      HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      doReturn((InputStream) null).when(httpEntity1).getContent();
+      HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      doReturn(false).when(httpEntity2).isStreaming();
+      HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
+      doReturn(headerArray0).when(httpResponse0).getAllHeaders();
+      doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
+      doReturn(statusLine0).when(httpResponse0).getStatusLine();
+      HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      doReturn("GiQ=e\7fHBwH9zA4COa").when(httpClient0).toString();
+      doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
+      rESTClient0.setUnitTestClient(httpClient0);
+      APIResponse aPIResponse0 = rESTClient0.httpDelete("");
+      assertEquals(201, aPIResponse0.getStatusCode());
+  }
+
+  @Test(timeout = 4000)
+  public void test42()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("wlq:6r");
+      try { 
+        rESTClient0.httpDelete("E");
+        fail("Expecting exception: Exception");
+      
+      } catch(Exception e) {
+         //
+         // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: wlq:6r
+         //
+         verifyException("org.openecomp.mso.rest.RESTClient", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test43()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPatch("");
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test44()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("DELETE");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPatch((String) null);
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test45()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("org.apache.http.ParseException");
+      RESTClient rESTClient1 = rESTClient0.addParameter("DELETE", "");
+      // Undeclared exception!
+      try { 
+        rESTClient1.patch("<;xR");
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test46()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("compatibility");
+      HttpEntity httpEntity0 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      StatusLine statusLine0 = mock(StatusLine.class, new ViolatedAssumptionAnswer());
+      doReturn(201).when(statusLine0).getStatusCode();
+      Header[] headerArray0 = new Header[0];
+      HttpEntity httpEntity1 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      doReturn((InputStream) null).when(httpEntity1).getContent();
+      HttpEntity httpEntity2 = mock(HttpEntity.class, new ViolatedAssumptionAnswer());
+      doReturn(false).when(httpEntity2).isStreaming();
+      HttpResponse httpResponse0 = mock(HttpResponse.class, new ViolatedAssumptionAnswer());
+      doReturn(headerArray0).when(httpResponse0).getAllHeaders();
+      doReturn(httpEntity0, httpEntity1, httpEntity2).when(httpResponse0).getEntity();
+      doReturn(statusLine0).when(httpResponse0).getStatusLine();
+      HttpClient httpClient0 = mock(HttpClient.class, new ViolatedAssumptionAnswer());
+      doReturn("GiQ=e\7fHBwH9zA4COa").when(httpClient0).toString();
+      doReturn(httpResponse0).when(httpClient0).execute(any(org.apache.http.client.methods.HttpUriRequest.class));
+      rESTClient0.setUnitTestClient(httpClient0);
+      APIResponse aPIResponse0 = rESTClient0.httpPut("compatibility");
+      assertEquals(201, aPIResponse0.getStatusCode());
+  }
+
+  @Test(timeout = 4000)
+  public void test47()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPut("");
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test48()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("compatibility");
+      rESTClient0.addParameter("https", "https");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPut("compatibility");
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test49()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("", "(", 307);
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPut((String) null);
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test50()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("@0*Eu-=Fa");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost("@0*Eu-=Fa");
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test51()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("x");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpPost((String) null);
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test52()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("2cSq'/FF]W'K.S^k=<=", "2cSq'/FF]W'K.S^k=<=", 2605);
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      RESTClient rESTClient1 = rESTClient0.setHeader("WkI\7f<", "http");
+      RESTClient rESTClient2 = rESTClient1.setHeader("WkI\7f<", "");
+      assertEquals("2cSq'/FF]W'K.S^k=<=", rESTClient2.getURL());
+  }
+
+  @Test(timeout = 4000)
+  public void test53()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/", (-697));
+      RESTClient rESTClient1 = rESTClient0.setHeader("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/");
+      RESTClient rESTClient2 = rESTClient1.addHeader("szM4DVVoiAs`]T/", "szM4DVVoiAs`]T/");
+      assertSame(rESTClient0, rESTClient2);
+  }
+
+  @Test(timeout = 4000)
+  public void test54()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("E U(~h|zVLWi", "http", 0);
+      rESTClient0.setParameter("E U(~h|zVLWi", "http");
+      RESTClient rESTClient1 = rESTClient0.setParameter("E U(~h|zVLWi", "k@(}4U05'$}yl)W");
+      assertSame(rESTClient1, rESTClient0);
+  }
+
+  @Test(timeout = 4000)
+  public void test55()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("");
+      RESTClient rESTClient1 = rESTClient0.addParameter("", "");
+      RESTClient rESTClient2 = rESTClient0.addParameter("", (String) null);
+      assertSame(rESTClient2, rESTClient1);
+  }
+
+  @Test(timeout = 4000)
+  public void test56()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("compatibility");
+      rESTClient0.addParameter("https", "https");
+      RESTClient rESTClient1 = rESTClient0.setParameter("4#'mD<\"jNh?>_vfI:]", "Char array buffer");
+      // Undeclared exception!
+      try { 
+        rESTClient1.httpDelete("");
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test57()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("K.7:dc=");
+      try { 
+        rESTClient0.get();
+        fail("Expecting exception: Exception");
+      
+      } catch(Exception e) {
+         //
+         // org.evosuite.runtime.mock.java.lang.MockThrowable: URI does not specify a valid host name: K.7:dc=
+         //
+         verifyException("org.openecomp.mso.rest.RESTClient", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test58()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("http.virtual-host");
+      RESTClient rESTClient1 = rESTClient0.addAuthorizationHeader("EWh2BZ[]:q+%4S#7K");
+      assertSame(rESTClient0, rESTClient1);
+  }
+
+  @Test(timeout = 4000)
+  public void test59()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("YoeLljo%3A%5C%3D=http", "http.protocol.element-charset", (-1908874351));
+      // Undeclared exception!
+      try { 
+        rESTClient0.delete();
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test60()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("UTF-8");
+      RESTClient rESTClient0 = new RESTClient(rESTConfig0);
+      HttpEntity httpEntity0 = rESTClient0.getHttpEntity();
+      assertNull(httpEntity0);
+  }
+
+  @Test(timeout = 4000)
+  public void test61()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient(",%LX:SC+'3!nt");
+      LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient0.getHeaders();
+      assertEquals(0, linkedHashMap0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test62()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("DELETE");
+      HttpClient httpClient0 = rESTClient0.getUnitTestClient();
+      assertNull(httpClient0);
+  }
+
+  @Test(timeout = 4000)
+  public void test63()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("A29%23fZqv%7F*%405=%7F%7Frdbt-X%22DB%2FhCrUn", "=", (-1));
+      RESTClient rESTClient1 = rESTClient0.addParameter("o", "o");
+      // Undeclared exception!
+      try { 
+        rESTClient1.httpGet();
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test64()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("DELETE");
+      LinkedHashMap<String, List<String>> linkedHashMap0 = rESTClient0.getParameters();
+      assertTrue(linkedHashMap0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test65()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("");
+      // Undeclared exception!
+      try { 
+        rESTClient0.post();
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test66()  throws Throwable  {
+      RESTClient rESTClient0 = new RESTClient("DELETE");
+      // Undeclared exception!
+      try { 
+        rESTClient0.httpDelete((String) null);
+        fail("Expecting exception: IllegalStateException");
+      
+      } catch(IllegalStateException e) {
+         //
+         // Target host is null
+         //
+         verifyException("org.apache.http.util.Asserts", e);
+      }
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientESTestscaffolding.java
new file mode 100644 (file)
index 0000000..2761b25
--- /dev/null
@@ -0,0 +1,366 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:49:09 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RESTClientESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.RESTClient"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RESTClientESTestscaffolding.class.getClassLoader() ,
+      "org.apache.http.client.methods.HttpPatch",
+      "org.apache.http.io.HttpMessageParserFactory",
+      "org.apache.http.impl.conn.DefaultHttpResponseParserFactory",
+      "org.apache.http.impl.execchain.RequestAbortedException",
+      "org.apache.http.impl.execchain.ProtocolExec",
+      "org.apache.http.config.Registry",
+      "org.apache.http.cookie.MalformedCookieException",
+      "org.apache.http.impl.conn.SystemDefaultDnsResolver",
+      "org.apache.http.client.protocol.RequestClientConnControl",
+      "org.apache.http.conn.ConnectionRequest",
+      "org.apache.http.impl.client.DefaultUserTokenHandler",
+      "org.apache.http.impl.conn.DefaultManagedHttpClientConnection",
+      "org.apache.http.conn.HttpClientConnectionManager",
+      "org.apache.http.client.protocol.RequestAcceptEncoding",
+      "org.apache.http.HttpException",
+      "org.apache.http.cookie.CookieSpec",
+      "org.apache.http.impl.cookie.RFC2965SpecFactory",
+      "org.apache.http.pool.AbstractConnPool$1",
+      "org.apache.http.conn.ssl.AllowAllHostnameVerifier",
+      "org.apache.http.client.CredentialsProvider",
+      "org.apache.http.client.ClientProtocolException",
+      "org.apache.http.pool.RouteSpecificPool",
+      "org.apache.http.client.methods.Configurable",
+      "org.apache.http.config.RegistryBuilder",
+      "org.apache.http.params.AbstractHttpParams",
+      "org.apache.http.io.HttpTransportMetrics",
+      "org.apache.http.conn.ssl.AbstractVerifier",
+      "org.openecomp.mso.rest.RESTConfig",
+      "org.apache.http.auth.Credentials",
+      "org.apache.http.io.HttpMessageParser",
+      "org.apache.http.client.methods.AbstractExecutionAwareRequest",
+      "org.apache.http.impl.BHttpConnectionBase",
+      "org.apache.http.HttpConnectionMetrics",
+      "org.apache.http.io.HttpMessageWriter",
+      "org.apache.http.HttpClientConnection",
+      "org.apache.http.conn.ConnectionPoolTimeoutException",
+      "org.apache.http.conn.routing.HttpRouteDirector",
+      "org.apache.http.pool.ConnPool",
+      "org.apache.http.protocol.HttpProcessor",
+      "org.apache.http.auth.AuthProtocolState",
+      "org.apache.http.client.RedirectStrategy",
+      "org.apache.http.impl.client.BasicCookieStore",
+      "org.apache.http.conn.routing.BasicRouteDirector",
+      "org.apache.http.protocol.HttpContext",
+      "org.apache.http.params.HttpParams",
+      "org.apache.http.client.NonRepeatableRequestException",
+      "org.apache.http.HttpResponse",
+      "org.apache.http.impl.client.AuthenticationStrategyImpl",
+      "org.apache.http.impl.client.HttpClientBuilder",
+      "org.apache.http.message.HeaderGroup",
+      "org.apache.http.impl.io.DefaultHttpRequestWriterFactory",
+      "org.apache.http.client.protocol.RequestAuthCache",
+      "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory",
+      "org.apache.http.impl.conn.DefaultSchemePortResolver",
+      "org.apache.http.config.MessageConstraints",
+      "org.apache.http.Header",
+      "org.apache.http.conn.HttpHostConnectException",
+      "org.apache.http.util.EntityUtils",
+      "org.apache.http.impl.NoConnectionReuseStrategy",
+      "org.apache.http.impl.client.BasicCredentialsProvider",
+      "org.apache.http.conn.ConnectionKeepAliveStrategy",
+      "org.apache.http.cookie.CookieSpecFactory",
+      "org.apache.http.conn.ssl.X509HostnameVerifier",
+      "org.apache.http.protocol.ChainBuilder",
+      "org.apache.http.impl.client.DefaultHttpRequestRetryHandler",
+      "org.apache.http.impl.conn.PoolingHttpClientConnectionManager",
+      "org.apache.http.impl.conn.DefaultProxyRoutePlanner",
+      "org.apache.http.impl.auth.KerberosSchemeFactory",
+      "org.apache.http.util.ByteArrayBuffer",
+      "org.apache.http.cookie.CookieOrigin",
+      "org.apache.http.client.methods.HttpRequestBase",
+      "org.apache.http.HttpEntity",
+      "org.apache.http.pool.PoolEntryCallback",
+      "org.apache.http.entity.StringEntity",
+      "org.apache.http.impl.DefaultConnectionReuseStrategy",
+      "org.apache.http.pool.ConnFactory",
+      "org.apache.http.client.methods.HttpGet",
+      "org.apache.http.protocol.BasicHttpContext",
+      "org.apache.commons.logging.impl.Jdk14Logger",
+      "org.apache.http.impl.execchain.ClientExecChain",
+      "org.apache.http.HttpVersion",
+      "org.apache.http.conn.SchemePortResolver",
+      "org.apache.http.message.BasicStatusLine",
+      "org.apache.http.conn.DnsResolver",
+      "org.apache.http.impl.client.TargetAuthenticationStrategy",
+      "org.apache.http.params.CoreProtocolPNames",
+      "org.apache.http.auth.AuthScheme",
+      "org.apache.http.message.AbstractHttpMessage",
+      "org.apache.http.auth.MalformedChallengeException",
+      "org.apache.http.HttpEntityEnclosingRequest",
+      "org.apache.http.entity.AbstractHttpEntity",
+      "org.apache.http.ReasonPhraseCatalog",
+      "org.apache.http.impl.cookie.BrowserCompatSpecFactory$SecurityLevel",
+      "org.apache.http.client.UserTokenHandler",
+      "org.apache.http.impl.auth.DigestSchemeFactory",
+      "org.apache.http.impl.conn.HttpClientConnectionOperator",
+      "org.apache.http.HttpResponseFactory",
+      "org.apache.http.client.methods.HttpPut",
+      "org.openecomp.mso.rest.RESTClient",
+      "org.apache.http.ConnectionReuseStrategy",
+      "org.apache.http.client.protocol.RequestDefaultHeaders",
+      "org.apache.http.message.BasicHeader",
+      "org.apache.http.impl.conn.ConnectionShutdownException",
+      "org.apache.http.conn.ManagedHttpClientConnection",
+      "org.apache.http.client.protocol.ResponseContentEncoding",
+      "org.apache.http.message.BasicLineParser",
+      "org.apache.http.client.methods.HttpPost",
+      "org.apache.http.auth.AuthSchemeProvider",
+      "org.apache.http.config.SocketConfig",
+      "org.apache.http.util.Asserts",
+      "org.apache.http.client.config.RequestConfig",
+      "org.apache.http.StatusLine",
+      "org.apache.http.impl.DefaultBHttpClientConnection",
+      "org.apache.http.impl.DefaultHttpResponseFactory",
+      "org.apache.http.io.SessionOutputBuffer",
+      "org.apache.http.RequestLine",
+      "org.apache.http.conn.HttpConnectionFactory",
+      "org.apache.http.protocol.RequestContent",
+      "org.apache.http.cookie.CookieIdentityComparator",
+      "org.apache.http.config.Lookup",
+      "org.apache.http.HttpMessage",
+      "org.apache.http.impl.cookie.NetscapeDraftSpecFactory",
+      "org.apache.http.HttpRequestInterceptor",
+      "org.apache.http.HeaderElementIterator",
+      "org.apache.http.client.AuthCache",
+      "org.apache.http.pool.AbstractConnPool",
+      "org.apache.http.HeaderIterator",
+      "org.apache.http.conn.ClientConnectionManager",
+      "org.apache.http.HttpInetConnection",
+      "org.apache.http.entity.ContentType",
+      "org.apache.http.message.LineFormatter",
+      "org.apache.http.cookie.CookieSpecProvider",
+      "org.apache.http.HttpRequest",
+      "org.apache.http.pool.ConnPoolControl",
+      "org.openecomp.mso.rest.APIResponse",
+      "org.apache.http.client.BackoffManager",
+      "org.openecomp.mso.rest.HostNameVerifier",
+      "org.apache.http.client.AuthenticationStrategy",
+      "org.apache.http.conn.socket.ConnectionSocketFactory",
+      "org.apache.http.protocol.RequestTargetHost",
+      "org.apache.http.pool.PoolEntry",
+      "org.apache.http.message.BasicLineFormatter",
+      "org.apache.http.client.methods.HttpUriRequest",
+      "org.apache.http.protocol.HttpRequestExecutor",
+      "org.apache.http.client.methods.HttpRequestWrapper",
+      "org.apache.http.io.SessionInputBuffer",
+      "org.apache.http.impl.cookie.IgnoreSpecFactory",
+      "org.apache.http.impl.auth.HttpAuthenticator",
+      "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory",
+      "org.apache.http.conn.ConnectTimeoutException",
+      "org.apache.http.client.methods.AbortableHttpRequest",
+      "org.apache.http.client.HttpClient",
+      "org.apache.http.auth.AuthSchemeFactory",
+      "org.apache.http.cookie.Cookie",
+      "org.apache.http.protocol.ImmutableHttpProcessor",
+      "org.apache.http.impl.auth.SPNegoSchemeFactory",
+      "org.apache.http.protocol.HTTP",
+      "org.apache.http.impl.conn.PoolingHttpClientConnectionManager$ConfigData",
+      "org.openecomp.mso.rest.RESTClient$HttpDeleteWithBody",
+      "org.apache.http.TokenIterator",
+      "org.openecomp.mso.rest.HttpHeader",
+      "org.apache.http.client.methods.HttpRequestWrapper$HttpEntityEnclosingRequestWrapper",
+      "org.apache.http.protocol.HttpCoreContext",
+      "org.apache.http.impl.conn.CPool",
+      "org.apache.http.impl.auth.NTLMSchemeFactory",
+      "org.apache.http.client.utils.URIUtils",
+      "org.apache.http.ProtocolVersion",
+      "org.apache.http.client.protocol.RequestExpectContinue",
+      "org.apache.http.util.VersionInfo",
+      "org.apache.http.impl.cookie.RFC2109SpecFactory",
+      "org.apache.http.entity.InputStreamEntity",
+      "org.apache.http.HttpHost",
+      "org.apache.http.conn.UnsupportedSchemeException",
+      "org.apache.http.ProtocolException",
+      "org.apache.http.impl.cookie.BrowserCompatSpecFactory",
+      "org.apache.http.client.methods.HttpEntityEnclosingRequestBase",
+      "org.apache.http.params.BasicHttpParams",
+      "org.apache.http.client.protocol.HttpClientContext",
+      "org.apache.http.impl.client.ProxyAuthenticationStrategy",
+      "org.apache.http.conn.ssl.StrictHostnameVerifier",
+      "org.apache.http.io.HttpMessageWriterFactory",
+      "org.apache.http.concurrent.Cancellable",
+      "org.apache.http.impl.execchain.MainClientExec",
+      "org.apache.http.protocol.HttpProcessorBuilder",
+      "org.apache.http.entity.ContentLengthStrategy",
+      "org.apache.http.impl.execchain.TunnelRefusedException",
+      "org.apache.http.conn.routing.HttpRoutePlanner",
+      "org.apache.http.Consts",
+      "org.apache.http.conn.ssl.SSLConnectionSocketFactory",
+      "org.apache.http.message.LineParser",
+      "org.apache.http.impl.cookie.BestMatchSpecFactory",
+      "org.apache.http.params.HttpParamsNames",
+      "org.apache.http.conn.ssl.SSLInitializationException",
+      "org.openecomp.mso.rest.RESTException",
+      "org.apache.http.util.Args",
+      "org.apache.http.params.HttpProtocolParams",
+      "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy",
+      "org.apache.http.protocol.RequestUserAgent",
+      "org.apache.http.config.ConnectionConfig",
+      "org.apache.http.conn.socket.LayeredConnectionSocketFactory",
+      "org.apache.http.conn.ssl.BrowserCompatHostnameVerifier",
+      "org.apache.http.util.TextUtils",
+      "org.apache.http.HttpResponseInterceptor",
+      "org.apache.http.impl.EnglishReasonPhraseCatalog",
+      "org.apache.http.client.config.RequestConfig$Builder",
+      "org.apache.http.auth.AuthenticationException",
+      "org.apache.http.auth.AuthState",
+      "org.apache.http.client.protocol.RequestAddCookies",
+      "org.apache.http.impl.conn.DefaultRoutePlanner",
+      "org.apache.http.conn.routing.HttpRoute",
+      "org.apache.http.impl.conn.CPoolEntry",
+      "org.apache.http.client.CookieStore",
+      "org.apache.http.impl.auth.BasicSchemeFactory",
+      "org.apache.http.conn.socket.PlainConnectionSocketFactory",
+      "org.apache.http.client.HttpRequestRetryHandler",
+      "org.apache.http.ParseException",
+      "org.apache.http.impl.client.CloseableHttpClient",
+      "org.apache.http.client.protocol.ResponseProcessCookies",
+      "org.apache.http.message.BasicRequestLine",
+      "org.apache.http.client.ServiceUnavailableRetryStrategy",
+      "org.apache.http.client.methods.HttpExecutionAware",
+      "org.apache.http.impl.client.InternalHttpClient",
+      "org.apache.http.HeaderElement",
+      "org.apache.http.client.ConnectionBackoffStrategy",
+      "org.apache.http.util.CharArrayBuffer",
+      "org.apache.http.impl.execchain.RetryExec",
+      "org.apache.http.conn.routing.RouteInfo",
+      "org.apache.http.client.ResponseHandler",
+      "org.apache.http.HttpConnection",
+      "org.apache.http.message.ParserCursor"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RESTClientESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.rest.RESTClient$HttpDeleteWithBody",
+      "org.apache.http.conn.socket.PlainConnectionSocketFactory",
+      "org.apache.http.conn.ssl.AbstractVerifier",
+      "org.apache.commons.logging.impl.Jdk14Logger",
+      "org.apache.http.conn.ssl.SSLConnectionSocketFactory",
+      "org.apache.http.impl.conn.CPool",
+      "org.apache.http.message.BasicLineFormatter",
+      "org.apache.http.impl.io.DefaultHttpRequestWriterFactory",
+      "org.apache.http.ProtocolVersion",
+      "org.apache.http.HttpVersion",
+      "org.apache.http.message.BasicLineParser",
+      "org.apache.http.impl.EnglishReasonPhraseCatalog",
+      "org.apache.http.impl.DefaultHttpResponseFactory",
+      "org.apache.http.impl.conn.DefaultHttpResponseParserFactory",
+      "org.apache.http.impl.conn.ManagedHttpClientConnectionFactory",
+      "org.apache.http.impl.conn.HttpClientConnectionOperator",
+      "org.apache.http.impl.conn.DefaultSchemePortResolver",
+      "org.apache.http.impl.conn.SystemDefaultDnsResolver",
+      "org.apache.http.util.VersionInfo",
+      "org.apache.http.impl.client.HttpClientBuilder",
+      "org.apache.http.protocol.HttpRequestExecutor",
+      "org.apache.http.impl.DefaultConnectionReuseStrategy",
+      "org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy",
+      "org.apache.http.impl.client.AuthenticationStrategyImpl",
+      "org.apache.http.impl.client.TargetAuthenticationStrategy",
+      "org.apache.http.impl.client.ProxyAuthenticationStrategy",
+      "org.apache.http.impl.client.DefaultUserTokenHandler",
+      "org.apache.http.client.protocol.RequestClientConnControl",
+      "org.apache.http.client.protocol.ResponseContentEncoding",
+      "org.apache.http.impl.client.DefaultHttpRequestRetryHandler",
+      "org.apache.http.impl.cookie.BrowserCompatSpecFactory$SecurityLevel",
+      "org.apache.http.impl.client.BasicCookieStore",
+      "org.apache.http.cookie.CookieIdentityComparator",
+      "org.apache.http.client.config.RequestConfig",
+      "org.apache.http.client.methods.HttpPut",
+      "org.apache.http.message.HeaderGroup",
+      "org.apache.http.message.BasicHeader",
+      "org.apache.http.entity.AbstractHttpEntity",
+      "org.apache.http.Consts",
+      "org.apache.http.entity.ContentType",
+      "org.apache.http.util.CharArrayBuffer",
+      "org.apache.http.params.BasicHttpParams",
+      "org.apache.http.message.BasicRequestLine",
+      "org.apache.http.protocol.HttpCoreContext",
+      "org.apache.http.client.protocol.HttpClientContext",
+      "org.apache.http.auth.AuthProtocolState",
+      "org.apache.http.client.methods.HttpPost",
+      "org.apache.http.HttpHost",
+      "org.apache.http.client.methods.HttpGet",
+      "org.apache.http.client.methods.HttpPatch",
+      "org.openecomp.mso.rest.RESTException",
+      "org.apache.http.client.ClientProtocolException",
+      "org.apache.http.protocol.HTTP",
+      "org.apache.http.message.BasicStatusLine",
+      "org.apache.http.util.ByteArrayBuffer"
+    );
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTClientTest.java
new file mode 100644 (file)
index 0000000..a1c83ba
--- /dev/null
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.rest;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpVersion;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.message.BasicHttpResponse;
+import org.junit.Assert;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTClient;
+import org.openecomp.mso.rest.RESTException;
+
+/**
+ * @version 1.0
+ *
+ */
+public class RESTClientTest {
+
+       @Test
+       public void testSimpleHTTP() throws RESTException, ClientProtocolException, IOException {
+               HttpClient mockHttpClient = mock(HttpClient.class);
+               HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
+               response.setEntity(new StringEntity("test","UTF-8"));
+               when(mockHttpClient.execute(Mockito.<HttpUriRequest>any())).thenReturn(response);
+
+               RESTClient restClient = new RESTClient("http://localhost");
+               restClient.setUnitTestClient(mockHttpClient);
+               APIResponse apiResponse = restClient.get();
+               Assert.assertEquals(200, apiResponse.getStatusCode());
+               Assert.assertEquals("test", apiResponse.getResponseBodyAsString());
+       }
+       
+       @Test
+       public void testSimpleHTTPS() throws RESTException, ClientProtocolException, IOException {
+               HttpClient mockHttpClient = mock(HttpClient.class);
+               HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
+               response.setEntity(new StringEntity("test","UTF-8"));
+               when(mockHttpClient.execute(Mockito.<HttpUriRequest>any())).thenReturn(response);
+
+               RESTClient restClient = new RESTClient("https://localhost");
+               restClient.setUnitTestClient(mockHttpClient);
+               APIResponse apiResponse = restClient.get();
+               Assert.assertEquals(200, apiResponse.getStatusCode());
+               Assert.assertEquals("test", apiResponse.getResponseBodyAsString());
+       }
+       
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTest.java
new file mode 100644 (file)
index 0000000..0a46ceb
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:47:42 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RESTConfigESTest extends RESTConfigESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig((String) null, "", (-3449));
+      String string0 = rESTConfig0.getURL();
+      assertEquals(-3449, rESTConfig0.getProxyPort());
+      assertNull(string0);
+      assertFalse(rESTConfig0.trustAllCerts());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig(";A,GC~!-_.>+R=>rIO", "", (-3449), false);
+      String string0 = rESTConfig0.getURL();
+      assertEquals("", rESTConfig0.getProxyHost());
+      assertEquals(-3449, rESTConfig0.getProxyPort());
+      assertFalse(rESTConfig0.trustAllCerts());
+      assertEquals(";A,GC~!-_.>+R=>rIO", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("", "", 0);
+      int int0 = rESTConfig0.getProxyPort();
+      assertFalse(rESTConfig0.trustAllCerts());
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig((String) null);
+      int int0 = rESTConfig0.getProxyPort();
+      assertEquals((-1), int0);
+      assertFalse(rESTConfig0.trustAllCerts());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig((String) null, "zZu8", (-1933), true);
+      String string0 = rESTConfig0.getProxyHost();
+      assertEquals(-1933, rESTConfig0.getProxyPort());
+      assertTrue(rESTConfig0.trustAllCerts());
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
+      boolean boolean0 = rESTConfig0.trustAllCerts();
+      assertTrue(boolean0);
+      assertEquals(2708, rESTConfig0.getProxyPort());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
+      rESTConfig0.getURL();
+      assertTrue(rESTConfig0.trustAllCerts());
+      assertEquals(2708, rESTConfig0.getProxyPort());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("", true);
+      String string0 = rESTConfig0.getProxyHost();
+      assertTrue(rESTConfig0.trustAllCerts());
+      assertNull(string0);
+      assertEquals(-1, rESTConfig0.getProxyPort());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
+      int int0 = rESTConfig0.getProxyPort();
+      assertEquals(2708, int0);
+      assertTrue(rESTConfig0.trustAllCerts());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("", "", 2708, true);
+      rESTConfig0.getProxyHost();
+      assertEquals(2708, rESTConfig0.getProxyPort());
+      assertTrue(rESTConfig0.trustAllCerts());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      RESTConfig rESTConfig0 = new RESTConfig("");
+      boolean boolean0 = rESTConfig0.trustAllCerts();
+      assertEquals(-1, rESTConfig0.getProxyPort());
+      assertFalse(boolean0);
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTConfigESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1eb33dd
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:47:42 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RESTConfigESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.RESTConfig"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RESTConfigESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.rest.RESTConfig"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTest.java
new file mode 100644 (file)
index 0000000..aff908e
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 11:47:59 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.mock.java.lang.MockThrowable;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RESTExceptionESTest extends RESTExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RESTException rESTException0 = new RESTException(0, (String) null);
+      int int0 = rESTException0.getStatusCode();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      RESTException rESTException0 = new RESTException(1619, "");
+      int int0 = rESTException0.getStatusCode();
+      assertEquals(1619, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      RESTException rESTException0 = new RESTException("");
+      String string0 = rESTException0.getErrorMessage();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      RESTException rESTException0 = null;
+      try {
+        rESTException0 = new RESTException((Throwable) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.rest.RESTException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      RESTException rESTException0 = new RESTException((-489), "org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable");
+      String string0 = rESTException0.getErrorMessage();
+      assertEquals("org.evosuite.runtime.mock.java.lang.MockThrowable: org.evosuite.runtime.mock.java.lang.MockThrowable", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MockThrowable mockThrowable0 = new MockThrowable();
+      RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
+      int int0 = rESTException0.getStatusCode();
+      assertEquals((-1), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      MockThrowable mockThrowable0 = new MockThrowable();
+      RESTException rESTException0 = new RESTException((Throwable) mockThrowable0);
+      String string0 = rESTException0.getErrorMessage();
+      assertNull(string0);
+  }
+}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/RESTExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..13d4dcc
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 11:47:59 GMT 2016
+ */
+
+package org.openecomp.mso.rest;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RESTExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.RESTException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RESTExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.rest.RESTException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RESTExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.rest.RESTException"
+    );
+  }
+}
diff --git a/bpmn/MSOURN-plugin/build.properties b/bpmn/MSOURN-plugin/build.properties
new file mode 100644 (file)
index 0000000..7e5fb9f
--- /dev/null
@@ -0,0 +1,7 @@
+# Copy this file to 'build.properties' and modify it to match your system
+# Alternatively, you can also copy it to '${user.home}/.camunda/build.properties'
+# to have a central configuration that works with all camunda BPM projects
+
+# Defines the deployment folder in a camunda BPM installation (backslashes need to be escaped or replaced by forward slashes).
+#deploy.jboss.dir=C:/camunda/camunda-bpm-jboss-7.3.0/server/jboss-as-${jboss-version}/standalone/deployments
+deploy.jboss.dir=C:/D2/jboss-ee/server/jboss-as-7.2.0.Final/standalone/deployments
\ No newline at end of file
diff --git a/bpmn/MSOURN-plugin/build.xml b/bpmn/MSOURN-plugin/build.xml
new file mode 100644 (file)
index 0000000..f2dbc55
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="urnMap-plugin" default="deploy.jboss">
+
+       <property file="build.properties" />
+       <property file="${user.home}/.camunda/build.properties" />
+       <property name="target.dir" value="target" />
+
+       <condition property="mvn.executable" value="mvn.bat" else="mvn">
+               <os family="windows"/>
+       </condition>
+
+       <target name="deploy.jboss" depends="package.mvn, install.cockpit.plugin" description="Copies the cockit plugin to the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'" />
+
+       <target name="deploy.tomcat" depends="package.mvn" description="Copies the cockpit plugin to the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
+               <fail unless="deploy.tomcat.dir" message="No deployment folder has been configured. Please copy the file '${basedir}/build.properties.example' to '${basedir}/build.properties' or '${user.home}/.camunda/build.properties' and change it according to your environment." />
+               <copy file="${target.dir}/${ant.project.name}.jar" todir="${deploy.tomcat.dir}/camunda/WEB-INF/lib" />
+               <touch file="${deploy.tomcat.dir}/camunda/WEB-INF/web.xml"/>
+       </target>
+
+       <target name="package.mvn">
+               <exec executable="${mvn.executable}" dir="." failonerror="true">
+                       <env key="MAVEN_OPTS" value="-Xmx1024m -Xms512m -DskipTests=true -Dmaven.test.skip=true" />
+                       <arg line="clean package" />
+               </exec>
+       </target>
+
+       <target name="install.cockpit.plugin">
+               <fail unless="deploy.jboss.dir" message="No deployment folder has been configured. Please copy the file '${basedir}/build.properties.example' to '${basedir}/build.properties' or '${user.home}/.camunda/build.properties' and change it according to your environment." />
+               <path id="cockpit.file.id"> 
+                       <fileset dir="${deploy.jboss.dir}"> 
+                               <include name="camunda-webapp-*.war"/> 
+                       </fileset> 
+               </path> 
+               <property name="cockpit.file" refid="cockpit.file.id"/> 
+               <war destfile="${cockpit.file}" update="true">
+                       <zipfileset file="${target.dir}/${ant.project.name}.jar" fullpath="WEB-INF/lib/${ant.project.name}.jar" />
+               </war>
+       </target>
+
+       <target name="undeploy.jboss" description="Deletes the cockpit plugin from the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
+               <path id="cockpit.file.id"> 
+                       <fileset dir="${deploy.jboss.dir}"> 
+                               <include name="camunda-webapp-*.war"/> 
+                       </fileset> 
+               </path> 
+               <property name="cockpit.file" refid="cockpit.file.id"/>
+               <basename property="cockpit.filename" file="${cockpit.file}"/>
+               <move file="${cockpit.file}" todir="${java.io.tmpdir}"/>
+               <zip destfile="${cockpit.file}">
+                       <zipfileset src="${java.io.tmpdir}/${cockpit.filename}">
+                               <exclude name="WEB-INF/lib/${ant.project.name}.jar"/>
+                       </zipfileset>
+               </zip>
+       </target>
+
+       <target name="undeploy.tomcat" description="Deletes the cockpit plugin from the deployment directory defined in '${basedir}/build.properties' or '${user.home}/.camunda/build.properties'">
+               <delete file="${deploy.tomcat.dir}/camunda/WEB-INF/lib/${ant.project.name}.jar" />
+       </target>
+
+</project>
diff --git a/bpmn/MSOURN-plugin/pom.xml b/bpmn/MSOURN-plugin/pom.xml
new file mode 100644 (file)
index 0000000..48da51e
--- /dev/null
@@ -0,0 +1,72 @@
+<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.openecomp.mso</groupId>
+               <artifactId>bpmn</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+       
+       <groupId>com.att.camunda.bpm.cockpit.plugin</groupId>
+       <artifactId>cockpit-urnmap-plugin</artifactId>
+       
+       <packaging>jar</packaging>
+       
+       <name>MSO URN Mapping Cockpit Plugin</name>
+
+       <dependencies>
+               <!--  TODO Upate it to ee and proper version-->
+               <dependency>
+                       <groupId>org.camunda.bpm.webapp</groupId>
+                       <artifactId>camunda-webapp-core</artifactId>
+                       <version>${camunda.version}</version>
+                       <!-- exclusion to use latest commons-fileupload -->
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>commons-fileupload</groupId>
+                                       <artifactId>commons-fileupload</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <!-- latest commons-fileupload -->
+               <dependency>
+                       <groupId>commons-fileupload</groupId>
+                       <artifactId>commons-fileupload</artifactId>
+                       <version>1.3.2</version>
+               </dependency>
+               <dependency>
+                       <groupId>javax.ws.rs</groupId>
+                       <artifactId>javax.ws.rs-api</artifactId>
+                       <version>2.0</version>
+               </dependency>
+               <!--  TODO Upate it to ee version -->
+               <dependency>
+                       <groupId>org.camunda.bpm</groupId>
+                       <artifactId>camunda-engine</artifactId>
+                       <version>${camunda.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>com.h2database</groupId>
+                       <artifactId>h2</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>javax.servlet</groupId>
+                       <artifactId>javax.servlet-api</artifactId>
+                       <version>3.0.1</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>common</artifactId>
+                       <version>${project.version}</version>
+                       <scope>compile</scope>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java
new file mode 100644 (file)
index 0000000..9a02aa0
--- /dev/null
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.camunda.bpm.plugin.urnmap;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin;
+
+import com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource;
+
+
+public class URNMapPlugin  extends AbstractCockpitPlugin{
+       public static final String ID = "urnMap-plugin";
+
+         public String getId() {
+           return ID;
+         }
+
+         @Override
+         public Set<Class<?>> getResourceClasses() {
+           Set<Class<?>> classes = new HashSet<Class<?>>();
+
+           classes.add(URNMapPluginRootResource.class);
+
+           return classes;
+         }
+
+         @Override
+         public List<String> getMappingFiles() {
+                 return Arrays.asList("com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml");
+         }
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java
new file mode 100644 (file)
index 0000000..8a9d136
--- /dev/null
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.db;
+
+import org.camunda.bpm.engine.ProcessEngineConfiguration;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration;
+import org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor;
+import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor;
+import org.camunda.bpm.engine.impl.interceptor.LogInterceptor;
+import org.camunda.bpm.engine.impl.util.ReflectUtil;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfiguration {
+
+  private String resourceName;
+
+  protected void init() {
+    throw new IllegalArgumentException(
+            "Normal 'init' on process engine only used for extended MyBatis mappings is not allowed, please use 'initFromProcessEngineConfiguration'. You cannot construct a process engine with this configuration.");
+  }
+
+  /**
+   * initialize the {@link ProcessEngineConfiguration} from an existing one,
+   * just using the database settings and initialize the database / MyBatis
+   * stuff.
+   */
+  public void initFromProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration, String resourceName) {
+    this.resourceName = resourceName;
+
+    setDatabaseType(processEngineConfiguration.getDatabaseType());
+    setDataSource(processEngineConfiguration.getDataSource());
+    setDatabaseTablePrefix(processEngineConfiguration.getDatabaseTablePrefix());
+
+    initDataSource();
+    //initVariableTypes();
+    initCommandContextFactory();
+    initTransactionFactory();
+    initTransactionContextFactory();
+    initCommandExecutors();
+    initSqlSessionFactory();
+    initIncidentHandlers();
+    initIdentityProviderSessionFactory();
+    initSessionFactories();
+  }
+
+  /**
+   * In order to always open a new command context set the property
+   * "alwaysOpenNew" to true inside the CommandContextInterceptor.
+   *
+   * If you execute the custom queries inside the process engine
+   * (for example in a service task), you have to do this.
+   */
+  @Override
+  protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() {
+    List<CommandInterceptor> defaultCommandInterceptorsTxRequired = new ArrayList<CommandInterceptor>();
+    defaultCommandInterceptorsTxRequired.add(new LogInterceptor());
+    defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true));
+    return defaultCommandInterceptorsTxRequired;
+  }
+
+  @Override
+  protected InputStream getMyBatisXmlConfigurationSteam() {
+    return ReflectUtil.getResourceAsStream(resourceName);
+  }
+
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java
new file mode 100644 (file)
index 0000000..0bd7d73
--- /dev/null
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.db;
+
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.interceptor.Command;
+
+/**
+ * Helper to initialize a minimized process engine which does all the transaction and MyBatis mapping stuff for us
+ * and can be used to execute queries.
+ */
+public class MyBatisQueryCommandExecutor {
+  
+  private MyBatisExtendedSessionFactory myBatisExtendedSessionFactory;
+
+  public MyBatisQueryCommandExecutor(ProcessEngineConfigurationImpl processEngineConfiguration, String mappingResourceName) {
+    myBatisExtendedSessionFactory = new MyBatisExtendedSessionFactory();
+    myBatisExtendedSessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration, mappingResourceName);
+  }
+  
+  public <T> T executeQueryCommand(Command<T> command) {
+       return myBatisExtendedSessionFactory.getCommandExecutorTxRequired().execute(command);
+  }
+  
+  
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java
new file mode 100644 (file)
index 0000000..f8396bb
--- /dev/null
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.db;
+
+public class URNData {
+
+         private String URNName;
+         private String URNValue;
+         private String Ver_;
+       public String getURNName() {
+               return URNName;
+       }
+       public void setURNName(String uRNName) {
+               URNName = uRNName;
+       }
+       public String getURNValue() {
+               return URNValue;
+       }
+       public void setURNValue(String uRNValue) {
+               URNValue = uRNValue;
+       }
+       public String getVer_() {
+               return Ver_;
+       }
+       public void setVer_(String ver_) {
+               Ver_ = ver_;
+       }
+         
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java
new file mode 100644 (file)
index 0000000..7fd41c1
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.db;
+
+import java.util.List;
+
+import org.camunda.bpm.engine.ProcessEngines;
+import org.camunda.bpm.engine.impl.ProcessEngineImpl;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.interceptor.Command;
+import org.camunda.bpm.engine.impl.interceptor.CommandContext;
+
+public class URNService {
+
+
+  public List<URNData> getProperties() {
+    ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
+    ProcessEngineConfigurationImpl processEngineConfiguration = processEngine.getProcessEngineConfiguration();
+
+    MyBatisQueryCommandExecutor commandExecutor = new MyBatisQueryCommandExecutor(processEngineConfiguration, "mappings.xml");
+    return commandExecutor.executeQueryCommand(new Command<List<URNData>>() {
+
+      @SuppressWarnings("unchecked")
+      public List<URNData> execute(CommandContext commandContext) {
+        return (List<URNData>) commandContext.getDbSqlSession().selectList("retrieveUrnKeyValuePair", null);
+      }
+    });
+  }
+
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java
new file mode 100644 (file)
index 0000000..44fe47b
--- /dev/null
@@ -0,0 +1,98 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+
+import org.camunda.bpm.cockpit.db.QueryParameters;
+import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
+import com.att.camunda.bpm.plugin.urnmap.db.*;
+import org.camunda.bpm.cockpit.db.CommandExecutor;
+
+import com.att.camunda.bpm.plugin.urnmap.db.URNData;
+
+public class ProcessInstanceResource extends AbstractPluginResource {
+
+  public ProcessInstanceResource(String engineName) {
+    super(engineName);
+  }
+
+  @GET
+  public List<URNData> getUrnDataMap() {    
+    List<URNData> list = getQueryService()
+            .executeQuery(
+                    "cockpit.urnMap.retrieveUrnKeyValuePair",
+                    new QueryParameters<URNData>());
+    
+    System.out.println("urnmap-plugin project - Results Retrieved: ");
+    System.out.println("URNName: " + "         " + "URNValue: " );
+    for(URNData d: list)
+    {
+       System.out.println(  d.getURNName() + "         "  + d.getURNValue());
+    }
+   
+    return list;
+  }
+  
+  @PUT
+  //public void insertNewRow(String key_, String value_) 
+  public void insertNewRow(String temp) 
+   {  
+        System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp);
+        StringTokenizer st = new StringTokenizer(temp, "|");
+        String key_ = "";
+        String value_ = "";
+        
+        while(st.hasMoreTokens()) { 
+                 key_ = st.nextToken(); 
+                 value_ = st.nextToken(); 
+                System.out.println(key_ + "\t" + value_); 
+                } 
+                        
+       System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_);
+         URNData nRow = new URNData();
+         nRow.setVer_("1");     
+         nRow.setURNName(key_);
+         nRow.setURNValue(value_);
+         
+        getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class);
+        
+        System.out.println("AddNewRow: XXXXXX    END   XXXXXXXXXXX");
+   }
+  
+  @POST
+ // public void getPersistData(List<URNData > myList) {  
+  public void getPersistData(URNData d) {  
+         
+         System.out.println("getPersistData:  UrnName: " + d.getURNName() + " , URNValue: " + d.getURNValue() );
+           
+               getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class);
+               //getQueryService().executeQuery("cockpit.sample.persistURNData", d, ProcessInstanceCountDto.class);
+            
+                   
+           System.out.println("XXXXXXXXXX - END - XXXXXXXXXXXXXXX");
+       }
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java
new file mode 100644 (file)
index 0000000..c30eb8d
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+
+import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource;
+
+import com.att.camunda.bpm.plugin.urnmap.URNMapPlugin;
+
+@SuppressWarnings("deprecation")
+@Path("plugin/" + URNMapPlugin.ID)
+public class URNMapPluginRootResource extends AbstractPluginRootResource
+{
+         public URNMapPluginRootResource() {
+                         super(URNMapPlugin.ID);
+                 //super("");
+         }
+
+         @Path("{engineName}/process-instance") 
+         public URNResource getProcessInstanceResource(@PathParam("engineName") String engineName) {
+           return subResource(new URNResource(engineName), engineName);
+         }
+}
diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java
new file mode 100644 (file)
index 0000000..08724db
--- /dev/null
@@ -0,0 +1,205 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+/***
+import java.beans.Statement;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+*/
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.sql.DataSource;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+
+import org.camunda.bpm.cockpit.db.QueryParameters;
+import org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource;
+
+
+//import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
+import com.att.camunda.bpm.plugin.urnmap.db.URNData;
+import org.openecomp.mso.logger.MsoLogger;
+
+
+//public class ProcessInstanceResource extends AbstractPluginResource {
+public class URNResource extends AbstractCockpitPluginResource{
+  public URNResource(String engineName) {
+    super(engineName);
+  }
+  
+  private Connection conn;
+  private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+  @GET
+  public List<URNData> getUrnDataMap() 
+  {  
+         List<URNData> list = new ArrayList();
+         
+         try {
+                       
+                   conn = getDBConnection();
+                           PreparedStatement psData = conn
+                                               .prepareStatement("select * from ATT_URN_MAPPING order by NAME_");
+                           
+                           ResultSet r = psData.executeQuery();
+                           
+                               while(r.next()) 
+                               {
+                                       URNData d = new URNData();
+                                       d.setURNName(r.getString("NAME_"));
+                                       d.setURNValue(r.getString("VALUE_"));
+                                       d.setVer_( r.getString("REV_"));
+                                       
+                                       list.add(d);                                    
+                               }
+                               
+                           psData.close();
+                               conn.close();
+                       
+               } catch (Exception e) 
+               {
+                       
+                       e.printStackTrace();
+               }
+     
+    for(URNData d: list)
+    {
+       msoLogger.debug(  d.getURNName() + "            "  + d.getURNValue());
+       //msoLogger.debug("Started Executing " + getTaskName());
+       msoLogger.debug("Started Executing " + d.getURNName() + " " + d.getURNValue());
+    }
+   
+    return list;
+  }
+  
+  public List<URNData> getUrnDataMapOLD() 
+  {  
+         
+    List<URNData> list = getQueryService()
+            .executeQuery("cockpit.urnMap.retrieveUrnKeyValuePair", new QueryParameters<URNData>());
+    
+    msoLogger.debug("urnmap-plugin project - Results Retrieved: ");
+    msoLogger.debug("URNName: " + "            " + "URNValue: " );
+    
+    for(URNData d: list)
+    {
+       //msoLogger.debug(  d.getURNName() + "          "  + d.getURNValue());
+       msoLogger.debug( d.getURNName() + "             "  + d.getURNValue());
+    }
+   
+    return list;
+  }
+  
+  public Connection getDBConnection()
+  {
+         try {
+                       
+                       if(conn == null)
+                       {
+                               Context ctx = new InitialContext();
+                           DataSource ds = (DataSource)ctx.lookup("java:jboss/datasources/ProcessEngine");//jboss
+                       conn =                  ds.getConnection();
+        
+                       }                        
+                       
+               } catch (Exception e) 
+               {
+                       
+                       e.printStackTrace();
+               }
+         
+         return conn;
+  }
+  
+  @PUT
+  public void insertNewRow(String temp) 
+   {  
+        msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp);
+        msoLogger.debug("AddNewRow: EngineName  ---> " + engineName);
+        
+        StringTokenizer st = new StringTokenizer(temp, "|");
+        String key_ = "";
+        String value_ = "";
+        
+        while(st.hasMoreTokens()) { 
+                 key_ = st.nextToken(); 
+                 value_ = st.nextToken(); 
+                msoLogger.debug(key_ + "\t" + value_); 
+                } 
+                        
+       msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_);
+         final URNData nRow = new URNData();
+         nRow.setVer_("1");    
+         final String myKey = key_;
+         final String myValue = value_;
+         
+               msoLogger.debug("----------- START ----------------------");
+               try {
+                       
+                   conn = getDBConnection();
+                           PreparedStatement psData = conn
+                                               .prepareStatement("Insert into ATT_URN_MAPPING values ('" + key_ + "', '" + value_  + "', '1')");
+                           
+                           psData.executeUpdate();
+                           
+                           psData.close();
+                               conn.close();
+                       //}                      
+                       
+               } catch (Exception e) 
+               {
+                       
+                       e.printStackTrace();
+               }
+       // getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class);
+   }
+  
+  @POST
+  public void getPersistData(URNData d) {  
+         
+               //getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class);
+           
+         try {
+                       
+                   conn = getDBConnection();
+                       PreparedStatement psData = conn
+                                               .prepareStatement("UPDATE ATT_URN_MAPPING set VALUE_ ='"+ d.getURNValue() + "' WHERE NAME_='" + d.getURNName() + "'");
+                           
+                           psData.executeUpdate();
+                           
+                           psData.close();
+                               conn.close();
+               } catch (Exception e) 
+               {
+                       
+                       e.printStackTrace();
+               }
+        
+       }
+}
diff --git a/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin b/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin
new file mode 100644 (file)
index 0000000..1e207d8
--- /dev/null
@@ -0,0 +1 @@
+com.att.camunda.bpm.plugin.urnmap.URNMapPlugin
\ No newline at end of file
diff --git a/bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml b/bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml
new file mode 100644 (file)
index 0000000..ed61030
--- /dev/null
@@ -0,0 +1,64 @@
+<?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 mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="cockpit.urnMap">
+  <resultMap id="urnDataMap" type="com.att.camunda.bpm.plugin.urnmap.db.URNData">
+    <result property="URNName" column="URNNAME" jdbcType="VARCHAR"/>
+    <result property="URNValue" column="URNVALUE" jdbcType="VARCHAR" />
+  </resultMap>
+
+  <select id="retrieveUrnKeyValuePair" resultMap="urnDataMap">
+    select NAME_ URNName, VALUE_ URNValue from ATT_URN_MAPPING
+  </select>
+
+
+  <!-- INSERT cockpit.InsertURNData  keyProperty="NAME_" -->
+  <resultMap id="insertNewRow" type="com.att.camunda.bpm.plugin.urnmap.db.URNData">
+    <result property="URNName"           column="NAME_"        jdbcType="VARCHAR" />
+    <result property="URNValue"   column="VALUE_"   jdbcType="VARCHAR" />
+    <result property="1"             column="REV_"     jdbcType="INTEGER"/>
+  </resultMap>
+  
+       <insert id="insertNewRow" parameterType="com.att.camunda.bpm.plugin.urnmap.db.URNData">
+           insert into ATT_URN_MAPPING (NAME_, VALUE_, REV_) 
+           values (
+                               #{URNName}, #{URNValue}, 1
+                 )
+       </insert>
+       
+<!-- UPDATE cockpit.InsertURNData -->
+  <resultMap id="saveURNMappingDataMap" type="com.att.camunda.bpm.plugin.urnmap.db.URNData">
+    <result property="URNName"         column="NAME_"  jdbcType="VARCHAR" />
+    <result property="URNValue"   column="VALUE_" jdbcType="VARCHAR" />
+    <result property="1"           column="REV_"       jdbcType="INTEGER"/>
+  </resultMap>
+  
+  <update id="persistURNData">
+  update  ATT_URN_MAPPING set
+    NAME_ = #{URNName},
+    VALUE_ = #{URNValue},
+    REV_ = 1
+    where NAME_=#{URNName}
+</update>
+</mapper>
diff --git a/bpmn/MSOURN-plugin/src/main/resources/mappings.xml b/bpmn/MSOURN-plugin/src/main/resources/mappings.xml
new file mode 100644 (file)
index 0000000..d0a9177
--- /dev/null
@@ -0,0 +1,32 @@
+<?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 configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
+
+<configuration>
+       <settings>
+               <setting name="lazyLoadingEnabled" value="false" />
+       </settings>
+       <mappers>
+        <mapper resource="com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml" />
+       </mappers>
+</configuration>
diff --git a/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/dashboard.html b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/dashboard.html
new file mode 100644 (file)
index 0000000..cc794e5
--- /dev/null
@@ -0,0 +1,63 @@
+<!--
+  ============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=========================================================
+  -->
+
+<div class="form-group container">  
+       <form novalidate="novalidate" class="simple-form" name="urnMapper">               
+               <div class="panel panel-default">  
+                       <div class="panel-heading" style="padding:3px;background:#871020 !important;color:#fff"> <h3 style="margin:1px" class="heading">Process Engine - URN Mapping</h3></div>
+                       <div class="panel-body">
+                               <div class="well">
+                                       <div class="input-group well" style="padding:5px">                                      
+                                               <input id="new_key" class="form-control input-md"  placeholder="New URN Key"   size="25" type="text"  name="URNName"  value="" ng-blur="enableAddRowBtn()">
+                                               <span class="input-group-btn" style="width:0px;"></span>
+                                               <input type="text" class="form-control input-md" size="55" style="margin-left:-1px" id="new_value" placeholder="New URN Value"  name="URNValue" />
+                                               <span class="input-group-btn" style="width:0px;"></span>                                
+                                               <span class="input-group-btn">
+                                                       <button class="btn btn-primary" type="button" id="addRow_BTN" data-ng-click="addNewRow(); setTimeout( retrieveData(), 1000);" disabled data-original-title="" title="">Add!</button>
+                                               </span>
+                                       </div>
+                                       <div>
+                                         <table cellpadding="0" cellspacing="0" class="table responsive" widht="100%">
+                                               <tbody>        
+                                                 <tr data-ng-repeat="urnData in UrnDataMap">       
+                                                        <td>
+                                                               <div class="input-group">
+                                                                 <input id="{{ urnData.urnname }}_key" type="text"  style="border:0px solid #bfbfbf" size="25" class="form-control input-md" ng-blur="SaveRow( urnData )" value="{{ urnData.urnName }}" data-ng-model= "urnData.urnname" data-ng-change="enableButton(urnData)"/>
+                                                                 <span class="input-group-btn" style="width:0px;"></span>
+                                                                 <input id="{{ urnData.urnname }}_value" type="text" style="border:0px solid #dfdfdf;border-left:1px solid #bfbfbf" size="55" class="form-control input-md" ng-blur="SaveRow( urnData )" value="{{ urnData.urnvalue }}" data-ng-model="urnData.urnvalue" data-ng-change="enableButton(urnData)"/>
+                                                                 <span class="input-group-btn">
+                                                                       <button disabled="true" class="btn btn-primary" type="button" id="btn_{{ urnData.urnname }}_key" data-ng-click="SaveRow( urnData ); setTimeout( retrieveData(), 1000);">
+                                                                               <span class="glyphicon glyphicon-floppy-disk"></span>
+                                                                       </button>
+                                                                 </span>
+                                                               </div><!-- /input-group -->
+                                                        </td>      
+                                                        <!-- 
+                                                       <td><button id="btn_{{ urnData.urnname }}_key" data-ng-click="SaveRow( urnData )" disabled>SaveRecord</button> </td>
+                                                        -->
+                                                 </tr>       
+                                               </tbody>
+                                         </table>      
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+       </form>
+</div>
diff --git a/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/plugin.js b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/app/plugin.js
new file mode 100644 (file)
index 0000000..9f33986
--- /dev/null
@@ -0,0 +1,132 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+define(['angular'], function(angular) {
+
+  var DashboardController = ["$scope", "$http", "Uri", function($scope, $http, Uri) {
+
+    $http.get(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"))
+      .success(function(data) {
+        $scope.UrnDataMap = data;
+      });
+    //enable saveRow button
+    $scope.enableButton=function(urnData)
+    {
+               document.getElementById("btn_" + urnData.urnname + "_key").disabled = false;
+    };
+    
+    $scope.enableAddRowBtn=function()
+    {
+       if(document.getElementById("new_key").value.trim().length >0)
+                document.getElementById("addRow_BTN").disabled = false;
+       else
+               document.getElementById("addRow_BTN").disabled = true;
+    };
+    
+    
+    $scope.addNewRow = function() 
+    {
+       var newKey = document.getElementById("new_key").value.trim();
+       var newValue = document.getElementById("new_value").value.trim();
+       var x;
+       
+       for (var i=0;i<$scope.UrnDataMap.length;i++)
+       {
+               var n = $scope.UrnDataMap[i].urnname.localeCompare(newKey);
+               if(n == 0){
+                       x = "match";
+               }
+       }
+       
+       if(Boolean(x))
+       {
+               alert("URN Name already exists, please check the KEY!");
+       }
+       else
+       {
+               if(newKey.length >0 )
+               {
+
+                       var temp = newKey + "|" + newValue;
+               
+                       $http.put(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"), temp);
+         
+                document.getElementById("new_key").value = "";
+                document.getElementById("new_value").value = "";
+
+               }
+               
+       }
+       //this.enableAddRowBtn;
+       document.getElementById("addRow_BTN").disabled = true;
+       
+     $http.get(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"))
+        .success(function(data) {
+          $scope.UrnDataMap = data;
+        });
+        
+        
+      }
+    
+    $scope.retrieveData = function() {
+       
+        $http.get(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"))
+         .success(function(data) {
+           $scope.UrnDataMap = data;
+         });
+    }
+    
+     $scope.SaveRow = function(user) 
+    {          
+        $http.post(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"), user);
+                   
+       document.getElementById("btn_" + user.urnname + "_key").disabled = true;
+        document.getElementById(user.urnname + "_status").style.display = "";
+        this.enableAddRowBtn;
+        
+        $http.get(Uri.appUri("plugin://urnMap-plugin/:engine/process-instance"))
+        .success(function(data) {
+          $scope.UrnDataMap = data;
+        });
+        
+        };
+  }];
+
+  var Configuration = ['ViewsProvider', function(ViewsProvider) {
+
+    ViewsProvider.registerDefaultView('cockpit.dashboard', {
+      id: 'process-definitions',
+      label: 'Deployed Processes',
+      url: 'plugin://urnMap-plugin/static/app/dashboard.html',
+      controller: DashboardController,
+       // make sure we have a higher priority than the default plugin
+      priority: 12
+    });
+  }];
+//START
+//END
+  
+  var ngModule = angular.module('cockpit.plugin.urnMap-plugin', []);
+
+  ngModule.config(Configuration);
+
+  return ngModule;
+});
diff --git a/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/info.txt b/bpmn/MSOURN-plugin/src/main/resources/plugin-webapp/urnMap-plugin/info.txt
new file mode 100644 (file)
index 0000000..09b6262
--- /dev/null
@@ -0,0 +1 @@
+# Client side assets of the urnMap-plugin
\ No newline at end of file
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java
new file mode 100644 (file)
index 0000000..0377b44
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:49:02 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import java.util.Set;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class URNMapPluginESTest extends URNMapPluginESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
+      Set<Class<?>> set0 = uRNMapPlugin0.getResourceClasses();
+      assertFalse(set0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
+      String string0 = uRNMapPlugin0.getId();
+      assertEquals("urnMap-plugin", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      URNMapPlugin uRNMapPlugin0 = new URNMapPlugin();
+      List<String> list0 = uRNMapPlugin0.getMappingFiles();
+      assertEquals(1, list0.size());
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java
new file mode 100644 (file)
index 0000000..472a2bc
--- /dev/null
@@ -0,0 +1,91 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:49:02 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNMapPluginESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginESTestscaffolding.class.getClassLoader() ,
+      "org.camunda.bpm.webapp.plugin.spi.impl.AbstractAppPlugin",
+      "org.camunda.bpm.webapp.plugin.spi.AppPlugin",
+      "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource",
+      "org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin",
+      "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource",
+      "org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin",
+      "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource",
+      "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource",
+      "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin"
+    );
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java
new file mode 100644 (file)
index 0000000..c7b241c
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:48:50 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.db;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class URNDataESTest extends URNDataESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      uRNData0.setVer_("yE)\7f");
+      String string0 = uRNData0.getVer_();
+      assertEquals("yE)\7f", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      uRNData0.setURNValue("Dw]M@,~.D");
+      String string0 = uRNData0.getURNValue();
+      assertEquals("Dw]M@,~.D", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      uRNData0.setURNName("");
+      String string0 = uRNData0.getURNName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      String string0 = uRNData0.getVer_();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      String string0 = uRNData0.getURNValue();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      String string0 = uRNData0.getURNName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      uRNData0.setURNValue("");
+      String string0 = uRNData0.getURNValue();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      uRNData0.setVer_("");
+      String string0 = uRNData0.getVer_();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      uRNData0.setURNName("2Gv9h[mmV=,z\"VSY`t)");
+      String string0 = uRNData0.getURNName();
+      assertEquals("2Gv9h[mmV=,z\"VSY`t)", string0);
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java
new file mode 100644 (file)
index 0000000..7ae4fab
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:48:50 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.db;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNDataESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.db.URNData"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNDataESTestscaffolding.class.getClassLoader() ,
+      "com.att.camunda.bpm.plugin.urnmap.db.URNData"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java
new file mode 100644 (file)
index 0000000..9c71cde
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:47:07 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.db;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class URNServiceESTest extends URNServiceESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      URNService uRNService0 = new URNService();
+      // Undeclared exception!
+      try { 
+        uRNService0.getProperties();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("com.att.camunda.bpm.plugin.urnmap.db.URNService", e);
+      }
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java
new file mode 100644 (file)
index 0000000..d6ce3f3
--- /dev/null
@@ -0,0 +1,97 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:47:07 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.db;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNServiceESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.db.URNService"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNServiceESTestscaffolding.class.getClassLoader() ,
+      "org.camunda.bpm.engine.ProcessEngineException",
+      "com.att.camunda.bpm.plugin.urnmap.db.URNService",
+      "org.camunda.bpm.engine.impl.interceptor.Command",
+      "org.camunda.bpm.engine.ClassLoadingException",
+      "org.camunda.bpm.engine.ProcessEngine",
+      "org.camunda.bpm.engine.ProcessEngines",
+      "org.camunda.bpm.engine.ProcessEngineInfo",
+      "org.camunda.bpm.application.ProcessApplicationUnavailableException",
+      "org.camunda.bpm.engine.impl.ProcessEngineImpl",
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.impl.util.ReflectUtil",
+      "org.camunda.bpm.engine.ProcessEngineServices",
+      "com.att.camunda.bpm.plugin.urnmap.db.URNData"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNServiceESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.camunda.bpm.engine.impl.context.Context",
+      "org.camunda.bpm.engine.ProcessEngines",
+      "org.camunda.bpm.engine.impl.util.ReflectUtil"
+    );
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java
new file mode 100644 (file)
index 0000000..56d7283
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:45:16 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+import com.att.camunda.bpm.plugin.urnmap.db.URNData;
+
+import java.util.NoSuchElementException;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ProcessInstanceResourceESTest extends ProcessInstanceResourceESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource((String) null);
+      // Undeclared exception!
+      try { 
+        processInstanceResource0.getUrnDataMap();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.camunda.bpm.cockpit.Cockpit", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("DEUtDF$-rb|D]l9");
+      // Undeclared exception!
+      try { 
+        processInstanceResource0.insertNewRow("DEUtDF$-rb|D]l9");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.camunda.bpm.cockpit.Cockpit", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      URNData uRNData0 = new URNData();
+      ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("|");
+      // Undeclared exception!
+      try { 
+        processInstanceResource0.getPersistData(uRNData0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.camunda.bpm.cockpit.Cockpit", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("xGUKD= Ea6(aT");
+      // Undeclared exception!
+      try { 
+        processInstanceResource0.insertNewRow("xGUKD= Ea6(aT");
+        fail("Expecting exception: NoSuchElementException");
+      
+      } catch(NoSuchElementException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.util.StringTokenizer", e);
+      }
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java
new file mode 100644 (file)
index 0000000..bb115f1
--- /dev/null
@@ -0,0 +1,94 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:45:16 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ProcessInstanceResourceESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.ProcessInstanceResource"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ProcessInstanceResourceESTestscaffolding.class.getClassLoader() ,
+      "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
+      "org.camunda.bpm.cockpit.CockpitRuntimeDelegate",
+      "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
+      "org.camunda.bpm.webapp.AppRuntimeDelegate",
+      "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource",
+      "org.camunda.bpm.cockpit.db.QueryService",
+      "org.camunda.bpm.engine.ProcessEngine",
+      "com.att.camunda.bpm.plugin.urnmap.resources.ProcessInstanceResource",
+      "org.camunda.bpm.engine.ProcessEngineServices",
+      "org.camunda.bpm.cockpit.db.CommandExecutor",
+      "org.camunda.bpm.cockpit.Cockpit",
+      "com.att.camunda.bpm.plugin.urnmap.db.URNData"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ProcessInstanceResourceESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.camunda.bpm.cockpit.Cockpit"
+    );
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java
new file mode 100644 (file)
index 0000000..ba562f9
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:48:27 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+import org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.evosuite.runtime.javaee.injection.Injector;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class URNMapPluginRootResourceESTest extends URNMapPluginRootResourceESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      URNMapPluginRootResource uRNMapPluginRootResource0 = new URNMapPluginRootResource();
+      HttpHeaders httpHeaders0 = mock(HttpHeaders.class, new ViolatedAssumptionAnswer());
+      Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "headers", (Object) httpHeaders0);
+      ServletContext servletContext0 = mock(ServletContext.class, new ViolatedAssumptionAnswer());
+      Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "servletContext", (Object) servletContext0);
+      UriInfo uriInfo0 = mock(UriInfo.class, new ViolatedAssumptionAnswer());
+      Injector.inject(uRNMapPluginRootResource0, (Class<?>) AbstractAppPluginRootResource.class, "uriInfo", (Object) uriInfo0);
+      Injector.validateBean(uRNMapPluginRootResource0, (Class<?>) URNMapPluginRootResource.class);
+      URNResource uRNResource0 = uRNMapPluginRootResource0.getProcessInstanceResource("}+njRy')#n?K^");
+      assertNotNull(uRNResource0);
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java
new file mode 100644 (file)
index 0000000..2707052
--- /dev/null
@@ -0,0 +1,119 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:48:27 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNMapPluginRootResourceESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader() ,
+      "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
+      "org.camunda.bpm.webapp.plugin.spi.AppPlugin",
+      "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.camunda.bpm.cockpit.Cockpit",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.camunda.bpm.engine.rest.exception.RestException",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.camunda.bpm.plugin.urnmap.db.URNData",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.camunda.bpm.webapp.AppRuntimeDelegate",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.configuration.EELFManager",
+      "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
+      "org.openecomp.mso.logger.MsoLogger$Catalog"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.camunda.bpm.cockpit.Cockpit",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
+      "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource"
+    );
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java
new file mode 100644 (file)
index 0000000..2c0a5ea
--- /dev/null
@@ -0,0 +1,162 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 13:47:41 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+import com.att.camunda.bpm.plugin.urnmap.db.URNData;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.List;
+import java.util.NoSuchElementException;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class URNResourceESTest extends URNResourceESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("pE|b");
+      PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
+      doReturn((-3202)).when(preparedStatement0).executeUpdate();
+      Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+      doReturn("").when(connection0).toString();
+      doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
+      PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+      uRNResource0.insertNewRow("pE|b");
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("pE|b");
+      Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(connection0).toString();
+      doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString());
+      PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+      uRNResource0.insertNewRow("pE|b");
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("");
+      List<URNData> list0 = uRNResource0.getUrnDataMap();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("pE|b");
+      PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
+      doReturn((-3202)).when(preparedStatement0).executeUpdate();
+      Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+      doReturn("").when(connection0).toString();
+      doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
+      PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+      URNData uRNData0 = new URNData();
+      uRNResource0.getPersistData(uRNData0);
+      assertNull(uRNData0.getVer_());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("pE|b");
+      Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(connection0).toString();
+      doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString());
+      PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+      URNData uRNData0 = new URNData();
+      uRNResource0.getPersistData(uRNData0);
+      assertNull(uRNData0.getVer_());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("LR6iOYH?>Bg%1-x=lK");
+      // Undeclared exception!
+      try { 
+        uRNResource0.insertNewRow("LR6iOYH?>Bg%1-x=lK");
+        fail("Expecting exception: NoSuchElementException");
+      
+      } catch(NoSuchElementException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.util.StringTokenizer", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("");
+      // Undeclared exception!
+      try { 
+        uRNResource0.insertNewRow((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.util.StringTokenizer", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("pE|b");
+      // Undeclared exception!
+      try { 
+        uRNResource0.getUrnDataMapOLD();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.camunda.bpm.cockpit.Cockpit", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("");
+      Connection connection0 = uRNResource0.getDBConnection();
+      assertNull(connection0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("pE|b");
+      Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(connection0).toString();
+      PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+      Connection connection1 = uRNResource0.getDBConnection();
+      assertSame(connection1, connection0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      URNResource uRNResource0 = new URNResource("pE|b");
+      ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer());
+      doReturn(false).when(resultSet0).next();
+      PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer());
+      doReturn(resultSet0).when(preparedStatement0).executeQuery();
+      Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer());
+      doReturn("").when(connection0).toString();
+      doReturn(preparedStatement0).when(connection0).prepareStatement(anyString());
+      PrivateAccess.setVariable((Class<URNResource>) URNResource.class, uRNResource0, "conn", (Object) connection0);
+      List<URNData> list0 = uRNResource0.getUrnDataMap();
+      assertTrue(list0.isEmpty());
+  }
+}
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java
new file mode 100644 (file)
index 0000000..885426f
--- /dev/null
@@ -0,0 +1,400 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 13:47:41 GMT 2016
+ */
+
+package com.att.camunda.bpm.plugin.urnmap.resources;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class URNResourceESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.URNResource"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNResourceESTestscaffolding.class.getClassLoader() ,
+      "org.h2.store.LobStorage",
+      "com.mysql.jdbc.VersionedStringProperty",
+      "com.mysql.jdbc.StatementInterceptorV2",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty",
+      "org.h2.engine.SessionInterface",
+      "org.h2.index.BaseIndex",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty",
+      "org.h2.store.fs.FileNioMemData",
+      "org.h2.store.fs.FileNioMem",
+      "org.h2.store.fs.FilePathCrypt$FileCrypt",
+      "org.h2.result.Row",
+      "org.h2.engine.RightOwner",
+      "org.h2.table.TableView",
+      "com.mysql.jdbc.JDBC4ClientInfoProvider",
+      "com.mysql.jdbc.CachedResultSetMetaData",
+      "org.h2.store.fs.FileMem$1",
+      "com.mysql.jdbc.ConnectionFeatureNotAvailableException",
+      "org.h2.security.BlockCipher",
+      "org.h2.command.CommandInterface",
+      "com.mysql.jdbc.MysqlIO",
+      "com.mysql.jdbc.Connection",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.mysql.jdbc.ConnectionPropertiesImpl",
+      "org.h2.constant.DbSettings",
+      "com.mysql.jdbc.SingleByteCharsetConverter",
+      "com.mysql.jdbc.PingTarget",
+      "org.h2.index.PageIndex",
+      "org.h2.util.BitField",
+      "org.h2.value.ValueNull",
+      "org.h2.value.ValueShort",
+      "com.mysql.jdbc.SocketFactory",
+      "org.h2.value.ValueDecimal",
+      "com.mysql.jdbc.PacketTooBigException",
+      "com.mysql.jdbc.log.StandardLogger",
+      "com.mysql.jdbc.ConnectionImpl$3",
+      "com.mysql.jdbc.ConnectionImpl$2",
+      "com.mysql.jdbc.ConnectionImpl$5",
+      "com.mysql.jdbc.ConnectionImpl$4",
+      "com.mysql.jdbc.ConnectionImpl$7",
+      "com.mysql.jdbc.ConnectionImpl$6",
+      "org.h2.util.SmallLRUCache",
+      "org.h2.mvstore.Chunk",
+      "com.mysql.jdbc.ConnectionImpl$9",
+      "com.mysql.jdbc.ConnectionImpl$8",
+      "com.mysql.jdbc.log.Log",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty",
+      "com.mysql.jdbc.StringUtils",
+      "org.h2.mvstore.MVStore",
+      "org.h2.engine.DbObjectBase",
+      "org.h2.store.FileLock",
+      "com.mysql.jdbc.ResultSetImpl",
+      "org.h2.schema.Sequence",
+      "org.h2.value.Value",
+      "org.h2.store.fs.FilePathMem",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty",
+      "org.h2.store.fs.FilePath",
+      "org.h2.engine.DatabaseCloser",
+      "org.h2.expression.ExpressionColumn",
+      "com.mysql.jdbc.Statement",
+      "com.mysql.jdbc.Buffer",
+      "org.h2.store.fs.FilePathNioMem",
+      "com.mysql.jdbc.ParameterBindings",
+      "org.h2.security.SecureFileStore",
+      "org.h2.store.fs.FileMem",
+      "com.mysql.jdbc.BufferRow",
+      "org.h2.expression.Expression",
+      "org.h2.store.fs.FileSplit",
+      "org.h2.util.Utils$1",
+      "org.h2.value.CompareMode",
+      "org.h2.util.Utils",
+      "com.mysql.jdbc.exceptions.MySQLTimeoutException",
+      "org.h2.command.dml.SetTypes",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.h2.jdbcx.JdbcDataSourceFactory",
+      "com.mysql.jdbc.Util",
+      "org.camunda.bpm.cockpit.Cockpit",
+      "org.h2.value.ValueString",
+      "org.h2.value.ValueJavaObject",
+      "org.h2.store.PageStore",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$XmlMap",
+      "org.h2.schema.Schema",
+      "org.h2.engine.SettingsBase",
+      "com.mysql.jdbc.CommunicationsException",
+      "org.h2.value.CompareModeDefault",
+      "org.h2.engine.SessionWithState",
+      "org.h2.table.TableLinkConnection",
+      "org.h2.message.Trace",
+      "org.h2.engine.Comment",
+      "org.h2.util.New",
+      "org.camunda.bpm.engine.ProcessEngine",
+      "org.h2.value.ValueInt",
+      "org.h2.util.CacheWriter",
+      "com.mysql.jdbc.CompressedInputStream",
+      "org.h2.result.ResultInterface",
+      "org.h2.util.StringUtils",
+      "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource",
+      "org.h2.table.IndexColumn",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.h2.value.CompareModeIcu4J",
+      "com.mysql.jdbc.ResultSetRow",
+      "com.mysql.jdbc.ConnectionImpl",
+      "com.mysql.jdbc.log.NullLogger",
+      "org.camunda.bpm.cockpit.db.QueryService",
+      "org.camunda.bpm.engine.ProcessEngineServices",
+      "com.mysql.jdbc.JDBC4PreparedStatement",
+      "org.h2.schema.SchemaObject",
+      "org.h2.store.FileStore",
+      "org.h2.engine.SessionRemote",
+      "org.h2.value.ValueUuid",
+      "org.h2.mvstore.type.DataType",
+      "org.h2.index.IndexType",
+      "org.h2.value.ValueDate",
+      "org.h2.result.SearchRow",
+      "org.h2.table.Table",
+      "com.att.camunda.bpm.plugin.urnmap.db.URNData",
+      "org.h2.store.fs.FileMemData",
+      "org.h2.value.ValueFloat",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.camunda.bpm.webapp.AppRuntimeDelegate",
+      "org.h2.value.Transfer",
+      "com.mysql.jdbc.Messages",
+      "org.h2.store.fs.FileDisk",
+      "com.mysql.jdbc.NetworkResources",
+      "org.h2.result.RowList",
+      "com.mysql.jdbc.CallableStatement$CallableStatementParamInfo",
+      "org.h2.constant.ErrorCode",
+      "com.mysql.jdbc.Collation",
+      "org.h2.message.TraceObject",
+      "com.mysql.jdbc.ByteArrayRow",
+      "org.h2.store.fs.FileChannelOutputStream",
+      "org.h2.value.ValueBoolean",
+      "org.h2.value.ValueLobDb",
+      "org.h2.util.SourceCompiler",
+      "org.h2.engine.UserDataType",
+      "org.h2.constraint.Constraint",
+      "org.h2.table.TableBase",
+      "org.h2.jdbcx.JdbcConnectionPool",
+      "com.mysql.jdbc.authentication.Sha256PasswordPlugin",
+      "org.h2.value.ValueLong",
+      "org.h2.engine.DbObject",
+      "com.mysql.jdbc.JDBC4CallableStatement",
+      "org.h2.util.SortedProperties",
+      "org.h2.value.ValueStringIgnoreCase",
+      "org.h2.table.PlanItem",
+      "org.h2.jdbcx.JdbcXAConnection",
+      "org.h2.engine.UserAggregate",
+      "org.h2.message.DbException",
+      "com.mysql.jdbc.JDBC4ServerPreparedStatement",
+      "org.h2.mvstore.MVMapConcurrent",
+      "com.mysql.jdbc.Extension",
+      "org.hsqldb.jdbc.JDBCDriver",
+      "org.h2.engine.Database",
+      "org.h2.api.DatabaseEventListener",
+      "org.h2.jdbcx.JdbcDataSource",
+      "org.h2.schema.TriggerObject",
+      "org.h2.store.DataReader",
+      "com.mysql.jdbc.StatementImpl",
+      "org.hsqldb.jdbc.JDBCDriver$1",
+      "org.h2.value.ValueBytes",
+      "org.h2.value.ValueResultSet",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.h2.value.ValueDouble",
+      "com.mysql.jdbc.CallableStatement$CallableStatementParam",
+      "org.h2.schema.SchemaObjectBase",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.mysql.jdbc.StatementImpl$CancelTask$1",
+      "org.h2.mvstore.Page",
+      "org.h2.index.PageDelegateIndex",
+      "org.h2.store.fs.FileBase",
+      "com.mysql.jdbc.StatementImpl$CancelTask",
+      "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
+      "org.h2.message.TraceWriter",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.h2.table.Column",
+      "org.h2.engine.Session",
+      "org.h2.engine.Mode",
+      "com.mysql.jdbc.exceptions.MySQLTransientException",
+      "org.h2.engine.Setting",
+      "org.h2.util.SourceCompiler$1",
+      "org.h2.value.ValueArray",
+      "com.mysql.jdbc.MySQLConnection",
+      "org.h2.util.TempFileDeleter",
+      "org.h2.store.fs.FileNioMem$1",
+      "com.mysql.jdbc.AuthenticationPlugin",
+      "org.h2.util.MathUtils",
+      "org.h2.mvstore.DataUtils",
+      "org.h2.store.fs.FilePathSplit",
+      "org.h2.value.ValueStringFixed",
+      "com.mysql.jdbc.JDBC4Connection",
+      "com.mysql.jdbc.NonRegisteringDriver$1",
+      "org.h2.engine.User",
+      "org.h2.value.ValueTimestamp",
+      "org.h2.value.Value$ValueBlob",
+      "org.h2.store.fs.FilePathWrapper",
+      "org.h2.constant.SysProperties",
+      "com.mysql.jdbc.IterateBlock",
+      "org.h2.table.RegularTable",
+      "com.mysql.jdbc.Util$RandStructcture",
+      "org.h2.store.fs.FileChannelInputStream",
+      "com.mysql.jdbc.exceptions.MySQLStatementCancelledException",
+      "com.mysql.jdbc.PreparedStatement",
+      "org.h2.compress.Compressor",
+      "com.mysql.jdbc.util.LRUCache",
+      "com.mysql.jdbc.util.ReadAheadInputStream",
+      "org.h2.index.Index",
+      "com.mysql.jdbc.MysqlDataTruncation",
+      "com.mysql.jdbc.CharsetMapping",
+      "org.h2.store.fs.FilePathDisk",
+      "org.h2.mvstore.MVMap",
+      "com.mysql.jdbc.Field",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.mysql.jdbc.PreparedStatement$BatchVisitor",
+      "org.h2.store.DataHandler",
+      "org.h2.jdbc.JdbcConnection",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty",
+      "com.mysql.jdbc.ConnectionProperties",
+      "org.h2.Driver",
+      "org.h2.engine.Role",
+      "com.mysql.jdbc.Driver",
+      "org.h2.value.ValueByte",
+      "com.mysql.jdbc.ServerPreparedStatement",
+      "org.camunda.bpm.cockpit.db.CommandExecutor",
+      "com.mysql.jdbc.exceptions.MySQLNonTransientException",
+      "org.camunda.bpm.cockpit.CockpitRuntimeDelegate",
+      "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource",
+      "com.mysql.jdbc.MysqlSavepoint",
+      "com.mysql.jdbc.CallableStatement",
+      "com.mysql.jdbc.RowData",
+      "org.h2.value.Value$ValueClob",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.h2.value.ValueJavaObject$NotSerialized",
+      "org.h2.value.CaseInsensitiveMap",
+      "com.mysql.jdbc.CallableStatement$CallableStatementParamInfoJDBC3",
+      "org.h2.util.IOUtils",
+      "com.mysql.jdbc.PreparedStatement$ParseInfo",
+      "org.h2.message.TraceSystem",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.configuration.EELFManager",
+      "com.mysql.jdbc.StreamingNotifiable",
+      "com.mysql.jdbc.ResultSetInternalMethods",
+      "org.h2.command.Prepared",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty",
+      "com.mysql.jdbc.NonRegisteringDriver",
+      "org.h2.jdbc.JdbcSQLException",
+      "org.h2.mvstore.MVMap$MapBuilder",
+      "org.h2.engine.ConnectionInfo",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "com.mysql.jdbc.ExceptionInterceptor",
+      "org.h2.value.ValueTime"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNResourceESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.camunda.bpm.plugin.urnmap.resources.URNResource",
+      "org.camunda.bpm.cockpit.Cockpit",
+      "org.h2.jdbcx.JdbcConnectionPool",
+      "org.h2.message.TraceObject",
+      "com.mysql.jdbc.NonRegisteringDriver",
+      "com.mysql.jdbc.Driver",
+      "org.hsqldb.jdbc.JDBCDriver",
+      "org.h2.Driver",
+      "org.h2.jdbcx.JdbcDataSource",
+      "org.h2.jdbcx.JdbcDataSourceFactory",
+      "org.h2.message.TraceSystem",
+      "org.h2.util.Utils",
+      "org.h2.util.MathUtils",
+      "org.h2.constant.SysProperties",
+      "org.h2.message.Trace",
+      "org.h2.util.StringUtils",
+      "org.h2.value.Value",
+      "org.h2.value.ValueDecimal",
+      "org.h2.jdbcx.JdbcXAConnection",
+      "org.h2.mvstore.MVStore",
+      "com.mysql.jdbc.Messages",
+      "com.mysql.jdbc.ConnectionPropertiesImpl",
+      "com.mysql.jdbc.Util",
+      "com.mysql.jdbc.ConnectionImpl",
+      "com.mysql.jdbc.JDBC4Connection",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty",
+      "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty",
+      "com.mysql.jdbc.StringUtils",
+      "com.mysql.jdbc.CharsetMapping",
+      "com.mysql.jdbc.log.StandardLogger",
+      "org.h2.engine.SessionRemote",
+      "org.h2.mvstore.DataUtils",
+      "org.h2.message.DbException",
+      "org.h2.constant.ErrorCode",
+      "org.h2.jdbc.JdbcSQLException",
+      "org.h2.command.dml.SetTypes",
+      "org.h2.engine.ConnectionInfo",
+      "org.h2.engine.Database",
+      "org.h2.util.BitField",
+      "org.h2.engine.Mode",
+      "org.h2.store.fs.FilePath",
+      "org.h2.store.fs.FilePathDisk",
+      "org.h2.store.fs.FilePathMem",
+      "org.h2.store.fs.FilePathNioMem",
+      "org.h2.store.fs.FilePathSplit",
+      "org.h2.constant.DbSettings",
+      "org.h2.value.CompareMode",
+      "org.h2.store.FileLock",
+      "org.h2.util.SortedProperties",
+      "org.h2.table.Table",
+      "com.mysql.jdbc.StatementImpl",
+      "com.mysql.jdbc.PreparedStatement",
+      "com.mysql.jdbc.MysqlIO",
+      "com.mysql.jdbc.CallableStatement"
+    );
+  }
+}
diff --git a/bpmn/pom.xml b/bpmn/pom.xml
new file mode 100644 (file)
index 0000000..ebcce1d
--- /dev/null
@@ -0,0 +1,159 @@
+<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.openecomp</groupId>
+               <artifactId>mso</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>bpmn</artifactId>
+       <name>BPMN Subsystem</name>
+       <description>BPMN Subsystem for MSO</description>
+       <packaging>pom</packaging>
+       
+       <properties>
+               <camunda.version>7.3.0</camunda.version>
+               <camunda.bpm.assert.version>1.2</camunda.bpm.assert.version>
+               <h2.version>1.3.173</h2.version>
+               <groovy.version>2.4.7</groovy.version>
+               <saxon.version>9.5.1-8</saxon.version>
+               <junit.version>4.11</junit.version>
+               <xmlunit.version>1.6</xmlunit.version>
+               
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+               
+       </properties>
+
+       <modules>
+               <module>MSOCoreBPMN</module>
+               <module>MSORESTClient</module>
+               <module>MSOGammaBPMN</module>
+               <module>MSOURN-plugin</module>
+               <module>MSOCockpit</module>
+
+       </modules>
+       
+       <!-- Define artifact versions for child modules -->
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>org.camunda.bpm</groupId>
+                               <artifactId>camunda-bom</artifactId>
+                               <version>${camunda.version}</version>
+                               <scope>import</scope>
+                               <type>pom</type>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.camunda.bpm.extension</groupId>
+                               <artifactId>camunda-bpm-assert</artifactId>
+                               <version>${camunda.bpm.assert.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>com.h2database</groupId>
+                               <artifactId>h2</artifactId>
+                               <version>${h2.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.codehaus.groovy</groupId>
+                               <artifactId>groovy-all</artifactId>
+                               <version>${groovy.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>net.sf.saxon</groupId>
+                               <artifactId>Saxon-HE</artifactId>
+                               <version>${saxon.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>junit</groupId>
+                               <artifactId>junit</artifactId>
+                               <version>${junit.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>xmlunit</groupId>
+                               <artifactId>xmlunit</artifactId>
+                               <version>${xmlunit.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>javax.activation</groupId>
+                               <artifactId>activation</artifactId>
+                               <version>1.1.1</version>
+                               <scope>compile</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.springframework</groupId>
+                               <artifactId>spring-beans</artifactId>
+                               <version>3.2.4.RELEASE</version>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
+       
+       <dependencies>
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpcore</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpclient</artifactId>
+               </dependency>
+       </dependencies>
+       
+       <build>
+       <plugins>
+       
+               <plugin>
+                       <groupId>org.apache.maven.plugins</groupId>
+                       <artifactId>maven-surefire-plugin</artifactId>
+                       <version>2.17</version>
+                       <configuration>
+                               <testFailureIgnore>true</testFailureIgnore>
+                               <argLine>-Xss1m @{argLine}</argLine>
+                       </configuration>
+<!--                   <configuration>
+                               <testFailureIgnore>true</testFailureIgnore>
+                               <forkCount>1</forkCount>
+                               <forkMode>once</forkMode>
+                       </configuration> -->
+               </plugin>
+
+       </plugins>
+       <pluginManagement>
+               <plugins>
+                       <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                       <plugin>
+                               <groupId>org.eclipse.m2e</groupId>
+                               <artifactId>lifecycle-mapping</artifactId>
+                               <version>1.0.0</version>
+                               <configuration>
+                                       <lifecycleMappingMetadata>
+                                               <pluginExecutions>
+                                                       <pluginExecution>
+                                                               <pluginExecutionFilter>
+                                                                       <groupId>org.jacoco</groupId>
+                                                                       <artifactId>
+                                                                               jacoco-maven-plugin
+                                                                       </artifactId>
+                                                                       <versionRange>
+                                                                               [0.7.1.201405082137,)
+                                                                       </versionRange>
+                                                                       <goals>
+                                                                               <goal>prepare-agent</goal>
+                                                                       </goals>
+                                                               </pluginExecutionFilter>
+                                                               <action>
+                                                                       <ignore></ignore>
+                                                               </action>
+                                                       </pluginExecution>
+                                               </pluginExecutions>
+                                       </lifecycleMappingMetadata>
+                               </configuration>
+                       </plugin>
+               
+               </plugins>
+       </pluginManagement>
+       </build>
+</project>
diff --git a/common/pom.xml b/common/pom.xml
new file mode 100644 (file)
index 0000000..30c8689
--- /dev/null
@@ -0,0 +1,166 @@
+<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.openecomp</groupId>
+        <artifactId>mso</artifactId>
+        <version>0.0.4-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.openecomp.mso</groupId>
+    <artifactId>common</artifactId>
+    <name>MSO Common classes</name>
+    <description>MSO Common classes:- Logger</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.att.eelf</groupId>
+            <artifactId>eelf-core</artifactId>
+            <version>0.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>3.1.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+            <version>3.0.19.Final</version>
+            <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpclient</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.spec.javax.ejb</groupId>
+            <artifactId>jboss-ejb-api_3.2_spec</artifactId>
+            <version>1.0.0.Final</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.ejb3</groupId>
+            <artifactId>jboss-ejb3-ext-api</artifactId>
+            <version>2.2.0.Final</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+            <version>1.9.13</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.10.19</version>
+            <scope>test</scope>
+        </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>
+       <plugins>
+               <plugin>
+                       <groupId>com.att.eelf</groupId>
+                       <artifactId>eelf-maven-plugin</artifactId>
+                       <version>0.0.1</version>
+                       <executions>
+                               <execution>
+                                       <id>validate</id>
+                                       <phase>install</phase>
+                                       <goals>
+                                               <goal>ValidateApplicationMsgs</goal>
+                                       </goals>
+                                       <configuration>
+                                               <resources>
+                                                       <resource>
+                                                               <messageClass>org.openecomp.mso.logger.MessageEnum</messageClass>
+                                                       </resource>
+                                               </resources>
+                                       </configuration>
+                               </execution>
+                               <execution>
+                                       <id>wiki</id>
+                                       <phase>install</phase>
+                                       <goals>
+                                               <goal>WikiMsgGenerator</goal>
+                                       </goals>
+                                       <configuration>
+                                               <outputDirectory>target/messages</outputDirectory>
+                                               <outputFile>messages.html</outputFile>
+                                               <wiki>
+                                                       <title>Messages and Codes</title>
+                                                       <space>APP</space>
+                                                       <page>Messages and Codes</page>
+                                                       <principal>test</principal>
+                                                       <credentials>test</credentials>
+                                                       <url>http://wiki.web.att.com</url>
+                                               </wiki>
+                                               <resources>
+                                                       <resource>
+                                                               <messageClass>org.openecomp.mso.logger.MessageEnum</messageClass>
+                                                               <header><![CDATA[<p>   <ac:macro ac:name="toc"/> </p>
+<!--                 <p> -->
+<!--         <ac:macro ac:name="anchor"> <ac:default-parameter>Application Messages</ac:default-parameter>  </ac:macro> </p> <h2>Application Messages</h2>]]></header>
+                                                               -->
+                                                       </resource>
+                                               </resources>
+                                       </configuration>
+                               </execution>
+                       </executions>
+                       <dependencies>
+                               <dependency>
+                                       <groupId>org.openecomp.mso</groupId>
+                                       <artifactId>common</artifactId>
+                                       <version>${project.version}</version>
+                               </dependency>
+                       </dependencies>
+
+               </plugin>
+       </plugins>
+    </build>
+</project>
diff --git a/common/src/main/java/org/openecomp/mso/entity/MsoRequest.java b/common/src/main/java/org/openecomp/mso/entity/MsoRequest.java
new file mode 100644 (file)
index 0000000..4f3a4ab
--- /dev/null
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.entity;
+
+
+
+/**
+ * This simple bean holds tracking information for MSO requests within
+ * the adapters.  This tracking information should be added to logs,
+ * metrics, alarms as appropriate.
+ * 
+ *
+ */
+public class MsoRequest
+{
+       private String requestId;
+       private String serviceInstanceId;
+
+       public MsoRequest() {
+               this.requestId = null;
+               this.serviceInstanceId = null;
+       }
+       public MsoRequest(String r, String s) {
+               this.requestId = r;
+               this.serviceInstanceId = s;
+       }
+
+       public String getRequestId() {
+               return requestId;
+       }
+
+       public void setRequestId(String requestId) {
+               this.requestId = requestId;
+       }
+
+       public String getServiceInstanceId() {
+               return serviceInstanceId;
+       }
+
+       public void setServiceInstanceId(String serviceInstanceId) {
+               this.serviceInstanceId = serviceInstanceId;
+       }
+}
diff --git a/common/src/main/java/org/openecomp/mso/entity/package-info.java b/common/src/main/java/org/openecomp/mso/entity/package-info.java
new file mode 100644 (file)
index 0000000..e97a588
--- /dev/null
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+/**
+ * Entities used for logging.
+ */
+
+package org.openecomp.mso.entity;
+
diff --git a/common/src/main/java/org/openecomp/mso/logger/LogFilter.java b/common/src/main/java/org/openecomp/mso/logger/LogFilter.java
new file mode 100644 (file)
index 0000000..ca25ad2
--- /dev/null
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.logger;
+
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.MDC;
+
+import java.io.IOException;
+import java.security.Principal;
+
+public class LogFilter implements Filter {
+       @Override
+       public void destroy() {
+               // Nothing to do.
+       }
+
+       @Override
+       public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
+               final HttpServletRequest httpRequest = (HttpServletRequest) request;
+               final HttpServletResponse httpResponse = (HttpServletResponse) response;
+
+               MDC.clear ();
+               MDC.put (MsoLogger.REMOTE_HOST, httpRequest.getRemoteAddr());
+
+               Principal userPrincipal = httpRequest.getUserPrincipal();
+               if (null != userPrincipal) {
+                       MDC.put (MsoLogger.PARTNERNAME, userPrincipal.getName ());
+               }
+               chain.doFilter(httpRequest, httpResponse);
+       }
+       
+       @Override
+       public void init(final FilterConfig config) throws ServletException {
+               // Nothing to do
+       }
+}
diff --git a/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java b/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java
new file mode 100644 (file)
index 0000000..89f6df9
--- /dev/null
@@ -0,0 +1,229 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.logger;
+
+
+import com.att.eelf.i18n.EELFResolvableErrorEnum;
+import com.att.eelf.i18n.EELFResourceManager;
+
+public enum MessageEnum implements EELFResolvableErrorEnum{
+       // Api Handler Messages
+       APIH_REQUEST_NULL,
+       APIH_QUERY_FOUND,
+       APIH_QUERY_NOT_FOUND,
+       APIH_QUERY_PARAM_WRONG,
+       APIH_DB_ACCESS_EXC,
+       APIH_DB_ACCESS_EXC_REASON,
+       APIH_VALIDATION_ERROR,
+       APIH_REQUEST_VALIDATION_ERROR,
+       APIH_SERVICE_VALIDATION_ERROR,
+       APIH_GENERAL_EXCEPTION_ARG,
+       APIH_GENERAL_EXCEPTION,
+       APIH_GENERAL_WARNING,
+       APIH_AUDIT_EXEC,
+       APIH_GENERAL_METRICS,
+       APIH_DUPLICATE_CHECK_EXC,
+       APIH_DUPLICATE_FOUND,
+       APIH_BAD_ORDER,
+       APIH_DB_ATTRIBUTE_NOT_FOUND,
+       APIH_BPEL_COMMUNICATE_ERROR,
+       APIH_BPEL_RESPONSE_ERROR,
+       APIH_WARP_REQUEST,
+       APIH_ERROR_FROM_BPEL_SERVER,
+       APIH_DB_INSERT_EXC,
+       APIH_DB_UPDATE_EXC,
+       APIH_NO_PROPERTIES,
+       APIH_PROPERTY_LOAD_SUC,
+       APIH_LOAD_PROPERTIES_FAIL,
+       APIH_SDNC_COMMUNICATE_ERROR,
+       APIH_SDNC_RESPONSE_ERROR,
+       APIH_CANNOT_READ_SCHEMA,
+       APIH_HEALTH_CHECK_EXCEPTION,
+       APIH_REQUEST_VALIDATION_ERROR_REASON,
+       APIH_JAXB_MARSH_ERROR,
+       APIH_JAXB_UNMARSH_ERROR,
+       APIH_VNFREQUEST_VALIDATION_ERROR,
+       APIH_DOM2STR_ERROR,
+       APIH_READ_VNFOUTPUT_CLOB_EXCEPTION,
+       APIH_DUPLICATE_CHECK_EXC_ATT,
+       APIH_GENERATED_REQUEST_ID,
+       APIH_GENERATED_SERVICE_INSTANCE_ID,
+       APIH_REPLACE_REQUEST_ID,
+       // Resource Adapter Messages
+       RA_GENERAL_EXCEPTION_ARG,
+       RA_GENERAL_EXCEPTION,
+       RA_GENERAL_WARNING,
+       RA_MISSING_PARAM,
+       RA_AUDIT_EXEC,
+       RA_GENERAL_METRICS,
+       RA_CREATE_STACK_TIMEOUT,
+       RA_DELETE_STACK_TIMEOUT,
+       RA_UPDATE_STACK_TIMEOUT,
+       RA_CONNECTION_EXCEPTION,
+       RA_PARSING_ERROR,
+       RA_PROPERTIES_NOT_FOUND,
+       RA_LOAD_PROPERTIES_SUC,
+       RA_NETWORK_ALREADY_EXIST,
+       RA_UPDATE_NETWORK_ERR,
+       RA_CREATE_STACK_ERR,
+       RA_UPDATE_STACK_ERR,
+       RA_CREATE_TENANT_ERR,
+       RA_NETWORK_NOT_FOUND,
+       RA_NETWORK_ORCHE_MODE_NOT_SUPPORT,
+       RA_CREATE_NETWORK_EXC,
+       RA_PARAM_NOT_FOUND,
+       RA_CONFIG_EXC,
+       RA_UNKOWN_PARAM,
+       RA_VLAN_PARSE,
+       RA_DELETE_NETWORK_EXC,
+       RA_ROLLBACK_NULL,
+       RA_TENANT_NOT_FOUND,
+       RA_QUERY_NETWORK_EXC,
+       RA_CREATE_NETWORK_NOTIF_EXC,
+       RA_ASYNC_ROLLBACK,
+       RA_WSDL_NOT_FOUND,
+       RA_WSDL_URL_CONVENTION_EXC,
+       RA_INIT_NOTIF_EXC,
+       RA_SET_CALLBACK_AUTH_EXC,
+       RA_FAULT_INFO_EXC,
+       RA_MARSHING_ERROR,
+       RA_PARSING_REQUEST_ERROR,
+       RA_SEND_REQUEST_SDNC,
+       RA_RESPONSE_FROM_SDNC,
+       RA_EXCEPTION_COMMUNICATE_SDNC,
+       RA_EVALUATE_XPATH_ERROR,
+       RA_ANALYZE_ERROR_EXC,
+       RA_ERROR_GET_RESPONSE_SDNC,
+       RA_CALLBACK_BPEL,
+       RA_INIT_CALLBACK_WSDL_ERR,
+       RA_CALLBACK_BPEL_EXC,
+       RA_CALLBACK_BPEL_COMPLETE,
+       RA_SDNC_MISS_CONFIG_PARAM,
+       RA_SDNC_INVALID_CONFIG,
+       RA_PRINT_URL,
+       RA_ERROR_CREATE_SDNC_REQUEST,
+       RA_ERROR_CREATE_SDNC_RESPONSE,
+       RA_ERROR_CONVERT_XML2STR,
+       RA_RECEIVE_SDNC_NOTIF,
+       RA_INIT_SDNC_ADAPTER,
+       RA_SEND_REQUEST_APPC_ERR,
+       RA_SEND_REQUEST_SDNC_ERR,
+       RA_RECEIVE_BPEL_REQUEST,
+       RA_TENANT_ALREADY_EXIST,
+       RA_UPDATE_TENANT_ERR,
+       RA_DELETE_TEMAMT_ERR,
+       RA_ROLLBACK_TENANT_ERR,
+       RA_QUERY_VNF_ERR,
+       RA_VNF_ALREADY_EXIST,
+       RA_VNF_UNKNOWN_PARAM,
+       RA_VNF_EXTRA_PARAM,
+       RA_CREATE_VNF_ERR,
+       RA_VNF_NOT_EXIST,
+       RA_UPDATE_VNF_ERR,
+       RA_DELETE_VNF_ERR,
+       RA_ASYNC_CREATE_VNF,
+       RA_SEND_VNF_NOTIF_ERR,
+       RA_ASYNC_CREATE_VNF_COMPLETE,
+       RA_ASYNC_UPDATE_VNF,
+       RA_ASYNC_UPDATE_VNF_COMPLETE,
+       RA_ASYNC_QUERY_VNF,
+       RA_ASYNC_QUERY_VNF_COMPLETE,
+       RA_ASYNC_DELETE_VNF,
+       RA_ASYNC_DELETE_VNF_COMPLETE,
+       RA_ASYNC_ROLLBACK_VNF,
+       RA_ASYNC_ROLLBACK_VNF_COMPLETE,
+       RA_ROLLBACK_VNF_ERR,
+       RA_DB_INVALID_STATUS,
+       RA_CANT_UPDATE_REQUEST,
+       RA_DB_REQUEST_NOT_EXIST,
+       RA_CONFIG_NOT_FOUND,
+       RA_CONFIG_LOAD,
+       // BPEL engine Messages
+       BPMN_GENERAL_INFO,
+       BPMN_GENERAL_EXCEPTION_ARG,
+       BPMN_GENERAL_EXCEPTION,
+       BPMN_GENERAL_WARNING,
+       BPMN_AUDIT_EXEC,
+       BPMN_GENERAL_METRICS,
+       BPMN_URN_MAPPING_FAIL,
+       BPMN_VARIABLE_NULL,
+       BPMN_SDNC_CALLBACK_EXCEPTION,
+       // ASDC Messages
+       ASDC_GENERAL_EXCEPTION_ARG,
+       ASDC_GENERAL_EXCEPTION,
+       ASDC_GENERAL_WARNING,
+       ASDC_AUDIT_EXEC,
+       ASDC_GENERAL_METRICS,
+       ASDC_CREATE_SERVICE,
+       ASDC_ARTIFACT_ALREADY_DEPLOYED,
+       ASDC_CREATE_ARTIFACT,
+       ASDC_ARTIFACT_INSTALL_EXC,
+       ASDC_ARTIFACT_ALREADY_DEPLOYED_DETAIL,
+       ASDC_ARTIFACT_NOT_DEPLOYED_DETAIL,
+       ASDC_ARTIFACT_CHECK_EXC,
+       ASDC_INIT_ASDC_CLIENT_EXC,
+       ASDC_INIT_ASDC_CLIENT_SUC,
+       ASDC_LOAD_ASDC_CLIENT_EXC,
+       ASDC_SINGLETON_CHECKT_EXC,
+       ASDC_SHUTDOWN_ASDC_CLIENT_EXC,
+       ASDC_CHECK_HEAT_TEMPLATE,
+       ASDC_START_INSTALL_ARTIFACT,
+       ASDC_ARTIFACT_TYPE_NOT_SUPPORT,
+       ASDC_ARTIFACT_ALREADY_EXIST,
+       ASDC_ARTIFACT_DOWNLOAD_SUC,
+       ASDC_ARTIFACT_DOWNLOAD_FAIL,
+       ASDC_START_DEPLOY_ARTIFACT,
+       ASDC_SEND_NOTIF_ASDC,
+       ASDC_SEND_NOTIF_ASDC_EXEC,
+       ASDC_RECEIVE_CALLBACK_NOTIF,
+       ASDC_RECEIVE_SERVICE_NOTIF,
+       ASDC_ARTIFACT_NULL,
+       ASDC_SERVICE_NOT_SUPPORT,
+       ASDC_ARTIFACT_DEPLOY_SUC,
+       ASDC_PROPERTIES_NOT_FOUND,
+       // Default Messages, in case Log catalog is not defined
+       GENERAL_EXCEPTION_ARG,
+       GENERAL_EXCEPTION,
+       GENERAL_WARNING,
+       AUDIT_EXEC,
+       GENERAL_METRICS,
+       LOGGER_SETUP,
+       LOGGER_NOT_FOUND,
+       LOGGER_UPDATE_SUC,
+       LOGGER_UPDATE_DEBUG,
+       LOGGER_UPDATE_DEBUG_SUC,
+       LOAD_PROPERTIES_SUC,
+       NO_PROPERTIES,
+       MADATORY_PARAM_MISSING,
+       LOAD_PROPERTIES_FAIL,
+       INIT_LOGGER,
+       INIT_LOGGER_FAIL,
+       JAXB_EXCEPTION,
+    IDENTITY_SERVICE_NOT_FOUND;
+
+       static {
+               EELFResourceManager.loadMessageBundle("GenericMessages");
+               EELFResourceManager.loadMessageBundle("ApiHandler");
+               EELFResourceManager.loadMessageBundle("BPMN");
+               EELFResourceManager.loadMessageBundle("ResourceAdapter");
+               EELFResourceManager.loadMessageBundle("ASDC");
+       }
+}
diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoAlarmLogger.java b/common/src/main/java/org/openecomp/mso/logger/MsoAlarmLogger.java
new file mode 100644 (file)
index 0000000..147c1ad
--- /dev/null
@@ -0,0 +1,181 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.logger;
+
+
+import java.io.File;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.slf4j.LoggerFactory;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.Logger;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.rolling.RollingFileAppender;
+import ch.qos.logback.core.rolling.TimeBasedRollingPolicy;
+
+/**
+ * Wrapper around log4j and Nagios NRDP passive alarming for MSO.
+ *
+ * For local alarm logging, this class will look for an alarm log file name
+ * in the servlet context parameter "mso.alarms.file". If none is found,
+ * it will look for an MsoProperty of the same name. As a last resort,
+ * it will use the default path "/var/log/ecomp/MSO/alarms/alarm.log".
+ * It is expected that all alarms within an application will use the same
+ * alarm file, so there is no way to dynamically add other alarm files.
+ *
+ * Alarms are logged as a simple pipe-delimited string of the format:
+ * <dateTime>|<alarmType>|<state>|<detailMessage>
+ *
+ * This class also supports real-time Nagios NRDP alarming. If enabled via
+ * MsoProperties, all alarms generated and logged to the local alarm file will
+ * also be transmitted to a Nagios NRDP instance. NRDP requires 4 parameters
+ * in service alarm events (all Mso Alarms will be Service Alarms):
+ * hostname, servicename, state, detail
+ *
+ * The log file format is also intended to be compatible with Nagios NRDP for
+ * non-real-time reporting. The command-line tool for sending alarms is
+ * is "send_nrdp.php", which takes the same 4 parameters as input.
+ * It will be easy enough to translate entries from an alarm.log file to
+ * NRDP if real-time NRDP alarming is not enabled.
+ *
+ * For Nagios integration, the alarmTypes should all match "service names"
+ * configured in the receiving Nagios server. Also, the alarm state will
+ * be limited to the 4 values defined by Nagios:
+ * 0 = OK, 1 = Warning, 2 = Critical, 3 = Unknown
+ *
+ *
+ */
+public class MsoAlarmLogger implements ServletContextListener {
+
+       private Logger alarmLogger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(MSO_ALARM_CONTEXT);
+    private static RollingFileAppender<ILoggingEvent> fileAppender = null;
+    public static final String DEFAULT_MSO_ALARM_FILE = "/var/log/ecomp/MSO/alarms/alarm.log";
+    public static final String MSO_ALARM_CONTEXT = "mso.alarms";
+    
+    public static final int OK = 0;
+    public static final int WARNING = 1;
+    public static final int CRITICAL = 2;
+    public static final int UNKNOWN = 3;
+
+    /**
+     * Get the default MSO Alarm Logger
+     */
+    public MsoAlarmLogger () {
+               
+       initializeAlarmLogger(null);
+
+    }
+
+    public MsoAlarmLogger (String alarmFile) {
+       initializeAlarmLogger(alarmFile);
+
+    }
+
+     /**
+     * Method to record an alarm.
+     *
+     * @param alarm - the alarm identifier (Nagios "service")
+     * @param state - the alarm state/severity, based on Nagios service
+     *        state values: 0 = OK, 1 = Warning, 2 = Critical, 3 = Unknown
+     * @param detail - detail message (may contain additional internal
+     *        structure per alarm type)
+     */
+    public void sendAlarm (String alarm, int state, String detail) {
+        // Write the alarm to Log file
+        if (alarmLogger != null) {
+            String output = alarm + "|" + state + "|" + detail;
+            alarmLogger.info (output);
+        }
+
+    }
+
+    @Override
+    public void contextDestroyed (ServletContextEvent event) {
+        // Nothing to do...
+    }
+
+    @Override
+    public void contextInitialized (ServletContextEvent event) {
+        String msoAlarmFile = event.getServletContext ().getInitParameter ("mso.alarm.file");
+        if (msoAlarmFile == null) {
+            msoAlarmFile = DEFAULT_MSO_ALARM_FILE;
+        }
+
+        initializeAlarmLogger (msoAlarmFile);
+    }
+
+    private void initializeAlarmLogger (String alarmFile) {
+        synchronized (MsoAlarmLogger.class) {
+            if (fileAppender == null) {
+               if (alarmFile != null) {
+                       fileAppender = MsoAlarmLogger.getAppender (alarmFile);
+               } else {
+                       fileAppender = MsoAlarmLogger.getAppender (DEFAULT_MSO_ALARM_FILE);
+               }
+            }
+        }
+        // The alarmLogger was static originally.
+        // The initialization of the alarmLogger was fine, but not sure why, it lost its appender info later
+        // Due to that issue, the alarmLogger is not static any more.
+        // Instead static attribute fileAppender is added and will be assigned to the alarmLogger every time new MsoAlarmLogger is created.
+        alarmLogger.setLevel (Level.INFO);
+        alarmLogger.addAppender (fileAppender);
+        alarmLogger.setAdditive (false);
+    }
+
+
+    private static RollingFileAppender<ILoggingEvent> getAppender (String msoAlarmFile) {
+        // Create a Logger for alarms. Just use a default Pattern that outputs
+        // a message. MsoAlarmLogger will handle the formatting.
+        File alarmFile = new File (msoAlarmFile);
+        File alarmDir = alarmFile.getParentFile ();
+        if (!alarmDir.exists ()) {
+            alarmDir.mkdirs ();
+        }
+
+        String logPattern = "%d{yyyy-MM-dd HH:mm:ss}|%m%n";
+
+        LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
+        PatternLayoutEncoder encoder=new PatternLayoutEncoder();
+        encoder.setPattern(logPattern);
+        encoder.setContext(context);
+        encoder.start();
+        RollingFileAppender<ILoggingEvent> fileAppender=new RollingFileAppender<ILoggingEvent>();
+        TimeBasedRollingPolicy<ILoggingEvent> rollingPolicy=new TimeBasedRollingPolicy<ILoggingEvent>();
+        rollingPolicy.setContext(context);
+        rollingPolicy.setFileNamePattern(msoAlarmFile + ".%d");
+        rollingPolicy.setParent(fileAppender);
+        rollingPolicy.start();
+        fileAppender.setFile(msoAlarmFile);
+        fileAppender.setAppend(true);
+        fileAppender.setEncoder(encoder);
+        fileAppender.setRollingPolicy(rollingPolicy);
+        fileAppender.setContext(context);
+        fileAppender.start();
+
+        return fileAppender;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoLogInitializer.java b/common/src/main/java/org/openecomp/mso/logger/MsoLogInitializer.java
new file mode 100644 (file)
index 0000000..0c96dab
--- /dev/null
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.logger;
+
+
+import java.io.File;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.annotation.WebListener;
+
+import org.slf4j.LoggerFactory;
+
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.joran.JoranConfigurator;
+
+
+/**
+ * This class will attempt to initialize MSO log4j when part of a web application.
+ * It will look for the logback configuration file logback.xml in the 
+ * following order:
+ * 1. In an init-param "log.configuration" in web.xml
+ * 2. TODO: In a property "log.configuration" in an "application.properties" file
+ * 3. In the default location "/etc/ecomp/mso/config"
+ * 4. Using the log4j default (check system property log.configuration or
+ *    just look on the classpath for logback.xml)
+ * 
+ *
+ */
+@WebListener
+public class MsoLogInitializer implements ServletContextListener
+{
+       private static String DEFAULT_LOG4J_PROPERTIES_FILE = "/etc/ecomp/mso/config/logback.xml";
+       private static String prefixMsoPropertiesPath = System.getProperty("mso.config.path");
+       static  {
+               if (prefixMsoPropertiesPath == null) {
+                       prefixMsoPropertiesPath = "/";
+               } else if (!(prefixMsoPropertiesPath.charAt(prefixMsoPropertiesPath.length() - 1) == '/')) {
+                       prefixMsoPropertiesPath = prefixMsoPropertiesPath + "/";
+               }
+       }
+       
+       public MsoLogInitializer () {
+       }
+
+
+       @Override
+       public void contextDestroyed(ServletContextEvent event) {
+               // Nothing to do...
+       }
+
+       @Override
+       public void contextInitialized(ServletContextEvent event)
+       {
+               String logPropertiesFile = null;
+               try {
+                       // Look first in the init-parameters
+                       String initParam = event.getServletContext().getInitParameter("log.configuration");
+                       if (initParam != null && fileIsReadable(prefixMsoPropertiesPath + initParam)) {
+                               logPropertiesFile = prefixMsoPropertiesPath + initParam;
+                       }
+                       else if (fileIsReadable(DEFAULT_LOG4J_PROPERTIES_FILE)) {
+                               logPropertiesFile = DEFAULT_LOG4J_PROPERTIES_FILE;
+                       }
+                       
+                       if (logPropertiesFile != null) {
+                               // Initialize loggers with the specified file.  If no such file was
+                               // specified, will use the default Log4j resolution.
+                               LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); 
+                               JoranConfigurator jc = new JoranConfigurator(); 
+                               jc.setContext(context);                 
+                               context.reset(); 
+                               jc.doConfigure(logPropertiesFile);
+                               // Try it out
+                               MsoLogger initLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+                               initLogger.info(MessageEnum.INIT_LOGGER, logPropertiesFile, "", "");
+                       }
+               } catch (Exception e) {
+                       MsoLogger initLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+                       initLogger.error (MessageEnum.INIT_LOGGER_FAIL, "", "", MsoLogger.ErrorCode.UnknownError, "", e);
+               }
+       }
+       
+       private boolean fileIsReadable (String filePath) {
+               File f = new File(filePath);
+               if (f.exists() && f.canRead())
+                       return true;
+               return false;
+       }
+}
diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java b/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
new file mode 100644 (file)
index 0000000..c530227
--- /dev/null
@@ -0,0 +1,973 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.logger;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.UUID;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.slf4j.MDC;
+
+import org.openecomp.mso.entity.MsoRequest;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Simple wrapper around the EELF Logger class for MSO usage.
+ * This class supports all of the normal logging functions (debug, info, etc.),
+ * prepending a string of format "[<requestId>|<serviceId]" to each message.
+ *
+ * MSO code should initialize with these IDs when available, so that individual
+ * requests and/or services can be tracked throughout the various MSO component
+ * logs (API Handler, BPEL, and Adapters).
+ *
+ *
+ */
+public class MsoLogger {
+       // MDC parameters
+       public static final String REQUEST_ID = "RequestId";
+       public static final String SERVICE_INSTANCE_ID = "ServiceInstanceId";
+       public static final String SERVICE_NAME = "ServiceName";
+    private static final String SERVICE_NAME_IS_METHOD_NAME = "ServiceNameIsMethodName";
+    private static final String INSTANCE_UUID = "InstanceUUID";
+    private static final String SERVER_IP = "ServerIPAddress";
+    private static final String FQDN = "ServerFQDN";
+       public static final String REMOTE_HOST = "RemoteHost";
+       public static final String ALERT_SEVERITY = "AlertSeverity";
+       public static final String TIMER = "Timer";
+    private static final String USER = "User";
+    private static final String DUMMY_VALUE = "trace-#";
+    public static final String UNKNOWN = "UNKNOWN";
+    // Audit/Metric log specigic
+    private static final String BEGINTIME = "BeginTimestamp";
+    private static final String ENDTIME = "EndTimestamp";
+    public static final String PARTNERNAME = "PartnerName";
+    private static final String STATUSCODE = "StatusCode";
+    private static final String RESPONSECODE = "ResponseCode";
+    private static final String RESPONSEDESC = "ResponseDesc";
+    // Metric log specigic
+    private static final String TARGETENTITY = "TargetEntity";
+    private static final String TARGETSERVICENAME = "TargetServiceName";
+    private static final String TARGETVIRTUALENTITY = "TargetVirtualEntity";
+
+    private static final String FATAL_LEVEL = "FATAL";
+    private static final String ERROR_LEVEL = "ERROR";
+    private static final String WARN_LEVEL = "WARN";
+    private static final String INFO_LEVEL = "INFO";
+    private static final String DEBUG_LEVEL = "DEBUG";
+
+    private static final String ERRORCODE = "ErrorCode";
+    private static final String ERRORDESC = "ErrorDesc";
+
+public enum Catalog {APIH, BPEL, RA, ASDC, GENERAL};
+    public enum StatusCode {COMPLETE, ERROR};
+    public enum ResponseCode {Suc(0), PermissionError(100),
+                            DataError(300), DataNotFound(301), BadRequest (302),
+                            SchemaError(400),
+                            BusinessProcesssError(500), ServiceNotAvailable (501), InternalError (502), Conflict (503), DBAccessError(504), CommunicationError(505),
+                            UnknownError(900);
+
+        private int value;
+        public int getValue () {
+            return this.value;
+        }
+        private ResponseCode (int value) {
+            this.value = value;
+        }
+    };
+
+    public enum ErrorCode {PermissionError(100), AvailabilityError(200),
+        DataError(300), SchemaError(400),
+        BusinessProcesssError(500),
+        UnknownError(900);
+
+        private int value;
+        public int getValue () {
+            return this.value;
+        }
+        private ErrorCode (int value) {
+            this.value = value;
+        }
+    };
+
+    private EELFLogger logger, auditLogger, metricsLogger;
+    private static final String CONFIG_FILE = System.getProperty ("jboss.home.dir") + "/mso-config/uuid/uuid_"
+                                              + System.getProperty ("jboss.server.name");
+    private static String instanceUUID, serverIP, serverName;
+    private MessageEnum exceptionArg, defaultException, defaultWarning, defaultAudit, defaultMetrics;
+
+    // For internal logging of the initialization of MSO logs
+    private static final Logger LOGGER = Logger.getLogger (MsoLogger.class.getName ());
+
+
+    private MsoLogger (MsoLogger.Catalog cat) {
+        this.logger = EELFManager.getInstance().getErrorLogger();
+        this.auditLogger = EELFManager.getInstance().getAuditLogger();
+        this.metricsLogger = EELFManager.getInstance().getMetricsLogger();
+        MsoLogger.initialization ();
+        setDefaultLogCatalog (cat);
+    }
+
+    private static synchronized void initialization () {
+        if (instanceUUID == null || ("").equals (instanceUUID)) {
+            instanceUUID = getInstanceUUID ();
+        }
+
+        if (serverIP == null || serverName == null || ("").equals (serverIP) || ("").equals (serverName)) {
+            try {
+                InetAddress server = InetAddress.getLocalHost ();
+                serverIP = server.getHostAddress ();
+                serverName = server.getHostName ();
+            } catch (UnknownHostException e) {
+                LOGGER.log (Level.SEVERE, "Could not get local hostname", e);
+                serverIP = "";
+                serverName = "";
+            }
+        }
+    }
+
+    /**
+     * Get the MsoLogger based on the catalog
+     * @param cat Catalog of the logger
+     * @return the MsoLogger
+     */
+    public static synchronized MsoLogger getMsoLogger (MsoLogger.Catalog cat) {
+        return new MsoLogger (cat);
+    }
+
+    /**
+     * Record the Metrics event with no argument
+     * @param startTime Transaction starting time in millieseconds
+     * @param statusCode StatusCode of the transaction, either COMPLETE or ERROR
+     * @param responseCode The response code returned by the sub-components
+     * @param responseDesc Human redable description of the response code
+     * @param targetEntity The component which is invoked for this sub-operation
+     * @param targetServiceName API invoked on the TargetEntity
+     * @param targetVEntity Target VNF or VM acted opon by the component, if available
+     */
+    public void recordMetricEvent (Long startTime, StatusCode statusCode, ResponseCode responseCode, String responseDesc, String targetEntity, String targetServiceName, String targetVEntity) {
+       prepareMetricMsg (startTime, statusCode, responseCode.getValue (), responseDesc, targetEntity, targetServiceName, targetVEntity);
+       metricsLogger.info ("");
+       MDC.remove(TIMER);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Audit event
+     *
+     * @param startTime Transaction starting time in millieseconds
+     * @param statusCode StatusCode of the transaction, either COMPLETE or ERROR
+     * @param responseCode The application specific response code
+     * @param responseDesc Human redable description of the application response code
+     */
+    public void recordAuditEvent (Long startTime, StatusCode statusCode, ResponseCode responseCode, String responseDesc) {
+        prepareAuditMsg (startTime, statusCode, responseCode.getValue (), responseDesc);
+        auditLogger.info ("");
+        MDC.remove(TIMER);
+    }
+
+    // Debug methods
+    /**
+     * Record the Debug event
+     *
+     * @param msg The log message to put
+     */
+    public void debug (String msg) {
+       prepareMsg (DEBUG_LEVEL);
+        logger.debug (msg);
+    }
+
+    /**
+     * Record the Debug event
+     *
+     * @param msg The log message to put
+     * @param t The exception to put
+     */
+    public void debug (String msg, Throwable t) {
+       prepareMsg (DEBUG_LEVEL);
+        logger.debug (msg, t);
+    }
+
+    // Info methods
+    /**
+     * Record the Info event
+     *
+     * @param msg The log message to put
+     */
+    public void info (MessageEnum msg, String targetEntity, String targetServiceName) {
+        prepareErrorMsg (INFO_LEVEL, targetEntity, targetServiceName, null, "");
+
+        logger.info (msg);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Info event with 1 argument
+     *
+     * @param msg The log message to put
+     * @param arg0 The argument used in the log message
+     */
+    public void info (MessageEnum msg, String arg0, String targetEntity, String targetServiceName) {
+        prepareErrorMsg (INFO_LEVEL, targetEntity, targetServiceName, null, "");
+
+        logger.info (msg, normalize(arg0));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Info event with 2 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1 The arguments used in the log message
+     */
+    public void info (MessageEnum msg, String arg0, String arg1, String targetEntity, String targetServiceName) {
+        prepareErrorMsg (INFO_LEVEL, targetEntity, targetServiceName, null, "");
+
+        logger.info (msg, normalize(arg0), normalize(arg1));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Info event with 3 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2 The arguments used in the log message
+     */
+    public void info (MessageEnum msg, String arg0, String arg1, String arg2, String targetEntity, String targetServiceName) {
+        prepareErrorMsg (INFO_LEVEL, targetEntity, targetServiceName, null, "");
+
+        logger.info (msg, normalize(arg0), normalize(arg1), normalize(arg2));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Info event with 4 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3 The arguments used in the log message
+     */
+    public void info (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String targetEntity, String targetServiceName) {
+        prepareErrorMsg (INFO_LEVEL, targetEntity, targetServiceName, null, "");
+
+        logger.info (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Info event with 5 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3,arg4 The arguments used in the log message
+     */
+    public void info (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4, String targetEntity, String targetServiceName) {
+        prepareErrorMsg (INFO_LEVEL, targetEntity, targetServiceName, null, "");
+
+        logger.info (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Info event with 6 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3,arg4,arg5 The arguments used in the log message
+     */
+    public void info (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4, String arg5, String targetEntity, String targetServiceName) {
+        prepareErrorMsg (INFO_LEVEL, targetEntity, targetServiceName, null, "");
+
+        logger.info (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4), normalize(arg5));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+    // Warning methods
+    /**
+     * Record the Warning event
+     *
+     * @param msg The log message to put
+     */
+    public void warn (MessageEnum msg, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+
+        logger.warn (msg);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warning event
+     *
+     * @param msg The log message to put
+     * @param t The exception info
+     */
+    public void warn (MessageEnum msg, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg);
+        logger.warn ("Exception raised: " + getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 1 argument
+     *
+     * @param msg The log message to put
+     * @param arg The argument used in the log message
+     */
+    public void warn (MessageEnum msg, String arg, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, arg);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 1 argument
+     *
+     * @param msg The log message to put
+     * @param arg The arguments used in the log message
+     * @param t The exception info
+     */
+    public void warn (MessageEnum msg, String arg, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, arg);
+        logger.warn ("Exception raised: " + getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 2 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1 The arguments used in the log message
+     */
+    public void warn (MessageEnum msg, String arg0, String arg1, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, normalize(arg0), normalize(arg1));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 2 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void warn (MessageEnum msg, String arg0, String arg1, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, normalize(arg0), normalize(arg1));
+        logger.warn ("Exception raised: " + getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 3 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2 The arguments used in the log message
+     */
+    public void warn (MessageEnum msg, String arg0, String arg1, String arg2, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, normalize(arg0), normalize(arg1), normalize(arg2));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 3 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void warn (MessageEnum msg, String arg0, String arg1, String arg2, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, normalize(arg0), normalize(arg1), normalize(arg2));
+        logger.warn ("Exception raised: " + getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 4 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3 The arguments used in the log message
+     */
+    public void warn (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 4 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2, arg3 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void warn (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
+        logger.warn ("Exception raised: " + getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 5 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3,arg4 The arguments used in the log message
+     */
+    public void warn (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Warn event with 5 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3,arg4 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void warn (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.warn (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
+        logger.warn ("Exception raised: " + getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+    // Error methods
+    /**
+     * Record the Error event
+     *
+     * @param msg The log message to put
+     */
+    public void error (MessageEnum msg, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event
+     *
+     * @param msg The log message to put
+     * @param t The exception info
+     */
+    public void error (MessageEnum msg, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg);
+        logger.error (exceptionArg, getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 1 argument
+     *
+     * @param msg The log message to put
+     * @param arg0 The arguments used in the log message
+     */
+    public void error (MessageEnum msg, String arg0, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 1 argument
+     *
+     * @param msg The log message to put
+     * @param arg0 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void error (MessageEnum msg, String arg0, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0));
+        logger.error (exceptionArg, getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 2 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1 The arguments used in the log message
+     */
+    public void error (MessageEnum msg, String arg0, String arg1, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0), normalize(arg1));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 2 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void error (MessageEnum msg, String arg0, String arg1, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0), normalize(arg1));
+        logger.error (exceptionArg, getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 3 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2 The arguments used in the log message
+     */
+    public void error (MessageEnum msg, String arg0, String arg1, String arg2, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0), normalize(arg1), normalize(arg2));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 3 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void error (MessageEnum msg, String arg0, String arg1, String arg2, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0), normalize(arg1), normalize(arg2));
+        logger.error (exceptionArg, getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 4 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3 The arguments used in the log message
+     */
+    public void error (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 4 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void error (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
+        logger.error (exceptionArg, getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 5 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3,arg4 The arguments used in the log message
+     */
+    public void error (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+    /**
+     * Record the Error event with 5 arguments
+     *
+     * @param msg The log message to put
+     * @param arg0,arg1,arg2,arg3,arg4 The arguments used in the log message
+     * @param t The exception info
+     */
+    public void error (MessageEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+        prepareErrorMsg (ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
+        logger.error (msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
+        logger.error (exceptionArg, getNormalizedStackTrace (t));
+        logger.debug ("Exception raised", t);
+        MDC.remove(TARGETENTITY);
+        MDC.remove(TARGETSERVICENAME);
+    }
+
+
+
+    public boolean isDebugEnabled () {
+        return logger.isDebugEnabled();
+    }
+    
+    private void prepareMsg (String loggingLevel) {
+       prepareMsg (loggingLevel, null, null);
+    }
+
+    private void prepareMsg (String loggingLevel, String serviceNamep, String timer) {
+        String reqId = MDC.get (REQUEST_ID);
+        String svcId = MDC.get (SERVICE_INSTANCE_ID);
+
+        // Based on the discussion with Adrian,
+        // if these 2 parameters is not available, using dummy value "trace-#"
+        if (reqId == null || reqId.isEmpty()) {
+            MDC.put (REQUEST_ID, DUMMY_VALUE);
+        }
+
+        if (svcId == null || svcId.isEmpty()) {
+            MDC.put (SERVICE_INSTANCE_ID, DUMMY_VALUE);
+        }
+
+        if (timer != null) {
+            MDC.put (TIMER, timer);
+        } else {
+               MDC.remove(TIMER);
+        }
+
+        MDC.put (SERVICE_NAME, getFinalServiceName (serviceNamep));
+        MDC.put (ALERT_SEVERITY, getSeverityLevel (loggingLevel));
+        MDC.put (INSTANCE_UUID, instanceUUID);
+        MDC.put (SERVER_IP, serverIP);
+        MDC.put (FQDN, serverName);
+    }
+
+    private void prepareAuditMsg ( long startTime, StatusCode statusCode, int responseCode, String responseDesc) {
+        long endTime = System.currentTimeMillis();
+        prepareMsg (INFO_LEVEL, null, String.valueOf(endTime - startTime));
+        prepareAuditMetricMsg (startTime, endTime, statusCode, responseCode, responseDesc);
+    }
+
+    private void prepareAuditMetricMsg ( long startTime, long endTime, StatusCode statusCode, int responseCode, String responseDesc) {
+        Date startDate = new Date(startTime);
+        Date endDate = new Date(endTime);
+        DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
+
+        MDC.put (BEGINTIME, String.valueOf(formatter.format(startDate)));
+        MDC.put (ENDTIME, String.valueOf(formatter.format(endDate)));
+        MDC.put (STATUSCODE, statusCode.name());
+        MDC.put (RESPONSECODE, String.valueOf(responseCode));
+        MDC.put (RESPONSEDESC, responseDesc);
+    }
+
+    private void prepareErrorMsg (String loggingLevel, String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+        MDC.put (ALERT_SEVERITY, getSeverityLevel (loggingLevel));
+        MDC.put (ERRORCODE, String.valueOf(errorCode));
+        MDC.put (ERRORDESC, errorDesc);
+        MDC.put (TARGETENTITY, targetEntity);
+        MDC.put (TARGETSERVICENAME, targetServiceName);
+        MDC.put (SERVICE_NAME, getFinalServiceName (getServiceName()));
+    }
+
+    private void prepareMetricMsg ( long startTime, StatusCode statusCode, int responseCode, String responseDesc, String targetEntity, String targetServiceName, String targetVEntity) {
+        long endTime = System.currentTimeMillis();
+        prepareMsg (INFO_LEVEL, null, String.valueOf(endTime - startTime));
+        prepareAuditMetricMsg (startTime, endTime, statusCode, responseCode, responseDesc);
+
+        // Populate Metric log specific parameter
+        MDC.put (TARGETENTITY, targetEntity);
+        MDC.put (TARGETSERVICENAME, targetServiceName);
+
+        if (null != targetVEntity) {
+            MDC.put(TARGETVIRTUALENTITY, targetVEntity);
+        }
+    }
+
+    private String getSeverityLevel (String loggingLevel) {
+        String severity;
+        // According to the Nagios alerting: 0=OK; 1=WARNING; 2=UNKOWN; 3=CRITICAL
+        switch (loggingLevel) {
+            case ERROR_LEVEL:
+                severity = "2";
+                break;
+            case FATAL_LEVEL:
+                severity = "3";
+                break;
+            case WARN_LEVEL:
+                severity = "1";
+                break;
+            default:
+                severity = "0";
+                break;
+        }
+        return severity;
+    }
+
+    private String getFinalServiceName (String serviceNamep) {
+        // This step to set the serviceName should be put after the className is get,
+        // since the default serviceName is obtained during the method to get the className.
+        //
+        // There's 3 ways to set the serviceName. The first method has the most priority to set the value.
+        // a) If the serviceName is set within the log method, this value will be used first
+        // b) If serviceName is not set within the log method, the value defined in the MDC will be used
+        // c) If nothing is set specifically, then MsoLogger will assign a default(MSO.<method_name>) value to it
+        String serName = MDC.get (MsoLogger.SERVICE_NAME);
+
+        // Check if service name was already set as the method name by a previous call to this method.
+        String isMethodNameStr = MDC.get (MsoLogger.SERVICE_NAME_IS_METHOD_NAME);
+        boolean isMethodName = isMethodNameStr != null && isMethodNameStr.equals (Boolean.TRUE.toString ());
+        if (serviceNamep != null) {
+            return serviceNamep;
+        } else if (serName != null && !isMethodName) {
+            return serName;
+        }
+
+        MDC.put (MsoLogger.SERVICE_NAME_IS_METHOD_NAME, Boolean.TRUE.toString ());
+        int limit;
+        StackTraceElement[] classArr = new Exception ().getStackTrace ();
+        if (classArr.length >=6) {
+               limit = 7;
+        } else {
+               limit = classArr.length;
+        }
+       for (int i = 1; i < limit; i++) {
+            String className = classArr[i].getClassName ();
+            if (!className.equals (this.getClass ().getName ())) {
+                return classArr[i].getMethodName ();
+            }
+        }
+        return classArr[0].getMethodName ();
+    }
+
+    // Based on the discussion with Adrian, instanceUUID is used to identifiy the mso instance,
+    // it is generated during mso instance initialization period
+    // The same mso instnace will use the same instanceUUID value, even after restart
+    private static String getInstanceUUID () {
+        // Avoid creation during build and tests
+        if (System.getProperty ("jboss.server.name") == null) {
+            return "Test UUID as JBoss not found";
+        }
+        File configFile = new File (CONFIG_FILE);
+        String uuid = "";
+        BufferedReader in = null;
+        BufferedWriter bw = null;
+        try {
+            // Verify whether instanceUUID file exist,
+            // If yes, read the content; if not, generate the instanceUUID and write to the file
+            if (configFile.exists ()) {
+                // read the content of the file
+                in = new BufferedReader (new FileReader (CONFIG_FILE));
+                if ((uuid = in.readLine ()) == null) {
+                    // the file is empty, regenerate the file
+                    uuid = UUID.randomUUID ().toString ();
+                    FileWriter fw = new FileWriter (configFile.getAbsoluteFile ());
+                    bw = new BufferedWriter (fw);
+                    bw.write (uuid);
+                    bw.close ();
+                }
+                in.close ();
+            } else {
+                // file doesn't exist yet -> create the file and generate the instanceUUID
+                uuid = UUID.randomUUID ().toString ();
+                configFile.getParentFile ().mkdirs ();
+                configFile.createNewFile ();
+                FileWriter fw = new FileWriter (configFile.getAbsoluteFile ());
+                bw = new BufferedWriter (fw);
+                bw.write (uuid);
+                bw.close ();
+            }
+        } catch (IOException e) {
+            LOGGER.log (Level.SEVERE, "Error trying to read UUID file", e);
+        } finally {
+            try {
+                if (in != null) {
+                    in.close ();
+                }
+                if (bw != null) {
+                    bw.close ();
+                }
+            } catch (IOException ex) {
+                LOGGER.log (Level.SEVERE, "Error trying to close UUID file", ex);
+            }
+        }
+        return uuid;
+    }
+
+    /**
+     * Set the requestId and serviceInstanceId
+     * @param reqId The requestId
+     * @param svcId The serviceInstanceId
+     */
+       public static void setLogContext (String reqId, String svcId) {
+        if (null != reqId) {
+            MDC.put (REQUEST_ID, reqId);
+        }
+
+        if (null != svcId) {
+            MDC.put (SERVICE_INSTANCE_ID, svcId);
+        }
+       }
+
+    /**
+     * Set the remoteIp and the basic HTTP Authentication user
+     * @param remoteIpp The remote ip address
+     * @param userp The basic http authencitation user
+     */
+       public static void setLoggerParameters (String remoteIpp, String userp) {
+        if (null != remoteIpp) {
+            MDC.put (REMOTE_HOST, remoteIpp);
+        }
+        if (null != userp) {
+            MDC.put (USER, userp);
+        }
+       }
+
+    /**
+     * Set the serviceName
+     * @param serviceNamep The service name
+     */
+    public static void setServiceName (String serviceNamep) {
+        if (null != serviceNamep) {
+            MDC.put (SERVICE_NAME, serviceNamep);
+            MDC.remove (SERVICE_NAME_IS_METHOD_NAME);
+        }
+    }
+
+    /**
+     * Get the serviceName
+     * @return The service name
+     */
+    public static String getServiceName () {
+        return MDC.get (SERVICE_NAME);
+    }
+
+    /**
+     * Reset the serviceName
+     */
+       public static void resetServiceName () {
+               MDC.remove (SERVICE_NAME);
+       }
+
+    /**
+     * Set the requestId and serviceInstanceId based on the mso request
+     * @param msoRequest The mso request
+     */
+    public static void setLogContext (MsoRequest msoRequest) {
+        if (msoRequest != null) {
+               MDC.put (REQUEST_ID, msoRequest.getRequestId());
+               MDC.put (SERVICE_INSTANCE_ID, msoRequest.getServiceInstanceId());
+        }
+        else {
+               MDC.put (REQUEST_ID, DUMMY_VALUE);
+               MDC.put (SERVICE_INSTANCE_ID, DUMMY_VALUE);
+        }
+    }
+
+    private String normalize (String input) {
+        if (input == null) {
+            return null;
+        }
+        String result = input.replace ('|', '!');
+        result = result.replace ("\n", " - ");
+        return result;
+    }
+
+    private String getNormalizedStackTrace (Throwable t) {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        t.printStackTrace(pw);
+        return sw.toString().replace ('|', '!').replace ("\n", " - ");
+    }
+
+    private void setDefaultLogCatalog (MsoLogger.Catalog cat) {
+        if ("APIH".equals(cat.toString())) {
+               exceptionArg = MessageEnum.APIH_GENERAL_EXCEPTION_ARG;
+               defaultException = MessageEnum.APIH_GENERAL_EXCEPTION;
+               defaultWarning = MessageEnum.APIH_GENERAL_WARNING;
+               defaultAudit = MessageEnum.APIH_AUDIT_EXEC;
+               defaultMetrics = MessageEnum.APIH_GENERAL_METRICS;
+        } else if ("RA".equals(cat.toString())) {
+               exceptionArg = MessageEnum.RA_GENERAL_EXCEPTION_ARG;
+               defaultException = MessageEnum.RA_GENERAL_EXCEPTION;
+               defaultWarning = MessageEnum.RA_GENERAL_WARNING;
+               defaultAudit = MessageEnum.RA_AUDIT_EXEC;
+               defaultMetrics = MessageEnum.RA_GENERAL_METRICS;
+        } else if ("BPEL".equals(cat.toString())) {
+               exceptionArg = MessageEnum.BPMN_GENERAL_EXCEPTION_ARG;
+               defaultException = MessageEnum.BPMN_GENERAL_EXCEPTION;
+               defaultWarning = MessageEnum.BPMN_GENERAL_WARNING;
+               defaultAudit = MessageEnum.BPMN_AUDIT_EXEC;
+               defaultMetrics = MessageEnum.BPMN_GENERAL_METRICS;
+        } else if ("ASDC".equals(cat.toString())) {
+               exceptionArg = MessageEnum.ASDC_GENERAL_EXCEPTION_ARG;
+               defaultException = MessageEnum.ASDC_GENERAL_EXCEPTION;
+               defaultWarning = MessageEnum.ASDC_GENERAL_WARNING;
+               defaultAudit = MessageEnum.ASDC_AUDIT_EXEC;
+               defaultMetrics = MessageEnum.ASDC_GENERAL_METRICS;
+        } else {
+               exceptionArg = MessageEnum.GENERAL_EXCEPTION_ARG;
+               defaultException = MessageEnum.GENERAL_EXCEPTION;
+               defaultWarning = MessageEnum.GENERAL_WARNING;
+               defaultAudit = MessageEnum.AUDIT_EXEC;
+               defaultMetrics = MessageEnum.GENERAL_METRICS;
+        }
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java b/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java
new file mode 100644 (file)
index 0000000..568ab22
--- /dev/null
@@ -0,0 +1,155 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.logger;
+
+
+import java.util.List;
+
+import javax.ws.rs.DefaultValue;
+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.Response;
+
+import org.slf4j.LoggerFactory;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.Logger;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.joran.JoranConfigurator;
+import ch.qos.logback.core.Appender;
+
+@Path("/logging")
+public class MsoLoggingServlet {
+
+    private static final String DEBUGLOG = "asyncEELFDebug";
+    private MsoLogger logger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
+    private static final String GENERAL_LOGGER = "com.att.eelf.error";
+    private static final String AUDIT_LOGGER = "com.att.eelf.audit";
+    private static final String METRICS_LOGGER = "com.att.eelf.metrics";
+
+    @GET
+    @Path("/setLevel/{logContext}/{level}")
+    @Produces("text/plain")
+    public Response setLogLevel (@PathParam("logContext") String logContext, @PathParam("level") String level) {
+        logger.info (MessageEnum.LOGGER_SETUP, "", "");
+        
+        LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); 
+               JoranConfigurator jc = new JoranConfigurator(); 
+               jc.setContext(context); 
+               Logger updateLogger = context.getLogger (logContext);
+        
+        if (updateLogger == null) {
+            logger.info (MessageEnum.LOGGER_NOT_FOUND, logContext, "", "");
+            String response = "Unknown logger: " + logContext;
+            return Response.status (200).entity (response).build ();
+        }
+        
+        Level currentLevel = updateLogger.getLevel();
+        if (!currentLevel.equals(Level.toLevel(level))) {
+               Level newLevel = Level.toLevel (level);
+               updateLogger.setLevel (newLevel);
+            logger.info (MessageEnum.LOGGER_UPDATE_SUC, updateLogger.getName (), currentLevel.toString(), newLevel.toString());
+        }
+
+        String response = "Log level set to: " + level + " for " + updateLogger.getName ();
+        return Response.status (200).entity (response).build ();
+
+    }
+
+    @GET
+    @Path("/loggers")
+    @Produces("text/plain")
+    @SuppressWarnings("rawtypes")
+    public Response getLoggers () {
+        StringBuilder response = new StringBuilder ();
+        LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); 
+               JoranConfigurator jc = new JoranConfigurator(); 
+               jc.setContext(context); 
+               List <Logger> loggerList = context.getLoggerList();
+        for (Logger logger:loggerList) {
+               //if (logger.getLevel() != null) {
+                       response.append (logger.getName () + ":" + logger.getLevel () + " (" + logger.getEffectiveLevel () + ")\n");
+               //}
+        }
+        return Response.status (200).entity (response).build ();
+
+    }
+
+    @GET
+    @Path("/debug")
+    @Produces("text/plain")
+    @SuppressWarnings("rawtypes")
+    /*
+     * Debug log is used as a general log to store all the logs events, including events generated by MSO code or by
+     * components used by MSO.
+     * This method will only enable/disable the function to store MSO generated events into debug log,
+     * since those events will also be generated to error, audit, metrics log.
+     * The events generated by other components will not be affected by this interface.
+     */
+    public Response updateDebugAppender (@DefaultValue("true") @QueryParam("enable") Boolean enable) {
+        String response;
+        
+               LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); 
+               JoranConfigurator jc = new JoranConfigurator(); 
+               jc.setContext(context); 
+               List <Logger> loggerList = context.getLoggerList();
+               Logger rootLogger = context.getLogger("ROOT");
+        Appender appender = rootLogger.getAppender(DEBUGLOG);
+
+        if (null == appender) {
+               return Response.status (500).entity ("Not able to found Debug appender. Please verify to make sure the needed logback file is present in the config folder.").build ();
+        }
+
+        if (enable) {
+            logger.info (MessageEnum.LOGGER_UPDATE_DEBUG, "", "");
+
+            for (Logger logger: loggerList) {
+                if (isMsoLogger (logger.getName ()) && logger.getAppender (DEBUGLOG) == null && logger.getLevel () != null) {
+                       logger.addAppender (appender);
+                       logger.setAdditive(false);
+                }
+            }
+            logger.info (MessageEnum.LOGGER_UPDATE_DEBUG_SUC, "enabled", "", "");
+            response = "Debuglog successfully enabled.";
+        } else {
+            logger.info (MessageEnum.LOGGER_UPDATE_DEBUG, "", "");
+            for (Logger logger: loggerList) {
+                if (isMsoLogger (logger.getName ())) {
+                       logger.detachAppender (appender);
+                }
+            }
+            logger.info (MessageEnum.LOGGER_UPDATE_DEBUG_SUC, "disabled", "", "");
+            response = "Debuglog successfully disabled.";
+        }
+        return Response.status (200).entity (response).build ();
+        
+        
+    }
+
+    private boolean isMsoLogger (String loggerName) {
+        return loggerName.contains (GENERAL_LOGGER) || loggerName.equals (AUDIT_LOGGER)
+               || loggerName.equals (METRICS_LOGGER);
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/properties/AbstractMsoProperties.java b/common/src/main/java/org/openecomp/mso/properties/AbstractMsoProperties.java
new file mode 100644 (file)
index 0000000..69d2f98
--- /dev/null
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.properties;
+
+
+import java.io.IOException;
+import java.util.Properties;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+public abstract class AbstractMsoProperties {
+
+       public static final int DEFAULT_RELOAD_TIME_MIN=1;
+       
+       public static final String RELOAD_TIME_PROPERTY="mso.properties.reload.time.minutes";
+       
+       protected static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+
+       protected String propertiesFileName;
+
+       protected int automaticRefreshInMinutes=0;
+
+       public String getPropertiesFileName() {
+               return propertiesFileName;
+       }
+
+       public int getAutomaticRefreshInMinutes() {
+               return automaticRefreshInMinutes;
+       }
+       
+       protected synchronized void reloadPropertiesFile() throws IOException {
+               this.loadPropertiesFile(this.propertiesFileName);
+       }
+       
+       /**
+        * This method load a properties file from a source path.
+        *
+        * @param propertiesPath The path to the file
+        * @throws IOException In case of issues during the opening
+        */
+       
+       protected abstract void loadPropertiesFile(String propertiesPath) throws IOException;
+       
+       @Override
+       protected abstract AbstractMsoProperties clone();
+       
+       @Override
+       public abstract int hashCode();
+       
+       @Override
+       public abstract boolean equals(Object obj);
+       
+       @Override
+       public abstract String toString();
+       
+       
+}
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoJavaProperties.java b/common/src/main/java/org/openecomp/mso/properties/MsoJavaProperties.java
new file mode 100644 (file)
index 0000000..aa791f8
--- /dev/null
@@ -0,0 +1,181 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.properties;
+
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.util.Properties;
+import org.openecomp.mso.utils.CryptoUtils;
+
+public class MsoJavaProperties extends AbstractMsoProperties {
+
+       
+       private Properties msoProperties = new Properties();
+
+
+       public MsoJavaProperties() {
+               
+       }
+
+       public synchronized void setProperty(String key,String value) {
+               msoProperties.setProperty(key, value);
+       }
+       
+       public synchronized String getProperty(String key, String defaultValue) {
+               if (msoProperties.containsKey(key)) {
+                       return msoProperties.getProperty(key);
+               } else {
+                       return defaultValue;
+               }
+       }
+
+       public synchronized int getIntProperty(String key, int defaultValue) {
+
+               int value = defaultValue;
+               if (msoProperties.containsKey(key)) {
+                       try {
+                               value = Integer.parseInt(msoProperties.getProperty(key));
+                       } catch (NumberFormatException e) {
+                               LOGGER.debug("Exception while parsing integer: " + msoProperties.getProperty(key), e);
+                       }
+               }
+               return value;
+
+       }
+
+       public synchronized boolean getBooleanProperty(String key, boolean defaultValue) {
+
+               if (msoProperties.containsKey(key)) {
+                       return Boolean.parseBoolean(msoProperties.getProperty(key));
+               } else {
+                       return defaultValue;
+               }
+
+       }
+
+       public synchronized String getEncryptedProperty(String key, String defaultValue, String encryptionKey) {
+
+               if (msoProperties.containsKey(key)) {
+                       try {
+                               return CryptoUtils.decrypt(msoProperties.getProperty(key), encryptionKey);
+                       } catch (GeneralSecurityException e) {
+                               LOGGER.debug("Exception while decrypting property: " + msoProperties.getProperty(key), e);
+                       }
+               }
+               return defaultValue;
+
+       }
+
+       public synchronized int size() {
+               return this.msoProperties.size();
+       }
+       
+
+       @Override
+       protected synchronized void reloadPropertiesFile() throws IOException {
+               this.loadPropertiesFile(this.propertiesFileName);
+       }
+
+       /**
+        * This method load a properties file from a source path.
+        *
+        * @param propertiesPath The path to the file
+        * @throws IOException In case of issues during the opening
+        */
+       @Override
+       protected synchronized void loadPropertiesFile(String propertiesPath) throws IOException {
+
+               FileReader reader = null;
+       
+               propertiesFileName = propertiesPath;
+               try {
+                       msoProperties.clear();
+                       reader = new FileReader(propertiesPath);
+                       msoProperties.load(reader);
+
+               } finally {
+                       this.automaticRefreshInMinutes = this.getIntProperty(RELOAD_TIME_PROPERTY, DEFAULT_RELOAD_TIME_MIN);
+                       // Always close the file
+                       try {
+                               if (reader != null) {
+                                       reader.close();
+                               }
+                       } catch (IOException e) {
+                               LOGGER.debug("Exception while closing reader for file:" + propertiesPath, e);
+                       }
+               }
+       }
+
+       @Override
+       public synchronized MsoJavaProperties clone() {
+               MsoJavaProperties msoCopy = new MsoJavaProperties();
+               msoCopy.msoProperties.putAll(msoProperties);
+               msoCopy.propertiesFileName = this.propertiesFileName;
+               msoCopy.automaticRefreshInMinutes = this.automaticRefreshInMinutes;
+               return msoCopy;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((msoProperties == null) ? 0 : msoProperties.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj) {
+                       return true;
+               }
+               if (obj == null) {
+                       return false;
+               }
+               if (getClass() != obj.getClass()) {
+                       return false;
+               }
+               MsoJavaProperties other = (MsoJavaProperties) obj;
+               if (!msoProperties.equals(other.msoProperties)) {
+                       return false;
+               }
+               return true;
+       }
+
+       @Override
+       public String toString() {
+
+               StringBuffer response = new StringBuffer();
+               response.append("Config file " + propertiesFileName + "(Timer:" + automaticRefreshInMinutes + "mins):"
+                               + System.getProperty("line.separator"));
+               for (Object key : this.msoProperties.keySet()) {
+                       String propertyName = (String) key;
+                       response.append(propertyName);
+                       response.append("=");
+                       response.append(this.msoProperties.getProperty(propertyName));
+                       response.append(System.getProperty("line.separator"));
+               }
+               response.append(System.getProperty("line.separator"));
+               response.append(System.getProperty("line.separator"));
+               return response.toString();
+       }
+}
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java b/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java
new file mode 100644 (file)
index 0000000..323c4db
--- /dev/null
@@ -0,0 +1,172 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.properties;
+
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.openecomp.mso.utils.CryptoUtils;
+
+
+public class MsoJsonProperties extends AbstractMsoProperties {
+       
+       protected ObjectMapper mapper = new ObjectMapper();
+       
+       protected JsonNode jsonRootNode = mapper.createObjectNode();
+       
+       protected MsoJsonProperties() {
+               
+       }
+
+       public synchronized JsonNode getJsonRootNode () {
+               return this.jsonRootNode;
+       }
+
+       /**
+        * This method is used to get the text encrypted in the string value of the node.
+        * @param jsonNode The JsonNode containing the strig to decode
+        * @param defaultValue The default value in case of issue
+        * @param encryptionKey The encryption Key in AES 128 bits
+        * @return the String decrypted
+        */
+       public synchronized String getEncryptedProperty(JsonNode jsonNode, String defaultValue, String encryptionKey) {
+
+               if (jsonNode.isTextual()) {
+                       try {
+                               return CryptoUtils.decrypt(jsonNode.asText(), encryptionKey);
+                       } catch (GeneralSecurityException e) {
+                               LOGGER.debug("Exception while decrypting property: " + jsonNode.asText(), e);
+                       }
+               } 
+               
+               return defaultValue;
+       }
+       
+       /**
+        * This method load a properties file from a source path.
+        *
+        * @param propertiesPath The path to the file
+        * @throws IOException In case of issues during the opening
+        */
+       @Override
+       protected synchronized void loadPropertiesFile(String propertiesPath) throws IOException {
+
+               FileReader reader = null;
+       
+               this.propertiesFileName = propertiesPath;
+               
+               try {
+                       // Clean
+                       this.jsonRootNode = mapper.createObjectNode();
+                       
+                       reader = new FileReader(propertiesPath);
+                       
+                       // Try a tree load
+                       this.jsonRootNode = mapper.readValue(reader, JsonNode.class);
+
+
+               } finally {
+                       JsonNode reloadJsonProp = this.jsonRootNode.get(RELOAD_TIME_PROPERTY);
+                       if (reloadJsonProp != null) {
+                               this.automaticRefreshInMinutes = reloadJsonProp.asInt(DEFAULT_RELOAD_TIME_MIN); 
+                       } else {
+                               this.automaticRefreshInMinutes = DEFAULT_RELOAD_TIME_MIN;
+                       }
+                       
+                       // Always close the file
+                       try {
+                               if (reader != null) {
+                                       reader.close();
+                               }
+                       } catch (IOException e) {
+                               LOGGER.debug("Exception while closing reader for file:" + propertiesFileName, e);
+                       }
+               }
+       }
+
+       @Override
+       public synchronized MsoJsonProperties clone() {
+               MsoJsonProperties msoCopy = new MsoJsonProperties();
+               
+               ObjectMapper mapper = new ObjectMapper();
+               try {
+                       msoCopy.jsonRootNode = mapper.createObjectNode();
+                       msoCopy.jsonRootNode = mapper.readValue(this.jsonRootNode.toString(), JsonNode.class);
+               } catch (JsonParseException e) {
+                       LOGGER.debug("JsonParseException when cloning the object:" + this.propertiesFileName, e);
+               } catch (JsonMappingException e) {
+                       LOGGER.debug("JsonMappingException when cloning the object:" + this.propertiesFileName, e);
+               } catch (IOException e) {
+                       LOGGER.debug("IOException when cloning the object:" + this.propertiesFileName, e);
+               } 
+               
+               msoCopy.propertiesFileName = this.propertiesFileName;
+               msoCopy.automaticRefreshInMinutes = this.automaticRefreshInMinutes;
+               return msoCopy;
+       }
+
+
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((jsonRootNode == null) ? 0 : jsonRootNode.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               MsoJsonProperties other = (MsoJsonProperties) obj;
+               if (jsonRootNode == null) {
+                       if (other.jsonRootNode != null)
+                               return false;
+               } else if (!jsonRootNode.equals(other.jsonRootNode))
+                       return false;
+               return true;
+       }
+
+       @Override
+       public String toString() {
+               StringBuffer response = new StringBuffer();
+               response.append("Config file " + propertiesFileName + "(Timer:" + automaticRefreshInMinutes + "mins):"
+                               + System.getProperty("line.separator"));
+               response.append(this.jsonRootNode.toString());
+               response.append(System.getProperty("line.separator"));
+               response.append(System.getProperty("line.separator"));
+               return response.toString();
+
+       }
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesException.java b/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesException.java
new file mode 100644 (file)
index 0000000..caf0ffa
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.properties;
+
+
+/**
+ * Exception during artifact installation.
+ */
+public class MsoPropertiesException extends Exception {
+
+       /**
+     * serialization id.
+        */
+       private static final long serialVersionUID = 4095937499475915021L;
+
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public MsoPropertiesException (final String message) {
+        super (message);
+       
+    }
+       
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public MsoPropertiesException (final String message, final Throwable cause) {
+        super (message, cause);
+       
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesFactory.java b/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesFactory.java
new file mode 100644 (file)
index 0000000..7767631
--- /dev/null
@@ -0,0 +1,395 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.properties;
+
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import javax.ejb.ConcurrencyManagement;
+import javax.ejb.ConcurrencyManagementType;
+import javax.ejb.LocalBean;
+import javax.ejb.Schedule;
+import javax.ejb.Singleton;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.utils.CryptoUtils;
+
+/**
+ * This EJB Singleton class returns an instance of the mso properties for a specified file.
+ * This class can handle many config at the same time and is thread safe.
+ * This instance is a copy of the one cached so it can be modified or reloaded without impacting the others class using
+ * it.
+ * The mso properties files loaded and cached here will be reloaded every X second (it's configurable with the init
+ * method)
+ * This class can be used as an EJB or can be instantiated directly as long as the EJB has been initialized for the current
+ * module. Locks are made manually and not using EJB locks to allow this.
+ *
+ *
+ */
+@Singleton(name = "MsoPropertiesFactory")
+@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
+@LocalBean
+@Path("/properties")
+public class MsoPropertiesFactory implements Serializable {
+
+       private static final long serialVersionUID = 4365495305496742113L;
+
+    protected static String prefixMsoPropertiesPath = System.getProperty ("mso.config.path");
+
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
+
+    // Keep a static copy of properties for global usage
+    private static final ConcurrentHashMap <String, MsoPropertiesParameters> msoPropertiesCache;
+
+    static {
+        if (prefixMsoPropertiesPath == null) {
+            // Hardcode if nothing is received
+            prefixMsoPropertiesPath = "";
+        }
+        msoPropertiesCache = new ConcurrentHashMap <String, MsoPropertiesParameters> ();
+    }
+
+    private static final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock ();
+
+    public MsoPropertiesFactory () {
+
+    }
+
+    private boolean isJsonFile(String propertiesFilePath) {
+       return propertiesFilePath.endsWith(".json");
+    }
+    
+    
+    private boolean isJavaPropertiesFile (String propertiesFilePath) {
+       return propertiesFilePath.endsWith(".properties");
+    }
+    
+       private MsoPropertiesParameters createObjectType (MsoPropertiesParameters msoPropParams, String propertiesFilePath) throws MsoPropertiesException, IOException {
+       
+               try {
+               if (this.isJavaPropertiesFile(propertiesFilePath)) {
+                       
+                       msoPropParams.msoProperties =  new MsoJavaProperties();
+                       msoPropParams.msoPropertiesType = MsoPropertiesParameters.MsoPropertiesType.JAVA_PROP;
+                } else if (this.isJsonFile(propertiesFilePath)) {
+                        
+                       msoPropParams.msoProperties =  new MsoJsonProperties();
+                       msoPropParams.msoPropertiesType = MsoPropertiesParameters.MsoPropertiesType.JSON_PROP;
+                } else {
+                        throw new MsoPropertiesException("Unable to load the MSO properties file because format is not recognized (only .json or .properties): " + propertiesFilePath);
+                }
+       
+               msoPropParams.msoProperties.loadPropertiesFile (propertiesFilePath);
+               
+               return msoPropParams;
+               } finally {
+                       if (msoPropParams.msoProperties!=null) {
+                               msoPropParams.refreshCounter = msoPropParams.msoProperties.getAutomaticRefreshInMinutes();
+                       }
+               }
+
+    }
+    
+    /**
+     * This method is used to create a MsoProperties file cache and factory.
+        * The ID is kept in cache even if the config fails to be loaded.
+        * This is used to maintain the config ID until someone fixes the config file.
+     *
+     * @param msoPropertiesID A string representing the key of the config
+     * @param propertiesFilePath The mso properties file to load
+     *
+     * @throws MsoPropertiesException In case of issues with the mso properties loading
+     *
+     * @see MsoPropertiesFactory#getMsoJavaProperties()
+     * @see MsoPropertiesFactory#getMsoJsonProperties()
+     */
+    public void initializeMsoProperties (String msoPropertiesID,
+                                         String propertiesFilePath) throws MsoPropertiesException {
+             
+        rwl.writeLock ().lock ();
+        
+        String msoPropPath="none";
+        MsoPropertiesParameters msoPropertiesParams=new MsoPropertiesParameters();
+        try {
+               msoPropPath = prefixMsoPropertiesPath + propertiesFilePath; 
+               if (msoPropertiesCache.get (msoPropertiesID) != null) {
+                throw new MsoPropertiesException ("The factory contains already an instance of this mso properties: "
+                                                  + msoPropPath);
+            }
+               // Create the global MsoProperties object
+               msoPropertiesParams = createObjectType(msoPropertiesParams, msoPropPath);
+
+        } catch (FileNotFoundException e) {
+            throw new MsoPropertiesException ("Unable to load the MSO properties file because it has not been found:"
+                                              + msoPropPath, e);
+
+        } catch (IOException e) {
+            throw new MsoPropertiesException ("Unable to load the MSO properties file because IOException occurs: "
+                                              + msoPropPath, e);
+        } finally {
+               // put it in all cases, just to not forget about him and attempt a default reload
+               msoPropertiesCache.put (msoPropertiesID, msoPropertiesParams);
+            rwl.writeLock ().unlock ();
+        }
+    }
+
+    public void removeMsoProperties (String msoPropertiesID) throws MsoPropertiesException {
+
+        rwl.writeLock ().lock ();
+        try {
+            if (MsoPropertiesFactory.msoPropertiesCache.remove (msoPropertiesID) == null) {
+                throw new MsoPropertiesException ("Mso properties not found in cache:" + msoPropertiesID);
+            }
+        } finally {
+            rwl.writeLock ().unlock ();
+        }
+    }
+
+    /**
+     * This method clears all the configs in cache, the factory will then be free of any config.
+     * 
+     * @see MsoPropertiesFactory#initializeMsoProperties(String, String)
+     */
+    public void removeAllMsoProperties () {
+
+        rwl.writeLock ().lock ();
+        try {
+            MsoPropertiesFactory.msoPropertiesCache.clear ();
+        } finally {
+            rwl.writeLock ().unlock ();
+        }
+    }
+
+    /**
+     * THis method can be used to change the file and timer fields of an existing MSO properties file.
+     *
+     * @param msoPropertiesID The MSO properties ID
+     * @param newMsoPropPath The new file Path
+     * @throws MsoPropertiesException In case of the MSO Properties is not found in cache
+     */
+    public void changeMsoPropertiesFilePath (String msoPropertiesID,
+                                             String newMsoPropPath) throws MsoPropertiesException {
+
+        rwl.writeLock ().lock ();
+        try {
+               MsoPropertiesParameters msoPropInCache = MsoPropertiesFactory.msoPropertiesCache.get (msoPropertiesID);
+
+            if (msoPropInCache != null) {
+                msoPropInCache.msoProperties.propertiesFileName = prefixMsoPropertiesPath + newMsoPropPath;
+                
+            } else {
+                throw new MsoPropertiesException ("Mso properties not found in cache:" + msoPropertiesID);
+            }
+        } finally {
+            rwl.writeLock ().unlock ();
+        }
+    }
+
+    private AbstractMsoProperties getAndCloneProperties(String msoPropertiesID, MsoPropertiesParameters.MsoPropertiesType type) throws MsoPropertiesException {
+        rwl.readLock ().lock ();
+         try {
+               MsoPropertiesParameters msoPropInCache = MsoPropertiesFactory.msoPropertiesCache.get (msoPropertiesID);
+             if (msoPropInCache == null) {
+                 throw new MsoPropertiesException ("Mso properties not found in cache:" + msoPropertiesID);
+             } else {
+                 if (type.equals(msoPropInCache.msoPropertiesType)) {
+                       return msoPropInCache.msoProperties.clone ();
+                 } else {
+                       throw new MsoPropertiesException ("Mso properties is not "+type.name()+" properties type:" + msoPropertiesID);
+                 }
+               
+             }
+         } finally {
+             rwl.readLock ().unlock ();
+         }
+    }
+    
+    /**
+     * Get the MSO Properties (As Java Properties) as a copy of the mso properties cache.
+     * The object returned can therefore be modified.
+     *
+     * @return A copy of the mso properties, properties class can be empty if the file has not been read properly
+     * @throws MsoPropertiesException If the mso properties does not exist in the cache
+     */
+    public MsoJavaProperties getMsoJavaProperties (String msoPropertiesID) throws MsoPropertiesException {
+
+       return (MsoJavaProperties)getAndCloneProperties(msoPropertiesID,MsoPropertiesParameters.MsoPropertiesType.JAVA_PROP);
+    }
+    
+    /**
+     * Get the MSO Properties (As JSON Properties) as a copy of the mso properties cache.
+     * The object returned can therefore be modified.
+     *
+     * @return A copy of the mso properties, properties class can be empty if the file has not been read properly
+     * @throws MsoPropertiesException If the mso properties does not exist in the cache
+     */
+    public MsoJsonProperties getMsoJsonProperties (String msoPropertiesID) throws MsoPropertiesException {
+
+       return (MsoJsonProperties)getAndCloneProperties(msoPropertiesID,MsoPropertiesParameters.MsoPropertiesType.JSON_PROP);
+    }
+
+    /**
+     * Get all MSO Properties as a copy of the mso properties cache.
+     * The objects returned can therefore be modified.
+     *
+     * @return A List of copies of the mso properties, can be empty
+     */
+    public List <AbstractMsoProperties> getAllMsoProperties () {
+
+        List <AbstractMsoProperties> resultList = new LinkedList <AbstractMsoProperties> ();
+        rwl.readLock ().lock ();
+        try {
+
+               for (MsoPropertiesParameters msoProp:MsoPropertiesFactory.msoPropertiesCache.values ()) {
+                       resultList.add(msoProp.msoProperties.clone());
+               }
+            return resultList;
+
+        } finally {
+            rwl.readLock ().unlock ();
+        }
+
+    }
+
+    /**
+     * This method is not intended to be called, it's used to refresh the config automatically
+     *
+     * @return true if Properties have been reloaded, false otherwise
+     */
+    @Schedule(minute = "*/1", hour = "*", persistent = false)
+    public boolean reloadMsoProperties () {
+       AbstractMsoProperties msoPropInCache = null;
+        try {
+            if (!rwl.writeLock ().tryLock () && !rwl.writeLock ().tryLock (30L, TimeUnit.SECONDS)) {
+                LOGGER.debug ("Busy write lock on mso properties factory, skipping the reloading");
+                return false;
+            }
+        } catch (InterruptedException e1) {
+            LOGGER.debug ("Interrupted while trying to acquire write lock on mso properties factory, skipping the reloading");
+            Thread.currentThread ().interrupt ();
+            return false;
+        }
+        try {
+            for (Entry <String, MsoPropertiesParameters> entryMsoPropTimer : MsoPropertiesFactory.msoPropertiesCache.entrySet ()) {
+
+                if (entryMsoPropTimer.getValue ().refreshCounter <= 1) {
+                    // It's time to reload the config
+                    msoPropInCache = MsoPropertiesFactory.msoPropertiesCache.get (entryMsoPropTimer.getKey ()).msoProperties;
+                    try {
+                       AbstractMsoProperties oldProps = msoPropInCache.clone ();
+                        msoPropInCache.reloadPropertiesFile ();
+                        entryMsoPropTimer.getValue().refreshCounter=entryMsoPropTimer.getValue().msoProperties.getAutomaticRefreshInMinutes();
+                     
+                        if (!msoPropInCache.equals (oldProps)) {
+                            LOGGER.info (MessageEnum.LOAD_PROPERTIES_SUC, msoPropInCache.getPropertiesFileName (), "", "");
+                        }
+                    } catch (FileNotFoundException ef) {
+                        LOGGER.error (MessageEnum.NO_PROPERTIES, msoPropInCache.propertiesFileName, "", "", MsoLogger.ErrorCode.PermissionError, "", ef);
+                    } catch (Exception e) {
+                        LOGGER.error (MessageEnum.LOAD_PROPERTIES_FAIL, msoPropInCache.propertiesFileName, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "", e);
+                    }
+
+                } else {
+                       --entryMsoPropTimer.getValue().refreshCounter;
+                }
+            }
+            return true;
+        } catch (Exception e) {
+            LOGGER.error (MessageEnum.LOAD_PROPERTIES_FAIL, "Unknown. Global issue while reloading", "", "", MsoLogger.ErrorCode.BusinessProcesssError, "", e);
+            return false;
+        } finally {
+            rwl.writeLock ().unlock ();
+        }
+    }
+
+    /**
+     * This method can be used to known if the MSO properties instance hold is different from the one in cache
+     *
+     * @param msoPropertiesID The MSO properties ID
+     * @param oldMsoProperties The MSO Properties instance that must be compared to
+     * @return True if they are the same, false otherwise
+     * @throws MsoPropertiesException 
+     */
+    public boolean propertiesHaveChanged (String msoPropertiesID, AbstractMsoProperties oldMsoProperties) throws MsoPropertiesException {
+        rwl.readLock ().lock ();
+        try {
+               if (MsoPropertiesFactory.msoPropertiesCache.get (msoPropertiesID) == null) {
+                       throw new MsoPropertiesException ("Mso properties not found in cache:" + msoPropertiesID);
+               }
+                        
+               AbstractMsoProperties msoPropInCache = MsoPropertiesFactory.msoPropertiesCache.get (msoPropertiesID).msoProperties;
+            if (oldMsoProperties != null) {
+                return !oldMsoProperties.equals (msoPropInCache);
+            } else {
+                return msoPropInCache != null;
+            }
+        } finally {
+            rwl.readLock ().unlock ();
+        }
+    }
+
+    @GET
+    @Path("/show")
+    @Produces("text/plain")
+    public Response showProperties () {
+
+        List <AbstractMsoProperties> listMsoProp = this.getAllMsoProperties ();
+        StringBuffer response = new StringBuffer ();
+
+        if (listMsoProp.isEmpty ()) {
+            response.append ("No file defined");
+        }
+
+        for (AbstractMsoProperties properties : listMsoProp) {
+
+               response.append(properties.toString());
+        }
+
+        return Response.status (200).entity (response).build ();
+    }
+
+    @GET
+    @Path("/encrypt/{value}/{cryptKey}")
+    @Produces("text/plain")
+    public Response encryptProperty (@PathParam("value") String value, @PathParam("cryptKey") String cryptKey) {
+        try {
+            String encryptedValue = CryptoUtils.encrypt (value, cryptKey);
+            return Response.status (200).entity (encryptedValue).build ();
+        } catch (Exception e) {
+            LOGGER.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Encryption error", "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Error in encrypting property", e);
+            return Response.status (500).entity (e.getMessage ()).build ();
+        }
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesParameters.java b/common/src/main/java/org/openecomp/mso/properties/MsoPropertiesParameters.java
new file mode 100644 (file)
index 0000000..358550a
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.properties;
+
+
+public class MsoPropertiesParameters {
+       
+       protected enum MsoPropertiesType {JSON_PROP,JAVA_PROP};
+       
+       protected MsoPropertiesType msoPropertiesType;
+       
+       protected int refreshCounter;
+       
+       protected AbstractMsoProperties msoProperties;
+}
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoPropertyInitializer.java b/common/src/main/java/org/openecomp/mso/properties/MsoPropertyInitializer.java
new file mode 100644 (file)
index 0000000..38e3ae3
--- /dev/null
@@ -0,0 +1,87 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.properties;
+
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.annotation.WebListener;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * This class will attempt to initialize MSO Properties when part of a web application.
+ * It will look for the configuration file mso.properties in the
+ * following order:
+ * 1. In an init-param "mso.configuration" in web.xml
+ * 2. In a system property "mso.configuration"
+ * 3. In the default location "/etc/ecomp/mso/config/mso.properties"
+ *
+ * If all else fails, the MSO Properties will go uninitialized, and will
+ * attempt to use the default constructors within the MsoProperties class.
+ *
+ *
+ */
+@WebListener
+public class MsoPropertyInitializer implements ServletContextListener
+{
+
+       private MsoPropertiesFactory msoPropertiesFactory=new MsoPropertiesFactory();
+
+       public MsoPropertyInitializer () {
+       }
+
+       @Override
+       public void contextDestroyed(ServletContextEvent event) {
+               // Nothing to do...
+       }
+
+
+       @Override
+       public void contextInitialized(ServletContextEvent event)
+       {
+
+               // Note - this logger may be before or after MSO Logging configuration applied
+               MsoLogger initLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+               try {
+                       // Look first in the init-parameters
+                       String msoPropConfigParam = event.getServletContext().getInitParameter("mso.configuration");
+                       if (msoPropConfigParam != null && !msoPropConfigParam.isEmpty() ) {
+                               String[] configFileSplit = msoPropConfigParam.split(",");
+                               for (String msoPropConfig:configFileSplit) {
+                                       String[] msoPropDecoded = msoPropConfig.split("=");
+       
+                                       try {
+                                               msoPropertiesFactory.initializeMsoProperties(msoPropDecoded[0], msoPropDecoded[1]);
+                                               initLogger.info(MessageEnum.LOAD_PROPERTIES_SUC, msoPropDecoded[1], "", "");
+                                               initLogger.debug("Mso properties successfully loaded:"+msoPropDecoded[1]+",ID:"+msoPropDecoded[0]+")");
+                                       } catch (MsoPropertiesException e) {
+                                               initLogger.error(MessageEnum.LOAD_PROPERTIES_FAIL, msoPropDecoded[1] + ". MSO Properties failed due to an mso properties exception", "", "", MsoLogger.ErrorCode.DataError, "Error in contextInitialized", e);
+                                       }
+                               }
+                       }
+               }
+               catch (Exception e) {
+                       initLogger.error(MessageEnum.LOAD_PROPERTIES_FAIL, "Unknown. MSO Properties failed to initialize completely", "", "", MsoLogger.ErrorCode.DataError, "", e);
+               }
+       }
+}
diff --git a/common/src/main/java/org/openecomp/mso/utils/CheckResults.java b/common/src/main/java/org/openecomp/mso/utils/CheckResults.java
new file mode 100644 (file)
index 0000000..3e77a4c
--- /dev/null
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.utils;
+
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "checkresults")
+public class CheckResults {
+
+    @XmlElement(name = "checkresult")
+    private List <CheckResult> results;
+
+    public CheckResults () {
+        results = new ArrayList <CheckResult> ();
+    }
+
+    public List <CheckResult> getResults () {
+        return results;
+    }
+
+    public void addHostCheckResult (String hostname, int state, String output) {
+        CheckResult newResult = new CheckResult ();
+        newResult.setType ("host");
+        newResult.setHostname (hostname);
+        newResult.setState (state);
+        newResult.setOutput (output);
+        results.add (newResult);
+    }
+
+    public void addServiceCheckResult (String hostname, String servicename, int state, String output) {
+        CheckResult newResult = new CheckResult ();
+        newResult.setType ("service");
+        newResult.setHostname (hostname);
+        newResult.setServicename (servicename);
+        newResult.setState (state);
+        newResult.setOutput (output);
+        results.add (newResult);
+    }
+
+    public static class CheckResult {
+
+        private String type;
+        private String hostname;
+        private String servicename;
+        private int state;
+        private String output;
+
+        @XmlAttribute(required = true)
+        public String getType () {
+            return type;
+        }
+
+        public void setType (String type) {
+            this.type = type;
+        }
+
+        @XmlElement(required = true)
+        public String getHostname () {
+            return hostname;
+        }
+
+        public void setHostname (String hostname) {
+            this.hostname = hostname;
+        }
+
+        @XmlElement(required = false)
+        public String getServicename () {
+            return servicename;
+        }
+
+        public void setServicename (String servicename) {
+            this.servicename = servicename;
+        }
+
+        @XmlElement(required = true)
+        public int getState () {
+            return state;
+        }
+
+        public void setState (int state) {
+            this.state = state;
+        }
+
+        @XmlElement(required = true)
+        public String getOutput () {
+            return output;
+        }
+
+        public void setOutput (String output) {
+            this.output = output;
+        }
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java b/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java
new file mode 100644 (file)
index 0000000..c926903
--- /dev/null
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.utils;
+
+
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.security.NoSuchAlgorithmException;
+
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+
+/**
+ * CryptoUtils adapted from RTTP client.
+ * 
+ */
+public final class CryptoUtils {
+
+    public static final String AES = "AES";
+
+    /**
+     * encrypt a value and generate a keyfile
+     * if the keyfile is not found then a new one is created
+     * 
+     * @throws GeneralSecurityException
+     */
+    public static String encrypt (String value, String keyString) throws GeneralSecurityException {
+        SecretKeySpec sks = getSecretKeySpec (keyString);
+        Cipher cipher = Cipher.getInstance (CryptoUtils.AES);
+        cipher.init (Cipher.ENCRYPT_MODE, sks, cipher.getParameters ());
+        byte[] encrypted = cipher.doFinal (value.getBytes ());
+        return byteArrayToHexString (encrypted);
+    }
+
+    /**
+     * decrypt a value
+     * 
+     * @throws GeneralSecurityException
+     */
+    public static String decrypt (String message, String keyString) throws GeneralSecurityException {
+        SecretKeySpec sks = getSecretKeySpec (keyString);
+        Cipher cipher = Cipher.getInstance (CryptoUtils.AES);
+        cipher.init (Cipher.DECRYPT_MODE, sks);
+        byte[] decrypted = cipher.doFinal (hexStringToByteArray (message));
+        return new String (decrypted);
+    }
+
+    private static SecretKeySpec getSecretKeySpec (String keyString) throws NoSuchAlgorithmException {
+        byte[] key = hexStringToByteArray (keyString);
+        SecretKeySpec sks = new SecretKeySpec (key, CryptoUtils.AES);
+        return sks;
+    }
+
+    public static String byteArrayToHexString (byte[] b) {
+        StringBuffer sb = new StringBuffer (b.length * 2);
+        for (int i = 0; i < b.length; i++) {
+            int v = b[i] & 0xff;
+            if (v < 16) {
+                sb.append ('0');
+            }
+            sb.append (Integer.toHexString (v));
+        }
+        return sb.toString ().toUpperCase ();
+    }
+
+    private static byte[] hexStringToByteArray (String s) {
+        byte[] b = new byte[s.length () / 2];
+        for (int i = 0; i < b.length; i++) {
+            int index = i * 2;
+            int v = Integer.parseInt (s.substring (index, index + 2), 16);
+            b[i] = (byte) v;
+        }
+        return b;
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/utils/UUIDChecker.java b/common/src/main/java/org/openecomp/mso/utils/UUIDChecker.java
new file mode 100644 (file)
index 0000000..3e8c5e9
--- /dev/null
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.utils;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+import java.util.UUID;
+
+/**
+ */
+public class UUIDChecker {
+
+    private UUIDChecker() {
+
+    }
+
+    public static boolean isValidUUID (String id) {
+        try {
+            if (null == id) {
+                return false;
+            }
+            UUID uuid = UUID.fromString(id);
+            return uuid.toString().equalsIgnoreCase(id);
+        } catch (IllegalArgumentException iae) {
+            return false;
+        }
+    }
+
+    private static String getUUID () {
+        return UUID.randomUUID().toString();
+    }
+
+    public static String verifyOldUUID (String oldId, MsoLogger msoLogger) {
+        if (!UUIDChecker.isValidUUID(oldId)) {
+            String newId = UUIDChecker.getUUID();
+            MsoLogger.setLogContext(newId, null);
+            msoLogger.info(MessageEnum.APIH_REPLACE_REQUEST_ID, oldId, "", "");
+            return newId;
+        }
+        MsoLogger.setLogContext(oldId, null);
+        return oldId;
+    }
+
+    public static String generateUUID (MsoLogger msoLogger) {
+        String newId = UUIDChecker.getUUID();
+        MsoLogger.setLogContext(newId, null);
+        msoLogger.info(MessageEnum.APIH_GENERATED_REQUEST_ID, newId, "", "");
+        return newId;
+    }
+
+    public static String generateServiceInstanceID (MsoLogger msoLogger) {
+        String newId = UUIDChecker.getUUID();
+        MsoLogger.setLogContext(null, newId);
+        msoLogger.info(MessageEnum.APIH_GENERATED_SERVICE_INSTANCE_ID, newId, "", "");
+        return newId;
+    }
+}
diff --git a/common/src/main/resources/ASDC.properties b/common/src/main/resources/ASDC.properties
new file mode 100644 (file)
index 0000000..015ca35
--- /dev/null
@@ -0,0 +1,210 @@
+###
+# ============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=========================================================
+###
+
+########################################################################
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+# {component}-{subcomponent}-{4-digit code}{classification}
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+#             ERR0000E\
+#             Sample error msg txt\
+#             Sample resolution msg\
+#             Sample description txt
+#
+######
+#Error code classification category for other components
+#1300-1399     Security/Permission Related
+#2300-2399     Availability/Timeout Related
+#3300-3399     Data Access/Integrity Related
+#4300-4399     Schema Interface Type/Validation
+#5300-5399     Business/Flow Processing Related
+#6300-6399     Reserved \u2013 do not use
+#9300-9399     Unknown Errors
+#
+######
+#{classification} description
+# I = Information
+# W = Warning
+# E = Error
+# F = Fatal
+########################################################################
+ASDC_GENERAL_WARNING=\
+                  MSO-ASDC-5301W|\
+                  WARNING: {0}|\
+                  Please check other logs for more detailed info|\
+                  General warning 
+ASDC_AUDIT_EXEC=\
+                  MSO-ASDC-5302I|\
+                  Executing method: {0}. {1}|\
+                  No resolution needed|\
+                  Executing method
+ASDC_GENERAL_METRICS=\
+                  MSO-ASDC-5305I|\
+                  Executed method: {0}. {1}|\
+                  No resolution needed|\
+                  Generate information for Metric events 
+ASDC_CREATE_SERVICE=\
+                  MSO-ASDC-5306I|\
+                  Creating new VNF Resource for service {0} with id {1} and version {2}|\
+                  No resolution needed|\
+                  Method triggered to create new VNF Resource                                                                                                                                                                                                                                                                                                                                     
+ASDC_CREATE_ARTIFACT=\
+                  MSO-ASDC-5307I|\
+                  Installing new {0} for service {1} with id {2} and version {3}|\
+                  No resolution needed|\
+                  Method triggered to create new VNF Resource   
+ASDC_ARTIFACT_ALREADY_DEPLOYED=\
+                  MSO-ASDC-5308W|\
+                  Constraint violation caught, artifact is already deployed {0} and version {1}|\
+                  No resolution needed|\
+                  Artifact is already deployed   
+ASDC_ARTIFACT_INSTALL_EXC=\
+                  MSO-ASDC-5309E|\
+                  Exception caught during installation of the {0}. Transaction rollback.|\
+                  Please check other logs for more detailed info|\
+                  Exception caught during installation of the artifact   
+ASDC_CHECK_HEAT_TEMPLATE=\
+                  MSO-ASDC-5310I|\
+                  Start to verify whether {0} with name {1} and version {2} is already deployed|\
+                  No resolution needed|\
+                  Check artifact  
+ASDC_ARTIFACT_ALREADY_DEPLOYED_DETAIL=\
+                  MSO-ASDC-5311I|\
+                  ResourceInstanceName:{0} (ResourceUUID:{1}) is already deployed for this Service:{2}/{3}(ServiceUUID:{4}) (ResourceName: {5})|\
+                  No resolution needed|\
+                  Resource is already deployed  
+ASDC_ARTIFACT_NOT_DEPLOYED_DETAIL=\
+                  MSO-ASDC-5312I|\
+                 ResourceInstanceName:{0} (ResourceUUID:{1}) is not yet deployed for this Service:{2}/{3}(ServiceUUID:{4}) (ResourceName: {5})|\
+                  No resolution needed|\
+                  Resource is not yet deployed  
+ASDC_INIT_ASDC_CLIENT_EXC=\
+                  MSO-ASDC-5314W|\
+                  ASDControllerException caught during the Init/closing of ASDC Client with address {0} and environment {1}|\
+                  Please check other logs for more detailed info|\
+                  ASDControllerException caught during the Init/closing of ASDC Client      
+ASDC_LOAD_ASDC_CLIENT_EXC=\
+                  MSO-ASDC-5315W|\
+                  ASDCParametersException caught during loading/reloading of the ASDC Client with address {0} and environment {1}|\
+                  Please check other logs for more detailed info|\
+                  ASDCParametersException caught during loading/reloading of the ASDC Client                    
+ASDC_SHUTDOWN_ASDC_CLIENT_EXC=\
+                  MSO-ASDC-5317W|\
+                  {0} caught during the ASDC Controller with address {1} and environment {2} shutdown|\
+                  Please check other logs for more detailed info|\
+                  Exception caught during the ASDC Controller shutdown  
+ASDC_START_INSTALL_ARTIFACT=\
+                  MSO-ASDC-5318I|\
+                  Trying to install the artifact:{0}|\
+                  No resolution needed|\
+                  Trying to install the artifact  
+ASDC_ARTIFACT_TYPE_NOT_SUPPORT=\
+                  MSO-ASDC-5319W|\
+                  This artifact type is not supported:{0}|\
+                  No resolution needed|\
+                  Artifact type is not supported  
+ASDC_ARTIFACT_ALREADY_EXIST=\
+                  MSO-ASDC-5320I|\
+                  No need to download the artifact as it exists already in MSO:{0} (UUID:{1}) associated to ResourceName {2}|\
+                  No resolution needed|\
+                  Artifact already exists                   
+ASDC_ARTIFACT_DOWNLOAD_SUC=\
+                  MSO-ASDC-5321I|\
+                  Artifact successfully downloaded:{0} (UUID:{1}) (SIZE in Bytes:{2})|\
+                  No resolution needed|\
+                  Artifact successfully downloaded   
+ASDC_ARTIFACT_DOWNLOAD_FAIL=\
+                  MSO-ASDC-5322E|\
+                  Artifact :{0} could not be downloaded correctly from ASDC URL {1} (UUID:{2}) Error message is {3})|\
+                  Please check other logs for more detailed info|\
+                  Artifact download failed
+ASDC_START_DEPLOY_ARTIFACT=\
+                  MSO-ASDC-5323I|\
+                  Trying to deploy the artifact:{0} (UUID:{1})|\
+                  No resolution needed|\
+                  Trying to deploy the artifact                                       
+ASDC_ARTIFACT_DEPLOY_SUC=\
+                  MSO-ASDC-5324I|\
+                  Resource successfully installed:{0} (UUID:{1}) (Nb of Modules:{2})|\
+                  No resolution needed|\
+                  Resource successfully installed  
+ASDC_SEND_NOTIF_ASDC=\
+                  MSO-ASDC-5325I|\
+                  Sending {0} ({1}) notification to ASDC for artifact:{2}|\
+                  No resolution needed|\
+                  Sending notif to ASDC  
+ASDC_SEND_NOTIF_ASDC_EXEC=\
+                  MSO-ASDC-5326W|\
+                  Exception caught when trying to notify ASDC|\
+                  Please check other logs for more detailed info|\
+                  Exception caught when trying to notify ASDC 
+ASDC_RECEIVE_CALLBACK_NOTIF=\
+                  MSO-ASDC-5327I|\
+                  Receive a callback notification in ASDC, nb of artifacts: {0} (ServiceUUID:{1})|\
+                  No resolution needed|\
+                  Receive a callback notification in ASDC  
+ASDC_RECEIVE_SERVICE_NOTIF=\
+                  MSO-ASDC-5328I|\
+                  Notification is ServiceVNF, (ServiceUUID:{0})|\
+                  No resolution needed|\
+                  Receive a callback notification for ServiceVNF 
+ASDC_ARTIFACT_NULL=\
+                  MSO-ASDC-5329I|\
+                  Nothing to deploy artifact is NULL, (ServiceUUID:{0})|\
+                  No resolution needed|\
+                  Nothing to deploy artifact is NULL 
+ASDC_SERVICE_NOT_SUPPORT=\
+                  MSO-ASDC-5330W|\
+                  Notification received, (ServiceUUID:{0}) is not a ServiceVNF and is therefore skipped|\
+                  No resolution needed|\
+                  Service not support 
+ASDC_INIT_ASDC_CLIENT_SUC=\
+                  MSO-ASDC-5331I|\
+                  ASDC Controller successfully initialized|\
+                  No resolution needed|\
+                  ASDC client initialized  
+ASDC_GENERAL_EXCEPTION_ARG=\
+                  MSO-ASDC-9300E|\
+                  Exception: {0}|\
+                  Please check other logs for more detailed info|\
+                  General exception with reason
+ASDC_GENERAL_EXCEPTION=\
+                  MSO-ASDC-9301E|\
+                  Exception encountered|\
+                  Please check other logs for more detailed info|\
+                  Exception encountered
+ASDC_ARTIFACT_CHECK_EXC=\
+                  MSO-ASDC-9302E|\
+                  Exception caught during checking existence of the artifact|\
+                  Please check other logs for more detailed info|\
+                  Exception caught during checking existence of the artifact
+ASDC_SINGLETON_CHECKT_EXC=\
+                  MSO-ASDC-9303E|\
+                  Exception caught during the singleton check for ASDC with address {0} and environment {1}|\
+                  Please check other logs for more detailed info|\
+                  Exception caught during the singleton check
+ASDC_PROPERTIES_NOT_FOUND=\
+                  MSO-ASDC-9304E|\
+                  Properties file: {0} not found|\
+                  Please verify whether properties file exist or readable|\
+                  Please verify whether properties file exist or readable|\
+                  Properties file not found
diff --git a/common/src/main/resources/ApiHandler.properties b/common/src/main/resources/ApiHandler.properties
new file mode 100644 (file)
index 0000000..82d452a
--- /dev/null
@@ -0,0 +1,255 @@
+###
+# ============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=========================================================
+###
+
+########################################################################
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+# {component}-{subcomponent}-{4-digit code}{classification}
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+#             ERR0000E\
+#             Sample error msg txt\
+#             Sample resolution msg\
+#             Sample description txt
+#
+#######
+#Error code classification category
+#1000-1099     Security/Permission Related
+#2000-2099     Availability/Timeout Related
+#3000-3099     Data Access/Integrity Related
+#4000-4099     Schema Interface Type/Validation
+#5000-5099     Business/Flow Processing Related
+#6000-8099     Reserved \u2013 do not use
+#9000-9099     Unknown Errors
+#
+######
+#{classification} description
+# I = Information
+# W = Warning
+# E = Error
+# F = Fatal
+########################################################################
+APIH_QUERY_FOUND=\
+                                 MSO-APIH-3000I|\
+                  Requests found when query DB with parameters {0}={1}|\
+                  No resolution needed|\
+                  Requests found when API Handler query DB
+APIH_QUERY_NOT_FOUND=\
+                  MSO-APIH-3001I|\
+                  Request not found when query DB with parameters {0}={1}|\
+                  No resolution needed|\
+                  Request not found when API Handler query DB
+APIH_DB_ACCESS_EXC=\
+                  MSO-APIH-3003E|\
+                  Unable to access DB|\
+                  Please check other logs for more detailed info|\
+                  Unable to access DB
+APIH_DB_ACCESS_EXC_REASON=\
+                  MSO-APIH-3005E|\
+                  Unable to access DB: {0}|\
+                  Please check other logs for more detailed info|\
+                  Unable to access DB
+APIH_DB_ATTRIBUTE_NOT_FOUND=\
+                  MSO-APIH-3006E|\
+                  Attribute {0} not found in DB|\
+                  Please check other logs for more detailed info|\
+                  Attribute not found in DB
+APIH_DB_INSERT_EXC=\
+                  MSO-APIH-3007E|\
+                  Unable to insert record to DB|\
+                  Please check other logs for more detailed info|\
+                  Unable to insert record to DB
+APIH_DB_UPDATE_EXC=\
+                  MSO-APIH-3008E|\
+                  Unable to update record to DB: {0}|\
+                  Please check other logs for more detailed info|\
+                  Unable to insert record to DB                                                                              
+APIH_VALIDATION_ERROR=\
+                  MSO-APIH-4000E|\
+                  Validation failed|\
+                  Please check other logs for more detailed info|\
+                  Validation failed   
+APIH_REQUEST_VALIDATION_ERROR=\
+                  MSO-APIH-4001E|\
+                  Validation of the input request failed, for incoming request:{0}|\
+                  Please check other logs for more detailed info|\
+                  Validation of the input request failed
+APIH_SERVICE_VALIDATION_ERROR=\
+                  MSO-APIH-4002E|\
+                  Service params failed schema validation|\
+                  Please check other logs for more detailed info|\
+                  Service params failed schema validation  
+APIH_REQUEST_VALIDATION_ERROR_REASON=\
+                  MSO-APIH-4003E|\
+                  Validation of the input request failed:{0}|\
+                  Please verify the input request|\
+                  Validation of the input request failed 
+APIH_VNFREQUEST_VALIDATION_ERROR=\
+                  MSO-APIH-4004E|\
+                  Validation of the VNF Request failed|\
+                  Please verify the VNF Request|\
+                  Validation of the VNF Request failed                                                           
+APIH_QUERY_PARAM_WRONG=\
+                  MSO-APIH-5003W|\
+                  Bad Request: {0}|\
+                  Please verify the request|\
+                  Bad Request
+APIH_GENERAL_WARNING=\
+                  MSO-APIH-5004W|\
+                  WARNING: {0}|\
+                  Please check other logs for more detailed info|\
+                  General warning 
+APIH_AUDIT_EXEC=\
+                  MSO-APIH-5005I|\
+                  Executing request: {0}. {1}|\
+                  No resolution needed|\
+                  Executing method
+APIH_GENERAL_METRICS=\
+                  MSO-APIH-5008I|\
+                  Executed method: {0}. {1}|\
+                  No resolution needed|\
+                  Generate information for Metric events   
+APIH_REQUEST_NULL=\
+                                         MSO-APIH-5009W|\
+                  The request received by MSO is null|\
+                  Please check other logs for more detailed info|\
+                  The request received by MSO is null  
+APIH_DUPLICATE_FOUND=\
+                                         MSO-APIH-5011W|\
+                  Duplicated request found: {0}|\
+                  Please check other logs for more detailed info|\
+                  Duplicated request found 
+APIH_BAD_ORDER=\
+                                         MSO-APIH-5012W|\
+                  Request received with wrong order: {0}|\
+                  Please check other logs for more detailed info|\
+                  Request received with wrong order                        
+APIH_BPEL_RESPONSE_ERROR=\
+                                         MSO-APIH-5014E|\
+                  Abnormal response received from BPEL server: {0}|\
+                  Please check other logs for more detailed info|\
+                  Abnormal response received from BPEL server  
+APIH_WARP_REQUEST=\
+                                         MSO-APIH-5015E|\
+                  Error wrapping request|\
+                  Please check other logs for more detailed info|\
+                  Error wrapping request to be sent to BPEL server   
+APIH_ERROR_FROM_BPEL_SERVER=\
+                                         MSO-APIH-5016E|\
+                  Error from {0} with status:{1} and responseBody:{2}|\
+                  Please check other logs for more detailed info|\
+                  Error from BPEL Server
+APIH_CANNOT_READ_SCHEMA=\
+                                         MSO-APIH-5017E|\
+                  MSO Configuration Error - Unable to read the schema file|\
+                  Please check other logs for more detailed info|\
+                  MSO Configuration Error - Unable to read the schema file  
+APIH_PROPERTY_LOAD_SUC=\
+                                         MSO-APIH-5018I|\
+                  Properties file loaded successfully|\
+                  No resolution needed|\
+                  Properties file loaded successfully   
+APIH_NO_PROPERTIES=\
+                                         MSO-APIH-5019E|\
+                  Missing or invalid properties file: {0}|\
+                  Please verify whether properties file exist or redable|\
+                  Missing or invalid properties file
+APIH_LOAD_PROPERTIES_FAIL=\
+                                         MSO-APIH-5020E|\
+                  Unable to load properties file: {0}|\
+                  Please verify whether properties file exist or redable|\
+                  Unable to load properties file
+APIH_GENERATED_REQUEST_ID=\
+                                         MSO-APIH-5021I|\
+                  Missing requestID. Assigned {0}|\
+                  No resolution needed|\
+                  Request ID is not available
+APIH_REPLACE_REQUEST_ID=\
+                                         MSO-APIH-5022I|\
+                  Replaced invalid requestID of {0}|\
+                  No resolution needed|\
+                  Request ID received is not compliant with ECOMP Standards
+APIH_GENERATED_SERVICE_INSTANCE_ID=\
+                                         MSO-APIH-5023I|\
+                  Missing serviceInstanceID. Assigned {0}|\
+                  No resolution needed|\
+                  Service Instance ID is not available
+APIH_GENERAL_EXCEPTION_ARG=\
+                  MSO-APIH-9000E|\
+                  Exception: {0}|\
+                  Please check other logs for more detailed info|\
+                  General exception with reason
+APIH_GENERAL_EXCEPTION=\
+                  MSO-APIH-9001E|\
+                  Exception encountered|\
+                  Please check other logs for more detailed info|\
+                  Exception encountered   
+APIH_HEALTH_CHECK_EXCEPTION=\
+                  MSO-APIH-9002E|\
+                  Exception during health check|\
+                  Please check other logs for more detailed info|\
+                  Exception during health check
+APIH_READ_VNFOUTPUT_CLOB_EXCEPTION=\
+                  MSO-APIH-9003E|\
+                  Exception reading vnfOutputs Clob|\
+                  Please check other logs for more detailed info|\
+                  Exception reading vnfOutputs Clob
+APIH_DUPLICATE_CHECK_EXC=\
+                                         MSO-APIH-9004E|\
+                  Exception during the duplication check for post services|\
+                  Please check other logs for more detailed info|\
+                  Exception during the duplicate check for post services
+APIH_BPEL_COMMUNICATE_ERROR=\
+                                         MSO-APIH-9005E|\
+                  Exception during BPEL POST|\
+                  Please check other logs for more detailed info|\
+                  Exception during BPEL POST 
+APIH_SDNC_COMMUNICATE_ERROR=\
+                                         MSO-APIH-9006E|\
+                  Exception when sending HTTP POST request to SDNC Adapter|\
+                  Please check other logs for more detailed info|\
+                  Exception when sending HTTP POST request to SDNC Adapter 
+APIH_SDNC_RESPONSE_ERROR=\
+                                         MSO-APIH-9007E|\
+                  IOException getting SDNC Adapter response body|\
+                  Please check other logs for more detailed info|\
+                  IOException getting SDNC Adapter response body 
+APIH_JAXB_MARSH_ERROR=\
+                                         MSO-APIH-9008E|\
+                  Exception when translating query results into string with Jaxb|\
+                  Please check other logs for more detailed info|\
+                  Exception when translating query results into string with Jaxb 
+APIH_JAXB_UNMARSH_ERROR=\
+                                         MSO-APIH-9009E|\
+                  Exception when formatting for VNF outputs with Jaxb|\
+                  Please check other logs for more detailed info|\
+                  Exception when formatting for VNF outputs  
+APIH_DOM2STR_ERROR=\
+                                         MSO-APIH-9010E|\
+                  Error converting xml Document to String|\
+                  Please check other logs for more detailed info|\
+                  Error converting xml Document to String
+APIH_DUPLICATE_CHECK_EXC_ATT=\
+                                         MSO-APIH-9011E|\
+                  Exception during the duplication check for post services with the same attribute: {0}|\
+                  Please check other logs for more detailed info|\
+                  Exception during the duplicate check for post services
+
diff --git a/common/src/main/resources/BPMN.properties b/common/src/main/resources/BPMN.properties
new file mode 100644 (file)
index 0000000..298268b
--- /dev/null
@@ -0,0 +1,94 @@
+###
+# ============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=========================================================
+###
+
+########################################################################
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+# {component}-{subcomponent}-{4-digit code}{classification}
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+#             ERR0000E\
+#             Sample error msg txt\
+#             Sample resolution msg\
+#             Sample description txt
+#
+#######
+#Error code classification category
+#1100-1199     Security/Permission Related
+#2100-2199     Availability/Timeout Related
+#3100-3199     Data Access/Integrity Related
+#4100-4199     Schema Interface Type/Validation
+#5100-5199     Business/Flow Processing Related
+#6100-6199     Reserved \u2013 do not use
+#9100-9199     Unknown Errors
+#
+######
+#{classification} description
+# I = Information
+# W = Warning
+# E = Error
+# F = Fatal
+########################################################################    
+BPMN_GENERAL_INFO=\
+                  MSO-BPEL-5100I|\
+                  INFO: {0}|\
+                  No resolution needed|\
+                  General info 
+BPMN_GENERAL_WARNING=\
+                  MSO-BPEL-5101W|\
+                  WARNING: {0}|\
+                  Please check other logs for more information|\
+                  General warning 
+BPMN_AUDIT_EXEC=\
+                  MSO-BPEL-5102I|\
+                  Executing method: {0}. {1}|\
+                  No resolution needed|\
+                  Executing method
+BPMN_GENERAL_METRICS=\
+                  MSO-BPEL-5105I|\
+                  Executed method: {0}. {1}|\
+                  No resolution needed|\
+                  Generate information for Metric events
+BPMN_URN_MAPPING_FAIL=\
+                  MSO-BPEL-5106E|\
+                  URN Mapping Task Failed to execute|\
+                  Please check other logs for more information|\
+                  URN Mapping Task Failed to execute
+BPMN_VARIABLE_NULL=\
+                  MSO-BPEL-5107W|\
+                  Variable {0} is null; skipped|\
+                  No resolution needed|\
+                  Variable is null                                                                                                                                            
+BPMN_GENERAL_EXCEPTION_ARG=\
+                  MSO-BPEL-9100E|\
+                  Exception: {0}|\
+                  Please check other logs for more information|\
+                  General exception with reason
+BPMN_GENERAL_EXCEPTION=\
+                  MSO-BPEL-9101E|\
+                  Exception encountered|\
+                  Please check other logs for more information|\
+                  Exception encountered        
+BPMN_SDNC_CALLBACK_EXCEPTION=\
+                  MSO-BPEL-9102E|\
+                  {0} Exception occurred during processing of MSO sdncAdapterCallbackService {1}|\
+                  Please check other logs for more information|\
+                  Exception occurred during processing of MSO sdncAdapterCallbackService                                                                                                         
diff --git a/common/src/main/resources/GenericMessages.properties b/common/src/main/resources/GenericMessages.properties
new file mode 100644 (file)
index 0000000..2640323
--- /dev/null
@@ -0,0 +1,139 @@
+###
+# ============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=========================================================
+###
+
+########################################################################
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+# {component}-{subcomponent}-{4-digit code}{classification}
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+#             ERR0000E\
+#             Sample error msg txt\
+#             Sample resolution msg\
+#             Sample description txt
+#
+#######
+#Error code classification category for other components
+#1400-1499     Security/Permission Related
+#2400-2499     Availability/Timeout Related
+#3400-3499     Data Access/Integrity Related
+#4400-4499     Schema Interface Type/Validation
+#5400-5499     Business/Flow Processing Related
+#6400-6499     Reserved \u2013 do not use
+#9400-9499     Unknown Errors
+#
+######
+#{classification} description
+# I = Information
+# W = Warning
+# E = Error
+# F = Fatal
+########################################################################
+GENERAL_WARNING=\
+                  MSO-GENERAL-5401W|\
+                  WARNING: {0}|\
+                  Please check other logs for more detailed info|\
+                  General warning 
+AUDIT_EXEC=\
+                  MSO-GENERAL-5402I|\
+                  Executing method: {0}. {1}|\
+                  No resolution needed|\
+                  Executing method 
+GENERAL_METRICS=\
+                  MSO-GENERAL-5405I|\
+                  Executed method: {0}. {1}|\
+                  No resolution needed|\
+                  Generate information for Metric events       
+LOGGER_SETUP=\
+                  MSO-GENERAL-5406I|\
+                  Request received to update logger level|\
+                  No resolution needed|\
+                  Request received to update logger level 
+LOGGER_NOT_FOUND=\
+                  MSO-GENERAL-5407I|\
+                  Logger Servlet: Logger not found: : {0}|\
+                  No resolution needed|\
+                  Logger not found 
+LOGGER_UPDATE_SUC=\
+                  MSO-GENERAL-5408I|\
+                  Successfully update Logger: {0} from level {1} to level {2}|\
+                  No resolution needed|\
+                  Generate information for Metric events    
+LOGGER_UPDATE_DEBUG=\
+                  MSO-GENERAL-5409I|\
+                  Request received to update debug mode|\
+                  No resolution needed|\
+                  Request received to update debug mode   
+LOGGER_UPDATE_DEBUG_SUC=\
+                  MSO-GENERAL-5410I|\
+                  Successfully {0} debug mode|\
+                  No resolution needed|\
+                  Successfully updated debug mode    
+LOAD_PROPERTIES_SUC=\
+                  MSO-GENERAL-5411I|\
+                  Properties file loaded successfully from file {0}|\
+                  No resolution needed|\
+                  Properties file loaded successfully   
+NO_PROPERTIES=\
+                  MSO-GENERAL-5412E|\
+                  Missing or invalid properties file: {0}|\
+                  Please verify whether properties file exist or readable|\
+                  Missing or invalid properties file   
+LOAD_PROPERTIES_FAIL=\
+                  MSO-GENERAL-5413E|\
+                  Failed loading properties file: {0}|\
+                  Please verify whether properties file exist or readable|\
+                  Failed loading properties file
+INIT_LOGGER=\
+                  MSO-GENERAL-5414I|\
+                  Prepare to initialize loggers from {0}|\
+                  No resolution needed|\
+                  Prepare to initialize loggers    
+MADATORY_PARAM_MISSING=\
+                  MSO-GENERAL-5415E|\
+                  Not able to get mandatory parameter: {0} from file {1}|\
+                  No resolution needed|\
+                  Mandatory parameter missing                      
+IDENTITY_SERVICE_NOT_FOUND=\
+                  MSO-GENERAL-5416E|\
+                  Identity service not found: region={0} ,cloud={1}|\
+                  Please check other logs for more detailed info|\
+                  Identity service not found                                                                                                                                                                                                                                                                                                                                     
+GENERAL_EXCEPTION_ARG=\
+                  MSO-GENERAL-9400E|\
+                  Exception: {0}|\
+                  Please check other logs for more detailed info|\
+                  General exception with reason
+GENERAL_EXCEPTION=\
+                  MSO-GENERAL-9401E|\
+                  Exception encountered|\
+                  Please check other logs for more detailed info|\
+                  Exception encountered 
+INIT_LOGGER_FAIL=\
+                  MSO-GENERAL-9402E|\
+                  Failed to initialize loggers|\
+                  No resolution|\
+                  Failed to initialize loggers
+JAXB_EXCEPTION=\
+                  MSO-GENERAL-9403E|\
+                  JAXB Initialization Error|\
+                  Please check other logs for more detailed info|\
+                  JAXB Initialization Error
diff --git a/common/src/main/resources/ResourceAdapter.properties b/common/src/main/resources/ResourceAdapter.properties
new file mode 100644 (file)
index 0000000..f1c8b26
--- /dev/null
@@ -0,0 +1,489 @@
+###
+# ============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=========================================================
+###
+
+########################################################################
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+# {component}-{subcomponent}-{4-digit code}{classification}
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+#             ERR0000E\
+#             Sample error msg txt\
+#             Sample resolution msg\
+#             Sample description txt
+#
+#######
+#Error code classification category
+#1200-1299     Security/Permission Related
+#2200-2299     Availability/Timeout Related
+#3200-3299     Data Access/Integrity Related
+#4200-4299     Schema Interface Type/Validation
+#5200-5299     Business/Flow Processing Related
+#6200-6299     Reserved \u2013 do not use
+#9200-9299     Unknown Errors
+#
+######
+#{classification} description
+# I = Information
+# W = Warning
+# E = Error
+# F = Fatal
+########################################################################
+RA_CREATE_STACK_TIMEOUT=\
+                  MSO-RA-2200E|\
+                  Create Stack - Polling timeout exceeded. cloud={0}, tenant={1}, stack={2}, status={3}|\
+                  Please check other logs for more detailed info|\
+                  Create Stack timeout
+RA_DELETE_STACK_TIMEOUT=\
+                  MSO-RA-2201E|\
+                  Delete Stack - Polling timeout exceeded. cloud={0}, tenant={1}, stack={2}, status={3}|\
+                  Please check other logs for more detailed info|\
+                  Delete Stack timeout  
+RA_UPDATE_STACK_TIMEOUT=\
+                  MSO-RA-2202E|\
+                  Update Stack - Polling timeout exceeded. cloud={0}, tenant={1}, stack={2}, status={3}|\
+                  Please check other logs for more detailed info|\
+                  Delete Stack timeout   
+RA_MISSING_PARAM=\
+                  MSO-RA-4200I|\
+                  Missing Required parameter: {0}|\
+                  No resolution needed|\
+                  Mandatory Parameter Missing  
+RA_PARSING_ERROR=\
+                  MSO-RA-4201E|\
+                  Error parsing file {0}|\
+                  No resolution needed|\
+                  Error parsing file                     
+RA_MARSHING_ERROR=\
+                  MSO-RA-4202E|\
+                  Error marshalling callback request with JaxB|\
+                  Please check other logs for more detailed info|\
+                  Error marshalling callback request 
+RA_PARSING_REQUEST_ERROR=\
+                  MSO-RA-4203E|\
+                  Error parsing request:{0}|\
+                  Please check other logs for more detailed info|\
+                  Error parsing request                                                        
+RA_VLAN_PARSE=\
+                  MSO-RA-4204E|\
+                  Error parsing VLAN parameter in network stack {0}:{1}|\
+                  Please check other logs for more detailed info|\
+                  Error parsing VLAN parameter in network stack 
+RA_GENERAL_WARNING=\
+                  MSO-RA-5201W|\
+                  WARNING: {0}|\
+                  Please check other logs for more detailed info|\
+                  General warning 
+RA_AUDIT_EXEC=\
+                  MSO-RA-5202I|\
+                  Executing method: {0}. {1}|\
+                  No resolution needed|\
+                  Executing method
+RA_GENERAL_METRICS=\
+                  MSO-RA-5205I|\
+                  Executed method: {0}. {1}|\
+                  No resolution needed|\
+                  Generate information for Metric events  
+RA_PROPERTIES_NOT_FOUND=\
+                  MSO-RA-5206E|\
+                  Properties file: {0} not found|\
+                  Please verify whether properties file exist or readable|\
+                  Properties file not found 
+RA_LOAD_PROPERTIES_SUC=\
+                  MSO-RA-5207I|\
+                  Properties file loaded successfully from file {0}|\
+                  No resolution needed|\
+                  Properties file loaded successfully     
+RA_PARAM_NOT_FOUND=\
+                  MSO-RA-5208E|\
+                  Attribute {0} not found in DB. For {1}={2}|\
+                  No resolution needed|\
+                  Attribute not found in DB    
+RA_UNKOWN_PARAM=\
+                  MSO-RA-5209E|\
+                  Unknown {0}:{1}|\
+                  Please check other logs for more detailed info|\
+                  Unknown attribute  
+RA_CONFIG_EXC=\
+                  MSO-RA-5210E|\
+                  Configuration error:{0}|\
+                  Please check other logs for more detailed info|\
+                  Configuration Error  
+RA_CONFIG_NOT_FOUND=\
+                  MSO-RA-5211E|\
+                  Could not found configuration file:{0}|\
+                  Please verify whether configuration file exist or readable|\
+                  Configuration file not found                    
+RA_SEND_REQUEST_SDNC=\
+                  MSO-RA-5212I|\
+                  Sending request to SDNC:{0}|\
+                  No resolution needed|\
+                  Sending request to SDNC      
+RA_RESPONSE_FROM_SDNC=\
+                  MSO-RA-5213I|\
+                  Response received from SDNC:{0}|\
+                  No resolution needed|\
+                  Response received from SDNC     
+RA_CALLBACK_BPEL=\
+                  MSO-RA-5218E|\
+                  Callback to BPEL:{0} |\
+                  Please check other logs for more detailed info|\
+                  Callback to BPEL       
+RA_NETWORK_ALREADY_EXIST=\
+                  MSO-RA-5240W|\
+                  Network already exists: {0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  Network already exists
+RA_NETWORK_NOT_FOUND=\
+                  MSO-RA-5241E|\
+                  Network doesn't exist: {0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  Network doesn't exist  
+RA_NETWORK_ORCHE_MODE_NOT_SUPPORT=\
+                  MSO-RA-5243E|\
+                  Network Type Orchestrated mode:{0} is not supported|\
+                  Please check other logs for more detailed info|\
+                  Network Type Orchestrated mode                                                                                                                          
+RA_ROLLBACK_NULL=\
+                  MSO-RA-5249W|\
+                  Rollback: No action to perform|\
+                  No resolution needed|\
+                  Rollback: No action to perform                                                                 
+RA_ASYNC_ROLLBACK=\
+                  MSO-RA-5251I|\
+                  Async Rollback Network {0}|\
+                  No resolution needed|\
+                  Async Rollback Network  
+RA_WSDL_NOT_FOUND=\
+                  MSO-RA-5252E|\
+                  Unable to find wsdl file {0} in classpath|\
+                  No resolution needed|\
+                  Unable to find wsdl file in classpath                                                                                       
+RA_CALLBACK_BPEL_COMPLETE=\
+                  MSO-RA-5258I|\
+                  Completed processing BPEL request|\
+                  No resolution needed|\
+                  Completed processing BPEL request  
+RA_SDNC_MISS_CONFIG_PARAM=\
+                  MSO-RA-5259E|\
+                  Missing configuration for:{0}|\
+                  Please check other logs for more detailed info|\
+                  Missing configuration for  
+RA_SDNC_INVALID_CONFIG=\
+                  MSO-RA-5260W|\
+                  Invalid configuration(most requests require atleast 3 params:method,timeout,action) for Key:{0} Value:{1}|\
+                  Please check other logs for more detailed info|\
+                  Invalid configuration                    
+RA_TENANT_NOT_FOUND=\
+                  MSO-RA-5263E|\
+                  Tenant not found: tenant={0}, cloudSiteId={1}|\
+                  Please check other logs for more detailed info|\
+                  Tenant not found     
+RA_PRINT_URL=\
+                  MSO-RA-5264I|\
+                  {0} URL:{1}|\
+                  No resolution needed|\
+                  Log the URL    
+RA_RECEIVE_SDNC_NOTIF=\
+                  MSO-RA-5268I|\
+                  Received SDNC Notification. XML:{0}|\
+                  No resolution needed|\
+                  Received SDNC Notification   
+RA_INIT_SDNC_ADAPTER=\
+                  MSO-RA-5269I|\
+                  Initializing mso-sdnc-adapter|\
+                  No resolution needed|\
+                  Initializing mso-sdnc-adapter     
+RA_RECEIVE_BPEL_REQUEST=\
+                  MSO-RA-5270I|\
+                  BPEL request received [{0}] with callback URL [{1}]|\
+                  No resolution needed|\
+                  BPEL request received  
+RA_SEND_REQUEST_SDNC_ERR=\
+                  MSO-RA-5271E|\
+                  Error sending request to SDNC. Failed to start SDNC Client thread|\
+                  Please check other logs for more detailed info|\
+                  Error sending request to SDNC         
+RA_TENANT_ALREADY_EXIST=\
+                  MSO-RA-5272E|\
+                  Tenant {0} already exists in {1}|\
+                  No resolution needed|\
+                  Tenant alaredy exists                    
+RA_SEND_REQUEST_APPC_ERR=\
+                  MSO-RA-5273E|\
+                  Error sending request to APPC|\
+                  Please check other logs for more detailed info|\
+                  Error sending request to APPC     
+RA_VNF_ALREADY_EXIST=\
+                  MSO-RA-5275E|\
+                  Stack {0} already exists in {1}/{2}|\
+                  No resolution needed|\
+                  VNF already exists   
+RA_VNF_UNKNOWN_PARAM=\
+                  MSO-RA-5276E|\
+                  Unknown  {0}:{1}|\
+                  No resolution needed|\
+                  Uknown parameter  
+RA_VNF_EXTRA_PARAM=\
+                  MSO-RA-5277E|\
+                  Create Stack ({0}) extra input params received:{1}|\
+                  Please check other logs for more detailed info|\
+                  Extra input params received   
+RA_VNF_NOT_EXIST=\
+                  MSO-RA-5278E|\
+                  Stack {0} does not exist in {1}/{2}|\
+                  No resolution needed|\
+                  Stack does not exist                                                                                                                                                                                                                                            
+RA_ASYNC_CREATE_VNF=\
+                  MSO-RA-5282I|\
+                  Async Create VNF :{0} of type {1} in {2}/{3}|\
+                  No resolution needed|\
+                  Async Create VNF 
+RA_SEND_VNF_NOTIF_ERR=\
+                  MSO-RA-5283E|\
+                  Error sending createVnf notification|\
+                  Please check other logs for more detailed info|\
+                  Error sending createVnf notification                                                                                                                                                                                                                                                                                         
+RA_ASYNC_CREATE_VNF_COMPLETE=\
+                  MSO-RA-5284I|\
+                  Completed createVnfA|\
+                  No resolution needed|\
+                  Completed createVnfA 
+RA_ASYNC_UPDATE_VNF=\
+                  MSO-RA-5285I|\
+                  Async Update VNF :{0} of type {1} in {2}/{3}|\
+                  No resolution needed|\
+                  Async Update VNF
+RA_ASYNC_UPDATE_VNF_COMPLETE=\
+                  MSO-RA-5286I|\
+                  Completed updateVnfA|\
+                  No resolution needed|\
+                  Completed updateVnfA                    
+RA_ASYNC_QUERY_VNF=\
+                  MSO-RA-5287I|\
+                  Async Query VNF :{0} of type {1} in {2}/{3}|\
+                  No resolution needed|\
+                  Async Query VNF
+RA_ASYNC_QUERY_VNF_COMPLETE=\
+                  MSO-RA-5288I|\
+                  Completed queryVnfA|\
+                  No resolution needed|\
+                  Completed queryVnfA    
+RA_ASYNC_DELETE_VNF=\
+                  MSO-RA-5289I|\
+                  Async Delete VNF :{0} of type {1} in {2}/{3}|\
+                  No resolution needed|\
+                  Async Delete VNF
+RA_ASYNC_DELETE_VNF_COMPLETE=\
+                  MSO-RA-5290I|\
+                  Completed deleteVnfA|\
+                  No resolution needed|\
+                  Completed deleteVnfA    
+RA_ASYNC_ROLLBACK_VNF=\
+                  MSO-RA-5291I|\
+                  Async Rollback VNF|\
+                  No resolution needed|\
+                  Async Rollback VNF
+RA_ASYNC_ROLLBACK_VNF_COMPLETE=\
+                  MSO-RA-5292I|\
+                  Completed rollbackVnfA|\
+                  No resolution needed|\
+                  Completed rollbackVnfA     
+RA_DB_INVALID_STATUS=\
+                  MSO-RA-5293E|\
+                  Invalid status value|\
+                  Please check other logs for more detailed info|\
+                  Invalid status value
+RA_DB_REQUEST_NOT_EXIST=\
+                  MSO-RA-5294E|\
+                  Request ID={0} does not exist in DB|\
+                  Please check other logs for more detailed info|\
+                  Record does not exist in DB                  
+RA_CANT_UPDATE_REQUEST=\
+                  MSO-RA-5295E|\
+                  Enable to update {0} in DB for Request ID={1}|\
+                  Please check other logs for more detailed info|\
+                  Enable to update DB    
+RA_CONFIG_LOAD=\
+                  MSO-RA-5296I|\
+                  Configuration loaded from {0}|\
+                  Please check other logs for more detailed info|\
+                  Configuration loaded                                                                     
+RA_GENERAL_EXCEPTION_ARG=\
+                  MSO-RA-9200E|\
+                  Exception: {0}|\
+                  Please check other logs for more detailed info|\
+                  General exception with reason 
+RA_GENERAL_EXCEPTION=\
+                  MSO-RA-9201E|\
+                  Exception encountered|\
+                  Please check other logs for more detailed info|\
+                  Exception encountered     
+RA_CONNECTION_EXCEPTION=\
+                  MSO-RA-9202E|\
+                  Exception communicating with {0}: {1}|\
+                  Please check other logs for more detailed info|\
+                  Communication Exception 
+RA_EXCEPTION_COMMUNICATE_SDNC=\
+                  MSO-RA-9203E|\
+                  Exception while processing request to SDNC|\
+                  Please check other logs for more detailed info|\
+                  Exception while processing request to SDNC   
+RA_EVALUATE_XPATH_ERROR=\
+                  MSO-RA-9204E|\
+                  Error while evaluating xpath {0} - {1}|\
+                  Please check other logs for more detailed info|\
+                  Error while evaluating xpath   
+RA_ANALYZE_ERROR_EXC=\
+                  MSO-RA-9205E|\
+                  Problem analyzing error returned by SDN-C|\
+                  Please check other logs for more detailed info|\
+                  Problem analyzing error returned by SDN-C  
+RA_ERROR_GET_RESPONSE_SDNC=\
+                  MSO-RA-9206E|\
+                  Error getting response code from errored SDNC request|\
+                  Please check other logs for more detailed info|\
+                  Error getting response code from errored SDNC request
+RA_INIT_CALLBACK_WSDL_ERR=\
+                  MSO-RA-9207E|\
+                  Caught exception initializing Callback wsdl:{0} |\
+                  Please check other logs for more detailed info|\
+                  Caught exception initializing Callback wsdl
+RA_CREATE_STACK_ERR=\
+                  MSO-RA-9208E|\
+                  Create Stack Error: {0}|\
+                  Please check other logs for more detailed info|\
+                  Create Stack Error  
+RA_UPDATE_STACK_ERR=\
+                  MSO-RA-9209E|\
+                  Update Stack Error - Polling complete with non-success status: {0}, {1}|\
+                  Please check other logs for more detailed info|\
+                  Update Stack Error
+RA_UPDATE_NETWORK_ERR=\
+                  MSO-RA-9210E|\
+                  Exception while update network, {0} in {1}/{2}|\
+                  Please check other logs for more detailed info |\
+                  Update Network Error  
+RA_QUERY_NETWORK_EXC=\
+                  MSO-RA-9211E|\
+                  Exception while query network: {0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  Exception while query network:    
+RA_CREATE_NETWORK_EXC=\
+                  MSO-RA-9212E|\
+                  Exception while create network: {0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  Create Network Error  
+RA_DELETE_NETWORK_EXC=\
+                  MSO-RA-9213E|\
+                  Exception while delete network: {0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  delete Network Error
+RA_CREATE_NETWORK_NOTIF_EXC=\
+                  MSO-RA-9214E|\
+                  Error sending createNetwork notification|\
+                  Please check other logs for more detailed info|\
+                  Error sending createNetwork notification
+RA_WSDL_URL_CONVENTION_EXC=\
+                  MSO-RA-9215E|\
+                  {0} URL converion failed|\
+                  Please check other logs for more detailed info|\
+                  WSDL URL converion failed 
+RA_INIT_NOTIF_EXC=\
+                  MSO-RA-9216E|\
+                  Caught exception initializing Notification Url|\
+                  Please check other logs for more detailed info|\
+                  Caught exception initializing Notification Url  
+RA_SET_CALLBACK_AUTH_EXC=\
+                  MSO-RA-9217E|\
+                  Unable to set authorization in callback request|\
+                  Please check other logs for more detailed info|\
+                  Unable to set authorization in callback request
+RA_FAULT_INFO_EXC=\
+                  MSO-RA-9218E|\
+                  Exception caught while getting fault info|\
+                  Please check other logs for more detailed info|\
+                  Exception caught while getting fault info 
+RA_CALLBACK_BPEL_EXC=\
+                  MSO-RA-9219E|\
+                  Error sending BPEL Callback request|\
+                  Please check other logs for more detailed info|\
+                  Error sending BPEL Callback request
+RA_CREATE_TENANT_ERR=\
+                  MSO-RA-9220E|\
+                  Create Tenant Error: {0}|\
+                  Please check other logs for more detailed info|\
+                  Create Tenant Error  
+RA_DELETE_TEMAMT_ERR=\
+                  MSO-RA-9221E|\
+                  Delete Tenant Error: {0}|\
+                  Please check other logs for more detailed info|\
+                  Delete Tenant Error
+RA_ERROR_CREATE_SDNC_REQUEST=\
+                  MSO-RA-9222E|\
+                  Error creating SDNC request|\
+                  Please check other logs for more detailed info|\
+                  Error creating SDNC request  
+RA_ERROR_CREATE_SDNC_RESPONSE=\
+                  MSO-RA-9223E|\
+                  Error creating SDNC response|\
+                  Please check other logs for more detailed info|\
+                  Error creating SDNC response   
+RA_ERROR_CONVERT_XML2STR=\
+                  MSO-RA-9224E|\
+                  Error converting xml Document to String|\
+                  Please check other logs for more detailed info |\
+                  Error converting xml Document to String
+RA_UPDATE_TENANT_ERR=\
+                  MSO-RA-9225E|\
+                  Update Tenant Error: {0}|\
+                  Please check other logs for more detailed info|\
+                  Update Tenant Error  
+RA_ROLLBACK_TENANT_ERR=\
+                  MSO-RA-9226E|\
+                  Rollback Tenant Error: {0}|\
+                  Please check other logs for more detailed info|\
+                  Rollback Tenant Error  
+RA_QUERY_VNF_ERR=\
+                  MSO-RA-9227E|\
+                  Exception while query VNF:{0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  Exception while query VNF
+RA_UPDATE_VNF_ERR=\
+                  MSO-RA-9228E|\
+                  Exception while update VNF:{0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  Exception while update VNF 
+RA_DELETE_VNF_ERR=\
+                  MSO-RA-9229E|\
+                  Exception while delete VNF:{0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  Exception while delete VNF     
+RA_CREATE_VNF_ERR=\
+                  MSO-RA-9230E|\
+                  Exception while create VNF:{0} in {1}/{2}|\
+                  Please check other logs for more detailed info|\
+                  Exception while create VNF
+RA_ROLLBACK_VNF_ERR=\
+                  MSO-RA-9231E|\
+                  Exception while rollback VNF|\
+                  Please check other logs for more detailed info|\
+                  Exception while rollback VNF                                                                                                                                                                                                                                                                                                                                                                   
diff --git a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java
new file mode 100644 (file)
index 0000000..302102b
--- /dev/null
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.security.GeneralSecurityException;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.openecomp.mso.utils.CryptoUtils;
+
+/**
+ * This class implements all test methods of the CryptoUtils features.
+ *
+ *
+ */
+public class CryptoTest {
+
+       private static String testKey = "546573746F736973546573746F736973";
+
+     /**
+     * This method is called before any test occurs.
+     * It creates a fake tree from scratch
+     */
+    @BeforeClass
+    public static final void prepare () {
+    
+    }
+
+    /**
+     * This method implements a test of tree structure, mainly the storage of the leaves structure.
+     * @throws GeneralSecurityException 
+     */
+    @Test
+    public final void testEncryption () throws GeneralSecurityException {
+       String hexString = CryptoUtils.byteArrayToHexString("testosistestosi".getBytes());
+       
+       final String testData = "This is a test string";
+        final String nonTestData = "This is not the right String";
+        
+        String encodeString = CryptoUtils.encrypt(testData, testKey);
+       
+        assertNotNull(encodeString);
+        
+        assertTrue(testData.equals(CryptoUtils.decrypt(encodeString, testKey)));
+        assertFalse(nonTestData.equals(CryptoUtils.decrypt(encodeString, testKey)));
+        
+        String encode2String = CryptoUtils.encrypt(testData, testKey);
+        assertNotNull(encode2String);
+        
+        assertEquals(encodeString,encode2String);
+        
+        assertEquals(CryptoUtils.decrypt(encodeString, testKey),CryptoUtils.decrypt(encode2String, testKey));
+    }
+
+}
diff --git a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoAlarmLoggerTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoAlarmLoggerTest.java
new file mode 100644 (file)
index 0000000..52246b0
--- /dev/null
@@ -0,0 +1,131 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+/**
+ * This junit test very roughly the alarm logger
+ *
+ */
+public class MsoAlarmLoggerTest {
+
+       public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+       public static MsoAlarmLogger msoAlarmLogger;
+
+       @BeforeClass
+       public static final void createObjects() throws MsoPropertiesException
+       {
+       
+               File outputFile = new File ("target/alarm-test.log");
+               if (outputFile.exists()) {
+                       outputFile.delete();
+               }
+               msoAlarmLogger = new MsoAlarmLogger("target/alarm-test.log");
+       }
+
+       @Test
+       public void testAlarmConfig() throws MsoPropertiesException, IOException {
+
+               msoAlarmLogger.sendAlarm("test", 0, "detail message");
+
+               FileInputStream inputStream = new FileInputStream("target/alarm-test.log");
+               BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+
+               String line = reader.readLine();
+               String[] splitLine = line.split("\\|");
+               assertTrue(splitLine.length==4);
+               assertTrue("test".equals(splitLine[1]));
+               assertTrue("0".equals(splitLine[2]));
+               assertTrue("detail message".equals(splitLine[3]));
+
+               line = reader.readLine();
+               assertNull(line);
+               reader.close();
+               inputStream.close();
+
+               // Reset the file for others tests
+               PrintWriter writer = new PrintWriter(new File("target/alarm-test.log"));
+               writer.print("");
+               writer.close();
+
+       }
+
+       @Test
+       public void testAlarm() throws IOException {
+
+               msoAlarmLogger.sendAlarm("test", 0, "detail message");
+               msoAlarmLogger.sendAlarm("test2", 1, "detail message2");
+               msoAlarmLogger.sendAlarm("test3", 2, "detail message3");
+
+               FileInputStream inputStream = new FileInputStream("target/alarm-test.log");
+               BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+
+               String line = reader.readLine();
+               String[] splitLine = line.split("\\|");
+               assertTrue(splitLine.length==4);
+               assertTrue("test".equals(splitLine[1]));
+               assertTrue("0".equals(splitLine[2]));
+               assertTrue("detail message".equals(splitLine[3]));
+
+               line = reader.readLine();
+               splitLine = line.split("\\|");
+               assertTrue(splitLine.length==4);
+               assertTrue("test2".equals(splitLine[1]));
+               assertTrue("1".equals(splitLine[2]));
+               assertTrue("detail message2".equals(splitLine[3]));
+
+               line = reader.readLine();
+               splitLine = line.split("\\|");
+               assertTrue(splitLine.length==4);
+               assertTrue("test3".equals(splitLine[1]));
+               assertTrue("2".equals(splitLine[2]));
+               assertTrue("detail message3".equals(splitLine[3]));
+
+               line = reader.readLine();
+               assertNull(line);
+               reader.close();
+               inputStream.close();
+
+               // Reset the file for others tests
+               PrintWriter writer = new PrintWriter(new File("target/alarm-test.log"));
+               writer.print("");
+               writer.close();
+
+       }
+}
diff --git a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoLoggerTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoLoggerTest.java
new file mode 100644 (file)
index 0000000..3da16be
--- /dev/null
@@ -0,0 +1,339 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+import org.openecomp.mso.entity.MsoRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MsoLogger.ErrorCode;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.MDC;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+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);
+
+     /**
+     * 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                                                                                                                           ss.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
+    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.
+     */
+       @Test
+    public final void testRecordMetricEvent () {
+               try {
+                       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|Test UUID as JBoss not found|INFO|0|"));
+                       // 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|Test UUID as JBoss not found|INFO|0|") && stringArray[1].contains("|127.0.0.1||||testVNF|||||"));
+                       Assert.assertTrue ((stringArray[1].length() - stringArray[1].replace("|", "").length()) == 28);
+
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               }
+    }
+
+    /**
+     * This method implements a test of testRecordAuditEvent method.
+     */
+       @Test
+    public final void testRecordAuditEvent () {
+
+               try {
+
+                       MDC.clear();
+                       MsoLogger.setLogContext("reqId", "servId");
+                       msoLogger.recordAuditEvent(123456789L, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+                       MDC.put (MsoLogger.REMOTE_HOST, "127.0.0.1");
+                       MDC.put (MsoLogger.PARTNERNAME, "testUser");
+                       msoLogger.recordAuditEvent(123456789L, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Exception");
+
+                       //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/auditjboss.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, "", "", ErrorCode.UnknownError, "log error");
+
+                       Assert.assertTrue (stringArray[0].contains("|reqId|servId|main||testRecordAuditEvent||COMPLETE|0|Successful|Test UUID as JBoss not found|INFO|0|"));
+                       // count the occurance of symbol "|"
+                       Assert.assertTrue ((stringArray[0].length() - stringArray[0].replace("|", "").length()) == 25);
+                       Assert.assertTrue (stringArray[1].contains("|reqId|servId|main||testRecordAuditEvent|testUser|ERROR|501|Exception|Test UUID as JBoss not found|INFO|0|") && stringArray[1].contains("|127.0.0.1||||||||"));
+                       Assert.assertTrue ((stringArray[1].length() - stringArray[1].replace("|", "").length()) == 25);
+
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               }
+    }
+
+
+
+
+    // 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/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryConcurrencyTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryConcurrencyTest.java
new file mode 100644 (file)
index 0000000..ac27b20
--- /dev/null
@@ -0,0 +1,174 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.openecomp.mso.properties.AbstractMsoProperties;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+/**
+ * This class implements test methods of the MsoPropertiesFactory features.
+ *
+ *
+ */
+public class MsoPropertiesFactoryConcurrencyTest {
+
+       public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+       public static final String MSO_PROP_ID = "TEST_PROP";
+       public static final String PATH_MSO_PROP1 = MsoJavaProperties.class.getClassLoader().getResource("mso.properties")
+                       .toString().substring(5);
+       public static final String PATH_MSO_PROP2 = MsoJavaProperties.class.getClassLoader().getResource("mso2.properties")
+                       .toString().substring(5);
+
+       /**
+        * This method is called before any test occurs. It creates a fake tree from
+        * scratch
+        *
+        * @throws MsoPropertiesException
+        */
+       @BeforeClass
+       public static final void prepare() throws MsoPropertiesException {
+               // it's possible to have it already initialized, as tests are executed in the same JVM
+           msoPropertiesFactory.removeAllMsoProperties ();
+               msoPropertiesFactory.initializeMsoProperties(MSO_PROP_ID, PATH_MSO_PROP1);
+       }
+
+       private Callable<Integer> taskReload = new Callable<Integer>() {
+               @Override
+               public Integer call() {
+                       try {
+                               if (!msoPropertiesFactory.reloadMsoProperties()) {
+                                       return 1;
+                               }
+                       } catch (Exception e) {
+                           e.printStackTrace ();
+                               return 1;
+                       }
+                       return 0;
+               }
+       };
+
+       private Callable<Integer> taskRead = new Callable<Integer>() {
+               @Override
+               public Integer call() {
+                       try {
+                               MsoJavaProperties msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_ID);
+                               String property1 = msoProperties.getProperty("ecomp.mso.cloud.1.cloudId", "defaultValue");
+                               String property2 = msoProperties.getProperty("ecomp.mso.cloud.1.keystoneUrl", "defaultValue");
+                               String property3 = msoProperties.getProperty("ecomp.mso.cloud.1.msoId", "defaultValue");
+                               String property4 = msoProperties.getProperty("ecomp.mso.cloud.1.publicNetId", "defaultValue");
+                               String property5 = msoProperties.getProperty("does.not.exist", "defaultValue");
+                               String property6 = msoProperties.getProperty("ecomp.mso.cloud.1.test", "defaultValue");
+                               String property7 = msoProperties.getProperty("ecomp.mso.cloud.1.boolean", "defaultValue");
+
+                               assertEquals(property1, "MT");
+                               assertEquals(property2, "http://localhost:5000/v2.0");
+                               assertEquals(property3, "John");
+                               assertEquals(property4, "FD205490A48D48475607C36B9AD902BF");
+                               assertEquals(property5, "defaultValue");
+                               assertEquals(property6, "1234");
+                               assertEquals(property7, "true");
+
+                       } catch (MsoPropertiesException e) {
+                e.printStackTrace ();
+                               return 1;
+                       }
+                       return 0;
+               }
+       };
+
+       private Callable<Integer> taskReadAll = new Callable<Integer>() {
+               @Override
+               public Integer call() {
+                       try {
+                               List<AbstractMsoProperties> msoPropertiesList =  msoPropertiesFactory.getAllMsoProperties();
+                               String property1 = ((MsoJavaProperties)msoPropertiesList.get(0)).getProperty("ecomp.mso.cloud.1.cloudId", "defaultValue");
+                               String property2 = ((MsoJavaProperties)msoPropertiesList.get(0)).getProperty("ecomp.mso.cloud.1.keystoneUrl", "defaultValue");
+                               String property3 = ((MsoJavaProperties)msoPropertiesList.get(0)).getProperty("ecomp.mso.cloud.1.msoId", "defaultValue");
+                               String property4 = ((MsoJavaProperties)msoPropertiesList.get(0)).getProperty("ecomp.mso.cloud.1.publicNetId", "defaultValue");
+                               String property5 = ((MsoJavaProperties)msoPropertiesList.get(0)).getProperty("does.not.exist", "defaultValue");
+                               String property6 = ((MsoJavaProperties)msoPropertiesList.get(0)).getProperty("ecomp.mso.cloud.1.test", "defaultValue");
+                               String property7 = ((MsoJavaProperties)msoPropertiesList.get(0)).getProperty("ecomp.mso.cloud.1.boolean", "defaultValue");
+
+                               assertEquals(property1, "MT");
+                               assertEquals(property2, "http://localhost:5000/v2.0");
+                               assertEquals(property3, "John");
+                               assertEquals(property4, "FD205490A48D48475607C36B9AD902BF");
+                               assertEquals(property5, "defaultValue");
+                               assertEquals(property6, "1234");
+                               assertEquals(property7, "true");
+                       } catch (Exception e) {
+                e.printStackTrace ();
+                               return 1;
+                       }
+                       return 0;
+               }
+       };
+
+       @Test
+       public final void testGetMsoProperties()
+                       throws MsoPropertiesException, InterruptedException, ExecutionException, FileNotFoundException {
+
+               List<Future<Integer>> list = new ArrayList<Future<Integer>>();
+               ExecutorService executor = Executors.newFixedThreadPool(20);
+
+               for (int i = 0; i <= 100000; i++) {
+
+                       Future<Integer> futureResult = executor.submit(taskRead);
+                       list.add(futureResult);
+
+                       futureResult = executor.submit(taskReload);
+                       list.add(futureResult);
+
+                       futureResult = executor.submit(taskReadAll);
+                       list.add(futureResult);
+               }
+               executor.shutdown();
+               while (!executor.awaitTermination(5, TimeUnit.SECONDS)) {
+            ;
+        }
+
+               for (Future<Integer> result : list) {
+                       assertTrue(result.get().equals(0));
+               }
+
+       }
+
+}
diff --git a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryTest.java
new file mode 100644 (file)
index 0000000..b0290b0
--- /dev/null
@@ -0,0 +1,611 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.codehaus.jackson.JsonNode;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoJsonProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+/**
+ * This class implements test methods of the MsoPropertiesFactory features.
+ *
+ *
+ */
+public class MsoPropertiesFactoryTest {
+
+       public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+       public static final String MSO_JAVA_PROP_ID = "TEST_JAVA_PROP";
+       public static final String MSO_JSON_PROP_ID = "TEST_JSON_PROP";
+       public static final String PATH_MSO_JAVA_PROP1 = MsoJavaProperties.class.getClassLoader().getResource("mso.properties")
+                       .toString().substring(5);
+       public static final String PATH_MSO_JAVA_PROP2 = MsoJavaProperties.class.getClassLoader().getResource("mso2.properties")
+                       .toString().substring(5);
+       public static final String PATH_MSO_JSON_PROP = MsoJavaProperties.class.getClassLoader().getResource("mso.json")
+                       .toString().substring(5);
+       public static final String PATH_MSO_JSON_PROP2 = MsoJavaProperties.class.getClassLoader().getResource("mso2.json")
+                       .toString().substring(5);
+       public static final String PATH_MSO_JSON_PROP_BAD = MsoJavaProperties.class.getClassLoader().getResource("mso-bad.json")
+                       .toString().substring(5);
+
+       @BeforeClass
+       public static final void prepareBeforeAllTests() {
+               msoPropertiesFactory.removeAllMsoProperties();
+       }
+       /**
+        * This method is called before any test occurs. It creates a fake tree from
+        * scratch
+        *
+        * @throws MsoPropertiesException
+        */
+       @Before
+       public final void prepareBeforeEachTest() throws MsoPropertiesException {
+           
+               msoPropertiesFactory.initializeMsoProperties(MSO_JAVA_PROP_ID, PATH_MSO_JAVA_PROP1);
+               msoPropertiesFactory.initializeMsoProperties(MSO_JSON_PROP_ID, PATH_MSO_JSON_PROP);
+       }
+       
+       @After
+       public final void cleanAfterEachTest() throws MsoPropertiesException {
+               msoPropertiesFactory.removeAllMsoProperties ();
+       }
+
+       @Test 
+       public final void testNotRecognizedFile() {
+               try {
+                       msoPropertiesFactory.initializeMsoProperties("BAD_FILE", "new_file.toto");
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Unable to load the MSO properties file because format is not recognized (only .json or .properties): new_file.toto").equals(ep.getMessage()));
+               }
+       }
+       
+       @Test
+       public final void testDoubleInit() {
+
+               try {
+                       msoPropertiesFactory.initializeMsoProperties(MSO_JAVA_PROP_ID, PATH_MSO_JAVA_PROP1);
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("The factory contains already an instance of this mso properties: "+PATH_MSO_JAVA_PROP1).equals(ep.getMessage()));
+               }
+
+
+       }
+
+       /**
+        * This method implements a test for the getMsoJavaProperties method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testGetMsoJavaProperties() throws MsoPropertiesException {
+               assertNotNull(msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID));
+               assertTrue(msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID).size()==8);
+               
+               try {
+                       msoPropertiesFactory.getMsoJavaProperties(MSO_JSON_PROP_ID);
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties is not JAVA_PROP properties type:" + MSO_JSON_PROP_ID).equals(ep.getMessage()));
+               }
+               
+               try {
+                       msoPropertiesFactory.getMsoJavaProperties("DUMB_PROP");
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties not found in cache:"+"DUMB_PROP").equals(ep.getMessage()));
+               }
+
+       }
+
+       /**
+        * This method test the MsoJavaProperties Set, equals and hascode
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testSetMsoJavaProperties() throws MsoPropertiesException  {
+               MsoJavaProperties msoPropChanged = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+               msoPropChanged.setProperty("testos", "testos");
+               assertNotNull(msoPropChanged.getProperty("testos", null));
+                                               
+               // Check no modification occurred on cache one
+               MsoJavaProperties msoPropCache = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+               assertNull(msoPropCache.getProperty("testos", null));
+               assertFalse(msoPropChanged.hashCode() != msoPropCache.hashCode());
+               
+               assertFalse(msoPropChanged.equals(null));
+               assertFalse(msoPropChanged.equals(msoPropCache));
+               assertFalse(msoPropChanged.equals(new Boolean(true)));
+               
+               assertTrue(msoPropChanged.equals(msoPropChanged));
+       }
+       
+       
+       /**
+        * This method implements a test for the testGetMsoJsonProperties method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testGetMsoJsonProperties() throws MsoPropertiesException {
+               assertNotNull(msoPropertiesFactory.getMsoJsonProperties(MSO_JSON_PROP_ID));
+
+               try {
+                       msoPropertiesFactory.getMsoJsonProperties(MSO_JAVA_PROP_ID);
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties is not JSON_PROP properties type:" + MSO_JAVA_PROP_ID).equals(ep.getMessage()));
+               }
+               
+               try {
+                       msoPropertiesFactory.getMsoJsonProperties("DUMB_PROP");
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties not found in cache:"+"DUMB_PROP").equals(ep.getMessage()));
+               }
+
+       }
+       
+       /**
+        * This method implements a test for the testGetAllMsoProperties method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testGetAllMsoProperties() throws MsoPropertiesException {
+               assertNotNull(msoPropertiesFactory.getAllMsoProperties().size()==2);
+
+       }
+
+       /**
+        * This method implements a test for the testGetAllMsoProperties method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testToString() throws MsoPropertiesException {
+               String dump = msoPropertiesFactory.getMsoJsonProperties(MSO_JSON_PROP_ID).toString();
+               assertTrue(dump != null && !dump.isEmpty());
+               
+               dump = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID).toString();
+               assertTrue(dump != null && !dump.isEmpty());
+
+       }
+       
+       /**
+        * This method implements a test for the getProperty of JAVA_PROP type method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testGetProperties() throws MsoPropertiesException {
+               MsoJavaProperties msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+
+               String property1 = msoProperties.getProperty("ecomp.mso.cloud.1.cloudId", "defaultValue");
+               String property2 = msoProperties.getProperty("ecomp.mso.cloud.1.keystoneUrl", "defaultValue");
+               String property3 = msoProperties.getProperty("ecomp.mso.cloud.1.msoId", "defaultValue");
+               String property4 = msoProperties.getProperty("ecomp.mso.cloud.1.publicNetId", "defaultValue");
+               String property5 = msoProperties.getProperty("does.not.exist", "defaultValue");
+               String property6 = msoProperties.getProperty("ecomp.mso.cloud.1.test", "defaultValue");
+               String property7 = msoProperties.getProperty("ecomp.mso.cloud.1.boolean", "defaultValue");
+
+               assertEquals(property1, "MT");
+               assertEquals(property2, "http://localhost:5000/v2.0");
+               assertEquals(property3, "John");
+               assertEquals(property4, "FD205490A48D48475607C36B9AD902BF");
+               assertEquals(property5, "defaultValue");
+               assertEquals(property6, "1234");
+               assertEquals(property7, "true");
+       }
+
+       /**
+        * This method implements a test for the getIntProperty JAVA_RPOP type method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testGetIntProperties() throws MsoPropertiesException {
+               MsoJavaProperties msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+               int property1 = msoProperties.getIntProperty("ecomp.mso.cloud.1.test", 345);
+               int property2 = msoProperties.getIntProperty("ecomp.mso.cloud.1.publicNetId", 345);
+               int property3 = msoProperties.getIntProperty("does.not.exist", 345);
+               assertEquals(property1, 1234);
+               assertEquals(property2, 345);
+               assertEquals(property3, 345);
+       }
+
+       /**
+        * This method implements a test for the getBooleanProperty JAVA_RPOP type method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testGetBooleanProperty() throws MsoPropertiesException {
+               MsoJavaProperties msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+               boolean property1 = msoProperties.getBooleanProperty("ecomp.mso.cloud.1.boolean", false);
+               boolean property2 = msoProperties.getBooleanProperty("ecomp.mso.cloud.1.publicNetId", false);
+               boolean property3NotThere = msoProperties.getBooleanProperty("ecomp.mso.cloud.1.publicNetIdBad", true);
+               
+               assertEquals(property1, true);
+               assertEquals(property2, false);
+               assertEquals(property3NotThere, true);
+       }
+
+       /**
+        * This method implements a test for the getEncryptedProperty JAVA_RPOP type method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testGetEncryptedProperty() throws MsoPropertiesException {
+               MsoJavaProperties msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+               String property1 = msoProperties.getEncryptedProperty("ecomp.mso.cloud.1.publicNetId", "defaultValue",
+                               "aa3871669d893c7fb8abbcda31b88b4f");
+               String property2 = msoProperties.getEncryptedProperty("test", "defaultValue",
+                               "aa3871669d893c7fb8abbcda31b88b4f");
+
+               
+               String property3Wrong = msoProperties.getEncryptedProperty("ecomp.mso.cloud.1.publicNetId", "defaultValue",
+                               "aa3871669d893c7fb8abbcda31b88b4");
+
+               
+               assertEquals(property1, "changeme");
+               assertEquals(property2, "defaultValue");
+               assertEquals(property3Wrong, "defaultValue");
+       }
+       
+       /**
+        * This method implements a test for the getEncryptedProperty JAVA_RPOP type method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testencryptProperty()  {
+
+               assertTrue("FD205490A48D48475607C36B9AD902BF"
+                               .contains(msoPropertiesFactory.encryptProperty("changeme", "aa3871669d893c7fb8abbcda31b88b4f").getEntity().toString()));
+
+       
+               assertTrue("Invalid AES key length: 15 bytes".contains(msoPropertiesFactory.encryptProperty("changeme", "aa3871669d893c7fb8abbcda31b88b4").getEntity().toString()));
+
+       }
+       
+       /**
+        * This method implements a test for the getJSON JSON_RPOP type method.
+        *
+        * @throws MsoPropertiesException
+        */
+       @Test
+       public final void testGetJsonNode() throws MsoPropertiesException {
+               MsoJsonProperties msoProperties = msoPropertiesFactory.getMsoJsonProperties(MSO_JSON_PROP_ID);
+               
+               JsonNode propNode = msoProperties.getJsonRootNode();
+               assertNotNull(propNode);
+               assertFalse(propNode.toString().isEmpty());
+               assertTrue(propNode.isContainerNode());
+               assertNotNull(propNode.path("asdc-connections").path("asdc-controller1"));
+               assertNotNull(propNode.path("asdc-connections").path("asdc-controller2"));
+               
+       }
+
+       /**
+        * This method implements a test for the reloadMsoProperties method.
+        *
+        * @throws MsoPropertiesException
+        *
+        */
+       @Test
+       public final void testReloadJavaMsoProperties() throws MsoPropertiesException {
+               MsoJavaProperties msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+
+               // Do some additional test on propertiesHaveChanged method
+               assertTrue(msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, null));
+               
+               // Change path with bad one
+               try {
+                       msoPropertiesFactory.changeMsoPropertiesFilePath("DO_NOT_EXIST", PATH_MSO_JAVA_PROP2);
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties not found in cache:DO_NOT_EXIST").equals(ep.getMessage()));
+               } 
+                               
+               
+               // Change path with right one
+               msoPropertiesFactory.changeMsoPropertiesFilePath(MSO_JAVA_PROP_ID, PATH_MSO_JAVA_PROP2);
+               assertTrue(PATH_MSO_JAVA_PROP2.equals(msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID).getPropertiesFileName()));
+               
+               assertTrue(msoPropertiesFactory.reloadMsoProperties());
+               assertFalse(msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, msoProperties));
+               // Do a second time as timer value is set to 2
+               assertTrue(msoPropertiesFactory.reloadMsoProperties());
+               assertTrue(msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, msoProperties));
+
+               // Get the new one
+               msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+               String property1 = msoProperties.getProperty("ecomp.mso.cloud.1.cloudId", "defaultValue");
+               String property2 = msoProperties.getProperty("ecomp.mso.cloud.1.keystoneUrl", "defaultValue");
+               String property3 = msoProperties.getProperty("ecomp.mso.cloud.1.msoId", "defaultValue");
+               String property4 = msoProperties.getProperty("ecomp.mso.cloud.1.publicNetId", "defaultValue");
+               String property5 = msoProperties.getProperty("does.not.exist", "defaultValue");
+               String property6 = msoProperties.getProperty("ecomp.mso.cloud.1.test", "defaultValue");
+               String property7 = msoProperties.getProperty("ecomp.mso.cloud.1.boolean", "defaultValue");
+
+               assertEquals(property1, "MT2");
+               assertEquals(property2, "defaultValue");
+               assertEquals(property3, "defaultValue");
+               assertEquals(property4, "defaultValue");
+               assertEquals(property5, "defaultValue");
+               assertEquals(property6, "defaultValue");
+               assertEquals(property7, "defaultValue");
+               
+               // Additional test on propertiesHaveChanged
+               msoPropertiesFactory.removeAllMsoProperties();
+
+               // Do some additional test on propertiesHaveChanged method
+               try {
+                       msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, null);
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties not found in cache:"+MSO_JAVA_PROP_ID).equals(ep.getMessage()));
+               } 
+               
+               try {
+                       msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, msoProperties);
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties not found in cache:"+MSO_JAVA_PROP_ID).equals(ep.getMessage()));
+               } 
+
+       }
+
+       /**
+        * This method implements a test for the reloadMsoProperties method.
+        *
+        * @throws MsoPropertiesException
+        *
+        */
+       @Test
+       public final void testReloadMoreThanAMinuteMsoProperties() throws MsoPropertiesException {
+               MsoJavaProperties msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(MSO_JAVA_PROP_ID, PATH_MSO_JAVA_PROP2);
+
+               // Simulate 2 minutes
+               msoPropertiesFactory.reloadMsoProperties();
+               assertFalse(msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, msoProperties));
+               msoPropertiesFactory.reloadMsoProperties();
+
+               assertTrue(msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, msoProperties));
+
+               // Get the new one
+               msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+               String property1 = msoProperties.getProperty("ecomp.mso.cloud.1.cloudId", "defaultValue");
+               String property2 = msoProperties.getProperty("ecomp.mso.cloud.1.keystoneUrl", "defaultValue");
+               String property3 = msoProperties.getProperty("ecomp.mso.cloud.1.msoId", "defaultValue");
+               String property4 = msoProperties.getProperty("ecomp.mso.cloud.1.publicNetId", "defaultValue");
+               String property5 = msoProperties.getProperty("does.not.exist", "defaultValue");
+               String property6 = msoProperties.getProperty("ecomp.mso.cloud.1.test", "defaultValue");
+               String property7 = msoProperties.getProperty("ecomp.mso.cloud.1.boolean", "defaultValue");
+
+               assertEquals(property1, "MT2");
+               assertEquals(property2, "defaultValue");
+               assertEquals(property3, "defaultValue");
+               assertEquals(property4, "defaultValue");
+               assertEquals(property5, "defaultValue");
+               assertEquals(property6, "defaultValue");
+               assertEquals(property7, "defaultValue");
+
+
+       }
+
+       /**
+        * This method implements a test for the reloadMsoProperties method.
+        *
+        * @throws MsoPropertiesException
+        *
+        */
+       @Test
+       public final void testReloadBadMsoProperties() throws MsoPropertiesException {
+               MsoJavaProperties msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(MSO_JAVA_PROP_ID, "file-does-not-exist.properties");
+               msoPropertiesFactory.reloadMsoProperties();
+               assertFalse(msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, msoProperties));
+               // Reload it a second time as initial timer parameter was set to 2 
+               msoPropertiesFactory.reloadMsoProperties();
+
+               assertTrue(msoPropertiesFactory.propertiesHaveChanged(MSO_JAVA_PROP_ID, msoProperties));
+
+               // Get the new one
+               msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+               String property1 = msoProperties.getProperty("ecomp.mso.cloud.1.cloudId", "defaultValue");
+               String property2 = msoProperties.getProperty("ecomp.mso.cloud.1.keystoneUrl", "defaultValue");
+               String property3 = msoProperties.getProperty("ecomp.mso.cloud.1.msoId", "defaultValue");
+               String property4 = msoProperties.getProperty("ecomp.mso.cloud.1.publicNetId", "defaultValue");
+               String property5 = msoProperties.getProperty("does.not.exist", "defaultValue");
+               String property6 = msoProperties.getProperty("ecomp.mso.cloud.1.test", "defaultValue");
+               String property7 = msoProperties.getProperty("ecomp.mso.cloud.1.boolean", "defaultValue");
+
+               assertEquals(property1, "defaultValue");
+               assertEquals(property2, "defaultValue");
+               assertEquals(property3, "defaultValue");
+               assertEquals(property4, "defaultValue");
+               assertEquals(property5, "defaultValue");
+               assertEquals(property6, "defaultValue");
+               assertEquals(property7, "defaultValue");
+
+       }
+
+       /**
+        * This method implements a test for the reloadMsoProperties method.
+        *
+        * @throws MsoPropertiesException
+        *
+        */
+       @Test
+       public final void testReloadBadMsoJsonProperties() throws MsoPropertiesException {
+               // Load a bad JSON file
+               MsoJsonProperties msoProperties = msoPropertiesFactory.getMsoJsonProperties(MSO_JSON_PROP_ID);
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(MSO_JSON_PROP_ID, PATH_MSO_JSON_PROP_BAD);
+
+               msoPropertiesFactory.reloadMsoProperties();
+               assertFalse(msoPropertiesFactory.propertiesHaveChanged(MSO_JSON_PROP_ID, msoProperties));
+               // Reload it a second time as initial timer parameter was set to 2 
+               msoPropertiesFactory.reloadMsoProperties();
+
+               assertTrue(msoPropertiesFactory.propertiesHaveChanged(MSO_JSON_PROP_ID, msoProperties));
+
+               // Get the new one
+               msoProperties = msoPropertiesFactory.getMsoJsonProperties(MSO_JSON_PROP_ID);
+               assertNotNull(msoProperties);
+               assertNotNull(msoProperties.getJsonRootNode());
+               assertTrue(msoProperties.getJsonRootNode().size() == 0);
+               
+       }
+       
+       @Test
+       public final void testRemoveMsoProperties() throws MsoPropertiesException {
+               try {
+                       msoPropertiesFactory.removeMsoProperties("DUMB_PROP");
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties not found in cache:"+"DUMB_PROP").equals(ep.getMessage()));
+               }
+
+               msoPropertiesFactory.removeMsoProperties(MSO_JAVA_PROP_ID);
+
+               try {
+                       msoPropertiesFactory.getMsoJavaProperties(MSO_JAVA_PROP_ID);
+
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Mso properties not found in cache:"+MSO_JAVA_PROP_ID).equals(ep.getMessage()));
+               }
+
+       }
+       
+       @Test
+       public final void testInitializeWithNonExistingPropertiesFile () throws MsoPropertiesException  {
+               try {
+                       msoPropertiesFactory.initializeMsoProperties("NEW_BAD_FILE", "no_file.properties");
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Unable to load the MSO properties file because it has not been found:no_file.properties").equals(ep.getMessage()));
+               }
+               
+               // empty object should be returned as no config has been loaded, anyway no exception should be raised because the config ID must be loaded in cache
+               // This is there for automatic reload attempt
+               assertTrue(msoPropertiesFactory.getMsoJavaProperties("NEW_BAD_FILE").size()==0);
+       }
+       
+       
+       @Test
+       public final void testInitializeWithNonExistingJsonFile () throws MsoPropertiesException  {
+               try {
+                       msoPropertiesFactory.initializeMsoProperties("NEW_BAD_FILE", "no_file.json");
+                       fail ("MsoPropertiesException should have been raised");
+               } catch (MsoPropertiesException ep) {
+                       assertTrue(("Unable to load the MSO properties file because it has not been found:no_file.json").equals(ep.getMessage()));
+               }
+               
+               // empty object should be returned as no config has been loaded, anyway no exception should be raised because the config ID must be loaded in cache
+               // This is there for automatic reload attempt
+               assertTrue(msoPropertiesFactory.getMsoJsonProperties("NEW_BAD_FILE").getJsonRootNode()!=null);
+               assertTrue("{}".equals(msoPropertiesFactory.getMsoJsonProperties("NEW_BAD_FILE").getJsonRootNode().toString()));
+       }
+       
+       @Test
+       public final void testShowProperties() {
+               assertTrue(msoPropertiesFactory.showProperties().getEntity().toString().contains("/target/test-classes/mso.json(Timer:2mins)"));
+               assertTrue(msoPropertiesFactory.showProperties().getEntity().toString().contains("asdc-controller1"));
+               assertTrue(msoPropertiesFactory.showProperties().getEntity().toString().contains("/target/test-classes/mso.properties(Timer:2mins):"));
+               assertTrue(msoPropertiesFactory.showProperties().getEntity().toString().contains("ecomp.mso.cloud.1.keystoneUrl"));
+               
+       }
+
+       @Test 
+       public final void testGetEncryptedPropertyJson() throws MsoPropertiesException {
+               MsoJsonProperties msoProperties = msoPropertiesFactory.getMsoJsonProperties(MSO_JSON_PROP_ID);
+               assertTrue("ThePassword".equals(msoProperties.getEncryptedProperty(msoProperties.getJsonRootNode().get("asdc-connections").get("asdc-controller1").get("asdcPassword"),"defautlvalue","566B754875657232314F5548556D3665")));
+               
+               assertTrue("defautlvalue".equals(msoProperties.getEncryptedProperty(msoProperties.getJsonRootNode().get("asdc-connections").get("asdc-controller1").get("asdcPassword"),"defautlvalue","566B754875657232314F5548556D366")));
+               
+               
+       }
+       
+       @Test
+       public final void testHashcodeAndEqualsMsoJsonProperties() throws MsoPropertiesException {
+       
+               MsoJsonProperties msoProperties = msoPropertiesFactory.getMsoJsonProperties(MSO_JSON_PROP_ID);
+
+               msoPropertiesFactory.changeMsoPropertiesFilePath(MSO_JSON_PROP_ID, PATH_MSO_JSON_PROP2);
+
+               msoPropertiesFactory.reloadMsoProperties();
+               assertFalse(msoPropertiesFactory.propertiesHaveChanged(MSO_JSON_PROP_ID, msoProperties));
+               // Reload it a second time as initial timer parameter was set to 2 
+               msoPropertiesFactory.reloadMsoProperties();
+               assertTrue(msoPropertiesFactory.propertiesHaveChanged(MSO_JSON_PROP_ID, msoProperties));
+               
+               // Get the new one
+               MsoJsonProperties msoProperties2 = msoPropertiesFactory.getMsoJsonProperties(MSO_JSON_PROP_ID);
+               assertFalse(msoProperties.hashCode()==msoProperties2.hashCode());
+               
+               assertFalse(msoProperties.equals(msoProperties2));
+               assertTrue(msoProperties.equals(msoProperties));
+               assertFalse(msoProperties.equals(null));
+               assertFalse(msoProperties.equals(new String()));
+               
+               // Test a reload with timer set to 1 in PATH_MSO_JSON_PROP2
+               msoPropertiesFactory.changeMsoPropertiesFilePath(MSO_JSON_PROP_ID, PATH_MSO_JSON_PROP);
+
+               msoPropertiesFactory.reloadMsoProperties();
+               assertTrue(msoPropertiesFactory.propertiesHaveChanged(MSO_JSON_PROP_ID, msoProperties2));
+       
+       }
+       
+}
diff --git a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertyInitializerTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertyInitializerTest.java
new file mode 100644 (file)
index 0000000..36b6249
--- /dev/null
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.adapter_utils.tests;
+
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesException;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.properties.MsoPropertyInitializer;
+
+public class MsoPropertyInitializerTest {
+
+       public static final String ASDC_PROP = MsoJavaProperties.class.getClassLoader().getResource("mso.json").toString().substring(5);
+       public static ServletContextEvent servletContextEvent = Mockito.mock(ServletContextEvent.class);
+       public static ServletContext servletContext = Mockito.mock(ServletContext.class);
+    public MsoPropertyInitializer msoPropInitializer = new MsoPropertyInitializer();
+           
+       @BeforeClass
+       public static final void prepareBeforeClass() throws MsoPropertiesException {
+
+               Mockito.when(servletContextEvent.getServletContext()).thenReturn(servletContext);
+       }
+       
+       @Before
+       public final void preparebeforeEachTest() throws MsoPropertiesException {
+               MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+               msoPropertiesFactory.removeAllMsoProperties();
+       
+       }
+               
+       @Test
+       public void testContextInitialized() throws MsoPropertiesException {
+               Mockito.when(servletContext.getInitParameter("mso.configuration")).thenReturn("MSO_PROP_ASDC="+ASDC_PROP);
+               msoPropInitializer.contextInitialized(servletContextEvent);
+               
+               MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+               assertNotNull(msoPropertiesFactory.getMsoJsonProperties("MSO_PROP_ASDC"));
+               assertFalse("{}".equals(msoPropertiesFactory.getMsoJsonProperties("MSO_PROP_ASDC").getJsonRootNode().toString()));
+               assertTrue(msoPropertiesFactory.getMsoJsonProperties("MSO_PROP_ASDC").getJsonRootNode().get("asdc-connections")!= null);
+       }
+       
+       @Test
+       public void testContextInitializedFailure() throws MsoPropertiesException {
+               Mockito.when(servletContext.getInitParameter("mso.configuration")).thenReturn("MSO_PROP_ASDC="+"Does_not_exist.json");
+               msoPropInitializer.contextInitialized(servletContextEvent);
+               
+               // No exception should be raised, log instead
+               MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+                               
+               assertTrue("{}".equals(msoPropertiesFactory.getMsoJsonProperties("MSO_PROP_ASDC").getJsonRootNode().toString()));
+               assertTrue(msoPropertiesFactory.getMsoJsonProperties("MSO_PROP_ASDC").getJsonRootNode().get("asdc-connections")== null);
+               
+               
+       
+       }
+       
+}
diff --git a/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTest.java b/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTest.java
new file mode 100644 (file)
index 0000000..a4fe1d3
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:09:00 GMT 2016
+ */
+
+package org.openecomp.mso.entity;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoRequestESTest extends MsoRequestESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("B1!G~O TIP1Auoc}pE");
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertEquals("B1!G~O TIP1Auoc}pE", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      msoRequest0.setServiceInstanceId("");
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      String string0 = msoRequest0.getRequestId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest("'SJ", "XUQ4Vd$ppTT4");
+      assertEquals("'SJ", msoRequest0.getRequestId());
+      
+      msoRequest0.setRequestId("");
+      msoRequest0.getRequestId();
+      assertEquals("XUQ4Vd$ppTT4", msoRequest0.getServiceInstanceId());
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest("'SJ", "XUQ4Vd$ppTT4");
+      String string0 = msoRequest0.getRequestId();
+      assertEquals("XUQ4Vd$ppTT4", msoRequest0.getServiceInstanceId());
+      assertEquals("'SJ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      MsoRequest msoRequest0 = new MsoRequest();
+      String string0 = msoRequest0.getServiceInstanceId();
+      assertNull(string0);
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTestscaffolding.java
new file mode 100644 (file)
index 0000000..9ac7ad8
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:09:00 GMT 2016
+ */
+
+package org.openecomp.mso.entity;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoRequestESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.entity.MsoRequest"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoRequestESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.entity.MsoRequest"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/logger/LogFilterESTest.java b/common/src/test/java/org/openecomp/mso/logger/LogFilterESTest.java
new file mode 100644 (file)
index 0000000..2293685
--- /dev/null
@@ -0,0 +1,191 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:08:24 GMT 2016
+ */
+
+package org.openecomp.mso.logger;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.security.Principal;
+import javax.servlet.AsyncContext;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.ServletResponseWrapper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class LogFilterESTest extends LogFilterESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      LogFilter logFilter0 = new LogFilter();
+      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        logFilter0.doFilter((ServletRequest) null, (ServletResponse) null, filterChain0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.logger.LogFilter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      LogFilter logFilter0 = new LogFilter();
+      ServletRequest servletRequest0 = mock(ServletRequest.class, new ViolatedAssumptionAnswer());
+      ServletResponse servletResponse0 = mock(ServletResponse.class, new ViolatedAssumptionAnswer());
+      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        logFilter0.doFilter(servletRequest0, servletResponse0, filterChain0);
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // $javax.servlet.ServletRequest$$EnhancerByMockitoWithCGLIB$$d677bdba cannot be cast to javax.servlet.http.HttpServletRequest
+         //
+         verifyException("org.openecomp.mso.logger.LogFilter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      LogFilter logFilter0 = new LogFilter();
+      FilterConfig filterConfig0 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
+      logFilter0.init(filterConfig0);
+      ServletRequest servletRequest0 = mock(ServletRequest.class, new ViolatedAssumptionAnswer());
+      ServletResponse servletResponse0 = mock(ServletResponse.class, new ViolatedAssumptionAnswer());
+      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        logFilter0.doFilter(servletRequest0, servletResponse0, filterChain0);
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // $javax.servlet.ServletRequest$$EnhancerByMockitoWithCGLIB$$d677bdba cannot be cast to javax.servlet.http.HttpServletRequest
+         //
+         verifyException("org.openecomp.mso.logger.LogFilter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      LogFilter logFilter0 = new LogFilter();
+      FilterConfig filterConfig0 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
+      logFilter0.init(filterConfig0);
+      ServletRequest servletRequest0 = null;
+      ServletResponse servletResponse0 = mock(ServletResponse.class, new ViolatedAssumptionAnswer());
+      ServletResponse servletResponse1 = mock(ServletResponse.class, new ViolatedAssumptionAnswer());
+      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        logFilter0.doFilter((ServletRequest) null, servletResponse1, filterChain0);
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // $javax.servlet.ServletResponse$$EnhancerByMockitoWithCGLIB$$b9bd7b44 cannot be cast to javax.servlet.http.HttpServletResponse
+         //
+         verifyException("org.openecomp.mso.logger.LogFilter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      LogFilter logFilter0 = new LogFilter();
+      logFilter0.destroy();
+      HttpServletRequest httpServletRequest0 = mock(HttpServletRequest.class, new ViolatedAssumptionAnswer());
+      HttpServletRequestWrapper httpServletRequestWrapper0 = new HttpServletRequestWrapper(httpServletRequest0);
+      ServletResponse servletResponse0 = null;
+      ServletResponseWrapper servletResponseWrapper0 = null;
+      try {
+        servletResponseWrapper0 = new ServletResponseWrapper((ServletResponse) null);
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Response cannot be null
+         //
+         verifyException("javax.servlet.ServletResponseWrapper", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      LogFilter logFilter0 = new LogFilter();
+      HttpServletRequest httpServletRequest0 = mock(HttpServletRequest.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null, (String) null, (String) null, (String) null, (String) null).when(httpServletRequest0).getRemoteAddr();
+      doReturn((AsyncContext) null).when(httpServletRequest0).startAsync(any(javax.servlet.ServletRequest.class) , any(javax.servlet.ServletResponse.class));
+      doReturn((Principal) null, (Principal) null, (Principal) null, (Principal) null, (Principal) null).when(httpServletRequest0).getUserPrincipal();
+      HttpServletRequestWrapper httpServletRequestWrapper0 = new HttpServletRequestWrapper(httpServletRequest0);
+      ServletRequest servletRequest0 = httpServletRequestWrapper0.getRequest();
+      HttpServletResponse httpServletResponse0 = mock(HttpServletResponse.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(httpServletResponse0).getCharacterEncoding();
+      HttpServletResponseWrapper httpServletResponseWrapper0 = new HttpServletResponseWrapper(httpServletResponse0);
+      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      logFilter0.doFilter(servletRequest0, httpServletResponseWrapper0, filterChain0);
+      logFilter0.destroy();
+      LogFilter logFilter1 = new LogFilter();
+      HttpServletResponseWrapper httpServletResponseWrapper1 = new HttpServletResponseWrapper((HttpServletResponse) httpServletResponseWrapper0);
+      FilterChain filterChain1 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      logFilter0.doFilter(servletRequest0, httpServletResponseWrapper0, filterChain1);
+      FilterChain filterChain2 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      logFilter1.doFilter(servletRequest0, httpServletResponseWrapper1, filterChain2);
+      HttpServletResponseWrapper httpServletResponseWrapper2 = (HttpServletResponseWrapper)httpServletResponseWrapper1.getResponse();
+      httpServletResponseWrapper1.getCharacterEncoding();
+      httpServletResponseWrapper1.flushBuffer();
+      httpServletRequestWrapper0.startAsync(servletRequest0, (ServletResponse) httpServletResponseWrapper1);
+      FilterChain filterChain3 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      logFilter1.doFilter(servletRequest0, httpServletResponseWrapper2, filterChain3);
+      FilterChain filterChain4 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      FilterChain filterChain5 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      logFilter1.doFilter(httpServletRequestWrapper0, httpServletResponseWrapper1, filterChain5);
+      logFilter1.doFilter(servletRequest0, httpServletResponseWrapper0, filterChain4);
+      logFilter0.destroy();
+      FilterConfig filterConfig0 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
+      logFilter1.init(filterConfig0);
+      LogFilter logFilter2 = new LogFilter();
+      FilterConfig filterConfig1 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
+      logFilter1.init(filterConfig1);
+      logFilter0.destroy();
+      assertFalse(logFilter0.equals((Object)logFilter1));
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      LogFilter logFilter0 = new LogFilter();
+      Principal principal0 = mock(Principal.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(principal0).getName();
+      HttpServletRequest httpServletRequest0 = mock(HttpServletRequest.class, new ViolatedAssumptionAnswer());
+      doReturn("$PJ-hW?").when(httpServletRequest0).getRemoteAddr();
+      doReturn(principal0).when(httpServletRequest0).getUserPrincipal();
+      HttpServletRequestWrapper httpServletRequestWrapper0 = new HttpServletRequestWrapper(httpServletRequest0);
+      ServletRequest servletRequest0 = httpServletRequestWrapper0.getRequest();
+      HttpServletResponse httpServletResponse0 = mock(HttpServletResponse.class, new ViolatedAssumptionAnswer());
+      HttpServletResponseWrapper httpServletResponseWrapper0 = new HttpServletResponseWrapper(httpServletResponse0);
+      ServletResponse servletResponse0 = httpServletResponseWrapper0.getResponse();
+      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
+      logFilter0.doFilter(servletRequest0, servletResponse0, filterChain0);
+      FilterConfig filterConfig0 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
+      logFilter0.init(filterConfig0);
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/logger/LogFilterESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/logger/LogFilterESTestscaffolding.java
new file mode 100644 (file)
index 0000000..5048763
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:08:24 GMT 2016
+ */
+
+package org.openecomp.mso.logger;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class LogFilterESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.logger.LogFilter"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(LogFilterESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.LogFilter"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoAlarmLoggerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/logger/MsoAlarmLoggerESTestscaffolding.java
new file mode 100644 (file)
index 0000000..320b755
--- /dev/null
@@ -0,0 +1,90 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:05:53 GMT 2016
+ */
+
+package org.openecomp.mso.logger;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+@EvoSuiteClassExclude
+public class MsoAlarmLoggerESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  protected static ExecutorService executor; 
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.logger.MsoAlarmLogger"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    executor = Executors.newCachedThreadPool(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    executor.shutdownNow(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoAlarmLoggerESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MsoAlarmLogger"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoAlarmLoggerESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoAlarmLogger"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTest.java b/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTest.java
new file mode 100644 (file)
index 0000000..97058d5
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:06:06 GMT 2016
+ */
+
+package org.openecomp.mso.logger;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoLogInitializerESTest extends MsoLogInitializerESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoLogInitializer msoLogInitializer0 = new MsoLogInitializer();
+      ServletContextEvent servletContextEvent0 = mock(ServletContextEvent.class, new ViolatedAssumptionAnswer());
+      doReturn((ServletContext) null).when(servletContextEvent0).getServletContext();
+      msoLogInitializer0.contextInitialized(servletContextEvent0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoLogInitializer msoLogInitializer0 = new MsoLogInitializer();
+      Boolean boolean0 = (Boolean)PrivateAccess.callMethod((Class<MsoLogInitializer>) MsoLogInitializer.class, msoLogInitializer0, "fileIsReadable", (Object) "", (Class<?>) String.class);
+      assertTrue(boolean0);
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c013954
--- /dev/null
@@ -0,0 +1,145 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:06:06 GMT 2016
+ */
+
+package org.openecomp.mso.logger;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoLogInitializerESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.logger.MsoLogInitializer"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoLogInitializerESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.openecomp.mso.logger.MsoLogInitializer",
+      "com.att.eelf.i18n.EELFResourceManager"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoLogInitializerESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogInitializer",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
+      "org.apache.xerces.jaxp.SAXParserImpl",
+      "org.apache.xerces.parsers.XMLParser",
+      "org.apache.xerces.parsers.AbstractSAXParser",
+      "org.apache.xerces.parsers.SAXParser",
+      "org.apache.xerces.parsers.ObjectFactory",
+      "org.apache.xerces.util.ParserConfigurationSettings",
+      "org.apache.xerces.parsers.XML11Configuration",
+      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
+      "org.apache.xerces.util.SymbolTable",
+      "org.apache.xerces.impl.XMLEntityManager",
+      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
+      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
+      "org.apache.xerces.impl.XMLEntityScanner$1",
+      "org.apache.xerces.impl.XMLEntityScanner",
+      "org.apache.xerces.impl.XMLErrorReporter",
+      "org.apache.xerces.impl.XMLScanner",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
+      "org.apache.xerces.impl.XMLDocumentScannerImpl",
+      "org.apache.xerces.util.XMLStringBuffer",
+      "org.apache.xerces.util.XMLAttributesImpl",
+      "org.apache.xerces.impl.XMLDTDScannerImpl",
+      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
+      "org.apache.xerces.impl.dtd.XMLDTDValidator",
+      "org.apache.xerces.impl.validation.ValidationState",
+      "org.apache.xerces.impl.dtd.XMLElementDecl",
+      "org.apache.xerces.impl.dtd.XMLSimpleType",
+      "org.apache.xerces.impl.dv.DTDDVFactory",
+      "org.apache.xerces.impl.dv.ObjectFactory",
+      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
+      "org.apache.xerces.impl.XMLVersionDetector",
+      "org.apache.xerces.impl.msg.XMLMessageFormatter",
+      "org.apache.xerces.impl.io.UTF8Reader",
+      "org.apache.xerces.util.XMLSymbols",
+      "org.apache.xerces.xni.NamespaceContext",
+      "org.apache.xerces.util.XMLChar",
+      "org.apache.xerces.impl.Constants",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTest.java b/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTest.java
new file mode 100644 (file)
index 0000000..2761f64
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:04:06 GMT 2016
+ */
+
+package org.openecomp.mso.logger;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoLoggingServletESTest extends MsoLoggingServletESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoLoggingServlet msoLoggingServlet0 = new MsoLoggingServlet();
+      try { 
+        PrivateAccess.callMethod((Class<MsoLoggingServlet>) MsoLoggingServlet.class, msoLoggingServlet0, "isMsoLogger", (Object) null, (Class<?>) String.class);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.logger.MsoLoggingServlet", e);
+      }
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTestscaffolding.java
new file mode 100644 (file)
index 0000000..be6c378
--- /dev/null
@@ -0,0 +1,337 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:04:06 GMT 2016
+ */
+
+package org.openecomp.mso.logger;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoLoggingServletESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.logger.MsoLoggingServlet"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoLoggingServletESTestscaffolding.class.getClassLoader() ,
+      "org.jboss.resteasy.spi.StringConverter",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
+      "org.apache.xerces.xni.XMLResourceIdentifier",
+      "org.apache.xerces.impl.XMLEntityManager",
+      "org.apache.xerces.impl.dtd.XMLDTDDescription",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.jboss.resteasy.util.ThreadLocalStack",
+      "org.apache.xerces.impl.dv.InvalidDatatypeValueException",
+      "org.apache.xerces.jaxp.UnparsedEntityHandler",
+      "org.apache.xerces.parsers.AbstractXMLDocumentParser",
+      "org.apache.xerces.impl.XMLScanner",
+      "org.apache.xerces.impl.dv.dtd.NOTATIONDatatypeValidator",
+      "org.apache.xerces.xni.parser.XMLParseException",
+      "org.apache.xerces.impl.XMLEntityScanner",
+      "org.apache.xerces.util.URI$MalformedURIException",
+      "org.apache.xerces.impl.XMLNSDocumentScannerImpl",
+      "org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry",
+      "org.apache.xerces.impl.dtd.models.CMAny",
+      "org.apache.xerces.util.URI",
+      "org.apache.xerces.xni.parser.XMLDocumentFilter",
+      "org.apache.xerces.xni.parser.XMLDTDSource",
+      "org.apache.xerces.impl.dtd.XMLAttributeDecl",
+      "org.apache.xerces.parsers.XMLParser",
+      "org.jboss.resteasy.spi.ResteasyProviderFactory",
+      "org.apache.xerces.util.SymbolTable",
+      "org.apache.xerces.impl.io.Latin1Reader",
+      "org.apache.xerces.impl.dv.ValidationContext",
+      "org.jboss.resteasy.spi.BadRequestException",
+      "org.apache.xerces.impl.dtd.XMLDTDValidator",
+      "org.apache.xerces.impl.dtd.XML11NSDTDValidator",
+      "org.openecomp.mso.logger.MsoLoggingServlet",
+      "org.apache.xerces.util.AugmentationsImpl",
+      "org.jboss.resteasy.core.interception.ReaderInterceptorRegistry",
+      "org.apache.xerces.impl.dv.ObjectFactory",
+      "org.jboss.resteasy.client.exception.mapper.ClientExceptionMapper",
+      "org.apache.xerces.impl.dv.DatatypeValidator",
+      "org.jboss.resteasy.spi.InjectorFactory",
+      "org.jboss.resteasy.core.interception.LegacyPrecedence",
+      "org.apache.xerces.jaxp.SAXParserImpl",
+      "org.apache.xerces.xni.grammars.XMLGrammarDescription",
+      "org.jboss.resteasy.plugins.delegates.NewCookieHeaderDelegate",
+      "org.apache.xerces.xni.parser.XMLErrorHandler",
+      "org.apache.xerces.util.MessageFormatter",
+      "org.apache.xerces.impl.XMLEntityManager$1",
+      "org.apache.xerces.xni.parser.XMLDTDScanner",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.apache.xerces.xni.XMLAttributes",
+      "org.apache.xerces.impl.dv.dtd.StringDatatypeValidator",
+      "org.apache.xerces.impl.io.MalformedByteSequenceException",
+      "org.apache.xerces.impl.Constants$ArrayEnumeration",
+      "org.jboss.resteasy.core.interception.WriterInterceptorRegistry",
+      "org.apache.xerces.impl.dv.DTDDVFactory",
+      "org.apache.xerces.impl.dv.dtd.IDDatatypeValidator",
+      "org.apache.xerces.impl.validation.ValidationManager",
+      "org.apache.xerces.xni.XNIException",
+      "org.apache.xerces.impl.dtd.models.CMNode",
+      "org.apache.xerces.xni.parser.XMLDocumentSource",
+      "org.apache.xerces.xni.XMLDTDContentModelHandler",
+      "org.jboss.resteasy.spi.StringParameterUnmarshaller",
+      "org.jboss.resteasy.core.MediaTypeMap",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
+      "org.apache.xerces.impl.XMLErrorReporter",
+      "org.jboss.resteasy.specimpl.ResteasyUriBuilder",
+      "org.apache.xerces.impl.Constants",
+      "org.apache.xerces.util.XMLStringBuffer",
+      "org.apache.xerces.jaxp.JAXPConstants",
+      "org.apache.xerces.xni.parser.XMLParserConfiguration",
+      "org.apache.xerces.xni.XMLString",
+      "org.apache.xerces.impl.dv.DVFactoryException",
+      "org.apache.xerces.impl.dv.DatatypeException",
+      "org.apache.xerces.parsers.XML11Configurable",
+      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
+      "org.jboss.resteasy.logging.Logger$LoggerType",
+      "org.apache.xerces.impl.xs.identity.FieldActivator",
+      "org.apache.xerces.impl.XMLEntityScanner$1",
+      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
+      "org.jboss.resteasy.util.CaseInsensitiveMap$CaseInsensitiveComparator",
+      "org.apache.xerces.xs.ElementPSVI",
+      "org.apache.xerces.parsers.AbstractSAXParser",
+      "org.jboss.resteasy.spi.LoggableFailure",
+      "org.apache.xerces.xni.parser.XMLDTDFilter",
+      "org.apache.xerces.xni.parser.XMLDTDContentModelSource",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.apache.xerces.xni.XMLLocator",
+      "org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser",
+      "org.apache.xerces.xni.Augmentations",
+      "org.apache.xerces.impl.XMLEntityHandler",
+      "org.jboss.resteasy.util.CaseInsensitiveMap$1",
+      "org.jboss.resteasy.specimpl.BuiltResponse",
+      "org.jboss.resteasy.core.Headers",
+      "org.apache.xerces.xni.parser.XMLComponent",
+      "org.apache.xerces.impl.dv.dtd.ListDatatypeValidator",
+      "org.jboss.resteasy.spi.Failure",
+      "org.apache.xerces.impl.XMLEntityManager$ScannedEntity",
+      "org.apache.xerces.jaxp.JAXPValidatorComponent",
+      "org.apache.xerces.xni.parser.XMLDTDContentModelFilter",
+      "org.apache.xerces.xs.PSVIProvider",
+      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
+      "org.jboss.resteasy.specimpl.ResponseBuilderImpl",
+      "org.jboss.resteasy.core.interception.ClientResponseFilterRegistry",
+      "org.apache.xerces.impl.dtd.XMLEntityDecl",
+      "org.apache.xerces.xs.ItemPSVI",
+      "org.jboss.resteasy.specimpl.MultivaluedTreeMap",
+      "org.apache.xerces.impl.dv.dtd.ENTITYDatatypeValidator",
+      "org.apache.xerces.xni.parser.XMLEntityResolver",
+      "org.jboss.resteasy.client.core.ClientErrorInterceptor",
+      "org.apache.xerces.impl.dtd.XMLNSDTDValidator",
+      "org.apache.xerces.impl.XMLDTDScannerImpl",
+      "org.apache.xerces.impl.dv.dtd.NMTOKENDatatypeValidator",
+      "org.apache.xerces.parsers.ObjectFactory",
+      "org.jboss.resteasy.spi.ResteasyProviderFactory$SortedKey",
+      "org.apache.xerces.xni.parser.XMLConfigurationException",
+      "org.apache.xerces.impl.XML11NSDocumentScannerImpl",
+      "org.apache.xerces.parsers.SAXParser",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.apache.xerces.impl.XMLEntityManager$RewindableInputStream",
+      "org.jboss.resteasy.core.interception.ContainerRequestFilterRegistry",
+      "org.jboss.resteasy.specimpl.VariantListBuilderImpl",
+      "org.apache.xerces.xni.parser.XMLInputSource",
+      "org.apache.xerces.xni.parser.XMLComponentManager",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry$InterceptorFactory",
+      "org.apache.xerces.impl.io.UTF8Reader",
+      "org.apache.xerces.impl.dtd.XMLSimpleType",
+      "org.apache.xerces.impl.XML11DocumentScannerImpl",
+      "org.apache.xerces.util.AugmentationsImpl$AugmentationsItemsContainer",
+      "org.apache.xerces.util.XMLChar",
+      "org.apache.xerces.impl.XML11DTDScannerImpl",
+      "org.apache.xerces.impl.dtd.XMLElementDecl",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.apache.xerces.xni.grammars.Grammar",
+      "org.apache.xerces.impl.dtd.models.ContentModelValidator",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.apache.xerces.xni.grammars.XMLGrammarLoader",
+      "org.apache.xerces.xni.XMLDocumentHandler",
+      "org.apache.xerces.impl.io.UCSReader",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBuffer",
+      "org.apache.xerces.impl.validation.ValidationState",
+      "org.apache.xerces.impl.XMLEntityManager$Entity",
+      "org.jboss.resteasy.spi.HttpRequest",
+      "org.apache.xerces.util.XMLResourceIdentifierImpl",
+      "org.jboss.resteasy.logging.Logger",
+      "org.jboss.resteasy.spi.ConstructorInjector",
+      "org.apache.xerces.xni.NamespaceContext",
+      "org.apache.xerces.impl.dtd.XMLDTDLoader",
+      "org.jboss.resteasy.util.CaseInsensitiveMap",
+      "org.apache.xerces.util.XMLSymbols",
+      "org.apache.xerces.parsers.ObjectFactory$ConfigurationError",
+      "org.jboss.resteasy.core.interception.ContainerResponseFilterRegistry",
+      "org.apache.xerces.impl.io.ASCIIReader",
+      "org.jboss.resteasy.core.interception.InterceptorRegistry",
+      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
+      "org.apache.xerces.impl.XML11EntityScanner",
+      "org.apache.xerces.impl.dtd.DTDGrammar",
+      "org.apache.xerces.impl.dv.dtd.IDREFDatatypeValidator",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
+      "org.apache.xerces.impl.dtd.XMLContentSpec",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.apache.xerces.xs.AttributePSVI",
+      "org.apache.xerces.impl.dtd.DTDGrammarBucket",
+      "org.apache.xerces.impl.msg.XMLMessageFormatter",
+      "org.apache.xerces.xni.parser.XMLDocumentScanner",
+      "org.apache.xerces.impl.XMLVersionDetector",
+      "org.apache.xerces.impl.XMLDocumentScannerImpl",
+      "org.apache.xerces.xni.parser.XMLPullParserConfiguration",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Dispatcher",
+      "org.apache.xerces.impl.xs.XMLSchemaValidator",
+      "org.apache.xerces.xni.grammars.XMLDTDDescription",
+      "org.jboss.resteasy.logging.impl.Slf4jLogger",
+      "org.apache.xerces.xni.QName",
+      "org.apache.xerces.jaxp.TeeXMLDocumentFilterImpl",
+      "org.apache.xerces.util.XMLAttributesImpl",
+      "org.apache.xerces.impl.XMLEntityManager$InternalEntity",
+      "org.apache.xerces.impl.RevalidationHandler",
+      "org.jboss.resteasy.spi.HeaderValueProcessor",
+      "org.apache.xerces.util.AugmentationsImpl$LargeContainer",
+      "org.apache.xerces.impl.dtd.BalancedDTDGrammar",
+      "org.apache.xerces.xni.XMLDTDHandler",
+      "org.apache.xerces.impl.dtd.XML11DTDProcessor",
+      "org.apache.xerces.parsers.XML11Configuration",
+      "org.apache.xerces.impl.dtd.XMLDTDValidatorFilter",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate",
+      "org.jboss.resteasy.core.MediaTypeMap$Typed",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.configuration.EELFManager",
+      "org.jboss.resteasy.spi.HttpResponse",
+      "org.apache.xerces.impl.validation.EntityState",
+      "org.apache.xerces.impl.XMLEntityManager$ExternalEntity",
+      "org.apache.xerces.util.ParserConfigurationSettings",
+      "org.apache.xerces.impl.dv.ObjectFactory$ConfigurationError",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.apache.xerces.impl.dtd.XML11DTDValidator"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoLoggingServletESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
+      "org.apache.xerces.jaxp.SAXParserImpl",
+      "org.apache.xerces.parsers.XMLParser",
+      "org.apache.xerces.parsers.AbstractSAXParser",
+      "org.apache.xerces.parsers.SAXParser",
+      "org.apache.xerces.parsers.ObjectFactory",
+      "org.apache.xerces.util.ParserConfigurationSettings",
+      "org.apache.xerces.parsers.XML11Configuration",
+      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
+      "org.apache.xerces.util.SymbolTable",
+      "org.apache.xerces.impl.XMLEntityManager",
+      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
+      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
+      "org.apache.xerces.impl.XMLEntityScanner$1",
+      "org.apache.xerces.impl.XMLEntityScanner",
+      "org.apache.xerces.impl.XMLErrorReporter",
+      "org.apache.xerces.impl.XMLScanner",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
+      "org.apache.xerces.impl.XMLDocumentScannerImpl",
+      "org.apache.xerces.util.XMLStringBuffer",
+      "org.apache.xerces.util.XMLAttributesImpl",
+      "org.apache.xerces.impl.XMLDTDScannerImpl",
+      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
+      "org.apache.xerces.impl.dtd.XMLDTDValidator",
+      "org.apache.xerces.impl.validation.ValidationState",
+      "org.apache.xerces.impl.dtd.XMLElementDecl",
+      "org.apache.xerces.impl.dtd.XMLSimpleType",
+      "org.apache.xerces.impl.dv.DTDDVFactory",
+      "org.apache.xerces.impl.dv.ObjectFactory",
+      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
+      "org.apache.xerces.impl.XMLVersionDetector",
+      "org.apache.xerces.impl.msg.XMLMessageFormatter",
+      "org.apache.xerces.impl.io.UTF8Reader",
+      "org.apache.xerces.util.XMLSymbols",
+      "org.apache.xerces.xni.NamespaceContext",
+      "org.apache.xerces.util.XMLChar",
+      "org.apache.xerces.impl.Constants",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.jboss.resteasy.logging.Logger$LoggerType",
+      "org.jboss.resteasy.logging.Logger",
+      "org.jboss.resteasy.spi.ResteasyProviderFactory",
+      "org.jboss.resteasy.core.MediaTypeMap",
+      "org.jboss.resteasy.core.interception.LegacyPrecedence",
+      "org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate",
+      "org.jboss.resteasy.plugins.delegates.NewCookieHeaderDelegate",
+      "org.jboss.resteasy.specimpl.MultivaluedTreeMap",
+      "org.jboss.resteasy.util.CaseInsensitiveMap$CaseInsensitiveComparator",
+      "org.jboss.resteasy.util.CaseInsensitiveMap",
+      "org.jboss.resteasy.core.Headers",
+      "org.openecomp.mso.logger.MsoLoggingServlet"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTest.java b/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTest.java
new file mode 100644 (file)
index 0000000..535d929
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:09:20 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import static org.evosuite.runtime.EvoAssertions.verifyException;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.FileNotFoundException;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class AbstractMsoPropertiesESTest extends AbstractMsoPropertiesESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      String string0 = msoJavaProperties0.toString();
+      assertEquals("Config file null(Timer:0mins):\n\n\n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
+      msoJavaProperties1.propertiesFileName = "+";
+      msoJavaProperties1.getPropertiesFileName();
+      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
+      msoJavaProperties1.propertiesFileName = "";
+      msoJavaProperties1.getPropertiesFileName();
+      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.automaticRefreshInMinutes = (-1447);
+      int int0 = msoJavaProperties0.getAutomaticRefreshInMinutes();
+      assertEquals((-1447), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.equals(msoJavaProperties0);
+      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.equals("X<0P%qxWR  fu\"");
+      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      MsoJavaProperties msoJavaProperties1 = (MsoJavaProperties)msoJavaProperties0.clone();
+      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.automaticRefreshInMinutes = (-1447);
+      MsoJavaProperties msoJavaProperties1 = (MsoJavaProperties)msoJavaProperties0.clone();
+      assertTrue(msoJavaProperties1.equals((Object)msoJavaProperties0));
+  }
+
+  /**
+   * TODO: fails when run using maven, but succeeds when run using eclipse   
+   * @throws Throwable
+   */
+  @Ignore
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.reloadPropertiesFile();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.propertiesFileName = "ASDC_ARTIFACT_ALREADY_DEPLOYED";
+      try { 
+        msoJavaProperties0.reloadPropertiesFile();
+        fail("Expecting exception: FileNotFoundException");
+      
+      } catch(FileNotFoundException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      try { 
+        msoJavaProperties0.loadPropertiesFile("Trying to reset value handler for type [");
+        fail("Expecting exception: FileNotFoundException");
+      
+      } catch(FileNotFoundException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.getPropertiesFileName();
+      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      int int0 = msoJavaProperties0.getAutomaticRefreshInMinutes();
+      assertEquals(0, int0);
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTestscaffolding.java
new file mode 100644 (file)
index 0000000..4224f01
--- /dev/null
@@ -0,0 +1,120 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:09:20 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class AbstractMsoPropertiesESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.AbstractMsoProperties"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AbstractMsoPropertiesESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.properties.AbstractMsoProperties",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.properties.MsoJavaProperties",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(AbstractMsoPropertiesESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.codehaus.jackson.map.introspect.AnnotatedClass",
+      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
+      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
+      "org.codehaus.jackson.annotate.JsonMethod",
+      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
+      "org.codehaus.jackson.map.ObjectMapper",
+      "org.codehaus.jackson.JsonParser$Feature",
+      "org.codehaus.jackson.JsonGenerator$Feature",
+      "org.codehaus.jackson.JsonFactory",
+      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
+      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
+      "org.codehaus.jackson.map.type.TypeFactory",
+      "org.openecomp.mso.utils.CryptoUtils",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.properties.AbstractMsoProperties"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTest.java
new file mode 100644 (file)
index 0000000..d64f63f
--- /dev/null
@@ -0,0 +1,358 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Thu Nov 10 08:35:35 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import static org.evosuite.runtime.EvoAssertions.verifyException;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.FileNotFoundException;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.testdata.FileSystemHandling;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoJavaPropertiesESTest extends MsoJavaPropertiesESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.setProperty("", "J6");
+      msoJavaProperties0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      String string0 = msoJavaProperties0.getProperty("IK#uRP]", (String) null);
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      String string0 = msoJavaProperties0.getProperty("", "");
+      assertNotNull(string0);
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      int int0 = msoJavaProperties0.getIntProperty("RA_VNF_NOT_EXIST", (-1417));
+      assertEquals((-1417), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      String string0 = msoJavaProperties0.getEncryptedProperty("", "", "");
+      assertEquals("", string0);
+      assertNotNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.automaticRefreshInMinutes = 1821;
+      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
+      assertNotSame(msoJavaProperties1, msoJavaProperties0);
+      assertEquals(1821, msoJavaProperties1.getAutomaticRefreshInMinutes());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.automaticRefreshInMinutes = (-78);
+      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
+      assertNotSame(msoJavaProperties1, msoJavaProperties0);
+      assertEquals(-78, msoJavaProperties1.getAutomaticRefreshInMinutes());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      FileSystemHandling fileSystemHandling0 = new FileSystemHandling();
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      PrivateAccess.setVariable((Class<MsoJavaProperties>) MsoJavaProperties.class, msoJavaProperties0, "msoProperties", (Object) null);
+      msoJavaProperties0.hashCode();
+      msoJavaProperties0.hashCode();
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.size();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.properties.MsoJavaProperties", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.setProperty((String) null, "+UaYo-~&{QxdaN(c");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
+      msoJavaProperties1.propertiesFileName = "";
+      try { 
+        msoJavaProperties1.reloadPropertiesFile();
+        fail("Expecting exception: FileNotFoundException");
+      
+      } catch(FileNotFoundException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
+      }
+  }
+
+  /**
+   * TODO: fails when run using maven, but succeeds when run using eclipse
+   */
+  @Ignore
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.loadPropertiesFile((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      try { 
+        msoJavaProperties0.loadPropertiesFile("");
+        fail("Expecting exception: FileNotFoundException");
+      
+      } catch(FileNotFoundException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.getIntProperty((String) null, 0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.setProperty("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION", "");
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.getEncryptedProperty("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION", "", "k$&Fq}");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"k$\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
+      msoJavaProperties1.clone();
+      msoJavaProperties0.hashCode();
+      MsoJavaProperties msoJavaProperties2 = msoJavaProperties1.clone();
+      PrivateAccess.setVariable((Class<MsoJavaProperties>) MsoJavaProperties.class, msoJavaProperties0, "msoProperties", (Object) null);
+      msoJavaProperties1.equals(msoJavaProperties2);
+      MsoLogger msoLogger0 = AbstractMsoProperties.LOGGER;
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.clone();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.util.Hashtable", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      int int0 = msoJavaProperties0.getIntProperty("", 0);
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.setProperty("-6;qct1", "");
+      String string0 = msoJavaProperties0.toString();
+      assertEquals("Config file null(Timer:0mins):\n-6;qct1=\n\n\n", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      boolean boolean0 = msoJavaProperties0.equals("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      boolean boolean0 = msoJavaProperties0.equals((Object) null);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      boolean boolean0 = msoJavaProperties0.equals(msoJavaProperties0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.setProperty("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION", "");
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.getEncryptedProperty("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION", ".", "");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Empty key
+         //
+         verifyException("javax.crypto.spec.SecretKeySpec", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      String string0 = msoJavaProperties0.getEncryptedProperty("YhmJSc|~L0$\7f,?/oh", (String) null, "YhmJSc|~L0$\7f,?/oh");
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.setProperty("M;WrYY%E,;sa&4F", "M;WrYY%E,;sa&4F");
+      boolean boolean0 = msoJavaProperties0.getBooleanProperty("M;WrYY%E,;sa&4F", false);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      boolean boolean0 = msoJavaProperties0.getBooleanProperty("", true);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.setProperty("M;WrYY%E,;sa&4F", "M;WrYY%E,;sa&4F");
+      int int0 = msoJavaProperties0.getIntProperty("M;WrYY%E,;sa&4F", 0);
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      msoJavaProperties0.setProperty("", "J6");
+      String string0 = msoJavaProperties0.getProperty("", "mso.properties.reload.time.minutes");
+      assertNotNull(string0);
+      assertEquals("J6", string0);
+  }
+  /**
+   * TODO: fails when run using maven, but succeeds when run using eclipse
+   */
+  @Ignore
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      // Undeclared exception!
+      try { 
+        msoJavaProperties0.reloadPropertiesFile();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
+      assertTrue(msoJavaProperties1.equals((Object)msoJavaProperties0));
+      
+      msoJavaProperties0.setProperty("", "");
+      boolean boolean0 = msoJavaProperties0.equals(msoJavaProperties1);
+      assertFalse(boolean0);
+      assertFalse(msoJavaProperties1.equals((Object)msoJavaProperties0));
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
+      int int0 = msoJavaProperties0.size();
+      assertEquals(0, int0);
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTestscaffolding.java
new file mode 100644 (file)
index 0000000..da13dc1
--- /dev/null
@@ -0,0 +1,110 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 07:59:01 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoJavaPropertiesESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoJavaProperties"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoJavaPropertiesESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.properties.AbstractMsoProperties",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.utils.CryptoUtils",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.properties.MsoJavaProperties",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "com.att.eelf.i18n.EELFResourceManager"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoJavaPropertiesESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.properties.AbstractMsoProperties",
+      "org.openecomp.mso.utils.CryptoUtils"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoJsonPropertiesESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoJsonPropertiesESTest.java
new file mode 100644 (file)
index 0000000..0243c13
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:04:39 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import static org.evosuite.runtime.EvoAssertions.verifyException;
+import static org.junit.Assert.fail;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class MsoJsonPropertiesESTest {
+
+  @Ignore
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoJsonProperties msoJsonProperties0 = null;
+      try {
+        msoJsonProperties0 = new MsoJsonProperties();
+        fail("Expecting exception: VerifyError");
+
+      } catch(VerifyError e) {
+         //
+         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
+         //
+         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
+      }
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTest.java
new file mode 100644 (file)
index 0000000..c53dd85
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:10:06 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoPropertiesExceptionESTest extends MsoPropertiesExceptionESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoPropertiesException msoPropertiesException0 = new MsoPropertiesException("");
+      MsoPropertiesException msoPropertiesException1 = new MsoPropertiesException("l6G(", (Throwable) msoPropertiesException0);
+      assertFalse(msoPropertiesException1.equals((Object)msoPropertiesException0));
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTestscaffolding.java
new file mode 100644 (file)
index 0000000..3799563
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:10:06 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoPropertiesExceptionESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoPropertiesException"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoPropertiesExceptionESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.properties.MsoPropertiesException"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoPropertiesExceptionESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.properties.MsoPropertiesException"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesFactoryESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesFactoryESTest.java
new file mode 100644 (file)
index 0000000..7ab5745
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:02:51 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
+public class MsoPropertiesFactoryESTest {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
+      // Undeclared exception!
+      try {
+        msoPropertiesFactory0.changeMsoPropertiesFilePath((String) null, "Unable to load the MSO properties file because format is not recognized (only .json or .properties): ");
+        fail("Expecting exception: NullPointerException");
+
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
+      msoPropertiesFactory0.removeAllMsoProperties();
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
+      try {
+        msoPropertiesFactory0.getMsoJavaProperties("iz/`I");
+        fail("Expecting exception: Exception");
+
+      } catch(Exception e) {
+         //
+         // Mso properties not found in cache:iz/`I
+         //
+         verifyException("org.openecomp.mso.properties.MsoPropertiesFactory", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
+      MsoPropertiesParameters msoPropertiesParameters0 = new MsoPropertiesParameters();
+      try {
+        PrivateAccess.callMethod((Class<MsoPropertiesFactory>) MsoPropertiesFactory.class, msoPropertiesFactory0, "createObjectType", (Object) msoPropertiesParameters0, (Class<?>) MsoPropertiesParameters.class, (Object) ":8nnlF[sGvCub6J", (Class<?>) String.class);
+        fail("Expecting exception: Exception");
+
+      } catch(Exception e) {
+         //
+         // Unable to load the MSO properties file because format is not recognized (only .json or .properties): :8nnlF[sGvCub6J
+         //
+         verifyException("org.openecomp.mso.properties.MsoPropertiesFactory", e);
+      }
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTest.java
new file mode 100644 (file)
index 0000000..9579b3b
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:09:37 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoPropertiesParametersESTest extends MsoPropertiesParametersESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoPropertiesParameters msoPropertiesParameters0 = new MsoPropertiesParameters();
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTestscaffolding.java
new file mode 100644 (file)
index 0000000..fec0b9e
--- /dev/null
@@ -0,0 +1,129 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:09:37 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoPropertiesParametersESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoPropertiesParameters"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoPropertiesParametersESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.properties.MsoPropertiesParameters"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoPropertiesParametersESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
+      "org.apache.xerces.jaxp.SAXParserImpl",
+      "org.apache.xerces.parsers.XMLParser",
+      "org.apache.xerces.parsers.AbstractSAXParser",
+      "org.apache.xerces.parsers.SAXParser",
+      "org.apache.xerces.parsers.ObjectFactory",
+      "org.apache.xerces.util.ParserConfigurationSettings",
+      "org.apache.xerces.parsers.XML11Configuration",
+      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
+      "org.apache.xerces.util.SymbolTable",
+      "org.apache.xerces.impl.XMLEntityManager",
+      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
+      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
+      "org.apache.xerces.impl.XMLEntityScanner$1",
+      "org.apache.xerces.impl.XMLEntityScanner",
+      "org.apache.xerces.impl.XMLErrorReporter",
+      "org.apache.xerces.impl.XMLScanner",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
+      "org.apache.xerces.impl.XMLDocumentScannerImpl",
+      "org.apache.xerces.util.XMLStringBuffer",
+      "org.apache.xerces.util.XMLAttributesImpl",
+      "org.apache.xerces.impl.XMLDTDScannerImpl",
+      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
+      "org.apache.xerces.impl.dtd.XMLDTDValidator",
+      "org.apache.xerces.impl.validation.ValidationState",
+      "org.apache.xerces.impl.dtd.XMLElementDecl",
+      "org.apache.xerces.impl.dtd.XMLSimpleType",
+      "org.apache.xerces.impl.dv.DTDDVFactory",
+      "org.apache.xerces.impl.dv.ObjectFactory",
+      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
+      "org.apache.xerces.impl.XMLVersionDetector",
+      "org.apache.xerces.impl.msg.XMLMessageFormatter",
+      "org.apache.xerces.impl.io.UTF8Reader",
+      "org.apache.xerces.util.XMLSymbols",
+      "org.apache.xerces.xni.NamespaceContext",
+      "org.apache.xerces.util.XMLChar",
+      "org.apache.xerces.impl.Constants",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.properties.AbstractMsoProperties"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTest.java
new file mode 100644 (file)
index 0000000..a7efa76
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:01:07 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.junit.Test;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoPropertyInitializerESTest extends MsoPropertyInitializerESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoPropertyInitializer msoPropertyInitializer0 = new MsoPropertyInitializer();
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTestscaffolding.java
new file mode 100644 (file)
index 0000000..9a056fb
--- /dev/null
@@ -0,0 +1,284 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:01:07 GMT 2016
+ */
+
+package org.openecomp.mso.properties;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoPropertyInitializerESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoPropertyInitializer"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoPropertyInitializerESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.properties.AbstractMsoProperties",
+      "org.apache.xerces.xni.parser.XMLDTDContentModelFilter",
+      "org.apache.xerces.xs.PSVIProvider",
+      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
+      "org.apache.xerces.impl.dtd.XMLEntityDecl",
+      "org.apache.xerces.xs.ItemPSVI",
+      "org.apache.xerces.xni.parser.XMLEntityResolver",
+      "org.apache.xerces.impl.dtd.XMLNSDTDValidator",
+      "org.apache.xerces.impl.XMLDTDScannerImpl",
+      "org.apache.xerces.parsers.ObjectFactory",
+      "org.apache.xerces.xni.parser.XMLConfigurationException",
+      "org.apache.xerces.impl.XML11NSDocumentScannerImpl",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
+      "org.apache.xerces.parsers.SAXParser",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.apache.xerces.xni.XMLResourceIdentifier",
+      "org.apache.xerces.impl.XMLEntityManager$RewindableInputStream",
+      "org.apache.xerces.impl.XMLEntityManager",
+      "org.apache.xerces.impl.dtd.XMLDTDDescription",
+      "org.apache.xerces.xni.parser.XMLInputSource",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.apache.xerces.xni.parser.XMLComponentManager",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.apache.xerces.impl.io.UTF8Reader",
+      "org.apache.xerces.impl.dv.InvalidDatatypeValueException",
+      "org.apache.xerces.jaxp.UnparsedEntityHandler",
+      "org.apache.xerces.parsers.AbstractXMLDocumentParser",
+      "org.apache.xerces.impl.XMLScanner",
+      "org.apache.xerces.impl.dtd.XMLSimpleType",
+      "org.apache.xerces.impl.XML11DocumentScannerImpl",
+      "org.apache.xerces.xni.parser.XMLParseException",
+      "org.apache.xerces.util.AugmentationsImpl$AugmentationsItemsContainer",
+      "org.apache.xerces.impl.XMLEntityScanner",
+      "org.apache.xerces.util.URI$MalformedURIException",
+      "org.apache.xerces.util.XMLChar",
+      "org.apache.xerces.impl.XMLNSDocumentScannerImpl",
+      "org.apache.xerces.impl.XML11DTDScannerImpl",
+      "org.apache.xerces.util.URI",
+      "org.apache.xerces.xni.parser.XMLDocumentFilter",
+      "org.apache.xerces.xni.parser.XMLDTDSource",
+      "org.apache.xerces.impl.dtd.XMLElementDecl",
+      "org.apache.xerces.impl.dtd.XMLAttributeDecl",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.apache.xerces.xni.grammars.Grammar",
+      "org.apache.xerces.parsers.XMLParser",
+      "org.apache.xerces.impl.dtd.models.ContentModelValidator",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.apache.xerces.xni.grammars.XMLGrammarLoader",
+      "org.apache.xerces.xni.XMLDocumentHandler",
+      "org.openecomp.mso.properties.MsoJavaProperties",
+      "org.apache.xerces.util.SymbolTable",
+      "org.apache.xerces.impl.io.UCSReader",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBuffer",
+      "org.apache.xerces.impl.io.Latin1Reader",
+      "org.apache.xerces.impl.dv.ValidationContext",
+      "org.apache.xerces.impl.dtd.XMLDTDValidator",
+      "org.apache.xerces.impl.dtd.XML11NSDTDValidator",
+      "org.apache.xerces.impl.validation.ValidationState",
+      "org.apache.xerces.impl.XMLEntityManager$Entity",
+      "org.apache.xerces.util.XMLResourceIdentifierImpl",
+      "org.apache.xerces.util.AugmentationsImpl",
+      "org.apache.xerces.impl.dv.ObjectFactory",
+      "org.apache.xerces.impl.dv.DatatypeValidator",
+      "org.apache.xerces.xni.NamespaceContext",
+      "org.apache.xerces.impl.dtd.XMLDTDLoader",
+      "org.apache.xerces.jaxp.SAXParserImpl",
+      "org.apache.xerces.util.XMLSymbols",
+      "org.apache.xerces.parsers.ObjectFactory$ConfigurationError",
+      "org.apache.xerces.xni.grammars.XMLGrammarDescription",
+      "org.apache.xerces.xni.parser.XMLErrorHandler",
+      "org.apache.xerces.impl.io.ASCIIReader",
+      "org.apache.xerces.util.MessageFormatter",
+      "org.openecomp.mso.properties.MsoPropertiesParameters",
+      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
+      "org.apache.xerces.xni.parser.XMLDTDScanner",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.apache.xerces.xni.XMLAttributes",
+      "org.apache.xerces.impl.io.MalformedByteSequenceException",
+      "org.apache.xerces.impl.Constants$ArrayEnumeration",
+      "org.apache.xerces.impl.XML11EntityScanner",
+      "org.apache.xerces.impl.dtd.DTDGrammar",
+      "org.apache.xerces.impl.dv.DTDDVFactory",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.openecomp.mso.properties.MsoPropertiesException",
+      "org.apache.xerces.impl.validation.ValidationManager",
+      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
+      "org.apache.xerces.xni.XNIException",
+      "org.apache.xerces.impl.dtd.XMLContentSpec",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.apache.xerces.xs.AttributePSVI",
+      "org.apache.xerces.impl.dtd.DTDGrammarBucket",
+      "org.apache.xerces.impl.msg.XMLMessageFormatter",
+      "org.apache.xerces.xni.parser.XMLDocumentScanner",
+      "org.apache.xerces.impl.XMLVersionDetector",
+      "org.apache.xerces.impl.XMLDocumentScannerImpl",
+      "org.apache.xerces.xni.parser.XMLPullParserConfiguration",
+      "org.apache.xerces.xni.parser.XMLDocumentSource",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Dispatcher",
+      "org.openecomp.mso.properties.MsoPropertiesFactory",
+      "org.apache.xerces.xni.XMLDTDContentModelHandler",
+      "org.apache.xerces.impl.xs.XMLSchemaValidator",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.apache.xerces.xni.grammars.XMLDTDDescription",
+      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
+      "org.apache.xerces.impl.XMLErrorReporter",
+      "org.apache.xerces.xni.QName",
+      "org.apache.xerces.jaxp.TeeXMLDocumentFilterImpl",
+      "org.apache.xerces.util.XMLAttributesImpl",
+      "org.apache.xerces.impl.Constants",
+      "org.apache.xerces.util.XMLStringBuffer",
+      "org.apache.xerces.impl.XMLEntityManager$InternalEntity",
+      "org.apache.xerces.jaxp.JAXPConstants",
+      "org.openecomp.mso.properties.MsoPropertiesParameters$MsoPropertiesType",
+      "org.apache.xerces.impl.RevalidationHandler",
+      "org.apache.xerces.xni.parser.XMLParserConfiguration",
+      "org.apache.xerces.xni.XMLString",
+      "org.apache.xerces.impl.dv.DVFactoryException",
+      "org.apache.xerces.impl.dv.DatatypeException",
+      "org.apache.xerces.parsers.XML11Configurable",
+      "org.apache.xerces.util.AugmentationsImpl$LargeContainer",
+      "org.apache.xerces.impl.dtd.BalancedDTDGrammar",
+      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
+      "org.apache.xerces.xni.XMLDTDHandler",
+      "org.apache.xerces.impl.dtd.XML11DTDProcessor",
+      "org.apache.xerces.parsers.XML11Configuration",
+      "org.apache.xerces.impl.dtd.XMLDTDValidatorFilter",
+      "org.apache.xerces.impl.xs.identity.FieldActivator",
+      "org.apache.xerces.impl.XMLEntityScanner$1",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
+      "org.apache.xerces.xs.ElementPSVI",
+      "org.apache.xerces.parsers.AbstractSAXParser",
+      "org.apache.xerces.xni.parser.XMLDTDFilter",
+      "org.apache.xerces.xni.parser.XMLDTDContentModelSource",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.properties.MsoJsonProperties",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.properties.MsoPropertyInitializer",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.apache.xerces.xni.XMLLocator",
+      "com.att.eelf.configuration.EELFManager",
+      "org.apache.xerces.impl.validation.EntityState",
+      "org.apache.xerces.impl.XMLEntityManager$ExternalEntity",
+      "org.apache.xerces.util.ParserConfigurationSettings",
+      "org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser",
+      "org.apache.xerces.xni.Augmentations",
+      "org.apache.xerces.impl.XMLEntityHandler",
+      "org.apache.xerces.impl.dv.ObjectFactory$ConfigurationError",
+      "org.apache.xerces.xni.parser.XMLComponent",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.apache.xerces.impl.dtd.XML11DTDValidator",
+      "org.apache.xerces.impl.XMLEntityManager$ScannedEntity",
+      "org.apache.xerces.jaxp.JAXPValidatorComponent"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoPropertyInitializerESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
+      "org.apache.xerces.jaxp.SAXParserImpl",
+      "org.apache.xerces.parsers.XMLParser",
+      "org.apache.xerces.parsers.AbstractSAXParser",
+      "org.apache.xerces.parsers.SAXParser",
+      "org.apache.xerces.parsers.ObjectFactory",
+      "org.apache.xerces.util.ParserConfigurationSettings",
+      "org.apache.xerces.parsers.XML11Configuration",
+      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
+      "org.apache.xerces.util.SymbolTable",
+      "org.apache.xerces.impl.XMLEntityManager",
+      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
+      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
+      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
+      "org.apache.xerces.impl.XMLEntityScanner$1",
+      "org.apache.xerces.impl.XMLEntityScanner",
+      "org.apache.xerces.impl.XMLErrorReporter",
+      "org.apache.xerces.impl.XMLScanner",
+      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
+      "org.apache.xerces.impl.XMLDocumentScannerImpl",
+      "org.apache.xerces.util.XMLStringBuffer",
+      "org.apache.xerces.util.XMLAttributesImpl",
+      "org.apache.xerces.impl.XMLDTDScannerImpl",
+      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
+      "org.apache.xerces.impl.dtd.XMLDTDValidator",
+      "org.apache.xerces.impl.validation.ValidationState",
+      "org.apache.xerces.impl.dtd.XMLElementDecl",
+      "org.apache.xerces.impl.dtd.XMLSimpleType",
+      "org.apache.xerces.impl.dv.DTDDVFactory",
+      "org.apache.xerces.impl.dv.ObjectFactory",
+      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
+      "org.apache.xerces.impl.XMLVersionDetector",
+      "org.apache.xerces.impl.msg.XMLMessageFormatter",
+      "org.apache.xerces.impl.io.UTF8Reader",
+      "org.apache.xerces.util.XMLSymbols",
+      "org.apache.xerces.xni.NamespaceContext",
+      "org.apache.xerces.util.XMLChar",
+      "org.apache.xerces.impl.Constants",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.properties.MsoPropertiesFactory"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java b/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java
new file mode 100644 (file)
index 0000000..212fe95
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:02:57 GMT 2016
+ */
+
+package org.openecomp.mso.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.util.List;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CheckResultsESTest extends CheckResultsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CheckResults checkResults0 = new CheckResults();
+      checkResults0.addHostCheckResult("GP<QUZyf\"vf-sD", (-1), "");
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      CheckResults checkResults0 = new CheckResults();
+      PrivateAccess.setVariable((Class<CheckResults>) CheckResults.class, checkResults0, "results", (Object) null);
+      List<CheckResults.CheckResult> list0 = checkResults0.getResults();
+      assertNull(list0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      checkResults_CheckResult0.setOutput("xp");
+      assertEquals(0, checkResults_CheckResult0.getState());
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      checkResults_CheckResult0.setType("2");
+      assertEquals(0, checkResults_CheckResult0.getState());
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      checkResults_CheckResult0.setState(1);
+      assertEquals(1, checkResults_CheckResult0.getState());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      checkResults_CheckResult0.setServicename("9~");
+      assertEquals(0, checkResults_CheckResult0.getState());
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      checkResults_CheckResult0.setHostname((String) null);
+      assertNull(checkResults_CheckResult0.getServicename());
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CheckResults checkResults0 = new CheckResults();
+      checkResults0.addHostCheckResult("GP<QUZyf\"vf-sD", 0, "GP<QUZyf\"vf-sD");
+      List<CheckResults.CheckResult> list0 = checkResults0.getResults();
+      assertEquals(1, list0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CheckResults checkResults0 = new CheckResults();
+      List<CheckResults.CheckResult> list0 = checkResults0.getResults();
+      assertTrue(list0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      String string0 = checkResults_CheckResult0.getServicename();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      int int0 = checkResults_CheckResult0.getState();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      String string0 = checkResults_CheckResult0.getHostname();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      String string0 = checkResults_CheckResult0.getType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      CheckResults checkResults0 = new CheckResults();
+      checkResults0.addServiceCheckResult("", "Ifp73+/", 0, " ");
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
+      String string0 = checkResults_CheckResult0.getOutput();
+      assertNull(string0);
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..a4fea26
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:02:57 GMT 2016
+ */
+
+package org.openecomp.mso.utils;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CheckResultsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.utils.CheckResults"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CheckResultsESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.utils.CheckResults$CheckResult",
+      "org.openecomp.mso.utils.CheckResults"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CheckResultsTest.java b/common/src/test/java/org/openecomp/mso/utils/CheckResultsTest.java
new file mode 100644 (file)
index 0000000..e178e4c
--- /dev/null
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.utils;
+
+import java.util.List;
+
+import org.junit.Test;
+
+import org.openecomp.mso.utils.CheckResults.CheckResult;
+
+public class CheckResultsTest {
+
+    /**
+     * Test method for {@link org.openecomp.mso.utils.CheckResults#getResults()}.
+     */
+    @Test
+    public final void testGetResults () {
+        CheckResults cr = new CheckResults ();
+        cr.addHostCheckResult ("host1", 0, "output");
+        cr.addHostCheckResult ("host2", 2, "output2");
+        cr.addServiceCheckResult ("host1", "service1", 0, "outputServ");
+        cr.addServiceCheckResult ("host1", "service2", 2, "outputServ2");
+        cr.addServiceCheckResult ("host2", "service1", 0, "output2Serv");
+        cr.addServiceCheckResult ("host2", "service2", 2, "output2Serv2");
+        List <CheckResult> res = cr.getResults ();
+        assert(res.size () == 6);
+        assert(res.get (0).getHostname ().equals ("host1"));
+        assert(res.get (1).getHostname ().equals ("host2"));
+        assert(res.get (2).getHostname ().equals ("host1"));
+        assert(res.get (3).getHostname ().equals ("host1"));
+        assert(res.get (4).getHostname ().equals ("host2"));
+        assert(res.get (5).getHostname ().equals ("host2"));
+        assert(res.get (0).getServicename () == null);
+        assert(res.get (3).getServicename ().equals ("service2"));
+        assert(res.get (5).getState () == 2);
+    }
+
+}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java b/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
new file mode 100644 (file)
index 0000000..397db37
--- /dev/null
@@ -0,0 +1,175 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 09:07:10 GMT 2016
+ */
+
+package org.openecomp.mso.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.IllegalBlockSizeException;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CryptoUtilsESTest extends CryptoUtilsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CryptoUtils.decrypt("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", "00000000000000000000000000000000");
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      byte[] byteArray0 = new byte[0];
+      CryptoUtils.byteArrayToHexString(byteArray0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        CryptoUtils.encrypt("AES", "w^p&|^Cvs@K.@@");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"w^\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        CryptoUtils.encrypt((String) null, "B2000000000000000000000000000000");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.utils.CryptoUtils", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      try { 
+        CryptoUtils.decrypt("B20000000000000000000000000000000000000000000000", "B20000000000000000000000000000000000000000000000");
+        fail("Expecting exception: IllegalBlockSizeException");
+      
+      } catch(IllegalBlockSizeException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      try { 
+        CryptoUtils.decrypt("0000C200000000000000000000000000", "0000C200000000000000000000000000");
+        fail("Expecting exception: BadPaddingException");
+      
+      } catch(BadPaddingException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        CryptoUtils.decrypt("s.", "s.");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"s.\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        CryptoUtils.decrypt("", "");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Empty key
+         //
+         verifyException("javax.crypto.spec.SecretKeySpec", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        CryptoUtils.byteArrayToHexString((byte[]) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.utils.CryptoUtils", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      byte[] byteArray0 = new byte[16];
+      byteArray0[0] = (byte) (-78);
+      String string0 = CryptoUtils.byteArrayToHexString(byteArray0);
+      assertEquals("B2000000000000000000000000000000", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      String string0 = CryptoUtils.encrypt("00000000000000000000000000000000", "00000000000000000000000000000000");
+      assertEquals("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        CryptoUtils.encrypt("", "");
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // Empty key
+         //
+         verifyException("javax.crypto.spec.SecretKeySpec", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CryptoUtils cryptoUtils0 = new CryptoUtils();
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      // Undeclared exception!
+      try { 
+        CryptoUtils.decrypt((String) null, "00000000000000000000000000000000");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.utils.CryptoUtils", e);
+      }
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..0957415
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 09:07:10 GMT 2016
+ */
+
+package org.openecomp.mso.utils;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CryptoUtilsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.utils.CryptoUtils"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CryptoUtilsESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.utils.CryptoUtils"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CryptoUtilsESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.utils.CryptoUtils"
+    );
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java b/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java
new file mode 100644 (file)
index 0000000..fa8517e
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:02:03 GMT 2016
+ */
+
+package org.openecomp.mso.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class UUIDCheckerESTest extends UUIDCheckerESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoLogger msoLogger0 = mock(MsoLogger.class, new ViolatedAssumptionAnswer());
+      String string0 = UUIDChecker.generateServiceInstanceID(msoLogger0);
+      assertEquals("00000000-0100-4000-8200-000003000000", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      UUIDChecker uUIDChecker0 = (UUIDChecker)PrivateAccess.callDefaultConstructorOfTheClassUnderTest();
+      assertNotNull(uUIDChecker0);
+  }
+}
diff --git a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java
new file mode 100644 (file)
index 0000000..15397cb
--- /dev/null
@@ -0,0 +1,94 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:02:03 GMT 2016
+ */
+
+package org.openecomp.mso.utils;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class UUIDCheckerESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.utils.UUIDChecker"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UUIDCheckerESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.openecomp.mso.utils.UUIDChecker"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UUIDCheckerESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger"
+    );
+  }
+}
diff --git a/common/src/test/resources/logback-test.xml b/common/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..b1888ac
--- /dev/null
@@ -0,0 +1,171 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration scan="false" debug="true">
+  <!--<jmxConfigurator /> -->
+  <!-- directory path for all other type logs -->
+  <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{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
+  <property name="debugPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%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" />
+  <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" />
+
+  <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+  <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
+  
+
+  <!-- Example evaluator filter applied against console appender -->
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>${defaultPattern}</pattern>
+    </encoder>
+  </appender>
+
+  <!-- ============================================================================ -->
+  <!-- EELF Appenders -->
+  <!-- ============================================================================ -->
+
+  <!-- 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>
+
+<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>
+  
+  <!-- ============================================================================ -->
+  <!--  EELF loggers -->
+  <!-- ============================================================================ -->
+
+  <logger name="com.att.eelf.audit" level="info" additivity="false">
+    <appender-ref ref="asyncEELFAudit" />
+  </logger>
+  
+  <logger name="com.att.eelf.metrics" level="info" additivity="false">
+        <appender-ref ref="asyncEELFMetrics" />
+  </logger>
+
+  <logger name="com.att.eelf.error" level="debug" additivity="false">
+    <appender-ref ref="asyncEELFError" />
+  </logger> 
+  <root level="INFO">
+    <appender-ref ref="asyncEELFDebug" />
+  </root>
+
+</configuration>
diff --git a/common/src/test/resources/mso-bad.json b/common/src/test/resources/mso-bad.json
new file mode 100644 (file)
index 0000000..9c3d26b
--- /dev/null
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+{
+  "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"
+    }
+  }
+}
diff --git a/common/src/test/resources/mso.json b/common/src/test/resources/mso.json
new file mode 100644 (file)
index 0000000..e8ee4a9
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "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.nrdp-alarms.properties b/common/src/test/resources/mso.nrdp-alarms.properties
new file mode 100644 (file)
index 0000000..8e7f8ed
--- /dev/null
@@ -0,0 +1,23 @@
+###
+# ============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.alarms.nrdp.enabled=false
+mso.alarms.nrdp.url=http://localhost:80
+mso.alarms.nrdp.token=83c9bb2734dd1a003e440128aa82f10c
diff --git a/common/src/test/resources/mso.properties b/common/src/test/resources/mso.properties
new file mode 100644 (file)
index 0000000..bb0e4eb
--- /dev/null
@@ -0,0 +1,28 @@
+###
+# ============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
new file mode 100644 (file)
index 0000000..006fda9
--- /dev/null
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+{
+  "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"
+    }
+  }
+  
+}
diff --git a/common/src/test/resources/mso2.properties b/common/src/test/resources/mso2.properties
new file mode 100644 (file)
index 0000000..423346e
--- /dev/null
@@ -0,0 +1,22 @@
+###
+# ============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/mso-api-handlers/mso-api-handler-common/pom.xml b/mso-api-handlers/mso-api-handler-common/pom.xml
new file mode 100644 (file)
index 0000000..b9d622d
--- /dev/null
@@ -0,0 +1,109 @@
+<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.openecomp.mso</groupId>
+               <artifactId>mso-api-handlers</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>mso-api-handler-common</artifactId>
+
+       <name>ECOMP MSO API Handler common</name>
+       <description>ECOMP MSO API Handler common classes</description>
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+       </properties>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.jboss.resteasy</groupId>
+                       <artifactId>resteasy-jaxrs</artifactId>
+                       <version>3.0.19.Final</version>
+                       <scope>provided</scope>
+                       <exclusions>
+                       <exclusion>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-api</artifactId>
+                       </exclusion>
+                       <exclusion>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-simple</artifactId>
+                       </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.httpcomponents</groupId>
+                                       <artifactId>httpclient</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               
+               <dependency>
+                       <groupId>commons-io</groupId>
+                       <artifactId>commons-io</artifactId>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpcore</artifactId>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpclient</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>javax</groupId>
+                       <artifactId>javaee-web-api</artifactId>
+                       <version>6.0</version>
+                       <scope>provided</scope>
+               </dependency>
+
+
+               <dependency>
+                       <groupId>javax.activation</groupId>
+                       <artifactId>activation</artifactId>
+                       <version>1.1.1</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <dependency>
+                 <groupId>org.codehaus.jackson</groupId>
+                 <artifactId>jackson-core-asl</artifactId>
+                 <version>1.9.13</version>
+               </dependency>
+               <dependency>
+                 <groupId>org.codehaus.jackson</groupId>
+                 <artifactId>jackson-mapper-asl</artifactId>
+                 <version>1.9.13</version>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-catalog-db</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-requests-db</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-core</artifactId>
+                       <version>1.10.19</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+
+       </build>
+       <packaging>jar</packaging>
+</project>
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java
new file mode 100644 (file)
index 0000000..4de534b
--- /dev/null
@@ -0,0 +1,255 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.codehaus.jackson.annotate.JsonPropertyOrder;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+
+/**
+ * JavaBean JSON class for a "bpmnRequest" which contains the JSON payload that
+ * will be passed to the Camunda process
+ */
+@JsonPropertyOrder({CommonConstants.REQUEST_ID_VARIABLE,
+       CommonConstants.IS_BASE_VF_MODULE_VARIABLE, CommonConstants.RECIPE_TIMEOUT_VARIABLE,
+       CommonConstants.REQUEST_ACTION_VARIABLE, CommonConstants.SERVICE_INSTANCE_ID_VARIABLE,
+       CommonConstants.VNF_ID_VARIABLE, CommonConstants.VF_MODULE_ID_VARIABLE,
+       CommonConstants.VOLUME_GROUP_ID_VARIABLE, CommonConstants.NETWORK_ID_VARIABLE,
+       CommonConstants.SERVICE_TYPE_VARIABLE, CommonConstants.VNF_TYPE_VARIABLE,
+       CommonConstants.VF_MODULE_TYPE_VARIABLE, CommonConstants.NETWORK_TYPE_VARIABLE,
+       CommonConstants.REQUEST_DETAILS_VARIABLE})
+@JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
+public class BpmnRequest {
+       
+       public BpmnRequest() {
+               
+       }
+       
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       private CamundaInput host;
+       
+       @JsonProperty(CommonConstants.REQUEST_ID_VARIABLE)
+       private CamundaInput requestId;
+       
+       @JsonProperty(CommonConstants.IS_BASE_VF_MODULE_VARIABLE)
+       private CamundaBooleanInput isBaseVfModule;
+       
+       @JsonProperty(CommonConstants.RECIPE_TIMEOUT_VARIABLE)
+       private CamundaIntegerInput recipeTimeout;
+       
+       @JsonProperty(CommonConstants.REQUEST_ACTION_VARIABLE)
+       private CamundaInput requestAction;
+       
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_VARIABLE)
+       private CamundaInput serviceInstanceId;
+       
+       @JsonProperty(CommonConstants.VNF_ID_VARIABLE)
+       private CamundaInput vnfId;
+       
+       @JsonProperty(CommonConstants.VF_MODULE_ID_VARIABLE)
+       private CamundaInput vfModuleId;
+       
+       @JsonProperty(CommonConstants.VOLUME_GROUP_ID_VARIABLE)
+       private CamundaInput volumeGroupId;
+       
+       @JsonProperty(CommonConstants.NETWORK_ID_VARIABLE)
+       private CamundaInput networkId;
+       
+       @JsonProperty(CommonConstants.SERVICE_TYPE_VARIABLE)
+       private CamundaInput serviceType;
+       
+       @JsonProperty(CommonConstants.VNF_TYPE_VARIABLE)
+       private CamundaInput vnfType;
+       
+       @JsonProperty(CommonConstants.VF_MODULE_TYPE_VARIABLE)
+       private CamundaInput vfModuleType;
+       
+       @JsonProperty(CommonConstants.NETWORK_TYPE_VARIABLE)
+       private CamundaInput networkType;
+       
+       @JsonProperty(CommonConstants.REQUEST_DETAILS_VARIABLE)
+       private CamundaInput requestDetails;
+       
+       
+       
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       public CamundaInput getHost() {
+               return host;
+       }
+
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       public void setHost(CamundaInput host) {
+               this.host = host;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ID_VARIABLE)
+       public CamundaInput getRequestId() {
+               return requestId;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ID_VARIABLE)
+       public void setRequestId(CamundaInput requestId) {
+               this.requestId = requestId;
+       }
+       
+       @JsonProperty(CommonConstants.IS_BASE_VF_MODULE_VARIABLE)
+       public CamundaBooleanInput getIsBaseVfModule() {
+               return isBaseVfModule;
+       }
+
+       @JsonProperty(CommonConstants.IS_BASE_VF_MODULE_VARIABLE)
+       public void setIsBaseVfModule(CamundaBooleanInput isBaseVfModule) {
+               this.isBaseVfModule = isBaseVfModule;
+       }
+       
+       @JsonProperty(CommonConstants.RECIPE_TIMEOUT_VARIABLE)
+       public CamundaIntegerInput getRecipeTimeout() {
+               return recipeTimeout;
+       }
+
+       @JsonProperty(CommonConstants.RECIPE_TIMEOUT_VARIABLE)
+       public void setRecipeTimeout(CamundaIntegerInput recipeTimeout) {
+               this.recipeTimeout = recipeTimeout;
+       }
+       
+       @JsonProperty(CommonConstants.REQUEST_ACTION_VARIABLE)
+       public CamundaInput getRequestAction() {
+               return requestAction;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ACTION_VARIABLE)
+       public void setRequestAction(CamundaInput requestAction) {
+               this.requestAction = requestAction;
+       }
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_VARIABLE)
+       public CamundaInput getServiceInstanceId() {
+               return serviceInstanceId;
+       }
+
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_VARIABLE)
+       public void setServiceInstanceId(CamundaInput serviceInstanceId) {
+               this.serviceInstanceId = serviceInstanceId;
+       }
+       
+       @JsonProperty(CommonConstants.VNF_ID_VARIABLE)
+       public CamundaInput getVnfId() {
+               return vnfId;
+       }
+
+       @JsonProperty(CommonConstants.VNF_ID_VARIABLE)
+       public void setVnfId(CamundaInput vnfId) {
+               this.vnfId = vnfId;
+       }
+       
+       @JsonProperty(CommonConstants.VF_MODULE_ID_VARIABLE)
+       public CamundaInput getVfModuleId() {
+               return vfModuleId;
+       }
+
+       @JsonProperty(CommonConstants.VF_MODULE_ID_VARIABLE)
+       public void setVfModuleId(CamundaInput vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+       
+       @JsonProperty(CommonConstants.VOLUME_GROUP_ID_VARIABLE)
+       public CamundaInput getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       @JsonProperty(CommonConstants.VOLUME_GROUP_ID_VARIABLE)
+       public void setVolumeGroupId(CamundaInput volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+       
+       @JsonProperty(CommonConstants.NETWORK_ID_VARIABLE)
+       public CamundaInput getNetworkId() {
+               return networkId;
+       }
+
+       @JsonProperty(CommonConstants.NETWORK_ID_VARIABLE)
+       public void setNetworkId(CamundaInput networkId) {
+               this.networkId = networkId;
+       }
+       
+       @JsonProperty(CommonConstants.SERVICE_TYPE_VARIABLE)
+       public CamundaInput getServiceType() {
+               return serviceType;
+       }
+
+       @JsonProperty(CommonConstants.SERVICE_TYPE_VARIABLE)
+       public void setServiceType(CamundaInput serviceType) {
+               this.serviceType = serviceType;
+       }
+       
+       @JsonProperty(CommonConstants.VNF_TYPE_VARIABLE)
+       public CamundaInput getVnfType() {
+               return vnfType;
+       }
+
+       @JsonProperty(CommonConstants.VNF_TYPE_VARIABLE)
+       public void setVnfType(CamundaInput vnfType) {
+               this.vnfType = vnfType;
+       }
+       
+       @JsonProperty(CommonConstants.VF_MODULE_TYPE_VARIABLE)
+       public CamundaInput getVfModuleType() {
+               return vfModuleType;
+       }
+
+       @JsonProperty(CommonConstants.VF_MODULE_TYPE_VARIABLE)
+       public void setVfModuleType(CamundaInput vfModuleType) {
+               this.vfModuleType = vfModuleType;
+       }
+       
+       @JsonProperty(CommonConstants.NETWORK_TYPE_VARIABLE)
+       public CamundaInput getNetworkType() {
+               return networkType;
+       }
+
+       @JsonProperty(CommonConstants.NETWORK_TYPE_VARIABLE)
+       public void setNetworkType(CamundaInput networkType) {
+               this.networkType = networkType;
+       }
+       
+       @JsonProperty(CommonConstants.REQUEST_DETAILS_VARIABLE)
+       public CamundaInput getRequestDetails() {
+               return requestDetails;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_DETAILS_VARIABLE)
+       public void setRequestDetails(CamundaInput requestDetails) {
+               this.requestDetails = requestDetails;
+       }
+
+
+               
+       
+       @Override
+       public String toString() {
+               //return "CamundaRequest [requestId=" +  + ", host="
+               //              + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid="
+                       //      + svcid + ", timeout=" + timeout + "]";
+               return "BpmnRequest";
+       }       
+       
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBooleanInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBooleanInput.java
new file mode 100644 (file)
index 0000000..c6ef7e5
--- /dev/null
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+
+/**
+ * JavaBean JSON class for a "gMyServiceInput" which contains the xml payload that
+ * will be passed to the Camunda process
+ */
+
+
+public class CamundaBooleanInput {
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    private boolean value;
+    @JsonProperty(CommonConstants.CAMUNDA_TYPE)
+    private String type = "Boolean";
+
+
+    public CamundaBooleanInput() {
+    }
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    public boolean getValue() {
+        return value;
+    }
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    public void setValue(boolean value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return "CamundaInput [value=" + value + ", type=" + type + "]";
+    }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java
new file mode 100644 (file)
index 0000000..e7e9b31
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+
+/**
+ * JavaBean JSON class for a "gMyServiceInput" which contains the xml payload that
+ * will be passed to the Camunda process
+ */
+public class CamundaBpmnRequestInput {
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    private BpmnRequest value;
+    @JsonProperty(CommonConstants.CAMUNDA_TYPE)
+    private String type = "String";
+
+
+    public CamundaBpmnRequestInput() {
+    }
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    public BpmnRequest getValue() {
+        return value;
+    }
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    public void setValue(BpmnRequest value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return "CamundaInput [value=" + value + ", type=" + type + "]";
+    }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java
new file mode 100644 (file)
index 0000000..16c7165
--- /dev/null
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+
+/**
+ * JavaBean JSON class for a "gMyServiceInput" which contains the xml payload that
+ * will be passed to the Camunda process
+ * 
+ */
+
+
+public class CamundaInput {
+       
+       @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+       private String value;
+       @JsonProperty(CommonConstants.CAMUNDA_TYPE)
+       private String type = "String";
+
+
+       public CamundaInput() {
+       }
+       
+       @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+       public String getValue() {
+               return value;
+       }
+       
+       @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+       public void setValue(String value) {
+               this.value = value;
+       }
+
+       @Override
+       public String toString() {
+               return "CamundaInput [value=" + value + ", type=" + type + "]";
+       }
+       
+
+       
+       
+       
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaIntegerInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaIntegerInput.java
new file mode 100644 (file)
index 0000000..ac77fb7
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+
+/**
+ * JavaBean JSON class for a "gMyServiceInput" which contains the xml payload that
+ * will be passed to the Camunda process
+ */
+public class CamundaIntegerInput {
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    private int value;
+    @JsonProperty(CommonConstants.CAMUNDA_TYPE)
+    private String type = "Integer";
+
+
+    public CamundaIntegerInput() {
+    }
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    public int getValue() {
+        return value;
+    }
+
+    @JsonProperty(CommonConstants.CAMUNDA_VALUE)
+    public void setValue(int value) {
+        this.value = value;
+    }
+
+    @Override
+    public String toString() {
+        return "CamundaInput [value=" + Integer.toString(value) + ", type=" + type + "]";
+    }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaRequest.java
new file mode 100644 (file)
index 0000000..4eacff6
--- /dev/null
@@ -0,0 +1,133 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.codehaus.jackson.annotate.JsonPropertyOrder;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+
+/**
+ * JavaBean JSON class for a "variables" which contains the xml payload that
+ * will be passed to the Camunda process
+ * 
+ */
+@JsonPropertyOrder({ CommonConstants.CAMUNDA_SERVICE_INPUT, CommonConstants.CAMUNDA_HOST, 
+       CommonConstants.SCHEMA_VERSION_HEADER, CommonConstants.REQUEST_ID_HEADER, CommonConstants.SERVICE_INSTANCE_ID_HEADER,
+       CommonConstants. REQUEST_TIMEOUT_HEADER, CommonConstants.CAMUNDA_SERVICE_INPUT})
+@JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
+public class CamundaRequest {
+
+       @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
+       private CamundaInput serviceInput;
+       
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       private CamundaInput host;
+       
+       @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
+       private CamundaInput schema;
+       
+       @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
+       private CamundaInput reqid;
+       
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
+       private CamundaInput svcid;
+       
+       @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
+       private CamundaInput timeout;
+       
+       public CamundaRequest() {
+       }
+       
+       @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
+       public CamundaInput getServiceInput() {
+               return serviceInput;
+       }
+
+       @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
+       public void setServiceInput(CamundaInput serviceInput) {
+               this.serviceInput = serviceInput;
+       }
+       
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       public CamundaInput getHost() {
+               return host;
+       }
+
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       public void setHost(CamundaInput host) {
+               this.host = host;
+       }
+
+       @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
+       public CamundaInput getSchema() {
+               return schema;
+       }
+
+       @JsonProperty(CommonConstants.SCHEMA_VERSION_HEADER)
+       public void setSchema(CamundaInput schema) {
+               this.schema = schema;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
+       public CamundaInput getReqid() {
+               return reqid;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
+       public void setReqid(CamundaInput reqid) {
+               this.reqid = reqid;
+       }
+
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
+       public CamundaInput getSvcid() {
+               return svcid;
+       }
+
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_HEADER)
+       public void setSvcid(CamundaInput svcid) {
+               this.svcid = svcid;
+       }
+       
+
+       @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
+       public CamundaInput getTimeout() {
+               return timeout;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_TIMEOUT_HEADER)
+       public void setTimeout(CamundaInput timeout) {
+               this.timeout = timeout;
+       }
+
+               
+       
+       @Override
+       public String toString() {
+               return "CamundaRequest [serviceInput=" + serviceInput + ", host="
+                               + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid="
+                               + svcid + ", timeout=" + timeout + "]";
+       }       
+       
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaResponse.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaResponse.java
new file mode 100644 (file)
index 0000000..3eeb0c0
--- /dev/null
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+/**
+ * JavaBean JSON class for a "variables" which contains the xml payload that
+ * will be passed to the Camunda process
+ * 
+ */
+
+public class CamundaResponse {
+       
+       @JsonProperty("response")
+       private String response;
+       @JsonProperty("messageCode")
+       private int messageCode;
+       @JsonProperty("message")
+       private String message;
+       @JsonProperty("processInstanceID")
+       private String processInstanceID;
+       @JsonProperty("variables")
+       private String variables;
+
+       public String getProcessInstanceID() {
+               return processInstanceID;
+       }
+
+       public void setProcessInstanceID(String processInstanceID) {
+               this.processInstanceID = processInstanceID;
+       }
+
+       public String getVariables() {
+               return variables;
+       }
+
+       public void setVariables(String variables) {
+               this.variables = variables;
+       }
+
+       public CamundaResponse() {
+       }
+
+       public String getResponse() {
+               return response;
+       }
+
+       public void setResponse(String response) {
+               this.response = response;
+       }
+
+       public int getMessageCode() {
+               return messageCode;
+       }
+
+       public void setMessageCode(int messageCode) {
+               this.messageCode = messageCode;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       @Override
+       public String toString() {
+               return "CamundaResponse [response=" + response + ", messageCode="
+                               + messageCode + ", message=" + message + "]";
+       }
+
+       
+       
+       
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java
new file mode 100644 (file)
index 0000000..5cf859d
--- /dev/null
@@ -0,0 +1,262 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.codehaus.jackson.annotate.JsonPropertyOrder;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+
+/**
+ * JavaBean JSON class for a "variables" which contains the JSON payload that
+ * will be passed to the Camunda process
+ */
+@JsonPropertyOrder({CommonConstants.CAMUNDA_SERVICE_INPUT, CommonConstants.REQUEST_ID_VARIABLE,
+       CommonConstants.REQUEST_ID_HEADER,
+       CommonConstants.IS_BASE_VF_MODULE_VARIABLE, CommonConstants.RECIPE_TIMEOUT_VARIABLE,
+       CommonConstants.REQUEST_ACTION_VARIABLE, CommonConstants.SERVICE_INSTANCE_ID_VARIABLE,
+       CommonConstants.VNF_ID_VARIABLE, CommonConstants.VF_MODULE_ID_VARIABLE,
+       CommonConstants.VOLUME_GROUP_ID_VARIABLE, CommonConstants.NETWORK_ID_VARIABLE,
+       CommonConstants.SERVICE_TYPE_VARIABLE, CommonConstants.VNF_TYPE_VARIABLE,
+       CommonConstants.VF_MODULE_TYPE_VARIABLE, CommonConstants.NETWORK_TYPE_VARIABLE,
+       CommonConstants.CAMUNDA_SERVICE_INPUT})
+@JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
+public class CamundaVIDRequest {
+
+       @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
+       private CamundaInput serviceInput;
+       
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       private CamundaInput host;
+       
+       @JsonProperty(CommonConstants.REQUEST_ID_VARIABLE)
+       private CamundaInput requestId;
+       
+       @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
+       private CamundaInput attMsoRequestId;
+       
+       
+       @JsonProperty(CommonConstants.IS_BASE_VF_MODULE_VARIABLE)
+       private CamundaBooleanInput isBaseVfModule;
+       
+       @JsonProperty(CommonConstants.RECIPE_TIMEOUT_VARIABLE)
+       private CamundaIntegerInput recipeTimeout;
+       
+       @JsonProperty(CommonConstants.REQUEST_ACTION_VARIABLE)
+       private CamundaInput requestAction;
+       
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_VARIABLE)
+       private CamundaInput serviceInstanceId;
+       
+       @JsonProperty(CommonConstants.VNF_ID_VARIABLE)
+       private CamundaInput vnfId;
+       
+       @JsonProperty(CommonConstants.VF_MODULE_ID_VARIABLE)
+       private CamundaInput vfModuleId;
+       
+       @JsonProperty(CommonConstants.VOLUME_GROUP_ID_VARIABLE)
+       private CamundaInput volumeGroupId;
+       
+       @JsonProperty(CommonConstants.NETWORK_ID_VARIABLE)
+       private CamundaInput networkId;
+       
+       @JsonProperty(CommonConstants.SERVICE_TYPE_VARIABLE)
+       private CamundaInput serviceType;
+       
+       @JsonProperty(CommonConstants.VNF_TYPE_VARIABLE)
+       private CamundaInput vnfType;
+       
+       @JsonProperty(CommonConstants.VF_MODULE_TYPE_VARIABLE)
+       private CamundaInput vfModuleType;
+       
+       @JsonProperty(CommonConstants.NETWORK_TYPE_VARIABLE)
+       private CamundaInput networkType;
+       
+       @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
+       public CamundaInput getServiceInput() {
+               return serviceInput;
+       }
+
+       @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
+       public void setServiceInput(CamundaInput serviceInput) {
+               this.serviceInput = serviceInput;
+       }
+       
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       public CamundaInput getHost() {
+               return host;
+       }
+
+       @JsonProperty(CommonConstants.CAMUNDA_HOST)
+       public void setHost(CamundaInput host) {
+               this.host = host;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ID_VARIABLE)
+       public CamundaInput getRequestId() {
+               return requestId;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ID_VARIABLE)
+       public void setRequestId(CamundaInput requestId) {
+               this.requestId = requestId;
+       }
+       
+       @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
+       public CamundaInput getAttMsoRequestId() {
+               return attMsoRequestId;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ID_HEADER)
+       public void setAttMsoRequestId(CamundaInput attMsoRequestId) {
+               this.attMsoRequestId = attMsoRequestId;
+       }
+       
+       @JsonProperty(CommonConstants.IS_BASE_VF_MODULE_VARIABLE)
+       public CamundaBooleanInput getIsBaseVfModule() {
+               return isBaseVfModule;
+       }
+
+       @JsonProperty(CommonConstants.IS_BASE_VF_MODULE_VARIABLE)
+       public void setIsBaseVfModule(CamundaBooleanInput isBaseVfModule) {
+               this.isBaseVfModule = isBaseVfModule;
+       }
+       
+       @JsonProperty(CommonConstants.RECIPE_TIMEOUT_VARIABLE)
+       public CamundaIntegerInput getRecipeTimeout() {
+               return recipeTimeout;
+       }
+
+       @JsonProperty(CommonConstants.RECIPE_TIMEOUT_VARIABLE)
+       public void setRecipeTimeout(CamundaIntegerInput recipeTimeout) {
+               this.recipeTimeout = recipeTimeout;
+       }
+       
+       @JsonProperty(CommonConstants.REQUEST_ACTION_VARIABLE)
+       public CamundaInput getRequestAction() {
+               return requestAction;
+       }
+
+       @JsonProperty(CommonConstants.REQUEST_ACTION_VARIABLE)
+       public void setRequestAction(CamundaInput requestAction) {
+               this.requestAction = requestAction;
+       }
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_VARIABLE)
+       public CamundaInput getServiceInstanceId() {
+               return serviceInstanceId;
+       }
+
+       @JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_VARIABLE)
+       public void setServiceInstanceId(CamundaInput serviceInstanceId) {
+               this.serviceInstanceId = serviceInstanceId;
+       }
+       
+       @JsonProperty(CommonConstants.VNF_ID_VARIABLE)
+       public CamundaInput getVnfId() {
+               return vnfId;
+       }
+
+       @JsonProperty(CommonConstants.VNF_ID_VARIABLE)
+       public void setVnfId(CamundaInput vnfId) {
+               this.vnfId = vnfId;
+       }
+       
+       @JsonProperty(CommonConstants.VF_MODULE_ID_VARIABLE)
+       public CamundaInput getVfModuleId() {
+               return vfModuleId;
+       }
+
+       @JsonProperty(CommonConstants.VF_MODULE_ID_VARIABLE)
+       public void setVfModuleId(CamundaInput vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+       
+       @JsonProperty(CommonConstants.VOLUME_GROUP_ID_VARIABLE)
+       public CamundaInput getVolumeGroupId() {
+               return volumeGroupId;
+       }
+
+       @JsonProperty(CommonConstants.VOLUME_GROUP_ID_VARIABLE)
+       public void setVolumeGroupId(CamundaInput volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+       
+       @JsonProperty(CommonConstants.NETWORK_ID_VARIABLE)
+       public CamundaInput getNetworkId() {
+               return networkId;
+       }
+
+       @JsonProperty(CommonConstants.NETWORK_ID_VARIABLE)
+       public void setNetworkId(CamundaInput networkId) {
+               this.networkId = networkId;
+       }
+       
+       @JsonProperty(CommonConstants.SERVICE_TYPE_VARIABLE)
+       public CamundaInput getServiceType() {
+               return serviceType;
+       }
+
+       @JsonProperty(CommonConstants.SERVICE_TYPE_VARIABLE)
+       public void setServiceType(CamundaInput serviceType) {
+               this.serviceType = serviceType;
+       }
+       
+       @JsonProperty(CommonConstants.VNF_TYPE_VARIABLE)
+       public CamundaInput getVnfType() {
+               return vnfType;
+       }
+
+       @JsonProperty(CommonConstants.VNF_TYPE_VARIABLE)
+       public void setVnfType(CamundaInput vnfType) {
+               this.vnfType = vnfType;
+       }
+       
+       @JsonProperty(CommonConstants.VF_MODULE_TYPE_VARIABLE)
+       public CamundaInput getVfModuleType() {
+               return vfModuleType;
+       }
+
+       @JsonProperty(CommonConstants.VF_MODULE_TYPE_VARIABLE)
+       public void setVfModuleType(CamundaInput vfModuleType) {
+               this.vfModuleType = vfModuleType;
+       }
+       
+       @JsonProperty(CommonConstants.NETWORK_TYPE_VARIABLE)
+       public CamundaInput getNetworkType() {
+               return networkType;
+       }
+
+       @JsonProperty(CommonConstants.NETWORK_TYPE_VARIABLE)
+       public void setNetworkType(CamundaInput networkType) {
+               this.networkType = networkType;
+       }
+               
+       
+       @Override
+       public String toString() {
+               //return "CamundaRequest [requestId=" +  + ", host="
+               //              + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid="
+                       //      + svcid + ", timeout=" + timeout + "]";
+               return "CamundaRequest";
+       }       
+       
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/Track.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/Track.java
new file mode 100644 (file)
index 0000000..a625298
--- /dev/null
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.camundabeans;
+
+public class Track {
+
+       String title;
+       String singer;
+
+       public String getTitle() {
+               return title;
+       }
+
+       public void setTitle(String title) {
+               this.title = title;
+       }
+
+       public String getSinger() {
+               return singer;
+       }
+
+       public void setSinger(String singer) {
+               this.singer = singer;
+       }
+
+       @Override
+       public String toString() {
+               return "Track [title=" + title + ", singer=" + singer + "]";
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java
new file mode 100644 (file)
index 0000000..511b874
--- /dev/null
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+import java.io.IOException;
+
+import javax.ws.rs.core.MediaType;
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+public class BPELRestClient extends RequestClient {
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    public BPELRestClient () {
+        super (CommonConstants.BPEL);
+    }
+
+    @Override
+    public HttpResponse post (String bpelReqXML,
+                              String requestId,
+                              String requestTimeout,
+                              String schemaVersion,
+                              String serviceInstanceId,
+                              String action) throws ClientProtocolException, IOException {
+        String encryptedCredentials = null;
+        HttpPost post = new HttpPost (url);
+        msoLogger.debug ("BPEL url is: " + url);
+        StringEntity input = new StringEntity (bpelReqXML);
+        input.setContentType (MediaType.TEXT_XML);
+        if (props != null) {
+            encryptedCredentials = props.getProperty (CommonConstants.BPEL_AUTH,null);
+            if (encryptedCredentials != null) {
+                String userCredentials = getEncryptedPropValue (encryptedCredentials,
+                                                                CommonConstants.DEFAULT_BPEL_AUTH,
+                                                                CommonConstants.ENCRYPTION_KEY);
+                if (userCredentials != null) {
+                    post.addHeader ("Authorization",
+                                    "Basic " + new String (DatatypeConverter.printBase64Binary (userCredentials.getBytes ())));
+                }
+            }
+        }
+        post.addHeader (CommonConstants.REQUEST_ID_HEADER, requestId);
+        post.addHeader (CommonConstants.REQUEST_TIMEOUT_HEADER, requestTimeout);
+        post.addHeader (CommonConstants.SCHEMA_VERSION_HEADER, schemaVersion);
+        if (serviceInstanceId != null) {
+            post.addHeader (CommonConstants.SERVICE_INSTANCE_ID_HEADER, serviceInstanceId);
+        }
+        if (action != null) {
+            post.addHeader (CommonConstants.ACTION_HEADER, action);
+        }
+        post.setEntity (input);
+        HttpResponse response = client.execute (post);
+        msoLogger.debug ("bpel response " + response);
+        return response;
+    }
+
+    @Override
+    public HttpResponse post (String bpelReqXML) {
+        return null;
+    }
+
+    @Override
+    public HttpResponse post(String requestId, boolean isBaseVfModule,
+                             int recipeTimeout, String requestAction, String serviceInstanceId,
+                             String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+                             String serviceType, String vnfType, String vfModuleType, String networkType,
+                             String requestDetails) {
+        return null;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java
new file mode 100644 (file)
index 0000000..dd83d24
--- /dev/null
@@ -0,0 +1,313 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+
+import org.openecomp.mso.apihandler.camundabeans.*;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+
+import javax.xml.bind.DatatypeConverter;
+import java.io.IOException;
+
+public class CamundaClient extends RequestClient{
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH);
+
+       public CamundaClient() {
+               super(CommonConstants.CAMUNDA); 
+       }
+
+
+       @Override
+       public HttpResponse post(String camundaReqXML, String requestId,
+                       String requestTimeout, String schemaVersion, String serviceInstanceId, String action)
+                                       throws ClientProtocolException, IOException{
+               HttpPost post = new HttpPost(url);
+               msoLogger.debug("Camunda url is: "+ url);
+               String jsonReq = wrapRequest(camundaReqXML, requestId, serviceInstanceId, requestTimeout,  schemaVersion);
+
+               StringEntity input = new StringEntity(jsonReq);
+               input.setContentType(CommonConstants.CONTENT_TYPE_JSON);
+
+               String encryptedCredentials = null;
+               if(props!=null){
+                       encryptedCredentials = props.getProperty(CommonConstants.CAMUNDA_AUTH,null);
+                       if(encryptedCredentials != null){
+                               String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH, CommonConstants.ENCRYPTION_KEY);
+                               if(userCredentials != null){
+                                       post.addHeader("Authorization", "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+                               }
+                       }
+               }
+
+               post.setEntity(input);
+               HttpResponse response = client.execute(post);
+
+               return response;
+       }
+
+       @Override
+       public HttpResponse post(String jsonReq)
+                                       throws ClientProtocolException, IOException{
+               HttpPost post = new HttpPost(url);
+               msoLogger.debug("Camunda url is: "+ url);
+               //String jsonReq = wrapRequest(camundaReqXML, requestId, serviceInstanceId, requestTimeout,  schemaVersion);
+
+               StringEntity input = new StringEntity(jsonReq);
+               input.setContentType(CommonConstants.CONTENT_TYPE_JSON);
+
+               String encryptedCredentials = null;
+               if(props!=null){
+                       encryptedCredentials = props.getProperty(CommonConstants.CAMUNDA_AUTH,null);
+                       if(encryptedCredentials != null){
+                               String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH, CommonConstants.ENCRYPTION_KEY);
+                               if(userCredentials != null){
+                                       post.addHeader("Authorization", "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+                               }
+                       }
+               }
+
+               post.setEntity(input);
+               HttpResponse response = client.execute(post);
+
+               return response;
+       }
+
+       @Override
+       public HttpResponse post(String requestId, boolean isBaseVfModule,
+                       int recipeTimeout, String requestAction, String serviceInstanceId,
+                       String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+                       String serviceType, String vnfType, String vfModuleType, String networkType,
+                       String requestDetails)
+                                       throws ClientProtocolException, IOException{
+               HttpPost post = new HttpPost(url);
+               msoLogger.debug("Camunda url is: "+ url);
+               String jsonReq = wrapVIDRequest(requestId, isBaseVfModule, recipeTimeout, requestAction,
+                               serviceInstanceId, vnfId, vfModuleId, volumeGroupId, networkId,
+                               serviceType, vnfType, vfModuleType, networkType, requestDetails);
+
+               StringEntity input = new StringEntity(jsonReq);
+               input.setContentType(CommonConstants.CONTENT_TYPE_JSON);
+
+               String encryptedCredentials = null;
+               if(props!=null){
+                       encryptedCredentials = props.getProperty(CommonConstants.CAMUNDA_AUTH,null);
+                       if(encryptedCredentials != null){
+                               String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH, CommonConstants.ENCRYPTION_KEY);
+                               if(userCredentials != null){
+                                       post.addHeader("Authorization", "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+                               }
+                       }
+               }
+
+               post.setEntity(input);
+               HttpResponse response = client.execute(post);
+
+               return response;
+       }
+
+       private String wrapRequest(String reqXML, String requestId, String serviceInstanceId, String requestTimeout, String schemaVersion){
+               String jsonReq = null;
+               if(reqXML == null){
+                       reqXML ="";
+               }
+               if(requestTimeout == null){
+                       requestTimeout ="";
+               }
+               if(schemaVersion == null){
+                       schemaVersion = "";
+               }
+               
+               
+               try{
+                       CamundaRequest camundaRequest = new CamundaRequest();
+                       CamundaInput camundaInput = new CamundaInput();
+                       CamundaInput host = new CamundaInput();
+                       CamundaInput schema = new CamundaInput();
+                       CamundaInput reqid = new CamundaInput();
+                       CamundaInput svcid = new CamundaInput();
+                       CamundaInput timeout = new CamundaInput();
+                       camundaInput.setValue(reqXML);
+                       host.setValue(parseURL());
+                       schema.setValue(schemaVersion);
+                       reqid.setValue(requestId);
+                       svcid.setValue(serviceInstanceId);
+                       timeout.setValue(requestTimeout);
+                       camundaRequest.setServiceInput(camundaInput);
+                       camundaRequest.setHost(host);
+                       camundaRequest.setReqid(reqid);
+                       camundaRequest.setSvcid(svcid);
+                       camundaRequest.setSchema(schema);
+                       camundaRequest.setTimeout(timeout);
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
+
+                       jsonReq = mapper.writeValueAsString(camundaRequest);
+                       msoLogger.debug("request body is " + jsonReq);
+               }catch(Exception e){
+                       msoLogger.error(MessageEnum.APIH_WARP_REQUEST, "Camunda", "wrapRequest", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH Warp request", e);
+               }
+               return jsonReq;
+       }
+
+       private String wrapVIDRequest(String requestId, boolean isBaseVfModule,
+                       int recipeTimeout, String requestAction, String serviceInstanceId,
+                       String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+                       String serviceType, String vnfType, String vfModuleType, String networkType,
+                       String requestDetails){
+               String jsonReq = null;
+               if(requestId == null){
+                       requestId ="";
+               }
+               if(requestAction == null){
+                       requestAction ="";
+               }
+               if(serviceInstanceId == null){
+                       serviceInstanceId ="";
+               }
+               if(vnfId == null){
+                       vnfId ="";
+               }
+               if(vfModuleId == null){
+                       vfModuleId ="";
+               }
+               if(volumeGroupId == null){
+                       volumeGroupId ="";
+               }
+               if(networkId == null){
+                       networkId ="";
+               }
+               if(serviceType == null){
+                       serviceType ="";
+               }
+               if(vnfType == null){
+                       vnfType ="";
+               }
+               if(vfModuleType == null){
+                       vfModuleType ="";
+               }
+               if(networkType == null){
+                       networkType ="";
+               }
+               if(requestDetails == null){
+                       requestDetails ="";
+               }
+
+
+
+               try{
+                       CamundaVIDRequest camundaRequest = new CamundaVIDRequest();
+                       BpmnRequest bpmnRequest = new BpmnRequest();
+                       CamundaInput serviceInput = new CamundaInput();
+                       CamundaInput host = new CamundaInput();
+                       CamundaInput requestIdInput= new CamundaInput();
+                       CamundaBooleanInput isBaseVfModuleInput = new CamundaBooleanInput();
+                       CamundaIntegerInput recipeTimeoutInput = new CamundaIntegerInput();
+                       CamundaInput requestActionInput = new CamundaInput();
+                       CamundaInput serviceInstanceIdInput = new CamundaInput();
+                       CamundaInput vnfIdInput = new CamundaInput();
+                       CamundaInput vfModuleIdInput = new CamundaInput();
+                       CamundaInput volumeGroupIdInput = new CamundaInput();
+                       CamundaInput networkIdInput = new CamundaInput();
+                       CamundaInput serviceTypeInput = new CamundaInput();
+                       CamundaInput vnfTypeInput = new CamundaInput();
+                       CamundaInput vfModuleTypeInput = new CamundaInput();
+                       CamundaInput networkTypeInput = new CamundaInput();
+
+                       host.setValue(parseURL());
+                       requestIdInput.setValue(requestId);
+                       isBaseVfModuleInput.setValue(isBaseVfModule);
+                       recipeTimeoutInput.setValue(recipeTimeout);
+                       requestActionInput.setValue(requestAction);
+                       serviceInstanceIdInput.setValue(serviceInstanceId);
+                       vnfIdInput.setValue(vnfId);
+                       vfModuleIdInput.setValue(vfModuleId);
+                       volumeGroupIdInput.setValue(volumeGroupId);
+                       networkIdInput.setValue(networkId);
+                       serviceTypeInput.setValue(serviceType);
+                       vnfTypeInput.setValue(vnfType);
+                       vfModuleTypeInput.setValue(vfModuleType);
+                       networkTypeInput.setValue(networkType);
+
+                       bpmnRequest.setRequestId(requestIdInput);
+                       bpmnRequest.setIsBaseVfModule(isBaseVfModuleInput);
+                       bpmnRequest.setRecipeTimeout(recipeTimeoutInput);
+                       bpmnRequest.setRequestAction(requestActionInput);
+                       bpmnRequest.setServiceInstanceId(serviceInstanceIdInput);
+                       bpmnRequest.setVnfId(vnfIdInput);
+                       bpmnRequest.setVfModuleId(vfModuleIdInput);
+                       bpmnRequest.setVolumeGroupId(volumeGroupIdInput);
+                       bpmnRequest.setNetworkId(networkIdInput);
+                       bpmnRequest.setServiceType(serviceTypeInput);
+                       bpmnRequest.setVnfType(vnfTypeInput);
+                       bpmnRequest.setVfModuleType(vfModuleTypeInput);
+                       bpmnRequest.setNetworkType(networkTypeInput);
+                       //bpmnRequest.setRequestDetails(requestDetailsInput);
+
+                       serviceInput.setValue(requestDetails);
+                       camundaRequest.setServiceInput(serviceInput);
+                       camundaRequest.setHost(host);
+                       camundaRequest.setRequestId(requestIdInput);
+                       camundaRequest.setAttMsoRequestId(requestIdInput);
+                       camundaRequest.setIsBaseVfModule(isBaseVfModuleInput);
+                       camundaRequest.setRecipeTimeout(recipeTimeoutInput);
+                       camundaRequest.setRequestAction(requestActionInput);
+                       camundaRequest.setServiceInstanceId(serviceInstanceIdInput);
+                       camundaRequest.setVnfId(vnfIdInput);
+                       camundaRequest.setVfModuleId(vfModuleIdInput);
+                       camundaRequest.setVolumeGroupId(volumeGroupIdInput);
+                       camundaRequest.setNetworkId(networkIdInput);
+                       camundaRequest.setServiceType(serviceTypeInput);
+                       camundaRequest.setVnfType(vnfTypeInput);
+                       camundaRequest.setVfModuleType(vfModuleTypeInput);
+                       camundaRequest.setNetworkType(networkTypeInput);
+
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
+
+                       jsonReq = mapper.writeValueAsString(camundaRequest);
+                       msoLogger.debug("request body is " + jsonReq);
+               }catch(Exception e){
+                       msoLogger.error(MessageEnum.APIH_WARP_REQUEST, "Camunda", "wrapVIDRequest", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH Warp request", e);
+               }
+               return jsonReq;
+       }
+
+       private String parseURL(){
+               String[] parts = url.split(":");
+               String host = "";
+               if(parts.length>=2){
+                       host = parts[1];
+                       if(host.length()>2){
+                               host = host.substring(2);
+                       }
+               }
+               return host;
+       }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java
new file mode 100644 (file)
index 0000000..3a9ad60
--- /dev/null
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+
+public final class CommonConstants {
+
+    public static final String DEFAULT_BPEL_AUTH = "admin:admin";
+    public static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+
+    public static final String REQUEST_ID_HEADER = "att-mso-request-id";
+    public static final String REQUEST_TIMEOUT_HEADER = "att-mso-service-request-timeout";
+    public static final String SCHEMA_VERSION_HEADER = "att-mso-schema-version";
+    public static final String SERVICE_INSTANCE_ID_HEADER = "att-mso-service-instance-id";
+    public static final String ACTION_HEADER = "att-mso-action";
+
+    public static final String CAMUNDA_SERVICE_INPUT = "bpmnRequest";
+       public static final String CAMUNDA_ROOT_INPUT = "variables";
+       public static final String CONTENT_TYPE_JSON= "application/json";
+       public static final String CAMUNDA_TYPE = "type";
+       public static final String CAMUNDA_VALUE = "value";
+       public static final String CAMUNDA_URL = "camundaURL";
+       public static final String CAMUNDA_AUTH = "camundaAuth";
+       public static final String BPEL_SEARCH_STR = "active-bpel";
+       public static final String BPEL_URL = "bpelURL";
+       public static final String BPEL_AUTH = "bpelAuth";
+       public static final int BPEL = 0;
+       public static final int CAMUNDA = 1;
+       public static final String CAMUNDA_HOST = "host";
+       public static final String SDNC_UUID_HEADER = "att-mso-sdnc-request-id";
+       
+       public static final String REQUEST_ID_VARIABLE = "requestId";
+       public static final String IS_BASE_VF_MODULE_VARIABLE = "isBaseVfModule";
+       public static final String RECIPE_TIMEOUT_VARIABLE = "recipeTimeout";
+       public static final String REQUEST_ACTION_VARIABLE = "requestAction";
+       public static final String SERVICE_INSTANCE_ID_VARIABLE = "serviceInstanceId";
+       public static final String VNF_ID_VARIABLE = "vnfId";
+       public static final String VF_MODULE_ID_VARIABLE = "vfModuleId";
+       public static final String VOLUME_GROUP_ID_VARIABLE = "volumeGroupId";
+       public static final String NETWORK_ID_VARIABLE = "networkId";
+       public static final String SERVICE_TYPE_VARIABLE = "serviceType";
+       public static final String VNF_TYPE_VARIABLE = "vnfType";
+       public static final String VF_MODULE_TYPE_VARIABLE = "vfModuleType";
+       public static final String NETWORK_TYPE_VARIABLE = "networkType";
+       public static final String REQUEST_DETAILS_VARIABLE = "requestDetails"; 
+       
+       private CommonConstants () {
+           // prevent creating an instance of this class
+       }
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ErrorNumbers.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ErrorNumbers.java
new file mode 100644 (file)
index 0000000..498952f
--- /dev/null
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+public final class ErrorNumbers {
+
+    public static final String REQUEST_FAILED_SCHEMA_VALIDATION = "1000";
+    public static final String RECIPE_DOES_NOT_EXIST = "1010";
+    public static final String VFMODULE_TYPE_DOES_NOT_EXIST = "1011";
+    public static final String SERVICE_PARAMETERS_FAILED_SCHEMA_VALIDATION = "1020";
+    public static final String LOCKED_SAME_SERVICE_TYPE_AND_REQUEST_ACTION = "1030";
+    public static final String LOCKED_CANCEL_ON_REQUEST_IN_PROGRESS = "1031";
+    public static final String LOCKED_REQUEST_IN_PROGRESS_TIMEOUT = "1032";
+    public static final String LOCKED_NOT_ALLOWED_FOR_REQUEST_IN_PROGRESS = "1033";
+    public static final String WITHDRAW_AFTER_COMPLETE = "1034";
+    public static final String COMPLETE_AFTER_WITHDRAW = "1035"; // NOT USED
+    public static final String REQUEST_PREVIOUSLY_COMPLETED = "1036";
+    public static final String CANNOT_RETRY_FINAL_ACTIVATION = "1037";
+    public static final String PREVIOUSLY_COMPLETED_WITH_DIFF_ORDER_VERSION = "1038";
+    public static final String LOCKED_DIFFERENT_REQUEST_ACTION = "1040";
+    public static final String LOCKED_DIFF_REQUEST_ACTION_SAME_SERVICE_INSTANCE_ID = "1041";
+    public static final String REQUEST_TIMED_OUT = "1050";
+
+    public static final String DISCONNECT_ALREADY_COMPLETE = "1100";
+    public static final String CANCEL_ALREADY_COMPLETE = "1110";
+    
+    public static final String LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS = "1400";
+    public static final String LOCKED_SAME_ACTION_AND_VNF_ID = "1410";
+
+    public static final String ERROR_FROM_BPEL = "2000";
+    public static final String NO_COMMUNICATION_TO_BPEL = "2010";
+    public static final String NO_RESPONSE_FROM_BPEL = "2020";
+
+    public static final String COULD_NOT_WRITE_TO_REQUESTS_DB = "4000";
+    public static final String NO_COMMUNICATION_TO_REQUESTS_DB = "4010";
+    public static final String NO_COMMUNICATION_TO_CATALOG_DB = "4020";
+    public static final String ERROR_FROM_CATALOG_DB = "4030";
+
+    public static final String ERROR_FROM_SDNC = "5300";
+    public static final String NO_COMMUNICATION_TO_SDNC = "5310";
+    public static final String NO_RESPONSE_FROM_SDNC = "5320";
+
+    public static final String NO_COMMUNICATION_TO_SDNC_ADAPTER = "7000";
+    public static final String NO_RESPONSE_FROM_SDNC_ADAPTER = "7010";
+    public static final String ERROR_FROM_SDNC_ADAPTER = "7020";
+    
+    public static final String SVC_GENERAL_SERVICE_ERROR = "SVC0001";
+    public static final String SVC_BAD_PARAMETER = "SVC0002";
+    public static final String SVC_NO_SERVER_RESOURCES = "SVC1000";
+    public static final String SVC_DETAILED_SERVICE_ERROR = "SVC2000";
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/LSInputImpl.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/LSInputImpl.java
new file mode 100644 (file)
index 0000000..ea26d25
--- /dev/null
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+
+import java.io.InputStream;
+import java.io.Reader;
+
+import org.w3c.dom.ls.LSInput;
+
+public class LSInputImpl implements LSInput {
+
+    protected String fPublicId;
+    protected String fSystemId;
+    protected String fBaseSystemId;
+    protected InputStream fByteStream;
+    protected Reader fCharStream;
+    protected String fData;
+    protected String fEncoding;
+    protected boolean fCertifiedText;
+
+    public LSInputImpl () {
+    }
+
+    @Override
+    public InputStream getByteStream () {
+        return fByteStream;
+    }
+
+    @Override
+    public void setByteStream (InputStream byteStream) {
+        fByteStream = byteStream;
+    }
+
+    @Override
+    public Reader getCharacterStream () {
+        return fCharStream;
+    }
+
+    @Override
+    public void setCharacterStream (Reader characterStream) {
+        fCharStream = characterStream;
+    }
+
+    @Override
+    public String getStringData () {
+        return fData;
+    }
+
+    @Override
+    public void setStringData (String stringData) {
+        fData = stringData;
+    }
+
+    @Override
+    public String getEncoding () {
+        return fEncoding;
+    }
+
+    @Override
+    public void setEncoding (String encoding) {
+        fEncoding = encoding;
+    }
+
+    @Override
+    public String getPublicId () {
+        return fPublicId;
+    }
+
+    @Override
+    public void setPublicId (String publicId) {
+        fPublicId = publicId;
+    }
+
+    @Override
+    public String getSystemId () {
+        return fSystemId;
+    }
+
+    @Override
+    public void setSystemId (String systemId) {
+        fSystemId = systemId;
+    }
+
+    @Override
+    public String getBaseURI () {
+        return fBaseSystemId;
+    }
+
+    @Override
+    public void setBaseURI (String baseURI) {
+        fBaseSystemId = baseURI;
+    }
+
+    @Override
+    public boolean getCertifiedText () {
+        return fCertifiedText;
+    }
+
+    @Override
+    public void setCertifiedText (boolean certifiedText) {
+        fCertifiedText = certifiedText;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/PathResourceResolver.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/PathResourceResolver.java
new file mode 100644 (file)
index 0000000..ec1e1ae
--- /dev/null
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSResourceResolver;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+public class PathResourceResolver implements LSResourceResolver {
+       
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH);
+
+    private String path;
+       
+    public PathResourceResolver(String path) {
+       
+       this.path = path;
+    }
+    
+    @Override
+    public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
+        LSInputImpl input = new LSInputImpl();
+        InputStream stream = null;
+               try {
+                       stream = new FileInputStream(path + systemId);
+               } catch (FileNotFoundException e) {
+                   msoLogger.debug ("Could not resolve resource based on file: " + path + systemId, e);
+               }
+        input.setPublicId(publicId);
+        input.setSystemId(systemId);
+        input.setBaseURI(baseURI);
+        input.setCharacterStream(new InputStreamReader(stream));
+        return input;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java
new file mode 100644 (file)
index 0000000..0b796d5
--- /dev/null
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.util.Properties;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.utils.CryptoUtils;
+
+public abstract class RequestClient {
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH);
+       protected MsoJavaProperties props;
+       protected String url;
+       protected HttpClient client;
+       private int type;
+       
+       public RequestClient(int type){
+               this.type = type;
+       }
+       
+       public void setProps(MsoJavaProperties props) {
+               this.props = props;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+       
+       public String getUrl() {
+               return url;
+       }
+
+       public int getType(){
+               return type;
+       }
+
+       public HttpClient getClient() {
+               return client;
+       }
+
+       public void setClient(HttpClient client) {
+               this.client = client;
+       }
+
+       public abstract HttpResponse post(String request, String requestId, String requestTimeout, String schemaVersion, String serviceInstanceId, String action) throws ClientProtocolException, IOException;
+
+       public abstract HttpResponse post(String request) throws ClientProtocolException, IOException;
+       
+       public abstract HttpResponse post(String requestId, boolean isBaseVfModule,
+                       int recipeTimeout, String requestAction, String serviceInstanceId,
+                       String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+                       String serviceType, String vnfType, String vfModuleType, String networkType,
+                       String requestDetails)
+                                       throws ClientProtocolException, IOException;
+       
+       protected String getEncryptedPropValue (String prop, String defaultValue, String encryptionKey) {
+                try {
+                        String result = CryptoUtils.decrypt(prop, encryptionKey);
+                        return result;
+                }      
+                catch (GeneralSecurityException e) {
+                        msoLogger.debug("Security exception", e);
+                }
+                return defaultValue;
+        }
+
+       
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClientFactory.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClientFactory.java
new file mode 100644 (file)
index 0000000..9dc43c7
--- /dev/null
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+
+import java.util.Properties;
+
+import org.apache.http.impl.client.DefaultHttpClient;
+
+import org.openecomp.mso.properties.MsoJavaProperties;
+
+public class RequestClientFactory {
+       
+       //based on URI, returns BPEL or Camunda client
+       public static RequestClient getRequestClient(String orchestrationURI, MsoJavaProperties props) throws IllegalStateException{
+               RequestClient retClient;
+               if(props ==null){
+                       throw new IllegalStateException("properties is null");
+               }
+               String url = null;
+               if(orchestrationURI.contains(CommonConstants.BPEL_SEARCH_STR)){
+                       url = props.getProperty(CommonConstants.BPEL_URL,null) + orchestrationURI;
+                       retClient= new BPELRestClient();
+                       
+               }else{
+                       url = props.getProperty(CommonConstants.CAMUNDA_URL,null) + orchestrationURI;
+                       retClient = new CamundaClient();
+               }
+               retClient.setClient(new DefaultHttpClient());
+               retClient.setProps(props);
+               retClient.setUrl(url);
+               return retClient;
+               
+       }
+       
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java
new file mode 100644 (file)
index 0000000..2edf686
--- /dev/null
@@ -0,0 +1,173 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+
+import java.io.IOException;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.util.EntityUtils;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import org.openecomp.mso.apihandler.camundabeans.CamundaResponse;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+
+public class ResponseHandler {
+
+       private CamundaResponse response;
+       private int status;
+       private String responseBody="";
+       private HttpResponse httpResponse;
+       private int type;
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH);
+
+       public ResponseHandler(HttpResponse httpResponse, int type) {
+               this.httpResponse = httpResponse;
+               this.type=type;
+               parseResponse();
+       }
+
+
+       private void parseResponse() {
+               int statusCode = httpResponse.getStatusLine().getStatusCode();
+               msoLogger.debug("Returned status  is: " + statusCode);
+               status = setStatus(statusCode);
+               msoLogger.debug("Parsed status  is: " + status);
+               if(type==CommonConstants.CAMUNDA){
+                       parseCamunda();
+               }else{
+                       parseBpel();
+               }
+               
+       }
+       
+
+       
+       private void parseCamunda(){
+               try{
+                               HttpEntity entity = httpResponse.getEntity();
+                               responseBody = EntityUtils.toString(entity);
+                       } catch (IOException e) {
+                               msoLogger.debug("IOException getting Camunda response body", e);
+                       }
+               
+                       ObjectMapper mapper = new ObjectMapper(); 
+                       try {
+                               response = mapper.readValue(responseBody, CamundaResponse.class);
+                       } catch (IOException e) {
+                               msoLogger.debug("IOException getting Camunda response body", e);
+                       }
+                       msoLogger.debug("json response is: " + responseBody);
+                       if(response!=null){
+                               responseBody = response.getResponse();
+                       }
+                       msoLogger.debug("response body is: " + responseBody);
+                       
+               
+               if(status!=HttpStatus.SC_ACCEPTED){
+                       msoLogger.error(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, "Camunda", String.valueOf(status), responseBody, "Camunda", "parseCamunda", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH from Camunda");
+               }
+       }
+       
+       private void parseBpel(){
+
+               HttpEntity bpelEntity = httpResponse.getEntity();
+
+               try {
+                       if (bpelEntity!=null) {
+                               responseBody = EntityUtils.toString(bpelEntity);
+                               msoLogger.debug("response body is: " + responseBody);
+
+                       }
+                       if(status!=HttpStatus.SC_ACCEPTED){
+                               msoLogger.error(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER, "BPEL", String.valueOf(status), responseBody, "BPEL", "parseBpel", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH from BPEL");
+                       }
+               } 
+               catch (IOException e) {
+                       msoLogger.debug("IOException getting BPEL response body", e);
+               }
+       }
+       
+
+
+
+       private int setStatus(int statusCode){
+               int status = 0;
+               switch(statusCode) {
+               case HttpStatus.SC_ACCEPTED:
+               case HttpStatus.SC_OK:
+                       status = HttpStatus.SC_ACCEPTED;
+                       break;
+               case HttpStatus.SC_BAD_REQUEST:
+                       status = HttpStatus.SC_BAD_REQUEST;
+                       break;
+               case HttpStatus.SC_UNAUTHORIZED:
+               case HttpStatus.SC_FORBIDDEN:
+                       status = HttpStatus.SC_INTERNAL_SERVER_ERROR;
+                       break;
+               case HttpStatus.SC_NOT_FOUND:
+                       status = HttpStatus.SC_NOT_IMPLEMENTED;
+                       break;
+               case HttpStatus.SC_INTERNAL_SERVER_ERROR:
+                       status = HttpStatus.SC_BAD_GATEWAY;
+                       break;
+               case HttpStatus.SC_SERVICE_UNAVAILABLE:
+                       status = HttpStatus.SC_SERVICE_UNAVAILABLE;
+                       break;
+               default:
+                       status = HttpStatus.SC_INTERNAL_SERVER_ERROR;
+                       break;
+               }
+               return status;
+       }
+
+
+       public CamundaResponse getResponse() {
+               return response;
+       }
+
+
+       public void setResponse(CamundaResponse response) {
+               this.response = response;
+       }
+
+
+       public String getResponseBody() {
+               return responseBody;
+       }
+
+
+       public void setResponseBody(String responseBody) {
+               this.responseBody = responseBody;
+       }
+
+
+       public int getStatus() {
+               return status;
+       }
+
+
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ValidationException.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ValidationException.java
new file mode 100644 (file)
index 0000000..0136a2d
--- /dev/null
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+
+public class ValidationException extends Exception {
+
+    /**
+     * This class simply extends Exception (without addition additional functionality)
+     * to provide an identifier for RequestsDB related exceptions on create, delete, query.
+     * 
+     *
+     **/
+
+    private static final long serialVersionUID = 1L;
+    private static final String validationFailMessage = "No valid $ELEMENT is specified";
+
+    public ValidationException (String msg) {
+        super (validationFailMessage.replaceAll ("\\$ELEMENT", msg));
+    }
+
+    public ValidationException (String msg, Exception cause) {
+        super (validationFailMessage.replaceAll ("\\$ELEMENT", msg), cause);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java
new file mode 100644 (file)
index 0000000..bd73b22
--- /dev/null
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandler.common;
+
+
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import javax.xml.XMLConstants;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import org.apache.commons.io.IOUtils;
+import org.xml.sax.SAXException;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+
+public class XMLValidator {
+
+    private static String XSDS_PATH;
+
+    static {
+        String prefixMsoPropertiesPath = System.getProperty ("mso.config.path");
+        if (prefixMsoPropertiesPath == null) {
+            prefixMsoPropertiesPath = "";
+        }
+        XSDS_PATH = prefixMsoPropertiesPath + "xsds/";
+    }
+
+    private String stringXsd;
+    private String errorMsg = null;
+    private SchemaFactory factory;
+    private Schema schema;
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+
+    public XMLValidator (String xsdFile) {
+
+        try (FileInputStream xsdStream = new FileInputStream (XSDS_PATH + xsdFile)) {
+
+            stringXsd = IOUtils.toString (xsdStream);
+
+            factory = SchemaFactory.newInstance (XMLConstants.W3C_XML_SCHEMA_NS_URI);
+            factory.setResourceResolver ((new PathResourceResolver (XSDS_PATH)));
+            factory.setFeature (XMLConstants.FEATURE_SECURE_PROCESSING, true);
+
+            String quotedXsd = stringXsd.replaceAll ("&#34;", "\"");
+            Source src = new StreamSource (new java.io.StringReader (quotedXsd));
+            schema = factory.newSchema (src);
+
+        } catch (IOException | SAXException e) {
+            msoLogger.debug ("Cannot open file " + XSDS_PATH + xsdFile, e);
+            errorMsg = "ErrorDetails: xsd file " + xsdFile + "could not be opened - " + e.getMessage ();
+        }
+    }
+
+    // Returns null when XML valid, otherwise returns error details.
+    public String isXmlValid (String stringXml) {
+        try {
+            if (errorMsg != null && !errorMsg.isEmpty ()) {
+                return errorMsg;
+            }
+            Source src2 = new StreamSource (new java.io.StringReader (stringXml));
+            Validator validator = schema.newValidator ();
+            validator.validate (src2);
+
+        } catch (IOException | SAXException e) {
+            msoLogger.debug ("Exception: ", e);
+            return ("ErrorDetails: " + e.getMessage ());
+
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_CANNOT_READ_SCHEMA, "", "", MsoLogger.ErrorCode.SchemaError, "APIH cannot read schema file", e);
+            alarmLogger.sendAlarm ("MsoConfigurationError", MsoAlarmLogger.CRITICAL, "Unable to read the schema file");
+            return "ErrorDetails: " + "Unable to read the schema file";
+        }
+
+        return null;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/package-info.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/package-info.java
new file mode 100644 (file)
index 0000000..790edd3
--- /dev/null
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+/**
+ * Common classes for API Handlers.
+ */
+package org.openecomp.mso.apihandler.common;
+
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/BPELRestClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/BPELRestClientTest.java
new file mode 100644 (file)
index 0000000..46e3a46
--- /dev/null
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.camunda.tests;
+
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+import org.openecomp.mso.apihandler.common.RequestClient;
+import org.openecomp.mso.apihandler.common.RequestClientFactory;
+import org.openecomp.mso.properties.MsoJavaProperties;
+
+
+/**
+ * This class implements test methods of Camunda Beans.
+ * 
+ *
+ */
+public class BPELRestClientTest {
+
+
+
+       @Mock
+       private HttpClient mockHttpClient;
+
+       @Before
+       public void setUp() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       @Test
+       public void tesBPELPost() throws JsonGenerationException,
+       JsonMappingException, IOException {
+
+
+               String responseBody ="<layer3activate:service-response xmlns:layer3activate=\"http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1\""
+                                                                                               + "xmlns:reqtype=\"http://ecomp.att.com/mso/request/types/v1\""
+                                                                                               + "xmlns:aetgt=\"http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd\""
+                                                                                               + "xmlns:types=\"http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd\">"
+                                                                                               + "<reqtype:request-id>req5</reqtype:request-id>"
+                                                                                               + "<reqtype:request-action>Layer3ServiceActivateRequest</reqtype:request-action>"
+                                                                                               + "<reqtype:source>OMX</reqtype:source>"
+                                                                                               + "<reqtype:ack-final-indicator>n</reqtype:ack-final-indicator>"
+                                                                                               + "</layer3activate:service-response>";
+               
+               HttpResponse mockResponse = createResponse(200, responseBody);
+               mockHttpClient = Mockito.mock(HttpClient.class);
+               Mockito.when(mockHttpClient.execute(Mockito.any(HttpPost.class)))
+               .thenReturn(mockResponse);
+
+               String reqXML = "<xml>test</xml>";
+               String orchestrationURI = "/active-bpel/services/REST/MsoLayer3ServiceActivate";
+
+               MsoJavaProperties props = new MsoJavaProperties();
+               props.setProperty(CommonConstants.BPEL_URL, "http://localhost:8089");
+               props.setProperty("bpelAuth", "786864AA53D0DCD881AED1154230C0C3058D58B9339D2EFB6193A0F0D82530E1");
+
+               RequestClient requestClient = RequestClientFactory.getRequestClient(orchestrationURI, props);
+               requestClient.setClient(mockHttpClient);
+               HttpResponse response = requestClient.post(reqXML, "reqId", "timeout", "version", null, null);
+
+
+               int statusCode = response.getStatusLine().getStatusCode();
+               assertEquals(requestClient.getType(), CommonConstants.BPEL);
+               assertEquals(statusCode, HttpStatus.SC_OK);
+
+
+       }
+
+       private HttpResponse createResponse(int respStatus, 
+                       String respBody) {
+               HttpResponse response = new BasicHttpResponse(
+                               new BasicStatusLine(
+                                               new ProtocolVersion("HTTP", 1, 1), respStatus, ""));
+               response.setStatusCode(respStatus);
+               try {
+                       response.setEntity(new StringEntity(respBody));
+                       response.setHeader("Content-Type", "text/xml");
+               } catch (Exception e) {
+                       e.printStackTrace();
+               }
+               return response;
+       }
+
+
+
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java
new file mode 100644 (file)
index 0000000..d8c0e52
--- /dev/null
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.camunda.tests;
+
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import java.util.Properties;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+
+import org.openecomp.mso.apihandler.common.CommonConstants;
+import org.openecomp.mso.apihandler.common.RequestClient;
+import org.openecomp.mso.apihandler.common.RequestClientFactory;
+import org.openecomp.mso.properties.MsoJavaProperties;
+
+
+/**
+ * This class implements test methods of Camunda Beans.
+ *
+ *
+ */
+public class CamundaClientTest {
+
+
+
+    @Mock
+    private HttpClient mockHttpClient;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @Test
+    public void tesCamundaPost() throws JsonGenerationException,
+    JsonMappingException, IOException {
+
+
+        String responseBody ="{\"links\":[{\"method\":\"GET\",\"href\":\"http://localhost:9080/engine-rest/process-instance/2047c658-37ae-11e5-9505-7a1020524153\",\"rel\":\"self\"}],\"id\":\"2047c658-37ae-11e5-9505-7a1020524153\",\"definitionId\":\"dummy:10:73298961-37ad-11e5-9505-7a1020524153\",\"businessKey\":null,\"caseInstanceId\":null,\"ended\":true,\"suspended\":false}";
+
+        HttpResponse mockResponse = createResponse(200, responseBody);
+        mockHttpClient = Mockito.mock(HttpClient.class);
+        Mockito.when(mockHttpClient.execute(Mockito.any(HttpPost.class)))
+        .thenReturn(mockResponse);
+
+        String reqXML = "<xml>test</xml>";
+        String orchestrationURI = "/engine-rest/process-definition/key/dummy/start";
+
+        MsoJavaProperties props = new MsoJavaProperties();
+        props.setProperty(CommonConstants.CAMUNDA_URL, "http://localhost:8089");
+
+        RequestClient requestClient = RequestClientFactory.getRequestClient(orchestrationURI, props);
+        requestClient.setClient(mockHttpClient);
+        HttpResponse response = requestClient.post(reqXML, "reqId", "timeout", "version", null, null);
+
+
+        int statusCode = response.getStatusLine().getStatusCode();
+        assertEquals(requestClient.getType(), CommonConstants.CAMUNDA);
+        assertEquals(statusCode, HttpStatus.SC_OK);
+
+        props.setProperty (CommonConstants.CAMUNDA_AUTH, "ABCD1234");
+        requestClient = RequestClientFactory.getRequestClient(orchestrationURI, props);
+        requestClient.setClient(mockHttpClient);
+        response = requestClient.post(null, "reqId", null, null, null, null);
+        assertEquals(requestClient.getType(), CommonConstants.CAMUNDA);
+        assertEquals(statusCode, HttpStatus.SC_OK);
+    }
+
+    private HttpResponse createResponse(int respStatus,
+                                        String respBody) {
+        HttpResponse response = new BasicHttpResponse(
+                                                      new BasicStatusLine(
+                                                                          new ProtocolVersion("HTTP", 1, 1), respStatus, ""));
+        response.setStatusCode(respStatus);
+        try {
+            response.setEntity(new StringEntity(respBody));
+            response.setHeader("Content-Type", "application/json");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return response;
+    }
+
+
+
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaRequestTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaRequestTest.java
new file mode 100644 (file)
index 0000000..bd2fee6
--- /dev/null
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.camunda.tests;
+
+
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+import org.junit.Test;
+
+import org.openecomp.mso.apihandler.camundabeans.CamundaInput;
+import org.openecomp.mso.apihandler.camundabeans.CamundaRequest;
+import org.openecomp.mso.apihandler.common.CommonConstants;
+
+/**
+ * This class implements test methods of Camunda Beans.
+ * 
+ *
+ */
+public class CamundaRequestTest {
+
+       @Test
+       public final void testSerialization() throws JsonGenerationException,
+                       JsonMappingException, IOException {
+               CamundaRequest camundaRequest = new CamundaRequest();
+               CamundaInput camundaInput = new CamundaInput();
+               CamundaInput host = new CamundaInput();
+               CamundaInput schema = new CamundaInput();
+               CamundaInput reqid = new CamundaInput();
+               CamundaInput svcid = new CamundaInput();
+               CamundaInput timeout = new CamundaInput();
+               camundaInput
+                               .setValue("<aetgt:CreateTenantRequest xmlns:aetgt=\"http://ecomp.att.com/mso/workflow/schema/v1\" xmlns:sdncadapterworkflow=\"http://ecomp.att.com/mso/workflow/schema/v1\" xmlns:ns5=\"http://ecomp.att.com/mso/request/types/v1\"> <msoservtypes:request-information xmlns:msoservtypes=\"http://ecomp.att.com/mso/request/types/v1\"><msoservtypes:request-id>155415ab-b4a7-4382-b4c6-d17d950604</msoservtypes:request-id><msoservtypes:request-action>Layer3ServiceActivateRequest</msoservtypes:request-action><msoservtypes:source>OMX</msoservtypes:source><msoservtypes:notification-url>https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws</msoservtypes:notification-url><msoservtypes:order-number>5051563</msoservtypes:order-number><msoservtypes:order-version>1</msoservtypes:order-version> </msoservtypes:request-information> <msoservtypes:service-information xmlns:msoservtypes=\"http://ecomp.att.com/mso/request/types/v1\"><msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type><msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id><msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> <sdncadapterworkflow:cloudId>MTSNJA4LCP1</sdncadapterworkflow:cloudId> </aetgt:CreateTenantRequest>");
+               camundaRequest.setServiceInput(camundaInput);
+               host.setValue("localhost");
+               camundaRequest.setHost(host);
+               schema.setValue("v1");
+               camundaRequest.setSchema(schema);
+               reqid.setValue("reqid123");
+               camundaRequest.setReqid(reqid);
+               svcid.setValue("svcid123");
+               camundaRequest.setSvcid(svcid);
+               timeout.setValue("");
+               camundaRequest.setTimeout(timeout);
+               ObjectMapper mapper = new ObjectMapper();
+               mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
+
+               String json = mapper.writeValueAsString(camundaRequest);
+               System.out.println(json);
+               assertEquals(
+                               "{\"variables\":{\""+CommonConstants.CAMUNDA_SERVICE_INPUT+"\":{\"value\":\"<aetgt:CreateTenantRequest xmlns:aetgt=\\\"http://ecomp.att.com/mso/workflow/schema/v1\\\" xmlns:sdncadapterworkflow=\\\"http://ecomp.att.com/mso/workflow/schema/v1\\\" xmlns:ns5=\\\"http://ecomp.att.com/mso/request/types/v1\\\"> <msoservtypes:request-information xmlns:msoservtypes=\\\"http://ecomp.att.com/mso/request/types/v1\\\"><msoservtypes:request-id>155415ab-b4a7-4382-b4c6-d17d950604</msoservtypes:request-id><msoservtypes:request-action>Layer3ServiceActivateRequest</msoservtypes:request-action><msoservtypes:source>OMX</msoservtypes:source><msoservtypes:notification-url>https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws</msoservtypes:notification-url><msoservtypes:order-number>5051563</msoservtypes:order-number><msoservtypes:order-version>1</msoservtypes:order-version> </msoservtypes:request-information> <msoservtypes:service-information xmlns:msoservtypes=\\\"http://ecomp.att.com/mso/request/types/v1\\\"><msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type><msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id><msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> <sdncadapterworkflow:cloudId>MTSNJA4LCP1</sdncadapterworkflow:cloudId> </aetgt:CreateTenantRequest>\",\"type\":\"String\"}" +
+                               ",\"host\":{\"value\":\"localhost\",\"type\":\"String\"},\"att-mso-schema-version\":{\"value\":\"v1\",\"type\":\"String\"},\"att-mso-request-id\":{\"value\":\"reqid123\",\"type\":\"String\"},\"att-mso-service-instance-id\":{\"value\":\"svcid123\",\"type\":\"String\"},\"att-mso-service-request-timeout\":{\"value\":\"\",\"type\":\"String\"}}}",
+                               json);
+
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaResponseTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaResponseTest.java
new file mode 100644 (file)
index 0000000..aff8ab2
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.camunda.tests;
+
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.DeserializationConfig;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.junit.Test;
+
+import org.openecomp.mso.apihandler.camundabeans.CamundaResponse;
+
+/**
+ * This class implements test methods of Camunda Beans.
+ * 
+ *
+ */
+public class CamundaResponseTest {
+
+       @Test
+       public final void testDeserialization() throws JsonGenerationException,
+                       JsonMappingException, IOException {
+               ObjectMapper mapper = new ObjectMapper(); // can reuse, share globally
+               mapper.enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+               
+               String responseBody = "{ \"response\": \"<xml>xml</xml>\","+
+                                 "\"messageCode\": 200,"+
+                                 "\"message\": \"Successfully started the process\"," +
+                                 "\"processInstanceID\":null,\"variables\":null}";
+       
+               CamundaResponse response = mapper.readValue(responseBody, CamundaResponse.class);
+               assertEquals(response.toString(), "CamundaResponse [response=<xml>xml</xml>, messageCode=200, message=Successfully started the process]");
+
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/ResponseHandlerTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/ResponseHandlerTest.java
new file mode 100644 (file)
index 0000000..ba2c552
--- /dev/null
@@ -0,0 +1,131 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.camunda.tests;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.junit.Test;
+
+import org.openecomp.mso.apihandler.common.ResponseHandler;
+
+/**
+ * This class implements test methods of CamundaResoponseHandler.
+ * 
+ *
+ */
+public class ResponseHandlerTest {
+
+    @Test
+    public void tesParseCamundaResponse () throws JsonGenerationException, JsonMappingException, IOException {
+        // String body
+        // ="{\"links\":[{\"method\":\"GET\",\"href\":\"http://localhost:9080/engine-rest/process-instance/2047c658-37ae-11e5-9505-7a1020524153\",\"rel\":\"self\"}],\"id\":\"2047c658-37ae-11e5-9505-7a1020524153\",\"definitionId\":\"dummy:10:73298961-37ad-11e5-9505-7a1020524153\",\"businessKey\":null,\"caseInstanceId\":null,\"ended\":true,\"suspended\":false}";
+
+        String body = "{ \"response\": \"<xml>xml</xml>\"," + "\"messageCode\": 200,"
+                      + "\"message\": \"Successfully started the process\"}";
+
+        HttpResponse response = createResponse (200, body, "application/json");
+
+        ResponseHandler respHandler = new ResponseHandler (response, 1);
+
+        int status = respHandler.getStatus ();
+        assertEquals (status, HttpStatus.SC_ACCEPTED);
+        assertEquals (respHandler.getResponse ().getMessage (), "Successfully started the process");
+
+    }
+
+    @Test
+    public void tesParseBpelResponse () throws JsonGenerationException, JsonMappingException, IOException {
+        String body = "<layer3activate:service-response xmlns:layer3activate=\"http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1\""
+                      + "xmlns:reqtype=\"http://ecomp.att.com/mso/request/types/v1\""
+                      + "xmlns:aetgt=\"http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd\""
+                      + "xmlns:types=\"http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd\">"
+                      + "<reqtype:request-id>req5</reqtype:request-id>"
+                      + "<reqtype:request-action>Layer3ServiceActivateRequest</reqtype:request-action>"
+                      + "<reqtype:source>OMX</reqtype:source>"
+                      + "<reqtype:ack-final-indicator>n</reqtype:ack-final-indicator>"
+                      + "</layer3activate:service-response>";
+
+        HttpResponse response = createResponse (200, body, "text/xml");
+
+        ResponseHandler respHandler = new ResponseHandler (response, 0);
+
+        int status = respHandler.getStatus ();
+        assertEquals (status, HttpStatus.SC_ACCEPTED);
+        assertTrue (respHandler.getResponseBody () != null);
+    }
+
+    @Test
+    public void tes404ErrorResponse () throws JsonGenerationException, JsonMappingException, IOException {
+
+       
+        HttpResponse response = createResponse (HttpStatus.SC_NOT_FOUND, "<html>error</html>", "text/html");
+        ResponseHandler respHandler = new ResponseHandler (response, 1);
+
+        int status = respHandler.getStatus ();
+
+        assertEquals (HttpStatus.SC_NOT_IMPLEMENTED, status);
+
+    }
+
+    @Test
+    public void tesGenricErrorResponse () throws JsonGenerationException, JsonMappingException, IOException {
+
+        String body = "{ \"response\": \"<xml>xml</xml>\"," + "\"messageCode\": 500,"
+                      + "\"message\": \"Something went wrong\"}";
+
+        HttpResponse response = createResponse (500, body, "application/json");
+
+        ResponseHandler respHandler = new ResponseHandler (response, 1);
+
+        int status = respHandler.getStatus ();
+        assertEquals (HttpStatus.SC_BAD_GATEWAY, status);
+        assertEquals (respHandler.getResponse ().getMessage (), "Something went wrong");
+        System.out.println (respHandler.getResponseBody ());
+
+    }
+
+    private HttpResponse createResponse (int respStatus, String respBody, String contentType) {
+        HttpResponse response = new BasicHttpResponse (new BasicStatusLine (new ProtocolVersion ("HTTP", 1, 1),
+                                                                            respStatus,
+                                                                            ""));
+        response.setStatusCode (respStatus);
+        try {
+            response.setEntity (new StringEntity (respBody));
+            response.setHeader ("Content-Type", contentType);
+        } catch (Exception e) {
+            e.printStackTrace ();
+        }
+        return response;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/resources/logback-test.xml b/mso-api-handlers/mso-api-handler-common/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..d2c1719
--- /dev/null
@@ -0,0 +1,48 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+  
+  
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/mso-api-handlers/mso-api-handler-infra/WebContent/META-INF/MANIFEST.MF b/mso-api-handlers/mso-api-handler-infra/WebContent/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..5e94951
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0\r
+Class-Path: \r
+\r
diff --git a/mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/beans.xml b/mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/beans.xml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/jboss-deployment-structure.xml b/mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/jboss-deployment-structure.xml
new file mode 100644 (file)
index 0000000..88d5024
--- /dev/null
@@ -0,0 +1,17 @@
+<jboss-deployment-structure>\r
+       <deployment>\r
+               <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->\r
+               <exclusions>\r
+                       <module name="org.apache.log4j" />\r
+                       <module name="org.slf4j" />\r
+                       <module name="org.slf4j.impl" />\r
+               </exclusions>\r
+               <dependencies>\r
+                           <module name="org.jboss.jandex" slot="main" />\r
+                <module name="org.javassist" slot="main" />\r
+                <module name="org.antlr" slot="main" />\r
+                <module name="org.dom4j" slot="main" />\r
+               </dependencies>\r
+       </deployment>\r
+</jboss-deployment-structure>\r
+\r
diff --git a/mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/jboss-web.xml b/mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/jboss-web.xml
new file mode 100644 (file)
index 0000000..e1023bf
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<jboss-web>\r
+    <context-root>ecomp/mso/infra</context-root>\r
+    <security-domain>other</security-domain>\r
+</jboss-web>
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/web.xml b/mso-api-handlers/mso-api-handler-infra/WebContent/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..e34740d
--- /dev/null
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">\r
+  <display-name>MSO API Handler Infra</display-name>\r
\r
\r
+   <context-param>\r
+       <param-name>resteasy.jndi.resources</param-name>\r
+       <param-value>java:module/MsoPropertiesFactory</param-value>\r
+   </context-param>\r
\r
+   <!-- enable the Asynchronous Job Service -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.enabled</param-name>\r
+        <param-value>true</param-value>\r
+    </context-param>\r
+\r
+    <!-- The next context parameters are all optional.  \r
+         Their default values are shown as example param-values -->\r
+\r
+    <!-- How many jobs results can be held in memory at once? -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.max.job.results</param-name>\r
+        <param-value>100</param-value>\r
+    </context-param>\r
+\r
+    <!-- Maximum wait time on a job when a client is querying for it -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.max.wait</param-name>\r
+        <param-value>300000</param-value>\r
+    </context-param>\r
+\r
+    <!-- Thread pool size of background threads that run the job -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.thread.pool.size</param-name>\r
+        <param-value>100</param-value>\r
+    </context-param>\r
+\r
+    <!-- Set the base path for the Job uris -->\r
+    <context-param>\r
+        <param-name>resteasy.async.job.service.base.path</param-name>\r
+        <param-value>/asynch/jobs</param-value>\r
+    </context-param>\r
+  <context-param>\r
+    <param-name>resteasy.scan</param-name>\r
+    <param-value>true</param-value>\r
+  </context-param>\r
\r
+  <!--  \r
+  <context-param>\r
+    <param-name>resteasy.servlet.mapping.prefix</param-name>\r
+    <param-value>/v1</param-value>\r
+  </context-param>\r
+  -->\r
+   <context-param>\r
+       <param-name>log.configuration</param-name>\r
+       <param-value>logback.apihandler-infra.xml</param-value>\r
+  </context-param>\r
+  \r
+  <context-param>\r
+       <param-name>mso.configuration</param-name>\r
+       <param-value>MSO_PROP_APIHANDLER_INFRA=mso.apihandler-infra.properties,MSO_PROP_TOPOLOGY=topology.properties</param-value>\r
+  </context-param>\r
+  \r
+  <context-param>\r
+    <param-name>resteasy.resources</param-name>\r
+    <param-value>org.openecomp.mso.logger.MsoLoggingServlet</param-value>\r
+  </context-param>\r
+  \r
+  <listener>\r
+    <listener-class>\r
+                       org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap\r
+       </listener-class>\r
+  </listener>\r
+  <servlet>\r
+    <servlet-name>msoapihandler-infra-servlet</servlet-name>\r
+    <servlet-class>\r
+                       org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher\r
+               </servlet-class>\r
+  </servlet>\r
+  <servlet-mapping>\r
+    <servlet-name>msoapihandler-infra-servlet</servlet-name>\r
+    <url-pattern>/*</url-pattern>\r
+  </servlet-mapping>\r
+\r
+  <security-constraint>\r
+    <web-resource-collection>\r
+      <web-resource-name>HealthcheckNoAuth</web-resource-name>\r
+      <description>No Authentication for Healthcheck</description>\r
+      <url-pattern>/healthcheck</url-pattern>\r
+        <url-pattern>/nodehealthcheck</url-pattern>\r
+        <url-pattern>/globalhealthcheck</url-pattern>\r
+      <http-method>GET</http-method>\r
+      <http-method>POST</http-method>\r
+      </web-resource-collection>\r
+   </security-constraint>\r
+    <security-constraint>\r
+        <web-resource-collection>\r
+            <web-resource-name>SiteStatus</web-resource-name>\r
+            <description>SiteStatus APIs</description>\r
+            <url-pattern>/setStatus/*</url-pattern>\r
+            <http-method>POST</http-method>\r
+        </web-resource-collection>\r
+        <auth-constraint>\r
+            <role-name>SiteControl-Client</role-name>\r
+        </auth-constraint>\r
+    </security-constraint>\r
+   <security-constraint>\r
+        <web-resource-collection>\r
+      <web-resource-name>HTTPBasicAuth</web-resource-name>\r
+      <description>Authentication for Infra Portal</description>\r
+      <url-pattern>/*</url-pattern>\r
+      <http-method>POST</http-method>\r
+      <http-method>GET</http-method>\r
+     </web-resource-collection>\r
+      <auth-constraint>\r
+       <role-name>InfraPortal-Client</role-name>\r
+     </auth-constraint>\r
+  </security-constraint>\r
\r
+  <login-config>\r
+       <auth-method>BASIC</auth-method>\r
+    <realm-name>ApplicationRealm</realm-name>\r
+  </login-config>\r
+  <security-role>\r
+    <role-name>InfraPortal-Client</role-name>\r
+  </security-role>\r
+    <security-role>\r
+        <role-name>SiteControl-Client</role-name>\r
+    </security-role>\r
+\r
+    <filter>\r
+               <filter-name>LogFilter</filter-name>\r
+               <filter-class>org.openecomp.mso.logger.LogFilter</filter-class> \r
+  </filter>\r
+    <filter-mapping>\r
+               <filter-name>LogFilter</filter-name>\r
+               <url-pattern>/*</url-pattern>\r
+       </filter-mapping>\r
+  \r
+</web-app>\r
diff --git a/mso-api-handlers/mso-api-handler-infra/WebContent/check.html b/mso-api-handlers/mso-api-handler-infra/WebContent/check.html
new file mode 100644 (file)
index 0000000..ea2f0e2
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE html>\r
+<html>\r
+<head>\r
+<meta charset="ISO-8859-1">\r
+<title>Health Check</title>\r
+</head>\r
+<body>\r
+Application ready\r
+</body>\r
+</html>\r
+\r
diff --git a/mso-api-handlers/mso-api-handler-infra/WebContent/index.xhtml b/mso-api-handlers/mso-api-handler-infra/WebContent/index.xhtml
new file mode 100644 (file)
index 0000000..f902af8
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \r
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml"\r
+    xmlns:ui="http://java.sun.com/jsf/facelets"\r
+    xmlns:h="http://java.sun.com/jsf/html"\r
+    xmlns:f="http://java.sun.com/jsf/core">\r
+\r
+<f:loadBundle basename="resources.application" var="msg"/>\r
+\r
+<head>\r
+    <title><h:outputText value="#{msg.welcomeTitle}" /></title>\r
+</head>\r
+\r
+<body>\r
+<h3><h:outputText value="#{msg.welcomeHeading}" /></h3>\r
+<p><h:outputText value="#{msg.welcomeMessage}" /></p>\r
+</body>\r
+</html>\r
diff --git a/mso-api-handlers/mso-api-handler-infra/pom.xml b/mso-api-handlers/mso-api-handler-infra/pom.xml
new file mode 100644 (file)
index 0000000..74ec57d
--- /dev/null
@@ -0,0 +1,108 @@
+<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.openecomp.mso</groupId>
+               <artifactId>mso-api-handlers</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+
+       <artifactId>mso-api-handler-infra</artifactId>
+
+       <name>mso-api-handler-infra</name>
+       <description>ECOMP MSO API Handler Infra</description>
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+       </properties>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.jboss.resteasy</groupId>
+                       <artifactId>resteasy-jaxrs</artifactId>
+                       <version>3.0.19.Final</version>
+                       <scope>provided</scope>
+                       <exclusions>
+                       <exclusion>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-api</artifactId>
+                       </exclusion>
+                       <exclusion>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-simple</artifactId>
+                       </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.httpcomponents</groupId>
+                                       <artifactId>httpclient</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <dependency>
+                       <groupId>javax</groupId>
+                       <artifactId>javaee-web-api</artifactId>
+                       <version>6.0</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.jboss.spec.javax.ejb</groupId>
+                       <artifactId>jboss-ejb-api_3.2_spec</artifactId>
+                       <version>1.0.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.ejb3</groupId>
+                       <artifactId>jboss-ejb3-ext-api</artifactId>
+                       <version>2.2.0.Final</version>
+                       <scope>provided</scope>
+               </dependency>   
+
+               <dependency>
+                       <groupId>javax.activation</groupId>
+                       <artifactId>activation</artifactId>
+                       <version>1.1.1</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <dependency> 
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-catalog-db</artifactId>
+                       <version>${project.version}</version>
+               </dependency> 
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-requests-db</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-api-handler-common</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>status-control</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+       </dependencies>
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+               
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.3</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                                       <attachClasses>true</attachClasses>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+       <packaging>war</packaging>
+</project>
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Action.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Action.java
new file mode 100644 (file)
index 0000000..8df4c87
--- /dev/null
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+/*
+ * Enum for Status values returned by API Handler to Tail-F
+*/
+public enum Action {
+       createInstance,
+       updateInstance,
+       deleteInstance,
+       configureInstance
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Constants.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Constants.java
new file mode 100644 (file)
index 0000000..34d739b
--- /dev/null
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+public class Constants {
+
+       public static final String VNF_TYPES_PATH = "/{version: v1|v2|v3}/vnf-types";
+       public static final String NETWORK_TYPES_PATH = "/{version: v1|v2|v3}/network-types";
+       public static final String VF_MODULE_MODEL_NAMES_PATH = "/{version: v2|v3}/vf-module-model-names";
+       public static final String REQUEST_ID_PATH = "/{request-id}";
+       
+       public static final String STATUS_SUCCESS = "SUCCESS";
+       
+       public static final String MODIFIED_BY_APIHANDLER = "APIH";
+       
+       public static final String SCHEMA_VERSION_V1 = "v1";
+       public static final String SCHEMA_VERSION_V2 = "v2";
+       public static final String SCHEMA_VERSION_V3 = "v3";
+       
+       public static final long PROGRESS_REQUEST_COMPLETED = 100L;
+       public static final long PROGRESS_REQUEST_RECEIVED = 0L;
+       public static final long PROGRESS_REQUEST_IN_PROGRESS = 20L;
+       
+       public static final String VNF_TYPE_WILDCARD = "*";
+       
+       public static final String VOLUME_GROUP_COMPONENT_TYPE = "VOLUME_GROUP";
+       
+       public static final String VALID_INSTANCE_NAME_FORMAT = "^[a-zA-Z][a-zA-Z0-9_-]*$";
+       
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/HealthcheckHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/HealthcheckHandler.java
new file mode 100644 (file)
index 0000000..0ae1695
--- /dev/null
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.core.Response;
+import org.openecomp.mso.HealthCheckUtils;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/")
+public class HealthcheckHandler {
+
+    public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    @HEAD
+    @GET
+    @Path("/healthcheck")
+    @Produces("text/html")
+    public Response healthcheck (@QueryParam("requestId") String requestId) {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("Healthcheck");
+        UUIDChecker.verifyOldUUID(requestId, msoLogger);
+        HealthCheckUtils healthCheck = new HealthCheckUtils ();
+        if (!healthCheck.siteStatusCheck(msoLogger, startTime)) {
+            return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+        }
+
+        if (!healthCheck.configFileCheck(msoLogger, startTime, MSO_PROP_APIHANDLER_INFRA)) {
+            return HealthCheckUtils.NOT_STARTED_RESPONSE;
+        }
+
+        if (!healthCheck.requestDBCheck (msoLogger, startTime)) {
+            return HealthCheckUtils.NOT_STARTED_RESPONSE;
+        }
+        msoLogger.debug("healthcheck - Successful");
+        return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+    }
+
+    @HEAD
+    @GET
+    @Path("/nodehealthcheck")
+    @Produces("text/html")
+    public Response nodeHealthcheck () {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("NodeHealthcheck");
+        // Generate a Request Id
+        String requestId = UUIDChecker.generateUUID(msoLogger);
+        HealthCheckUtils healthCheck = new HealthCheckUtils ();
+        if (!healthCheck.siteStatusCheck (msoLogger, startTime)) {
+            return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+        }
+
+        if (healthCheck.verifyNodeHealthCheck(HealthCheckUtils.NodeType.APIH, requestId)) {
+            msoLogger.debug("nodeHealthcheck - Successful");
+            return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+        } else {
+            msoLogger.debug("nodeHealthcheck - At leaset one of the sub-modules is not available.");
+            return  HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+        }
+    }
+
+    @HEAD
+    @GET
+    @Path("/globalhealthcheck")
+    @Produces("text/html")
+    public Response globalHealthcheck (@DefaultValue("true") @QueryParam("enableBpmn") boolean enableBpmn) {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("GlobalHealthcheck");
+        // Generate a Request Id
+        String requestId = UUIDChecker.generateUUID(msoLogger);
+        HealthCheckUtils healthCheck = new HealthCheckUtils ();
+        if (!healthCheck.siteStatusCheck (msoLogger, startTime)) {
+            return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+        }
+
+        if (healthCheck.verifyGlobalHealthCheck(enableBpmn, requestId)) {
+            msoLogger.debug("globalHealthcheck - Successful");
+            return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+        } else {
+            msoLogger.debug("globalHealthcheck - At leaset one of the sub-modules is not available");
+            return  HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+        }
+    } 
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/InfraUtils.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/InfraUtils.java
new file mode 100644 (file)
index 0000000..37cbb4d
--- /dev/null
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+
+import org.openecomp.mso.properties.MsoJavaProperties;
+
+public class InfraUtils {
+       public static boolean isActionAllowed(MsoJavaProperties props, String requestType, String version, String action) {
+                // Check for allowable actions
+        String actionsPropertyName = requestType + "." + version + ".ApiAllowableActions";
+        String allowableActions = props.getProperty(actionsPropertyName, null);
+        boolean actionAllowed = false;
+        if (allowableActions != null) {
+               String allowableActionsList[] = allowableActions.split(",");
+               for (int i=0; i<allowableActionsList.length; i++) {                     
+                       if (action.equals (allowableActionsList[i])) {
+                               actionAllowed = true;
+                               break;
+                       }
+               }
+        }
+        else {
+               actionAllowed = true;
+        }
+        return actionAllowed;
+       }
+       
+       // Checks if the name is acceptable for heat stack
+       public static boolean isValidHeatName(String name) {
+               if (name.matches("^[a-zA-Z][a-zA-Z0-9_\\.-]*$"))
+                       return true;
+               return false;
+       }
+       
+       
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java
new file mode 100644 (file)
index 0000000..cdccaf2
--- /dev/null
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+
+public class Messages {
+
+       public static final Map<String,String> errors = new HashMap<String,String>();
+       static {
+               errors.put(ErrorNumbers.REQUEST_FAILED_SCHEMA_VALIDATION + "_service", "Service request FAILED schema validation. %s");
+               errors.put(ErrorNumbers.REQUEST_FAILED_SCHEMA_VALIDATION + "_feature", "Feature request FAILED schema validation. %s");
+               errors.put(ErrorNumbers.RECIPE_DOES_NOT_EXIST, "Recipe for %s-type and action specified does not exist in catalog %s");
+               errors.put(ErrorNumbers.SERVICE_PARAMETERS_FAILED_SCHEMA_VALIDATION, "Service specific parameters passed in request FAILED schema validation. %s");
+               
+               errors.put(ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS, "%s-name (%s) is locked (status = %s) because already working on a CREATE request with same %s-name.");
+               errors.put(ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID, "%s-id (%s) is locked (status = %s) because already working on a request with same action (%s) for this %s-id.");
+               errors.put(ErrorNumbers.REQUEST_TIMED_OUT, "Service request timed out before completing");
+               errors.put(ErrorNumbers.ERROR_FROM_BPEL, "BPEL returned an error: %s");
+               errors.put(ErrorNumbers.NO_COMMUNICATION_TO_BPEL, "Could not communicate with BPEL %s");
+               errors.put(ErrorNumbers.NO_RESPONSE_FROM_BPEL, "No response from BPEL %s");
+               errors.put(ErrorNumbers.COULD_NOT_WRITE_TO_REQUESTS_DB, "Could not insert or update record in MSO_REQUESTS DB %s");
+               errors.put(ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB, "Could not communicate with MSO_REQUESTS DB %s");
+               errors.put(ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB, "Could not communicate with MSO_CATALOG DB %s");
+               errors.put(ErrorNumbers.ERROR_FROM_CATALOG_DB, "Received error from MSO_CATALOG DB %s");                
+       }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ModelType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ModelType.java
new file mode 100644 (file)
index 0000000..2f01c4f
--- /dev/null
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+/*
+ * Enum for Status values returned by API Handler to Tail-F
+*/
+public enum ModelType {
+       service,
+       vnf,
+       vfModule,
+       volumeGroup,
+       network
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoException.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoException.java
new file mode 100644 (file)
index 0000000..2ef1e4a
--- /dev/null
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+public enum MsoException {
+       ServiceException,
+       PolicyException,
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoPropertiesUtils.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoPropertiesUtils.java
new file mode 100644 (file)
index 0000000..0dd9a03
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.apihandlerinfra;
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+public class MsoPropertiesUtils {
+
+    private final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+    private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory ();
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    private static boolean noProperties = true;
+
+    public synchronized static MsoJavaProperties loadMsoProperties () {
+        MsoJavaProperties msoProperties;
+        try {
+            msoProperties = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_APIHANDLER_INFRA);
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_LOAD_PROPERTIES_FAIL, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "Exception when loading MSO Properties", e);
+            return null;
+        }
+
+        if (msoProperties != null && msoProperties.size () > 0) {
+               noProperties = false;
+            msoLogger.info (MessageEnum.APIH_PROPERTY_LOAD_SUC, "", "");
+            return msoProperties;
+        } else {
+            msoLogger.error (MessageEnum.APIH_NO_PROPERTIES, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "No MSO APIH_INFRA Properties found");
+            return null;
+        }
+    }
+    
+    public synchronized static final boolean getNoPropertiesState() {
+       return noProperties;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
new file mode 100644 (file)
index 0000000..55c12eb
--- /dev/null
@@ -0,0 +1,850 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.StringTokenizer;
+
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig.Feature;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.hibernate.Session;
+import org.jboss.resteasy.specimpl.MultivaluedMapImpl;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.CloudConfiguration;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.ModelInfo;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.PolicyException;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RelatedInstance;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RelatedInstanceList;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestError;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.ServiceException;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.ServiceInstancesRequest;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfInputs;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfRequest;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.requestsdb.HibernateUtil;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+public class MsoRequest {
+
+    private String requestId;
+    private String requestXML;
+    private String requestJSON;
+    private String requestUri;
+    private VnfRequest vnfReq;
+    private RequestInfo requestInfo;
+    private ModelInfo modelInfo;
+    private CloudConfiguration cloudConfiguration ;
+    private VnfInputs vnfInputs;
+    private String vnfParams;
+    private Action action;
+    private String errorMessage;
+    private String errorCode;
+    private String httpResponse;
+    private String responseBody;
+    private RequestStatusType status;
+    private ServiceInstancesRequest sir;
+    private long startTime;
+    private long progress = Constants.PROGRESS_REQUEST_RECEIVED;
+    private String serviceInstanceType;
+    private String vnfType;
+    private String vfModuleType;
+    private String vfModuleModelName;
+    private String networkType;
+    private String asdcServiceModelVersion; 
+    private String requestScope;
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+    private static final String NOT_PROVIDED = "not provided";
+
+    MsoRequest (String requestId) {
+        this.requestId = requestId;
+        Calendar startTimeCalendar = Calendar.getInstance ();
+        this.startTime = startTimeCalendar.getTimeInMillis ();
+        MsoLogger.setLogContext (requestId, null);
+
+    } 
+    
+    MsoRequest () {
+        
+        Calendar startTimeCalendar = Calendar.getInstance ();
+        this.startTime = startTimeCalendar.getTimeInMillis ();
+        MsoLogger.setLogContext (requestId, null);
+
+    }
+    
+    
+    public Response buildServiceErrorResponse (int httpResponseCode,
+            MsoException exceptionType,
+            String text,
+            String messageId,
+            List<String> variables) {
+       
+       this.errorCode = messageId;
+       
+       if (text != null) {
+               this.errorMessage = text;
+       }
+       else {
+               this.errorMessage = "";
+       }
+       this.httpResponse = Integer.toString(httpResponseCode);
+       if(errorMessage.length() > 1999){
+           errorMessage = errorMessage.substring(0, 1999);
+       }
+               
+       RequestError re = new RequestError();
+               
+       if(exceptionType.name().equals("PolicyException")){
+               
+               PolicyException pe = new PolicyException();
+               pe.setMessageId(messageId);
+               pe.setText(text);
+               if(variables != null){
+                       for(String variable: variables){
+                               pe.getVariables().add(variable);
+                       }
+               }
+               re.setPolicyException(pe);
+               
+       } else {
+               
+               ServiceException se = new ServiceException();
+               se.setMessageId(messageId);
+               se.setText(text);
+               if(variables != null){
+                       if(variables != null){
+                               for(String variable: variables){
+                                       se.getVariables().add(variable);
+                               }
+                       }
+               }
+               re.setServiceException(se);
+       }
+         
+        String requestErrorStr = null;
+
+        try{
+               ObjectMapper mapper = new ObjectMapper();
+               mapper.setSerializationInclusion(JsonSerialize.Inclusion.NON_DEFAULT);
+               requestErrorStr = mapper.writeValueAsString(re);
+        }catch(Exception e){
+               msoLogger.error (MessageEnum.APIH_VALIDATION_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception in buildServiceErrorResponse writing exceptionType to string ", e);
+        }
+               
+       
+        return Response.status (httpResponseCode).entity(requestErrorStr).build ();
+              
+    }
+
+
+    // Parse request JSON
+    void parse (ServiceInstancesRequest sir, HashMap<String,String> instanceIdMap, Action action) throws ValidationException {
+
+        msoLogger.debug ("Validating the Service Instance request");
+        
+        this.sir = sir;
+        this.action = action;
+        
+        try{
+               ObjectMapper mapper = new ObjectMapper();
+               //mapper.configure(Feature.WRAP_ROOT_VALUE, true);
+               requestJSON = mapper.writeValueAsString(sir.getRequestDetails());
+               
+        } catch(Exception e){
+               throw new ValidationException ("Parse ServiceInstanceRequest to JSON string");
+        }       
+        
+        if(instanceIdMap != null){
+               if(instanceIdMap.get("serviceInstanceId") != null){
+                       if (!UUIDChecker.isValidUUID (instanceIdMap.get ("serviceInstanceId"))) {
+                               throw new ValidationException ("serviceInstanceId");
+                       }
+                       this.sir.setServiceInstanceId(instanceIdMap.get("serviceInstanceId"));
+               }
+        
+               if(instanceIdMap.get("vnfInstanceId") != null){
+                       if (!UUIDChecker.isValidUUID (instanceIdMap.get ("vnfInstanceId"))) {
+                               throw new ValidationException ("vnfInstanceId");
+                       }
+                       this.sir.setVnfInstanceId(instanceIdMap.get("vnfInstanceId"));
+               }
+        
+               if(instanceIdMap.get("vfModuleInstanceId") != null){
+                       if (!UUIDChecker.isValidUUID (instanceIdMap.get ("vfModuleInstanceId"))) {
+                               throw new ValidationException ("vfModuleInstanceId");
+                       }
+                       this.sir.setVfModuleInstanceId(instanceIdMap.get("vfModuleInstanceId"));
+               }
+        
+               if(instanceIdMap.get("volumeGroupInstanceId") != null){
+                       if (!UUIDChecker.isValidUUID (instanceIdMap.get ("volumeGroupInstanceId"))) {
+                               throw new ValidationException ("volumeGroupInstanceId");
+                       }
+                       this.sir.setVolumeGroupInstanceId(instanceIdMap.get("volumeGroupInstanceId"));
+               }
+        
+               if(instanceIdMap.get("networkInstanceId") != null){
+                       if (!UUIDChecker.isValidUUID (instanceIdMap.get ("networkInstanceId"))) {
+                               throw new ValidationException ("networkInstanceId");
+                       }
+                       this.sir.setNetworkInstanceId(instanceIdMap.get("networkInstanceId"));
+               }
+        }
+              
+        this.modelInfo = sir.getRequestDetails().getModelInfo();
+        
+        if (this.modelInfo == null) {
+            throw new ValidationException ("model-info");
+        }
+         
+        this.requestInfo = sir.getRequestDetails().getRequestInfo();
+        
+        if (this.requestInfo == null) {
+            throw new ValidationException ("requestInfo");
+        }
+        
+        if (modelInfo.getModelType () == null) {
+               throw new ValidationException ("modelType");
+        }        
+        
+        this.requestScope = modelInfo.getModelType().name();
+        
+        if (empty (modelInfo.getModelInvariantId ()) && !(requestScope.equalsIgnoreCase (ModelType.network.name ()) && 
+                       (action == Action.createInstance || action == Action.updateInstance))) {
+               throw new ValidationException ("modelInvariantId");
+        }
+        
+        if (!empty (modelInfo.getModelInvariantId ()) && !UUIDChecker.isValidUUID (modelInfo.getModelInvariantId ())) {
+               throw new ValidationException ("modelInvariantId format");
+        }        
+        
+        if (empty (modelInfo.getModelName ()) && (action == Action.createInstance || action == Action.updateInstance || (action == Action.deleteInstance && 
+                       (requestScope.equalsIgnoreCase (ModelType.network.name ()) || requestScope.equalsIgnoreCase (ModelType.vfModule.name ()))))) {
+               throw new ValidationException ("modelName");
+        }
+        
+        if (empty (modelInfo.getModelVersion ()) && !(requestScope.equalsIgnoreCase (ModelType.network.name ()) && 
+                       (action == Action.createInstance || action == Action.updateInstance))) {
+               throw new ValidationException ("modelVersion");
+        }
+        
+        if(requestScope.equalsIgnoreCase(ModelType.vnf.name()) && action != Action.deleteInstance && empty (modelInfo.getModelCustomizationName ())) {
+               throw new ValidationException ("modelCustomizationName");
+        }
+               
+        this.cloudConfiguration = sir.getRequestDetails ().getCloudConfiguration ();
+        if (!requestScope.equalsIgnoreCase (ModelType.service.name ()) && cloudConfiguration == null) {
+               throw new ValidationException ("cloudConfiguration");
+        }
+        
+        if (cloudConfiguration != null) {
+               if (empty (cloudConfiguration.getLcpCloudRegionId ())) {
+                       throw new ValidationException ("lcpCloudRegionId");
+               }
+               if (empty (cloudConfiguration.getTenantId ())) {
+                       throw new ValidationException ("tenantId");
+               }               
+        }
+        
+        if (requestScope.equalsIgnoreCase (ModelType.service.name ()) && action == Action.createInstance) {
+               if (sir.getRequestDetails ().getRequestParameters () == null) {
+                       throw new ValidationException ("requestParameters");
+               }
+               if (empty (sir.getRequestDetails ().getRequestParameters ().getSubscriptionServiceType ())) {
+                       throw new ValidationException ("subscriptionServiceType");
+               }
+        }        
+        
+        if(requestScope.equalsIgnoreCase(ModelType.service.name())){
+               this.serviceInstanceType = modelInfo.getModelName();            
+        }
+        
+        if(requestScope.equalsIgnoreCase(ModelType.network.name())){
+               this.networkType = modelInfo.getModelName();            
+        }        
+        
+        // Verify instanceName existence and format 
+        if (empty (requestInfo.getInstanceName ()) && action == Action.createInstance) {
+               throw new ValidationException ("instanceName");
+        }
+        
+        if (!empty (requestInfo.getInstanceName ()) && !requestInfo.getInstanceName ().matches (Constants.VALID_INSTANCE_NAME_FORMAT)) {
+                       throw new ValidationException ("instanceName format");                  
+        }
+        
+        if (empty (requestInfo.getProductFamilyId ()) && ((requestScope.equalsIgnoreCase (ModelType.vnf.name ()) && action == Action.createInstance) ||
+                       (requestScope.equalsIgnoreCase (ModelType.network.name ()) && (action == Action.createInstance || action == Action.updateInstance)))) {
+               throw new ValidationException ("productFamilyId");
+        }        
+       
+        if (empty (requestInfo.getSource ())) {
+               throw new ValidationException ("source");
+        }
+        
+                       
+        RelatedInstanceList[] instanceList = sir.getRequestDetails().getRelatedInstanceList();
+               
+        String serviceModelName = null;
+        String vnfModelName = null;
+        String asdcServiceModelVersion = null;
+        String volumeGroupId = null;
+        boolean isRelatedServiceInstancePresent = false;
+        boolean isRelatedVnfInstancePresent = false;         
+               
+        if (instanceList != null) {            
+               for(RelatedInstanceList relatedInstanceList : instanceList){                            
+                       RelatedInstance relatedInstance = relatedInstanceList.getRelatedInstance();
+                               
+                       if (!empty (relatedInstance.getInstanceName ()) && !relatedInstance.getInstanceName ().matches (Constants.VALID_INSTANCE_NAME_FORMAT)) {
+                               throw new ValidationException ("instanceName format in relatedInstance");
+                       }
+                               
+                       if (empty (relatedInstance.getInstanceId ())) {
+                               throw new ValidationException ("instanceId in relatedInstance");
+                       }
+                               
+                       if (!UUIDChecker.isValidUUID (relatedInstance.getInstanceId ())) {
+                               throw new ValidationException ("instanceId format in relatedInstance");
+                       }
+                               
+                       if (relatedInstance.getModelInfo () == null) {
+                               throw new ValidationException ("modelInfo in relatedInstance");
+                       }
+                               
+                       if (relatedInstance.getModelInfo ().getModelType () == null) {
+                               throw new ValidationException ("modelType in relatedInstance");
+                       }
+                       
+                       if (action != Action.deleteInstance) {
+                               
+                               if (empty (relatedInstance.getModelInfo ().getModelInvariantId ()) && 
+                                               !(requestScope.equalsIgnoreCase (ModelType.vfModule.name ()) && action == Action.createInstance &&
+                                                       relatedInstance.getModelInfo ().getModelType ().equals(ModelType.volumeGroup))) {
+                                       throw new ValidationException ("modelInvariantId in relatedInstance");
+                               }
+                                       
+                               if (!empty (relatedInstance.getModelInfo ().getModelInvariantId ()) &&
+                                               !UUIDChecker.isValidUUID (relatedInstance.getModelInfo ().getModelInvariantId ())) {
+                                       throw new ValidationException ("modelInvariantId format in relatedInstance");
+                               }                               
+                                       
+                               if (empty(relatedInstance.getModelInfo ().getModelName ()) && 
+                                               !(requestScope.equalsIgnoreCase (ModelType.vfModule.name ()) && action == Action.createInstance &&
+                                               relatedInstance.getModelInfo ().getModelType ().equals (ModelType.volumeGroup))) {
+                                       throw new ValidationException ("modelName in relatedInstance");
+                               }
+                                       
+                               if (empty (relatedInstance.getModelInfo ().getModelVersion ())  && 
+                                               !(requestScope.equalsIgnoreCase (ModelType.vfModule.name ()) && action == Action.createInstance &&
+                                               relatedInstance.getModelInfo ().getModelType ().equals (ModelType.volumeGroup))) {
+                                       throw new ValidationException ("modelVersion in relatedInstance");
+                               }
+                       }
+                               
+                       if (empty (relatedInstance.getModelInfo ().getModelCustomizationName ()) &&
+                                       relatedInstance.getModelInfo ().getModelType ().equals (ModelType.vnf)) {
+                               throw new ValidationException ("modelCustomizationName in relatedInstance");
+                       }
+                               
+                       if(relatedInstance.getModelInfo().getModelType().equals(ModelType.service)) {
+                               isRelatedServiceInstancePresent = true;
+                               if (!relatedInstance.getInstanceId ().equals (this.sir.getServiceInstanceId ())) {
+                                       throw new ValidationException ("serviceInstanceId matching the serviceInstanceId in request URI");
+                               }
+                               serviceModelName = relatedInstance.getModelInfo ().getModelName ();
+                               asdcServiceModelVersion = relatedInstance.getModelInfo().getModelVersion ();
+                       }                                                               
+                       else if(relatedInstance.getModelInfo().getModelType().equals(ModelType.vnf)) {
+                               isRelatedVnfInstancePresent = true;
+                               if (!relatedInstance.getInstanceId ().equals (this.sir.getVnfInstanceId ())) {
+                                       throw new ValidationException ("vnfInstanceId matching the vnfInstanceId in request URI");
+                               }
+                               vnfModelName = relatedInstance.getModelInfo().getModelCustomizationName();
+                       }
+                       else if(relatedInstance.getModelInfo().getModelType().equals(ModelType.volumeGroup)) {                          
+                               volumeGroupId = relatedInstance.getInstanceId ();                                       
+                       }               
+               }
+         
+        
+               if(requestScope.equalsIgnoreCase (ModelType.volumeGroup.name ())) {
+                       if (!isRelatedServiceInstancePresent) {
+                               throw new ValidationException ("related service instance for volumeGroup request");
+                       }
+                       if (!isRelatedVnfInstancePresent) {
+                               throw new ValidationException ("related vnf instance for volumeGroup request");                 
+                       }
+                       this.serviceInstanceType = serviceModelName;
+                       this.vnfType = serviceModelName + "/" + vnfModelName;
+                       this.asdcServiceModelVersion = asdcServiceModelVersion;
+               }       
+               else if(requestScope.equalsIgnoreCase(ModelType.vfModule.name ())) {
+                       if (!isRelatedServiceInstancePresent) {
+                               throw new ValidationException ("related service instance for vfModule request");
+                       }
+                       if (!isRelatedVnfInstancePresent) {
+                               throw new ValidationException ("related vnf instance for vfModule request");                    
+                       }
+                       String vfModuleModelName = modelInfo.getModelName ();
+                       this.vfModuleModelName = vfModuleModelName;     
+                       this.serviceInstanceType = serviceModelName;            
+                       this.vnfType = serviceModelName + "/" + vnfModelName;
+                       this.asdcServiceModelVersion = asdcServiceModelVersion;
+                       this.vfModuleType = vnfType + "::" + vfModuleModelName;
+                       this.sir.setVolumeGroupInstanceId (volumeGroupId);              
+               }
+               else if (requestScope.equalsIgnoreCase (ModelType.vnf.name ())) {
+                       if (!isRelatedServiceInstancePresent) {
+                               throw new ValidationException ("related service instance for vnf request");
+                       }
+                       this.vnfType = serviceModelName + "/" + sir.getRequestDetails().getModelInfo().getModelCustomizationName();
+              }
+        }
+        else if (action != Action.deleteInstance && !requestScope.equalsIgnoreCase(ModelType.service.name ()) && 
+                       !requestScope.equalsIgnoreCase(ModelType.network.name ())) {
+               throw new ValidationException ("related instances");
+        }
+        
+    }
+    
+    public Map<String, List<String>> getOrchestrationFilters (MultivaluedMap<String, String> queryParams) throws ValidationException {
+        
+        String queryParam = null; 
+        Map<String, List<String>> orchestrationFilterParams = new HashMap<String, List<String>>();
+        
+        
+        for (Entry<String,List<String>> entry : queryParams.entrySet()) {
+            queryParam = entry.getKey();
+             
+            try{
+                 if(queryParam.equalsIgnoreCase("filter")){
+                       
+                         StringTokenizer st = new StringTokenizer(entry.getValue().get(0), ":");
+
+                         int counter=0;
+                         String mapKey=null;
+                         List<String> orchestrationList = new ArrayList<String>();
+                         while (st.hasMoreElements()) {
+                                 if(counter == 0){
+                                         mapKey = st.nextElement() + "";
+                                 } else{
+                                         orchestrationList.add(st.nextElement() + "");
+                                 }
+                                counter++;
+                         }
+                       orchestrationFilterParams.put(mapKey, orchestrationList);
+                 }
+                 
+            }catch(Exception e){
+                //msoLogger.error (MessageEnum.APIH_VALIDATION_ERROR, e);
+                throw new ValidationException ("QueryParam ServiceInfo", e);
+
+               }
+            
+        }
+         
+
+        return orchestrationFilterParams;
+  } 
+
+    public void createRequestRecord (Status status, Action action) {
+
+        Session session = null;
+        try {
+
+            session = HibernateUtil.getSessionFactory ().openSession ();
+            session.beginTransaction ();
+
+            InfraActiveRequests aq = new InfraActiveRequests ();
+            aq.setRequestId (requestId);
+            
+            aq.setRequestAction(action.name());
+            aq.setAction(action.name());
+            
+            Timestamp startTimeStamp = new Timestamp (Calendar.getInstance ().getTimeInMillis ());
+            
+            aq.setStartTime (startTimeStamp);
+                      
+            if (requestInfo != null) {  
+               
+               if(requestInfo.getSource() != null){
+                       aq.setSource(requestInfo.getSource());
+               }
+               if(requestInfo.getCallbackUrl() != null){
+                       aq.setCallBackUrl(requestInfo.getCallbackUrl());
+               }
+               if(requestInfo.getCorrelator() != null){
+                       aq.setCorrelator(requestInfo.getCorrelator());
+               }
+  
+            }
+                       
+            if (modelInfo != null) { 
+               aq.setRequestScope(requestScope);  
+            }
+            
+            if (cloudConfiguration != null) {
+               if(cloudConfiguration.getLcpCloudRegionId() != null) {
+                       aq.setAicCloudRegion(cloudConfiguration.getLcpCloudRegionId());
+               }
+               
+                       if(cloudConfiguration.getTenantId() != null) {
+                       aq.setTenantId(cloudConfiguration.getTenantId());
+               }
+               
+            }
+            
+            if(sir.getServiceInstanceId() != null){
+               aq.setServiceInstanceId(sir.getServiceInstanceId());
+            }
+            
+            if(sir.getVnfInstanceId() != null){
+               aq.setVnfId(sir.getVnfInstanceId());
+            }
+                       
+            
+            if(requestScope.equalsIgnoreCase(ModelType.service.name())){
+               if(requestInfo.getInstanceName() != null){
+                       aq.setServiceInstanceName(requestInfo.getInstanceName());               
+               }               
+            }
+            
+            if(requestScope.equalsIgnoreCase(ModelType.network.name())){
+               aq.setNetworkName(requestInfo.getInstanceName());
+               aq.setNetworkType(networkType);
+               aq.setNetworkId(sir.getNetworkInstanceId());
+            }
+            
+            if(requestScope.equalsIgnoreCase(ModelType.volumeGroup.name())){
+               aq.setVolumeGroupId(sir.getVolumeGroupInstanceId());
+               aq.setVolumeGroupName(requestInfo.getInstanceName());                   
+               aq.setVnfType(vnfType);
+            }
+            
+            if(requestScope.equalsIgnoreCase(ModelType.vfModule.name())){
+               aq.setVfModuleName(requestInfo.getInstanceName());
+               aq.setVfModuleModelName(modelInfo.getModelName());
+               aq.setVfModuleId(sir.getVfModuleInstanceId()); 
+               aq.setVolumeGroupId(sir.getVolumeGroupInstanceId());                    
+               aq.setVnfType(vnfType);
+            }
+            
+            if(requestScope.equalsIgnoreCase(ModelType.vnf.name())){
+               aq.setVnfName(requestInfo.getInstanceName());
+               RelatedInstanceList[] instanceList = sir.getRequestDetails().getRelatedInstanceList();
+               
+               if (instanceList != null) {
+               
+                       for(RelatedInstanceList relatedInstanceList : instanceList){
+                               
+                               RelatedInstance relatedInstance = relatedInstanceList.getRelatedInstance();
+                               if(relatedInstance.getModelInfo().getModelType().equals(ModelType.service)){
+                                       aq.setVnfType(vnfType);
+                               }
+                       }       
+               }
+               //aq.setVnfType(sir.getRequestDetails().getRelatedInstanceList());
+            }
+                        
+            aq.setRequestBody (this.requestJSON);
+            
+                       
+            aq.setRequestStatus (status.toString ());
+            aq.setLastModifiedBy (Constants.MODIFIED_BY_APIHANDLER);
+            
+            if ((status == Status.FAILED) || (status == Status.COMPLETE)) {
+                aq.setStatusMessage (this.errorMessage);
+                aq.setResponseBody (this.responseBody);
+                aq.setProgress(new Long(100));
+
+                Calendar endTime = Calendar.getInstance ();
+                Timestamp endTimeStamp = new Timestamp (endTime.getTimeInMillis ());
+                aq.setEndTime (endTimeStamp);
+            }
+            msoLogger.debug ("About to insert a record");
+
+            session.save (aq);
+            session.getTransaction ().commit ();
+            session.close ();
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_INSERT_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception when creation record request", e);
+            if (session != null) {
+                session.close ();
+            }
+            if (!status.equals (Status.FAILED)) {
+                throw e;
+            }
+        }
+    }
+
+    public void updateFinalStatus (Status status) {
+        int result = 0;
+        try {
+            result = RequestsDatabase.updateInfraFinalStatus (requestId,
+                                                              status.toString (),
+                                                              this.errorMessage,
+                                                              this.progress,
+                                                              this.responseBody,
+                                                              Constants.MODIFIED_BY_APIHANDLER);
+        } 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);
+        }
+    }
+
+    public Response buildResponse (int httpResponseCode, String errorCode, InfraActiveRequests inProgress) {
+        return buildResponseWithError (httpResponseCode, errorCode, inProgress, null);
+    }
+
+    public Response buildResponseWithError (int httpResponseCode,
+                                            String errorCode,
+                                            InfraActiveRequests inProgress,
+                                            String errorString) {
+
+      
+        
+        // Log the failed request into the MSO Requests database
+
+        return Response.status (httpResponseCode).entity (null).build ();
+
+    }
+
+    public Response buildResponseFailedValidation (int httpResponseCode, String exceptionMessage) {
+
+
+        return Response.status (httpResponseCode).entity (null).build ();
+    }
+
+    public String getRequestUri () {
+        return requestUri;
+    }
+
+    public void setRequestUri (String requestUri) {
+        this.requestUri = requestUri;
+    }
+
+    public VnfInputs getVnfInputs () {
+        return vnfInputs;
+    }
+
+    public RequestInfo getRequestInfo () {
+        return requestInfo;
+    }
+
+    public String getResponseBody () {
+        return responseBody;
+    }
+
+    public void setResponseBody (String responseBody) {
+        this.responseBody = responseBody;
+    }
+
+    public String getHttpResponse () {
+        return httpResponse;
+    }
+
+    public void setHttpResponse (String httpResponse) {
+        this.httpResponse = httpResponse;
+    }
+
+    public String getRequestId () {
+        return requestId;
+    }
+
+    public String getRequestXML () {
+        return requestXML;
+    }
+
+    public void setRequestXML (String requestXML) {
+        this.requestXML = requestXML;
+    }
+
+    public RequestStatusType getStatus () {
+        return status;
+    }
+    
+    public String getServiceType () {
+       if (this.vnfInputs.getServiceType () != null) 
+               return this.vnfInputs.getServiceType ();
+       if (this.vnfInputs.getServiceId () != null) 
+               return this.vnfInputs.getServiceId ();
+       return null;
+    }
+
+    public void setStatus (RequestStatusType status) {
+        this.status = status;
+        switch (status) {
+        case FAILED:
+        case COMPLETE:
+               this.progress = Constants.PROGRESS_REQUEST_COMPLETED;
+               break;
+        case IN_PROGRESS:
+               this.progress = Constants.PROGRESS_REQUEST_IN_PROGRESS;
+               break;
+        }
+    }
+    
+    public ModelInfo getModelInfo() {
+       return modelInfo;
+    }
+    
+    public ServiceInstancesRequest getServiceInstancesRequest() {
+       return sir;
+    }
+    
+    public String getServiceInstanceType () {
+       return serviceInstanceType;
+    }    
+    
+    public String getNetworkType () {
+       return networkType;
+    }
+    
+    public String getVnfType () {
+       return vnfType;
+    }
+    
+    public String getVfModuleModelName () {
+       return vfModuleModelName;
+    }
+    
+    public String getVfModuleType () {
+       return vfModuleType;
+    }
+    
+    public String getAsdcServiceModelVersion () {
+       return asdcServiceModelVersion;
+    }
+    
+    public static String domToStr (Document doc) {
+        if (doc == null) {
+            return null;
+        }
+
+        try {
+            StringWriter sw = new StringWriter ();
+            StreamResult sr = new StreamResult (sw);
+            TransformerFactory tf = TransformerFactory.newInstance ();
+            Transformer t = tf.newTransformer ();
+            t.setOutputProperty (OutputKeys.STANDALONE, "yes");
+            NodeList nl = doc.getDocumentElement ().getChildNodes ();
+            DOMSource source = null;
+            for (int x = 0; x < nl.getLength (); x++) {
+                Node e = nl.item (x);
+                if (e instanceof Element) {
+                    source = new DOMSource (e);
+                    break;
+                }
+            }
+            if (source != null) {
+                t.transform (source, sr);
+
+                String s = sw.toString ();
+                return s;
+            }
+
+            return null;
+
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_DOM2STR_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception in domToStr", e);
+        }
+        return null;
+    }
+    
+    public void addBPMNSpecificInputs(String personaModelId, String personaModelVersion, Boolean isBaseVfModule,
+                       String vnfPersonaModelId, String vnfPersonaModelVersion) {
+       vnfInputs.setPersonaModelId(personaModelId);
+       vnfInputs.setPersonaModelVersion(personaModelVersion);
+       vnfInputs.setIsBaseVfModule(isBaseVfModule);
+       vnfInputs.setVnfPersonaModelId(vnfPersonaModelId);
+       vnfInputs.setVnfPersonaModelVersion(vnfPersonaModelVersion);
+       
+       this.vnfReq.setVnfInputs(vnfInputs);
+                  
+          StringWriter stringWriter = new StringWriter ();
+          try {
+              JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequest.class);
+              Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+              // output pretty printed
+              jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+              jaxbMarshaller.marshal (this.vnfReq, stringWriter);
+
+          } catch (JAXBException e) {
+              msoLogger.debug ("Exception: ", e);
+          }
+
+          this.requestXML = stringWriter.toString ();
+          msoLogger.debug("REQUEST XML to BPEL: " + this.requestXML);
+       
+       
+    }
+    
+    private static boolean empty(String s) {             
+         return (s == null || s.trim().isEmpty());
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java
new file mode 100644 (file)
index 0000000..59b93ea
--- /dev/null
@@ -0,0 +1,333 @@
+
+package org.openecomp.mso.apihandlerinfra;
+
+/*-
+ * #%L
+ * MSO
+ * %%
+ * Copyright (C) 2016 OPENECOMP - MSO
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.sax.SAXSource;
+
+import org.apache.http.HttpStatus;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.networkbeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkInputs;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkOutputs;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkRequest;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkRequests;
+import org.openecomp.mso.apihandlerinfra.networkbeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.networkbeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.InfraRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/{version: v1|v2|v3}/network-request")
+public class NetworkInfoHandler {
+
+    protected ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    @GET
+    public Response queryFilters (@QueryParam("network-type") String networkType,
+                                  @QueryParam("service-type") String serviceType,
+                                  @QueryParam("aic-node-clli") String aicNodeClli,
+                                  @QueryParam("tenant-id") String tenantId,
+                                  @PathParam("version") String version) {
+        MsoLogger.setServiceName ("QueryFilters");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        long startTime = System.currentTimeMillis ();
+
+        msoLogger.debug ("Incoming request received for query filters with Network type " + networkType
+                                         + " - service type "
+                                         + serviceType
+                                         + " - aicNodeClli "
+                                         + aicNodeClli
+                                         + " - tenant id "
+                                         + tenantId);
+        Response response = null;
+        if (networkType != null) {
+            response = this.getRequestList ("vnfType", networkType, version);
+        } else {
+            response = queryGenericFilters (serviceType, aicNodeClli, tenantId, version);
+        }
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    @GET
+    @Path(Constants.REQUEST_ID_PATH)
+    public Response getRequest (@PathParam("request-id") String requestId, @PathParam("version") String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+        MsoLogger.setServiceName ("GetRequest");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for getRequest with requestId=" + requestId + ", version = " + version);
+        long startTime = System.currentTimeMillis ();
+
+        Response response = getRequestGeneric (requestId, version);
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    protected MsoLogger getMsoLogger () {
+        return msoLogger;
+    }
+
+    protected void fillNetworkRequest (NetworkRequest qr, InfraRequests ar, String version) {
+        NetworkInputs vi = beansObjectFactory.createNetworkInputs ();
+
+        if (ar.getVnfId () != null) {
+            vi.setNetworkId (ar.getVnfId ());
+        }
+        if (ar.getVnfName () != null) {
+            vi.setNetworkName (ar.getVnfName ());
+        }
+        if (ar.getVnfType () != null) {
+            vi.setNetworkType (ar.getVnfType ());
+        }
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+               if (ar.getServiceType () != null) {
+                       vi.setServiceType (ar.getServiceType ());
+               }
+               if (ar.getAicNodeClli () != null) {
+                       vi.setAicNodeClli (ar.getAicNodeClli ());
+               }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }
+               if (ar.getServiceInstanceId () != null) {
+                       vi.setServiceInstanceId (ar.getServiceInstanceId ());
+               }
+                               
+        }
+        
+        if (ar.getTenantId () != null) {
+            vi.setTenantId (ar.getTenantId ());
+        }
+        if (ar.getProvStatus () != null) {
+            vi.setProvStatus (ar.getProvStatus ());
+        }
+        qr.setNetworkInputs (vi);
+
+        qr.setNetworkParams (ar.getVnfParams ());
+
+        try {
+            String networkoutputs = ar.getVnfOutputs ();
+            if (networkoutputs != null && networkoutputs.length () > 0) {
+                msoLogger.debug ("Read NETWORK outputs: " + networkoutputs);
+                NetworkOutputs networkOutput = null;
+
+                // Now unmarshal it into network outputs
+                try {
+                    JAXBContext jaxbContext = JAXBContext.newInstance (NetworkOutputs.class);
+                    Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+                    InputSource inputSource = new InputSource (new StringReader (networkoutputs));
+                    SAXSource source = new SAXSource (inputSource);
+
+                    networkOutput = jaxbUnmarshaller.unmarshal (source, NetworkOutputs.class).getValue ();
+
+                } catch (Exception e) {
+                    msoLogger.debug ("Validation failed", e);
+                    throw new ValidationException ("format for network outputs");
+                }
+
+                qr.setNetworkOutputs (networkOutput);
+            }
+        } catch (Exception e) {
+            msoLogger.debug ("exception reading networkOutputs Clob", e);
+        }
+    }
+
+    protected Response queryGenericFilters (String serviceType, String aicNodeClli, String tenantId, String version) {
+        if (serviceType != null) {
+            return this.getRequestList ("serviceType", serviceType, version);
+        }
+        if (aicNodeClli != null) {
+            return this.getRequestList ("aicNodeClli", aicNodeClli, version);
+        }
+        if (tenantId != null) {
+            return this.getRequestList ("tenantId", tenantId, version);
+        }
+        return Response.status (HttpStatus.SC_BAD_REQUEST).entity ("").build ();
+    }
+
+    protected Response getRequestGeneric (String requestId, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+        MsoLogger.setLogContext (requestId, null);
+        getMsoLogger ().debug ("getRequest: " + requestId);
+
+        String responseString = null;
+
+        InfraActiveRequests activeReq = RequestsDatabase.getRequestFromInfraActive (requestId, "NETWORK");
+        if (activeReq != null) {
+            // build response for active
+            responseString = infraRequestsResponse (activeReq, version);
+            return Response.status (HttpStatus.SC_OK).entity (responseString).build ();
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    protected Response getRequestList (String queryAttribute, String queryValue, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest based on " + queryAttribute + ": " + queryValue);
+
+        List <InfraActiveRequests> activeReqList = RequestsDatabase.getRequestListFromInfraActive (queryAttribute,
+                                                                                                   queryValue,
+                                                                                                   "NETWORK");
+
+        List <NetworkRequest> queryResponseList = new LinkedList <NetworkRequest> ();
+
+        if (activeReqList != null) {
+            // build response for active
+            queryResponseList = infraRequestsResponses (activeReqList, version);
+
+        }
+
+        if (queryResponseList != null && !queryResponseList.isEmpty ()) {
+            String result = this.translateNetworkRequests (queryResponseList);
+            return Response.status (HttpStatus.SC_OK).entity (result).build ();
+
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    private NetworkRequest fillGeneric (InfraRequests ar) {
+        NetworkRequest qr = beansObjectFactory.createNetworkRequest ();
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (ar.getRequestId ());
+        ri.setAction (ActionType.fromValue (ar.getAction ()));
+        ri.setRequestStatus (RequestStatusType.fromValue (ar.getRequestStatus ()));
+        if (ar.getProgress () != null) {
+            ri.setProgress (ar.getProgress ().intValue ());
+        }
+        if (ar.getSource () != null) {
+            ri.setSource (ar.getSource ());
+        }
+
+        ri.setStartTime (ar.getStartTime ().toString ());
+        if (ar.getEndTime () != null) {
+            ri.setEndTime (ar.getEndTime ().toString ());
+        }
+
+        if (ar.getStatusMessage () != null) {
+            ri.setStatusMessage (ar.getStatusMessage ());
+        }
+        qr.setRequestInfo (ri);
+        return qr;
+    }
+
+    private List <NetworkRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
+        List <NetworkRequest> queryResponseList = new LinkedList <NetworkRequest> ();
+
+        for (InfraRequests ar : arList) {
+            NetworkRequest qr = fillGeneric (ar);
+            fillNetworkRequest (qr, ar, version);
+            queryResponseList.add (qr);
+        }
+        return queryResponseList;
+    }
+
+    private String translateNetworkRequests (List <NetworkRequest> queryResponseList) {
+        NetworkRequests queryResponses = new NetworkRequests ();
+        for (int i = 0; i < queryResponseList.size (); i++) {
+            queryResponses.getNetworkRequest ().add (queryResponseList.get (i));
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkRequests.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (queryResponses, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        return stringWriter.toString ();
+    }
+
+    private String infraRequestsResponse (InfraRequests ar, String version) {
+        NetworkRequest qr = fillGeneric (ar);
+        fillNetworkRequest (qr, ar, version);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (qr, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        String response = stringWriter.toString ();
+        return response;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkMsoInfraRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkMsoInfraRequest.java
new file mode 100644 (file)
index 0000000..f35ddfb
--- /dev/null
@@ -0,0 +1,619 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.hibernate.Session;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.networkbeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkInputs;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkRequest;
+import org.openecomp.mso.apihandlerinfra.networkbeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.networkbeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.requestsdb.HibernateUtil;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+
+public class NetworkMsoInfraRequest {
+
+    private String requestId;
+    private String requestXML;
+    private String requestUri;
+    private RequestInfo rinfo;
+    private NetworkInputs networkInputs;
+    private String networkParams;
+    private ActionType action;
+    private String errorMessage;
+    private String httpResponse;
+    private String responseBody;
+    private RequestStatusType status;
+    private long startTime;
+    private long progress = Constants.PROGRESS_REQUEST_RECEIVED;
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+    private static final String NOT_PROVIDED = "not provided";
+
+    NetworkMsoInfraRequest (String requestId) {
+        this.requestId = requestId;
+        Calendar startTimeCalendar = Calendar.getInstance ();
+        this.startTime = startTimeCalendar.getTimeInMillis ();
+        MsoLogger.setLogContext (requestId, null);
+
+    }
+
+    // Parse request XML
+    void parse (String reqXML, String version, MsoJavaProperties props) throws ValidationException {
+
+        msoLogger.debug ("Validating the request");
+
+        this.requestXML = reqXML;
+
+        NetworkRequest networkReq = null;
+        boolean isWrongRootElement = false;
+
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkRequest.class);
+            Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+            InputSource inputSource = new InputSource (new StringReader (reqXML));
+            SAXSource source = new SAXSource (inputSource);
+
+            if (reqXML.contains ("network-request") && !reqXML.contains ("vnf-request")) {
+                networkReq = jaxbUnmarshaller.unmarshal (source, NetworkRequest.class).getValue ();
+            } else {
+                isWrongRootElement = true;
+            }
+
+        } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_VNFREQUEST_VALIDATION_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception when parsing reqXML", e);
+            throw new ValidationException ("format for network request");
+        }
+
+        if (isWrongRootElement) {
+               msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR_REASON, "root element is not correct", "", "", MsoLogger.ErrorCode.DataError, "root element <network-request> expected");
+            throw new ValidationException ("root element <network-request> expected");
+        }
+
+        if (networkReq == null) {
+            throw new ValidationException ("network-request");
+        }
+
+        this.rinfo = networkReq.getRequestInfo ();
+
+        if (this.rinfo == null) {
+            throw new ValidationException ("request-info");
+        }
+        
+        action = this.rinfo.getAction ();
+        if (action == null) {
+            throw new ValidationException ("action");
+        }
+        
+        if (!InfraUtils.isActionAllowed (props, "network", version, action.value ())) {
+               throw new ValidationException ("action allowable for version " + version + " of network request");              
+        }
+
+        this.networkInputs = networkReq.getNetworkInputs ();
+        if (this.networkInputs == null) {
+            throw new ValidationException ("network-inputs");
+        }
+        
+        // Verify that the elements correspond to the version
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+                       if (this.networkInputs.getBackoutOnFailure() != null || this.networkInputs.getAicCloudRegion() != null ||
+                                       this.networkInputs.getServiceInstanceId() != null) {
+                               throw new ValidationException ("format for v1 version of network request");
+                       }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+                       if (this.networkInputs.getServiceType() != null || this.networkInputs.getAicNodeClli() != null ||
+                                       this.networkInputs.getServiceInstanceId() != null) {
+                               throw new ValidationException ("format for v2 version of network request");
+                       }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (this.networkInputs.getServiceType() != null || this.networkInputs.getAicNodeClli() != null) {
+                       throw new ValidationException ("format for v3 version of network request");
+               }
+    }
+
+        switch (action) {            
+            case UPDATE:
+            case DELETE:
+                if (this.networkInputs.getNetworkId () == null) {
+                    throw new ValidationException ("network-id");
+                }
+                break;
+            default:
+                break;
+        }
+
+        if (ActionType.CREATE.equals (action) && this.networkInputs.getNetworkName () == null) {
+            throw new ValidationException ("network-name");
+        }
+
+        if (this.networkInputs.getNetworkType () == null) {
+            throw new ValidationException ("network-type");
+        }
+        
+        if (!version.equals(Constants.SCHEMA_VERSION_V1) && this.networkInputs.getServiceId () == null) {
+               throw new ValidationException ("service-id ");
+        }
+        
+        if (this.networkInputs.getServiceType () != null && this.networkInputs.getServiceId () != null) {
+               throw new ValidationException ("service-type or service-id ");
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V1) && this.networkInputs.getAicNodeClli () == null) {
+               throw new ValidationException ("aic-node-clli");
+        }
+        
+        if ((version.equals (Constants.SCHEMA_VERSION_V2) || version.equals (Constants.SCHEMA_VERSION_V3)) && (this.networkInputs.getAicCloudRegion () == null || this.networkInputs.getAicCloudRegion ().isEmpty())) {
+               throw new ValidationException ("aic-cloud-region");
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V3) && this.networkInputs.getServiceInstanceId () == null) {
+               throw new ValidationException ("service-instance-id");
+        }
+
+        if (ActionType.CREATE.equals (action)) {
+            if (this.networkInputs.getTenantId () == null) {
+                throw new ValidationException ("tenant-id");
+            }
+        }
+
+        
+        Object vpN = networkReq.getNetworkParams ();
+
+        if (vpN != null) {
+            Node node = (Node) vpN;
+            Document doc = node.getOwnerDocument ();
+            this.networkParams = domToStr (doc);
+        }
+
+        msoLogger.debug ("NetworkParams: " + this.networkParams);
+
+        msoLogger.debug ("Request valid");
+
+        // Rebuild the request string for BPEL to include request-id
+        rinfo.setRequestId (this.requestId);
+        networkReq.setRequestInfo (rinfo);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (networkReq, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Exception: ", e);
+        }
+
+        this.requestXML = stringWriter.toString ().replace ("http://ecomp.att.com/mso/infra/network-request",
+                                                            "http://ecomp.att.com/mso/infra/vnf-request");
+        msoLogger.debug("REQUEST XML to BPEL: " + this.requestXML);
+
+    }
+
+    public void createRequestRecord (Status status) {
+
+        long startTime = System.currentTimeMillis ();
+
+        Session session = null;
+        try {
+
+            session = HibernateUtil.getSessionFactory ().openSession ();
+            session.beginTransaction ();
+
+            InfraActiveRequests aq = new InfraActiveRequests ();
+            aq.setRequestId (requestId);
+
+            Timestamp startTimeStamp = new Timestamp (Calendar.getInstance ().getTimeInMillis ());
+            if (rinfo != null) {
+                if (rinfo.getAction () != null) {
+                    aq.setAction (rinfo.getAction ().value ());
+                    aq.setRequestAction (RequestActionMap.getMappedRequestAction (rinfo.getAction ().value ()));
+                }
+                aq.setSource (rinfo.getSource ());
+            } else {
+                // Set up mandatory parameters
+                aq.setAction (NOT_PROVIDED);
+                aq.setRequestAction (NOT_PROVIDED);
+            }
+
+            aq.setRequestBody (this.requestXML);
+            aq.setRequestScope (ModelType.network.name ());
+
+            if (networkInputs != null) {
+                if (networkInputs.getNetworkId () != null) {
+                    aq.setVnfId (networkInputs.getNetworkId ());
+                }
+                if (networkInputs.getNetworkName () != null) {
+                    aq.setVnfName (networkInputs.getNetworkName ());
+                }
+                if (networkInputs.getNetworkType () != null) {
+                    aq.setVnfType (networkInputs.getNetworkType ());
+                }
+                if (networkInputs.getServiceInstanceId () != null) {
+                    aq.setServiceInstanceId (networkInputs.getServiceInstanceId ());
+                }
+                if (networkInputs.getServiceType () != null) {
+                    aq.setServiceType (networkInputs.getServiceType ());
+                }
+                if (networkInputs.getServiceId () != null) {
+                    aq.setServiceType (networkInputs.getServiceId ());
+                }
+                if (networkInputs.getAicNodeClli () != null) {
+                    aq.setAicNodeClli (networkInputs.getAicNodeClli ());
+                }
+                if (networkInputs.getTenantId () != null) {
+                    aq.setTenantId (networkInputs.getTenantId ());
+                }
+                if (networkInputs.getProvStatus () != null) {
+                    aq.setProvStatus (networkInputs.getProvStatus ());
+                }
+
+            }
+            aq.setStartTime (startTimeStamp);
+            aq.setRequestStatus (status.toString ());
+            aq.setLastModifiedBy (Constants.MODIFIED_BY_APIHANDLER);
+            aq.setRequestType ("NETWORK");
+
+            if (networkParams != null) {
+                msoLogger.debug ("Storing networkParams: " + networkParams);
+                aq.setVnfParams (this.networkParams);
+            }
+
+            if ((status == Status.FAILED) || (status == Status.COMPLETE)) {
+                aq.setStatusMessage (this.errorMessage);
+                aq.setResponseBody (this.responseBody);
+
+                Calendar endTime = Calendar.getInstance ();
+                Timestamp endTimeStamp = new Timestamp (endTime.getTimeInMillis ());
+                aq.setEndTime (endTimeStamp);                
+            } 
+            aq.setProgress (this.progress);
+            
+
+            msoLogger.debug ("About to insert a record");
+
+            session.save (aq);
+            session.getTransaction ().commit ();
+            session.close ();
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "saveRequest", null);
+
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_INSERT_EXC, "", "", MsoLogger.ErrorCode.SchemaError, "Exception in createRequestRecord", e);
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, e.getMessage (), "RequestDB", "saveRequest", null);
+            if (session != null) {
+                session.close ();
+            }
+            if (!status.equals (Status.FAILED)) {
+                throw e;
+            }
+        }
+    }
+
+    public void updateFinalStatus (Status status) {
+        try {
+            RequestsDatabase.updateInfraFinalStatus (requestId,
+                                                     status.toString (),
+                                                     this.errorMessage,
+                                                     this.progress,
+                                                     this.responseBody,
+                                                     Constants.MODIFIED_BY_APIHANDLER);
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_UPDATE_EXC, e.getMessage (), "", "", MsoLogger.ErrorCode.SchemaError, "Exception in updateFinalStatus");
+            msoLogger.debug ("Exception: ", e);
+        }
+    }
+
+    public Response buildResponse (int httpResponseCode, String errorCode, InfraActiveRequests inProgress) {
+        return buildResponseWithError (httpResponseCode, errorCode, inProgress, null);
+    }
+
+    public Response buildResponseWithError (int httpResponseCode,
+                                            String errorCode,
+                                            InfraActiveRequests inProgress,
+                                            String errorString) {
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+        NetworkRequest vr = beansObjectFactory.createNetworkRequest ();
+
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+
+        ri.setRequestId (requestId);
+        ri.setRequestStatus (this.status);
+        ri.setAction (this.rinfo.getAction ());
+        ri.setSource (this.rinfo.getSource ());
+
+        String errorMsg = null;
+        if (errorCode != null) {
+            // If error code is actually an XML error response from BPEL, treat it specially:
+            if (!Messages.errors.containsKey (errorCode)) {
+                if (errorCode.length () > 300) {
+                    errorMsg = errorCode.substring (0, 299);
+                } else {
+                    errorMsg = errorCode;
+                }
+
+            } else {
+
+                if (inProgress == null) {
+                    if (errorCode.equals (ErrorNumbers.RECIPE_DOES_NOT_EXIST)) {
+                        errorMsg = String.format (Messages.errors.get (errorCode), "network", errorString);
+                    } else {
+                        errorMsg = String.format (Messages.errors.get (errorCode), errorString);
+                    }
+                } else if (errorCode.equals (ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS)) {
+                    errorMsg = String.format (Messages.errors.get (errorCode),
+                                              "network",
+                                              inProgress.getVnfName (),
+                                              inProgress.getRequestStatus (),
+                                              "network");
+                } else if (errorCode.equals (ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID)) {
+                    errorMsg = String.format (Messages.errors.get (errorCode),
+                                              "network",
+                                              inProgress.getVnfId (),
+                                              inProgress.getRequestStatus (),
+                                              inProgress.getAction (),
+                                              "network");
+                }
+            }
+
+            ri.setStatusMessage (errorMsg);
+            this.errorMessage = errorMsg;
+        }
+        ri.setProgress ((int) this.progress);
+
+        Date startDate = new Date (this.startTime);
+        SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss.SSS");
+        String startTimeString = sdf.format (startDate);
+
+        ri.setStartTime (startTimeString);
+
+        vr.setRequestInfo (ri);
+        vr.setNetworkInputs (this.networkInputs);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (vr, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Exception: ", e);
+        }
+
+        String response = stringWriter.toString ();
+
+        this.httpResponse = Integer.toString (httpResponseCode);
+        this.responseBody = response;
+
+        // Log the failed request into the MSO Requests database
+
+        return Response.status (httpResponseCode).entity (response).build ();
+
+    }
+
+    public Response buildResponseFailedValidation (int httpResponseCode, String exceptionMessage) {
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+        NetworkRequest vr = beansObjectFactory.createNetworkRequest ();
+
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (requestId);
+
+        if (this.rinfo != null) {
+            if (this.rinfo.getAction () != null) {
+                ri.setAction (this.rinfo.getAction ());
+            } else {
+                ri.setAction (ActionType.NOT_PROVIDED);
+            }
+            if (this.rinfo.getSource () != null) {
+                ri.setSource (this.rinfo.getSource ());
+            }
+        } else {
+            ri.setAction (ActionType.NOT_PROVIDED);
+        }
+
+        // Nothing more is expected for this request
+
+        String errorMsg = String.format (Messages.errors.get (ErrorNumbers.REQUEST_FAILED_SCHEMA_VALIDATION
+                                                              + "_service"),
+                                         exceptionMessage);
+        ri.setStatusMessage (errorMsg);
+        this.errorMessage = errorMsg;
+
+        ri.setProgress ((int) this.progress);
+        ri.setRequestStatus (RequestStatusType.FAILED);
+        Date startDate = new Date (this.startTime);
+        SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss.SSS");
+        String startTimeString = sdf.format (startDate);
+
+        ri.setStartTime (startTimeString);
+
+        vr.setRequestInfo (ri);
+        vr.setNetworkInputs (this.networkInputs);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (vr, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Error marshalling", e);
+        }
+
+        String response = stringWriter.toString ();
+
+        this.httpResponse = Integer.toString (httpResponseCode);
+        this.responseBody = response;
+
+        return Response.status (httpResponseCode).entity (response).build ();
+    }
+
+    public String getRequestUri () {
+        return requestUri;
+    }
+
+    public void setRequestUri (String requestUri) {
+        this.requestUri = requestUri;
+    }
+
+    public NetworkInputs getNetworkInputs () {
+        return networkInputs;
+    }
+
+    public RequestInfo getRequestInfo () {
+        return rinfo;
+    }
+
+    public String getResponseBody () {
+        return responseBody;
+    }
+
+    public void setResponseBody (String responseBody) {
+        this.responseBody = responseBody;
+    }
+
+    public String getHttpResponse () {
+        return httpResponse;
+    }
+
+    public void setHttpResponse (String httpResponse) {
+        this.httpResponse = httpResponse;
+    }
+
+    public String getRequestId () {
+        return requestId;
+    }
+
+    public String getRequestXML () {
+        return requestXML;
+    }
+
+    public void setRequestXML (String requestXML) {
+        this.requestXML = requestXML;
+    }
+
+    public RequestStatusType getStatus () {
+        return status;
+    }
+
+    public void setStatus (RequestStatusType status) {
+        this.status = status;
+        switch (status) {
+        case FAILED:
+        case COMPLETE:
+               this.progress = Constants.PROGRESS_REQUEST_COMPLETED;
+               break;
+        case IN_PROGRESS:
+               this.progress = Constants.PROGRESS_REQUEST_IN_PROGRESS;
+               break;
+        }
+    }
+    
+    public String getServiceType () {
+       if (this.networkInputs.getServiceType () != null) 
+               return this.networkInputs.getServiceType ();
+       if (this.networkInputs.getServiceId () != null) 
+               return this.networkInputs.getServiceId ();
+       return null;
+    }
+
+    public static String domToStr (Document doc) {
+        if (doc == null) {
+            return null;
+        }
+
+        try {
+            StringWriter sw = new StringWriter ();
+            StreamResult sr = new StreamResult (sw);
+            TransformerFactory tf = TransformerFactory.newInstance ();
+            Transformer t = tf.newTransformer ();
+            t.setOutputProperty (OutputKeys.STANDALONE, "yes");
+            NodeList nl = doc.getDocumentElement ().getChildNodes ();
+            DOMSource source = null;
+            for (int x = 0; x < nl.getLength (); x++) {
+                Node e = nl.item (x);
+                if (e instanceof Element) {
+                    source = new DOMSource (e);
+                    break;
+                }
+            }
+            if (source != null) {
+                t.transform (source, sr);
+
+                String s = sw.toString ();
+                return s;
+            }
+
+            return null;
+
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DOM2STR_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception in domToStr", e);
+        }
+        return null;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java
new file mode 100644 (file)
index 0000000..8d44d21
--- /dev/null
@@ -0,0 +1,667 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+
+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.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.sax.SAXSource;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.RequestClient;
+import org.openecomp.mso.apihandler.common.RequestClientFactory;
+import org.openecomp.mso.apihandler.common.ResponseHandler;
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.networkbeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkInputs;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkOutputs;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkRequest;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkRequests;
+import org.openecomp.mso.apihandlerinfra.networkbeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.networkbeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.Recipe;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.InfraRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/{version: v1|v2|v3}/network-request")
+public class NetworkRequestHandler {
+
+    @Context
+    private UriInfo uriInfo;
+
+    protected ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+    public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+
+    private static MsoJavaProperties props = MsoPropertiesUtils.loadMsoProperties ();
+
+    private static final String NOT_FOUND = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not started, properties file missing or invalid or Database Connection failed</body></html>";
+
+    private static final Response NOT_STARTED_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+            .entity (NOT_FOUND)
+            .build ();
+
+    @GET
+    public Response queryFilters (@QueryParam("network-type") String networkType,
+                                  @QueryParam("service-type") String serviceType,
+                                  @QueryParam("aic-node-clli") String aicNodeClli,
+                                  @QueryParam("tenant-id") String tenantId,
+                                  @PathParam("version") String version) {
+        MsoLogger.setServiceName ("QueryFilters");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        long startTime = System.currentTimeMillis ();
+
+        msoLogger.debug ("Incoming request received for query filters with Network type " + networkType
+                                         + " - service type "
+                                         + serviceType
+                                         + " - aicNodeClli "
+                                         + aicNodeClli
+                                         + " - tenant id "
+                                         + tenantId);
+        Response response = null;
+        if (networkType != null) {
+            response = this.getRequestList ("vnfType", networkType, version);
+        } else {
+            response = queryGenericFilters (serviceType, aicNodeClli, tenantId, version);
+        }
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    @GET
+    @Path(Constants.REQUEST_ID_PATH)
+    public Response getRequest (@PathParam("request-id") String requestId, @PathParam("version") String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+        MsoLogger.setServiceName ("GetRequest");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for getRequest with requestId=" + requestId + ", version = " + version);
+        long startTime = System.currentTimeMillis ();
+
+        Response response = getRequestGeneric (requestId, version);
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    protected MsoLogger getMsoLogger () {
+        return msoLogger;
+    }
+
+    protected void fillNetworkRequest (NetworkRequest qr, InfraRequests ar, String version) {
+        NetworkInputs vi = beansObjectFactory.createNetworkInputs ();
+
+        if (ar.getVnfId () != null) {
+            vi.setNetworkId (ar.getVnfId ());
+        }
+        if (ar.getVnfName () != null) {
+            vi.setNetworkName (ar.getVnfName ());
+        }
+        if (ar.getVnfType () != null) {
+            vi.setNetworkType (ar.getVnfType ());
+        }
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+               if (ar.getServiceType () != null) {
+                       vi.setServiceType (ar.getServiceType ());
+               }
+               if (ar.getAicNodeClli () != null) {
+                       vi.setAicNodeClli (ar.getAicNodeClli ());
+               }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }
+               if (ar.getServiceInstanceId () != null) {
+                       vi.setServiceInstanceId (ar.getServiceInstanceId ());
+               }
+                               
+        }
+        
+        if (ar.getTenantId () != null) {
+            vi.setTenantId (ar.getTenantId ());
+        }
+        if (ar.getProvStatus () != null) {
+            vi.setProvStatus (ar.getProvStatus ());
+        }
+        qr.setNetworkInputs (vi);
+
+        qr.setNetworkParams (ar.getVnfParams ());
+
+        try {
+            String networkoutputs = ar.getVnfOutputs ();
+            if (networkoutputs != null && networkoutputs.length () > 0) {
+                msoLogger.debug ("Read NETWORK outputs: " + networkoutputs);
+                NetworkOutputs networkOutput = null;
+
+                // Now unmarshal it into network outputs
+                try {
+                    JAXBContext jaxbContext = JAXBContext.newInstance (NetworkOutputs.class);
+                    Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+                    InputSource inputSource = new InputSource (new StringReader (networkoutputs));
+                    SAXSource source = new SAXSource (inputSource);
+
+                    networkOutput = jaxbUnmarshaller.unmarshal (source, NetworkOutputs.class).getValue ();
+
+                } catch (Exception e) {
+                    msoLogger.debug ("Validation failed", e);
+                    throw new ValidationException ("format for network outputs");
+                }
+
+                qr.setNetworkOutputs (networkOutput);
+            }
+        } catch (Exception e) {
+            msoLogger.debug ("exception reading networkOutputs Clob", e);
+        }
+    }
+
+    protected Response queryGenericFilters (String serviceType, String aicNodeClli, String tenantId, String version) {
+        if (serviceType != null) {
+            return this.getRequestList ("serviceType", serviceType, version);
+        }
+        if (aicNodeClli != null) {
+            return this.getRequestList ("aicNodeClli", aicNodeClli, version);
+        }
+        if (tenantId != null) {
+            return this.getRequestList ("tenantId", tenantId, version);
+        }
+        return Response.status (HttpStatus.SC_BAD_REQUEST).entity ("").build ();
+    }
+
+    protected Response getRequestGeneric (String requestId, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+        MsoLogger.setLogContext (requestId, null);
+        getMsoLogger ().debug ("getRequest: " + requestId);
+
+        String responseString = null;
+
+        InfraActiveRequests activeReq = RequestsDatabase.getRequestFromInfraActive (requestId, "NETWORK");
+        if (activeReq != null) {
+            // build response for active
+            responseString = infraRequestsResponse (activeReq, version);
+            return Response.status (HttpStatus.SC_OK).entity (responseString).build ();
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    protected Response getRequestList (String queryAttribute, String queryValue, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest based on " + queryAttribute + ": " + queryValue);
+
+        List <InfraActiveRequests> activeReqList = RequestsDatabase.getRequestListFromInfraActive (queryAttribute,
+                                                                                                   queryValue,
+                                                                                                   "NETWORK");
+
+        List <NetworkRequest> queryResponseList = new LinkedList <NetworkRequest> ();
+
+        if (activeReqList != null) {
+            // build response for active
+            queryResponseList = infraRequestsResponses (activeReqList, version);
+
+        }
+
+        if (queryResponseList != null && !queryResponseList.isEmpty ()) {
+            String result = this.translateNetworkRequests (queryResponseList);
+            return Response.status (HttpStatus.SC_OK).entity (result).build ();
+
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    private NetworkRequest fillGeneric (InfraRequests ar) {
+        NetworkRequest qr = beansObjectFactory.createNetworkRequest ();
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (ar.getRequestId ());
+        ri.setAction (ActionType.fromValue (ar.getAction ()));
+        ri.setRequestStatus (RequestStatusType.fromValue (ar.getRequestStatus ()));
+        if (ar.getProgress () != null) {
+            ri.setProgress (ar.getProgress ().intValue ());
+        }
+        if (ar.getSource () != null) {
+            ri.setSource (ar.getSource ());
+        }
+
+        ri.setStartTime (ar.getStartTime ().toString ());
+        if (ar.getEndTime () != null) {
+            ri.setEndTime (ar.getEndTime ().toString ());
+        }
+
+        if (ar.getStatusMessage () != null) {
+            ri.setStatusMessage (ar.getStatusMessage ());
+        }
+        qr.setRequestInfo (ri);
+        return qr;
+    }
+
+    private List <NetworkRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
+        List <NetworkRequest> queryResponseList = new LinkedList <NetworkRequest> ();
+
+        for (InfraRequests ar : arList) {
+            NetworkRequest qr = fillGeneric (ar);
+            fillNetworkRequest (qr, ar, version);
+            queryResponseList.add (qr);
+        }
+        return queryResponseList;
+    }
+
+    private String translateNetworkRequests (List <NetworkRequest> queryResponseList) {
+        NetworkRequests queryResponses = new NetworkRequests ();
+        for (int i = 0; i < queryResponseList.size (); i++) {
+            queryResponses.getNetworkRequest ().add (queryResponseList.get (i));
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkRequests.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (queryResponses, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        return stringWriter.toString ();
+    }
+
+    private String infraRequestsResponse (InfraRequests ar, String version) {
+        NetworkRequest qr = fillGeneric (ar);
+        fillNetworkRequest (qr, ar, version);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (qr, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        String response = stringWriter.toString ();
+        return response;
+    }
+
+    @POST
+    @Path("/")
+    @Produces(MediaType.APPLICATION_XML)
+    public Response manageNetworkRequest (String reqXML, @PathParam("version") String version) {
+        MsoLogger.setServiceName ("NetworkRequest");
+       if ("v1".equals(version)) {
+            return manageNetworkRequestImpl (reqXML, Constants.SCHEMA_VERSION_V1);
+       } else if ("v2".equals(version)) {
+            return manageNetworkRequestImpl (reqXML, Constants.SCHEMA_VERSION_V2);
+       } else if ("v3".equals(version)) {
+            return manageNetworkRequestImpl (reqXML, Constants.SCHEMA_VERSION_V3);
+       } else {
+            long startTime = System.currentTimeMillis ();
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "Version not found");
+               return Response.status(HttpStatus.SC_NOT_FOUND).build();
+       }
+    }
+
+    private Response manageNetworkRequestImpl (String reqXML, String version) {
+       String methodName = "NetworkRequest";
+
+       props = MsoPropertiesUtils.loadMsoProperties ();
+        
+        long startTime = System.currentTimeMillis ();
+        if (MsoPropertiesUtils.getNoPropertiesState()) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Application not started, properties file missing or invalid");
+               return NOT_STARTED_RESPONSE;
+        }
+        uriInfo.getRequestUri ();
+
+        // Generate unique request id for the new request
+        UUID requestUUID = UUID.randomUUID ();
+
+        NetworkMsoInfraRequest msoRequest = new NetworkMsoInfraRequest (requestUUID.toString ());
+        MsoLogger.setLogContext (msoRequest.getRequestId (), null);
+
+        if (reqXML == null) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "The input Request is null");
+            return Response.status (HttpStatus.SC_NO_CONTENT).entity ("").build ();
+        }
+
+        String requestUri = uriInfo.getRequestUri ().toString ();
+
+        msoLogger.debug ("Incoming Request: " + reqXML);
+
+        msoRequest.setRequestUri (requestUri);
+        msoLogger.debug ("Schema version: " + version);
+        try {
+            msoRequest.parse (reqXML, version, props);
+        } catch (Exception e) {
+            msoLogger.debug ("Validation failed: ", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseFailedValidation (HttpStatus.SC_BAD_REQUEST, e.getMessage ());
+            if (msoRequest.getRequestId () != null) {
+                msoLogger.debug ("Logging failed message to the database");
+                msoRequest.createRequestRecord (Status.FAILED);
+            }
+            msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, reqXML, "", "", MsoLogger.ErrorCode.DataError, "Exception when parsing reqXML", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Validation of the input request failed");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+        MsoLogger.setServiceName (MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo().getAction().name());
+        msoLogger.debug ("Update serviceName with detailed action info to:" + MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo().getAction().name());
+        if (msoRequest.getRequestInfo ()
+                      .getAction () == org.openecomp.mso.apihandlerinfra.networkbeans.ActionType.CREATE) {
+            // Check if this request is a duplicate of the one with the same network Name
+            msoLogger.debug ("Checking for a duplicate with the same network-name");
+            InfraActiveRequests dup = null;
+            try {
+
+                dup = RequestsDatabase.checkDuplicateByVnfName (msoRequest.getNetworkInputs ().getNetworkName (),
+                                                                msoRequest.getRequestInfo ().getAction ().value (),
+                                                                "NETWORK");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "network-name", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for duplicated request", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for duplicated request");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                "CREATE on the same Network Name is already progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicates request - CREATE on the same Network Name is already progress");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicates request - CREATE on the same Network Name is already progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        } else {
+            // Check if this request is a duplicate of the one with the same networkId
+            InfraActiveRequests dup = null;
+            msoLogger.debug ("Checking for a duplicate with the same network-id");
+            try {
+                dup = RequestsDatabase.checkDuplicateByVnfId (msoRequest.getNetworkInputs ().getNetworkId (),
+                                                              msoRequest.getRequestInfo ().getAction ().value (),
+                                                              "NETWORK");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "network-id", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for a duplicate request with the same network-id", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for a duplicate request with the same network-id");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                msoRequest.getRequestInfo ().getAction ().value ()
+                                                                  + " on the same Network Id already in progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicated request on the same Network Id already in progress");
+
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicated request on the same Network Id already in progress.");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        }
+
+        String orchestrationURI = "";
+
+        // Query MSO Catalog DB
+        try (CatalogDatabase db = new CatalogDatabase()) {
+
+            Recipe recipe = null;
+
+            if (msoRequest.getServiceType () != null
+                    && msoRequest.getServiceType ().length () > 0) {
+                recipe = db.getNetworkRecipe (msoRequest.getNetworkInputs ().getNetworkType (),
+                        msoRequest.getRequestInfo ().getAction ().value (),
+                        msoRequest.getServiceType ());
+
+            }
+            if (recipe == null) {
+                recipe = db.getNetworkRecipe (msoRequest.getNetworkInputs ().getNetworkType (),
+                        msoRequest.getRequestInfo ().getAction ().value (),
+                        null);
+            }
+
+            if (recipe == null) {
+                msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, "VNF Recipe", "", "", MsoLogger.ErrorCode.DataError, "VNF Recipe attribute not found");
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                        ErrorNumbers.RECIPE_DOES_NOT_EXIST,
+                        null,
+                        "");
+                msoRequest.createRequestRecord (Status.FAILED);
+                db.close ();
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "No recipe found in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            orchestrationURI = recipe.getOrchestrationUri ();
+            msoLogger.debug ("Orchestration URI is: " + orchestrationURI);
+
+            db.close ();
+
+            String requestId = msoRequest.getRequestId ();
+            msoLogger.debug ("requestId is: " + requestId);
+            msoLogger.debug ("About to insert a record");
+
+            try {
+                msoRequest.createRequestRecord (Status.PENDING);
+            } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "", MsoLogger.ErrorCode.DataError, "Exception while creating record in DB", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                        ErrorNumbers.COULD_NOT_WRITE_TO_REQUESTS_DB,
+                        null,
+                        "non-unique request-id specified");
+                // Cannot create a record of this request here, our communication with MSO DB just failed. Do not try
+                // to create a failed record
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while creating record in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+
+            RequestClient requestClient = null;
+            HttpResponse response = null;
+            long subStartTime = System.currentTimeMillis();
+            try {
+                requestClient = RequestClientFactory.getRequestClient (orchestrationURI, props);
+                // Capture audit event
+                msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
+                response = requestClient.post (msoRequest.getRequestXML (),
+                        requestId,
+                        Integer.toString (recipe.getRecipeTimeout ()).toString (),
+                        version,
+                        null,
+                        null);
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", orchestrationURI, null);
+            } catch (Exception e) {
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", orchestrationURI, null);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_COMMUNICATION_TO_BPEL,
+                        null,
+                        e.getMessage ());
+                alarmLogger.sendAlarm ("MsoConfigurationError",
+                        MsoAlarmLogger.CRITICAL,
+                        Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            if (response == null) {
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_RESPONSE_FROM_BPEL,
+                        null,
+                        "bpelResponse is null");
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Null response from BPEL", "Camunda", "", MsoLogger.ErrorCode.DataError, "bpelResponse is null");
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is null");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
+            int bpelStatus = respHandler.getStatus ();
+
+            // BPEL accepted the request, the request is in progress
+            if (bpelStatus == HttpStatus.SC_ACCEPTED) {
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                msoLogger.debug ("Received from BPEL: " + bpelXMLResponseBody);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.IN_PROGRESS);
+                RequestsDatabase.updateInfraStatus (msoRequest.getRequestId (),
+                        Status.IN_PROGRESS.toString (),
+                        Constants.PROGRESS_REQUEST_IN_PROGRESS,
+                        Constants.MODIFIED_BY_APIHANDLER);
+                Response resp = msoRequest.buildResponse (bpelStatus, null, null);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "BPMN accepted the request, the request is in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            } else {
+
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                if (bpelXMLResponseBody != null && !bpelXMLResponseBody.isEmpty ()) {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, bpelXMLResponseBody, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR,
+                            "Response from BPEL engine is failed with HTTP Status=" + bpelStatus, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is with status Failed");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                } else {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, ErrorNumbers.ERROR_FROM_BPEL, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Response from BPEL engine is empty", "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is empty");
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPEL engine is empty");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                }
+            }
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception while communciate with Catalog DB", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                                                                   ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB,
+                                                                   null,
+                                                                   e.getMessage ());
+            alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                   MsoAlarmLogger.CRITICAL,
+                                   Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB));
+            msoRequest.createRequestRecord (Status.FAILED);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java
new file mode 100644 (file)
index 0000000..f89cae9
--- /dev/null
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+import java.io.StringWriter;
+import java.util.List;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+
+import org.apache.http.HttpStatus;
+
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkType;
+import org.openecomp.mso.apihandlerinfra.networkbeans.NetworkTypes;
+import org.openecomp.mso.apihandlerinfra.networkbeans.ObjectFactory;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.NetworkResource;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path(Constants.NETWORK_TYPES_PATH)
+public class NetworkTypesHandler {
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    @GET
+    public Response getNetworkTypes () {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("getNetworkTypes");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for getNetworkTypes");
+
+        List <NetworkResource> networkResources = null;
+        try (CatalogDatabase db = new CatalogDatabase()){
+            networkResources = db.getAllNetworkResources ();
+        } catch (Exception e) {
+            msoLogger.debug ("No connection to catalog DB", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "no connection to catalog DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + e.toString ());
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity (e.toString ()).build ();
+        }
+
+        if (networkResources == null) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "NetworkType not found");
+            msoLogger.debug ("End of the transaction. NetworkType not found the final response status: " + HttpStatus.SC_NOT_FOUND);
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+        NetworkTypes networkTypes = beansObjectFactory.createNetworkTypes ();
+        for (int i = 0; i < networkResources.size (); i++) {
+            NetworkType networkType = beansObjectFactory.createNetworkType ();
+            NetworkResource vr = networkResources.get (i);
+            networkType.setType (vr.getNetworkType ());
+            networkType.setDescription (vr.getDescription ());
+            networkType.setId (String.valueOf (vr.getId ()));
+            networkTypes.getNetworkType ().add (networkType);
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (NetworkTypes.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (networkTypes, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Error marshalling", e);
+        }
+
+        String response = stringWriter.toString ();
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + response);
+        return Response.status (HttpStatus.SC_OK).entity (response).build ();
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
new file mode 100644 (file)
index 0000000..00104da
--- /dev/null
@@ -0,0 +1,251 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.apihandlerinfra;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+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.codehaus.jackson.map.ObjectMapper;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.GetOrchestrationListResponse;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.GetOrchestrationResponse;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.InstanceReferences;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.Request;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestDetails;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestList;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestStatus;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+
+@Path("/orchestrationRequests/v2")
+public class OrchestrationRequests {
+
+    public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+
+       /**
+        * 
+        */
+       public OrchestrationRequests() {
+               // TODO Auto-generated constructor stub
+       }
+
+       @GET
+       @Path("/{requestId}")
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response getOrchestrationRequest(@PathParam("requestId") String requestId) {
+               
+               GetOrchestrationResponse orchestrationResponse = new GetOrchestrationResponse();
+               
+               MsoRequest msoRequest = new MsoRequest (requestId);
+               
+               long startTime = System.currentTimeMillis ();
+               
+               InfraActiveRequests requestDB = null;
+        
+        try {
+                        requestDB = RequestsDatabase.getRequestFromInfraActive(requestId);
+                        
+            } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communciate with Request DB - Infra Request Lookup", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                                                                                                                         MsoException.ServiceException,
+                                                                                                                         e.getMessage (),
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null);
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with Request DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+               
+            }
+        
+        if(requestDB == null) {
+            Response resp = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NO_CONTENT,
+                                                                                                                MsoException.ServiceException,
+                                                                                                               "Orchestration RequestId " + requestId + " is not found in DB",                                                            
+                                                             ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                                                             null);
+            msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Null response from RequestDB when searching by RequestId");
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "Null response from RequestDB when searching by RequestId");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+            return resp;
+               
+        }
+  
+        Request request = mapInfraActiveRequestToRequest(requestDB);
+         
+        orchestrationResponse.setRequest(request);
+               
+        return Response.status(200).entity(orchestrationResponse).build();
+       }
+       
+       @GET
+       @Path("/")
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response getOrchestrationRequest(@Context UriInfo ui) {
+               
+               long startTime = System.currentTimeMillis ();
+               
+               MsoRequest msoRequest = new MsoRequest();
+               
+               MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+               
+               List<InfraActiveRequests> activeRequests = null;
+               
+               GetOrchestrationListResponse orchestrationList = null;
+               
+               
+               try{
+               
+                       Map<String, List<String>> orchestrationMap = msoRequest.getOrchestrationFilters(queryParams);
+                       
+                       activeRequests = RequestsDatabase.getOrchestrationFiltersFromInfraActive(orchestrationMap);
+                       
+                       orchestrationList = new GetOrchestrationListResponse();
+
+                       List<RequestList> requestLists = new ArrayList<RequestList>();
+                                               
+                       for(InfraActiveRequests infraActive : activeRequests){
+                               
+                               Request request = mapInfraActiveRequestToRequest(infraActive);
+                               RequestList requestList = new RequestList();
+                               requestList.setRequest(request);
+
+                               requestLists.add(requestList);
+
+                       }
+                       
+                       orchestrationList.setRequestList(requestLists);
+
+               }catch(Exception e){
+                  msoLogger.debug ("Get Orchestration Request with Filters Failed : ", e);
+                  Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR, MsoException.ServiceException, 
+                          "Get Orchestration Request with Filters Failed.  " + e.getMessage(), 
+                          ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null);
+                  msoLogger.error (MessageEnum.APIH_GENERAL_EXCEPTION, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Get Orchestration Request with Filters Failed : " + e);
+                  msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, "Get Orchestration Request with Filters Failed");
+                  msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                  return response;
+               }
+               
+                       
+        return Response.status(200).entity(orchestrationList).build();
+       }
+
+    private Request mapInfraActiveRequestToRequest(InfraActiveRequests requestDB)  {
+       
+         
+        Request request = new Request();
+        
+        ObjectMapper mapper = new ObjectMapper();
+       // mapper.configure(Feature.WRAP_ROOT_VALUE, true);
+       
+       request.setRequestId(requestDB.getRequestId());
+       request.setRequestScope(requestDB.getRequestScope());
+       request.setRequestType(requestDB.getRequestAction());
+       
+       InstanceReferences ir = new InstanceReferences();
+       if(requestDB.getNetworkId() != null)
+               ir.setNetworkInstanceId(requestDB.getNetworkId());
+       if(requestDB.getNetworkName() != null)
+               ir.setNetworkInstanceName(requestDB.getNetworkName());
+       if(requestDB.getServiceInstanceId() != null)
+               ir.setServiceInstanceId(requestDB.getServiceInstanceId());
+       if(requestDB.getServiceInstanceName() != null)
+               ir.setServiceInstanceName(requestDB.getServiceInstanceName());
+       if(requestDB.getVfModuleId() != null)
+               ir.setVfModuleInstanceId(requestDB.getVfModuleId());
+       if(requestDB.getVfModuleName() != null)
+               ir.setVfModuleInstanceName(requestDB.getVfModuleName());
+       if(requestDB.getVnfId() != null)
+               ir.setVnfInstanceId(requestDB.getVnfId());
+       if(requestDB.getVnfName() != null)
+               ir.setVnfInstanceName(requestDB.getVnfName());
+       if(requestDB.getVolumeGroupId() != null)
+               ir.setVolumeGroupInstanceId(requestDB.getVolumeGroupId());
+       if(requestDB.getVolumeGroupName() != null)
+               ir.setVolumeGroupInstanceName(requestDB.getVolumeGroupName());
+
+       
+       request.setInstanceReferences(ir);
+       
+       String requestBody = requestDB.getRequestBody();
+              
+       RequestDetails requestDetails = null;
+       
+       try{
+               requestDetails = mapper.readValue(requestBody, RequestDetails.class);
+               
+       }catch(Exception e){
+               msoLogger.debug("Exception caught mapping requestBody to RequestDetails");
+       }
+               
+       request.setRequestDetails(requestDetails);
+       String startTimeStamp = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss").format(requestDB.getStartTime()) + " GMT";
+       request.setStartTime(startTimeStamp);
+       
+       RequestStatus status = new RequestStatus();
+       if(requestDB.getStatusMessage() != null){
+          status.setStatusMessage(requestDB.getStatusMessage());
+       }
+       
+       if(requestDB.getEndTime() != null){
+          String endTimeStamp = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss").format(requestDB.getEndTime()) + " GMT";
+          status.setFinishTime(endTimeStamp);
+       }
+
+        
+       if(requestDB.getRequestStatus() != null){
+          status.setRequestState(requestDB.getRequestStatus());
+       }
+       
+       if(requestDB.getProgress() != null){
+          status.setPercentProgress(requestDB.getProgress().intValue());
+       }
+       
+       request.setRequestStatus(status);
+       
+       return request;
+   }
+    }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java
new file mode 100644 (file)
index 0000000..234f406
--- /dev/null
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+public class RecipeLookupResult {
+
+    private String orchestrationURI;
+    private int recipeTimeout;
+    
+    public RecipeLookupResult(String orchestrationURI, int recipeTimeout) {
+       this.orchestrationURI = orchestrationURI;
+       this.recipeTimeout = recipeTimeout;
+    }
+    
+    public String getOrchestrationURI () {
+       return orchestrationURI;
+    }
+    
+    public void setOrchestrationURI (String orchestrationURI) {
+       this.orchestrationURI = orchestrationURI;
+    }
+    
+    public int getRecipeTimeout () {
+       return recipeTimeout;
+    }
+    
+    public void setRecipeTimeout (int recipeTimeout) {
+       this.recipeTimeout = recipeTimeout;
+    }
+}
+    
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestActionMap.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestActionMap.java
new file mode 100644 (file)
index 0000000..940fcc9
--- /dev/null
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/*
+ * Map of actions to RequestActions
+*/
+public class RequestActionMap {
+    private static final Map<String, String> actionMap;
+
+    static {
+        actionMap = new HashMap<String, String>();
+        actionMap.put("CREATE_VF_MODULE", "createInstance");
+        actionMap.put("DELETE_VF_MODULE", "deleteInstance");
+        actionMap.put("UPDATE_VF_MODULE", "updateInstance");
+        actionMap.put("CREATE_VF_MODULE_VOL", "createInstance");
+        actionMap.put("DELETE_VF_MODULE_VOL", "deleteInstance");
+        actionMap.put("UPDATE_VF_MODULE_VOL", "updateInstance");
+        actionMap.put("CREATE", "createInstance");
+        actionMap.put("DELETE", "deleteInstance");
+        actionMap.put("UPDATE", "updateInstance");
+        actionMap.put("createInstance", "createInstance");
+        actionMap.put("deleteInstance", "deleteInstance");
+        actionMap.put("updateInstance", "updateInstance");
+
+    }
+
+    public static String getMappedRequestAction(String action) {
+        return actionMap.get(action);
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestHandler.java
new file mode 100644 (file)
index 0000000..bfea00f
--- /dev/null
@@ -0,0 +1,2102 @@
+package org.openecomp.mso.apihandlerinfra;
+
+/*-
+ * #%L
+ * MSO
+ * %%
+ * Copyright (C) 2016 OPENECOMP - MSO
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+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.QueryParam;
+import javax.ws.rs.DefaultValue;
+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.openecomp.mso.HealthCheckUtils;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig.Feature;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.RequestClient;
+import org.openecomp.mso.apihandler.common.RequestClientFactory;
+import org.openecomp.mso.apihandler.common.ResponseHandler;
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.GetOrchestrationListResponse;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.GetOrchestrationResponse;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.InstanceReferences;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RelatedInstance;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RelatedInstanceList;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.Request;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestDetails;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestError;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestList;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestStatus;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestReferences;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.ServiceInstancesRequest;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.ServiceInstancesResponse;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.Recipe;
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe;
+import org.openecomp.mso.db.catalog.beans.VnfRecipe;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/")
+public class RequestHandler {
+
+    public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+    private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory ();
+
+    @Context
+    private UriInfo uriInfo;
+
+    private static final String NOT_FOUND = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not started, properties file missing or invalid or Database Connection failed</body></html>";
+
+    private static final Response NOT_STARTED_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+                                                                 .entity (NOT_FOUND)
+                                                                 .build ();
+
+    private static boolean noProperties = true;
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+
+    @Context
+    private ServletContext sc;
+
+    private static MsoJavaProperties props = loadMsoProperties ();
+    HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+
+    @HEAD
+    @GET
+    @Path("/healthcheck")
+    @Produces("text/html")
+    public Response healthcheck (@QueryParam("requestId") String requestId) {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("Healthcheck");
+        UUIDChecker.verifyOldUUID(requestId, msoLogger);
+        HealthCheckUtils healthCheck = new HealthCheckUtils ();
+        if (!healthCheck.siteStatusCheck(msoLogger, startTime)) {
+            return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+        }
+
+        if (!healthCheck.configFileCheck(msoLogger, startTime, MSO_PROP_APIHANDLER_INFRA)) {
+            return HealthCheckUtils.NOT_STARTED_RESPONSE;
+        }
+
+        if (!healthCheck.requestDBCheck (msoLogger, startTime)) {
+            return HealthCheckUtils.NOT_STARTED_RESPONSE;
+        }
+        msoLogger.debug("healthcheck - Successful");
+        return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+    }
+
+    @HEAD
+    @GET
+    @Path("/globalhealthcheck")
+    @Produces("text/html")
+    public Response globalHealthcheck (@DefaultValue("true") @QueryParam("enableBpmn") boolean enableBpmn) {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("GlobalHealthcheck");
+        // Generate a Request Id
+        String requestId = UUIDChecker.generateUUID(msoLogger);
+        HealthCheckUtils healthCheck = new HealthCheckUtils ();
+        if (!healthCheck.siteStatusCheck (msoLogger, startTime)) {
+            return HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+        }
+
+        if (healthCheck.verifyGlobalHealthCheck(enableBpmn, requestId)) {
+            msoLogger.debug("globalHealthcheck - Successful");
+            return HealthCheckUtils.HEALTH_CHECK_RESPONSE;
+        } else {
+            msoLogger.debug("globalHealthcheck - At leaset one of the sub-modules is not available");
+            return  HealthCheckUtils.HEALTH_CHECK_NOK_RESPONSE;
+        }
+    } 
+
+    private static MsoJavaProperties loadMsoProperties () {
+        MsoJavaProperties msoProperties;
+        try {
+            msoProperties = msoPropertiesFactory.getMsoJavaProperties (MSO_PROP_APIHANDLER_INFRA);
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_LOAD_PROPERTIES_FAIL, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "Exception when loading MSO Properties", e);
+            return null;
+        }
+
+        if (msoProperties != null && msoProperties.size () > 0) {
+            noProperties = false;
+            msoLogger.info (MessageEnum.APIH_PROPERTY_LOAD_SUC, "", "");
+            return msoProperties;
+        } else {
+            msoLogger.error (MessageEnum.APIH_NO_PROPERTIES, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "No MSO APIH_INFRA Properties found");
+            return null;
+        }
+    }
+    
+       @POST
+       @Path("/serviceInstances/v2")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createServiceInstance(String request) {
+                               
+               Response response = serviceInstances(request, Action.createInstance, null);
+               
+               return response;
+       }
+       
+       @DELETE
+       @Path("/serviceInstances/v2/{serviceInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteServiceInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               return response;
+       }
+       
+       @POST
+       @Path("/serviceInstances/v2/{serviceInstanceId}/vnfs")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createVnfInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               Response response = serviceInstances(request, Action.createInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @DELETE
+       @Path("/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteVnfInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                         @PathParam("vnfInstanceId") String vnfInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @POST
+       @Path("/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createVfModuleInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId, 
+                                                                                                                  @PathParam("vnfInstanceId") String vnfInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               Response response = serviceInstances(request, Action.createInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @PUT
+       @Path("/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response updateVfModuleInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId, 
+                                                                                                                  @PathParam("vnfInstanceId") String vnfInstanceId,
+                                                                                                                  @PathParam("vfmoduleInstanceId") String vfmoduleInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               instanceIdMap.put("vfModuleInstanceId", vfmoduleInstanceId);
+               Response response = serviceInstances(request, Action.updateInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @DELETE
+       @Path("/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteVfModuleInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                               @PathParam("vnfInstanceId") String vnfInstanceId,
+                                                                                                                                               @PathParam("vfmoduleInstanceId") String vfmoduleInstanceId) {
+               
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               instanceIdMap.put("vfModuleInstanceId", vfmoduleInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       
+       @POST
+       @Path("/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createVolumeGroupInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                      @PathParam("vnfInstanceId") String vnfInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               Response response = serviceInstances(request, Action.createInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @PUT
+       @Path("/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response updateVolumeGroupInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                                  @PathParam("vnfInstanceId") String vnfInstanceId,
+                                                                                                                                                  @PathParam("volumeGroupInstanceId") String volumeGroupInstanceId) {
+               
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               instanceIdMap.put("volumeGroupInstanceId", volumeGroupInstanceId);
+               Response response = serviceInstances(request, Action.updateInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @DELETE
+       @Path("/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteVolumeGroupInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                                  @PathParam("vnfInstanceId") String vnfInstanceId,
+                                                                                                                                                  @PathParam("volumeGroupInstanceId") String volumeGroupInstanceId) {
+               
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               instanceIdMap.put("volumeGroupInstanceId", volumeGroupInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @POST
+       @Path("/serviceInstances/v2/{serviceInstanceId}/networks")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createNetworkInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               Response response = serviceInstances(request, Action.createInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @PUT
+       @Path("/serviceInstances/v2/{serviceInstanceId}/networks/{networkInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response updateNetworkInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                          @PathParam("networkInstanceId") String networkInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("networkInstanceId", networkInstanceId);
+               Response response = serviceInstances(request, Action.updateInstance, instanceIdMap);
+               
+               return response;
+       } 
+       
+       @DELETE
+       @Path("/serviceInstances/v2/{serviceInstanceId}/networks/{networkInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteNetworkInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                          @PathParam("networkInstanceId") String networkInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("networkInstanceId", networkInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               
+               return response;
+       } 
+    
+    
+       
+       private Response serviceInstances(String requestJSON, Action action, HashMap<String,String> instanceIdMap) {
+               
+          String requestId = UUIDChecker.generateUUID(msoLogger);
+          long startTime = System.currentTimeMillis ();
+          msoLogger.debug ("requestId is: " + requestId);
+          ServiceInstancesRequest sir = null;
+          
+          MsoRequest msoRequest = new MsoRequest (requestId);
+          
+          
+          try{
+               ObjectMapper mapper = new ObjectMapper();
+               sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
+               
+       } catch(Exception e){
+           msoLogger.debug ("Mapping of request to JSON object failed : ", e);
+           Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST, MsoException.ServiceException, 
+                   "Mapping of request to JSON object failed.  " + e.getMessage(), 
+                   ErrorNumbers.SVC_BAD_PARAMETER, null);
+           if (msoRequest.getRequestId () != null) {
+               msoLogger.debug ("Mapping of request to JSON object failed");
+               msoRequest.createRequestRecord (Status.FAILED, action);
+           }
+           msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.SchemaError, requestJSON, e);
+           msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Mapping of request to JSON object failed");
+           msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+           return response;
+       } 
+          
+         
+          try{
+                  msoRequest.parse(sir, instanceIdMap, action);
+       } catch (Exception e) {
+           msoLogger.debug ("Validation failed: ", e);
+           Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST, MsoException.ServiceException, 
+                   "Error parsing request.  " + e.getMessage(), 
+                   ErrorNumbers.SVC_BAD_PARAMETER, null);
+           if (msoRequest.getRequestId () != null) {
+               msoLogger.debug ("Logging failed message to the database");
+               msoRequest.createRequestRecord (Status.FAILED, action);
+           }
+           msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.SchemaError, requestJSON, e);
+           msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Validation of the input request failed");
+           msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+           return response;
+       }
+          
+          InfraActiveRequests dup = null;
+          String instanceName = sir.getRequestDetails().getRequestInfo().getInstanceName();
+          String requestScope = sir.getRequestDetails().getModelInfo().getModelType().name();
+       try {
+                dup = RequestsDatabase.checkInstanceNameDuplicate (instanceIdMap, instanceName, requestScope);
+                                
+          } catch (Exception e) {
+           msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "Error during duplicate check ", e);
+                       
+          Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR, MsoException.ServiceException, 
+                                                                 e.getMessage(), 
+                                                                 ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                                                                 null) ;
+          
+          
+          msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Error during duplicate check");
+          msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+          return response;
+       }
+              
+       if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                  String instance = null;
+                  if(instanceName != null){
+                          instance = instanceName;
+                  }else{
+                          instance = instanceIdMap.get(requestScope + "InstanceId");
+                  }
+                  String dupMessage = "Error: Locked instance - This " + requestScope + " (" + instance + ") " + "already has a request being worked with a status of " + dup.getRequestStatus() + " (RequestId - " + dup.getRequestId() + "). The existing request must finish or be cleaned up before proceeding.";
+           //List<String> variables = new ArrayList<String>();
+           //variables.add(dup.getRequestStatus());
+           
+           Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_CONFLICT, MsoException.ServiceException, 
+                   dupMessage, 
+                   ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                   null) ;
+           
+           
+           msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND, dupMessage, "", "", MsoLogger.ErrorCode.SchemaError, "Duplicate request - Subscriber already has a request for this service");
+           msoRequest.createRequestRecord (Status.FAILED, action);
+           msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, dupMessage);
+           msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+           return response;
+       }
+          
+          
+          ServiceInstancesResponse serviceResponse = new ServiceInstancesResponse();
+          
+          RequestReferences referencesResponse = new RequestReferences();
+          
+          referencesResponse.setRequestId(requestId);
+          
+          serviceResponse.setRequestReferences(referencesResponse);    
+                  
+       try (CatalogDatabase db = new CatalogDatabase()) {
+
+           RecipeLookupResult recipeLookupResult = null;
+           try {
+               recipeLookupResult = getServiceInstanceOrchestrationURI (db, msoRequest, action);
+           } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "Exception while querying Catalog DB", e);
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                       MsoException.ServiceException,
+                       "Recipe could not be retrieved from catalog DB " + e.getMessage (),
+                       ErrorNumbers.SVC_GENERAL_SERVICE_ERROR,
+                       null);
+               alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                       MsoAlarmLogger.CRITICAL,
+                       Messages.errors.get (ErrorNumbers.ERROR_FROM_CATALOG_DB));
+               msoRequest.createRequestRecord (Status.FAILED,action);
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while querying Catalog DB");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+               db.close();
+               return response;
+           }
+
+           if (recipeLookupResult == null) {
+               msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "No recipe found in DB");
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                       MsoException.ServiceException,
+                       "Recipe does not exist in catalog DB",
+                       ErrorNumbers.SVC_GENERAL_SERVICE_ERROR,
+                       null);
+               msoRequest.createRequestRecord (Status.FAILED, action);
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "No recipe found in DB");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+               db.close();
+               return response;
+           }
+
+
+           Boolean isBaseVfModule = false;
+
+           if (msoRequest.getModelInfo().getModelType().equals(ModelType.vfModule)) {
+               String asdcServiceModelVersion = msoRequest.getAsdcServiceModelVersion ();
+
+               // Get VF Module-specific base module indicator
+               VfModule vfm = null;
+
+               if (asdcServiceModelVersion != null && !asdcServiceModelVersion.isEmpty ()) {
+                   vfm = db.getVfModuleType (msoRequest.getVfModuleType (), asdcServiceModelVersion);
+               }
+               else {
+                   vfm = db.getVfModuleType (msoRequest.getVfModuleType ());
+               }
+
+               if (vfm != null) {
+                   if (vfm.getIsBase() == 1) {
+                       isBaseVfModule = true;
+                   }
+               }
+               else if (action == Action.createInstance || action == Action.updateInstance){
+                   // There is no entry for this vfModuleType with this version, if specified, in VF_MODULE table in Catalog DB.
+                   // This request cannot proceed
+                   msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, MSO_PROP_APIHANDLER_INFRA, "VF Module Type", "", MsoLogger.ErrorCode.DataError, "No VfModuleType found in DB");
+                   msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                   String serviceVersionText = "";
+                   if (asdcServiceModelVersion != null && !asdcServiceModelVersion.isEmpty ()) {
+                       serviceVersionText = " with version " + asdcServiceModelVersion;
+                   }
+                   Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                           MsoException.ServiceException,
+                           "VnfType " + msoRequest.getVnfType () + " and VF Module Model Name " + msoRequest.getVfModuleModelName() + serviceVersionText + " not found in MSO Catalog DB",
+                           ErrorNumbers.SVC_BAD_PARAMETER,
+                           null);
+                   msoRequest.createRequestRecord (Status.FAILED, action);
+                   msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "No matching vfModuleType found in DB");
+                   msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                   db.close();
+                   return response;
+               }
+           }
+
+           db.close();
+
+           String serviceInstanceId = "";
+           String vnfId = "";
+           String vfModuleId = "";
+           String volumeGroupId = "";
+           String networkId = "";
+           ServiceInstancesRequest siReq = msoRequest.getServiceInstancesRequest();
+
+           if(siReq.getServiceInstanceId () != null){
+               serviceInstanceId = siReq.getServiceInstanceId ();
+           }
+
+           if(siReq.getVnfInstanceId () != null){
+               vnfId = siReq.getVnfInstanceId ();
+           }
+
+           if(siReq.getVfModuleInstanceId () != null){
+               vfModuleId = siReq.getVfModuleInstanceId ();
+           }
+
+           if(siReq.getVolumeGroupInstanceId () != null){
+               volumeGroupId = siReq.getVolumeGroupInstanceId ();
+           }
+
+           if(siReq.getNetworkInstanceId () != null){
+               networkId = siReq.getNetworkInstanceId ();
+           }
+
+
+           requestId = msoRequest.getRequestId ();
+           msoLogger.debug ("requestId is: " + requestId);
+           msoLogger.debug ("About to insert a record");
+
+           try {
+               msoRequest.createRequestRecord (Status.PENDING, action);
+           } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "", MsoLogger.ErrorCode.SchemaError, "Exception while creating record in DB", e);
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                       MsoException.ServiceException,
+                       "Exception while creating record in DB " + e.getMessage(),
+                       ErrorNumbers.SVC_BAD_PARAMETER,
+                       null);
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while creating record in DB");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+               return response;
+           }
+
+           RequestClient requestClient = null;
+           HttpResponse response = null;
+           long subStartTime = System.currentTimeMillis();
+           try {
+               requestClient = RequestClientFactory.getRequestClient (recipeLookupResult.getOrchestrationURI (), props);
+               // Capture audit event
+               msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
+
+               System.out.println("URL : " + requestClient.getUrl ());
+
+               response = requestClient.post(requestId, isBaseVfModule, recipeLookupResult.getRecipeTimeout (), action.name (),
+                       serviceInstanceId, vnfId, vfModuleId, volumeGroupId, networkId,
+                       msoRequest.getServiceInstanceType (),
+                       msoRequest.getVnfType (), msoRequest.getVfModuleType (),
+                       msoRequest.getNetworkType (), requestJSON);
+
+               msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", recipeLookupResult.getOrchestrationURI (), null);
+           } catch (Exception e) {
+               msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", recipeLookupResult.getOrchestrationURI (), null);
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response resp = msoRequest.buildServiceErrorResponse (HttpStatus.SC_BAD_GATEWAY,
+                       MsoException.ServiceException,
+                       "Failed calling bpmn " + e.getMessage (),
+                       ErrorNumbers.SVC_NO_SERVER_RESOURCES,
+                       null);
+               alarmLogger.sendAlarm ("MsoConfigurationError",
+                       MsoAlarmLogger.CRITICAL,
+                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));
+               msoRequest.updateFinalStatus (Status.FAILED);
+               msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+               return resp;
+           }
+
+           if (response == null) {
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response resp = msoRequest.buildServiceErrorResponse (HttpStatus.SC_BAD_GATEWAY,
+                       MsoException.ServiceException,
+                       "bpelResponse is null",
+                       ErrorNumbers.SVC_NO_SERVER_RESOURCES,
+                       null);
+               msoRequest.updateFinalStatus (Status.FAILED);
+               msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Null response from BPEL");
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Null response from BPMN");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+               return resp;
+           }
+
+           ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
+           int bpelStatus = respHandler.getStatus ();
+
+           // BPEL accepted the request, the request is in progress
+           if (bpelStatus == HttpStatus.SC_ACCEPTED) {
+               String camundaJSONResponseBody = respHandler.getResponseBody ();
+               msoLogger.debug ("Received from Camunda: " + camundaJSONResponseBody);
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.IN_PROGRESS);
+               RequestsDatabase.updateInfraStatus (msoRequest.getRequestId (),
+                       Status.IN_PROGRESS.toString (),
+                       Constants.PROGRESS_REQUEST_IN_PROGRESS,
+                       Constants.MODIFIED_BY_APIHANDLER);
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "BPMN accepted the request, the request is in progress");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) camundaJSONResponseBody);
+               return Response.status (HttpStatus.SC_ACCEPTED).entity (camundaJSONResponseBody).build ();
+           } else {
+               List<String> variables = new ArrayList<String>();
+               variables.add(bpelStatus + "");
+               String camundaJSONResponseBody = respHandler.getResponseBody ();
+               if (camundaJSONResponseBody != null && !camundaJSONResponseBody.isEmpty ()) {
+                   msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                   Response resp =  msoRequest.buildServiceErrorResponse(bpelStatus,
+                           MsoException.ServiceException,
+                           "Request Failed due to BPEL error with HTTP Status= %1 " + '\n' + camundaJSONResponseBody,
+                           ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                           variables);
+                   msoRequest.updateFinalStatus (Status.FAILED);
+                   msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
+                   msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is failed");
+                   msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                   return resp;
+               } else {
+                   msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                   Response resp = msoRequest.buildServiceErrorResponse(bpelStatus,
+                           MsoException.ServiceException,
+                           "Request Failed due to BPEL error with HTTP Status= %1" ,
+                           ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                           variables);
+                   msoRequest.updateFinalStatus (Status.FAILED);
+                   msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is empty");
+                   msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPEL engine is empty");
+                   msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                   return resp;
+               }
+           }
+
+           //return Response.status (HttpStatus.SC_ACCEPTED).entity (serviceResponse).build ();
+           // return serviceResponse;
+       } catch (Exception e) {
+           msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communciate with Catalog DB", e);
+           msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+           Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                                                                                                                                 MsoException.ServiceException,
+                                                                                     "No communication to catalog DB " + e.getMessage (),
+                                                                  ErrorNumbers.SVC_NO_SERVER_RESOURCES,
+                                                                  null);
+           alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                  MsoAlarmLogger.CRITICAL,
+                                  Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB));
+           msoRequest.createRequestRecord (Status.FAILED,action);
+           msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with DB");
+           msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+           return response;
+       }
+       } 
+       
+       @GET
+       @Path("/orchestrationRequests/v2/{requestId}")
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response getOrchestrationRequest(@PathParam("requestId") String requestId) {
+               
+               GetOrchestrationResponse orchestrationResponse = new GetOrchestrationResponse();
+               
+               MsoRequest msoRequest = new MsoRequest (requestId);
+               
+               long startTime = System.currentTimeMillis ();
+               
+               InfraActiveRequests requestDB = null;
+        
+        try {
+                        requestDB = RequestsDatabase.getRequestFromInfraActive(requestId);
+                        
+            } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communciate with Request DB - Infra Request Lookup", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                                                                                                                         MsoException.ServiceException,
+                                                                                                                         e.getMessage (),
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null);
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with Request DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+               
+            }
+        
+        if(requestDB == null) {
+            Response resp = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NO_CONTENT,
+                                                                                                                MsoException.ServiceException,
+                                                                                                               "Orchestration RequestId " + requestId + " is not found in DB",                                                            
+                                                             ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                                                             null);
+            msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Null response from RequestDB when searching by RequestId");
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "Null response from RequestDB when searching by RequestId");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+            return resp;
+               
+        }
+  
+        Request request = mapInfraActiveRequestToRequest(requestDB);
+         
+        orchestrationResponse.setRequest(request);
+               
+        return Response.status(200).entity(orchestrationResponse).build();
+       }
+       
+       @GET
+       @Path("/orchestrationRequests/v2")
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response getOrchestrationRequest(@Context UriInfo ui) {
+               
+               long startTime = System.currentTimeMillis ();
+               
+               MsoRequest msoRequest = new MsoRequest();
+               
+               MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+               
+               List<InfraActiveRequests> activeRequests = null;
+               
+               GetOrchestrationListResponse orchestrationList = null;
+               
+               
+               try{
+               
+                       Map<String, List<String>> orchestrationMap = msoRequest.getOrchestrationFilters(queryParams);
+                       
+                       activeRequests = RequestsDatabase.getOrchestrationFiltersFromInfraActive(orchestrationMap);
+                       
+                       orchestrationList = new GetOrchestrationListResponse();
+
+                       List<RequestList> requestLists = new ArrayList<RequestList>();
+                                               
+                       for(InfraActiveRequests infraActive : activeRequests){
+                               
+                               Request request = mapInfraActiveRequestToRequest(infraActive);
+                               RequestList requestList = new RequestList();
+                               requestList.setRequest(request);
+
+                               requestLists.add(requestList);
+
+                       }
+                       
+                       orchestrationList.setRequestList(requestLists);
+
+               }catch(Exception e){
+                  msoLogger.debug ("Get Orchestration Request with Filters Failed : ", e);
+                  Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR, MsoException.ServiceException, 
+                          "Get Orchestration Request with Filters Failed.  " + e.getMessage(), 
+                          ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null);
+                  msoLogger.error (MessageEnum.APIH_GENERAL_EXCEPTION, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Get Orchestration Request with Filters Failed : " + e);
+                  msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataError, "Get Orchestration Request with Filters Failed");
+                  msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                  return response;
+               }
+               
+                       
+        return Response.status(200).entity(orchestrationList).build();
+       }
+
+       @POST
+    @Path("/v3/vnf-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageVnfRequestV3 (String reqXML) {
+       // Set logger parameters
+        MsoLogger.setServiceName ("VnfRequest");
+        return manageVnfRequestImpl (reqXML, Constants.SCHEMA_VERSION_V3);
+    }
+
+
+    @POST
+    @Path("/v2/vnf-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageVnfRequestV2 (String reqXML) {
+       // Set logger parameters
+        MsoLogger.setServiceName ("VnfRequest");
+        return manageVnfRequestImpl (reqXML, Constants.SCHEMA_VERSION_V2);
+    }
+
+    @POST
+    @Path("/v1/vnf-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageVnfRequestV1 (String reqXML) {
+
+        // Set logger parameters
+        MsoLogger.setServiceName ("VnfRequest");
+
+        return manageVnfRequestImpl (reqXML, Constants.SCHEMA_VERSION_V1);
+    }
+    
+    @POST
+    @Path("/v3/network-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageNetworkRequestV3 (String reqXML) {
+
+        // Set logger parameters
+        MsoLogger.setServiceName ("NetworkRequest");
+
+        return manageNetworkRequestImpl (reqXML, Constants.SCHEMA_VERSION_V3);
+    }
+
+    @POST
+    @Path("/v2/network-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageNetworkRequestV2 (String reqXML) {
+
+        // Set logger parameters
+        MsoLogger.setServiceName ("NetworkRequest");
+
+        return manageNetworkRequestImpl (reqXML, Constants.SCHEMA_VERSION_V2);
+    }
+    
+    @POST
+    @Path("/v1/network-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageNetworkRequestV1 (String reqXML) {
+
+        // Set logger parameters
+        MsoLogger.setServiceName ("NetworkRequest");
+
+        return manageNetworkRequestImpl (reqXML, Constants.SCHEMA_VERSION_V1);
+    }
+    
+    @POST
+    @Path("/v3/volume-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageVolumeRequestV3 (String reqXML) {
+       // Set logger parameters
+        MsoLogger.setServiceName ("VolumeRequest");
+        return manageVolumeRequestImpl (reqXML, Constants.SCHEMA_VERSION_V3);
+    }
+
+    @POST
+    @Path("/v2/volume-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageVolumeRequestV2 (String reqXML) {
+       // Set logger parameters
+        MsoLogger.setServiceName ("VolumeRequest");
+        return manageVolumeRequestImpl (reqXML, Constants.SCHEMA_VERSION_V2);
+    }
+
+    @POST
+    @Path("/v1/volume-request")
+    @Consumes("*/*")
+    @Produces("application/xml")
+    public Response manageVolumeRequestV1 (String reqXML) {
+
+        // Set logger parameters
+        MsoLogger.setServiceName ("VolumeRequest");
+
+        return manageVolumeRequestImpl (reqXML, Constants.SCHEMA_VERSION_V1);
+    }
+
+
+    private Response manageVnfRequestImpl (String reqXML, String version) {
+       String methodName = "VnfRequest";
+       props = loadMsoProperties ();
+        long startTime = System.currentTimeMillis ();
+
+        // Generate unique request id for the new request
+        UUID requestUUID = UUID.randomUUID ();
+
+        VnfMsoInfraRequest msoRequest = new VnfMsoInfraRequest (requestUUID.toString ());
+        MsoLogger.setLogContext (msoRequest.getRequestId (), null);
+
+        if (noProperties) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Exiting the transaction: Infra API Handler not started, properties file missing or invalid");
+            return NOT_STARTED_RESPONSE;
+        }
+
+        uriInfo.getRequestUri ();
+
+        if (reqXML == null) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "The content of the request is null");
+            return Response.status (HttpStatus.SC_NO_CONTENT).entity ("").build ();
+        }
+
+        String requestUri = uriInfo.getRequestUri ().toString ();
+        msoLogger.debug ("Incoming request received for pose VNFRequest:" + reqXML);
+
+        msoRequest.setRequestUri (requestUri);
+        msoLogger.debug ("Schema version: " + version);
+        try {
+            msoRequest.parse (reqXML, version, props);
+        } catch (Exception e) {
+            msoLogger.debug ("Validation failed: ", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseFailedValidation (HttpStatus.SC_BAD_REQUEST, e.getMessage ());
+            if (msoRequest.getRequestId () != null) {
+                msoLogger.debug ("Logging failed message to the database");
+                msoRequest.createRequestRecord (Status.FAILED);
+            }
+            msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, reqXML, "", "", MsoLogger.ErrorCode.SchemaError, "Exception when parsing reqXML", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Validation of the input request failed");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+        MsoLogger.setServiceName (MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo().getAction().name());
+        msoLogger.debug ("Update serviceName with detailed action info to:" + MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo().getAction().name());
+        if (msoRequest.getRequestInfo ().getAction () == org.openecomp.mso.apihandlerinfra.vnfbeans.ActionType.CREATE) {
+            // Check if this request is a duplicate of the one with the same vnfName
+            msoLogger.debug ("Checking for a duplicate with the same vnf-name");
+            InfraActiveRequests dup = null;
+            try {
+                dup = RequestsDatabase.checkDuplicateByVnfName (msoRequest.getVnfInputs ().getVnfName (),
+                                                                msoRequest.getRequestInfo ().getAction ().value (),
+                                                                "VNF");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "vnf-name", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for duplicated request", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for duplicated request");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND, "CREATE on the same VNF Name is already progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicates request - CREATE on the same VNF Name is already progress");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicates request - CREATE on the same VNF Name is already progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        } else {
+            // Check if this request is a duplicate of the one with the same vnfId
+            InfraActiveRequests dup = null;
+            msoLogger.debug ("Checking for a duplicate with the same vnf-id");
+            try {
+                dup = RequestsDatabase.checkDuplicateByVnfId (msoRequest.getVnfInputs ().getVnfId (),
+                                                              msoRequest.getRequestInfo ().getAction ().value (),
+                                                              "VNF");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "vnf-id", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for a duplicate request with the same vnf-id", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for a duplicate request with the same vnf-id");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                msoRequest.getRequestInfo ().getAction ().value ()
+                                                                  + " on the same VNF Id already in progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicated request on the same VNF Id already in progress");
+
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicated request on the same VNF Id already in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        }
+
+        String orchestrationURI = "";
+
+        try (CatalogDatabase db = new CatalogDatabase()) {
+
+            Recipe recipe = null;
+
+            if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+                // First get recipe for the service type given
+                if (msoRequest.getServiceType () != null
+                        && msoRequest.getServiceType ().length () > 0) {
+                    recipe = db.getVnfRecipe (msoRequest.getVnfInputs ().getVnfType (),
+                            msoRequest.getRequestInfo ().getAction ().value (),
+                            msoRequest.getServiceType ());
+                }
+                // If no recipe for the service type or no service type was given, look for recipe without service type
+                if (recipe == null) {
+                    recipe = db.getVnfRecipe (msoRequest.getVnfInputs ().getVnfType (),
+                            msoRequest.getRequestInfo ().getAction ().value (),
+                            null);
+                }
+            }
+            if (version.equals (Constants.SCHEMA_VERSION_V2) || version.equals (Constants.SCHEMA_VERSION_V3)) {
+                switch (msoRequest.getRequestInfo ().getAction ()) {
+                    case CREATE:
+                    case UPDATE:
+                    case DELETE:
+                        // First get recipe for the vnf type given
+                        recipe = db.getVnfRecipe (msoRequest.getVnfInputs ().getVnfType (),
+                                msoRequest.getRequestInfo ().getAction ().value ());
+
+                        // If no recipe for the vnf type is found, look for generic recipe with "*" vnf type
+                        if (recipe == null) {
+                            recipe = db.getVnfRecipe (Constants.VNF_TYPE_WILDCARD,
+                                    msoRequest.getRequestInfo ().getAction ().value ());
+                        }
+                        break;
+                    case CREATE_VF_MODULE:
+                    case UPDATE_VF_MODULE:
+                    case DELETE_VF_MODULE:
+                        // First get recipe for the vnf type/vf module model name through vf module id query
+                        recipe = db.getVfModuleRecipe (msoRequest.getVnfInputs ().getVnfType (), msoRequest.getVnfInputs ().getVfModuleModelName (),
+                                msoRequest.getRequestInfo ().getAction ().value ());
+
+                        // If no recipe is found, look for generic recipe with "*" vnf type
+                        if (recipe == null) {
+                            recipe = db.getVnfRecipeByVfModuleId (msoRequest.getVnfInputs ().getVfModuleId (),
+                                    Constants.VNF_TYPE_WILDCARD, msoRequest.getRequestInfo ().getAction ().value ());
+                        }
+                        // First get recipe for the vnf type given
+                        //recipe = db.getVnfRecipe (msoRequest.getVnfInputs ().getVnfType (),
+                        //     msoRequest.getRequestInfo ().getAction ().value ());
+
+                        // If no recipe for the vnf type is found, look for generic recipe with "*" vnf type
+                        //if (recipe == null) {
+                        //     recipe = db.getVnfRecipe (Constants.VNF_TYPE_WILDCARD,
+                        //                     msoRequest.getRequestInfo ().getAction ().value ());
+                        //
+                        //}
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+
+            if (recipe == null) {
+                msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, "VNF Recipe", "", "", MsoLogger.ErrorCode.DataError, "No recipe found in DB");
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                        ErrorNumbers.RECIPE_DOES_NOT_EXIST,
+                        null,
+                        "");
+                msoRequest.createRequestRecord (Status.FAILED);
+                db.close ();
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "No recipe found in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            orchestrationURI = recipe.getOrchestrationUri ();
+            msoLogger.debug ("Orchestration URI is: " + orchestrationURI);
+
+            // Retrieve additional info for Vf Modules from Catalog DB to send it to BPMN
+            switch (msoRequest.getRequestInfo ().getAction ()) {
+                case CREATE_VF_MODULE:
+                case UPDATE_VF_MODULE:
+                    String personaModelId = "";
+                    String personaModelVersion = "";
+                    String vnfPersonaModelId = "";
+                    String vnfPersonaModelVersion = "";
+                    Boolean isBase = false;
+                    String asdcServiceModelVersion = msoRequest.getVnfInputs ().getAsdcServiceModelVersion ();
+
+                    // Get VF Module-specific persona info and base module indicator
+                    VfModule vfm = null;
+                    String vfModuleType = msoRequest.getVnfInputs ().getVnfType () + "::" + msoRequest.getVnfInputs ().getVfModuleModelName ();
+                    if (asdcServiceModelVersion != null && !asdcServiceModelVersion.isEmpty ()) {
+                        vfm = db.getVfModuleType (vfModuleType, asdcServiceModelVersion);
+                    }
+                    else {
+                        vfm = db.getVfModuleType (vfModuleType);
+                    }
+                    if (vfm != null) {
+                        if (vfm.getIsBase() == 1) {
+                            isBase = true;
+                        }
+                        personaModelId = vfm.getModelInvariantUuid();
+                        personaModelVersion = vfm.getModelVersion();
+                        msoLogger.debug("Setting personaModelId to " + personaModelId +
+                                ", personaModelVersion to " + personaModelVersion);
+                    }
+                    // Get VNF-specific persona info
+                    VnfResource vnfr = null;
+                    if (asdcServiceModelVersion != null && !asdcServiceModelVersion.isEmpty ()) {
+                        vnfr = db.getVnfResource (msoRequest.getVnfInputs ().getVnfType (), asdcServiceModelVersion);
+                    }
+                    else {
+                        vnfr = db.getVnfResource (msoRequest.getVnfInputs ().getVnfType ());
+                    }
+                    if (vnfr != null) {
+                        vnfPersonaModelId = vnfr.getModelInvariantUuid ();
+                        vnfPersonaModelVersion = vnfr.getModelVersion();
+                        msoLogger.debug("Setting vnfPersonaModelId to " + vnfPersonaModelId +
+                                ", vnfPersonaModelVersion to " + vnfPersonaModelVersion);
+                    }
+
+                    msoRequest.addBPMNSpecificInputs(personaModelId, personaModelVersion, isBase,
+                            vnfPersonaModelId, vnfPersonaModelVersion);
+
+                    break;
+                default:
+                    break;
+            }
+
+            db.close ();
+
+            String requestId = msoRequest.getRequestId ();
+            msoLogger.debug ("requestId is: " + requestId);
+            msoLogger.debug ("About to insert a record");
+
+            try {
+                msoRequest.createRequestRecord (Status.PENDING);
+            } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "", MsoLogger.ErrorCode.SchemaError, "Exception while creating record in DB", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                        ErrorNumbers.COULD_NOT_WRITE_TO_REQUESTS_DB,
+                        null,
+                        "non-unique request-id specified");
+                // Cannot create a record of this request here, our communication with MSO DB just failed. Do not try
+                // to create a failed record
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while creating record in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+
+            msoLogger.debug("Request going to BPEL: " + msoRequest.getRequestXML ());
+
+            RequestClient requestClient = null;
+            HttpResponse response = null;
+            long subStartTime = System.currentTimeMillis();
+            try {
+                requestClient = RequestClientFactory.getRequestClient (orchestrationURI, props);
+                // Capture audit event
+                msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
+                response = requestClient.post (msoRequest.getRequestXML (),
+                        requestId,
+                        Integer.toString (recipe.getRecipeTimeout ()).toString (),
+                        version,
+                        null,
+                        null);
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", orchestrationURI, null);
+            } catch (Exception e) {
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", orchestrationURI, null);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_COMMUNICATION_TO_BPEL,
+                        null,
+                        e.getMessage ());
+                alarmLogger.sendAlarm ("MsoConfigurationError",
+                        MsoAlarmLogger.CRITICAL,
+                        Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            if (response == null) {
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_RESPONSE_FROM_BPEL,
+                        null,
+                        "bpelResponse is null");
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Null response from BPEL", "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Null response from BPEL");
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Null response from BPMN");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
+            int bpelStatus = respHandler.getStatus ();
+
+            // BPEL accepted the request, the request is in progress
+            if (bpelStatus == HttpStatus.SC_ACCEPTED) {
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                msoLogger.debug ("Received from BPEL: " + bpelXMLResponseBody);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.IN_PROGRESS);
+                RequestsDatabase.updateInfraStatus (msoRequest.getRequestId (),
+                        Status.IN_PROGRESS.toString (),
+                        Constants.PROGRESS_REQUEST_IN_PROGRESS,
+                        Constants.MODIFIED_BY_APIHANDLER);
+                Response resp = msoRequest.buildResponse (bpelStatus, null, null);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "BPMN accepted the request, the request is in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            } else {
+
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                if (bpelXMLResponseBody != null && !bpelXMLResponseBody.isEmpty ()) {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, bpelXMLResponseBody, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR,
+                            "Response from BPEL engine is failed with HTTP Status=" + bpelStatus, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is failed");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                } else {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, ErrorNumbers.ERROR_FROM_BPEL, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Response from BPEL engine is empty", "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is empty");
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPEL engine is empty");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                }
+            }
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communciate with Catalog DB", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                                                                   ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB,
+                                                                   null,
+                                                                   e.getMessage ());
+            alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                   MsoAlarmLogger.CRITICAL,
+                                   Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB));
+            msoRequest.createRequestRecord (Status.FAILED);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+    }
+
+    private Response manageNetworkRequestImpl (String reqXML, String version) {
+       String methodName = "NetworkRequest";
+
+       props = loadMsoProperties ();
+
+        long startTime = System.currentTimeMillis ();
+        if (noProperties) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Application not started, properties file missing or invalid");
+               return NOT_STARTED_RESPONSE;
+        }
+        uriInfo.getRequestUri ();
+
+        // Generate unique request id for the new request
+        UUID requestUUID = UUID.randomUUID ();
+
+        NetworkMsoInfraRequest msoRequest = new NetworkMsoInfraRequest (requestUUID.toString ());
+        MsoLogger.setLogContext (msoRequest.getRequestId (), null);
+
+        if (reqXML == null) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "The input Request is null");
+            return Response.status (HttpStatus.SC_NO_CONTENT).entity ("").build ();
+        }
+
+        String requestUri = uriInfo.getRequestUri ().toString ();
+
+        msoLogger.debug ("Incoming Request: " + reqXML);
+
+        msoRequest.setRequestUri (requestUri);
+        msoLogger.debug ("Schema version: " + version);
+        try {
+            msoRequest.parse (reqXML, version, props);
+        } catch (Exception e) {
+            msoLogger.debug ("Validation failed: ", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseFailedValidation (HttpStatus.SC_BAD_REQUEST, e.getMessage ());
+            if (msoRequest.getRequestId () != null) {
+                msoLogger.debug ("Logging failed message to the database");
+                msoRequest.createRequestRecord (Status.FAILED);
+            }
+            msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, reqXML, "", "", MsoLogger.ErrorCode.DataError, "Exception when parsing reqXML", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Validation of the input request failed");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+        MsoLogger.setServiceName (MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo().getAction().name());
+        msoLogger.debug ("Update serviceName with detailed action info to:" + MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo().getAction().name());
+        if (msoRequest.getRequestInfo ()
+                      .getAction () == org.openecomp.mso.apihandlerinfra.networkbeans.ActionType.CREATE) {
+            // Check if this request is a duplicate of the one with the same network Name
+            msoLogger.debug ("Checking for a duplicate with the same network-name");
+            InfraActiveRequests dup = null;
+            try {
+
+                dup = RequestsDatabase.checkDuplicateByVnfName (msoRequest.getNetworkInputs ().getNetworkName (),
+                                                                msoRequest.getRequestInfo ().getAction ().value (),
+                                                                "NETWORK");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "network-name", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for duplicated request", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for duplicated request");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                "CREATE on the same Network Name is already progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicates request - CREATE on the same Network Name is already progress");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicates request - CREATE on the same Network Name is already progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        } else {
+            // Check if this request is a duplicate of the one with the same networkId
+            InfraActiveRequests dup = null;
+            msoLogger.debug ("Checking for a duplicate with the same network-id");
+            try {
+                dup = RequestsDatabase.checkDuplicateByVnfId (msoRequest.getNetworkInputs ().getNetworkId (),
+                                                              msoRequest.getRequestInfo ().getAction ().value (),
+                                                              "NETWORK");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "network-id", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for a duplicate request with the same network-id", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for a duplicate request with the same network-id");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                msoRequest.getRequestInfo ().getAction ().value ()
+                                                                  + " on the same Network Id already in progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicated request on the same Network Id already in progress");
+
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicated request on the same Network Id already in progress.");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        }
+
+        String orchestrationURI = "";
+
+        // Query MSO Catalog DB
+        try (CatalogDatabase db = new CatalogDatabase()) {
+            Recipe recipe = null;
+
+            if (msoRequest.getServiceType () != null
+                    && msoRequest.getServiceType ().length () > 0) {
+                recipe = db.getNetworkRecipe (msoRequest.getNetworkInputs ().getNetworkType (),
+                        msoRequest.getRequestInfo ().getAction ().value (),
+                        msoRequest.getServiceType ());
+
+            }
+            if (recipe == null) {
+                recipe = db.getNetworkRecipe (msoRequest.getNetworkInputs ().getNetworkType (),
+                        msoRequest.getRequestInfo ().getAction ().value (),
+                        null);
+            }
+
+            if (recipe == null) {
+                msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, "VNF Recipe", "", "", MsoLogger.ErrorCode.DataError, "VNF Recipe attribute not found");
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                        ErrorNumbers.RECIPE_DOES_NOT_EXIST,
+                        null,
+                        "");
+                msoRequest.createRequestRecord (Status.FAILED);
+                db.close ();
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "No recipe found in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            orchestrationURI = recipe.getOrchestrationUri ();
+            msoLogger.debug ("Orchestration URI is: " + orchestrationURI);
+
+            String requestId = msoRequest.getRequestId ();
+            msoLogger.debug ("requestId is: " + requestId);
+            msoLogger.debug ("About to insert a record");
+
+            try {
+                msoRequest.createRequestRecord (Status.PENDING);
+            } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "", MsoLogger.ErrorCode.DataError, "Exception while creating record in DB", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                        ErrorNumbers.COULD_NOT_WRITE_TO_REQUESTS_DB,
+                        null,
+                        "non-unique request-id specified");
+                // Cannot create a record of this request here, our communication with MSO DB just failed. Do not try
+                // to create a failed record
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while creating record in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+
+            RequestClient requestClient = null;
+            HttpResponse response = null;
+            long subStartTime = System.currentTimeMillis();
+            try {
+                requestClient = RequestClientFactory.getRequestClient (orchestrationURI, props);
+                // Capture audit event
+                msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
+                response = requestClient.post (msoRequest.getRequestXML (),
+                        requestId,
+                        Integer.toString (recipe.getRecipeTimeout ()).toString (),
+                        version,
+                        null,
+                        null);
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", orchestrationURI, null);
+            } catch (Exception e) {
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", orchestrationURI, null);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_COMMUNICATION_TO_BPEL,
+                        null,
+                        e.getMessage ());
+                alarmLogger.sendAlarm ("MsoConfigurationError",
+                        MsoAlarmLogger.CRITICAL,
+                        Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            if (response == null) {
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_RESPONSE_FROM_BPEL,
+                        null,
+                        "bpelResponse is null");
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Null response from BPEL", "Camunda", "", MsoLogger.ErrorCode.DataError, "bpelResponse is null");
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is null");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
+            int bpelStatus = respHandler.getStatus ();
+
+            // BPEL accepted the request, the request is in progress
+            if (bpelStatus == HttpStatus.SC_ACCEPTED) {
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                msoLogger.debug ("Received from BPEL: " + bpelXMLResponseBody);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.IN_PROGRESS);
+                RequestsDatabase.updateInfraStatus (msoRequest.getRequestId (),
+                        Status.IN_PROGRESS.toString (),
+                        Constants.PROGRESS_REQUEST_IN_PROGRESS,
+                        Constants.MODIFIED_BY_APIHANDLER);
+                Response resp = msoRequest.buildResponse (bpelStatus, null, null);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "BPMN accepted the request, the request is in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            } else {
+
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                if (bpelXMLResponseBody != null && !bpelXMLResponseBody.isEmpty ()) {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, bpelXMLResponseBody, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR,
+                            "Response from BPEL engine is failed with HTTP Status=" + bpelStatus, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is with status Failed");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                } else {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, ErrorNumbers.ERROR_FROM_BPEL, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Response from BPEL engine is empty", "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is empty");
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPEL engine is empty");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                }
+            }
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception while communciate with Catalog DB", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.networkbeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                                                                   ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB,
+                                                                   null,
+                                                                   e.getMessage ());
+            alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                   MsoAlarmLogger.CRITICAL,
+                                   Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB));
+            msoRequest.createRequestRecord (Status.FAILED);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+    }
+
+    private Response manageVolumeRequestImpl (String reqXML, String version) {
+       String methodName = "VolumeRequest";
+       props = loadMsoProperties ();
+       
+        long startTime = System.currentTimeMillis ();
+        if (noProperties) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Application not started, properties file missing or invalid");
+               return NOT_STARTED_RESPONSE;
+        }
+
+        uriInfo.getRequestUri ();
+
+        // Generate unique request id for the new request
+        UUID requestUUID = UUID.randomUUID ();
+
+        VolumeMsoInfraRequest msoRequest = new VolumeMsoInfraRequest (requestUUID.toString ());
+
+        if (reqXML == null) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "The input request is null");
+            return Response.status (HttpStatus.SC_NO_CONTENT).entity ("").build ();
+        }
+
+        String requestUri = uriInfo.getRequestUri ().toString ();
+
+        msoLogger.debug ("Incoming Request: " + reqXML);
+
+        msoRequest.setRequestUri (requestUri);
+       
+        msoLogger.debug ("Schema version: " + version);
+        try {
+            msoRequest.parse (reqXML, version, props);
+        } catch (Exception e) {
+            msoLogger.debug ("Validation failed: ", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseFailedValidation (HttpStatus.SC_BAD_REQUEST, e.getMessage ());
+            if (msoRequest.getRequestId () != null) {
+                msoLogger.debug ("Logging failed message to the database");
+                msoRequest.createRequestRecord (Status.FAILED);
+            }
+            msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, reqXML, "", "", MsoLogger.ErrorCode.DataError, "Exception when parsing reqXML", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Validation of the input request failed");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+        MsoLogger.setServiceName (MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo ().getAction ().name ());
+        msoLogger.debug ("Update serviceName with detailed action info to:" + MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo ().getAction ().name ());
+        if (msoRequest.getRequestInfo ()
+                      .getAction () == org.openecomp.mso.apihandlerinfra.volumebeans.ActionType.CREATE) {
+            // Check if this request is a duplicate of the one with the same network Name
+            msoLogger.debug ("Checking for a duplicate with the same volume-name");
+            InfraActiveRequests dup = null;
+            try {
+
+                dup = RequestsDatabase.checkDuplicateByVnfName (msoRequest.getVolumeInputs ().getVolumeGroupName (),
+                                                                msoRequest.getRequestInfo ().getAction ().value (),
+                                                                "VOLUME");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "volume-group-name", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for duplicated request", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for duplicated request");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                "CREATE on the same Volume Group Name is already progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicates request - CREATE on the same Volume Group Name is already progress");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicates request - CREATE on the same Volume Group Name is already progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        } else {
+            // Check if this request is a duplicate of the one with the same volumeGroupId
+            InfraActiveRequests dup = null;
+            msoLogger.debug ("Checking for a duplicate with the same volume-group-id");
+            try {
+                dup = RequestsDatabase.checkDuplicateByVnfId (msoRequest.getVolumeInputs ().getVolumeGroupId (),
+                                                              msoRequest.getRequestInfo ().getAction ().value (),
+                                                              "VOLUME");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "volume-group-id", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for a duplicate request with the sam volume-group-id", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for a duplicate request with the sam volume-group-id");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                msoRequest.getRequestInfo ().getAction ().value ()
+                                                                  + " on the same Volume Group Id already in progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicated request on the same Volume Group Id already in progress");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicated request on the same Volume Group Id already in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        }
+
+        String orchestrationURI = "";
+
+        // Query MSO Catalog DB
+        try (CatalogDatabase db = new CatalogDatabase()) {
+
+            Recipe recipe = null;
+
+            if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+                if (msoRequest.getServiceType () != null
+                        && msoRequest.getServiceType ().length () > 0) {
+                    recipe = db.getVnfComponentsRecipe (msoRequest.getVolumeInputs ().getVnfType (),
+                            Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                            msoRequest.getRequestInfo ().getAction ().value (),
+                            msoRequest.getServiceType ());
+                }
+                if (recipe == null) {
+                    recipe = db.getVnfComponentsRecipe (msoRequest.getVolumeInputs ().getVnfType (),
+                            Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                            msoRequest.getRequestInfo ().getAction ().value (),
+                            null);
+                    // If no recipe for the vnf type is found, look for generic recipe with "*" vnf type
+                    if (recipe == null) {
+                        recipe = db.getVnfComponentsRecipe (Constants.VNF_TYPE_WILDCARD,
+                                Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                msoRequest.getRequestInfo ().getAction ().value (),
+                                null);
+                    }
+                }
+            }
+            else if (version.equals (Constants.SCHEMA_VERSION_V2) || version.equals (Constants.SCHEMA_VERSION_V3)) {
+                switch (msoRequest.getRequestInfo ().getAction ()) {
+                    case CREATE:
+                    case UPDATE:
+                    case DELETE:
+                        // First get recipe for the vnf type given
+                        recipe = db.getVnfComponentsRecipe (msoRequest.getVolumeInputs ().getVnfType (),
+                                Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                msoRequest.getRequestInfo ().getAction ().value (), null);
+
+                        // If no recipe for the vnf type is found, look for generic recipe with "*" vnf type
+                        if (recipe == null) {
+                            recipe = db.getVnfComponentsRecipe (Constants.VNF_TYPE_WILDCARD,
+                                    Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                    msoRequest.getRequestInfo ().getAction ().value (), null);
+                        }
+                        break;
+                    case CREATE_VF_MODULE_VOL:
+                    case UPDATE_VF_MODULE_VOL:
+                    case DELETE_VF_MODULE_VOL:
+                        // First get recipe for the vnf type given
+                        recipe = db.getVnfComponentsRecipe (msoRequest.getVolumeInputs ().getVnfType (),
+                                Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                msoRequest.getRequestInfo ().getAction ().value (), null);
+
+                        // If no recipe for the vnf type is found, look for generic recipe with "*" in vf module id
+                        if (recipe == null) {
+                            recipe = db.getVnfComponentsRecipeByVfModuleId (Constants.VNF_TYPE_WILDCARD,
+                                    Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                    msoRequest.getRequestInfo ().getAction ().value ());
+                        }
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+
+            if (recipe == null) {
+                msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, "VNF Recipe", "", "", MsoLogger.ErrorCode.DataError, "VNF Recipe not found in DB");
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                        ErrorNumbers.RECIPE_DOES_NOT_EXIST,
+                        null,
+                        "");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "VNF Recipe not found in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            orchestrationURI = recipe.getOrchestrationUri ();
+            msoLogger.debug ("Orchestration URI is: " + orchestrationURI);
+
+            String requestId = msoRequest.getRequestId ();
+            msoLogger.debug ("requestId is: " + requestId);
+            msoLogger.debug ("About to insert a record");
+
+            try {
+                msoRequest.createRequestRecord (Status.PENDING);
+            } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception in createRequestRecord", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                        ErrorNumbers.COULD_NOT_WRITE_TO_REQUESTS_DB,
+                        null,
+                        "non-unique request-id specified");
+                // Cannot create a record of this request here, our communication with MSO DB just failed. Do not try
+                // to create a failed record
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while creating record in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+
+            RequestClient requestClient = null;
+            HttpResponse response = null;
+            long subStartTime = System.currentTimeMillis();
+            try {
+                requestClient = RequestClientFactory.getRequestClient (orchestrationURI, props);
+                // Capture audit event
+                msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
+                response = requestClient.post (msoRequest.getRequestXML (),
+                        requestId,
+                        Integer.toString (recipe.getRecipeTimeout ()).toString (),
+                        version,
+                        null,
+                        null);
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", orchestrationURI, null);
+            } catch (Exception e) {
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", orchestrationURI, null);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_COMMUNICATION_TO_BPEL,
+                        null,
+                        e.getMessage ());
+                alarmLogger.sendAlarm ("MsoConfigurationError",
+                        MsoAlarmLogger.CRITICAL,
+                        Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            if (response == null) {
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_RESPONSE_FROM_BPEL,
+                        null,
+                        "bpelResponse is null");
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Null response from BPEL", "Camunda", "", MsoLogger.ErrorCode.DataError, "Null response from BPMN engine");
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Null response from BPMN engine");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
+            int bpelStatus = respHandler.getStatus ();
+
+            // BPEL accepted the request, the request is in progress
+            if (bpelStatus == HttpStatus.SC_ACCEPTED) {
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                msoLogger.debug ("Received from BPEL: " + bpelXMLResponseBody);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.IN_PROGRESS);
+                RequestsDatabase.updateInfraStatus (msoRequest.getRequestId (),
+                        Status.IN_PROGRESS.toString (),
+                        Constants.PROGRESS_REQUEST_IN_PROGRESS,
+                        Constants.MODIFIED_BY_APIHANDLER);
+                Response resp = msoRequest.buildResponse (bpelStatus, null, null);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "BPMN accepted the request, the request is in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            } else {
+
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                if (bpelXMLResponseBody != null && !bpelXMLResponseBody.isEmpty ()) {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, bpelXMLResponseBody, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR,
+                            "Response from BPEL engine is failed with HTTP Status=" + bpelStatus, "Camunda", "", MsoLogger.ErrorCode.DataError, "Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is with status Failed");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                } else {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, ErrorNumbers.ERROR_FROM_BPEL, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Response from BPEL engine is empty", "Camunda", "", MsoLogger.ErrorCode.DataError, "Response from BPEL engine is empty");
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is empty");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                }
+            }
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception while communciate with Catalog DB", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                                                                   ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB,
+                                                                   null,
+                                                                   e.getMessage ());
+            alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                   MsoAlarmLogger.CRITICAL,
+                                   Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB));
+            msoRequest.createRequestRecord (Status.FAILED);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+    }
+    
+    private Request mapInfraActiveRequestToRequest(InfraActiveRequests requestDB)  {
+       
+         
+        Request request = new Request();
+        
+        ObjectMapper mapper = new ObjectMapper();
+       // mapper.configure(Feature.WRAP_ROOT_VALUE, true);
+       
+       request.setRequestId(requestDB.getRequestId());
+       request.setRequestScope(requestDB.getRequestScope());
+       request.setRequestType(requestDB.getRequestAction());
+       
+       InstanceReferences ir = new InstanceReferences();
+       if(requestDB.getNetworkId() != null)
+               ir.setNetworkInstanceId(requestDB.getNetworkId());
+       if(requestDB.getNetworkName() != null)
+               ir.setNetworkInstanceName(requestDB.getNetworkName());
+       if(requestDB.getServiceInstanceId() != null)
+               ir.setServiceInstanceId(requestDB.getServiceInstanceId());
+       if(requestDB.getServiceInstanceName() != null)
+               ir.setServiceInstanceName(requestDB.getServiceInstanceName());
+       if(requestDB.getVfModuleId() != null)
+               ir.setVfModuleInstanceId(requestDB.getVfModuleId());
+       if(requestDB.getVfModuleName() != null)
+               ir.setVfModuleInstanceName(requestDB.getVfModuleName());
+       if(requestDB.getVnfId() != null)
+               ir.setVnfInstanceId(requestDB.getVnfId());
+       if(requestDB.getVnfName() != null)
+               ir.setVnfInstanceName(requestDB.getVnfName());
+       if(requestDB.getVolumeGroupId() != null)
+               ir.setVolumeGroupInstanceId(requestDB.getVolumeGroupId());
+       if(requestDB.getVolumeGroupName() != null)
+               ir.setVolumeGroupInstanceName(requestDB.getVolumeGroupName());
+
+       
+       request.setInstanceReferences(ir);
+       
+       String requestBody = requestDB.getRequestBody();
+              
+       RequestDetails requestDetails = null;
+       
+       try{
+               requestDetails = mapper.readValue(requestBody, RequestDetails.class);
+               
+       }catch(Exception e){
+               msoLogger.debug("Exception caught mapping requestBody to RequestDetails");
+       }
+               
+       request.setRequestDetails(requestDetails);
+       String startTimeStamp = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss").format(requestDB.getStartTime()) + " GMT";
+       request.setStartTime(startTimeStamp);
+       
+       RequestStatus status = new RequestStatus();
+       if(requestDB.getStatusMessage() != null){
+          status.setStatusMessage(requestDB.getStatusMessage());
+       }
+       
+       if(requestDB.getEndTime() != null){
+          String endTimeStamp = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss").format(requestDB.getEndTime()) + " GMT";
+          status.setFinishTime(endTimeStamp);
+       }
+
+        
+       if(requestDB.getRequestStatus() != null){
+          status.setRequestState(requestDB.getRequestStatus());
+       }
+       
+       if(requestDB.getProgress() != null){
+          status.setPercentProgress(requestDB.getProgress().intValue());
+       }
+       
+       request.setRequestStatus(status);
+       
+       return request;
+   }
+    
+    private RecipeLookupResult getServiceInstanceOrchestrationURI (CatalogDatabase db, MsoRequest msoRequest, Action action) throws Exception {
+
+       RecipeLookupResult recipeLookupResult = null;
+        // Query MSO Catalog DB
+               
+        if (msoRequest.getModelInfo().getModelType().equals(ModelType.service)) {
+               
+        // SERVICE REQUEST
+               // Construct the default service name
+            // TODO need to make this a configurable property
+            
+            String defaultServiceName = msoRequest.getRequestInfo().getSource() + "_DEFAULT";
+               Service serviceRecord = db.getServiceByName(defaultServiceName);
+               int serviceId = serviceRecord.getId();
+               ServiceRecipe recipe = db.getServiceRecipe(serviceId, action.name());
+               
+               if (recipe == null) {                 
+                return null;
+            }  
+               
+               recipeLookupResult = new RecipeLookupResult (recipe.getOrchestrationUri (), recipe.getRecipeTimeout ());                
+        }
+        else if (msoRequest.getModelInfo().getModelType().equals(ModelType.vfModule) ||
+                       msoRequest.getModelInfo().getModelType().equals(ModelType.volumeGroup)) {
+               
+               String vnfComponentType = msoRequest.getModelInfo().getModelType().name();
+               VnfComponentsRecipe recipe = null;
+               
+               if (action != Action.deleteInstance) {
+                       RelatedInstanceList[] instanceList = null;
+                       if (msoRequest.getServiceInstancesRequest().getRequestDetails() != null) {
+                               instanceList = msoRequest.getServiceInstancesRequest().getRequestDetails().getRelatedInstanceList();
+                       }
+                       
+                       String serviceModelName = null;
+                       String vnfModelName = null;
+                       String vfModuleModelName = null;
+                       String asdcServiceModelVersion = null;
+                       String modelVersion = null;
+                       
+                       if (instanceList != null) {
+                       
+                               for(RelatedInstanceList relatedInstanceList : instanceList){
+                                       
+                                       RelatedInstance relatedInstance = relatedInstanceList.getRelatedInstance();
+                                       if(relatedInstance.getModelInfo().getModelType().equals(ModelType.service)){
+                                               serviceModelName = relatedInstance.getModelInfo().getModelName();
+                                               asdcServiceModelVersion = relatedInstance.getModelInfo().getModelVersion();
+                                       }
+                                       
+                                       if(relatedInstance.getModelInfo().getModelType().equals(ModelType.vnf)){
+                                               vnfModelName = relatedInstance.getModelInfo().getModelCustomizationName();
+                                       }
+                                       
+                                       if(relatedInstance.getModelInfo().getModelType().equals(ModelType.vfModule) ||
+                                                       relatedInstance.getModelInfo().getModelType().equals(ModelType.volumeGroup)) {
+                                               vfModuleModelName = relatedInstance.getModelInfo().getModelName();
+                                               modelVersion = relatedInstance.getModelInfo().getModelVersion();
+                                       }                       
+                               }
+                       }
+                       
+                       String vnfType = serviceModelName + "/" + vnfModelName;
+                       
+                       // Try to find a recipe for a custom flow first
+                       recipe = db.getVnfComponentsRecipe(vnfType, vfModuleModelName, asdcServiceModelVersion, modelVersion, action.name());
+               }
+               
+               if (recipe == null) {
+                       // Find the default recipe record
+                       recipe = db.getVnfComponentsRecipeByVfModuleId("VID_DEFAULT", vnfComponentType, action.name());
+                       
+                       if (recipe == null) {                              
+                               return null;
+                       }
+            }                  
+               recipeLookupResult = new RecipeLookupResult (recipe.getOrchestrationUri (), recipe.getRecipeTimeout ());                
+               
+        }
+        else if (msoRequest.getModelInfo().getModelType().equals(ModelType.vnf)) {
+               // VNF REQUEST
+               // Construct the default vnf type
+            // TODO need to make this a configurable property
+            
+            String defaultVnfType = msoRequest.getRequestInfo().getSource() + "_DEFAULT";
+               
+               VnfRecipe recipe = db.getVnfRecipe(defaultVnfType, action.name());
+               
+               if (recipe == null) {               
+                return null;
+            }                  
+               recipeLookupResult = new RecipeLookupResult (recipe.getOrchestrationUri (), recipe.getRecipeTimeout ());        
+        }
+        else if (msoRequest.getModelInfo().getModelType().equals(ModelType.network)) {
+               // NETWORK REQUEST
+               // Construct the default network type
+            // TODO need to make this a configurable property
+            
+            String defaultNetworkType = msoRequest.getRequestInfo().getSource() + "_DEFAULT";
+               
+               Recipe recipe = db.getNetworkRecipe(defaultNetworkType, action.name());
+               
+               if (recipe == null) {                
+                return null;
+            }                  
+               recipeLookupResult = new RecipeLookupResult (recipe.getOrchestrationUri (), recipe.getRecipeTimeout ());   
+        }       
+        
+        if (recipeLookupResult != null) {
+               msoLogger.debug ("Orchestration URI is: " + recipeLookupResult.getOrchestrationURI() + ", recipe Timeout is: " + Integer.toString(recipeLookupResult.getRecipeTimeout ()));
+        }
+        else {
+               msoLogger.debug("No matching recipe record found");
+        }
+        return recipeLookupResult;
+    }
+}
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
new file mode 100644 (file)
index 0000000..774b9d6
--- /dev/null
@@ -0,0 +1,734 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+package org.openecomp.mso.apihandlerinfra;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+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.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.RequestClient;
+import org.openecomp.mso.apihandler.common.RequestClientFactory;
+import org.openecomp.mso.apihandler.common.ResponseHandler;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RelatedInstance;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RelatedInstanceList;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.RequestReferences;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.ServiceInstancesRequest;
+import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.ServiceInstancesResponse;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.Recipe;
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe;
+import org.openecomp.mso.db.catalog.beans.VnfRecipe;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/serviceInstances/v2")
+public class ServiceInstances {
+
+    private HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+
+    public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+    private static MsoJavaProperties props = MsoPropertiesUtils.loadMsoProperties ();
+
+    /**
+        * 
+        */
+       public ServiceInstances() {
+               // TODO Auto-generated constructor stub
+       }
+
+       @POST
+       @Path("/")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createServiceInstance(String request) {
+                               
+               Response response = serviceInstances(request, Action.createInstance, null);
+               
+               return response;
+       }
+       
+       @DELETE
+       @Path("/{serviceInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteServiceInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               return response;
+       }
+       
+       @POST
+       @Path("/{serviceInstanceId}/vnfs")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createVnfInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               Response response = serviceInstances(request, Action.createInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @DELETE
+       @Path("/{serviceInstanceId}/vnfs/{vnfInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteVnfInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                         @PathParam("vnfInstanceId") String vnfInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @POST
+       @Path("/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createVfModuleInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId, 
+                                                                                                                  @PathParam("vnfInstanceId") String vnfInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               Response response = serviceInstances(request, Action.createInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @PUT
+       @Path("/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response updateVfModuleInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId, 
+                                                                                                                  @PathParam("vnfInstanceId") String vnfInstanceId,
+                                                                                                                  @PathParam("vfmoduleInstanceId") String vfmoduleInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               instanceIdMap.put("vfModuleInstanceId", vfmoduleInstanceId);
+               Response response = serviceInstances(request, Action.updateInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @DELETE
+       @Path("/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteVfModuleInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                               @PathParam("vnfInstanceId") String vnfInstanceId,
+                                                                                                                                               @PathParam("vfmoduleInstanceId") String vfmoduleInstanceId) {
+               
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               instanceIdMap.put("vfModuleInstanceId", vfmoduleInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       
+       @POST
+       @Path("/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createVolumeGroupInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                      @PathParam("vnfInstanceId") String vnfInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               Response response = serviceInstances(request, Action.createInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @PUT
+       @Path("/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response updateVolumeGroupInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                                  @PathParam("vnfInstanceId") String vnfInstanceId,
+                                                                                                                                                  @PathParam("volumeGroupInstanceId") String volumeGroupInstanceId) {
+               
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               instanceIdMap.put("volumeGroupInstanceId", volumeGroupInstanceId);
+               Response response = serviceInstances(request, Action.updateInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @DELETE
+       @Path("/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteVolumeGroupInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                                  @PathParam("vnfInstanceId") String vnfInstanceId,
+                                                                                                                                                  @PathParam("volumeGroupInstanceId") String volumeGroupInstanceId) {
+               
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+               instanceIdMap.put("volumeGroupInstanceId", volumeGroupInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @POST
+       @Path("/{serviceInstanceId}/networks")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response createNetworkInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               Response response = serviceInstances(request, Action.createInstance, instanceIdMap);
+               
+               return response;
+       }
+       
+       @PUT
+       @Path("/{serviceInstanceId}/networks/{networkInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response updateNetworkInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                          @PathParam("networkInstanceId") String networkInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("networkInstanceId", networkInstanceId);
+               Response response = serviceInstances(request, Action.updateInstance, instanceIdMap);
+               
+               return response;
+       } 
+       
+       @DELETE
+       @Path("/{serviceInstanceId}/networks/{networkInstanceId}")
+       @Consumes(MediaType.APPLICATION_JSON)
+       @Produces(MediaType.APPLICATION_JSON)
+       public Response deleteNetworkInstance(String request, @PathParam("serviceInstanceId") String serviceInstanceId,
+                                                                                                                                          @PathParam("networkInstanceId") String networkInstanceId) {
+               
+               instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+               instanceIdMap.put("networkInstanceId", networkInstanceId);
+               Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap);
+               
+               return response;
+       } 
+    
+    
+       
+       private Response serviceInstances(String requestJSON, Action action, HashMap<String,String> instanceIdMap) {
+               
+          String requestId = UUIDChecker.generateUUID(msoLogger);
+          long startTime = System.currentTimeMillis ();
+          msoLogger.debug ("requestId is: " + requestId);
+          ServiceInstancesRequest sir = null;
+          
+          MsoRequest msoRequest = new MsoRequest (requestId);
+          
+          
+          try{
+               ObjectMapper mapper = new ObjectMapper();
+               sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
+               
+       } catch(Exception e){
+           msoLogger.debug ("Mapping of request to JSON object failed : ", e);
+           Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST, MsoException.ServiceException, 
+                   "Mapping of request to JSON object failed.  " + e.getMessage(), 
+                   ErrorNumbers.SVC_BAD_PARAMETER, null);
+           if (msoRequest.getRequestId () != null) {
+               msoLogger.debug ("Mapping of request to JSON object failed");
+               msoRequest.createRequestRecord (Status.FAILED, action);
+           }
+           msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.SchemaError, requestJSON, e);
+           msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Mapping of request to JSON object failed");
+           msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+           return response;
+       } 
+          
+         
+          try{
+                  msoRequest.parse(sir, instanceIdMap, action);
+       } catch (Exception e) {
+           msoLogger.debug ("Validation failed: ", e);
+           Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST, MsoException.ServiceException, 
+                   "Error parsing request.  " + e.getMessage(), 
+                   ErrorNumbers.SVC_BAD_PARAMETER, null);
+           if (msoRequest.getRequestId () != null) {
+               msoLogger.debug ("Logging failed message to the database");
+               msoRequest.createRequestRecord (Status.FAILED, action);
+           }
+           msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.SchemaError, requestJSON, e);
+           msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Validation of the input request failed");
+           msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+           return response;
+       }
+          
+          InfraActiveRequests dup = null;
+          String instanceName = sir.getRequestDetails().getRequestInfo().getInstanceName();
+          String requestScope = sir.getRequestDetails().getModelInfo().getModelType().name();
+       try {
+                dup = RequestsDatabase.checkInstanceNameDuplicate (instanceIdMap, instanceName, requestScope);
+                                
+          } catch (Exception e) {
+           msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "Error during duplicate check ", e);
+                       
+          Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR, MsoException.ServiceException, 
+                                                                 e.getMessage(), 
+                                                                 ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                                                                 null) ;
+          
+          
+          msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Error during duplicate check");
+          msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+          return response;
+       }
+              
+       if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                  String instance = null;
+                  if(instanceName != null){
+                          instance = instanceName;
+                  }else{
+                          instance = instanceIdMap.get(requestScope + "InstanceId");
+                  }
+                  String dupMessage = "Error: Locked instance - This " + requestScope + " (" + instance + ") " + "already has a request being worked with a status of " + dup.getRequestStatus() + " (RequestId - " + dup.getRequestId() + "). The existing request must finish or be cleaned up before proceeding.";
+           //List<String> variables = new ArrayList<String>();
+           //variables.add(dup.getRequestStatus());
+           
+           Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_CONFLICT, MsoException.ServiceException, 
+                   dupMessage, 
+                   ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                   null) ;
+           
+           
+           msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND, dupMessage, "", "", MsoLogger.ErrorCode.SchemaError, "Duplicate request - Subscriber already has a request for this service");
+           msoRequest.createRequestRecord (Status.FAILED, action);
+           msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, dupMessage);
+           msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+           return response;
+       }
+          
+          
+          ServiceInstancesResponse serviceResponse = new ServiceInstancesResponse();
+          
+          RequestReferences referencesResponse = new RequestReferences();
+          
+          referencesResponse.setRequestId(requestId);
+          
+          serviceResponse.setRequestReferences(referencesResponse);    
+                  
+       try (CatalogDatabase db = new CatalogDatabase()){
+
+           RecipeLookupResult recipeLookupResult = null;
+           try {
+               recipeLookupResult = getServiceInstanceOrchestrationURI (db, msoRequest, action);
+           } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "Exception while querying Catalog DB", e);
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                       MsoException.ServiceException,
+                       "Recipe could not be retrieved from catalog DB " + e.getMessage (),
+                       ErrorNumbers.SVC_GENERAL_SERVICE_ERROR,
+                       null);
+               alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                       MsoAlarmLogger.CRITICAL,
+                       Messages.errors.get (ErrorNumbers.ERROR_FROM_CATALOG_DB));
+               msoRequest.createRequestRecord (Status.FAILED,action);
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while querying Catalog DB");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+               db.close();
+               return response;
+           }
+
+           if (recipeLookupResult == null) {
+               msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError, "No recipe found in DB");
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                       MsoException.ServiceException,
+                       "Recipe does not exist in catalog DB",
+                       ErrorNumbers.SVC_GENERAL_SERVICE_ERROR,
+                       null);
+               msoRequest.createRequestRecord (Status.FAILED, action);
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "No recipe found in DB");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+               db.close();
+               return response;
+           }
+
+
+           Boolean isBaseVfModule = false;
+
+           if (msoRequest.getModelInfo().getModelType().equals(ModelType.vfModule)) {
+               String asdcServiceModelVersion = msoRequest.getAsdcServiceModelVersion ();
+
+               // Get VF Module-specific base module indicator
+               VfModule vfm = null;
+
+               if (asdcServiceModelVersion != null && !asdcServiceModelVersion.isEmpty ()) {
+                   vfm = db.getVfModuleType (msoRequest.getVfModuleType (), asdcServiceModelVersion);
+               }
+               else {
+                   vfm = db.getVfModuleType (msoRequest.getVfModuleType ());
+               }
+
+               if (vfm != null) {
+                   if (vfm.getIsBase() == 1) {
+                       isBaseVfModule = true;
+                   }
+               }
+               else if (action == Action.createInstance || action == Action.updateInstance){
+                   // There is no entry for this vfModuleType with this version, if specified, in VF_MODULE table in Catalog DB.
+                   // This request cannot proceed
+                   msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, MSO_PROP_APIHANDLER_INFRA, "VF Module Type", "", MsoLogger.ErrorCode.DataError, "No VfModuleType found in DB");
+                   msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                   String serviceVersionText = "";
+                   if (asdcServiceModelVersion != null && !asdcServiceModelVersion.isEmpty ()) {
+                       serviceVersionText = " with version " + asdcServiceModelVersion;
+                   }
+                   Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                           MsoException.ServiceException,
+                           "VnfType " + msoRequest.getVnfType () + " and VF Module Model Name " + msoRequest.getVfModuleModelName() + serviceVersionText + " not found in MSO Catalog DB",
+                           ErrorNumbers.SVC_BAD_PARAMETER,
+                           null);
+                   msoRequest.createRequestRecord (Status.FAILED, action);
+                   msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "No matching vfModuleType found in DB");
+                   msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                   db.close();
+                   return response;
+               }
+           }
+
+           db.close();
+
+           String serviceInstanceId = "";
+           String vnfId = "";
+           String vfModuleId = "";
+           String volumeGroupId = "";
+           String networkId = "";
+           ServiceInstancesRequest siReq = msoRequest.getServiceInstancesRequest();
+
+           if(siReq.getServiceInstanceId () != null){
+               serviceInstanceId = siReq.getServiceInstanceId ();
+           }
+
+           if(siReq.getVnfInstanceId () != null){
+               vnfId = siReq.getVnfInstanceId ();
+           }
+
+           if(siReq.getVfModuleInstanceId () != null){
+               vfModuleId = siReq.getVfModuleInstanceId ();
+           }
+
+           if(siReq.getVolumeGroupInstanceId () != null){
+               volumeGroupId = siReq.getVolumeGroupInstanceId ();
+           }
+
+           if(siReq.getNetworkInstanceId () != null){
+               networkId = siReq.getNetworkInstanceId ();
+           }
+
+
+           requestId = msoRequest.getRequestId ();
+           msoLogger.debug ("requestId is: " + requestId);
+           msoLogger.debug ("About to insert a record");
+
+           try {
+               msoRequest.createRequestRecord (Status.PENDING, action);
+           } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "", MsoLogger.ErrorCode.SchemaError, "Exception while creating record in DB", e);
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                       MsoException.ServiceException,
+                       "Exception while creating record in DB " + e.getMessage(),
+                       ErrorNumbers.SVC_BAD_PARAMETER,
+                       null);
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while creating record in DB");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+               return response;
+           }
+
+           RequestClient requestClient = null;
+           HttpResponse response = null;
+           long subStartTime = System.currentTimeMillis();
+           try {
+               requestClient = RequestClientFactory.getRequestClient (recipeLookupResult.getOrchestrationURI (), props);
+               // Capture audit event
+               msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
+
+               System.out.println("URL : " + requestClient.getUrl ());
+
+               response = requestClient.post(requestId, isBaseVfModule, recipeLookupResult.getRecipeTimeout (), action.name (),
+                       serviceInstanceId, vnfId, vfModuleId, volumeGroupId, networkId,
+                       msoRequest.getServiceInstanceType (),
+                       msoRequest.getVnfType (), msoRequest.getVfModuleType (),
+                       msoRequest.getNetworkType (), requestJSON);
+
+               msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", recipeLookupResult.getOrchestrationURI (), null);
+           } catch (Exception e) {
+               msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", recipeLookupResult.getOrchestrationURI (), null);
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response resp = msoRequest.buildServiceErrorResponse (HttpStatus.SC_BAD_GATEWAY,
+                       MsoException.ServiceException,
+                       "Failed calling bpmn " + e.getMessage (),
+                       ErrorNumbers.SVC_NO_SERVER_RESOURCES,
+                       null);
+               alarmLogger.sendAlarm ("MsoConfigurationError",
+                       MsoAlarmLogger.CRITICAL,
+                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));
+               msoRequest.updateFinalStatus (Status.FAILED);
+               msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+               return resp;
+           }
+
+           if (response == null) {
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+               Response resp = msoRequest.buildServiceErrorResponse (HttpStatus.SC_BAD_GATEWAY,
+                       MsoException.ServiceException,
+                       "bpelResponse is null",
+                       ErrorNumbers.SVC_NO_SERVER_RESOURCES,
+                       null);
+               msoRequest.updateFinalStatus (Status.FAILED);
+               msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Null response from BPEL");
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Null response from BPMN");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+               return resp;
+           }
+
+           ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
+           int bpelStatus = respHandler.getStatus ();
+
+           // BPEL accepted the request, the request is in progress
+           if (bpelStatus == HttpStatus.SC_ACCEPTED) {
+               String camundaJSONResponseBody = respHandler.getResponseBody ();
+               msoLogger.debug ("Received from Camunda: " + camundaJSONResponseBody);
+               msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.IN_PROGRESS);
+               RequestsDatabase.updateInfraStatus (msoRequest.getRequestId (),
+                       Status.IN_PROGRESS.toString (),
+                       Constants.PROGRESS_REQUEST_IN_PROGRESS,
+                       Constants.MODIFIED_BY_APIHANDLER);
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "BPMN accepted the request, the request is in progress");
+               msoLogger.debug ("End of the transaction, the final response is: " + (String) camundaJSONResponseBody);
+               return Response.status (HttpStatus.SC_ACCEPTED).entity (camundaJSONResponseBody).build ();
+           } else {
+               List<String> variables = new ArrayList<String>();
+               variables.add(bpelStatus + "");
+               String camundaJSONResponseBody = respHandler.getResponseBody ();
+               if (camundaJSONResponseBody != null && !camundaJSONResponseBody.isEmpty ()) {
+                   msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                   Response resp =  msoRequest.buildServiceErrorResponse(bpelStatus,
+                           MsoException.ServiceException,
+                           "Request Failed due to BPEL error with HTTP Status= %1 " + '\n' + camundaJSONResponseBody,
+                           ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                           variables);
+                   msoRequest.updateFinalStatus (Status.FAILED);
+                   msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
+                   msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is failed");
+                   msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                   return resp;
+               } else {
+                   msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                   Response resp = msoRequest.buildServiceErrorResponse(bpelStatus,
+                           MsoException.ServiceException,
+                           "Request Failed due to BPEL error with HTTP Status= %1" ,
+                           ErrorNumbers.SVC_DETAILED_SERVICE_ERROR,
+                           variables);
+                   msoRequest.updateFinalStatus (Status.FAILED);
+                   msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is empty");
+                   msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPEL engine is empty");
+                   msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                   return resp;
+               }
+           }
+
+           //return Response.status (HttpStatus.SC_ACCEPTED).entity (serviceResponse).build ();
+           // return serviceResponse;
+       } catch (Exception e) {
+           msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communciate with Catalog DB", e);
+           msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+           Response response = msoRequest.buildServiceErrorResponse (HttpStatus.SC_NOT_FOUND,
+                                                                                                                                 MsoException.ServiceException,
+                                                                                     "No communication to catalog DB " + e.getMessage (),
+                                                                  ErrorNumbers.SVC_NO_SERVER_RESOURCES,
+                                                                  null);
+           alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                  MsoAlarmLogger.CRITICAL,
+                                  Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB));
+           msoRequest.createRequestRecord (Status.FAILED,action);
+           msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with DB");
+           msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+           return response;
+       }
+       }
+       
+    private RecipeLookupResult getServiceInstanceOrchestrationURI (CatalogDatabase db, MsoRequest msoRequest, Action action) throws Exception {
+
+       RecipeLookupResult recipeLookupResult = null;
+        // Query MSO Catalog DB
+               
+        if (msoRequest.getModelInfo().getModelType().equals(ModelType.service)) {
+               
+        // SERVICE REQUEST
+               // Construct the default service name
+            // TODO need to make this a configurable property
+            
+            String defaultServiceName = msoRequest.getRequestInfo().getSource() + "_DEFAULT";
+               Service serviceRecord = db.getServiceByName(defaultServiceName);
+               int serviceId = serviceRecord.getId();
+               ServiceRecipe recipe = db.getServiceRecipe(serviceId, action.name());
+               
+               if (recipe == null) {                 
+                return null;
+            }  
+               
+               recipeLookupResult = new RecipeLookupResult (recipe.getOrchestrationUri (), recipe.getRecipeTimeout ());                
+        }
+        else if (msoRequest.getModelInfo().getModelType().equals(ModelType.vfModule) ||
+                       msoRequest.getModelInfo().getModelType().equals(ModelType.volumeGroup)) {
+               
+               String vnfComponentType = msoRequest.getModelInfo().getModelType().name();
+               VnfComponentsRecipe recipe = null;
+               
+               if (action != Action.deleteInstance) {
+                       RelatedInstanceList[] instanceList = null;
+                       if (msoRequest.getServiceInstancesRequest().getRequestDetails() != null) {
+                               instanceList = msoRequest.getServiceInstancesRequest().getRequestDetails().getRelatedInstanceList();
+                       }
+                       
+                       String serviceModelName = null;
+                       String vnfModelName = null;
+                       String vfModuleModelName = null;
+                       String asdcServiceModelVersion = null;
+                       String modelVersion = null;
+                       
+                       if (instanceList != null) {
+                       
+                               for(RelatedInstanceList relatedInstanceList : instanceList){
+                                       
+                                       RelatedInstance relatedInstance = relatedInstanceList.getRelatedInstance();
+                                       if(relatedInstance.getModelInfo().getModelType().equals(ModelType.service)){
+                                               serviceModelName = relatedInstance.getModelInfo().getModelName();
+                                               asdcServiceModelVersion = relatedInstance.getModelInfo().getModelVersion();
+                                       }
+                                       
+                                       if(relatedInstance.getModelInfo().getModelType().equals(ModelType.vnf)){
+                                               vnfModelName = relatedInstance.getModelInfo().getModelCustomizationName();
+                                       }
+                                       
+                                       if(relatedInstance.getModelInfo().getModelType().equals(ModelType.vfModule) ||
+                                                       relatedInstance.getModelInfo().getModelType().equals(ModelType.volumeGroup)) {
+                                               vfModuleModelName = relatedInstance.getModelInfo().getModelName();
+                                               modelVersion = relatedInstance.getModelInfo().getModelVersion();
+                                       }                       
+                               }
+                       }
+                       
+                       String vnfType = serviceModelName + "/" + vnfModelName;
+                       
+                       // Try to find a recipe for a custom flow first
+                       recipe = db.getVnfComponentsRecipe(vnfType, vfModuleModelName, asdcServiceModelVersion, modelVersion, action.name());
+               }
+               
+               if (recipe == null) {
+                       // Find the default recipe record
+                       recipe = db.getVnfComponentsRecipeByVfModuleId("VID_DEFAULT", vnfComponentType, action.name());
+                       
+                       if (recipe == null) {                              
+                               return null;
+                       }
+            }                  
+               recipeLookupResult = new RecipeLookupResult (recipe.getOrchestrationUri (), recipe.getRecipeTimeout ());                
+               
+        }
+        else if (msoRequest.getModelInfo().getModelType().equals(ModelType.vnf)) {
+               // VNF REQUEST
+               // Construct the default vnf type
+            // TODO need to make this a configurable property
+            
+            String defaultVnfType = msoRequest.getRequestInfo().getSource() + "_DEFAULT";
+               
+               VnfRecipe recipe = db.getVnfRecipe(defaultVnfType, action.name());
+               
+               if (recipe == null) {               
+                return null;
+            }                  
+               recipeLookupResult = new RecipeLookupResult (recipe.getOrchestrationUri (), recipe.getRecipeTimeout ());        
+        }
+        else if (msoRequest.getModelInfo().getModelType().equals(ModelType.network)) {
+               // NETWORK REQUEST
+               // Construct the default network type
+            // TODO need to make this a configurable property
+            
+            String defaultNetworkType = msoRequest.getRequestInfo().getSource() + "_DEFAULT";
+               
+               Recipe recipe = db.getNetworkRecipe(defaultNetworkType, action.name());
+               
+               if (recipe == null) {                
+                return null;
+            }                  
+               recipeLookupResult = new RecipeLookupResult (recipe.getOrchestrationUri (), recipe.getRecipeTimeout ());   
+        }       
+        
+        if (recipeLookupResult != null) {
+               msoLogger.debug ("Orchestration URI is: " + recipeLookupResult.getOrchestrationURI() + ", recipe Timeout is: " + Integer.toString(recipeLookupResult.getRecipeTimeout ()));
+        }
+        else {
+               msoLogger.debug("No matching recipe record found");
+        }
+        return recipeLookupResult;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Status.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Status.java
new file mode 100644 (file)
index 0000000..c98f90d
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+/*
+ * Enum for Status values returned by API Handler to Tail-F
+*/
+public enum Status {
+       PENDING,
+       IN_PROGRESS,
+       COMPLETE,
+       FAILED,
+       TIMEOUT 
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java
new file mode 100644 (file)
index 0000000..8a0a1f3
--- /dev/null
@@ -0,0 +1,104 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+import java.io.StringWriter;
+import java.util.List;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+
+import org.apache.http.HttpStatus;
+
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VfModuleModelName;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VfModuleModelNames;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ObjectFactory;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import org.openecomp.mso.logger.MsoLogger;
+
+@Path(Constants.VF_MODULE_MODEL_NAMES_PATH)
+public class VfModuleModelNamesHandler {
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+    private static final String LOG_SERVICE_NAME = "InfrastructurePortal:MSO-APIH.";
+    private static final String LOG_REPLY_NAME = "MSO-APIH:InfrastructurePortal.";
+
+    @GET
+    public Response getVfModuleModelNames () {
+        long startTime = System.currentTimeMillis ();
+        String methodName = "getVfModuleModelNames";
+        MsoLogger.setServiceName (LOG_SERVICE_NAME + methodName);
+        msoLogger.debug ("Incoming request received for vfModuleModelNames");       
+        List <VfModule> vfModules = null;
+        try (CatalogDatabase db = new CatalogDatabase()){
+            vfModules = db.getAllVfModules ();
+        } catch (Exception e) {
+            msoLogger.debug ("No connection to catalog DB", e);            
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "no connection to catalog DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + e.toString ());
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity (e.toString ()).build ();
+        }
+
+        if (vfModules == null) {           
+               msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "VfModule not found");
+            msoLogger.debug ("End of the transaction. VfModuleModelName not found the final response status: " + HttpStatus.SC_NOT_FOUND);
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+        VfModuleModelNames vfModuleModelNames = beansObjectFactory.createVfModuleModelNames ();
+        for (int i = 0; i < vfModules.size (); i++) {
+            VfModuleModelName vfModuleModelName = beansObjectFactory.createVfModuleModelName ();
+            VfModule vm = vfModules.get (i);
+            vfModuleModelName.setModelName (vm.getType ());
+            vfModuleModelName.setModelVersion (vm.getVersion ());
+            vfModuleModelName.setModelInvariantUuid (vm.getModelInvariantUuid ());
+            vfModuleModelName.setIsBase(vm.isBase());                 
+            vfModuleModelName.setDescription (vm.getDescription ());
+            vfModuleModelName.setId (String.valueOf (vm.getId ()));
+            vfModuleModelName.setAsdcServiceModelVersion(vm.getVersion ());
+            vfModuleModelNames.getVfModuleModelName ().add (vfModuleModelName);
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VfModuleModelNames.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (vfModuleModelNames, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Error marshalling", e);           
+        }
+
+        String response = stringWriter.toString ();        
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + response);
+        return Response.status (HttpStatus.SC_OK).entity (response).build ();
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java
new file mode 100644 (file)
index 0000000..7494747
--- /dev/null
@@ -0,0 +1,373 @@
+package org.openecomp.mso.apihandlerinfra;
+
+/*-
+ * #%L
+ * MSO
+ * %%
+ * Copyright (C) 2016 OPENECOMP - MSO
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+
+import org.apache.http.HttpStatus;
+
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.sax.SAXSource;
+
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfInputs;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfOutputs;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfRequest;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfRequests;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.requestsdb.InfraRequests;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/{version: v1|v2|v3}/vnf-request")
+public class VnfInfoHandler {
+
+    protected ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+
+    @GET
+    public Response queryFilters (@QueryParam("vnf-type") String vnfType,
+                                  @QueryParam("service-type") String serviceType,
+                                  @QueryParam("aic-node-clli") String aicNodeClli,
+                                  @QueryParam("tenant-id") String tenantId,
+                                  @QueryParam("volume-group-id") String volumeGroupId,
+                                  @QueryParam("volume-group-name") String volumeGroupName,
+                                  @QueryParam("vnf-name") String vnfName,
+                                  @PathParam("version") String version) {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("VNFQueryFilters");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for queryFilter with vnf-type:" + vnfType
+                                                               + " service-type:" + serviceType
+                                                               + " aic-node-clli:" + aicNodeClli
+                                                               + " tenant-id:" + tenantId
+                                                               + " volume-group-id:" + volumeGroupId
+                                                               + " volume-group-name:" + volumeGroupName
+                                                               + " vnf-name: " + vnfName);
+        Response response = null;
+        if (vnfType != null) {
+            response = this.getRequestList ("vnfType", vnfType, version);
+        } else {
+            response = queryGenericFilters (serviceType, aicNodeClli, tenantId, volumeGroupId, volumeGroupName, vnfName, version);
+        }
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    @GET
+    @Path(Constants.REQUEST_ID_PATH)
+    public Response getRequest (@PathParam("request-id") String requestId, @PathParam("version") String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("VNFGetRequest");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for getRequest with request-id:" + requestId + ", version = " + version);
+
+        Response response = getRequestGeneric (requestId, version);
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    protected MsoLogger getMsoLogger () {
+        return msoLogger;
+    }
+
+    protected String getRequestType () {
+        return VnfRequestType.VNF.toString ();
+    }
+
+    protected void fillVnfRequest (VnfRequest qr, InfraRequests ar, String version) {
+        VnfInputs vi = beansObjectFactory.createVnfInputs ();
+
+        if (ar.getVnfId () != null) {
+            vi.setVnfId (ar.getVnfId ());
+        }
+        if (ar.getVnfName () != null) {
+            vi.setVnfName (ar.getVnfName ());
+        }
+        if (ar.getVnfType () != null) {
+            vi.setVnfType (ar.getVnfType ());
+        }        
+        if (ar.getTenantId () != null) {
+            vi.setTenantId (ar.getTenantId ());
+        }
+        if (ar.getProvStatus () != null) {
+            vi.setProvStatus (ar.getProvStatus ());
+        }
+        if (ar.getVolumeGroupName () != null) {
+               vi.setVolumeGroupName (ar.getVolumeGroupName ());
+        }
+        if (ar.getVolumeGroupId () != null) {
+               vi.setVolumeGroupId (ar.getVolumeGroupId ());
+        }
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+               if (ar.getServiceType () != null) {
+                       vi.setServiceType (ar.getServiceType ());
+               }
+               if (ar.getAicNodeClli () != null) {
+                       vi.setAicNodeClli (ar.getAicNodeClli ());
+               }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }
+               if (ar.getVfModuleName () != null) {
+                       vi.setVfModuleName (ar.getVfModuleName ());
+               }
+               if (ar.getVfModuleId () != null) {
+                       vi.setVfModuleId (ar.getVfModuleId ());
+               }
+               if (ar.getVfModuleModelName () != null) {
+                       vi.setVfModuleModelName (ar.getVfModuleModelName ());
+               }               
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }
+               if (ar.getVfModuleName () != null) {
+                       vi.setVfModuleName (ar.getVfModuleName ());
+               }
+               if (ar.getVfModuleId () != null) {
+                       vi.setVfModuleId (ar.getVfModuleId ());
+               }
+               if (ar.getVfModuleModelName () != null) {
+                       vi.setVfModuleModelName (ar.getVfModuleModelName ());
+               }
+               if (ar.getServiceInstanceId () != null) {
+                       vi.setServiceInstanceId (ar.getServiceInstanceId ());
+               }
+        }
+        qr.setVnfInputs (vi);
+
+        qr.setVnfParams (ar.getVnfParams ());
+
+        try {
+            String vnfoutputs = ar.getVnfOutputs ();
+            if (vnfoutputs != null && vnfoutputs.length () > 0) {
+                msoLogger.debug ("Read VNF outputs: " + vnfoutputs);
+                VnfOutputs vnfOutput = null;
+
+                // Now unmarshal it into vnf outputs
+                try {
+                    JAXBContext jaxbContext = JAXBContext.newInstance (VnfOutputs.class);
+                    Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+                    InputSource inputSource = new InputSource (new StringReader (vnfoutputs));
+                    SAXSource source = new SAXSource (inputSource);
+
+                    vnfOutput = jaxbUnmarshaller.unmarshal (source, VnfOutputs.class).getValue ();
+
+                } catch (Exception e) {
+                    msoLogger.debug ("Validation failed", e);
+                    throw new ValidationException ("format for vnf outputs");
+                }
+
+                qr.setVnfOutputs (vnfOutput);
+            }
+        } catch (Exception e) {
+            msoLogger.debug ("exception reading vnfOutputs Clob", e);
+        }
+    }
+
+    protected Response queryGenericFilters (String serviceType, String aicNodeClli, String tenantId, String volumeGroupId, String volumeGroupName, String vnfName, String version) {
+        if (serviceType != null) {
+            return this.getRequestList ("serviceType", serviceType, version);
+        }
+        if (aicNodeClli != null) {
+            return this.getRequestList ("aicNodeClli", aicNodeClli, version);
+        }
+        if (tenantId != null) {
+            return this.getRequestList ("tenantId", tenantId, version);
+        }
+        if (volumeGroupId != null) {
+               return this.getRequestList ("volumeGroupId", volumeGroupId, version);
+        }
+        if (volumeGroupName != null) {
+               return this.getRequestList ("volumeGroupName", volumeGroupName, version);
+        }
+        if (vnfName != null) {
+               return this.getRequestList ("vnfName", vnfName, version);
+        }
+        return Response.status (HttpStatus.SC_BAD_REQUEST).entity ("").build ();
+    }
+
+    protected Response getRequestGeneric (String requestId, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest: " + requestId);
+
+        String responseString = null;
+
+        InfraActiveRequests activeReq = RequestsDatabase.getRequestFromInfraActive (requestId, getRequestType ());
+        if (activeReq != null) {
+            // build response for active
+            responseString = infraRequestsResponse (activeReq, version);
+            return Response.status (HttpStatus.SC_OK).entity (responseString).build ();
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    protected Response getRequestList (String queryAttribute, String queryValue, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest based on " + queryAttribute + ": " + queryValue);
+
+        List <InfraActiveRequests> activeReqList = RequestsDatabase.getRequestListFromInfraActive (queryAttribute,
+                                                                                                   queryValue,
+                                                                                                   getRequestType ());
+
+        List <VnfRequest> queryResponseList = new LinkedList <VnfRequest> ();
+
+        if (activeReqList != null) {
+            // build response for active
+            queryResponseList = infraRequestsResponses (activeReqList, version);
+
+        }
+
+        if (queryResponseList != null && !queryResponseList.isEmpty ()) {
+            String result = this.translateVnfRequests (queryResponseList);
+            return Response.status (HttpStatus.SC_OK).entity (result).build ();
+
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    private VnfRequest fillGeneric (InfraRequests ar) {
+        VnfRequest qr = beansObjectFactory.createVnfRequest ();
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (ar.getRequestId ());
+        ri.setAction (ActionType.fromValue (ar.getAction ()));
+        ri.setRequestStatus (RequestStatusType.fromValue (ar.getRequestStatus ()));
+        if (ar.getProgress () != null) {
+            ri.setProgress (ar.getProgress ().intValue ());
+        }
+        if (ar.getSource () != null) {
+            ri.setSource (ar.getSource ());
+        }
+
+        ri.setStartTime (ar.getStartTime ().toString ());
+        if (ar.getEndTime () != null) {
+            ri.setEndTime (ar.getEndTime ().toString ());
+        }
+
+        if (ar.getStatusMessage () != null) {
+            ri.setStatusMessage (ar.getStatusMessage ());
+        }
+        qr.setRequestInfo (ri);
+        return qr;
+    }
+
+    private List <VnfRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
+        List <VnfRequest> queryResponseList = new LinkedList <VnfRequest> ();
+
+        for (InfraRequests ar : arList) {
+            VnfRequest qr = fillGeneric (ar);
+            fillVnfRequest (qr, ar, version);
+            queryResponseList.add (qr);
+        }
+        return queryResponseList;
+    }
+
+    private String translateVnfRequests (List <VnfRequest> queryResponseList) {
+        VnfRequests queryResponses = new VnfRequests ();
+        for (int i = 0; i < queryResponseList.size (); i++) {
+            queryResponses.getVnfRequest ().add (queryResponseList.get (i));
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequests.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (queryResponses, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        return stringWriter.toString ();
+    }
+
+    private String infraRequestsResponse (InfraRequests ar, String version) {
+        VnfRequest qr = fillGeneric (ar);
+        fillVnfRequest (qr, ar, version);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (qr, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        String response = stringWriter.toString ();
+        return response;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfMsoInfraRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfMsoInfraRequest.java
new file mode 100644 (file)
index 0000000..e22d182
--- /dev/null
@@ -0,0 +1,714 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.hibernate.Session;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfInputs;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfRequest;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.requestsdb.HibernateUtil;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+
+public class VnfMsoInfraRequest {
+
+    private String requestId;
+    private String requestXML;
+    private String requestUri;
+    private VnfRequest vnfReq;
+    private RequestInfo rinfo;
+    private VnfInputs vnfInputs;
+    private String vnfParams;
+    private ActionType action;
+    private String errorMessage;
+    private String httpResponse;
+    private String responseBody;
+    private RequestStatusType status;
+    private long startTime;
+    private long progress = Constants.PROGRESS_REQUEST_RECEIVED;
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+    private static final String NOT_PROVIDED = "not provided";
+
+    VnfMsoInfraRequest (String requestId) {
+        this.requestId = requestId;
+        Calendar startTimeCalendar = Calendar.getInstance ();
+        this.startTime = startTimeCalendar.getTimeInMillis ();
+        MsoLogger.setLogContext (requestId, null);
+
+    }
+
+    // Parse request XML
+    void parse (String reqXML, String version, MsoJavaProperties props) throws ValidationException {
+
+        msoLogger.debug ("Validating the request");
+
+        this.requestXML = reqXML;
+
+        VnfRequest vnfReq = null;
+        boolean isWrongRootElement = false;
+
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequest.class);
+            Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+            InputSource inputSource = new InputSource (new StringReader (reqXML));
+            SAXSource source = new SAXSource (inputSource);
+
+            if (reqXML.contains ("vnf-request") && !reqXML.contains ("network-request")) {
+                vnfReq = jaxbUnmarshaller.unmarshal (source, VnfRequest.class).getValue ();
+            } else {
+                isWrongRootElement = true;
+            }
+
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_VNFREQUEST_VALIDATION_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception in format for vnf request ", e);
+            throw new ValidationException ("format for vnf request");
+        }
+
+        if (isWrongRootElement) {
+               msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR_REASON, "root element is not correct", "", "", MsoLogger.ErrorCode.DataError, "root element is not correct");
+            throw new ValidationException ("root element <vnf-request> expected");
+        }
+
+        if (vnfReq == null) {
+            throw new ValidationException ("vnf-request");
+        }
+        this.vnfReq = vnfReq;
+
+        this.rinfo = vnfReq.getRequestInfo ();
+
+        if (this.rinfo == null) {
+            throw new ValidationException ("request-info");
+        }
+        if (this.rinfo.getRequestId () != null) {
+            msoLogger.info (MessageEnum.APIH_GENERATED_REQUEST_ID, requestId, this.rinfo.getRequestId ());
+        }
+
+        action = this.rinfo.getAction ();
+        if (action == null) {
+            throw new ValidationException ("action");
+        }
+
+        this.vnfInputs = vnfReq.getVnfInputs ();
+        if (this.vnfInputs == null) {
+            throw new ValidationException ("vnf-inputs");
+        }
+        
+        // Verify that BPMN-specific elements are not in the APIH incoming request
+        if (this.vnfInputs.getPersonaModelId () != null || this.vnfInputs.getPersonaModelVersion () != null ||
+                       this.vnfInputs.getIsBaseVfModule () != null || this.vnfInputs.getVnfPersonaModelId () != null ||
+                       this.vnfInputs.getVnfPersonaModelVersion () != null) {
+                throw new ValidationException ("format for vnf request");              
+        }
+        // Verify that the elements correspond to the version
+        
+               
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+                       if (this.vnfInputs.getVfModuleName () != null || this.vnfInputs.getVfModuleId () != null ||
+                                       this.vnfInputs.getVfModuleModelName () != null || this.vnfInputs.getAsdcServiceModelVersion () != null ||
+                                       this.vnfInputs.getBackoutOnFailure() != null || this.vnfInputs.getAicCloudRegion() != null ||
+                                       this.vnfInputs.getServiceInstanceId  () != null) {
+                               throw new ValidationException ("format for v1 version of vnf request");
+                       }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+                       if (this.vnfInputs.getServiceType() != null || this.vnfInputs.getAicNodeClli() != null || this.vnfInputs.getServiceInstanceId  () != null) {
+                               throw new ValidationException ("format for v2 version of vnf request");
+                       }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (this.vnfInputs.getServiceType() != null || this.vnfInputs.getAicNodeClli() != null) {
+                       throw new ValidationException ("format for v3 version of vnf request");
+               }
+    }
+        
+        
+        if (!InfraUtils.isActionAllowed (props, "vnf", version, action.value ())) {
+               throw new ValidationException ("action allowable for version " + version + " of vnf request");          
+        }
+        
+        if ((ActionType.UPDATE.equals(action) || ActionType.DELETE.equals(action)) && this.vnfInputs.getVnfId () == null) {
+               throw new ValidationException("vnf-id");                
+        }
+             
+        if ((ActionType.UPDATE_VF_MODULE.equals (action) || ActionType.DELETE_VF_MODULE.equals (action)) && this.vnfInputs.getVfModuleId () == null) {
+            throw new ValidationException ("vf-module-id");
+        }
+        
+        if (ActionType.CREATE.equals (action) && this.vnfInputs.getVnfName () == null) {
+            throw new ValidationException ("vnf-name");
+        }         
+         
+        if (ActionType.CREATE_VF_MODULE.equals (action)) {
+               if (this.vnfInputs.getVfModuleName () == null) {
+                       throw new ValidationException ("vf-module-name");
+               }
+               if (!InfraUtils.isValidHeatName(this.vnfInputs.getVfModuleName ())) {
+                       throw new ValidationException ("vf-module-name: no value meeting heat stack name syntax requirements");
+               }
+        }        
+
+        if (this.vnfInputs.getVnfType () == null) {
+            throw new ValidationException ("vnf-type");
+        }
+        
+        if ((ActionType.CREATE_VF_MODULE.equals (action) || ActionType.UPDATE_VF_MODULE.equals (action) || ActionType.DELETE_VF_MODULE.equals (action)) && this.vnfInputs.getVfModuleModelName () == null) {
+            throw new ValidationException ("vf-module-model-name");
+        }        
+        
+        if (!version.equals(Constants.SCHEMA_VERSION_V1) && this.vnfInputs.getServiceId () == null) {
+               throw new ValidationException ("service-id ");
+        }
+        
+        if (this.vnfInputs.getServiceType () != null && this.vnfInputs.getServiceId () != null) {
+               throw new ValidationException ("service-type or service-id ");
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V1) && this.vnfInputs.getAicNodeClli () == null) {
+               throw new ValidationException ("aic-node-clli");
+        }
+        
+        if ((version.equals(Constants.SCHEMA_VERSION_V2) || version.equals(Constants.SCHEMA_VERSION_V3)) && (this.vnfInputs.getAicCloudRegion () == null || this.vnfInputs.getAicCloudRegion ().isEmpty())) {
+               throw new ValidationException ("aic-cloud-region");
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V3) && this.vnfInputs.getServiceInstanceId () == null) {
+               throw new ValidationException ("service-instance-id");
+        }
+
+        
+        if (this.vnfInputs.getTenantId () == null) {
+                throw new ValidationException ("tenant-id");            
+        }
+
+        Object vp = vnfReq.getVnfParams ();
+
+        if (vp != null) {
+            msoLogger.debug ("This object is not null");
+
+            Node node = (Node) vp;
+            Document doc = node.getOwnerDocument ();
+            this.vnfParams = domToStr (doc);
+        }
+
+        msoLogger.debug ("VNFParams: " + this.vnfParams);
+
+        msoLogger.debug ("Request valid");
+
+        // Rebuild the request string for BPEL to include request-id 
+        rinfo.setRequestId (this.requestId);        
+        this.vnfReq.setRequestInfo (rinfo);        
+      
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (this.vnfReq, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Exception: ", e);
+        }
+
+        this.requestXML = stringWriter.toString ();
+        msoLogger.debug("REQUEST XML to BPEL: " + this.requestXML);
+
+    }
+
+    public void createRequestRecord (Status status) {
+
+        Session session = null;
+        try {
+
+            session = HibernateUtil.getSessionFactory ().openSession ();
+            session.beginTransaction ();
+
+            InfraActiveRequests aq = new InfraActiveRequests ();
+            aq.setRequestId (requestId);
+            aq.setClientRequestId(rinfo.getRequestId());
+
+            Timestamp startTimeStamp = new Timestamp (Calendar.getInstance ().getTimeInMillis ());
+            if (rinfo != null) {
+                if (rinfo.getAction () != null) {
+                    aq.setAction (rinfo.getAction ().value ());
+                    aq.setRequestAction (RequestActionMap.getMappedRequestAction (rinfo.getAction ().value ()));
+                }
+                aq.setSource (rinfo.getSource ());
+            } else {
+                // Set up mandatory parameters
+                aq.setAction (NOT_PROVIDED);
+                aq.setRequestAction (NOT_PROVIDED);
+            }
+
+            aq.setRequestBody (this.requestXML);
+            aq.setRequestScope ("");
+
+            if (vnfInputs != null) {
+                if (vnfInputs.getVnfId () != null) {
+                    aq.setVnfId (vnfInputs.getVnfId ());
+                }
+                if (vnfInputs.getVnfName () != null) {
+                    aq.setVnfName (vnfInputs.getVnfName ());
+                }
+                if (vnfInputs.getVnfType () != null) {
+                    aq.setVnfType (vnfInputs.getVnfType ());
+                }
+                if (vnfInputs.getServiceInstanceId () != null) {
+                    aq.setServiceInstanceId (vnfInputs.getServiceInstanceId ());
+                }
+                if (vnfInputs.getServiceType () != null) {
+                    aq.setServiceType (vnfInputs.getServiceType ());
+                }
+                if (vnfInputs.getServiceId () != null) {
+                    aq.setAaiServiceId (vnfInputs.getServiceId ());
+                }
+                if (vnfInputs.getAicNodeClli () != null) {
+                    aq.setAicNodeClli (vnfInputs.getAicNodeClli ());
+                }
+                if (vnfInputs.getAicCloudRegion () != null) {
+                    aq.setAicCloudRegion (vnfInputs.getAicCloudRegion ());
+                }
+                if (vnfInputs.getTenantId () != null) {
+                    aq.setTenantId (vnfInputs.getTenantId ());
+                }
+                if (vnfInputs.getProvStatus () != null) {
+                    aq.setProvStatus (vnfInputs.getProvStatus ());
+                }
+                if (vnfInputs.getVolumeGroupName () != null) {
+                    aq.setVolumeGroupName (vnfInputs.getVolumeGroupName ());
+                }
+                if (vnfInputs.getVolumeGroupId () != null) {
+                    aq.setVolumeGroupId (vnfInputs.getVolumeGroupId ());
+                }
+                if (vnfInputs.getVfModuleId () != null) {
+                    aq.setVfModuleId (vnfInputs.getVfModuleId ());
+                }
+                if (vnfInputs.getVfModuleName () != null) {
+                    aq.setVfModuleName (vnfInputs.getVfModuleName ());
+                }
+                if (vnfInputs.getVfModuleModelName () != null) {
+                    aq.setVfModuleModelName (vnfInputs.getVfModuleModelName ());
+                }
+                
+                if (vnfInputs.getVfModuleName () != null || vnfInputs.getVfModuleId () != null) {
+                       aq.setRequestScope (ModelType.vfModule.name ());
+                }
+                else {
+                       aq.setRequestScope (ModelType.vnf.name ());
+                }
+
+
+            }
+
+            aq.setStartTime (startTimeStamp);
+            aq.setRequestStatus (status.toString ());
+            aq.setLastModifiedBy (Constants.MODIFIED_BY_APIHANDLER);
+            aq.setRequestType ("VNF");
+
+            if (vnfParams != null) {
+                msoLogger.debug ("Storing vnfParams: " + vnfParams);
+                aq.setVnfParams (this.vnfParams);
+            }
+
+            if ((status == Status.FAILED) || (status == Status.COMPLETE)) {
+                aq.setStatusMessage (this.errorMessage);
+                aq.setResponseBody (this.responseBody);
+
+                Calendar endTime = Calendar.getInstance ();
+                Timestamp endTimeStamp = new Timestamp (endTime.getTimeInMillis ());
+                aq.setEndTime (endTimeStamp);
+            }
+                
+            aq.setProgress (this.progress);
+            
+
+            msoLogger.debug ("About to insert a record");
+
+            session.save (aq);
+            session.getTransaction ().commit ();
+            session.close ();
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_INSERT_EXC, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception in createRequestRecord", e);
+            if (session != null) {
+                session.close ();
+            }
+            if (!status.equals (Status.FAILED)) {
+                throw e;
+            }
+        }
+    }
+
+    public void updateFinalStatus (Status status) {
+        int result = 0;
+        try {
+            result = RequestsDatabase.updateInfraFinalStatus (requestId,
+                                                              status.toString (),
+                                                              this.errorMessage,
+                                                              this.progress,
+                                                              this.responseBody,
+                                                              Constants.MODIFIED_BY_APIHANDLER);
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_UPDATE_EXC, e.getMessage (), "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception in updateFinalStatus");
+            msoLogger.debug ("Exception: ", e);
+        }
+    }
+
+    public Response buildResponse (int httpResponseCode, String errorCode, InfraActiveRequests inProgress) {
+        return buildResponseWithError (httpResponseCode, errorCode, inProgress, null);
+    }
+
+    public Response buildResponseWithError (int httpResponseCode,
+                                            String errorCode,
+                                            InfraActiveRequests inProgress,
+                                            String errorString) {
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+        VnfRequest vr = beansObjectFactory.createVnfRequest ();
+
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+
+        ri.setRequestId (requestId);
+        ri.setRequestStatus (this.status);
+        ri.setAction (this.rinfo.getAction ());
+        ri.setSource (this.rinfo.getSource ());
+
+        String errorMsg = null;
+        if (errorCode != null) {
+            // If error code is actually an XML error response from BPEL, treat it specially:
+            if (!Messages.errors.containsKey (errorCode)) {
+                if (errorCode.length () > 300) {
+                    errorMsg = errorCode.substring (0, 299);
+                } else {
+                    errorMsg = errorCode;
+                }
+
+            } else {
+
+                if (inProgress == null) {
+                    if (errorCode.equals (ErrorNumbers.RECIPE_DOES_NOT_EXIST)) {
+                        errorMsg = String.format (Messages.errors.get (errorCode), "vnf", errorString);
+                    } else {
+                        errorMsg = String.format (Messages.errors.get (errorCode), errorString);
+                    }
+                } else if (errorCode.equals (ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS)) {
+                    errorMsg = String.format (Messages.errors.get (errorCode),
+                                              "vnf",
+                                              inProgress.getVnfName (),
+                                              inProgress.getRequestStatus (),
+                                              "vnf");
+                } else if (errorCode.equals (ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID)) {
+                    errorMsg = String.format (Messages.errors.get (errorCode),
+                                              "vnf",
+                                              inProgress.getVnfId (),
+                                              inProgress.getRequestStatus (),
+                                              inProgress.getAction (),
+                                              "vnf");
+                }
+            }
+
+            ri.setStatusMessage (errorMsg);
+            this.errorMessage = errorMsg;
+        }
+        ri.setProgress ((int) this.progress);
+
+        Date startDate = new Date (this.startTime);
+        SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss.SSS");
+        String startTimeString = sdf.format (startDate);
+
+        ri.setStartTime (startTimeString);
+        
+        if (this.progress == Constants.PROGRESS_REQUEST_COMPLETED) {
+               ri.setEndTime(startTimeString);
+        }
+
+        vr.setRequestInfo (ri);
+        
+        this.vnfInputs.setIsBaseVfModule(null);
+        this.vnfInputs.setPersonaModelId(null);
+        this.vnfInputs.setPersonaModelVersion(null);
+        this.vnfInputs.setVnfPersonaModelId(null);
+        this.vnfInputs.setVnfPersonaModelVersion(null);
+
+        vr.setVnfInputs (this.vnfInputs);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (vr, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Exception: ", e);
+        }
+
+        String response = stringWriter.toString ();
+
+        this.httpResponse = Integer.toString (httpResponseCode);
+        this.responseBody = response;
+        
+        
+        // Log the failed request into the MSO Requests database
+
+        return Response.status (httpResponseCode).entity (response).build ();
+
+    }
+
+    public Response buildResponseFailedValidation (int httpResponseCode, String exceptionMessage) {
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+        VnfRequest vr = beansObjectFactory.createVnfRequest ();
+
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (requestId);
+
+        if (this.rinfo != null) {
+            if (this.rinfo.getAction () != null) {
+                ri.setAction (this.rinfo.getAction ());
+            } else {
+                ri.setAction (ActionType.NOT_PROVIDED);
+            }
+            if (this.rinfo.getSource () != null) {
+                ri.setSource (this.rinfo.getSource ());
+            }
+        } else {
+            ri.setAction (ActionType.NOT_PROVIDED);
+        }
+
+        // Nothing more is expected for this request
+
+        String errorMsg = String.format (Messages.errors.get (ErrorNumbers.REQUEST_FAILED_SCHEMA_VALIDATION
+                                                              + "_service"),
+                                         exceptionMessage);
+        ri.setStatusMessage (errorMsg);
+        this.errorMessage = errorMsg;
+
+        ri.setProgress ((int) this.progress);
+        ri.setRequestStatus (RequestStatusType.FAILED);
+        Date startDate = new Date (this.startTime);
+        SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss.SSS");
+        String startTimeString = sdf.format (startDate);
+
+        ri.setStartTime (startTimeString);
+        ri.setEndTime(startTimeString);
+        
+        vr.setRequestInfo (ri);
+
+        vr.setVnfInputs (this.vnfInputs);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (vr, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Error marshalling", e);
+        }
+
+        String response = stringWriter.toString ();
+
+        this.httpResponse = Integer.toString (httpResponseCode);
+        this.responseBody = response;
+
+        return Response.status (httpResponseCode).entity (response).build ();
+    }
+
+    public String getRequestUri () {
+        return requestUri;
+    }
+
+    public void setRequestUri (String requestUri) {
+        this.requestUri = requestUri;
+    }
+
+    public VnfInputs getVnfInputs () {
+        return vnfInputs;
+    }
+
+    public RequestInfo getRequestInfo () {
+        return rinfo;
+    }
+
+    public String getResponseBody () {
+        return responseBody;
+    }
+
+    public void setResponseBody (String responseBody) {
+        this.responseBody = responseBody;
+    }
+
+    public String getHttpResponse () {
+        return httpResponse;
+    }
+
+    public void setHttpResponse (String httpResponse) {
+        this.httpResponse = httpResponse;
+    }
+
+    public String getRequestId () {
+        return requestId;
+    }
+
+    public String getRequestXML () {
+        return requestXML;
+    }
+
+    public void setRequestXML (String requestXML) {
+        this.requestXML = requestXML;
+    }
+
+    public RequestStatusType getStatus () {
+        return status;
+    }
+    
+    public String getServiceType () {
+       if (this.vnfInputs.getServiceType () != null) 
+               return this.vnfInputs.getServiceType ();
+       if (this.vnfInputs.getServiceId () != null) 
+               return this.vnfInputs.getServiceId ();
+       return null;
+    }
+
+    public void setStatus (RequestStatusType status) {
+        this.status = status;
+        switch (status) {
+        case FAILED:
+        case COMPLETE:
+               this.progress = Constants.PROGRESS_REQUEST_COMPLETED;
+               break;
+        case IN_PROGRESS:
+               this.progress = Constants.PROGRESS_REQUEST_IN_PROGRESS;
+               break;
+        }
+    }
+
+    public static String domToStr (Document doc) {
+        if (doc == null) {
+            return null;
+        }
+
+        try {
+            StringWriter sw = new StringWriter ();
+            StreamResult sr = new StreamResult (sw);
+            TransformerFactory tf = TransformerFactory.newInstance ();
+            Transformer t = tf.newTransformer ();
+            t.setOutputProperty (OutputKeys.STANDALONE, "yes");
+            NodeList nl = doc.getDocumentElement ().getChildNodes ();
+            DOMSource source = null;
+            for (int x = 0; x < nl.getLength (); x++) {
+                Node e = nl.item (x);
+                if (e instanceof Element) {
+                    source = new DOMSource (e);
+                    break;
+                }
+            }
+            if (source != null) {
+                t.transform (source, sr);
+
+                String s = sw.toString ();
+                return s;
+            }
+
+            return null;
+
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DOM2STR_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception in domToStr", e);
+        }
+        return null;
+    }
+    
+    public void addBPMNSpecificInputs(String personaModelId, String personaModelVersion, Boolean isBaseVfModule,
+                       String vnfPersonaModelId, String vnfPersonaModelVersion) {
+       vnfInputs.setPersonaModelId(personaModelId);
+       vnfInputs.setPersonaModelVersion(personaModelVersion);
+       vnfInputs.setIsBaseVfModule(isBaseVfModule);
+       vnfInputs.setVnfPersonaModelId(vnfPersonaModelId);
+       vnfInputs.setVnfPersonaModelVersion(vnfPersonaModelVersion);
+       
+       this.vnfReq.setVnfInputs(vnfInputs);
+                  
+          StringWriter stringWriter = new StringWriter ();
+          try {
+              JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequest.class);
+              Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+              // output pretty printed
+              jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+              jaxbMarshaller.marshal (this.vnfReq, stringWriter);
+
+          } catch (JAXBException e) {
+              msoLogger.debug ("Exception: ", e);
+          }
+
+          this.requestXML = stringWriter.toString ();
+          msoLogger.debug("REQUEST XML to BPEL: " + this.requestXML);
+       
+       
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java
new file mode 100644 (file)
index 0000000..617172b
--- /dev/null
@@ -0,0 +1,804 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+
+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.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.sax.SAXSource;
+
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.RequestClient;
+import org.openecomp.mso.apihandler.common.RequestClientFactory;
+import org.openecomp.mso.apihandler.common.ResponseHandler;
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfInputs;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfOutputs;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfRequest;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfRequests;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.Recipe;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.requestsdb.InfraRequests;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/{version: v1|v2|v3}/vnf-request")
+public class VnfRequestHandler {
+
+    @Context
+    private UriInfo uriInfo;
+
+    protected ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+    public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+
+    private static MsoJavaProperties props = MsoPropertiesUtils.loadMsoProperties ();
+
+    private static final String NOT_FOUND = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not started, properties file missing or invalid or Database Connection failed</body></html>";
+
+    private static final Response NOT_STARTED_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+            .entity (NOT_FOUND)
+            .build ();
+
+    @GET
+    public Response queryFilters (@QueryParam("vnf-type") String vnfType,
+                                  @QueryParam("service-type") String serviceType,
+                                  @QueryParam("aic-node-clli") String aicNodeClli,
+                                  @QueryParam("tenant-id") String tenantId,
+                                  @QueryParam("volume-group-id") String volumeGroupId,
+                                  @QueryParam("volume-group-name") String volumeGroupName,
+                                  @QueryParam("vnf-name") String vnfName,
+                                  @PathParam("version") String version) {
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("VNFQueryFilters");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for queryFilter with vnf-type:" + vnfType
+                                                               + " service-type:" + serviceType
+                                                               + " aic-node-clli:" + aicNodeClli
+                                                               + " tenant-id:" + tenantId
+                                                               + " volume-group-id:" + volumeGroupId
+                                                               + " volume-group-name:" + volumeGroupName
+                                                               + " vnf-name: " + vnfName);
+        Response response = null;
+        if (vnfType != null) {
+            response = this.getRequestList ("vnfType", vnfType, version);
+        } else {
+            response = queryGenericFilters (serviceType, aicNodeClli, tenantId, volumeGroupId, volumeGroupName, vnfName, version);
+        }
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    @GET
+    @Path(Constants.REQUEST_ID_PATH)
+    public Response getRequest (@PathParam("request-id") String requestId, @PathParam("version") String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("VNFGetRequest");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for getRequest with request-id:" + requestId + ", version = " + version);
+
+        Response response = getRequestGeneric (requestId, version);
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    protected MsoLogger getMsoLogger () {
+        return msoLogger;
+    }
+
+    protected String getRequestType () {
+        return VnfRequestType.VNF.toString ();
+    }
+
+    protected void fillVnfRequest (VnfRequest qr, InfraRequests ar, String version) {
+        VnfInputs vi = beansObjectFactory.createVnfInputs ();
+
+        if (ar.getVnfId () != null) {
+            vi.setVnfId (ar.getVnfId ());
+        }
+        if (ar.getVnfName () != null) {
+            vi.setVnfName (ar.getVnfName ());
+        }
+        if (ar.getVnfType () != null) {
+            vi.setVnfType (ar.getVnfType ());
+        }        
+        if (ar.getTenantId () != null) {
+            vi.setTenantId (ar.getTenantId ());
+        }
+        if (ar.getProvStatus () != null) {
+            vi.setProvStatus (ar.getProvStatus ());
+        }
+        if (ar.getVolumeGroupName () != null) {
+               vi.setVolumeGroupName (ar.getVolumeGroupName ());
+        }
+        if (ar.getVolumeGroupId () != null) {
+               vi.setVolumeGroupId (ar.getVolumeGroupId ());
+        }
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+               if (ar.getServiceType () != null) {
+                       vi.setServiceType (ar.getServiceType ());
+               }
+               if (ar.getAicNodeClli () != null) {
+                       vi.setAicNodeClli (ar.getAicNodeClli ());
+               }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }
+               if (ar.getVfModuleName () != null) {
+                       vi.setVfModuleName (ar.getVfModuleName ());
+               }
+               if (ar.getVfModuleId () != null) {
+                       vi.setVfModuleId (ar.getVfModuleId ());
+               }
+               if (ar.getVfModuleModelName () != null) {
+                       vi.setVfModuleModelName (ar.getVfModuleModelName ());
+               }               
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }
+               if (ar.getVfModuleName () != null) {
+                       vi.setVfModuleName (ar.getVfModuleName ());
+               }
+               if (ar.getVfModuleId () != null) {
+                       vi.setVfModuleId (ar.getVfModuleId ());
+               }
+               if (ar.getVfModuleModelName () != null) {
+                       vi.setVfModuleModelName (ar.getVfModuleModelName ());
+               }
+               if (ar.getServiceInstanceId () != null) {
+                       vi.setServiceInstanceId (ar.getServiceInstanceId ());
+               }
+        }
+        qr.setVnfInputs (vi);
+
+        qr.setVnfParams (ar.getVnfParams ());
+
+        try {
+            String vnfoutputs = ar.getVnfOutputs ();
+            if (vnfoutputs != null && vnfoutputs.length () > 0) {
+                msoLogger.debug ("Read VNF outputs: " + vnfoutputs);
+                VnfOutputs vnfOutput = null;
+
+                // Now unmarshal it into vnf outputs
+                try {
+                    JAXBContext jaxbContext = JAXBContext.newInstance (VnfOutputs.class);
+                    Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+                    InputSource inputSource = new InputSource (new StringReader (vnfoutputs));
+                    SAXSource source = new SAXSource (inputSource);
+
+                    vnfOutput = jaxbUnmarshaller.unmarshal (source, VnfOutputs.class).getValue ();
+
+                } catch (Exception e) {
+                    msoLogger.debug ("Validation failed", e);
+                    throw new ValidationException ("format for vnf outputs");
+                }
+
+                qr.setVnfOutputs (vnfOutput);
+            }
+        } catch (Exception e) {
+            msoLogger.debug ("exception reading vnfOutputs Clob", e);
+        }
+    }
+
+    protected Response queryGenericFilters (String serviceType, String aicNodeClli, String tenantId, String volumeGroupId, String volumeGroupName, String vnfName, String version) {
+        if (serviceType != null) {
+            return this.getRequestList ("serviceType", serviceType, version);
+        }
+        if (aicNodeClli != null) {
+            return this.getRequestList ("aicNodeClli", aicNodeClli, version);
+        }
+        if (tenantId != null) {
+            return this.getRequestList ("tenantId", tenantId, version);
+        }
+        if (volumeGroupId != null) {
+               return this.getRequestList ("volumeGroupId", volumeGroupId, version);
+        }
+        if (volumeGroupName != null) {
+               return this.getRequestList ("volumeGroupName", volumeGroupName, version);
+        }
+        if (vnfName != null) {
+               return this.getRequestList ("vnfName", vnfName, version);
+        }
+        return Response.status (HttpStatus.SC_BAD_REQUEST).entity ("").build ();
+    }
+
+    protected Response getRequestGeneric (String requestId, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest: " + requestId);
+
+        String responseString = null;
+
+        InfraActiveRequests activeReq = RequestsDatabase.getRequestFromInfraActive (requestId, getRequestType ());
+        if (activeReq != null) {
+            // build response for active
+            responseString = infraRequestsResponse (activeReq, version);
+            return Response.status (HttpStatus.SC_OK).entity (responseString).build ();
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    protected Response getRequestList (String queryAttribute, String queryValue, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest based on " + queryAttribute + ": " + queryValue);
+
+        List <InfraActiveRequests> activeReqList = RequestsDatabase.getRequestListFromInfraActive (queryAttribute,
+                                                                                                   queryValue,
+                                                                                                   getRequestType ());
+
+        List <VnfRequest> queryResponseList = new LinkedList <VnfRequest> ();
+
+        if (activeReqList != null) {
+            // build response for active
+            queryResponseList = infraRequestsResponses (activeReqList, version);
+
+        }
+
+        if (queryResponseList != null && !queryResponseList.isEmpty ()) {
+            String result = this.translateVnfRequests (queryResponseList);
+            return Response.status (HttpStatus.SC_OK).entity (result).build ();
+
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    private VnfRequest fillGeneric (InfraRequests ar) {
+        VnfRequest qr = beansObjectFactory.createVnfRequest ();
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (ar.getRequestId ());
+        ri.setAction (ActionType.fromValue (ar.getAction ()));
+        ri.setRequestStatus (RequestStatusType.fromValue (ar.getRequestStatus ()));
+        if (ar.getProgress () != null) {
+            ri.setProgress (ar.getProgress ().intValue ());
+        }
+        if (ar.getSource () != null) {
+            ri.setSource (ar.getSource ());
+        }
+
+        ri.setStartTime (ar.getStartTime ().toString ());
+        if (ar.getEndTime () != null) {
+            ri.setEndTime (ar.getEndTime ().toString ());
+        }
+
+        if (ar.getStatusMessage () != null) {
+            ri.setStatusMessage (ar.getStatusMessage ());
+        }
+        qr.setRequestInfo (ri);
+        return qr;
+    }
+
+    private List <VnfRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
+        List <VnfRequest> queryResponseList = new LinkedList <VnfRequest> ();
+
+        for (InfraRequests ar : arList) {
+            VnfRequest qr = fillGeneric (ar);
+            fillVnfRequest (qr, ar, version);
+            queryResponseList.add (qr);
+        }
+        return queryResponseList;
+    }
+
+    private String translateVnfRequests (List <VnfRequest> queryResponseList) {
+        VnfRequests queryResponses = new VnfRequests ();
+        for (int i = 0; i < queryResponseList.size (); i++) {
+            queryResponses.getVnfRequest ().add (queryResponseList.get (i));
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequests.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (queryResponses, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        return stringWriter.toString ();
+    }
+
+    private String infraRequestsResponse (InfraRequests ar, String version) {
+        VnfRequest qr = fillGeneric (ar);
+        fillVnfRequest (qr, ar, version);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (qr, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        String response = stringWriter.toString ();
+        return response;
+    }
+
+    @POST
+    @Path("/")
+    @Produces(MediaType.APPLICATION_XML)
+    public Response manageVnfRequest (String reqXML, @PathParam("version") String version) {
+        MsoLogger.setServiceName ("VnfRequest");
+       if ("v1".equals(version)) {
+            return manageVnfRequestImpl (reqXML, Constants.SCHEMA_VERSION_V1);
+       } else if ("v2".equals(version)) {
+            return manageVnfRequestImpl (reqXML, Constants.SCHEMA_VERSION_V2);
+       } else if ("v3".equals(version)) {
+            return manageVnfRequestImpl (reqXML, Constants.SCHEMA_VERSION_V3);
+       } else {
+            long startTime = System.currentTimeMillis ();
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "Version not found");
+               return Response.status(HttpStatus.SC_NOT_FOUND).build();
+       }
+    }
+    
+    private Response manageVnfRequestImpl (String reqXML, String version) {
+       String methodName = "VnfRequest";
+       props = MsoPropertiesUtils.loadMsoProperties ();
+        long startTime = System.currentTimeMillis ();
+
+        // Generate unique request id for the new request
+        UUID requestUUID = UUID.randomUUID ();
+
+        VnfMsoInfraRequest msoRequest = new VnfMsoInfraRequest (requestUUID.toString ());
+        MsoLogger.setLogContext (msoRequest.getRequestId (), null);
+
+        if (MsoPropertiesUtils.getNoPropertiesState()) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Exiting the transaction: Infra API Handler not started, properties file missing or invalid");
+            return NOT_STARTED_RESPONSE;
+        }
+
+        uriInfo.getRequestUri ();
+
+        if (reqXML == null) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "The content of the request is null");
+            return Response.status (HttpStatus.SC_NO_CONTENT).entity ("").build ();
+        }
+
+        String requestUri = uriInfo.getRequestUri ().toString ();
+        msoLogger.debug ("Incoming request received for pose VNFRequest:" + reqXML);
+
+        msoRequest.setRequestUri (requestUri);
+        msoLogger.debug ("Schema version: " + version);
+        try {
+            msoRequest.parse (reqXML, version, props);
+        } catch (Exception e) {
+            msoLogger.debug ("Validation failed: ", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseFailedValidation (HttpStatus.SC_BAD_REQUEST, e.getMessage ());
+            if (msoRequest.getRequestId () != null) {
+                msoLogger.debug ("Logging failed message to the database");
+                msoRequest.createRequestRecord (Status.FAILED);
+            }
+            msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, reqXML, "", "", MsoLogger.ErrorCode.SchemaError, "Exception when parsing reqXML", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Validation of the input request failed");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+        MsoLogger.setServiceName (MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo().getAction().name());
+        msoLogger.debug ("Update serviceName with detailed action info to:" + MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo().getAction().name());
+        if (msoRequest.getRequestInfo ().getAction () == org.openecomp.mso.apihandlerinfra.vnfbeans.ActionType.CREATE) {
+            // Check if this request is a duplicate of the one with the same vnfName
+            msoLogger.debug ("Checking for a duplicate with the same vnf-name");
+            InfraActiveRequests dup = null;
+            try {
+                dup = RequestsDatabase.checkDuplicateByVnfName (msoRequest.getVnfInputs ().getVnfName (),
+                                                                msoRequest.getRequestInfo ().getAction ().value (),
+                                                                "VNF");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "vnf-name", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for duplicated request", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for duplicated request");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND, "CREATE on the same VNF Name is already progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicates request - CREATE on the same VNF Name is already progress");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicates request - CREATE on the same VNF Name is already progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        } else {
+            // Check if this request is a duplicate of the one with the same vnfId
+            InfraActiveRequests dup = null;
+            msoLogger.debug ("Checking for a duplicate with the same vnf-id");
+            try {
+                dup = RequestsDatabase.checkDuplicateByVnfId (msoRequest.getVnfInputs ().getVnfId (),
+                                                              msoRequest.getRequestInfo ().getAction ().value (),
+                                                              "VNF");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "vnf-id", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for a duplicate request with the same vnf-id", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for a duplicate request with the same vnf-id");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                msoRequest.getRequestInfo ().getAction ().value ()
+                                                                  + " on the same VNF Id already in progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicated request on the same VNF Id already in progress");
+
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicated request on the same VNF Id already in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        }
+
+        String orchestrationURI = "";
+
+        // Query MSO Catalog DB
+        try (CatalogDatabase db = new CatalogDatabase()){
+
+            Recipe recipe = null;
+
+            if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+                // First get recipe for the service type given
+                if (msoRequest.getServiceType () != null
+                        && msoRequest.getServiceType ().length () > 0) {
+                    recipe = db.getVnfRecipe (msoRequest.getVnfInputs ().getVnfType (),
+                            msoRequest.getRequestInfo ().getAction ().value (),
+                            msoRequest.getServiceType ());
+                }
+                // If no recipe for the service type or no service type was given, look for recipe without service type
+                if (recipe == null) {
+                    recipe = db.getVnfRecipe (msoRequest.getVnfInputs ().getVnfType (),
+                            msoRequest.getRequestInfo ().getAction ().value (),
+                            null);
+                }
+            }
+            if (version.equals (Constants.SCHEMA_VERSION_V2) || version.equals (Constants.SCHEMA_VERSION_V3)) {
+                switch (msoRequest.getRequestInfo ().getAction ()) {
+                    case CREATE:
+                    case UPDATE:
+                    case DELETE:
+                        // First get recipe for the vnf type given
+                        recipe = db.getVnfRecipe (msoRequest.getVnfInputs ().getVnfType (),
+                                msoRequest.getRequestInfo ().getAction ().value ());
+
+                        // If no recipe for the vnf type is found, look for generic recipe with "*" vnf type
+                        if (recipe == null) {
+                            recipe = db.getVnfRecipe (Constants.VNF_TYPE_WILDCARD,
+                                    msoRequest.getRequestInfo ().getAction ().value ());
+                        }
+                        break;
+                    case CREATE_VF_MODULE:
+                    case UPDATE_VF_MODULE:
+                    case DELETE_VF_MODULE:
+                        // First get recipe for the vnf type/vf module model name through vf module id query
+                        recipe = db.getVfModuleRecipe (msoRequest.getVnfInputs ().getVnfType (), msoRequest.getVnfInputs ().getVfModuleModelName (),
+                                msoRequest.getRequestInfo ().getAction ().value ());
+
+                        // If no recipe is found, look for generic recipe with "*" vnf type
+                        if (recipe == null) {
+                            recipe = db.getVnfRecipeByVfModuleId (msoRequest.getVnfInputs ().getVfModuleId (),
+                                    Constants.VNF_TYPE_WILDCARD, msoRequest.getRequestInfo ().getAction ().value ());
+                        }
+                        // First get recipe for the vnf type given
+                        //recipe = db.getVnfRecipe (msoRequest.getVnfInputs ().getVnfType (),
+                        //     msoRequest.getRequestInfo ().getAction ().value ());
+
+                        // If no recipe for the vnf type is found, look for generic recipe with "*" vnf type
+                        //if (recipe == null) {
+                        //     recipe = db.getVnfRecipe (Constants.VNF_TYPE_WILDCARD,
+                        //                     msoRequest.getRequestInfo ().getAction ().value ());
+                        //
+                        //}
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+
+            if (recipe == null) {
+                msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, "VNF Recipe", "", "", MsoLogger.ErrorCode.DataError, "No recipe found in DB");
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                        ErrorNumbers.RECIPE_DOES_NOT_EXIST,
+                        null,
+                        "");
+                msoRequest.createRequestRecord (Status.FAILED);
+                db.close ();
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "No recipe found in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            orchestrationURI = recipe.getOrchestrationUri ();
+            msoLogger.debug ("Orchestration URI is: " + orchestrationURI);
+
+            // Retrieve additional info for Vf Modules from Catalog DB to send it to BPMN
+            switch (msoRequest.getRequestInfo ().getAction ()) {
+                case CREATE_VF_MODULE:
+                case UPDATE_VF_MODULE:
+                    String personaModelId = "";
+                    String personaModelVersion = "";
+                    String vnfPersonaModelId = "";
+                    String vnfPersonaModelVersion = "";
+                    Boolean isBase = false;
+                    String asdcServiceModelVersion = msoRequest.getVnfInputs ().getAsdcServiceModelVersion ();
+
+                    // Get VF Module-specific persona info and base module indicator
+                    VfModule vfm = null;
+                    String vfModuleType = msoRequest.getVnfInputs ().getVnfType () + "::" + msoRequest.getVnfInputs ().getVfModuleModelName ();
+                    if (asdcServiceModelVersion != null && !asdcServiceModelVersion.isEmpty ()) {
+                        vfm = db.getVfModuleType (vfModuleType, asdcServiceModelVersion);
+                    }
+                    else {
+                        vfm = db.getVfModuleType (vfModuleType);
+                    }
+                    if (vfm != null) {
+                        if (vfm.getIsBase() == 1) {
+                            isBase = true;
+                        }
+                        personaModelId = vfm.getModelInvariantUuid();
+                        personaModelVersion = vfm.getModelVersion();
+                        msoLogger.debug("Setting personaModelId to " + personaModelId +
+                                ", personaModelVersion to " + personaModelVersion);
+                    }
+                    // Get VNF-specific persona info
+                    VnfResource vnfr = null;
+                    if (asdcServiceModelVersion != null && !asdcServiceModelVersion.isEmpty ()) {
+                        vnfr = db.getVnfResource (msoRequest.getVnfInputs ().getVnfType (), asdcServiceModelVersion);
+                    }
+                    else {
+                        vnfr = db.getVnfResource (msoRequest.getVnfInputs ().getVnfType ());
+                    }
+                    if (vnfr != null) {
+                        vnfPersonaModelId = vnfr.getModelInvariantUuid ();
+                        vnfPersonaModelVersion = vnfr.getModelVersion();
+                        msoLogger.debug("Setting vnfPersonaModelId to " + vnfPersonaModelId +
+                                ", vnfPersonaModelVersion to " + vnfPersonaModelVersion);
+                    }
+
+                    msoRequest.addBPMNSpecificInputs(personaModelId, personaModelVersion, isBase,
+                            vnfPersonaModelId, vnfPersonaModelVersion);
+
+                    break;
+                default:
+                    break;
+            }
+
+            db.close ();
+
+            String requestId = msoRequest.getRequestId ();
+            msoLogger.debug ("requestId is: " + requestId);
+            msoLogger.debug ("About to insert a record");
+
+            try {
+                msoRequest.createRequestRecord (Status.PENDING);
+            } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "", MsoLogger.ErrorCode.SchemaError, "Exception while creating record in DB", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                        ErrorNumbers.COULD_NOT_WRITE_TO_REQUESTS_DB,
+                        null,
+                        "non-unique request-id specified");
+                // Cannot create a record of this request here, our communication with MSO DB just failed. Do not try
+                // to create a failed record
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while creating record in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+
+            msoLogger.debug("Request going to BPEL: " + msoRequest.getRequestXML ());
+
+            RequestClient requestClient = null;
+            HttpResponse response = null;
+            long subStartTime = System.currentTimeMillis();
+            try {
+                requestClient = RequestClientFactory.getRequestClient (orchestrationURI, props);
+                // Capture audit event
+                msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
+                response = requestClient.post (msoRequest.getRequestXML (),
+                        requestId,
+                        Integer.toString (recipe.getRecipeTimeout ()).toString (),
+                        version,
+                        null,
+                        null);
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", orchestrationURI, null);
+            } catch (Exception e) {
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", orchestrationURI, null);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_COMMUNICATION_TO_BPEL,
+                        null,
+                        e.getMessage ());
+                alarmLogger.sendAlarm ("MsoConfigurationError",
+                        MsoAlarmLogger.CRITICAL,
+                        Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            if (response == null) {
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_RESPONSE_FROM_BPEL,
+                        null,
+                        "bpelResponse is null");
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Null response from BPEL", "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Null response from BPEL");
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Null response from BPMN");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
+            int bpelStatus = respHandler.getStatus ();
+
+            // BPEL accepted the request, the request is in progress
+            if (bpelStatus == HttpStatus.SC_ACCEPTED) {
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                msoLogger.debug ("Received from BPEL: " + bpelXMLResponseBody);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.IN_PROGRESS);
+                RequestsDatabase.updateInfraStatus (msoRequest.getRequestId (),
+                        Status.IN_PROGRESS.toString (),
+                        Constants.PROGRESS_REQUEST_IN_PROGRESS,
+                        Constants.MODIFIED_BY_APIHANDLER);
+                Response resp = msoRequest.buildResponse (bpelStatus, null, null);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "BPMN accepted the request, the request is in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            } else {
+
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                if (bpelXMLResponseBody != null && !bpelXMLResponseBody.isEmpty ()) {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, bpelXMLResponseBody, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR,
+                            "Response from BPEL engine is failed with HTTP Status=" + bpelStatus, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is failed");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                } else {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, ErrorNumbers.ERROR_FROM_BPEL, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Response from BPEL engine is empty", "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Response from BPEL engine is empty");
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPEL engine is empty");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                }
+            }
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communciate with Catalog DB", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                                                                   ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB,
+                                                                   null,
+                                                                   e.getMessage ());
+            alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                   MsoAlarmLogger.CRITICAL,
+                                   Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB));
+            msoRequest.createRequestRecord (Status.FAILED);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestType.java
new file mode 100644 (file)
index 0000000..e8023b8
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+/*
+ * Enum for VNF Request Type values
+*/
+public enum VnfRequestType {
+       VNF,
+       NETWORK
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java
new file mode 100644 (file)
index 0000000..32fd80d
--- /dev/null
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+import org.openecomp.mso.apihandlerinfra.vnfbeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfType;
+import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfTypes;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.utils.UUIDChecker;
+import org.apache.http.HttpStatus;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import java.io.StringWriter;
+import java.util.List;
+
+@Path(Constants.VNF_TYPES_PATH)
+public class VnfTypesHandler {
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+
+    @GET
+    public Response getVnfTypes (@QueryParam("vnf-role") String vnfRole) {
+
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("GetVnfTypes");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for getVnfTypes with vnf-role:" + vnfRole);
+
+        List <VnfResource> vnfResources = null;
+        try(CatalogDatabase db = new CatalogDatabase ()) {
+            ;
+            if (vnfRole != null) {
+                vnfResources = db.getVnfResourcesByRole (vnfRole);
+            } else {
+                vnfResources = db.getAllVnfResources ();
+            }
+        } catch (Exception e) {
+            msoLogger.debug ("No connection to catalog DB", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "No connection to catalog DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + e.toString ());
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity (e.toString ()).build ();
+        }
+
+        if (vnfResources == null) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "Error:no vnf types found");
+            msoLogger.debug ("End of the transaction. No VNF Types found. The final response status is: " + HttpStatus.SC_NOT_FOUND);
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+        VnfTypes vnfTypes = beansObjectFactory.createVnfTypes ();
+        for (int i = 0; i < vnfResources.size (); i++) {
+            VnfType vnfType = beansObjectFactory.createVnfType ();
+            VnfResource vr = vnfResources.get (i);
+            vnfType.setType (vr.getVnfType ());
+            vnfType.setDescription (vr.getDescription ());
+            vnfType.setId (String.valueOf (vr.getId ()));
+            vnfTypes.getVnfType ().add (vnfType);
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VnfTypes.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (vnfTypes, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Error marshalling", e);
+        }
+
+        String response = stringWriter.toString ();
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + response);
+        return Response.status (HttpStatus.SC_OK).entity (response).build ();
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java
new file mode 100644 (file)
index 0000000..3190fc5
--- /dev/null
@@ -0,0 +1,367 @@
+package org.openecomp.mso.apihandlerinfra;
+
+/*-
+ * #%L
+ * MSO
+ * %%
+ * Copyright (C) 2016 OPENECOMP - MSO
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+
+import org.apache.http.HttpStatus;
+
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.sax.SAXSource;
+
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.volumebeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.volumebeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.volumebeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeInputs;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeOutputs;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeRequest;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeRequests;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.requestsdb.InfraRequests;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/{version: v1|v2|v3}/volume-request")
+public class VolumeInfoHandler {
+       
+       protected ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+       private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH);
+
+    @GET
+    public Response queryFilters (@QueryParam("vnf-type") String vnfType,
+                                  @QueryParam("service-type") String serviceType,
+                                  @QueryParam("aic-node-clli") String aicNodeClli,
+                                  @QueryParam("tenantId") String tenantId,
+                                  @QueryParam("volume-group-id") String volumeGroupId,
+                                  @QueryParam("volume-group-name") String volumeGroupName,
+                                  @PathParam("version") String version) {
+       long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("VolumeQueryFilters");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for queryFilter with vnf-type:" + vnfType
+                                                               + " service-type:" + serviceType
+                                                               + " aic-node-clli:" + aicNodeClli
+                                                               + " tenant-id:" + tenantId
+                                                               + " volume-group-id:" + volumeGroupId
+                                                               + " volume-group-name:" + volumeGroupName);
+        Response response = null;
+       if (vnfType != null) {
+            response = this.getRequestList ("vnfType", vnfType, version);
+        } else {
+               response = queryGenericFilters (serviceType, aicNodeClli, tenantId, volumeGroupId, volumeGroupName, version);
+        }
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    @GET
+    @Path(Constants.REQUEST_ID_PATH)
+    public Response getRequest (@PathParam("request-id") String requestId, @PathParam("version") String version) {
+       
+       // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+        
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("VolumeGetRequest");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for getRequest with request-id:" + requestId);
+
+        Response response = getRequestGeneric (requestId, version);
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+
+    }
+
+   
+    protected MsoLogger getMsoLogger () {
+        return msoLogger;
+    }
+
+   
+     protected void fillVolumeRequest (VolumeRequest qr, InfraRequests ar, String version) {
+        VolumeInputs vi = beansObjectFactory.createVolumeInputs ();
+
+        if (ar.getVolumeGroupId () != null) {
+            vi.setVolumeGroupId (ar.getVolumeGroupId ());
+        }
+        if (ar.getVolumeGroupName () != null) {
+            vi.setVolumeGroupName (ar.getVolumeGroupName ());
+        }
+        if (ar.getVnfType () != null) {
+            vi.setVnfType (ar.getVnfType ());
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+               if (ar.getServiceType () != null) {
+                       vi.setServiceType (ar.getServiceType ());
+               }
+               if (ar.getAicNodeClli () != null) {
+                       vi.setAicNodeClli (ar.getAicNodeClli ());
+               }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }               
+               if (ar.getVfModuleModelName () != null) {
+                       vi.setVfModuleModelName (ar.getVfModuleModelName ());
+               }               
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }               
+               if (ar.getVfModuleModelName () != null) {
+                       vi.setVfModuleModelName (ar.getVfModuleModelName ());
+               }
+               if (ar.getServiceInstanceId () != null) {
+                       vi.setServiceInstanceId (ar.getServiceInstanceId ());
+               }
+               if (ar.getVnfId () != null) {
+                vi.setVnfId (ar.getVnfId ());
+            }
+        }
+        if (ar.getTenantId () != null) {
+            vi.setTenantId (ar.getTenantId ());
+        }
+        
+        qr.setVolumeInputs (vi);
+        
+        qr.setVolumeParams(ar.getVnfParams ());
+
+        try {
+            String volumeoutputs = ar.getVnfOutputs ();
+            if (volumeoutputs != null && volumeoutputs.length () > 0) {
+                msoLogger.debug ("Read VOLUME outputs: " + volumeoutputs);
+                VolumeOutputs volumeOutput = null;
+
+                // Now unmarshal it into network outputs
+                try {
+                    JAXBContext jaxbContext = JAXBContext.newInstance (VolumeOutputs.class);
+                    Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+                    InputSource inputSource = new InputSource (new StringReader (volumeoutputs));
+                    SAXSource source = new SAXSource (inputSource);
+
+                    volumeOutput = (VolumeOutputs) jaxbUnmarshaller.unmarshal (source, VolumeOutputs.class).getValue ();
+
+                } catch (Exception e) {
+                    msoLogger.debug ("Validation failed", e);
+                    throw new ValidationException ("format for volume outputs");
+                }
+
+                qr.setVolumeOutputs (volumeOutput);
+            }
+        } catch (Exception e) {
+            msoLogger.debug ("exception reading networkOutputs Clob", e);
+        }
+    }
+    
+    protected Response queryGenericFilters (String serviceType, String aicNodeClli, String tenantId, String volumeGroupId, String volumeGroupName, String version) {
+        if (serviceType != null) {
+            return this.getRequestList ("serviceType", serviceType, version);
+        }
+        if (aicNodeClli != null) {
+            return this.getRequestList ("aicNodeClli", aicNodeClli, version);
+        }
+        if (tenantId != null) {
+            return this.getRequestList ("tenantId", tenantId, version);
+        }
+        if (volumeGroupName != null) {
+               return this.getRequestList ("volumeGroupName", volumeGroupName, version);
+        }
+        if (volumeGroupId != null) {
+               return this.getRequestList ("volumeGroupId", volumeGroupId, version);
+        }
+        return Response.status (HttpStatus.SC_BAD_REQUEST).entity ("").build ();
+    }
+
+
+    protected Response getRequestGeneric (String requestId, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table  to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest: " + requestId);
+
+        String responseString = null;
+
+        InfraActiveRequests activeReq = RequestsDatabase.getRequestFromInfraActive (requestId,
+                                                                                    "VOLUME");
+        if (activeReq != null) {
+            // build response for active
+            responseString = infraRequestsResponse (activeReq, version);
+            return Response.status (HttpStatus.SC_OK).entity (responseString).build ();
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+         }
+    }
+
+    protected Response getRequestList (String queryAttribute, String queryValue, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest based on " + queryAttribute + ": " + queryValue);
+
+        List <InfraActiveRequests> activeReqList = RequestsDatabase.getRequestListFromInfraActive (queryAttribute,
+                                                                                                   queryValue,
+                                                                                                   "VOLUME");
+  
+        List <VolumeRequest> queryResponseList = new LinkedList <VolumeRequest> ();
+
+        if (activeReqList != null) {
+            // build response for active
+            queryResponseList = infraRequestsResponses (activeReqList, version);
+
+        }
+
+        if (queryResponseList != null && !queryResponseList.isEmpty ()) {
+            String result = this.translateVolumeRequests (queryResponseList);
+            return Response.status (HttpStatus.SC_OK).entity (result).build ();
+
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    private VolumeRequest fillGeneric (InfraRequests ar) {
+        VolumeRequest qr = beansObjectFactory.createVolumeRequest ();
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (ar.getRequestId ());
+        ri.setAction (ActionType.fromValue (ar.getAction ()));
+        ri.setRequestStatus (RequestStatusType.fromValue (ar.getRequestStatus ()));
+        if (ar.getProgress () != null) {
+            ri.setProgress (ar.getProgress ().intValue ());
+        }
+        if (ar.getSource () != null) {
+            ri.setSource (ar.getSource ());
+        }
+
+        ri.setStartTime (ar.getStartTime ().toString ());
+        if (ar.getEndTime () != null) {
+            ri.setEndTime (ar.getEndTime ().toString ());
+        }
+        
+        if (ar.getStatusMessage () != null) {
+               ri.setStatusMessage (ar.getStatusMessage ());
+        }
+        qr.setRequestInfo (ri);
+        return qr;
+    }
+
+    private List <VolumeRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
+        List <VolumeRequest> queryResponseList = new LinkedList <VolumeRequest> ();
+
+        for (InfraRequests ar : arList) {
+            VolumeRequest qr = fillGeneric (ar);
+            fillVolumeRequest (qr, ar, version);
+            queryResponseList.add (qr);
+        }
+        return queryResponseList;
+    }
+
+    private String translateVolumeRequests (List <VolumeRequest> queryResponseList) {
+        VolumeRequests queryResponses = new VolumeRequests ();
+        for (int i = 0; i < queryResponseList.size (); i++) {
+            queryResponses.getVolumeRequest ().add (queryResponseList.get (i));
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VolumeRequests.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (queryResponses, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        return stringWriter.toString ();
+    }
+
+    private String infraRequestsResponse (InfraRequests ar, String version) {
+        VolumeRequest qr = fillGeneric (ar);
+        fillVolumeRequest (qr, ar, version);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VolumeRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (qr, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        String response = stringWriter.toString ();
+        return response;
+    }
+
+    private String getAuditLogReturnMsg (Response response) {
+        String returnMsg = "";
+        if (response.getStatus() == HttpStatus.SC_OK) {
+               returnMsg = "Successful. StatusCode=" + HttpStatus.SC_OK;
+        } else if (response.getStatus() == HttpStatus.SC_NOT_FOUND) {
+               returnMsg = "Record not found . StatusCode=" + HttpStatus.SC_NOT_FOUND;
+        } else if (response.getStatus() == HttpStatus.SC_BAD_REQUEST) {
+               returnMsg = "Bad request: one of the following attribute serviceType, aicNodeClli, tenantId, volumeGroupId, volumeGroupName should be defined. StatusCode=" + HttpStatus.SC_BAD_REQUEST;
+        }
+        return returnMsg;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeMsoInfraRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeMsoInfraRequest.java
new file mode 100644 (file)
index 0000000..42ef60b
--- /dev/null
@@ -0,0 +1,644 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.volumebeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeInputs;
+import org.openecomp.mso.apihandlerinfra.volumebeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.volumebeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeRequest;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.requestsdb.HibernateUtil;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+
+public class VolumeMsoInfraRequest {
+
+    private String requestId;
+    private String requestXML;
+    private String requestUri;
+    private RequestInfo rinfo;
+    private VolumeInputs volumeInputs;
+    private String volumeParams;
+    private ActionType action;
+    private String errorMessage;
+    private String httpResponse;
+    private String responseBody;
+    private RequestStatusType status;
+    private long startTime;
+    private long progress = Constants.PROGRESS_REQUEST_RECEIVED;
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+    private static final String NOT_PROVIDED = "not provided";
+
+    VolumeMsoInfraRequest (String requestId) {
+        this.requestId = requestId;
+        Calendar startTimeCalendar = Calendar.getInstance ();
+        this.startTime = startTimeCalendar.getTimeInMillis ();
+        MsoLogger.setLogContext (requestId, null);
+
+    }
+
+    // Parse request XML
+    void parse (String reqXML, String version, MsoJavaProperties props) throws ValidationException {
+
+        msoLogger.debug ("Validating the request");
+
+        this.requestXML = reqXML;
+
+        VolumeRequest volumeReq = null;
+        boolean isWrongRootElement = false;
+
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VolumeRequest.class);
+            Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+            InputSource inputSource = new InputSource (new StringReader (reqXML));
+            SAXSource source = new SAXSource (inputSource);
+
+            if (reqXML.contains ("volume-request") && !reqXML.contains("vnf-request")) {
+                volumeReq = jaxbUnmarshaller.unmarshal (source, VolumeRequest.class).getValue ();
+            } else {
+                isWrongRootElement = true;
+            }
+
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_VNFREQUEST_VALIDATION_ERROR, "", "", MsoLogger.ErrorCode.DataError, "Exception when parsing reqXML", e);
+            throw new ValidationException ("format for volume request");
+        }
+
+        if (isWrongRootElement) {
+               msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR_REASON, "root element is not correct", "", "", MsoLogger.ErrorCode.SchemaError, "root element <volume-request> expected");
+            throw new ValidationException ("root element <volume-request> expected");
+        }
+
+        if (volumeReq == null) {
+            throw new ValidationException ("volume-request");
+        }
+
+        this.rinfo = volumeReq.getRequestInfo ();
+
+        if (this.rinfo == null) {
+            throw new ValidationException ("request-info");
+        }
+
+        action = this.rinfo.getAction ();
+        if (action == null) {
+            throw new ValidationException ("action");
+        }       
+        this.volumeInputs = volumeReq.getVolumeInputs ();
+        if (this.volumeInputs == null) {
+            throw new ValidationException ("volume-inputs");
+        }
+        
+        // Verify that the elements correspond to the version
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+                       if (this.volumeInputs.getBackoutOnFailure() != null || this.volumeInputs.getAicCloudRegion() != null ||
+                                       this.volumeInputs.getVfModuleModelName () != null || this.volumeInputs.getAsdcServiceModelVersion () != null ||
+                                       this.volumeInputs.getServiceInstanceId () != null || this.volumeInputs.getVnfId () != null) {
+                               throw new ValidationException ("format for v1 version of volume request");
+                       }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+                       if (this.volumeInputs.getServiceType() != null || this.volumeInputs.getAicNodeClli() != null || 
+                                       this.volumeInputs.getServiceInstanceId () != null || this.volumeInputs.getVnfId () != null) {
+                               throw new ValidationException ("format for v2 version of volume request");
+                       }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (this.volumeInputs.getServiceType() != null || this.volumeInputs.getAicNodeClli() != null) {
+                       throw new ValidationException ("format for v3 version of volume request");
+               }
+    }
+        
+        
+        if (!InfraUtils.isActionAllowed (props, "volume", version, action.value ())) {
+               throw new ValidationException ("action allowable for version " + version + " of volume request");               
+        }    
+
+        switch (action) {
+            case UPDATE:
+            case DELETE:
+            case UPDATE_VF_MODULE_VOL:
+            case DELETE_VF_MODULE_VOL:
+                if (this.volumeInputs.getVolumeGroupId () == null) {
+                    throw new ValidationException ("volume-group-id");
+                }
+                break;
+            default:
+                break;
+        }
+        
+        if (ActionType.CREATE.equals (action) || ActionType.CREATE_VF_MODULE_VOL.equals(action)) {
+               if (this.volumeInputs.getVolumeGroupName () == null) {
+                       throw new ValidationException ("volume-group-name");
+               }
+               if (!InfraUtils.isValidHeatName(this.volumeInputs.getVolumeGroupName ())) {
+                       throw new ValidationException ("volume-group-name: no value meeting heat stack name syntax requirements");
+               }
+        }        
+        
+          
+        if (this.volumeInputs.getVnfType () == null) {
+               throw new ValidationException ("vnf-type");
+        }        
+        
+        
+        switch (action) {
+        case CREATE_VF_MODULE_VOL:
+        case UPDATE_VF_MODULE_VOL:
+        case DELETE_VF_MODULE_VOL:               
+            if (this.volumeInputs.getVfModuleModelName () == null) {
+                throw new ValidationException ("vf-module-model-name");
+            }
+            break;
+        default:
+            break;
+        }
+        
+        if (!version.equals(Constants.SCHEMA_VERSION_V1) && this.volumeInputs.getServiceId () == null) {
+               throw new ValidationException ("service-id ");
+        }        
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V1) && this.volumeInputs.getServiceType () != null && this.volumeInputs.getServiceId () != null) {
+               throw new ValidationException ("service-type or service-id ");
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V1) && this.volumeInputs.getAicNodeClli () == null) {
+               throw new ValidationException ("aic-node-clli");
+        }
+        
+        if ((version.equals(Constants.SCHEMA_VERSION_V2) || version.equals(Constants.SCHEMA_VERSION_V3)) && (this.volumeInputs.getAicCloudRegion () == null || this.volumeInputs.getAicCloudRegion ().isEmpty())) {
+               throw new ValidationException ("aic-cloud-region");
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V3) && this.volumeInputs.getServiceInstanceId () == null) {
+               throw new ValidationException ("service-instance-id");
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V3) && this.volumeInputs.getVnfId () == null && ActionType.CREATE_VF_MODULE_VOL.equals(action)) {
+               throw new ValidationException ("vnf-id");
+        }
+
+        if (ActionType.CREATE.equals (action) || ActionType.CREATE_VF_MODULE_VOL.equals(action)) {           
+            if (this.volumeInputs.getTenantId () == null) {
+                throw new ValidationException ("tenant-id");
+            }
+        }
+
+       
+                Object vpN = volumeReq.getVolumeParams ();
+
+                if (vpN != null) {
+                    Node node = (Node) vpN;
+                    Document doc = node.getOwnerDocument ();
+                    this.volumeParams = domToStr (doc);
+                }
+
+                msoLogger.debug ("VolumeParams: " + this.volumeParams);
+        
+
+        msoLogger.debug ("Request valid");
+
+        // Rebuild the request string for BPEL to include request-id
+        rinfo.setRequestId (this.requestId);
+        volumeReq.setRequestInfo (rinfo);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VolumeRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (volumeReq, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Exception: ", e);
+        }
+
+        this.requestXML = stringWriter.toString ().replace("http://ecomp.att.com/mso/infra/volume-request", 
+                       "http://ecomp.att.com/mso/infra/vnf-request");
+        
+        msoLogger.debug("REQUEST XML to BPEL: " + this.requestXML);
+
+    }
+
+    public void createRequestRecord (Status status) {
+
+        Session session = null;
+        try {
+
+            session = HibernateUtil.getSessionFactory ().openSession ();
+            session.beginTransaction ();
+
+            InfraActiveRequests aq = new InfraActiveRequests ();
+            aq.setRequestId (requestId);
+
+            Timestamp startTimeStamp = new Timestamp (Calendar.getInstance ().getTimeInMillis ());
+            if (rinfo != null) {
+                if (rinfo.getAction () != null) {
+                    aq.setAction (rinfo.getAction ().value ());
+                    aq.setRequestAction (RequestActionMap.getMappedRequestAction (rinfo.getAction ().value ()));
+                }
+                aq.setSource (rinfo.getSource ());
+            } else {
+                // Set up mandatory parameters
+                aq.setAction (NOT_PROVIDED);
+                aq.setAction (NOT_PROVIDED);
+            }
+
+            aq.setRequestBody (this.requestXML);
+            aq.setRequestScope (ModelType.volumeGroup.name ());
+
+             if (volumeInputs != null) {
+                if (volumeInputs.getVolumeGroupId () != null) {
+                    aq.setVolumeGroupId (volumeInputs.getVolumeGroupId ());
+                }
+                if (volumeInputs.getVolumeGroupName () != null) {
+                    aq.setVolumeGroupName (volumeInputs.getVolumeGroupName ());
+                }
+                if (volumeInputs.getVnfType () != null) {
+                    aq.setVnfType (volumeInputs.getVnfType ());
+                }
+                if (volumeInputs.getVnfId () != null) {
+                    aq.setVnfId (volumeInputs.getVnfId ());
+                }
+                if (volumeInputs.getServiceInstanceId () != null) {
+                    aq.setServiceInstanceId (volumeInputs.getServiceInstanceId ());
+                }
+                if (volumeInputs.getServiceType () != null) {
+                    aq.setServiceType (volumeInputs.getServiceType ());
+                }
+                if (volumeInputs.getServiceId () != null) {
+                    aq.setAaiServiceId (volumeInputs.getServiceId ());
+                }
+                if (volumeInputs.getAicNodeClli () != null) {
+                    aq.setAicNodeClli (volumeInputs.getAicNodeClli ());
+                }
+                if (volumeInputs.getAicCloudRegion () != null) {
+                    aq.setAicCloudRegion (volumeInputs.getAicCloudRegion ());
+                }
+                if (volumeInputs.getTenantId () != null) {
+                    aq.setTenantId (volumeInputs.getTenantId ());
+                }
+               
+            }
+            aq.setStartTime (startTimeStamp);
+            aq.setRequestStatus (status.toString ());
+            aq.setLastModifiedBy (Constants.MODIFIED_BY_APIHANDLER);
+            aq.setRequestType ("VOLUME");
+
+            if (volumeParams != null) {
+                msoLogger.debug ("Storing volumeParams: " + volumeParams);
+                aq.setVnfParams (this.volumeParams);
+            }
+
+            if ((status == Status.FAILED) || (status == Status.COMPLETE)) {
+                aq.setStatusMessage (this.errorMessage);
+                aq.setResponseBody (this.responseBody);
+
+                Calendar endTime = Calendar.getInstance ();
+                Timestamp endTimeStamp = new Timestamp (endTime.getTimeInMillis ());
+                aq.setEndTime (endTimeStamp);               
+            } 
+            aq.setProgress (this.progress);
+            
+
+            msoLogger.debug ("About to insert a record");
+
+            session.save (aq);
+            session.getTransaction ().commit ();
+            session.close ();
+        } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DB_INSERT_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception in createRequestRecord", e);
+            if (session != null) {
+                session.close ();
+            }
+            if (!status.equals (Status.FAILED)) {
+                throw e;
+            }
+        }
+    }
+
+    public void updateFinalStatus (Status status) {
+       int result = 0;
+        try {
+               result = RequestsDatabase.updateInfraFinalStatus(requestId, status.toString (), 
+                        this.errorMessage, this.progress, this.responseBody, Constants.MODIFIED_BY_APIHANDLER);
+        } catch (Exception e) {
+               msoLogger.error(MessageEnum.APIH_DB_UPDATE_EXC, e.getMessage(), "", "", MsoLogger.ErrorCode.DataError, "Exception in updateFinalStatus");
+               msoLogger.debug("Exception: ", e);
+        }
+    }
+
+    public Response buildResponse (int httpResponseCode, String errorCode, InfraActiveRequests inProgress) {
+        return buildResponseWithError (httpResponseCode, errorCode, inProgress, null);
+    }
+
+    public Response buildResponseWithError (int httpResponseCode,
+                                            String errorCode,
+                                            InfraActiveRequests inProgress,
+                                            String errorString) {
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+        VolumeRequest vr = beansObjectFactory.createVolumeRequest ();
+
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+
+        ri.setRequestId (requestId);
+        ri.setRequestStatus (this.status);
+        ri.setAction (this.rinfo.getAction ());
+        ri.setSource (this.rinfo.getSource ());
+
+        String errorMsg = null;
+        if (errorCode != null) {
+            // If error code is actually an XML error response from BPEL, treat it specially:
+            if (!Messages.errors.containsKey (errorCode)) {
+                if (errorCode.length () > 300) {
+                    errorMsg = errorCode.substring (0, 299);
+                } else {
+                    errorMsg = errorCode;
+                }
+
+            } else {
+
+                if (inProgress == null) {
+                       if (errorCode.equals(ErrorNumbers.RECIPE_DOES_NOT_EXIST)) {
+                               errorMsg = String.format (Messages.errors.get (errorCode), "volume", errorString);
+                       }
+                       else {
+                               errorMsg = String.format (Messages.errors.get (errorCode), errorString);
+                       }
+                } else if (errorCode.equals (ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS)) {
+                    errorMsg = String.format (Messages.errors.get (errorCode),
+                                                                 "volume",
+                                              inProgress.getVnfName (),
+                                              inProgress.getRequestStatus (),
+                                              "volume");
+                } else if (errorCode.equals (ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID)) {
+                    errorMsg = String.format (Messages.errors.get (errorCode),
+                                                                 "volume",
+                                              inProgress.getVnfId (),
+                                              inProgress.getRequestStatus (),
+                                              inProgress.getAction (),
+                                              "volume");
+                }
+            }
+
+            ri.setStatusMessage (errorMsg);
+            this.errorMessage = errorMsg;
+        }
+        ri.setProgress ((int) this.progress);
+
+        Date startDate = new Date (this.startTime);
+        SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss.SSS");
+        String startTimeString = sdf.format (startDate);
+
+        ri.setStartTime (startTimeString);
+
+        vr.setRequestInfo (ri);
+        vr.setVolumeInputs (this.volumeInputs);
+       
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VolumeRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (vr, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Exception: ", e);
+        }
+
+        String response = stringWriter.toString ();
+
+        this.httpResponse = Integer.toString (httpResponseCode);
+        this.responseBody = response;
+
+        // Log the failed request into the MSO Requests database
+
+        return Response.status (httpResponseCode).entity (response).build ();
+
+    }
+
+    public Response buildResponseFailedValidation (int httpResponseCode, String exceptionMessage) {
+
+        ObjectFactory beansObjectFactory = new ObjectFactory ();
+        VolumeRequest vr = beansObjectFactory.createVolumeRequest ();
+
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (requestId);
+
+        if (this.rinfo != null) {
+            if (this.rinfo.getAction () != null) {
+                ri.setAction (this.rinfo.getAction ());
+            } else {
+                ri.setAction (ActionType.NOT_PROVIDED);
+            }
+            if (this.rinfo.getSource () != null) {
+                ri.setSource (this.rinfo.getSource ());
+            }
+        } else {
+            ri.setAction (ActionType.NOT_PROVIDED);
+        }
+
+        // Nothing more is expected for this request
+
+        String errorMsg = String.format (Messages.errors.get (ErrorNumbers.REQUEST_FAILED_SCHEMA_VALIDATION
+                                                              + "_service"),
+                                         exceptionMessage);
+        ri.setStatusMessage (errorMsg);
+        this.errorMessage = errorMsg;
+
+        ri.setProgress ((int) this.progress);
+        ri.setRequestStatus (RequestStatusType.FAILED);
+        Date startDate = new Date (this.startTime);
+        SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss.SSS");
+        String startTimeString = sdf.format (startDate);
+
+        ri.setStartTime (startTimeString);
+
+        vr.setRequestInfo (ri);
+        vr.setVolumeInputs (this.volumeInputs);
+       
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VolumeRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (vr, stringWriter);
+
+        } catch (JAXBException e) {
+            msoLogger.debug ("Error marshalling", e);
+        }
+
+        String response = stringWriter.toString ();
+
+        this.httpResponse = Integer.toString (httpResponseCode);
+        this.responseBody = response;
+
+        return Response.status (httpResponseCode).entity (response).build ();
+    }
+
+    public String getRequestUri () {
+        return requestUri;
+    }
+
+    public void setRequestUri (String requestUri) {
+        this.requestUri = requestUri;
+    }
+
+    public VolumeInputs getVolumeInputs () {
+        return volumeInputs;
+    }
+
+    public RequestInfo getRequestInfo () {
+        return rinfo;
+    }
+
+    public String getResponseBody () {
+        return responseBody;
+    }
+
+    public void setResponseBody (String responseBody) {
+        this.responseBody = responseBody;
+    }
+
+    public String getHttpResponse () {
+        return httpResponse;
+    }
+
+    public void setHttpResponse (String httpResponse) {
+        this.httpResponse = httpResponse;
+    }
+
+    public String getRequestId () {
+        return requestId;
+    }
+
+    public String getRequestXML () {
+        return requestXML;
+    }
+
+    public void setRequestXML (String requestXML) {
+        this.requestXML = requestXML;
+    }
+
+    public RequestStatusType getStatus () {
+        return status;
+    }
+
+    public void setStatus (RequestStatusType status) {
+        this.status = status;
+        switch (status) {
+        case FAILED:
+        case COMPLETE:
+               this.progress = Constants.PROGRESS_REQUEST_COMPLETED;
+               break;
+        case IN_PROGRESS:
+               this.progress = Constants.PROGRESS_REQUEST_IN_PROGRESS;
+               break;
+        }
+    }
+    
+    public String getServiceType () {
+       if (this.volumeInputs.getServiceType () != null) 
+               return this.volumeInputs.getServiceType ();
+       if (this.volumeInputs.getServiceId () != null) 
+               return this.volumeInputs.getServiceId ();
+       return null;
+    }
+
+    public static String domToStr (Document doc) {
+        if (doc == null) {
+            return null;
+        }
+
+        try {
+            StringWriter sw = new StringWriter ();
+            StreamResult sr = new StreamResult (sw);
+            TransformerFactory tf = TransformerFactory.newInstance ();
+            Transformer t = tf.newTransformer ();
+            t.setOutputProperty (OutputKeys.STANDALONE, "yes");
+            NodeList nl = doc.getDocumentElement ().getChildNodes ();
+            DOMSource source = null;
+            for (int x = 0; x < nl.getLength (); x++) {
+                Node e = nl.item (x);
+                if (e instanceof Element) {
+                    source = new DOMSource (e);
+                    break;
+                }
+            }
+            if (source != null) {
+                t.transform (source, sr);
+
+                       String s = sw.toString ();
+                       return s;
+            }
+               
+                       return null;
+                              
+            } catch (Exception e) {
+               msoLogger.error (MessageEnum.APIH_DOM2STR_ERROR, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception in domToStr", e);
+            }
+        return null;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java
new file mode 100644 (file)
index 0000000..7c1b74c
--- /dev/null
@@ -0,0 +1,746 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra;
+
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+
+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.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.sax.SAXSource;
+
+import org.xml.sax.InputSource;
+
+import org.openecomp.mso.apihandler.common.ErrorNumbers;
+import org.openecomp.mso.apihandler.common.RequestClient;
+import org.openecomp.mso.apihandler.common.RequestClientFactory;
+import org.openecomp.mso.apihandler.common.ResponseHandler;
+import org.openecomp.mso.apihandler.common.ValidationException;
+import org.openecomp.mso.apihandlerinfra.volumebeans.ActionType;
+import org.openecomp.mso.apihandlerinfra.volumebeans.ObjectFactory;
+import org.openecomp.mso.apihandlerinfra.volumebeans.RequestInfo;
+import org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeInputs;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeOutputs;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeRequest;
+import org.openecomp.mso.apihandlerinfra.volumebeans.VolumeRequests;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.Recipe;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoAlarmLogger;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.requestsdb.InfraRequests;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+
+@Path("/{version: v1|v2|v3}/volume-request")
+public class VolumeRequestHandler {
+       
+    @Context
+    private UriInfo uriInfo;
+
+    protected ObjectFactory beansObjectFactory = new ObjectFactory ();
+
+    public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+
+    private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
+
+    private static MsoJavaProperties props = MsoPropertiesUtils.loadMsoProperties ();
+
+    private static final String NOT_FOUND = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not started, properties file missing or invalid or Database Connection failed</body></html>";
+
+    private static final Response NOT_STARTED_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+            .entity (NOT_FOUND)
+            .build ();
+
+    @GET
+    public Response queryFilters (@QueryParam("vnf-type") String vnfType,
+                                  @QueryParam("service-type") String serviceType,
+                                  @QueryParam("aic-node-clli") String aicNodeClli,
+                                  @QueryParam("tenantId") String tenantId,
+                                  @QueryParam("volume-group-id") String volumeGroupId,
+                                  @QueryParam("volume-group-name") String volumeGroupName,
+                                  @PathParam("version") String version) {
+       long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("VolumeQueryFilters");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for queryFilter with vnf-type:" + vnfType
+                                                               + " service-type:" + serviceType
+                                                               + " aic-node-clli:" + aicNodeClli
+                                                               + " tenant-id:" + tenantId
+                                                               + " volume-group-id:" + volumeGroupId
+                                                               + " volume-group-name:" + volumeGroupName);
+        Response response = null;
+       if (vnfType != null) {
+            response = this.getRequestList ("vnfType", vnfType, version);
+        } else {
+               response = queryGenericFilters (serviceType, aicNodeClli, tenantId, volumeGroupId, volumeGroupName, version);
+        }
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+    }
+
+    @GET
+    @Path(Constants.REQUEST_ID_PATH)
+    public Response getRequest (@PathParam("request-id") String requestId, @PathParam("version") String version) {
+       
+       // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+        
+        long startTime = System.currentTimeMillis ();
+        MsoLogger.setServiceName ("VolumeGetRequest");
+        // Generate a Request Id
+        UUIDChecker.generateUUID(msoLogger);
+        msoLogger.debug ("Incoming request received for getRequest with request-id:" + requestId);
+
+        Response response = getRequestGeneric (requestId, version);
+        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+        return response;
+
+    }
+
+   
+    protected MsoLogger getMsoLogger () {
+        return msoLogger;
+    }
+
+   
+     protected void fillVolumeRequest (VolumeRequest qr, InfraRequests ar, String version) {
+        VolumeInputs vi = beansObjectFactory.createVolumeInputs ();
+
+        if (ar.getVolumeGroupId () != null) {
+            vi.setVolumeGroupId (ar.getVolumeGroupId ());
+        }
+        if (ar.getVolumeGroupName () != null) {
+            vi.setVolumeGroupName (ar.getVolumeGroupName ());
+        }
+        if (ar.getVnfType () != null) {
+            vi.setVnfType (ar.getVnfType ());
+        }
+        
+        if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+               if (ar.getServiceType () != null) {
+                       vi.setServiceType (ar.getServiceType ());
+               }
+               if (ar.getAicNodeClli () != null) {
+                       vi.setAicNodeClli (ar.getAicNodeClli ());
+               }
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V2)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }               
+               if (ar.getVfModuleModelName () != null) {
+                       vi.setVfModuleModelName (ar.getVfModuleModelName ());
+               }               
+        }
+        else if (version.equals(Constants.SCHEMA_VERSION_V3)) {
+               if (ar.getAaiServiceId () != null) {
+                       vi.setServiceId (ar.getAaiServiceId ());
+               }
+               if (ar.getAicCloudRegion () != null) {
+                       vi.setAicCloudRegion (ar.getAicCloudRegion ());
+               }               
+               if (ar.getVfModuleModelName () != null) {
+                       vi.setVfModuleModelName (ar.getVfModuleModelName ());
+               }
+               if (ar.getServiceInstanceId () != null) {
+                       vi.setServiceInstanceId (ar.getServiceInstanceId ());
+               }
+               if (ar.getVnfId () != null) {
+                vi.setVnfId (ar.getVnfId ());
+            }
+        }
+        if (ar.getTenantId () != null) {
+            vi.setTenantId (ar.getTenantId ());
+        }
+        
+        qr.setVolumeInputs (vi);
+        
+        qr.setVolumeParams(ar.getVnfParams ());
+
+        try {
+            String volumeoutputs = ar.getVnfOutputs ();
+            if (volumeoutputs != null && volumeoutputs.length () > 0) {
+                msoLogger.debug ("Read VOLUME outputs: " + volumeoutputs);
+                VolumeOutputs volumeOutput = null;
+
+                // Now unmarshal it into network outputs
+                try {
+                    JAXBContext jaxbContext = JAXBContext.newInstance (VolumeOutputs.class);
+                    Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller ();
+
+                    InputSource inputSource = new InputSource (new StringReader (volumeoutputs));
+                    SAXSource source = new SAXSource (inputSource);
+
+                    volumeOutput = (VolumeOutputs) jaxbUnmarshaller.unmarshal (source, VolumeOutputs.class).getValue ();
+
+                } catch (Exception e) {
+                    msoLogger.debug ("Validation failed", e);
+                    throw new ValidationException ("format for volume outputs");
+                }
+
+                qr.setVolumeOutputs (volumeOutput);
+            }
+        } catch (Exception e) {
+            msoLogger.debug ("exception reading networkOutputs Clob", e);
+        }
+    }
+    
+    protected Response queryGenericFilters (String serviceType, String aicNodeClli, String tenantId, String volumeGroupId, String volumeGroupName, String version) {
+        if (serviceType != null) {
+            return this.getRequestList ("serviceType", serviceType, version);
+        }
+        if (aicNodeClli != null) {
+            return this.getRequestList ("aicNodeClli", aicNodeClli, version);
+        }
+        if (tenantId != null) {
+            return this.getRequestList ("tenantId", tenantId, version);
+        }
+        if (volumeGroupName != null) {
+               return this.getRequestList ("volumeGroupName", volumeGroupName, version);
+        }
+        if (volumeGroupId != null) {
+               return this.getRequestList ("volumeGroupId", volumeGroupId, version);
+        }
+        return Response.status (HttpStatus.SC_BAD_REQUEST).entity ("").build ();
+    }
+
+
+    protected Response getRequestGeneric (String requestId, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table  to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest: " + requestId);
+
+        String responseString = null;
+
+        InfraActiveRequests activeReq = RequestsDatabase.getRequestFromInfraActive (requestId,
+                                                                                    "VOLUME");
+        if (activeReq != null) {
+            // build response for active
+            responseString = infraRequestsResponse (activeReq, version);
+            return Response.status (HttpStatus.SC_OK).entity (responseString).build ();
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+         }
+    }
+
+    protected Response getRequestList (String queryAttribute, String queryValue, String version) {
+        // Check INFRA_ACTIVE_REQUESTS table to find info
+        // on this request
+
+        getMsoLogger ().debug ("getRequest based on " + queryAttribute + ": " + queryValue);
+
+        List <InfraActiveRequests> activeReqList = RequestsDatabase.getRequestListFromInfraActive (queryAttribute,
+                                                                                                   queryValue,
+                                                                                                   "VOLUME");
+  
+        List <VolumeRequest> queryResponseList = new LinkedList <VolumeRequest> ();
+
+        if (activeReqList != null) {
+            // build response for active
+            queryResponseList = infraRequestsResponses (activeReqList, version);
+
+        }
+
+        if (queryResponseList != null && !queryResponseList.isEmpty ()) {
+            String result = this.translateVolumeRequests (queryResponseList);
+            return Response.status (HttpStatus.SC_OK).entity (result).build ();
+
+        } else {
+            // Report that no request has been found
+            return Response.status (HttpStatus.SC_NOT_FOUND).entity ("").build ();
+        }
+    }
+
+    private VolumeRequest fillGeneric (InfraRequests ar) {
+        VolumeRequest qr = beansObjectFactory.createVolumeRequest ();
+        RequestInfo ri = beansObjectFactory.createRequestInfo ();
+        ri.setRequestId (ar.getRequestId ());
+        ri.setAction (ActionType.fromValue (ar.getAction ()));
+        ri.setRequestStatus (RequestStatusType.fromValue (ar.getRequestStatus ()));
+        if (ar.getProgress () != null) {
+            ri.setProgress (ar.getProgress ().intValue ());
+        }
+        if (ar.getSource () != null) {
+            ri.setSource (ar.getSource ());
+        }
+
+        ri.setStartTime (ar.getStartTime ().toString ());
+        if (ar.getEndTime () != null) {
+            ri.setEndTime (ar.getEndTime ().toString ());
+        }
+        
+        if (ar.getStatusMessage () != null) {
+               ri.setStatusMessage (ar.getStatusMessage ());
+        }
+        qr.setRequestInfo (ri);
+        return qr;
+    }
+
+    private List <VolumeRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
+        List <VolumeRequest> queryResponseList = new LinkedList <VolumeRequest> ();
+
+        for (InfraRequests ar : arList) {
+            VolumeRequest qr = fillGeneric (ar);
+            fillVolumeRequest (qr, ar, version);
+            queryResponseList.add (qr);
+        }
+        return queryResponseList;
+    }
+
+    private String translateVolumeRequests (List <VolumeRequest> queryResponseList) {
+        VolumeRequests queryResponses = new VolumeRequests ();
+        for (int i = 0; i < queryResponseList.size (); i++) {
+            queryResponses.getVolumeRequest ().add (queryResponseList.get (i));
+        }
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VolumeRequests.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            // output pretty printed
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+
+            jaxbMarshaller.marshal (queryResponses, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        return stringWriter.toString ();
+    }
+
+    private String infraRequestsResponse (InfraRequests ar, String version) {
+        VolumeRequest qr = fillGeneric (ar);
+        fillVolumeRequest (qr, ar, version);
+
+        StringWriter stringWriter = new StringWriter ();
+        try {
+            JAXBContext jaxbContext = JAXBContext.newInstance (VolumeRequest.class);
+            Marshaller jaxbMarshaller = jaxbContext.createMarshaller ();
+
+            jaxbMarshaller.setProperty (Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            jaxbMarshaller.marshal (qr, stringWriter);
+
+        } catch (JAXBException e) {
+            getMsoLogger ().debug ("Marshalling issue", e);
+        }
+
+        String response = stringWriter.toString ();
+        return response;
+    }
+
+    private String getAuditLogReturnMsg (Response response) {
+        String returnMsg = "";
+        if (response.getStatus() == HttpStatus.SC_OK) {
+               returnMsg = "Successful. StatusCode=" + HttpStatus.SC_OK;
+        } else if (response.getStatus() == HttpStatus.SC_NOT_FOUND) {
+               returnMsg = "Record not found . StatusCode=" + HttpStatus.SC_NOT_FOUND;
+        } else if (response.getStatus() == HttpStatus.SC_BAD_REQUEST) {
+               returnMsg = "Bad request: one of the following attribute serviceType, aicNodeClli, tenantId, volumeGroupId, volumeGroupName should be defined. StatusCode=" + HttpStatus.SC_BAD_REQUEST;
+        }
+        return returnMsg;
+    }
+
+    @POST
+    @Path("/")
+    @Produces(MediaType.APPLICATION_XML)
+    public Response manageVolumeRequest (String reqXML, @PathParam("version") String version) {
+       MsoLogger.setServiceName ("VolumeRequest");
+       if ("v1".equals(version)) {
+            return manageVolumeRequestImpl (reqXML, Constants.SCHEMA_VERSION_V1);
+       } else if ("v2".equals(version)) {
+            return manageVolumeRequestImpl (reqXML, Constants.SCHEMA_VERSION_V2);
+       } else if ("v3".equals(version)) {
+            return manageVolumeRequestImpl (reqXML, Constants.SCHEMA_VERSION_V3);
+       } else {
+            long startTime = System.currentTimeMillis ();
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "Version not found");
+               return Response.status(HttpStatus.SC_NOT_FOUND).build();
+       }
+    }
+
+    private Response manageVolumeRequestImpl (String reqXML, String version) {
+       String methodName = "VolumeRequest";
+       props = MsoPropertiesUtils.loadMsoProperties ();
+       
+        long startTime = System.currentTimeMillis ();
+        if (MsoPropertiesUtils.getNoPropertiesState()) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Application not started, properties file missing or invalid");
+               return NOT_STARTED_RESPONSE;
+        }
+
+        uriInfo.getRequestUri ();
+
+        // Generate unique request id for the new request
+        UUID requestUUID = UUID.randomUUID ();
+
+        VolumeMsoInfraRequest msoRequest = new VolumeMsoInfraRequest (requestUUID.toString ());
+
+        if (reqXML == null) {
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "The input request is null");
+            return Response.status (HttpStatus.SC_NO_CONTENT).entity ("").build ();
+        }
+
+        String requestUri = uriInfo.getRequestUri ().toString ();
+
+        msoLogger.debug ("Incoming Request: " + reqXML);
+
+        msoRequest.setRequestUri (requestUri);
+       
+        msoLogger.debug ("Schema version: " + version);
+        try {
+            msoRequest.parse (reqXML, version, props);
+        } catch (Exception e) {
+            msoLogger.debug ("Validation failed: ", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseFailedValidation (HttpStatus.SC_BAD_REQUEST, e.getMessage ());
+            if (msoRequest.getRequestId () != null) {
+                msoLogger.debug ("Logging failed message to the database");
+                msoRequest.createRequestRecord (Status.FAILED);
+            }
+            msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, reqXML, "", "", MsoLogger.ErrorCode.DataError, "Exception when parsing reqXML", e);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Validation of the input request failed");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+        MsoLogger.setServiceName (MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo ().getAction ().name ());
+        msoLogger.debug ("Update serviceName with detailed action info to:" + MsoLogger.getServiceName () + "_" + msoRequest.getRequestInfo ().getAction ().name ());
+        if (msoRequest.getRequestInfo ()
+                      .getAction () == org.openecomp.mso.apihandlerinfra.volumebeans.ActionType.CREATE) {
+            // Check if this request is a duplicate of the one with the same network Name
+            msoLogger.debug ("Checking for a duplicate with the same volume-name");
+            InfraActiveRequests dup = null;
+            try {
+
+                dup = RequestsDatabase.checkDuplicateByVnfName (msoRequest.getVolumeInputs ().getVolumeGroupName (),
+                                                                msoRequest.getRequestInfo ().getAction ().value (),
+                                                                "VOLUME");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "volume-group-name", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for duplicated request", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for duplicated request");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_CREATE_ON_THE_SAME_VNF_NAME_IN_PROGRESS,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                "CREATE on the same Volume Group Name is already progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicates request - CREATE on the same Volume Group Name is already progress");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicates request - CREATE on the same Volume Group Name is already progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        } else {
+            // Check if this request is a duplicate of the one with the same volumeGroupId
+            InfraActiveRequests dup = null;
+            msoLogger.debug ("Checking for a duplicate with the same volume-group-id");
+            try {
+                dup = RequestsDatabase.checkDuplicateByVnfId (msoRequest.getVolumeInputs ().getVolumeGroupId (),
+                                                              msoRequest.getRequestInfo ().getAction ().value (),
+                                                              "VOLUME");
+
+            } catch (Exception e) {
+                msoLogger.debug ("Exception", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                                                                       ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB,
+                                                                       null,
+                                                                       e.getMessage ());
+                alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                       MsoAlarmLogger.CRITICAL,
+                                       Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_DUPLICATE_CHECK_EXC_ATT, "volume-group-id", "", "", MsoLogger.ErrorCode.DataError, "Exception while checking for a duplicate request with the sam volume-group-id", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while checking for a duplicate request with the sam volume-group-id");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            if (dup != null) {
+                // Found the duplicate record. Return the appropriate error.
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponse (HttpStatus.SC_CONFLICT,
+                                                              ErrorNumbers.LOCKED_SAME_ACTION_AND_VNF_ID,
+                                                              dup);
+                msoLogger.warn (MessageEnum.APIH_DUPLICATE_FOUND,
+                                msoRequest.getRequestInfo ().getAction ().value ()
+                                                                  + " on the same Volume Group Id already in progress", "", "", MsoLogger.ErrorCode.DataError, "Duplicated request on the same Volume Group Id already in progress");
+                msoRequest.createRequestRecord (Status.FAILED);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict, "Duplicated request on the same Volume Group Id already in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+        }
+
+        String orchestrationURI = "";
+
+        // Query MSO Catalog DB
+        try(CatalogDatabase db = new CatalogDatabase ()) {
+            Recipe recipe = null;
+
+            if (version.equals(Constants.SCHEMA_VERSION_V1)) {
+                if (msoRequest.getServiceType () != null
+                        && msoRequest.getServiceType ().length () > 0) {
+                    recipe = db.getVnfComponentsRecipe (msoRequest.getVolumeInputs ().getVnfType (),
+                            Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                            msoRequest.getRequestInfo ().getAction ().value (),
+                            msoRequest.getServiceType ());
+                }
+                if (recipe == null) {
+                    recipe = db.getVnfComponentsRecipe (msoRequest.getVolumeInputs ().getVnfType (),
+                            Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                            msoRequest.getRequestInfo ().getAction ().value (),
+                            null);
+                    // If no recipe for the vnf type is found, look for generic recipe with "*" vnf type
+                    if (recipe == null) {
+                        recipe = db.getVnfComponentsRecipe (Constants.VNF_TYPE_WILDCARD,
+                                Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                msoRequest.getRequestInfo ().getAction ().value (),
+                                null);
+                    }
+                }
+            }
+            else if (version.equals (Constants.SCHEMA_VERSION_V2) || version.equals (Constants.SCHEMA_VERSION_V3)) {
+                switch (msoRequest.getRequestInfo ().getAction ()) {
+                    case CREATE:
+                    case UPDATE:
+                    case DELETE:
+                        // First get recipe for the vnf type given
+                        recipe = db.getVnfComponentsRecipe (msoRequest.getVolumeInputs ().getVnfType (),
+                                Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                msoRequest.getRequestInfo ().getAction ().value (), null);
+
+                        // If no recipe for the vnf type is found, look for generic recipe with "*" vnf type
+                        if (recipe == null) {
+                            recipe = db.getVnfComponentsRecipe (Constants.VNF_TYPE_WILDCARD,
+                                    Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                    msoRequest.getRequestInfo ().getAction ().value (), null);
+                        }
+                        break;
+                    case CREATE_VF_MODULE_VOL:
+                    case UPDATE_VF_MODULE_VOL:
+                    case DELETE_VF_MODULE_VOL:
+                        // First get recipe for the vnf type given
+                        recipe = db.getVnfComponentsRecipe (msoRequest.getVolumeInputs ().getVnfType (),
+                                Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                msoRequest.getRequestInfo ().getAction ().value (), null);
+
+                        // If no recipe for the vnf type is found, look for generic recipe with "*" in vf module id
+                        if (recipe == null) {
+                            recipe = db.getVnfComponentsRecipeByVfModuleId (Constants.VNF_TYPE_WILDCARD,
+                                    Constants.VOLUME_GROUP_COMPONENT_TYPE,
+                                    msoRequest.getRequestInfo ().getAction ().value ());
+                        }
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+
+            if (recipe == null) {
+                msoLogger.error (MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, "VNF Recipe", "", "", MsoLogger.ErrorCode.DataError, "VNF Recipe not found in DB");
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                        ErrorNumbers.RECIPE_DOES_NOT_EXIST,
+                        null,
+                        "");
+                msoRequest.createRequestRecord (Status.FAILED);
+                db.close ();
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, "VNF Recipe not found in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+            orchestrationURI = recipe.getOrchestrationUri ();
+            msoLogger.debug ("Orchestration URI is: " + orchestrationURI);
+            String requestId = msoRequest.getRequestId ();
+            msoLogger.debug ("requestId is: " + requestId);
+            msoLogger.debug ("About to insert a record");
+
+            try {
+                msoRequest.createRequestRecord (Status.PENDING);
+            } catch (Exception e) {
+                msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception in createRequestRecord", e);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response response = msoRequest.buildResponseWithError (HttpStatus.SC_INTERNAL_SERVER_ERROR,
+                        ErrorNumbers.COULD_NOT_WRITE_TO_REQUESTS_DB,
+                        null,
+                        "non-unique request-id specified");
+                // Cannot create a record of this request here, our communication with MSO DB just failed. Do not try
+                // to create a failed record
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while creating record in DB");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+                return response;
+            }
+
+            RequestClient requestClient = null;
+            HttpResponse response = null;
+            long subStartTime = System.currentTimeMillis();
+            try {
+                requestClient = RequestClientFactory.getRequestClient (orchestrationURI, props);
+                // Capture audit event
+                msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
+                response = requestClient.post (msoRequest.getRequestXML (),
+                        requestId,
+                        Integer.toString (recipe.getRecipeTimeout ()).toString (),
+                        version,
+                        null,
+                        null);
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", orchestrationURI, null);
+            } catch (Exception e) {
+                msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", orchestrationURI, null);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_COMMUNICATION_TO_BPEL,
+                        null,
+                        e.getMessage ());
+                alarmLogger.sendAlarm ("MsoConfigurationError",
+                        MsoAlarmLogger.CRITICAL,
+                        Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, "Camunda", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine", e);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            if (response == null) {
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                Response resp = msoRequest.buildResponseWithError (HttpStatus.SC_BAD_GATEWAY,
+                        ErrorNumbers.NO_RESPONSE_FROM_BPEL,
+                        null,
+                        "bpelResponse is null");
+                msoRequest.updateFinalStatus (Status.FAILED);
+                msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Null response from BPEL", "Camunda", "", MsoLogger.ErrorCode.DataError, "Null response from BPMN engine");
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Null response from BPMN engine");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            }
+
+            ResponseHandler respHandler = new ResponseHandler (response, requestClient.getType ());
+            int bpelStatus = respHandler.getStatus ();
+
+            // BPEL accepted the request, the request is in progress
+            if (bpelStatus == HttpStatus.SC_ACCEPTED) {
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                msoLogger.debug ("Received from BPEL: " + bpelXMLResponseBody);
+                msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.IN_PROGRESS);
+                RequestsDatabase.updateInfraStatus (msoRequest.getRequestId (),
+                        Status.IN_PROGRESS.toString (),
+                        Constants.PROGRESS_REQUEST_IN_PROGRESS,
+                        Constants.MODIFIED_BY_APIHANDLER);
+                Response resp = msoRequest.buildResponse (bpelStatus, null, null);
+                msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "BPMN accepted the request, the request is in progress");
+                msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                return resp;
+            } else {
+
+                String bpelXMLResponseBody = respHandler.getResponseBody ();
+                if (bpelXMLResponseBody != null && !bpelXMLResponseBody.isEmpty ()) {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, bpelXMLResponseBody, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR,
+                            "Response from BPEL engine is failed with HTTP Status=" + bpelStatus, "Camunda", "", MsoLogger.ErrorCode.DataError, "Response from BPEL engine is failed with HTTP Status=" + bpelStatus);
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is with status Failed");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                } else {
+                    msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+                    Response resp = msoRequest.buildResponse (bpelStatus, ErrorNumbers.ERROR_FROM_BPEL, null);
+                    msoRequest.updateFinalStatus (Status.FAILED);
+                    msoLogger.error (MessageEnum.APIH_BPEL_RESPONSE_ERROR, "Response from BPEL engine is empty", "Camunda", "", MsoLogger.ErrorCode.DataError, "Response from BPEL engine is empty");
+                    msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Response from BPMN engine is empty");
+                    msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+                    return resp;
+                }
+            }
+
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.APIH_DB_ACCESS_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception while communciate with Catalog DB", e);
+            msoRequest.setStatus (org.openecomp.mso.apihandlerinfra.volumebeans.RequestStatusType.FAILED);
+            Response response = msoRequest.buildResponseWithError (HttpStatus.SC_NOT_FOUND,
+                                                                   ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB,
+                                                                   null,
+                                                                   e.getMessage ());
+            alarmLogger.sendAlarm ("MsoDatabaseAccessError",
+                                   MsoAlarmLogger.CRITICAL,
+                                   Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB));
+            msoRequest.createRequestRecord (Status.FAILED);
+            msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while communciate with DB");
+            msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());
+            return response;
+        }
+
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/ActionType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/ActionType.java
new file mode 100644 (file)
index 0000000..d5e9629
--- /dev/null
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for action-type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="action-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="CREATE"/>
+ *     &lt;enumeration value="SETSTATUS"/>
+ *     &lt;enumeration value="REPLACE"/>
+ *     &lt;enumeration value="UPDATE"/>
+ *     &lt;enumeration value="DELETE"/>
+ *     &lt;enumeration value="NOT_PROVIDED"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "action-type")
+@XmlEnum
+public enum ActionType {
+
+    CREATE,
+    SETSTATUS,
+    REPLACE,
+    UPDATE,
+    DELETE,
+    NOT_PROVIDED;
+
+    public String value() {
+        return name();
+    }
+
+    public static ActionType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkInputs.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkInputs.java
new file mode 100644 (file)
index 0000000..f2bf59e
--- /dev/null
@@ -0,0 +1,378 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="network-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="network-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="network-type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="service-instance-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="backout-on-failure" type="{http://www.w3.org/2001/XMLSchema}Boolean"/>
+ *         &lt;choice>
+ *             &lt;element name="service-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *             &lt;element name="service-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;/choice>
+ *         &lt;choice>
+ *             &lt;element name="aic-node-clli" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *          &lt;element name="aic-cloud-region" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;/choice>
+ *         &lt;element name="aic-node-clli" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="tenant-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="prov-status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "networkId",
+    "networkName",
+    "networkType",
+    "serviceInstanceId",
+    "backoutOnFailure",
+    "serviceType",
+    "serviceId",
+    "aicNodeClli",
+    "aicCloudRegion",
+    "tenantId",
+    "provStatus"
+})
+@XmlRootElement(name = "network-inputs")
+public class NetworkInputs {
+
+    @XmlElement(name = "network-id")
+    protected String networkId;
+    @XmlElement(name = "network-name")
+    protected String networkName;
+    @XmlElement(name = "network-type", required = true)
+    protected String networkType;
+    @XmlElement(name = "service-instance-id")
+    protected String serviceInstanceId;
+    @XmlElement(name = "backout-on-failure")
+    protected Boolean backoutOnFailure;
+    @XmlElement(name = "service-type")
+    protected String serviceType;
+    @XmlElement(name = "service-id")
+    protected String serviceId;
+    @XmlElement(name = "aic-node-clli")
+    protected String aicNodeClli;
+    @XmlElement(name = "aic-cloud-region")
+    protected String aicCloudRegion;
+    @XmlElement(name = "tenant-id", required = true)
+    protected String tenantId;
+    @XmlElement(name = "prov-status")
+    protected String provStatus;
+
+    /**
+     * Gets the value of the networkId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getNetworkId() {
+        return networkId;
+    }
+
+    /**
+     * Sets the value of the networkId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setNetworkId(String value) {
+        this.networkId = value;
+    }
+
+    /**
+     * Gets the value of the networkName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getNetworkName() {
+        return networkName;
+    }
+
+    /**
+     * Sets the value of the networkName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setNetworkName(String value) {
+        this.networkName = value;
+    }
+
+    /**
+     * Gets the value of the networkType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getNetworkType() {
+        return networkType;
+    }
+
+    /**
+     * Sets the value of the networkType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setNetworkType(String value) {
+        this.networkType = value;
+    }
+    
+    /**
+     * Gets the value of the serviceInstanceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    /**
+     * Sets the value of the serviceInstanceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceInstanceId(String value) {
+        this.serviceInstanceId = value;
+    }
+
+    /**
+     * Gets the value of the serviceType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    /**
+     * Sets the value of the serviceType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceType(String value) {
+        this.serviceType = value;
+    }
+    
+    /**
+     * Gets the value of the serviceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceId() {
+        return serviceId;
+    }
+
+    /**
+     * Sets the value of the serviceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceId (String value) {
+        this.serviceId = value;
+    }
+
+
+    /**
+     * Gets the value of the aicNodeClli property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicNodeClli() {
+        return aicNodeClli;
+    }
+
+    /**
+     * Sets the value of the aicNodeClli property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicNodeClli(String value) {
+        this.aicNodeClli = value;
+    }
+    
+    /**
+     * Gets the value of the aicCloudRegion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicCloudRegion() {
+        return aicCloudRegion;
+    }
+
+    /**
+     * Sets the value of the aicCloudRegion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicCloudRegion(String value) {
+        this.aicCloudRegion = value;
+    }
+
+
+    /**
+     * Gets the value of the tenantId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+
+    /**
+     * Gets the value of the provStatus property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getProvStatus() {
+        return provStatus;
+    }
+
+    /**
+     * Sets the value of the provStatus property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setProvStatus(String value) {
+        this.provStatus = value;
+    }
+    
+    /**
+     * Gets the value of the backoutOnFailure property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean getBackoutOnFailure() {
+        return backoutOnFailure;
+    }
+
+    /**
+     * Sets the value of the backoutOnFailure property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setBackoutOnFailure(Boolean value) {
+        this.backoutOnFailure = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkOutputs.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkOutputs.java
new file mode 100644 (file)
index 0000000..683b764
--- /dev/null
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="network-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="network-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "networkId",
+    "networkName"
+})
+@XmlRootElement(name = "network-outputs")
+public class NetworkOutputs {
+
+    @XmlElement(name = "network-id", required = true)
+    protected String networkId;
+    @XmlElement(name = "network-name", required = true)
+    protected String networkName;
+
+    /**
+     * Gets the value of the networkId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getNetworkId() {
+        return networkId;
+    }
+
+    /**
+     * Sets the value of the networkId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setNetworkId(String value) {
+        this.networkId = value;
+    }
+
+    /**
+     * Gets the value of the networkName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getNetworkName() {
+        return networkName;
+    }
+
+    /**
+     * Sets the value of the networkName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setNetworkName(String value) {
+        this.networkName = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkRequest.java
new file mode 100644 (file)
index 0000000..41e1236
--- /dev/null
@@ -0,0 +1,179 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}request-info"/>
+ *           &lt;sequence>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}network-inputs"/>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}network-params" minOccurs="0"/>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}network-outputs" minOccurs="0"/>
+ *           &lt;/sequence>
+ *        &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestInfo",
+    "networkInputs",
+    "networkParams",
+    "networkOutputs"
+})
+@XmlRootElement(name = "network-request")
+public class NetworkRequest {
+
+    @XmlElement(name = "request-info", required = true)
+    protected RequestInfo requestInfo;
+    @XmlElement(name = "network-inputs")
+    protected NetworkInputs networkInputs;
+    @XmlElement(name = "network-params")
+    protected Object networkParams;
+    @XmlElement(name = "network-outputs")
+    protected NetworkOutputs networkOutputs;
+
+    /**
+     * Gets the value of the requestInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public RequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    /**
+     * Sets the value of the requestInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public void setRequestInfo(RequestInfo value) {
+        this.requestInfo = value;
+    }
+
+   
+    /**
+     * Gets the value of the networkInputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link NetworkInputs }
+     *     
+     */
+    public NetworkInputs getNetworkInputs() {
+        return networkInputs;
+    }
+
+    /**
+     * Sets the value of the networkInputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link NetworkInputs }
+     *     
+     */
+    public void setNetworkInputs(NetworkInputs value) {
+        this.networkInputs = value;
+    }
+
+    /**
+     * Gets the value of the networkParams property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getNetworkParams() {
+        return networkParams;
+    }
+
+    /**
+     * Sets the value of the networkParams property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setNetworkParams(Object value) {
+        this.networkParams = value;
+    }
+
+    /**
+     * Gets the value of the networkOutputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link NetworkOutputs }
+     *     
+     */
+    public NetworkOutputs getNetworkOutputs() {
+        return networkOutputs;
+    }
+
+    /**
+     * Sets the value of the networkOutputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link NetworkOutputs }
+     *     
+     */
+    public void setNetworkOutputs(NetworkOutputs value) {
+        this.networkOutputs = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkRequests.java
new file mode 100644 (file)
index 0000000..1c0cd94
--- /dev/null
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/network-request/v1}network-request" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "networkRequest"
+})
+@XmlRootElement(name = "network-requests")
+public class NetworkRequests {
+
+    @XmlElement(name = "network-request")
+    protected List<NetworkRequest> networkRequest;
+
+    /**
+     * Gets the value of the networkRequest property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnfRequest property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getNetworkRequest().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link NetworkRequest }
+     * 
+     * 
+     */
+    public List<NetworkRequest> getNetworkRequest() {
+        if (networkRequest == null) {
+            networkRequest = new ArrayList<NetworkRequest>();
+        }
+        return this.networkRequest;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkType.java
new file mode 100644 (file)
index 0000000..a92fd33
--- /dev/null
@@ -0,0 +1,148 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "type",
+    "id",
+    "description"
+})
+@XmlRootElement(name = "network-type")
+public class NetworkType {
+
+    @XmlElement(required = true)
+    protected String type;
+    @XmlElement(required = true)
+    protected String id;
+    @XmlElement(required = true)
+    protected String description;
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkTypes.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/NetworkTypes.java
new file mode 100644 (file)
index 0000000..e7ddc92
--- /dev/null
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}vnf-type" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "networkType"
+})
+@XmlRootElement(name = "network-types")
+public class NetworkTypes {
+
+    @XmlElement(name = "network-type")
+    protected List<NetworkType> networkType;
+
+    /**
+     * Gets the value of the networkType property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnfType property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getNetworkType().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link NetworkType }
+     * 
+     * 
+     */
+    public List<NetworkType> getNetworkType() {
+        if (networkType == null) {
+            networkType = new ArrayList<NetworkType>();
+        }
+        return this.networkType;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/ObjectFactory.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/ObjectFactory.java
new file mode 100644 (file)
index 0000000..df553da
--- /dev/null
@@ -0,0 +1,129 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.openecomp.mso.apihandlerinfra.vnfbeans1 package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _NetworkParams_QNAME = new QName("http://ecomp.att.com/mso/infra/network-request/v1", "network-params");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.mso.apihandlerinfra.vnfbeans1
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link RequestInfo }
+     * 
+     */
+    public RequestInfo createRequestInfo() {
+        return new RequestInfo();
+    }
+
+    /**
+     * Create an instance of {@link NetworkRequest }
+     * 
+     */
+    public NetworkRequest createNetworkRequest() {
+        return new NetworkRequest();
+    }
+
+    /**
+     * Create an instance of {@link NetworkInputs }
+     * 
+     */
+    public NetworkInputs createNetworkInputs() {
+        return new NetworkInputs();
+    }
+
+    /**
+     * Create an instance of {@link NetworkOutputs }
+     * 
+     */
+    public NetworkOutputs createNetworkOutputs() {
+        return new NetworkOutputs();
+    }
+
+    /**
+     * Create an instance of {@link NetworkRequests }
+     * 
+     */
+    public NetworkRequests createNetworkRequests() {
+        return new NetworkRequests();
+    }
+    
+    /**
+     * Create an instance of {@link NetworkTypes }
+     * 
+     */
+    public NetworkTypes createNetworkTypes() {
+        return new NetworkTypes();
+    }
+
+    /**
+    * Create an instance of {@link NetworkType }
+    * 
+    */
+   public NetworkType createNetworkType() {
+       return new NetworkType();
+   }
+    
+   /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://ecomp.att.com/mso/infra/network-request/v1", name = "network-params")
+    public JAXBElement<Object> createNetworkParams(Object value) {
+        return new JAXBElement<Object>(_NetworkParams_QNAME, Object.class, null, value);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/RequestInfo.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/RequestInfo.java
new file mode 100644 (file)
index 0000000..c7e20aa
--- /dev/null
@@ -0,0 +1,286 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="request-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="action" type="{http://ecomp.att.com/mso/infra/vnf-request/v1}action-type"/>
+ *         &lt;element name="request-status" type="{http://ecomp.att.com/mso/infra/vnf-request/v1}request-status-type" minOccurs="0"/>
+ *         &lt;element name="status-message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="progress" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ *         &lt;element name="start-time" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="end-time" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "action",
+    "requestStatus",
+    "statusMessage",
+    "progress",
+    "startTime",
+    "endTime",
+    "source"
+})
+@XmlRootElement(name = "request-info")
+public class RequestInfo {
+
+    @XmlElement(name = "request-id")
+    protected String requestId;
+    @XmlElement(required = true)
+    protected ActionType action;
+    @XmlElement(name = "request-status")
+    protected RequestStatusType requestStatus;
+    @XmlElement(name = "status-message")
+    protected String statusMessage;
+    protected Integer progress;
+    @XmlElement(name = "start-time")
+    protected String startTime;
+    @XmlElement(name = "end-time")
+    protected String endTime;
+    protected String source;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the action property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ActionType }
+     *     
+     */
+    public ActionType getAction() {
+        return action;
+    }
+
+    /**
+     * Sets the value of the action property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ActionType }
+     *     
+     */
+    public void setAction(ActionType value) {
+        this.action = value;
+    }
+
+    /**
+     * Gets the value of the requestStatus property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestStatusType }
+     *     
+     */
+    public RequestStatusType getRequestStatus() {
+        return requestStatus;
+    }
+
+    /**
+     * Sets the value of the requestStatus property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestStatusType }
+     *     
+     */
+    public void setRequestStatus(RequestStatusType value) {
+        this.requestStatus = value;
+    }
+
+    /**
+     * Gets the value of the statusMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStatusMessage() {
+        return statusMessage;
+    }
+
+    /**
+     * Sets the value of the statusMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStatusMessage(String value) {
+        this.statusMessage = value;
+    }
+
+    /**
+     * Gets the value of the progress property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getProgress() {
+        return progress;
+    }
+
+    /**
+     * Sets the value of the progress property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setProgress(Integer value) {
+        this.progress = value;
+    }
+
+    /**
+     * Gets the value of the startTime property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets the value of the startTime property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStartTime(String value) {
+        this.startTime = value;
+    }
+
+    /**
+     * Gets the value of the endTime property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets the value of the endTime property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setEndTime(String value) {
+        this.endTime = value;
+    }
+
+    /**
+     * Gets the value of the source property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the value of the source property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSource(String value) {
+        this.source = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/RequestStatusType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/RequestStatusType.java
new file mode 100644 (file)
index 0000000..50d6daa
--- /dev/null
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for request-status-type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="request-status-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="COMPLETE"/>
+ *     &lt;enumeration value="FAILED"/>
+ *     &lt;enumeration value="IN_PROGRESS"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "request-status-type")
+@XmlEnum
+public enum RequestStatusType {
+
+    COMPLETE,
+    FAILED,
+    IN_PROGRESS,
+    PENDING,
+    TIMEOUT;
+
+    public String value() {
+        return name();
+    }
+
+    public static RequestStatusType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/package-info.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/networkbeans/package-info.java
new file mode 100644 (file)
index 0000000..54fb497
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://ecomp.att.com/mso/infra/network-request/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.mso.apihandlerinfra.networkbeans;
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/package-info.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/package-info.java
new file mode 100644 (file)
index 0000000..9225523
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.01.08 at 03:50:12 PM EST 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://ecomp.att.com/mso/request/types/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.mso.apihandlerinfra;
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/CloudConfiguration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/CloudConfiguration.java
new file mode 100644 (file)
index 0000000..a9f7f7a
--- /dev/null
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class CloudConfiguration {
+
+    protected String aicNodeClli;
+    protected String tenantId;
+    protected String lcpCloudRegionId;
+
+    /**
+     * Gets the value of the aicNodeClli property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicNodeClli() {
+        return aicNodeClli;
+    }
+
+    /**
+     * Sets the value of the aicNodeClli property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicNodeClli(String value) {
+        this.aicNodeClli = value;
+    }
+
+    /**
+     * Gets the value of the tenantId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+    
+
+       public String getLcpCloudRegionId() {
+               return lcpCloudRegionId;
+       }
+
+       public void setLcpCloudRegionId(String lcpCloudRegionId) {
+               this.lcpCloudRegionId = lcpCloudRegionId;
+       }
+       
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ExceptionType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ExceptionType.java
new file mode 100644 (file)
index 0000000..aa596ef
--- /dev/null
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.05.03 at 03:56:30 PM CDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for exceptionType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="exceptionType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="text" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="variables" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="50" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "exceptionType", propOrder = {
+    "messageId",
+    "text",
+    "variables"
+})
+@XmlSeeAlso({
+    ServiceException.class,
+    PolicyException.class
+})
+public class ExceptionType {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    @XmlElement(required = true)
+    protected String text;
+    protected List<String> variables;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the text property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * Sets the value of the text property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setText(String value) {
+        this.text = value;
+    }
+
+    /**
+     * Gets the value of the variables property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the variables property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVariables().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getVariables() {
+        if (variables == null) {
+            variables = new ArrayList<String>();
+        }
+        return this.variables;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/GetOrchestrationListResponse.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/GetOrchestrationListResponse.java
new file mode 100644 (file)
index 0000000..6df45c7
--- /dev/null
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import java.util.List;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class GetOrchestrationListResponse {
+       
+       protected List<RequestList> requestList;
+
+       public List<RequestList> getRequestList() {
+               return requestList;
+       }
+
+       public void setRequestList(List<RequestList> requestList) {
+               this.requestList = requestList;
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/GetOrchestrationResponse.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/GetOrchestrationResponse.java
new file mode 100644 (file)
index 0000000..87aa157
--- /dev/null
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class GetOrchestrationResponse {
+       
+       protected Request request;
+
+       public Request getRequest() {
+               return request;
+       }
+
+       public void setRequest(Request request) {
+               this.request = request;
+       }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/InstanceReferences.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/InstanceReferences.java
new file mode 100644 (file)
index 0000000..fd5c73f
--- /dev/null
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class InstanceReferences {
+       
+       protected String serviceInstanceId;
+       protected String serviceInstanceName;
+       protected String vnfInstanceId;
+       protected String vnfInstanceName;
+       protected String vfModuleInstanceId;
+       protected String vfModuleInstanceName;
+       protected String volumeGroupInstanceId;
+       protected String volumeGroupInstanceName;
+       protected String networkInstanceId;
+       protected String networkInstanceName;
+       
+       
+       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 getVnfInstanceId() {
+               return vnfInstanceId;
+       }
+       public void setVnfInstanceId(String vnfInstanceId) {
+               this.vnfInstanceId = vnfInstanceId;
+       }
+       public String getVnfInstanceName() {
+               return vnfInstanceName;
+       }
+       public void setVnfInstanceName(String vnfInstanceName) {
+               this.vnfInstanceName = vnfInstanceName;
+       }
+       public String getVfModuleInstanceId() {
+               return vfModuleInstanceId;
+       }
+       public void setVfModuleInstanceId(String vfModuleInstanceId) {
+               this.vfModuleInstanceId = vfModuleInstanceId;
+       }
+       public String getVfModuleInstanceName() {
+               return vfModuleInstanceName;
+       }
+       public void setVfModuleInstanceName(String vfModuleInstanceName) {
+               this.vfModuleInstanceName = vfModuleInstanceName;
+       }
+       public String getVolumeGroupInstanceId() {
+               return volumeGroupInstanceId;
+       }
+       public void setVolumeGroupInstanceId(String volumeGroupInstanceId) {
+               this.volumeGroupInstanceId = volumeGroupInstanceId;
+       }
+       public String getVolumeGroupInstanceName() {
+               return volumeGroupInstanceName;
+       }
+       public void setVolumeGroupInstanceName(String volumeGroupInstanceName) {
+               this.volumeGroupInstanceName = volumeGroupInstanceName;
+       }
+       public String getNetworkInstanceId() {
+               return networkInstanceId;
+       }
+       public void setNetworkInstanceId(String networkInstanceId) {
+               this.networkInstanceId = networkInstanceId;
+       }
+       public String getNetworkInstanceName() {
+               return networkInstanceName;
+       }
+       public void setNetworkInstanceName(String networkInstanceName) {
+               this.networkInstanceName = networkInstanceName;
+       }
+       
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ModelInfo.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ModelInfo.java
new file mode 100644 (file)
index 0000000..e361b1d
--- /dev/null
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.30 at 02:48:23 PM CDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import org.openecomp.mso.apihandlerinfra.ModelType;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class ModelInfo {
+
+    protected String modelCustomizationName;
+    protected String modelInvariantId;
+       protected ModelType modelType;
+    protected String modelNameVersionId;
+    protected String modelName;
+    protected String modelVersion;
+    
+    
+       public String getModelCustomizationName() {
+               return modelCustomizationName;
+       }
+       public void setModelCustomizationName(String modelCustomizationName) {
+               this.modelCustomizationName = modelCustomizationName;
+       }
+       public String getModelNameVersionId() {
+               return modelNameVersionId;
+       }
+       public void setModelNameVersionId(String modelNameVersionId) {
+               this.modelNameVersionId = modelNameVersionId;
+       }
+       public String getModelName() {
+               return modelName;
+       }
+       public void setModelName(String modelName) {
+               this.modelName = modelName;
+       }
+       public String getModelVersion() {
+               return modelVersion;
+       }
+       public void setModelVersion(String modelVersion) {
+               this.modelVersion = modelVersion;
+       }
+       public ModelType getModelType() {
+               return modelType;
+       }
+       public void setModelType(ModelType modelType) {
+               this.modelType = modelType;
+       }
+       public String getModelInvariantId() {
+               return modelInvariantId;
+       }
+       public void setModelInvariantId(String modelInvariantId) {
+               this.modelInvariantId = modelInvariantId;
+       }
+       
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/PolicyException.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/PolicyException.java
new file mode 100644 (file)
index 0000000..4d336c4
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.30 at 02:48:23 PM CDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for policyException complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="policyException">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://ecomp.att.com/mso/request/types/v1}exceptionType">
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "policyException")
+public class PolicyException
+    extends ExceptionType
+{
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RelatedInstance.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RelatedInstance.java
new file mode 100644 (file)
index 0000000..90275f6
--- /dev/null
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class RelatedInstance {
+       
+       protected String instanceName;
+       protected String instanceId;
+       protected ModelInfo modelInfo;
+       
+       
+       public String getInstanceName() {
+               return instanceName;
+       }
+       public void setInstanceName(String instanceName) {
+               this.instanceName = instanceName;
+       }
+       public String getInstanceId() {
+               return instanceId;
+       }
+       public void setInstanceId(String instanceId) {
+               this.instanceId = instanceId;
+       }
+       public ModelInfo getModelInfo() {
+               return modelInfo;
+       }
+       public void setModelInfo(ModelInfo modelInfo) {
+               this.modelInfo = modelInfo;
+       }
+       
+       
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RelatedInstanceList.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RelatedInstanceList.java
new file mode 100644 (file)
index 0000000..1244d3b
--- /dev/null
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+public class RelatedInstanceList {
+       
+       protected RelatedInstance relatedInstance;
+
+       public RelatedInstance getRelatedInstance() {
+               return relatedInstance;
+       }
+
+       public void setRelatedInstance(RelatedInstance relatedInstance) {
+               this.relatedInstance = relatedInstance;
+       }
+
+
+       
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/Request.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/Request.java
new file mode 100644 (file)
index 0000000..7a88c2d
--- /dev/null
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import java.util.Date;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+//@JsonRootName(value = "request")
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class Request {
+
+    protected String requestId;
+    protected String startTime;
+    protected String requestScope;
+    protected String requestType;
+    //protected String requestDetails;
+    protected RequestDetails requestDetails;
+    protected InstanceReferences instanceReferences;
+    protected RequestStatus requestStatus;
+    
+    
+       public String getRequestId() {
+               return requestId;
+       }
+       public void setRequestId(String requestId) {
+               this.requestId = requestId;
+       }
+       public String getStartTime() {
+               return startTime;
+       }
+       public void setStartTime(String startTime) {
+               this.startTime = startTime;
+       }
+       public String getRequestScope() {
+               return requestScope;
+       }
+       public void setRequestScope(String requestScope) {
+               this.requestScope = requestScope;
+       }
+       public String getRequestType() {
+               return requestType;
+       }
+       public void setRequestType(String requestType) {
+               this.requestType = requestType;
+       }
+       public RequestStatus getRequestStatus() {
+               return requestStatus;
+       }
+       public void setRequestStatus(RequestStatus requestStatus) {
+               this.requestStatus = requestStatus;
+       }
+       public InstanceReferences getInstanceReferences() {
+               return instanceReferences;
+       }
+       public void setInstanceReferences(InstanceReferences instanceReferences) {
+               this.instanceReferences = instanceReferences;
+       }
+       public RequestDetails getRequestDetails() {
+               return requestDetails;
+       }
+       public void setRequestDetails(RequestDetails requestDetails) {
+               this.requestDetails = requestDetails;
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestDetails.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestDetails.java
new file mode 100644 (file)
index 0000000..de6cbb7
--- /dev/null
@@ -0,0 +1,165 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonRootName(value = "requestDetails")
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class RequestDetails {
+
+    protected ModelInfo modelInfo;
+    protected RequestInfo requestInfo;
+    protected RelatedInstanceList[] relatedInstanceList;
+    protected SubscriberInfo subscriberInfo;
+    protected CloudConfiguration cloudConfiguration;
+    protected RequestParameters requestParameters;
+
+    /**
+     * Gets the value of the serviceInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ModelInfo }
+     *     
+     */
+    public ModelInfo getModelInfo() {
+        return modelInfo;
+    }
+
+    /**
+     * Sets the value of the serviceInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ModelInfo }
+     *     
+     */
+    public void setModelInfo(ModelInfo value) {
+        this.modelInfo = value;
+    }
+
+    /**
+     * Gets the value of the requestInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public RequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    /**
+     * Sets the value of the requestInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public void setRequestInfo(RequestInfo value) {
+        this.requestInfo = value;
+    }
+
+    /**
+     * Gets the value of the subscriberInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link SubscriberInfo }
+     *     
+     */
+    public SubscriberInfo getSubscriberInfo() {
+        return subscriberInfo;
+    }
+
+    /**
+     * Sets the value of the subscriberInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link SubscriberInfo }
+     *     
+     */
+    public void setSubscriberInfo(SubscriberInfo value) {
+        this.subscriberInfo = value;
+    }
+
+    /**
+     * Gets the value of the cloudConfiguration property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CloudConfiguration }
+     *     
+     */
+    public CloudConfiguration getCloudConfiguration() {
+        return cloudConfiguration;
+    }
+
+    /**
+     * Sets the value of the cloudConfiguration property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CloudConfiguration }
+     *     
+     */
+    public void setCloudConfiguration(CloudConfiguration value) {
+        this.cloudConfiguration = value;
+    }
+
+    /**
+     * Gets the value of the requestParameters property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestParameters }
+     *     
+     */
+    public RequestParameters getRequestParameters() {
+        return requestParameters;
+    }
+
+    /**
+     * Sets the value of the requestParameters property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestParameters }
+     *     
+     */
+    public void setRequestParameters(RequestParameters value) {
+        this.requestParameters = value;
+    }
+
+       public RelatedInstanceList[] getRelatedInstanceList() {
+               return relatedInstanceList;
+       }
+
+       public void setRelatedInstanceList(RelatedInstanceList[] relatedInstanceList) {
+               this.relatedInstanceList = relatedInstanceList;
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestError.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestError.java
new file mode 100644 (file)
index 0000000..3a27238
--- /dev/null
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.04.07 at 08:25:52 AM CDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;choice>
+ *           &lt;element name="policyException" type="{http://ecomp.att.com/mso/request/types/v1}policyException"/>
+ *           &lt;element name="serviceException" type="{http://ecomp.att.com/mso/request/types/v1}serviceException"/>
+ *         &lt;/choice>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "policyException",
+    "serviceException"
+})
+@XmlRootElement(name = "requestError")
+public class RequestError {
+
+    protected PolicyException policyException;
+    protected ServiceException serviceException;
+
+    /**
+     * Gets the value of the policyException property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PolicyException }
+     *     
+     */
+    public PolicyException getPolicyException() {
+        return policyException;
+    }
+
+    /**
+     * Sets the value of the policyException property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PolicyException }
+     *     
+     */
+    public void setPolicyException(PolicyException value) {
+        this.policyException = value;
+    }
+
+    /**
+     * Gets the value of the serviceException property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ServiceException }
+     *     
+     */
+    public ServiceException getServiceException() {
+        return serviceException;
+    }
+
+    /**
+     * Sets the value of the serviceException property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ServiceException }
+     *     
+     */
+    public void setServiceException(ServiceException value) {
+        this.serviceException = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java
new file mode 100644 (file)
index 0000000..e5f3167
--- /dev/null
@@ -0,0 +1,191 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class RequestInfo {
+
+       protected String billingAccountNumber;
+       protected String callbackUrl;
+    protected String correlator;
+    protected String orderNumber;
+    protected String productFamilyId;
+    protected Integer orderVersion;
+    protected String source;
+    protected String instanceName;
+    protected boolean suppressRollback;
+
+    /**
+     * Gets the value of the callbackUrl property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCallbackUrl() {
+        return callbackUrl;
+    }
+
+    /**
+     * Sets the value of the callbackUrl property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCallbackUrl(String value) {
+        this.callbackUrl = value;
+    }
+
+    /**
+     * Gets the value of the correlator property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCorrelator() {
+        return correlator;
+    }
+
+    /**
+     * Sets the value of the correlator property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCorrelator(String value) {
+        this.correlator = value;
+    }
+
+    /**
+     * Gets the value of the orderNumber property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    /**
+     * Sets the value of the orderNumber property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setOrderNumber(String value) {
+        this.orderNumber = value;
+    }
+
+    /**
+     * Gets the value of the orderVersion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getOrderVersion() {
+        return orderVersion;
+    }
+
+    /**
+     * Sets the value of the orderVersion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setOrderVersion(Integer value) {
+        this.orderVersion = value;
+    }
+
+    /**
+     * Gets the value of the source property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the value of the source property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSource(String value) {
+        this.source = value;
+    }
+
+       public String getInstanceName() {
+               return instanceName;
+       }
+
+       public void setInstanceName(String instanceName) {
+               this.instanceName = instanceName;
+       }
+
+       public String getBillingAccountNumber() {
+               return billingAccountNumber;
+       }
+
+       public void setBillingAccountNumber(String billingAccountNumber) {
+               this.billingAccountNumber = billingAccountNumber;
+       }
+
+       public String getProductFamilyId() {
+               return productFamilyId;
+       }
+
+       public void setProductFamilyId(String productFamilyId) {
+               this.productFamilyId = productFamilyId;
+       }
+
+       public boolean isSuppressRollback() {
+               return suppressRollback;
+       }
+
+       public void setSuppressRollback(boolean suppressRollback) {
+               this.suppressRollback = suppressRollback;
+       }
+       
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestList.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestList.java
new file mode 100644 (file)
index 0000000..dba82a8
--- /dev/null
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import java.util.List;
+
+
+public class RequestList {
+
+    protected Request request;
+
+       public Request getRequest() {
+               return request;
+       }
+
+       public void setRequest(Request request) {
+               this.request = request;
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestParameters.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestParameters.java
new file mode 100644 (file)
index 0000000..1a82040
--- /dev/null
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class RequestParameters {
+
+       private String subscriptionServiceType;
+       private List<Map<String, String>> userParams = new ArrayList<>();
+
+
+       public String getSubscriptionServiceType() {
+               return subscriptionServiceType;
+       }
+
+       public void setSubscriptionServiceType(String subscriptionServiceType) {
+               this.subscriptionServiceType = subscriptionServiceType;
+       }
+
+       public List<Map<String, String>> getUserParams() {
+               return userParams;
+       }
+
+       public void setUserParams(List<Map<String, String>> userParams) {
+               this.userParams = userParams;
+       }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestReferences.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestReferences.java
new file mode 100644 (file)
index 0000000..c2e3ecf
--- /dev/null
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+public class RequestReferences {
+       
+       String requestId;
+       String instanceId;
+       
+       
+       public String getRequestId() {
+               return requestId;
+       }
+       public void setRequestId(String requestId) {
+               this.requestId = requestId;
+       }
+       public String getInstanceId() {
+               return instanceId;
+       }
+       public void setInstanceId(String instanceId) {
+               this.instanceId = instanceId;
+       }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestStatus.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestStatus.java
new file mode 100644 (file)
index 0000000..a9bf5e8
--- /dev/null
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import java.util.Date;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class RequestStatus {
+
+    protected String requestState;
+    protected String statusMessage;
+    protected Integer percentProgress;
+    protected String finishTime;
+    
+    
+       public String getRequestState() {
+               return requestState;
+       }
+       public void setRequestState(String requestState) {
+               this.requestState = requestState;
+       }
+       public String getStatusMessage() {
+               return statusMessage;
+       }
+       public void setStatusMessage(String statusMessage) {
+               this.statusMessage = statusMessage;
+       }
+       public Integer getPercentProgress() {
+               return percentProgress;
+       }
+       public void setPercentProgress(Integer percentProgress) {
+               this.percentProgress = percentProgress;
+       }
+       public String getFinishTime() {
+               return finishTime;
+       }
+       public void setFinishTime(String finishTime) {
+               this.finishTime = finishTime;
+       }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceException.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceException.java
new file mode 100644 (file)
index 0000000..f207e96
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.30 at 02:48:23 PM CDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for serviceException complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="serviceException">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://ecomp.att.com/mso/request/types/v1}exceptionType">
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "serviceException")
+public class ServiceException
+    extends ExceptionType
+{
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceInstancesRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceInstancesRequest.java
new file mode 100644 (file)
index 0000000..30903b9
--- /dev/null
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+
+
+public class ServiceInstancesRequest {
+
+       private RequestDetails requestDetails;
+       private String serviceInstanceId;
+       private String vnfInstanceId;
+       private String networkInstanceId;
+       private String volumeGroupInstanceId;
+       private String vfModuleInstanceId;
+
+       public RequestDetails getRequestDetails() {
+               return requestDetails;
+       }
+
+       public void setRequestDetails(RequestDetails requestDetails) {
+               this.requestDetails = requestDetails;
+       }
+
+       public String getServiceInstanceId() {
+               return serviceInstanceId;
+       }
+
+       public void setServiceInstanceId(String serviceInstanceId) {
+               this.serviceInstanceId = serviceInstanceId;
+       }
+
+       public String getVnfInstanceId() {
+               return vnfInstanceId;
+       }
+
+       public void setVnfInstanceId(String vnfInstanceId) {
+               this.vnfInstanceId = vnfInstanceId;
+       }
+
+       public String getNetworkInstanceId() {
+               return networkInstanceId;
+       }
+
+       public void setNetworkInstanceId(String networkInstanceId) {
+               this.networkInstanceId = networkInstanceId;
+       }
+
+       public String getVolumeGroupInstanceId() {
+               return volumeGroupInstanceId;
+       }
+
+       public void setVolumeGroupInstanceId(String volumeGroupInstanceId) {
+               this.volumeGroupInstanceId = volumeGroupInstanceId;
+       }
+
+       public String getVfModuleInstanceId() {
+               return vfModuleInstanceId;
+       }
+
+       public void setVfModuleInstanceId(String vfModuleInstanceId) {
+               this.vfModuleInstanceId = vfModuleInstanceId;
+       }
+       
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceInstancesResponse.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/ServiceInstancesResponse.java
new file mode 100644 (file)
index 0000000..b5be488
--- /dev/null
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+public class ServiceInstancesResponse {
+       
+       RequestReferences requestReferences;
+
+       public RequestReferences getRequestReferences() {
+               return requestReferences;
+       }
+
+       public void setRequestReferences(RequestReferences requestReferences) {
+               this.requestReferences = requestReferences;
+       }
+       
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/SubscriberInfo.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/SubscriberInfo.java
new file mode 100644 (file)
index 0000000..bf7a044
--- /dev/null
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
+public class SubscriberInfo {
+
+    protected String globalSubscriberId;
+    protected String subscriberName;
+
+    /**
+     * Gets the value of the globalSubscriberId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getGlobalSubscriberId() {
+        return globalSubscriberId;
+    }
+
+    /**
+     * Sets the value of the globalSubscriberId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setGlobalSubscriberId(String value) {
+        this.globalSubscriberId = value;
+    }
+
+    /**
+     * Gets the value of the subscriberName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSubscriberName() {
+        return subscriberName;
+    }
+
+    /**
+     * Sets the value of the subscriberName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSubscriberName(String value) {
+        this.subscriberName = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/ActionType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/ActionType.java
new file mode 100644 (file)
index 0000000..3062dfc
--- /dev/null
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for action-type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="action-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="CREATE"/>
+ *     &lt;enumeration value="SETSTATUS"/>
+ *     &lt;enumeration value="REPLACE"/>
+ *     &lt;enumeration value="UPDATE"/>
+ *     &lt;enumeration value="DELETE"/>
+ *     &lt;enumeration value="CREATE_VF_MODULE"/>
+ *     &lt;enumeration value="UPDATE_VF_MODULE"/>
+ *     &lt;enumeration value="DELETE_VF_MODULE"/>
+ *     &lt;enumeration value="NOT_PROVIDED"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "action-type")
+@XmlEnum
+public enum ActionType {
+
+    CREATE,
+    SETSTATUS,
+    REPLACE, 
+    UPDATE,
+    DELETE,
+    CREATE_VF_MODULE,
+    UPDATE_VF_MODULE,
+    DELETE_VF_MODULE,
+    NOT_PROVIDED;
+
+    public String value() {
+        return name();
+    }
+
+    public static ActionType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/ObjectFactory.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/ObjectFactory.java
new file mode 100644 (file)
index 0000000..b1c000f
--- /dev/null
@@ -0,0 +1,150 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.openecomp.mso.apihandlerinfra.vnfbeans1 package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _VnfParams_QNAME = new QName("http://ecomp.att.com/mso/infra/vnf-request/v1", "vnf-params");
+    private final static QName _NetworkParams_QNAME = new QName("http://ecomp.att.com/mso/infra/vnf-request/v1", "network-params");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.mso.apihandlerinfra.vnfbeans1
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link VnfInputs }
+     * 
+     */
+    public VnfInputs createVnfInputs() {
+        return new VnfInputs();
+    }
+
+    /**
+     * Create an instance of {@link RequestInfo }
+     * 
+     */
+    public RequestInfo createRequestInfo() {
+        return new RequestInfo();
+    }
+
+    /**
+     * Create an instance of {@link VnfOutputs }
+     * 
+     */
+    public VnfOutputs createVnfOutputs() {
+        return new VnfOutputs();
+    }
+
+    /**
+     * Create an instance of {@link VnfType }
+     * 
+     */
+    public VnfType createVnfType() {
+        return new VnfType();
+    }
+
+    /**
+     * Create an instance of {@link VnfRequest }
+     * 
+     */
+    public VnfRequest createVnfRequest() {
+        return new VnfRequest();
+    }
+
+   
+    /**
+     * Create an instance of {@link VnfTypes }
+     * 
+     */
+    public VnfTypes createVnfTypes() {
+        return new VnfTypes();
+    }
+
+    /**
+     * Create an instance of {@link VnfRequests }
+     * 
+     */
+    public VnfRequests createVnfRequests() {
+        return new VnfRequests();
+    }
+    
+    /**
+     * Create an instance of {@link VfModuleModelName }
+     * 
+     */
+    public VfModuleModelName createVfModuleModelName() {
+        return new VfModuleModelName();
+    }
+    
+    /**
+     * Create an instance of {@link VfModuleModelNames }
+     * 
+     */
+    public VfModuleModelNames createVfModuleModelNames() {
+        return new VfModuleModelNames();
+    }
+
+    
+    
+        
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://ecomp.att.com/mso/infra/vnf-request/v1", name = "vnf-params")
+    public JAXBElement<Object> createVnfParams(Object value) {
+        return new JAXBElement<Object>(_VnfParams_QNAME, Object.class, null, value);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/RequestInfo.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/RequestInfo.java
new file mode 100644 (file)
index 0000000..cb8973b
--- /dev/null
@@ -0,0 +1,286 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="request-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="action" type="{http://ecomp.att.com/mso/infra/vnf-request/v1}action-type"/>
+ *         &lt;element name="request-status" type="{http://ecomp.att.com/mso/infra/vnf-request/v1}request-status-type" minOccurs="0"/>
+ *         &lt;element name="status-message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="progress" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ *         &lt;element name="start-time" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="end-time" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "action",
+    "requestStatus",
+    "statusMessage",
+    "progress",
+    "startTime",
+    "endTime",
+    "source"
+})
+@XmlRootElement(name = "request-info")
+public class RequestInfo {
+
+    @XmlElement(name = "request-id")
+    protected String requestId;
+    @XmlElement(required = true)
+    protected ActionType action;
+    @XmlElement(name = "request-status")
+    protected RequestStatusType requestStatus;
+    @XmlElement(name = "status-message")
+    protected String statusMessage;
+    protected Integer progress;
+    @XmlElement(name = "start-time")
+    protected String startTime;
+    @XmlElement(name = "end-time")
+    protected String endTime;
+    protected String source;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the action property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ActionType }
+     *     
+     */
+    public ActionType getAction() {
+        return action;
+    }
+
+    /**
+     * Sets the value of the action property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ActionType }
+     *     
+     */
+    public void setAction(ActionType value) {
+        this.action = value;
+    }
+
+    /**
+     * Gets the value of the requestStatus property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestStatusType }
+     *     
+     */
+    public RequestStatusType getRequestStatus() {
+        return requestStatus;
+    }
+
+    /**
+     * Sets the value of the requestStatus property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestStatusType }
+     *     
+     */
+    public void setRequestStatus(RequestStatusType value) {
+        this.requestStatus = value;
+    }
+
+    /**
+     * Gets the value of the statusMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStatusMessage() {
+        return statusMessage;
+    }
+
+    /**
+     * Sets the value of the statusMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStatusMessage(String value) {
+        this.statusMessage = value;
+    }
+
+    /**
+     * Gets the value of the progress property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getProgress() {
+        return progress;
+    }
+
+    /**
+     * Sets the value of the progress property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setProgress(Integer value) {
+        this.progress = value;
+    }
+
+    /**
+     * Gets the value of the startTime property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets the value of the startTime property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStartTime(String value) {
+        this.startTime = value;
+    }
+
+    /**
+     * Gets the value of the endTime property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets the value of the endTime property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setEndTime(String value) {
+        this.endTime = value;
+    }
+
+    /**
+     * Gets the value of the source property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the value of the source property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSource(String value) {
+        this.source = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/RequestStatusType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/RequestStatusType.java
new file mode 100644 (file)
index 0000000..4698c78
--- /dev/null
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for request-status-type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="request-status-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="COMPLETE"/>
+ *     &lt;enumeration value="FAILED"/>
+ *     &lt;enumeration value="IN_PROGRESS"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "request-status-type")
+@XmlEnum
+public enum RequestStatusType {
+
+    COMPLETE,
+    FAILED,
+    IN_PROGRESS,
+    PENDING,
+    TIMEOUT;
+
+    public String value() {
+        return name();
+    }
+
+    public static RequestStatusType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VfModuleModelName.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VfModuleModelName.java
new file mode 100644 (file)
index 0000000..c987648
--- /dev/null
@@ -0,0 +1,261 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="model-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="model-version" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="model-invariant-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="is-base" type="{http://www.w3.org/2001/XMLSchema}Boolean"/>
+ *         &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="asdc-service-model-version" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "modelName",
+    "modelVersion",
+    "modelInvariantUuid",
+    "isBase",
+    "id",
+    "description",
+    "asdcServiceModelVersion"
+})
+@XmlRootElement(name = "vf-module-model-name")
+public class VfModuleModelName {
+
+    @XmlElement(name="model-name", required = true)
+    protected String modelName;
+    @XmlElement(name="model-version", required = true)
+    protected String modelVersion;
+    @XmlElement(name="model-invariant-uuid", required = true)
+    protected String modelInvariantUuid;
+    @XmlElement(name="is-base", required = true)
+    protected Boolean isBase;
+    @XmlElement(name="id", required = true)
+    protected String id;
+    @XmlElement(name="description", required = true)
+    protected String description;
+    @XmlElement(name="asdc-service-model-version", required = true)
+    protected String asdcServiceModelVersion;
+
+    /**
+     * Gets the value of the modelName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getModelName() {
+        return modelName;
+    }
+
+    /**
+     * Sets the value of the modelName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setModelName(String value) {
+        this.modelName = value;
+    }
+    
+    /**
+     * Gets the value of the modelVersion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getModelVersion() {
+        return modelVersion;
+    }
+
+    /**
+     * Sets the value of the modelVersion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setModelVersion(String value) {
+        this.modelVersion = value;
+    }
+    
+    /**
+     * Gets the value of the modelInvariantUuid property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getModelInvariantUuid() {
+        return modelInvariantUuid;
+    }
+
+    /**
+     * Sets the value of the modelInvariantUuid property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setModelInvariantUuid(String value) {
+        this.modelInvariantUuid = value;
+    }
+    
+    /**
+     * Gets the value of the isBase property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean getIsBase() {
+        return isBase;
+    }
+
+    /**
+     * Sets the value of the isBase property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setIsBase(Boolean value) {
+        this.isBase = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+    
+    /**
+     * Gets the value of the asdcServiceModelVersion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAsdcServiceModelVersion() {
+        return asdcServiceModelVersion;
+    }
+
+    /**
+     * Sets the value of the asdcServiceModelVersion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAsdcServiceModelVersion(String value) {
+        this.asdcServiceModelVersion = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VfModuleModelNames.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VfModuleModelNames.java
new file mode 100644 (file)
index 0000000..790a5e8
--- /dev/null
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}vf-module-model-name" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vfModuleModelName"
+})
+@XmlRootElement(name = "vf-module-model-names")
+public class VfModuleModelNames {
+
+    @XmlElement(name = "vf-module-model-name")
+    protected List<VfModuleModelName> vfModuleModelName;
+
+    /**
+     * Gets the value of the vfModuleModelName property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnfType property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVfModuleModelName().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link VfModuleModelName }
+     * 
+     * 
+     */
+    public List<VfModuleModelName> getVfModuleModelName() {
+        if (vfModuleModelName == null) {
+            vfModuleModelName = new ArrayList<VfModuleModelName>();
+        }
+        return this.vfModuleModelName;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfInputs.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfInputs.java
new file mode 100644 (file)
index 0000000..bfc0d84
--- /dev/null
@@ -0,0 +1,689 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="vnf-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vf-module-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vnf-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vf-module-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vnf-type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vf-module-model-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="asdc-service-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="service-instance-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="backout-on-failure" type="{http://www.w3.org/2001/XMLSchema}Boolean"/>
+ *         &lt;choice>
+ *             &lt;element name="service-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *             &lt;element name="service-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;/choice>
+ *         &lt;choice>
+ *             &lt;element name="aic-node-clli" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *          &lt;element name="aic-cloud-region" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;/choice>
+ *         &lt;element name="tenant-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="prov-status" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="volume-group-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="volume-group-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="persona-model-id" type="{http://www.w3.org/2001/XMLSchema}string"/ minOccurs="0">
+ *         &lt;element name="persona-model-version" type="{http://www.w3.org/2001/XMLSchema}string"/ minOccurs="0">
+ *         &lt;element name="is-base-vf-module" type="{http://www.w3.org/2001/XMLSchema}Boolean"/ minOccurs="0">
+ *         &lt;element name="vnf-persona-model-id" type="{http://www.w3.org/2001/XMLSchema}string"/ minOccurs="0">
+ *         &lt;element name="vnf-persona-model-version" type="{http://www.w3.org/2001/XMLSchema}string"/ minOccurs="0">
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfId",
+    "vfModuleId",
+    "vnfName",
+    "vfModuleName",
+    "vnfType",
+    "vfModuleModelName",
+    "asdcServiceModelVersion",
+    "serviceInstanceId",
+    "backoutOnFailure",
+    "serviceType",
+    "serviceId",
+    "aicNodeClli",
+    "aicCloudRegion",
+    "tenantId",
+    "provStatus",
+    "volumeGroupName",
+    "volumeGroupId",
+    // BEGIN - elements valid only on BPMN interface
+    "personaModelId",
+    "personaModelVersion",
+    "isBaseVfModule",
+    "vnfPersonaModelId",
+    "vnfPersonaModelVersion"
+    // END - elements valid only on BPMN interface
+})
+@XmlRootElement(name = "vnf-inputs")
+public class VnfInputs {
+
+    @XmlElement(name = "vnf-id")
+    protected String vnfId;
+    @XmlElement(name = "vf-module-id")
+    protected String vfModuleId;
+    @XmlElement(name = "vnf-name")
+    protected String vnfName;
+    @XmlElement(name = "vf-module-name")
+    protected String vfModuleName;
+    @XmlElement(name = "vnf-type")
+    protected String vnfType;
+    @XmlElement(name = "vf-module-model-name")
+    protected String vfModuleModelName;
+    @XmlElement(name = "asdc-service-model-version")
+    protected String asdcServiceModelVersion;
+    @XmlElement(name = "service-instance-id")
+    protected String serviceInstanceId;
+    @XmlElement(name = "backout-on-failure")
+    protected Boolean backoutOnFailure;
+    @XmlElement(name = "service-type")
+    protected String serviceType;
+    @XmlElement(name = "service-id")
+    protected String serviceId;
+    @XmlElement(name = "aic-node-clli")
+    protected String aicNodeClli;
+    @XmlElement(name = "aic-cloud-region")
+    protected String aicCloudRegion;
+    @XmlElement(name = "tenant-id", required = true)
+    protected String tenantId;
+    @XmlElement(name = "prov-status")
+    protected String provStatus;
+    @XmlElement(name = "volume-group-name")
+    protected String volumeGroupName;
+    @XmlElement(name = "volume-group-id")
+    protected String volumeGroupId;
+    @XmlElement(name = "persona-model-id")
+    protected String personaModelId;
+    @XmlElement(name = "persona-model-version")
+    protected String personaModelVersion;
+    @XmlElement(name = "is-base-vf-module")
+    protected Boolean isBaseVfModule;
+    @XmlElement(name = "vnf-persona-model-id")
+    protected String vnfPersonaModelId;
+    @XmlElement(name = "vnf-persona-model-version")
+    protected String vnfPersonaModelVersion;
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+
+    /**
+     * Gets the value of the vnfName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfName() {
+        return vnfName;
+    }
+
+    /**
+     * Sets the value of the vnfName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfName(String value) {
+        this.vnfName = value;
+    }
+
+    /**
+     * Gets the value of the vnfType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfType() {
+        return vnfType;
+    }
+
+    /**
+     * Sets the value of the vnfType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfType(String value) {
+        this.vnfType = value;
+    }
+    
+    /**
+     * Gets the value of the serviceInstanceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    /**
+     * Sets the value of the serviceInstanceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceInstanceId(String value) {
+        this.serviceInstanceId = value;
+    }
+
+    /**
+     * Gets the value of the serviceType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    /**
+     * Sets the value of the serviceType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceType(String value) {
+        this.serviceType = value;
+    }
+    
+    /**
+     * Gets the value of the serviceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceId() {
+        return serviceId;
+    }
+
+    /**
+     * Sets the value of the serviceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceId (String value) {
+        this.serviceId = value;
+    }
+
+
+    /**
+     * Gets the value of the aicNodeClli property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicNodeClli() {
+        return aicNodeClli;
+    }
+
+    /**
+     * Sets the value of the aicNodeClli property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicNodeClli(String value) {
+        this.aicNodeClli = value;
+    }
+    
+    /**
+     * Gets the value of the aicCloudRegion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicCloudRegion() {
+        return aicCloudRegion;
+    }
+
+    /**
+     * Sets the value of the aicCloudRegion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicCloudRegion(String value) {
+        this.aicCloudRegion = value;
+    }
+
+    /**
+     * Gets the value of the tenantId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+
+    /**
+     * Gets the value of the provStatus property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getProvStatus() {
+        return provStatus;
+    }
+
+    /**
+     * Sets the value of the provStatus property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setProvStatus(String value) {
+        this.provStatus = value;
+    }
+    
+    /**
+     * Gets the value of the volumeGroupName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolumeGroupName() {
+        return volumeGroupName;
+    }
+
+    /**
+     * Sets the value of the volumeGroupName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolumeGroupName(String value) {
+        this.volumeGroupName = value;
+    }
+    
+    /**
+     * Gets the value of the volumeGroupId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolumeGroupId() {
+        return volumeGroupId;
+    }
+
+    /**
+     * Sets the value of the volumeGroupId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolumeGroupId(String value) {
+        this.volumeGroupId = value;
+    }
+    
+    /**
+     * Gets the value of the vfModuleId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVfModuleId() {
+        return vfModuleId;
+    }
+
+    /**
+     * Sets the value of the vfModuleId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVfModuleId(String value) {
+        this.vfModuleId = value;
+    }
+    
+    /**
+     * Gets the value of the vfModuleName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVfModuleName() {
+        return vfModuleName;
+    }
+
+    /**
+     * Sets the value of the vfModuleName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVfModuleName(String value) {
+        this.vfModuleName = value;
+    }
+    
+    /**
+     * Gets the value of the vfModuleModelName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVfModuleModelName() {
+        return vfModuleModelName;
+    }
+
+    /**
+     * Sets the value of the vfModuleModelName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVfModuleModelName(String value) {
+        this.vfModuleModelName = value;
+    }
+    
+    /**
+     * Gets the value of the asdcServiceModelVersion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAsdcServiceModelVersion() {
+        return asdcServiceModelVersion;
+    }
+
+    /**
+     * Sets the value of the asdcServiceModelVersion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAsdcServiceModelVersion(String value) {
+        this.asdcServiceModelVersion = value;
+    }
+    
+    /**
+     * Gets the value of the backoutOnFailure property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean getBackoutOnFailure() {
+        return backoutOnFailure;
+    }
+
+    /**
+     * Sets the value of the backoutOnFailure property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setBackoutOnFailure(Boolean value) {
+        this.backoutOnFailure = value;
+    }
+    
+    /**
+     * Gets the value of the personaModelId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getPersonaModelId() {
+        return personaModelId;
+    }
+
+    /**
+     * Sets the value of the personaModelId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setPersonaModelId(String value) {
+        this.personaModelId = value;
+    }
+    
+    /**
+     * Gets the value of the personaModelVersion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getPersonaModelVersion() {
+        return personaModelVersion;
+    }
+
+    /**
+     * Sets the value of the personaModelVersion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setPersonaModelVersion(String value) {
+        this.personaModelVersion = value;
+    }
+    
+    
+    /**
+     * Gets the value of the isBaseVfModule property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean getIsBaseVfModule() {
+        return isBaseVfModule;
+    }
+
+    /**
+     * Sets the value of the isBaseVfModule property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setIsBaseVfModule(Boolean value) {
+        this.isBaseVfModule = value;
+    }
+    
+    /**
+     * Gets the value of the vnfPersonaModelId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfPersonaModelId() {
+        return vnfPersonaModelId;
+    }
+
+    /**
+     * Sets the value of the vnfPersonaModelId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfPersonaModelId(String value) {
+        this.vnfPersonaModelId = value;
+    }
+    
+    /**
+     * Gets the value of the vnfPersonaModelVersion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfPersonaModelVersion() {
+        return vnfPersonaModelVersion;
+    }
+
+    /**
+     * Sets the value of the vnfPersonaModelVersion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfPersonaModelVersion(String value) {
+        this.vnfPersonaModelVersion = value;
+    }   
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfOutputs.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfOutputs.java
new file mode 100644 (file)
index 0000000..acb2a0a
--- /dev/null
@@ -0,0 +1,291 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="vnf-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vf-module-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vnf-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vf-module-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="aic-node-clli" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="tenant-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="volume-group-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="volume-group-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfId",
+    "vfModuleId",
+    "vnfName",
+    "vfModuleName",
+    "aicNodeClli",
+    "tenantId",
+    "volumeGroupName",
+    "volumeGroupId"
+})
+@XmlRootElement(name = "vnf-outputs")
+public class VnfOutputs {
+
+    @XmlElement(name = "vnf-id", required = true)
+    protected String vnfId;
+    @XmlElement(name = "vf-module-id")
+    protected String vfModuleId;
+    @XmlElement(name = "vnf-name", required = true)
+    protected String vnfName;
+    @XmlElement(name = "vf-module-name", required = true)
+    protected String vfModuleName;
+    @XmlElement(name = "aic-node-clli", required = true)
+    protected String aicNodeClli;
+    @XmlElement(name = "tenant-id", required = true)
+    protected String tenantId;
+    @XmlElement(name = "volume-group-name")
+    protected String volumeGroupName;
+    @XmlElement(name = "volume-group-id")
+    protected String volumeGroupId;
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+    
+    /**
+     * Gets the value of the vfModuleId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVfModuleId() {
+        return vfModuleId;
+    }
+
+    /**
+     * Sets the value of the vfModuleId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVfModuleId(String value) {
+        this.vfModuleId = value;
+    }
+
+
+
+    /**
+     * Gets the value of the vnfName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfName() {
+        return vnfName;
+    }
+
+    /**
+     * Sets the value of the vnfName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfName(String value) {
+        this.vnfName = value;
+    }
+    
+    /**
+     * Gets the value of the vfModuleName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVfModuleName() {
+        return vfModuleName;
+    }
+
+    /**
+     * Sets the value of the vfModuleName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVfModuleName(String value) {
+        this.vfModuleName = value;
+    }
+
+
+    /**
+     * Gets the value of the aicNodeClli property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicNodeClli() {
+        return aicNodeClli;
+    }
+
+    /**
+     * Sets the value of the aicNodeClli property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicNodeClli(String value) {
+        this.aicNodeClli = value;
+    }
+
+    /**
+     * Gets the value of the tenantId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+    
+    /**
+     * Gets the value of the volumeGroupName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolumeGroupName() {
+        return volumeGroupName;
+    }
+
+    /**
+     * Sets the value of the volumeGroupName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolumeGroupName(String value) {
+        this.volumeGroupName = value;
+    }
+    
+    /**
+     * Gets the value of the volumeGroupId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolumeGroupId() {
+        return volumeGroupId;
+    }
+
+    /**
+     * Sets the value of the volumeGroupId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolumeGroupId(String value) {
+        this.volumeGroupId = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfRequest.java
new file mode 100644 (file)
index 0000000..bd210a5
--- /dev/null
@@ -0,0 +1,179 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}request-info"/>
+ *           &lt;sequence>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}vnf-inputs"/>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}vnf-params" minOccurs="0"/>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}vnf-outputs" minOccurs="0"/>
+ *           &lt;/sequence>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestInfo",
+    "vnfInputs",
+    "vnfParams",
+    "vnfOutputs"    
+})
+@XmlRootElement(name = "vnf-request")
+public class VnfRequest {
+
+    @XmlElement(name = "request-info", required = true)
+    protected RequestInfo requestInfo;
+    @XmlElement(name = "vnf-inputs")
+    protected VnfInputs vnfInputs;
+    @XmlElement(name = "vnf-params")
+    protected Object vnfParams;
+    @XmlElement(name = "vnf-outputs")
+    protected VnfOutputs vnfOutputs;
+  
+
+    /**
+     * Gets the value of the requestInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public RequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    /**
+     * Sets the value of the requestInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public void setRequestInfo(RequestInfo value) {
+        this.requestInfo = value;
+    }
+
+    /**
+     * Gets the value of the vnfInputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VnfInputs }
+     *     
+     */
+    public VnfInputs getVnfInputs() {
+        return vnfInputs;
+    }
+
+    /**
+     * Sets the value of the vnfInputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VnfInputs }
+     *     
+     */
+    public void setVnfInputs(VnfInputs value) {
+        this.vnfInputs = value;
+    }
+
+    /**
+     * Gets the value of the vnfParams property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getVnfParams() {
+        return vnfParams;
+    }
+
+    /**
+     * Sets the value of the vnfParams property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setVnfParams(Object value) {
+        this.vnfParams = value;
+    }
+
+    /**
+     * Gets the value of the vnfOutputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VnfOutputs }
+     *     
+     */
+    public VnfOutputs getVnfOutputs() {
+        return vnfOutputs;
+    }
+
+    /**
+     * Sets the value of the vnfOutputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VnfOutputs }
+     *     
+     */
+    public void setVnfOutputs(VnfOutputs value) {
+        this.vnfOutputs = value;
+    }
+
+ }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfRequests.java
new file mode 100644 (file)
index 0000000..65aa9c1
--- /dev/null
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}vnf-request" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfRequest"
+})
+@XmlRootElement(name = "vnf-requests")
+public class VnfRequests {
+
+    @XmlElement(name = "vnf-request")
+    protected List<VnfRequest> vnfRequest;
+
+    /**
+     * Gets the value of the vnfRequest property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnfRequest property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVnfRequest().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link VnfRequest }
+     * 
+     * 
+     */
+    public List<VnfRequest> getVnfRequest() {
+        if (vnfRequest == null) {
+            vnfRequest = new ArrayList<VnfRequest>();
+        }
+        return this.vnfRequest;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfType.java
new file mode 100644 (file)
index 0000000..9ddd4ca
--- /dev/null
@@ -0,0 +1,148 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "type",
+    "id",
+    "description"
+})
+@XmlRootElement(name = "vnf-type")
+public class VnfType {
+
+    @XmlElement(required = true)
+    protected String type;
+    @XmlElement(required = true)
+    protected String id;
+    @XmlElement(required = true)
+    protected String description;
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setId(String value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfTypes.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/VnfTypes.java
new file mode 100644 (file)
index 0000000..473695c
--- /dev/null
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/vnf-request/v1}vnf-type" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfType"
+})
+@XmlRootElement(name = "vnf-types")
+public class VnfTypes {
+
+    @XmlElement(name = "vnf-type")
+    protected List<VnfType> vnfType;
+
+    /**
+     * Gets the value of the vnfType property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnfType property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVnfType().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link VnfType }
+     * 
+     * 
+     */
+    public List<VnfType> getVnfType() {
+        if (vnfType == null) {
+            vnfType = new ArrayList<VnfType>();
+        }
+        return this.vnfType;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/package-info.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/vnfbeans/package-info.java
new file mode 100644 (file)
index 0000000..700d7a9
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://ecomp.att.com/mso/infra/vnf-request/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.mso.apihandlerinfra.vnfbeans;
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/ActionType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/ActionType.java
new file mode 100644 (file)
index 0000000..9e2c3ac
--- /dev/null
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for action-type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="action-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="CREATE"/>
+ *     &lt;enumeration value="UPDATE"/>
+ *     &lt;enumeration value="DELETE"/>
+ *     &lt;enumeration value="CREATE_VF_MODULE_VOL"/>
+ *     &lt;enumeration value="UPDATE_VF_MODULE_VOL"/>
+ *     &lt;enumeration value="DELETE_VF_MODULE_VOL"/>
+ *     &lt;enumeration value="NOT_PROVIDED"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "action-type")
+@XmlEnum
+public enum ActionType {
+
+    CREATE,
+    UPDATE,
+    DELETE,
+    CREATE_VF_MODULE_VOL,
+    UPDATE_VF_MODULE_VOL,
+    DELETE_VF_MODULE_VOL,
+    NOT_PROVIDED;
+
+    public String value() {
+        return name();
+    }
+
+    public static ActionType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/ObjectFactory.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/ObjectFactory.java
new file mode 100644 (file)
index 0000000..24b620e
--- /dev/null
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.openecomp.mso.apihandlerinfra.vnfbeans1 package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _VolumeParams_QNAME = new QName("http://ecomp.att.com/mso/infra/volume-request/v1", "volume-params");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.mso.apihandlerinfra.vnfbeans1
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link RequestInfo }
+     * 
+     */
+    public RequestInfo createRequestInfo() {
+        return new RequestInfo();
+    }
+
+    /**
+     * Create an instance of {@link VolumeRequest }
+     * 
+     */
+    public VolumeRequest createVolumeRequest() {
+        return new VolumeRequest();
+    }
+
+    /**
+     * Create an instance of {@link VolumeInputs }
+     * 
+     */
+    public VolumeInputs createVolumeInputs() {
+        return new VolumeInputs();
+    }
+
+    /**
+     * Create an instance of {@link VolumeOutputs }
+     * 
+     */
+    public VolumeOutputs createVolumeOutputs() {
+        return new VolumeOutputs();
+    }
+
+    /**
+     * Create an instance of {@link VolumeRequests }
+     * 
+     */
+    public VolumeRequests createVolumeRequests() {
+        return new VolumeRequests();
+    }
+    
+   
+
+   /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://ecomp.att.com/mso/infra/volume-request/v1", name = "volume-params")
+    public JAXBElement<Object> createVolumeParams(Object value) {
+        return new JAXBElement<Object>(_VolumeParams_QNAME, Object.class, null, value);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/RequestInfo.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/RequestInfo.java
new file mode 100644 (file)
index 0000000..40e809c
--- /dev/null
@@ -0,0 +1,286 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="request-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="action" type="{http://ecomp.att.com/mso/infra/vnf-request/v1}action-type"/>
+ *         &lt;element name="request-status" type="{http://ecomp.att.com/mso/infra/vnf-request/v1}request-status-type" minOccurs="0"/>
+ *         &lt;element name="status-message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="progress" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ *         &lt;element name="start-time" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="end-time" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "action",
+    "requestStatus",
+    "statusMessage",
+    "progress",
+    "startTime",
+    "endTime",
+    "source"
+})
+@XmlRootElement(name = "request-info")
+public class RequestInfo {
+
+    @XmlElement(name = "request-id")
+    protected String requestId;
+    @XmlElement(required = true)
+    protected ActionType action;
+    @XmlElement(name = "request-status")
+    protected RequestStatusType requestStatus;
+    @XmlElement(name = "status-message")
+    protected String statusMessage;
+    protected Integer progress;
+    @XmlElement(name = "start-time")
+    protected String startTime;
+    @XmlElement(name = "end-time")
+    protected String endTime;
+    protected String source;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the action property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ActionType }
+     *     
+     */
+    public ActionType getAction() {
+        return action;
+    }
+
+    /**
+     * Sets the value of the action property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ActionType }
+     *     
+     */
+    public void setAction(ActionType value) {
+        this.action = value;
+    }
+
+    /**
+     * Gets the value of the requestStatus property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestStatusType }
+     *     
+     */
+    public RequestStatusType getRequestStatus() {
+        return requestStatus;
+    }
+
+    /**
+     * Sets the value of the requestStatus property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestStatusType }
+     *     
+     */
+    public void setRequestStatus(RequestStatusType value) {
+        this.requestStatus = value;
+    }
+
+    /**
+     * Gets the value of the statusMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStatusMessage() {
+        return statusMessage;
+    }
+
+    /**
+     * Sets the value of the statusMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStatusMessage(String value) {
+        this.statusMessage = value;
+    }
+
+    /**
+     * Gets the value of the progress property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *     
+     */
+    public Integer getProgress() {
+        return progress;
+    }
+
+    /**
+     * Sets the value of the progress property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *     
+     */
+    public void setProgress(Integer value) {
+        this.progress = value;
+    }
+
+    /**
+     * Gets the value of the startTime property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets the value of the startTime property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStartTime(String value) {
+        this.startTime = value;
+    }
+
+    /**
+     * Gets the value of the endTime property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets the value of the endTime property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setEndTime(String value) {
+        this.endTime = value;
+    }
+
+    /**
+     * Gets the value of the source property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the value of the source property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSource(String value) {
+        this.source = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/RequestStatusType.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/RequestStatusType.java
new file mode 100644 (file)
index 0000000..dfa3689
--- /dev/null
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for request-status-type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="request-status-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="COMPLETE"/>
+ *     &lt;enumeration value="FAILED"/>
+ *     &lt;enumeration value="IN_PROGRESS"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "request-status-type")
+@XmlEnum
+public enum RequestStatusType {
+
+    COMPLETE,
+    FAILED,
+    IN_PROGRESS,
+    PENDING,
+    TIMEOUT;
+
+    public String value() {
+        return name();
+    }
+
+    public static RequestStatusType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeInputs.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeInputs.java
new file mode 100644 (file)
index 0000000..55acf32
--- /dev/null
@@ -0,0 +1,435 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="vnf-type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vf-module-model-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="asdc-service-model-version" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vnf-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vnf-type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="service-instance-id" type="{http://www.w3.org/2001/XMLSchema}Boolean"/>
+ *         &lt;choice>
+ *             &lt;element name="service-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *             &lt;element name="service-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;/choice>
+ *          &lt;choice>
+ *             &lt;element name="aic-node-clli" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *          &lt;element name="aic-cloud-region" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;/choice>
+ *         &lt;element name="tenant-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="volume-group-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="volume-group-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfType",
+    "vnfId",
+    "vfModuleModelName",
+    "asdcServiceModelVersion",
+    "serviceInstanceId",
+    "backoutOnFailure",
+    "serviceType",
+    "serviceId",
+    "aicNodeClli",
+    "aicCloudRegion",
+    "tenantId",
+    "volumeGroupName",
+    "volumeGroupId"
+})
+@XmlRootElement(name = "volume-inputs")
+public class VolumeInputs {
+    @XmlElement(name = "vnf-type", required = true)
+    protected String vnfType;
+    @XmlElement(name = "vnf-id")
+    protected String vnfId;
+    @XmlElement(name = "vf-module-model-name")
+    protected String vfModuleModelName;
+    @XmlElement(name = "asdc-service-model-version")
+    protected String asdcServiceModelVersion;
+    @XmlElement(name = "service-instance-id", required = true)
+    protected String serviceInstanceId;
+    @XmlElement(name = "backout-on-failure")
+    protected Boolean backoutOnFailure;
+    @XmlElement(name = "service-type")
+    protected String serviceType;
+    @XmlElement(name = "service-id")
+    protected String serviceId;
+    @XmlElement(name = "aic-node-clli", required = true)
+    protected String aicNodeClli;
+    @XmlElement(name = "aic-cloud-region")
+    protected String aicCloudRegion;
+    @XmlElement(name = "tenant-id", required = true)
+    protected String tenantId;
+    @XmlElement(name = "volume-group-name")
+    protected String volumeGroupName;
+    @XmlElement(name = "volume-group-id")
+    protected String volumeGroupId;
+
+    /**
+     * Gets the value of the volumeGroupId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolumeGroupId() {
+        return volumeGroupId;
+    }
+
+    /**
+     * Sets the value of the volumeGroupId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolumeGroupId(String value) {
+        this.volumeGroupId = value;
+    }
+
+    /**
+     * Gets the value of the volumeGroupName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolumeGroupName() {
+        return volumeGroupName;
+    }
+
+    /**
+     * Sets the value of the volumeGroupName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolumeGroupName(String value) {
+        this.volumeGroupName = value;
+    }
+
+    /**
+     * Gets the value of the vnfType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfType() {
+        return vnfType;
+    }
+
+    /**
+     * Sets the value of the vnfType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfType(String value) {
+        this.vnfType = value;
+    }
+    
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+    
+    /**
+     * Gets the value of the serviceInstanceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    /**
+     * Sets the value of the serviceInstanceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceInstanceId(String value) {
+        this.serviceInstanceId = value;
+    }
+
+    /**
+     * Gets the value of the serviceType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    /**
+     * Sets the value of the serviceType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceType(String value) {
+        this.serviceType = value;
+    }
+    
+    /**
+     * Gets the value of the serviceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceId() {
+        return serviceId;
+    }
+
+    /**
+     * Sets the value of the serviceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceId (String value) {
+        this.serviceId = value;
+    }
+
+
+    /**
+     * Gets the value of the aicNodeClli property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicNodeClli() {
+        return aicNodeClli;
+    }
+
+    /**
+     * Sets the value of the aicNodeClli property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicNodeClli(String value) {
+        this.aicNodeClli = value;
+    }
+    
+    /**
+     * Gets the value of the aicCloudRegion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicCloudRegion() {
+        return aicCloudRegion;
+    }
+
+    /**
+     * Sets the value of the aicCloudRegion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicCloudRegion(String value) {
+        this.aicCloudRegion = value;
+    }
+
+    /**
+     * Gets the value of the tenantId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+    
+    /**
+     * Gets the value of the vfModuleModelName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVfModuleModelName() {
+        return vfModuleModelName;
+    }
+
+    /**
+     * Sets the value of the vfModuleModelName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVfModuleModelName(String value) {
+        this.vfModuleModelName = value;
+    }
+    
+    /**
+     * Gets the value of the asdcServiceModelVersion property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAsdcServiceModelVersion() {
+        return asdcServiceModelVersion;
+    }
+
+    /**
+     * Sets the value of the asdcServiceModelVersion property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAsdcServiceModelVersion(String value) {
+        this.asdcServiceModelVersion = value;
+    }
+    
+    /**
+     * Gets the value of the backoutOnFailure property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean getBackoutOnFailure() {
+        return backoutOnFailure;
+    }
+
+    /**
+     * Sets the value of the backoutOnFailure property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setBackoutOnFailure(Boolean value) {
+        this.backoutOnFailure = value;
+    }
+
+   
+
+   
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeOutputs.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeOutputs.java
new file mode 100644 (file)
index 0000000..be0d844
--- /dev/null
@@ -0,0 +1,233 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="vnf-type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="service-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="aic-node-clli" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="tenant-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="volume-group-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="volume-group-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfType",
+    "serviceType",
+    "aicNodeClli",
+    "tenantId",
+    "volumeGroupName",
+    "volumeGroupId"
+})
+@XmlRootElement(name = "volume-outputs")
+public class VolumeOutputs {
+    @XmlElement(name = "vnf-type", required = true)
+    protected String vnfType;
+    @XmlElement(name = "service-type")
+    protected String serviceType;
+    @XmlElement(name = "aic-node-clli", required = true)
+    protected String aicNodeClli;
+    @XmlElement(name = "tenant-id", required = true)
+    protected String tenantId;
+    @XmlElement(name = "volume-group-name")
+    protected String volumeGroupName;
+    @XmlElement(name = "volume-group-id")
+    protected String volumeGroupId;
+
+    /**
+     * Gets the value of the volumeId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolumeGroupId() {
+        return volumeGroupId;
+    }
+
+    /**
+     * Sets the value of the volumeGroupId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolumeGroupId(String value) {
+        this.volumeGroupId = value;
+    }
+
+    /**
+     * Gets the value of the volumeGroupName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVolumeGroupName() {
+        return volumeGroupName;
+    }
+
+    /**
+     * Sets the value of the volumeGroupName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVolumeGroupName(String value) {
+        this.volumeGroupName = value;
+    }
+
+    /**
+     * Gets the value of the vnfType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfType() {
+        return vnfType;
+    }
+
+    /**
+     * Sets the value of the vnfType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfType(String value) {
+        this.vnfType = value;
+    }
+
+    /**
+     * Gets the value of the serviceType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    /**
+     * Sets the value of the serviceType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceType(String value) {
+        this.serviceType = value;
+    }
+
+    /**
+     * Gets the value of the aicNodeClli property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAicNodeClli() {
+        return aicNodeClli;
+    }
+
+    /**
+     * Sets the value of the aicNodeClli property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAicNodeClli(String value) {
+        this.aicNodeClli = value;
+    }
+
+    /**
+     * Gets the value of the tenantId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+
+   
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeRequest.java
new file mode 100644 (file)
index 0000000..9ec3d7e
--- /dev/null
@@ -0,0 +1,179 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/volume-request/v1}request-info"/>
+ *           &lt;sequence>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/volume-request/v1}volume-inputs"/>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/volume-request/v1}volume-params" minOccurs="0"/>
+ *             &lt;element ref="{http://ecomp.att.com/mso/infra/volume-request/v1}volume-outputs" minOccurs="0"/>
+ *           &lt;/sequence>
+ *        &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestInfo",
+    "volumeInputs",
+    "volumeParams",
+    "volumeOutputs"
+})
+@XmlRootElement(name = "volume-request")
+public class VolumeRequest {
+
+    @XmlElement(name = "request-info", required = true)
+    protected RequestInfo requestInfo;
+    @XmlElement(name = "volume-inputs")
+    protected VolumeInputs volumeInputs;
+    @XmlElement(name = "volume-params")
+    protected Object volumeParams;
+    @XmlElement(name = "volume-outputs")
+    protected VolumeOutputs volumeOutputs;
+
+    /**
+     * Gets the value of the requestInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public RequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    /**
+     * Sets the value of the requestInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public void setRequestInfo(RequestInfo value) {
+        this.requestInfo = value;
+    }
+
+   
+    /**
+     * Gets the value of the volumeInputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VolumeInputs }
+     *     
+     */
+    public VolumeInputs getVolumeInputs() {
+        return volumeInputs;
+    }
+
+    /**
+     * Sets the value of the volumeInputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VolumeInputs }
+     *     
+     */
+    public void setVolumeInputs(VolumeInputs value) {
+        this.volumeInputs = value;
+    }
+
+    /**
+     * Gets the value of the volumeParams property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getVolumeParams() {
+        return volumeParams;
+    }
+
+    /**
+     * Sets the value of the volumeParams property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setVolumeParams(Object value) {
+        this.volumeParams = value;
+    }
+
+    /**
+     * Gets the value of the volumeOutputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VolumeOutputs }
+     *     
+     */
+    public VolumeOutputs getVolumeOutputs() {
+        return volumeOutputs;
+    }
+
+    /**
+     * Sets the value of the volumeOutputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VolumeOutputs }
+     *     
+     */
+    public void setVolumeOutputs(VolumeOutputs value) {
+        this.volumeOutputs = value;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/VolumeRequests.java
new file mode 100644 (file)
index 0000000..04fc16e
--- /dev/null
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://ecomp.att.com/mso/infra/volume-request/v1}volume-request" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "volumeRequest"
+})
+@XmlRootElement(name = "volume-requests")
+public class VolumeRequests {
+
+    @XmlElement(name = "volume-request")
+    protected List<VolumeRequest> volumeRequest;
+
+    /**
+     * Gets the value of the volumeRequest property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnfRequest property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVolumeRequest().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link VolumeRequest }
+     * 
+     * 
+     */
+    public List<VolumeRequest> getVolumeRequest() {
+        if (volumeRequest == null) {
+            volumeRequest = new ArrayList<VolumeRequest>();
+        }
+        return this.volumeRequest;
+    }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/package-info.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/volumebeans/package-info.java
new file mode 100644 (file)
index 0000000..3678024
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.09.03 at 02:02:13 PM EDT 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://ecomp.att.com/mso/infra/volume-request/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.mso.apihandlerinfra.volumebeans;
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/resources/application.properties b/mso-api-handlers/mso-api-handler-infra/src/main/java/resources/application.properties
new file mode 100644 (file)
index 0000000..96c9e6f
--- /dev/null
@@ -0,0 +1,27 @@
+###
+# ============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=========================================================
+###
+
+# -- welcome --
+welcomeTitle=JSF Blank Application
+
+welcomeHeading=Welcome!
+
+welcomeMessage=This is a JSF blank application. \
+       You can find the application.properties file with this message in the src/resources folder.
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/adv-feature-request.xml b/mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/adv-feature-request.xml
new file mode 100644 (file)
index 0000000..aacab0b
--- /dev/null
@@ -0,0 +1,43 @@
+<!--
+  ============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=========================================================
+  -->
+
+<feature-request
+       xmlns="http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:msolayer3="http://ecomp.att.com/mso/request/layer3/schema/v1"
+       xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1">
+       <msoservtypes:request-information>
+               <msoservtypes:request-id>155415ab-b4a7-4382-b4c6-d17d950565</msoservtypes:request-id>
+               <msoservtypes:request-action>ChangeFeatureActivateRequest</msoservtypes:request-action>
+               <msoservtypes:source>OMX</msoservtypes:source>
+               <msoservtypes:notification-url>https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws</msoservtypes:notification-url>
+               <msoservtypes:order-number>5051560</msoservtypes:order-number>
+               <msoservtypes:order-version>1</msoservtypes:order-version>
+       </msoservtypes:request-information>
+       <msoservtypes:service-information>
+               <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>
+               <msoservtypes:service-instance-id>HI/VLXM/003717//SW_INTERNET</msoservtypes:service-instance-id>
+               <msoservtypes:subscriber-name>ST E2E Test50565_13000050565</msoservtypes:subscriber-name>
+       </msoservtypes:service-information>
+       <msoservtypes:feature-information>
+               <msoservtypes:feature-type>FIREWALL-LITE</msoservtypes:feature-type>
+               <msoservtypes:feature-instance-id>HI/VLXM/003717//SW_INTERNET</msoservtypes:feature-instance-id>
+               <msoservtypes:feature-yang-model>ST E2E Test50565_13000050565</msoservtypes:feature-yang-model>
+       </msoservtypes:feature-information>
+       </feature-request>
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/adv-service-request.xml b/mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/adv-service-request.xml
new file mode 100644 (file)
index 0000000..1e49583
--- /dev/null
@@ -0,0 +1,132 @@
+<!--
+  ============LICENSE_START=======================================================
+  OpenECOMP 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=========================================================
+  ECOMP and OpenECOMP are trademarks
+  and service marks of AT&T Intellectual Property.
+  -->
+
+<tns:service-request xmlns:p="urn:ietf:params:xml:ns:yang:ietf-inet-types"
+xmlns:tns="http://ecomp.att.com/mso/request/changelayer3activate/schema/v1"
+xmlns:tns1="http://ecomp.att.com/mso/request/types/v1"
+xmlns:msolayer3="http://ecomp.att.com/mso/request/layer3/schema/v1"
+xmlns:tns3="http://ecomp.att.com/mso/layer3/simple/types/v1"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+>
+  <tns1:request-information>
+    <tns1:request-id>ChgActsm519-500</tns1:request-id>
+    <tns1:request-action>ChangeLayer3ServiceActivateRequest</tns1:request-action>
+    <tns1:source>OMX</tns1:source>
+        <tns1:notification-url>https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNot
+ification.jws</tns1:notification-url>
+    <tns1:order-number>051815-1005</tns1:order-number>
+    <tns1:order-version>2</tns1:order-version>
+  </tns1:request-information>
+  <tns1:service-information>
+    <tns1:service-type>SDN-ETHERNET-INTERNET</tns1:service-type>
+    <tns1:service-instance-id>TL/VLXM/003717//SW_INTERNET</tns1:service-instance-id>
+    <tns1:subscriber-name>Gamma Gamma E2E Test_051815_50</tns1:subscriber-name>
+  </tns1:service-information>
+ <tns:service-parameters>
+            <msolayer3:internet-service-information>
+            <msolayer3:internet-evc-access-information>
+            <msolayer3:internet-evc-speed-value>20</msolayer3:internet-evc-speed-value>
+            <msolayer3:internet-evc-speed-units>Mbps</msolayer3:internet-evc-speed-units>
+            <msolayer3:ip-version>ds</msolayer3:ip-version>
+            </msolayer3:internet-evc-access-information>
+            <msolayer3:vr-lan>
+            <msolayer3:routing-protocol>none</msolayer3:routing-protocol>
+            <msolayer3:vr-lan-interface>
+               <msolayer3:vr-designation>primary</msolayer3:vr-designation>
+               <msolayer3:v4-vr-lan-prefix>10.192.70.254</msolayer3:v4-vr-lan-prefix>
+               <msolayer3:v4-vr-lan-prefix-length>24</msolayer3:v4-vr-lan-prefix-length>
+               <msolayer3:v6-vr-lan-prefix>2620:0:10d0:0:ffff:ffff:ffff:fffe</msolayer3:v6-vr-lan-prefix>
+               <msolayer3:v6-vr-lan-prefix-length>64</msolayer3:v6-vr-lan-prefix-length>
+               <msolayer3:v4-vce-loopback-address>10.189.96.168</msolayer3:v4-vce-loopback-address>
+               <msolayer3:v6-vce-wan-address>2001:1890:12e3:2cb::</msolayer3:v6-vce-wan-address>
+               <msolayer3:v4-public-lan-prefixes>
+                  <msolayer3:t-provided-v4-lan-public-prefixes>
+                     <msolayer3:request-index>1</msolayer3:request-index>
+                     <msolayer3:v4-next-hop-address>10.192.70.252</msolayer3:v4-next-hop-address>
+                     <msolayer3:v4-lan-public-prefix>223.233.247.1</msolayer3:v4-lan-public-prefix>
+                     <msolayer3:v4-lan-public-prefix-length>32</msolayer3:v4-lan-public-prefix-length>
+                  </msolayer3:t-provided-v4-lan-public-prefixes>
+               </msolayer3:v4-public-lan-prefixes>
+               <msolayer3:v6-public-lan-prefixes>
+                  <msolayer3:t-provided-v6-lan-public-prefixes>
+                     <msolayer3:request-index>1</msolayer3:request-index>
+                     <msolayer3:v6-next-hop-address>2620:0:10d0:0:ffff:ffff:ffff:fffc</msolayer3:v6-next-hop-address>
+                     <msolayer3:v6-lan-public-prefix>2057:0eb4:85a5:0047:1002:8a8e:0371:7331</msolayer3:v6-lan-public-prefix>
+                     <msolayer3:v6-lan-public-prefix-length>48</msolayer3:v6-lan-public-prefix-length>
+                  </msolayer3:t-provided-v6-lan-public-prefixes>
+               </msolayer3:v6-public-lan-prefixes>
+  
+    <msolayer3:dhcp>
+                  <msolayer3:v4-dhcp-server-enabled>Y</msolayer3:v4-dhcp-server-enabled>
+                  <msolayer3:v6-dhcp-server-enabled>Y</msolayer3:v6-dhcp-server-enabled>
+                  <msolayer3:use-v4-default-pool>Y</msolayer3:use-v4-default-pool>
+                  <msolayer3:v4-dhcp-default-pool-prefix>10.192.70.254</msolayer3:v4-dhcp-default-pool-prefix>
+                  <msolayer3:v4-dhcp-default-pool-prefix-length>24</msolayer3:v4-dhcp-default-pool-prefix-length>
+                  <msolayer3:excluded-v4-dhcp-addresses-from-default-pool>
+                     <msolayer3:excluded-v4-address>10.192.70.252</msolayer3:excluded-v4-address>
+                  </msolayer3:excluded-v4-dhcp-addresses-from-default-pool>
+                 
+                  <msolayer3:use-v6-default-pool>Y</msolayer3:use-v6-default-pool>
+                  <msolayer3:v6-dhcp-default-pool-prefix>2620:0:10d0:0:ffff:ffff:ffff:fffe</msolayer3:v6-dhcp-default-pool-prefix>
+                  <msolayer3:v6-dhcp-default-pool-prefix-length>64</msolayer3:v6-dhcp-default-pool-prefix-length>
+                  <msolayer3:excluded-v6-dhcp-addresses-from-default-pool>
+                     <msolayer3:excluded-v6-address>2620:0:10d0:0:ffff:ffff:ffff:fffd</msolayer3:excluded-v6-address>
+                  </msolayer3:excluded-v6-dhcp-addresses-from-default-pool>
+                
+               </msolayer3:dhcp>
+               <msolayer3:pat>
+                  <msolayer3:v4-pat-enabled>Y</msolayer3:v4-pat-enabled>
+                  <msolayer3:use-v4-default-pool>N</msolayer3:use-v4-default-pool>
+               </msolayer3:pat>
+               <msolayer3:firewall-lite>
+                  <msolayer3:stateful-firewall-lite-v4-enabled>Y</msolayer3:stateful-firewall-lite-v4-enabled>
+                  <msolayer3:stateful-firewall-lite-v6-enabled>Y</msolayer3:stateful-firewall-lite-v6-enabled>
+               </msolayer3:firewall-lite>
+               <msolayer3:static-routes>
+                  <msolayer3:v4-static-routes>
+                     <msolayer3:v4-static-route-prefix>223.233.247.1</msolayer3:v4-static-route-prefix>
+                     <msolayer3:v4-static-route-prefix-length>32</msolayer3:v4-static-route-prefix-length>
+                     <msolayer3:v4-next-hop-address>10.192.70.252</msolayer3:v4-next-hop-address>
+                  </msolayer3:v4-static-routes>
+                  <msolayer3:v4-static-routes>
+                     <msolayer3:v4-static-route-prefix>223.234.242.1</msolayer3:v4-static-route-prefix>
+                     <msolayer3:v4-static-route-prefix-length>32</msolayer3:v4-static-route-prefix-length>
+                     <msolayer3:v4-next-hop-address>10.192.70.253</msolayer3:v4-next-hop-address>
+                  </msolayer3:v4-static-routes>
+                               <msolayer3:v6-static-routes>
+                     <msolayer3:v6-static-route-prefix>2057:0eb4:85a5:0047:1002:8a8e:0371:7331</msolayer3:v6-static-route-prefix>
+                     <msolayer3:v6-static-route-prefix-length>48</msolayer3:v6-static-route-prefix-length>
+                     <msolayer3:v6-next-hop-address>2620:0:10d0:0:ffff:ffff:ffff:fffc</msolayer3:v6-next-hop-address>
+                  </msolayer3:v6-static-routes>
+                  <msolayer3:v6-static-routes>
+                     <msolayer3:v6-static-route-prefix>2057:0eb4:85a5:0047:1002:8a8e:0371:7332</msolayer3:v6-static-route-prefix>
+                     <msolayer3:v6-static-route-prefix-length>48</msolayer3:v6-static-route-prefix-length>
+                     <msolayer3:v6-next-hop-address>2620:0:10d0:0:ffff:ffff:ffff:fffd</msolayer3:v6-next-hop-address>
+                  </msolayer3:v6-static-routes>
+               </msolayer3:static-routes>
+          </msolayer3:vr-lan-interface>
+          </msolayer3:vr-lan>
+        </msolayer3:internet-service-information>
+  </tns:service-parameters>
+</tns:service-request>
+  
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/feature-request.xml b/mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/feature-request.xml
new file mode 100644 (file)
index 0000000..b652a62
--- /dev/null
@@ -0,0 +1,43 @@
+<?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=========================================================
+  -->
+
+<tns:feature-request xmlns:tns="http://ecomp.att.com/mso/request/schema/v1" xmlns:tns1="http://ecomp.att.com/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ecomp.att.com/mso/request/schema/v1 MsoRequestV1.xsd">
+  <tns1:request-information>
+    <tns1:request-id>tns1:request-id</tns1:request-id>
+    <tns1:request-action>Layer3ServiceActivateRequest</tns1:request-action>
+    <tns1:request-sub-action>CANCEL</tns1:request-sub-action>
+    <tns1:source>tns1:source</tns1:source>
+    <tns1:notification-url>tns1:notification-url</tns1:notification-url>
+    <tns1:order-number>tns1:order-number</tns1:order-number>
+    <tns1:order-version>tns1:order-version</tns1:order-version>
+  </tns1:request-information>
+  <tns1:service-information>
+    <tns1:service-type>SDN-ETHERNET-INTERNET</tns1:service-type>
+    <tns1:service-instance-id>tns1:service-instance-id</tns1:service-instance-id>
+    <tns1:subscriber-name>tns1:subscriber-name</tns1:subscriber-name>
+  </tns1:service-information>
+  <tns1:feature-information>
+    <tns1:feature-type>FIREWALL-LITE</tns1:feature-type>
+    <tns1:feature-instance-id>tns1:feature-instance-id</tns1:feature-instance-id>
+    <tns1:feature-yang-model>tns1:feature-yang-model</tns1:feature-yang-model>
+  </tns1:feature-information>
+  <tns:feature-parameters xsi:type="anyType"/>
+</tns:feature-request>
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/service-request.xml b/mso-api-handlers/mso-api-handler-infra/src/main/resources/test/resources/service-request.xml
new file mode 100644 (file)
index 0000000..b9f70a0
--- /dev/null
@@ -0,0 +1,38 @@
+<?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=========================================================
+  -->
+
+<tns:service-request xmlns:tns="http://ecomp.att.com/mso/request/schema/v1" xmlns:tns1="http://ecomp.att.com/mso/request/types/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ecomp.att.com/mso/request/schema/v1 MsoRequestV1.xsd ">
+  <tns1:request-information>
+    <tns1:request-id>tns1:request-id</tns1:request-id>
+    <tns1:request-action>Layer3ServiceActivateRequest</tns1:request-action>
+    <tns1:request-sub-action>CANCEL</tns1:request-sub-action>
+    <tns1:source>tns1:source</tns1:source>
+    <tns1:notification-url>tns1:notification-url</tns1:notification-url>
+    <tns1:order-number>tns1:order-number</tns1:order-number>
+    <tns1:order-version>tns1:order-version</tns1:order-version>
+  </tns1:request-information>
+  <tns1:service-information>
+    <tns1:service-type>SDN-ETHERNET-INTERNET</tns1:service-type>
+    <tns1:service-instance-id>tns1:service-instance-id</tns1:service-instance-id>
+    <tns1:subscriber-name>tns1:subscriber-name</tns1:subscriber-name>
+  </tns1:service-information>
+  <tns:service-parameters xsi:type="anyType"/>
+</tns:service-request>
diff --git a/mso-api-handlers/mso-requests-db/hibernate.properties b/mso-api-handlers/mso-requests-db/hibernate.properties
new file mode 100644 (file)
index 0000000..c7803ea
--- /dev/null
@@ -0,0 +1,2 @@
+hibernate.show_sql=true\r
+hibernate.format_sql=true\r
diff --git a/mso-api-handlers/mso-requests-db/hibernate.reveng.xml b/mso-api-handlers/mso-requests-db/hibernate.reveng.xml
new file mode 100644 (file)
index 0000000..dfbf9ed
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-reverse-engineering-3.0.dtd" >\r
+\r
+<hibernate-reverse-engineering>\r
+\r
+   <schema-selection match-schema="MSO"/>\r
+   <type-mapping> \r
+        <sql-type jdbc-type="OTHER" hibernate-type="java.sql.Timestamp" /> \r
+    </type-mapping>\r
+     <table-filter match-schema="MSO" match-name=".*"/>\r
+</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
new file mode 100644 (file)
index 0000000..fc09305
--- /dev/null
@@ -0,0 +1,207 @@
+<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.openecomp.mso</groupId>
+               <artifactId>mso-api-handlers</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>mso-requests-db</artifactId>
+
+       <name>mso-requests-db</name>
+       <description>MSO Requests Database definition and Hibernate objects</description>
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+       </properties>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.hibernate</groupId>
+                       <artifactId>hibernate-core</artifactId>
+                       <version>4.3.6.Final</version>
+                       <exclusions>
+                               <!-- Avoid hibernate inclusion as provided in Jboss -->
+                               <exclusion>
+                                       <groupId>org.jboss</groupId>
+                                       <artifactId>jandex</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.javassist</groupId>
+                                       <artifactId>javassist</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.jboss.logging</groupId>
+                                       <artifactId>jboss-logging</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.jboss.logging</groupId>
+                                       <artifactId>jboss-logging-annotations</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                        <groupId>org.jboss.spec.javax.transaction</groupId>
+                                       <artifactId>jboss-transaction-api_1.2_spec</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>antlr</groupId>
+                                       <artifactId>antlr</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>dom4j</groupId>
+                                       <artifactId>dom4j</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.hibernate</groupId>
+                       <artifactId>hibernate-entitymanager</artifactId>
+                       <version>4.3.6.Final</version>
+                       <exclusions>
+                               <!-- Avoid hibernate inclusion as provided in Jboss -->
+                               <exclusion>
+                                       <groupId>org.jboss</groupId>
+                                       <artifactId>jandex</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.javassist</groupId>
+                                       <artifactId>javassist</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.jboss.logging</groupId>
+                                       <artifactId>jboss-logging</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.jboss.logging</groupId>
+                               <artifactId>jboss-logging-annotations</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                        <groupId>org.jboss.spec.javax.transaction</groupId>
+                                       <artifactId>jboss-transaction-api_1.2_spec</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>antlr</groupId>
+                                       <artifactId>antlr</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>dom4j</groupId>
+                                       <artifactId>dom4j</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.hibernate.javax.persistence</groupId>
+                       <artifactId>hibernate-jpa-2.1-api</artifactId>
+                       <version>1.0.0.Final</version>
+               </dependency>
+                       
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>common</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+       </dependencies>
+       <packaging>jar</packaging>
+       <build>
+               <finalName>${project.artifactId}</finalName>
+               <plugins>
+               
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.3</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                               </configuration>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>de.juplo</groupId>
+                               <artifactId>hibernate4-maven-plugin</artifactId>
+                               <version>1.1.0</version>
+                               <executions>
+                                       <!-- MySQL -->
+                                       <execution>
+                                               <id>MySQL</id>
+                                               <goals>
+                                                       <goal>export</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <hibernateDialect>org.hibernate.dialect.MySQL5Dialect</hibernateDialect>
+                                                       <hibernateMapping>${project.basedir}/src/main/resources/InfraActiveRequests.hbm.xml,${project.basedir}/src/main/resources/SiteStatus.hbm.xml</hibernateMapping>
+                                                       <target>SCRIPT</target>
+                                                       <skip>false</skip>
+                                                       <force>true</force>
+                                                       <outputFile>${project.build.directory}/MySQL-Requests-schema.sql</outputFile>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                       <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.1</version>
+                       <executions>
+                         
+                           <execution>
+                               <id>copy-sql-file</id>
+                               <phase>install</phase>
+                               <goals>
+                                   <goal>copy-resources</goal>
+                               </goals>
+                               <configuration>
+                                  <overwrite>true</overwrite>
+                                   
+                                   <outputDirectory>${project.basedir}/../../packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/main-schemas</outputDirectory>
+                         
+                                   <resources>
+                                                       <resource>
+                                                         <directory>${project.build.directory}</directory>
+                                                         <filtering>false</filtering>
+                                                         <includes>
+                                                              <include>*.sql</include>
+                                                         </includes>
+                                                       </resource>
+                                                   </resources>              
+                               </configuration>
+                           </execution>
+                       </executions>
+                </plugin>
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>de.juplo</groupId>
+                                                                               <artifactId>
+                                                                                       hibernate4-maven-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [1.0.3,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>export</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </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
new file mode 100644 (file)
index 0000000..b9ac472
--- /dev/null
@@ -0,0 +1,31 @@
+<?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"/>
+     <table-filter match-schema="MSO" match-name=".*"/>
+     <type-mapping> 
+        <sql-type jdbc-type="OTHER" hibernate-type="java.sql.Timestamp" /> 
+    </type-mapping>
+</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
new file mode 100644 (file)
index 0000000..5e94951
--- /dev/null
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0\r
+Class-Path: \r
+\r
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/HibernateUtil.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/HibernateUtil.java
new file mode 100644 (file)
index 0000000..21bece9
--- /dev/null
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.requestsdb;
+
+
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+@SuppressWarnings("deprecation")
+public class HibernateUtil {
+
+    //private static SessionFactory SESSION_FACTORY;
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);
+    
+     private static SessionFactory SESSION_FACTORY;
+
+
+    static {
+        try {
+
+         if ("MYSQL".equals (System.getProperty ("mso.db")) || "MARIADB".equals(System.getProperty("mso.db"))) {
+                SESSION_FACTORY = new Configuration ().configure ("hibernate-mysql.cfg.xml").buildSessionFactory ();
+            } else {
+               LOGGER.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "DB Connection not specified to the JVM,choose either:-Dmso.db=MARIADB, -Dmso.db=MYSQL or -Dmso.container=AJSC", "", "", MsoLogger.ErrorCode.DataError , "DB Connection not specified to the JVM,choose either:-Dmso.db=MARIADB, -Dmso.db=MYSQL or -Dmso.container=AJSC");
+            }
+        } catch (Exception ex) {
+            LOGGER.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, ex.getMessage (), "", "", MsoLogger.ErrorCode.DataError , "Problem in getting DB connection type", ex);
+            throw ex;
+        }
+    }
+
+    public static SessionFactory getSessionFactory () {
+        return SESSION_FACTORY;
+    }
+
+    private HibernateUtil () {
+        // Avoid creation of an instance
+    }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/InfraActiveRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/InfraActiveRequests.java
new file mode 100644 (file)
index 0000000..992cf6a
--- /dev/null
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.requestsdb;
+
+
+/**
+ * InfraActiveRequests
+ */
+public class InfraActiveRequests extends InfraRequests {
+
+       /**
+     * Serialization id.
+     */
+    private static final long serialVersionUID = 5003555140088137254L;
+
+       public InfraActiveRequests() {
+           super ();
+       }
+
+       public InfraActiveRequests(String requestId, String action) {
+           super (requestId, action);
+       }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/InfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/InfraRequests.java
new file mode 100644 (file)
index 0000000..4312819
--- /dev/null
@@ -0,0 +1,405 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.requestsdb;
+
+// Generated Jul 27, 2015 3:05:00 PM by Hibernate Tools 3.4.0.CR1
+
+import java.sql.Timestamp;
+
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.openecomp.mso.requestsdb.adapter.TimestampXMLAdapter;
+
+/**
+ * InfraActiveRequests generated by hbm2java
+ */
+public class InfraRequests implements java.io.Serializable {
+
+    /**
+     * Serialization id.
+     */
+    private static final long serialVersionUID = -661307666798018192L;
+
+    private String requestId;
+       private String clientRequestId;
+       private String action;
+       private String requestStatus;
+       private String statusMessage;
+       private Long progress;
+       private Timestamp startTime;
+       private Timestamp endTime;
+       private String source;
+       private String vnfId;
+       private String vnfName;
+       private String vnfType;
+       private String serviceType;
+       private String aicNodeClli;
+       private String tenantId;
+       private String provStatus;
+       private String vnfParams;
+       private String vnfOutputs;
+       private String requestBody;
+       private String responseBody;
+       private String lastModifiedBy;
+       private Timestamp modifyTime;
+       private String requestType;
+       private String volumeGroupId;
+       private String volumeGroupName;
+       private String vfModuleId;
+       private String vfModuleName;
+       private String vfModuleModelName;
+       private String aaiServiceId;
+       private String aicCloudRegion;
+       private String callBackUrl;
+       private String correlator;
+       private String serviceInstanceId;
+       private String serviceInstanceName;
+       private String requestScope;
+       private String requestAction;
+       private String networkId;
+       private String networkName;
+       private String networkType;
+       
+
+       public InfraRequests() {
+       }
+
+       public InfraRequests(String requestId, String action) {
+               this.requestId = requestId;
+               this.action = action;
+       }
+
+       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 void setStartTime(Timestamp startTime) {
+               this.startTime = startTime;
+       }
+
+    @XmlJavaTypeAdapter(TimestampXMLAdapter.class)
+       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 String getLastModifiedBy() {
+               return this.lastModifiedBy;
+       }
+
+       public void setLastModifiedBy(String lastModifiedBy) {
+               this.lastModifiedBy = lastModifiedBy;
+       }
+
+    @XmlJavaTypeAdapter(TimestampXMLAdapter.class)
+       public Timestamp getModifyTime() {
+               return this.modifyTime;
+       }
+
+       public void setModifyTime(Timestamp modifyTime) {
+               this.modifyTime = modifyTime;
+       }
+
+       public String getRequestType() {
+               return this.requestType;
+       }
+
+       public void setRequestType(String requestType) {
+               this.requestType = requestType;
+       }
+       
+       public String getVolumeGroupId() {
+               return this.volumeGroupId;
+       }
+
+       public void setVolumeGroupId(String volumeGroupId) {
+               this.volumeGroupId = volumeGroupId;
+       }
+       
+       public String getVolumeGroupName() {
+               return this.volumeGroupName;
+       }
+
+       public void setVolumeGroupName(String volumeGroupName) {
+               this.volumeGroupName = volumeGroupName;
+       }
+       
+       public String getVfModuleId() {
+               return this.vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+       
+       public String getVfModuleName() {
+               return this.vfModuleName;
+       }
+
+       public void setVfModuleName(String vfModuleName) {
+               this.vfModuleName = vfModuleName;
+       }
+       
+       public String getVfModuleModelName() {
+               return this.vfModuleModelName;
+       }
+
+       public void setVfModuleModelName(String vfModuleModelName) {
+               this.vfModuleModelName = vfModuleModelName;
+       }
+       
+       public String getAaiServiceId() {
+               return this.aaiServiceId;
+       }
+
+       public void setAaiServiceId(String aaiServiceId) {
+               this.aaiServiceId = aaiServiceId;
+       }
+
+       public String getAicCloudRegion() {
+               return this.aicCloudRegion;
+       }
+
+       public void setAicCloudRegion(String aicCloudRegion) {
+               this.aicCloudRegion = aicCloudRegion;
+       }
+
+       public String getCallBackUrl() {
+               return callBackUrl;
+       }
+
+       public void setCallBackUrl(String callBackUrl) {
+               this.callBackUrl = callBackUrl;
+       }
+
+       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;
+       }
+       
+}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/MockRequestsDatabase.java
new file mode 100644 (file)
index 0000000..22179e9
--- /dev/null
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.requestsdb;
+
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class MockRequestsDatabase {
+       
+       private Map<String, InfraActiveRequests> activeRequests;
+       
+       public MockRequestsDatabase() {
+               activeRequests = new HashMap<String, InfraActiveRequests>();
+       }
+       
+       public void addRecord(InfraActiveRequests record) {
+               String serviceType = record.getServiceType();
+               String serviceInstanceId = record.getServiceInstanceId();
+               String key = serviceType + "::" + serviceInstanceId;
+               activeRequests.put(key, record);
+       }
+       
+       public void deleteRecord(String serviceType, String serviceInstanceId) {
+               String key = serviceType + "::" + serviceInstanceId;
+               activeRequests.remove(key);
+       }
+       
+       public InfraActiveRequests getRecord(String serviceType, String serviceInstanceId) {
+               String key = serviceType + "::" + serviceInstanceId;
+               InfraActiveRequests record = activeRequests.get(key);
+               return record;
+       }
+       
+       public InfraActiveRequests checkDuplicate(String serviceType, String serviceInstanceId) {
+               return getRecord(serviceType, serviceInstanceId);
+       }
+       
+       public InfraActiveRequests checkRetry(String serviceType, String serviceInstanceId) {
+               InfraActiveRequests record = getRecord(serviceType, serviceInstanceId);
+               InfraActiveRequests returnRecord = null;
+               if (record != null) {
+                       String requestAction = record.getRequestAction();
+                       if (requestAction == null || !requestAction.equals("GetLayer3ServiceDetailsRequest")) {
+                               String status = record.getRequestStatus();
+                               if (status != null && status.equals("COMPLETED")) {
+                                       return returnRecord = record;
+                               }
+                       }
+               }
+               return returnRecord;
+       }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/RequestsDatabase.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/RequestsDatabase.java
new file mode 100644 (file)
index 0000000..8961b26
--- /dev/null
@@ -0,0 +1,494 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.http.HttpStatus;
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.criterion.Criterion;
+import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Restrictions;
+import org.hibernate.persister.entity.AbstractEntityPersister;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+public final class RequestsDatabase {
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
+
+    private static final String SOURCE = "source";
+    private static final String START_TIME = "startTime";
+    private static final String REQUEST_TYPE = "requestType";
+    private static final String SERVICE_INSTANCE_ID = "serviceInstanceId";
+    private static final String SERVICE_INSTANCE_NAME = "serviceInstanceName";
+    private static final String VNF_INSTANCE_NAME = "vnfName";
+    private static final String VNF_INSTANCE_ID = "vnfId";
+    private static final String VOLUME_GROUP_INSTANCE_NAME = "volumeGroupName";
+    private static final String VOLUME_GROUP_INSTANCE_ID = "volumeGroupId";
+    private static final String VFMODULE_INSTANCE_NAME = "vfModuleName";
+    private static final String VFMODULE_INSTANCE_ID = "vfModuleId";
+    private static final String NETWORK_INSTANCE_NAME = "networkName";
+    private static final String NETWORK_INSTANCE_ID = "networkId";
+    private static final String GLOBAL_SUBSCRIBER_ID = "globalSubscriberId";
+    private static final String SERVICE_NAME_VERSION_ID = "serviceNameVersionId";
+    private static final String SERVICE_ID = "serviceId";
+    private static final String SERVICE_VERSION = "serviceVersion";
+    private static final String SERVICE_TYPE = "serviceType";
+    private static final String REQUEST_ID = "requestId";
+    private static MockRequestsDatabase mockDB = null;
+
+    /**
+     * Avoids creating an instance of this utility class.
+     */
+    private RequestsDatabase () {
+    }
+
+    public static boolean healthCheck () {
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        try {
+            Query query = session.createSQLQuery (" show tables ");
+
+            List<?> list = query.list();
+
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+        }
+        return true;
+    }
+
+
+    public static int updateInfraStatus (String requestId, String requestStatus, String lastModifiedBy) {
+        long startTime = System.currentTimeMillis ();
+        msoLogger.debug ("Update infra request record " + requestId + " with status " + requestStatus);
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+
+        int result = 0;
+        try {
+            session.beginTransaction ();
+            Query query = session.createQuery ("update InfraActiveRequests set requestStatus = :requestStatus, modifyTime = :modifyTime, lastModifiedBy = :lastModifiedBy where requestId = :requestId ");
+            query.setParameter ("requestStatus", requestStatus);
+            query.setParameter (REQUEST_ID, requestId);
+            query.setParameter ("lastModifiedBy", lastModifiedBy);
+            Calendar modifyTime = Calendar.getInstance ();
+            Timestamp modifyTimeStamp = new Timestamp (modifyTime.getTimeInMillis ());
+            query.setParameter ("modifyTime", modifyTimeStamp);
+            result = query.executeUpdate ();
+            session.getTransaction ().commit ();
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "updateInfraStatus", null);
+        }
+        return result;
+    }
+
+    public static int updateInfraStatus (String requestId, String requestStatus, long progress, String lastModifiedBy) {
+        long startTime = System.currentTimeMillis ();
+        msoLogger.debug ("Update infra request record " + requestId + " with status " + requestStatus);
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+
+        int result = 0;
+        try {
+            session.beginTransaction ();
+            Query query = session.createQuery ("update InfraActiveRequests set requestStatus = :requestStatus, modifyTime = :modifyTime, progress = :progress, lastModifiedBy = :lastModifiedBy where requestId = :requestId ");
+            query.setParameter ("requestStatus", requestStatus);
+            query.setParameter (REQUEST_ID, requestId);
+            query.setParameter ("progress", progress);
+            query.setParameter ("lastModifiedBy", lastModifiedBy);
+            Calendar modifyTime = Calendar.getInstance ();
+            Timestamp modifyTimeStamp = new Timestamp (modifyTime.getTimeInMillis ());
+            query.setParameter ("modifyTime", modifyTimeStamp);
+            result = query.executeUpdate ();
+            session.getTransaction ().commit ();
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "updateInfraStatus", null);
+        }
+        return result;
+    }
+
+    public static int updateInfraFinalStatus (String requestId, String requestStatus, String statusMessage, long progress, String responseBody, String lastModifiedBy) {
+        long startTime = System.currentTimeMillis ();
+        msoLogger.debug ("Update infra request record " + requestId + " with status " + requestStatus);
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+
+        int result = 0;
+        try {
+            session.beginTransaction ();
+            Query query = session.createQuery ("update InfraActiveRequests set requestStatus = :requestStatus, statusMessage = :statusMessage, progress = :progress, endTime = :endTime, responseBody = :responseBody, lastModifiedBy = :lastModifiedBy where id.requestId = :requestId ");
+            query.setParameter ("requestStatus", requestStatus);
+            query.setParameter ("requestId", requestId);
+            Calendar endTime = Calendar.getInstance ();
+            Timestamp endTimeStamp = new Timestamp (endTime.getTimeInMillis ());
+            query.setParameter ("endTime", endTimeStamp);
+            query.setParameter ("statusMessage", statusMessage);
+            query.setParameter ("progress", progress);
+            query.setParameter ("responseBody", responseBody);
+            query.setParameter ("lastModifiedBy", lastModifiedBy);
+            result = query.executeUpdate ();
+            session.getTransaction ().commit ();
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "updateInfraFinalStatus", null);
+        }
+        return result;
+    }
+
+    
+    private static List<InfraActiveRequests> executeInfraQuery (List <Criterion> criteria, Order order) {
+
+        long startTime = System.currentTimeMillis ();
+        msoLogger.debug ("Execute query on infra active request table");
+        
+        List <InfraActiveRequests> results = new ArrayList<InfraActiveRequests>();
+
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        try {
+            session.beginTransaction ();
+            Criteria crit = session.createCriteria (InfraActiveRequests.class);
+            for (Criterion criterion : criteria) {
+                crit.add (criterion);
+            }
+            crit.addOrder (order);
+
+           // @SuppressWarnings("unchecked")
+            results = crit.list ();
+
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "getInfraActiveRequest", null);
+        }
+        return results;
+    }
+    
+    public static InfraActiveRequests getRequestFromInfraActive (String requestId) {
+        long startTime = System.currentTimeMillis ();
+        msoLogger.debug ("Get request " + requestId + " from InfraActiveRequests DB");
+
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        InfraActiveRequests ar = null;
+        try {
+            session.beginTransaction ();
+            Query query = session.createQuery ("from InfraActiveRequests where requestId = :requestId OR clientRequestId = :requestId");
+            query.setParameter (REQUEST_ID, requestId);
+            ar = (InfraActiveRequests) query.uniqueResult ();
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "InfraRequestDB", "getRequestFromInfraActive", null);
+        }
+        return ar;
+    }
+    
+    public static InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
+
+        List <Criterion> criteria = new LinkedList <> ();
+       
+        if(instanceName != null && !instanceName.equals("")) {
+               
+               if(requestScope.equals("service")){
+                       criteria.add (Restrictions.eq (SERVICE_INSTANCE_NAME, instanceName));
+               } else if(requestScope.equals("vnf")){
+                       criteria.add (Restrictions.eq (VNF_INSTANCE_NAME, instanceName));
+               } else if(requestScope.equals("volumeGroup")){
+                       criteria.add (Restrictions.eq (VOLUME_GROUP_INSTANCE_NAME, instanceName));
+               } else if(requestScope.equals("vfModule")){
+                       criteria.add (Restrictions.eq (VFMODULE_INSTANCE_NAME, instanceName));
+               } else if(requestScope.equals("network")){
+                       criteria.add (Restrictions.eq (NETWORK_INSTANCE_NAME, instanceName));
+               }
+        
+        } else {
+            if(instanceIdMap != null){
+               if(requestScope.equals("service") && instanceIdMap.get("serviceInstanceId") != null){
+                       criteria.add (Restrictions.eq (SERVICE_INSTANCE_ID, instanceIdMap.get("serviceInstanceId")));
+               }
+            
+               if(requestScope.equals("vnf") && instanceIdMap.get("vnfInstanceId") != null){
+                       criteria.add (Restrictions.eq (VNF_INSTANCE_ID, instanceIdMap.get("vnfInstanceId")));
+               }
+            
+               if(requestScope.equals("vfModule") && instanceIdMap.get("vfModuleInstanceId") != null){
+                       criteria.add (Restrictions.eq (VFMODULE_INSTANCE_ID, instanceIdMap.get("vfModuleInstanceId")));
+               }
+            
+               if(requestScope.equals("volumeGroup") && instanceIdMap.get("volumeGroupInstanceId") != null){
+                       criteria.add (Restrictions.eq (VOLUME_GROUP_INSTANCE_ID, instanceIdMap.get("volumeGroupInstanceId")));
+               }
+            
+               if(requestScope.equals("network") && instanceIdMap.get("networkInstanceId") != null){
+                       criteria.add (Restrictions.eq (NETWORK_INSTANCE_ID, instanceIdMap.get("networkInstanceId")));
+               }
+            }
+        }
+        
+        criteria.add (Restrictions.in ("requestStatus", new String[] { "PENDING", "IN_PROGRESS", "TIMEOUT" }));
+        
+        Order order = Order.desc (START_TIME);
+        
+        List<InfraActiveRequests> dupList = executeInfraQuery(criteria, order);
+        
+        InfraActiveRequests infraActiveRequests = null;
+        
+        if(dupList != null && dupList.size() > 0){
+               infraActiveRequests = dupList.get(0);
+        }
+               
+        return infraActiveRequests; 
+    }
+      
+    public static List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive (Map<String, List<String>> orchestrationMap) {
+        
+       
+       List <Criterion> criteria = new LinkedList <> ();
+       for (Map.Entry<String, List<String>> entry : orchestrationMap.entrySet())
+       {
+               String mapKey = entry.getKey();
+
+           if(mapKey.equalsIgnoreCase("vnfInstanceId")){
+               mapKey = "vnfId";
+           } else if(mapKey.equalsIgnoreCase("vnfInstanceName")) {
+               mapKey = "vnfName";
+           } else if(mapKey.equalsIgnoreCase("vfModuleInstanceId")) {
+               mapKey = "vfModuleId";
+           } else if(mapKey.equalsIgnoreCase("vfModuleInstanceName")) {
+               mapKey = "vfModuleName";
+           } else if(mapKey.equalsIgnoreCase("volumeGroupInstanceId")) {
+               mapKey = "volumeGroupId";
+           } else if(mapKey.equalsIgnoreCase("volumeGroupInstanceName")) {
+               mapKey = "volumeGroupName";
+           } else if(mapKey.equalsIgnoreCase("networkInstanceId")) {
+               mapKey = "networkId";
+           } else if(mapKey.equalsIgnoreCase("networkInstanceName")) {
+               mapKey = "networkName";
+           } else if(mapKey.equalsIgnoreCase("lcpCloudRegionId")) {
+               mapKey = "aicCloudRegion";
+           } 
+           
+           criteria.add(Restrictions.eq(mapKey, entry.getValue().get(1)));         
+           
+       }
+       
+         Order order = Order.asc (START_TIME);
+
+        return executeInfraQuery (criteria, order);
+    }
+
+
+    public static List <InfraActiveRequests> getRequestListFromInfraActive (String queryAttributeName,
+                                                                            String queryValue,
+                                                                            String requestType) {
+        long startTime = System.currentTimeMillis ();
+        msoLogger.debug ("Get list of infra requests from DB with " + queryAttributeName + " = " + queryValue);
+
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        try {
+            session.beginTransaction ();
+            Criteria crit = session.createCriteria (InfraActiveRequests.class)
+                    .add (Restrictions.eq (queryAttributeName, queryValue));
+            crit.add (Restrictions.eqOrIsNull (REQUEST_TYPE, requestType));
+            crit.addOrder (Order.desc (START_TIME));
+            crit.addOrder (Order.asc (SOURCE));
+
+            @SuppressWarnings("unchecked")
+            List <InfraActiveRequests> arList = crit.list ();
+            if (arList != null && !arList.isEmpty ()) {
+                return arList;
+            }
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+           // msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "getRequestListFromInfraActive", null);
+        }
+        return null;
+    }
+
+
+    public static InfraActiveRequests getRequestFromInfraActive (String requestId, String requestType) {
+        long startTime = System.currentTimeMillis ();
+        msoLogger.debug ("Get infra request from DB with id " + requestId);
+
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        InfraActiveRequests ar = null;
+        try {
+            session.beginTransaction ();
+            Query query = session.createQuery ("from InfraActiveRequests where (requestId = :requestId OR clientRequestId = :requestId) and requestType = :requestType");
+            query.setParameter (REQUEST_ID, requestId);
+            query.setParameter (REQUEST_TYPE, requestType);
+            ar = (InfraActiveRequests) query.uniqueResult ();
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "getRequestFromInfraActive", null);
+        }
+        return ar;
+    }
+
+
+    public static 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;
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+
+        try {
+            session.beginTransaction ();
+            Query query = session.createQuery ("from InfraActiveRequests where vnfName = :vnfName and action = :action and (requestStatus = 'PENDING' or requestStatus = 'IN_PROGRESS' or requestStatus = 'TIMEOUT') 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.list ();
+            if (!results.isEmpty ()) {
+                ar = results.get (0);
+            }
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "checkDuplicateByVnfName", null);
+        }
+
+        return ar;
+    }
+
+    public static 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;
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+
+        try {
+            session.beginTransaction ();
+            Query query = session.createQuery ("from InfraActiveRequests where vnfId = :vnfId and action = :action and (requestStatus = 'PENDING' or requestStatus = 'IN_PROGRESS' or requestStatus = 'TIMEOUT') 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.list ();
+            if (!results.isEmpty ()) {
+                ar = results.get (0);
+            }
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "checkDuplicateByVnfId", null);
+        }
+
+        return ar;
+    }
+
+    public static void setMockDB(MockRequestsDatabase mockDB) {
+        RequestsDatabase.mockDB = mockDB;
+    }
+
+    /**
+     * Fetch a specific SiteStatus by SiteName.
+     *
+     * @param siteName The unique name of the site
+     * @return SiteStatus object or null if none found
+     */
+    public static SiteStatus getSiteStatus (String siteName) {
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+
+        long startTime = System.currentTimeMillis ();
+        SiteStatus siteStatus = null;
+        msoLogger.debug ("Request database - get Site Status with Site name:" + siteName);
+        try {
+            String hql = "FROM SiteStatus WHERE siteName = :site_name";
+            Query query = session.createQuery (hql);
+            query.setParameter ("site_name", siteName);
+
+            siteStatus = (SiteStatus) query.uniqueResult ();
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.debug ("getSiteStatus - Successfully: " + siteStatus);
+        }
+        return siteStatus;
+    }
+
+    /**
+     * Fetch a specific SiteStatus by SiteName.
+     *
+     * @param siteName The unique name of the site
+     * @param status The updated status of the Site
+     */
+    public static void updateSiteStatus (String siteName, boolean status) {
+        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        session.beginTransaction ();
+
+        long startTime = System.currentTimeMillis ();
+        msoLogger.debug ("Request database - save Site Status with Site name:" + siteName);
+        try {
+            String hql = "FROM SiteStatus WHERE siteName = :site_name";
+            Query query = session.createQuery (hql);
+            query.setParameter ("site_name", siteName);
+
+            SiteStatus siteStatus = (SiteStatus) query.uniqueResult ();
+            if (siteStatus == null) {
+                siteStatus = new SiteStatus ();
+                siteStatus.setSiteName (siteName);
+                siteStatus.setStatus (status);
+                //siteStatus.setCreated(new Timestamp(new Date().getTime()));
+                session.save (siteStatus);
+            } else {
+                siteStatus.setStatus(status);
+                //siteStatus.setCreated(new Timestamp(new Date().getTime()));
+                session.merge (siteStatus);
+            }
+            session.getTransaction ().commit ();
+        } finally {
+            if (session != null && session.isOpen ()) {
+                session.close ();
+            }
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "RequestDB", "updateSiteStatus", null);
+        }
+    }
+
+}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/SiteStatus.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/SiteStatus.java
new file mode 100644 (file)
index 0000000..4218096
--- /dev/null
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.requestsdb;
+
+
+import org.openecomp.mso.logger.MsoLogger;
+
+import java.sql.Timestamp;
+
+
+public class SiteStatus {
+
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+
+    private boolean status;
+    private String siteName;
+    private Timestamp created;
+
+    public SiteStatus() {
+    }
+
+    public Timestamp getCreated() {
+        return created;
+    }
+
+    public void setCreated(Timestamp created) {
+        this.created = created;
+    }
+
+    public String getSiteName() {
+        return siteName;
+    }
+
+    public void setSiteName(String siteName) {
+        this.siteName = siteName;
+    }
+
+    public void setStatus(boolean status) {
+        this.status = status;
+    }
+
+    public boolean getStatus() {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return "SiteStatus{" +
+                "status=" + status +
+                ", siteName='" + siteName + '\'' +
+                ", created=" + created +
+                '}';
+    }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapter.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapter.java
new file mode 100644 (file)
index 0000000..1e3f46d
--- /dev/null
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.requestsdb.adapter;
+
+
+import java.sql.Timestamp;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+public class TimestampXMLAdapter extends XmlAdapter <Long, Timestamp> {
+
+    @Override
+    public Long marshal (Timestamp v) throws Exception {
+        return v.getTime ();
+    }
+
+    @Override
+    public Timestamp unmarshal (Long v) throws Exception {
+        if (v == null) {
+            return new Timestamp(0);
+        }
+        return new Timestamp (v);
+    }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/adapter/package-info.java b/mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/adapter/package-info.java
new file mode 100644 (file)
index 0000000..542d711
--- /dev/null
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+/**
+ * XML adapters.
+ */
+
+package org.openecomp.mso.requestsdb.adapter;
+
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/InfraActiveRequests.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/InfraActiveRequests.hbm.xml
new file mode 100644 (file)
index 0000000..b98177a
--- /dev/null
@@ -0,0 +1,146 @@
+<?xml version="1.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=========================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Jul 27, 2015 3:05:00 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+    <class name="org.openecomp.mso.requestsdb.InfraActiveRequests" table="INFRA_ACTIVE_REQUESTS">
+        <id name="requestId" type="string">
+            <column name="REQUEST_ID" length="45"/>
+            <generator class="assigned"/>
+        </id>
+        <property name="clientRequestId" type="string" unique="true">
+            <column name="CLIENT_REQUEST_ID" length="45" unique="true"/>
+        </property>
+        <property name="action" type="string">
+            <column name="ACTION" length="45" not-null="true"/>
+        </property>
+        <property name="requestStatus" type="string">
+            <column name="REQUEST_STATUS" length="20"/>
+        </property>
+        <property name="statusMessage" type="string">
+            <column name="STATUS_MESSAGE" length="2000"/>
+        </property>
+        <property name="progress" type="java.lang.Long">
+            <column name="PROGRESS" precision="11" scale="0"/>
+        </property>
+        <property name="startTime" type="timestamp">
+            <column name="START_TIME"/>
+        </property>
+        <property name="endTime" type="timestamp">
+            <column name="END_TIME"/>
+        </property>
+        <property name="source" type="string">
+            <column name="SOURCE" length="45"/>
+        </property>
+        <property name="vnfId" type="string">
+            <column name="VNF_ID" length="45"/>
+        </property>
+        <property name="vnfName" type="string">
+            <column name="VNF_NAME" length="80"/>
+        </property>
+        <property name="vnfType" type="string">
+            <column name="VNF_TYPE" length="200"/>
+        </property>
+        <property name="serviceType" type="string">
+            <column name="SERVICE_TYPE" length="45"/>
+        </property>
+        <property name="aicNodeClli" type="string">
+            <column name="AIC_NODE_CLLI" length="11"/>
+        </property>
+        <property name="tenantId" type="string">
+            <column name="TENANT_ID" length="45"/>
+        </property>
+        <property name="provStatus" type="string">
+            <column name="PROV_STATUS" length="20"/>
+        </property>
+        <property name="vnfParams" type="text">
+            <column name="VNF_PARAMS"/>
+        </property>
+        <property name="vnfOutputs" type="text">
+            <column name="VNF_OUTPUTS"/>
+        </property>
+        <property name="requestBody" type="text">
+            <column name="REQUEST_BODY"/>
+        </property>
+        <property name="responseBody" type="text">
+            <column name="RESPONSE_BODY"/>
+        </property>
+        <property name="lastModifiedBy" type="string">
+            <column name="LAST_MODIFIED_BY" length="50"/>
+        </property>
+        <property name="modifyTime" type="timestamp">
+            <column name="MODIFY_TIME"/>
+        </property>
+        <property name="requestType" type="string">
+            <column name="REQUEST_TYPE" length="20"/>
+        </property>
+        <property name="volumeGroupId" type="string">
+            <column name="VOLUME_GROUP_ID" length="45"/>
+        </property>
+        <property name="volumeGroupName" type="string">
+            <column name="VOLUME_GROUP_NAME" length="45"/>
+        </property>
+        <property name="vfModuleId" type="string">
+            <column name="VF_MODULE_ID" length="45"/>
+        </property>
+        <property name="vfModuleName" type="string">
+            <column name="VF_MODULE_NAME" length="200"/>
+        </property>
+        <property name="vfModuleModelName" type="string">
+            <column name="VF_MODULE_MODEL_NAME" length="200"/>
+        </property>
+         <property name="aaiServiceId" type="string">
+            <column name="AAI_SERVICE_ID" length="50"/>
+        </property>
+        <property name="aicCloudRegion" type="string">
+            <column name="AIC_CLOUD_REGION" length="11"/>
+        </property>
+        <property name="callBackUrl" type="string">
+            <column name="CALLBACK_URL" length="200"/>
+        </property>
+        <property name="correlator" type="string">
+            <column name="CORRELATOR" length="80"/>
+        </property>
+        <property name="serviceInstanceId" type="string">
+            <column name="SERVICE_INSTANCE_ID" length="45"/>
+        </property>
+        <property name="serviceInstanceName" type="string">
+            <column name="SERVICE_INSTANCE_NAME" length="80"/>
+        </property>
+        <property name="requestScope" type="string">
+            <column name="REQUEST_SCOPE" length="20"/>
+        </property>
+        <property name="requestAction" type="string">
+            <column name="REQUEST_ACTION" length="45" not-null="true"/>
+        </property>
+        <property name="networkId" type="string">
+            <column name="NETWORK_ID" length="45"/>
+        </property>
+        <property name="networkName" type="string">
+            <column name="NETWORK_NAME" length="80"/>
+        </property>
+        <property name="networkType" type="string">
+            <column name="NETWORK_TYPE" length="80"/>
+        </property>
+    </class>
+</hibernate-mapping>
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/SiteStatus.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/SiteStatus.hbm.xml
new file mode 100644 (file)
index 0000000..95ccfda
--- /dev/null
@@ -0,0 +1,35 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.requestsdb">
+       <class name="SiteStatus" table="SITE_STATUS">
+               <meta attribute="class-description">
+                       This class describes a Site Status
+               </meta>
+               
+               <id name="siteName" type="string" column="SITE_NAME"/>
+
+               <property name="status" column="STATUS" type="boolean" length="256"/>
+               <property name="created" column="CREATION_TIMESTAMP" type="timestamp" generated="insert" insert="false" update="false"/>
+       </class>
+</hibernate-mapping>
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/hibernate-mysql.cfg.xml b/mso-api-handlers/mso-requests-db/src/main/resources/hibernate-mysql.cfg.xml
new file mode 100644 (file)
index 0000000..531b771
--- /dev/null
@@ -0,0 +1,37 @@
+<?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-configuration PUBLIC
+               "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+               "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+    <session-factory>
+        <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
+        <property name="hibernate.show_sql">false</property>
+        <property name="hibernate.format_sql">true</property>
+        <property name="connection.datasource">java:jboss/datasources/mso-requests</property>
+               
+<!--           <property name="hibernate.hbm2ddl.auto">create</property> -->
+
+        <mapping resource="InfraActiveRequests.hbm.xml"></mapping>
+        <mapping resource="SiteStatus.hbm.xml"></mapping>
+    </session-factory>
+</hibernate-configuration>
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/hibernate-requests-ajsc.cfg.xml b/mso-api-handlers/mso-requests-db/src/main/resources/hibernate-requests-ajsc.cfg.xml
new file mode 100644 (file)
index 0000000..14bd7b5
--- /dev/null
@@ -0,0 +1,59 @@
+<?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-configuration PUBLIC
+               "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+               "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+          <session-factory>
+        <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
+        <property name="hibernate.show_sql">false</property>
+        <property name="hibernate.format_sql">true</property>
+
+        <mapping resource="InfraActiveRequests.hbm.xml"></mapping>
+        <mapping resource="SiteStatus.hbm.xml"></mapping>
+       </session-factory>
+     <!-- <session-factory name="MSORequestsFactory">
+       <property name="connection.url">${REQUESTS_CONNECTION_URL}</property>
+        <property name="connection.username">${REQUESTS_USERNAME}</property>
+        <property name="connection.password">${REQUESTS_PASSWORD}</property>
+        <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
+        <property name="hibernate.default_schema">mso_requests</property>
+        <property name="connection.driver_class">org.mariadb.jdbc.Driver</property>
+        <property name="hibernate.current_session_context_class">thread</property>
+        <property name="hibernate.show_sql">false</property>
+        <property name="hibernate.format_sql">true</property>    
+
+         
+        <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> 
+               <property name="hibernate.c3p0.min_size">${REQUESTS_MIN_POOL_SIZE}</property> 
+               <property name="hibernate.c3p0.max_size">${REQUESTS_MAX_POOL_SIZE}</property> 
+               <property name="hibernate.c3p0.timeout">${REQUESTS_TIMEOUT}</property> 
+               <property name="hibernate.c3p0.max_statements">50</property> 
+               <property name="hibernate.c3p0.idle_test_period">1000</property> 
+               <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> 
+               
+  
+
+        <mapping resource="InfraActiveRequests.hbm.xml"></mapping>     
+
+    </session-factory> -->
+</hibernate-configuration>
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/HibernateUtilESTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/HibernateUtilESTest.java
new file mode 100644 (file)
index 0000000..6ae0a64
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Wed Dec 14 15:15:07 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+import org.openecomp.mso.requestsdb.HibernateUtil;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HibernateUtilESTest extends HibernateUtilESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      HibernateUtil hibernateUtil0 = (HibernateUtil)PrivateAccess.callDefaultConstructorOfTheClassUnderTest();
+      assertNotNull(hibernateUtil0);
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/HibernateUtilESTestscaffolding.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/HibernateUtilESTestscaffolding.java
new file mode 100644 (file)
index 0000000..e2e9b60
--- /dev/null
@@ -0,0 +1,107 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Wed Dec 14 15:15:07 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
+
+@EvoSuiteClassExclude
+public class HibernateUtilESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.requestsdb.HibernateUtil"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HibernateUtilESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.hibernate.SessionFactory",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.openecomp.mso.entity.MsoRequest",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.requestsdb.HibernateUtil",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HibernateUtilESTestscaffolding.class.getClassLoader()); 
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.openecomp.mso.requestsdb.HibernateUtil"
+    );
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraActiveRequestsESTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraActiveRequestsESTest.java
new file mode 100644 (file)
index 0000000..96ed0be
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Wed Dec 14 15:13:40 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+import org.openecomp.mso.requestsdb.InfraActiveRequests;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class InfraActiveRequestsESTest extends InfraActiveRequestsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      InfraActiveRequests infraActiveRequests0 = new InfraActiveRequests();
+      assertNull(infraActiveRequests0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      InfraActiveRequests infraActiveRequests0 = new InfraActiveRequests("#)r", "#)r");
+      assertNull(infraActiveRequests0.getNetworkName());
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraActiveRequestsESTestscaffolding.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraActiveRequestsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..012b17a
--- /dev/null
@@ -0,0 +1,84 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Wed Dec 14 15:13:40 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
+
+@EvoSuiteClassExclude
+public class InfraActiveRequestsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.requestsdb.InfraActiveRequests"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(InfraActiveRequestsESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.requestsdb.InfraActiveRequests",
+      "org.openecomp.mso.requestsdb.InfraRequests"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(InfraActiveRequestsESTestscaffolding.class.getClassLoader()); 
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.requestsdb.InfraRequests",
+      "org.openecomp.mso.requestsdb.InfraActiveRequests"
+    );
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraRequestsESTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraRequestsESTest.java
new file mode 100644 (file)
index 0000000..e3f5710
--- /dev/null
@@ -0,0 +1,2029 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Wed Dec 14 15:15:48 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+import java.sql.Timestamp;
+import java.time.Clock;
+import java.time.DateTimeException;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.Month;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalUnit;
+import java.time.temporal.UnsupportedTemporalTypeException;
+import java.util.Date;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.System;
+import org.evosuite.runtime.mock.java.net.MockURI;
+import org.evosuite.runtime.mock.java.time.MockClock;
+import org.evosuite.runtime.mock.java.time.MockInstant;
+import org.evosuite.runtime.mock.java.time.MockLocalDateTime;
+import org.evosuite.runtime.mock.java.util.MockDate;
+import org.junit.runner.RunWith;
+import org.openecomp.mso.requestsdb.InfraRequests;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class InfraRequestsESTest extends InfraRequestsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test000()  throws Throwable  {
+      System.setCurrentTimeMillis(0L);
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestStatus("org.openecomp.mso.requestsdb.InfraRequests");
+      Instant instant0 = MockInstant.ofEpochSecond((-1L));
+      Timestamp timestamp0 = Timestamp.from(instant0);
+      infraRequests0.setModifyTime(timestamp0);
+      infraRequests0.setTenantId("7z3rvWw}>");
+      infraRequests0.setVnfParams("7z3rvWw}>");
+      infraRequests0.setVfModuleModelName("H(+:J_^eh02J");
+      InfraRequests infraRequests1 = new InfraRequests("", "zCyMQj^e");
+      infraRequests1.setProvStatus("7z3rvWw}>");
+      infraRequests1.getProgress();
+      infraRequests0.setProgress((Long) null);
+      infraRequests0.setRequestId("");
+      infraRequests0.getStartTime();
+      Timestamp timestamp1 = infraRequests0.getModifyTime();
+      infraRequests0.getEndTime();
+      Timestamp timestamp2 = infraRequests0.getModifyTime();
+      assertSame(timestamp2, timestamp1);
+  }
+
+  @Test(timeout = 4000)
+  public void test001()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("&^pJug .NI><P", "&^pJug .NI><P");
+      infraRequests0.setNetworkType("jxNkugb+TFTHEb");
+      infraRequests0.setVfModuleName("&^pJug .NI><P");
+      Timestamp timestamp0 = new Timestamp(0L);
+      timestamp0.toLocalDateTime();
+      timestamp0.clone();
+      infraRequests0.setStartTime(timestamp0);
+      infraRequests0.setVolumeGroupName("&^pJug .NI><P");
+      infraRequests0.setRequestAction(" g)]V!'`TH5O");
+      infraRequests0.setServiceInstanceId("\7fDfLF%$Jbfi.Q31<");
+      infraRequests0.getStartTime();
+      infraRequests0.getStartTime();
+      infraRequests0.setAicCloudRegion("sz.!~p3obl/");
+      infraRequests0.setClientRequestId("sz.!~p3obl/");
+      infraRequests0.setVnfParams((String) null);
+      infraRequests0.getEndTime();
+      infraRequests0.getStartTime();
+      infraRequests0.getStartTime();
+      infraRequests0.getEndTime();
+      infraRequests0.getModifyTime();
+      infraRequests0.getModifyTime();
+      Timestamp timestamp1 = infraRequests0.getEndTime();
+      assertNull(timestamp1);
+  }
+
+  @Test(timeout = 4000)
+  public void test002()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      Timestamp timestamp0 = new Timestamp(153L);
+      Instant instant0 = timestamp0.toInstant();
+      Timestamp timestamp1 = Timestamp.from(instant0);
+      infraRequests0.setStartTime(timestamp1);
+      Timestamp timestamp2 = infraRequests0.getStartTime();
+      assertNotSame(timestamp2, timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test003()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      Timestamp timestamp0 = new Timestamp((-1852L));
+      infraRequests0.setEndTime(timestamp0);
+      Timestamp timestamp1 = infraRequests0.getEndTime();
+      assertEquals(148000000, timestamp1.getNanos());
+  }
+
+  @Test(timeout = 4000)
+  public void test004()  throws Throwable  {
+      System.setCurrentTimeMillis(0L);
+      InfraRequests infraRequests0 = new InfraRequests((String) null, (String) null);
+      infraRequests0.setAction("");
+      infraRequests0.setLastModifiedBy("et'?MxG");
+      infraRequests0.setSource((String) null);
+      infraRequests0.setRequestStatus("i>Ckz=#\"! &-");
+      infraRequests0.setVnfName((String) null);
+      infraRequests0.setRequestBody("");
+      infraRequests0.setProvStatus("");
+      infraRequests0.setRequestBody((String) null);
+      infraRequests0.setAicCloudRegion("m&WTLl(Z@56C");
+      infraRequests0.getNetworkId();
+      infraRequests0.setNetworkId("zcYzTK3rhfL`Cw");
+      infraRequests0.getStartTime();
+      System.setCurrentTimeMillis(2579L);
+      infraRequests0.getModifyTime();
+      infraRequests0.getStartTime();
+      infraRequests0.setAicCloudRegion("=o7|rLO^");
+      infraRequests0.getEndTime();
+      infraRequests0.getEndTime();
+      infraRequests0.getNetworkId();
+      System.setCurrentTimeMillis(0L);
+      System.setCurrentTimeMillis(0L);
+      infraRequests0.getStartTime();
+      infraRequests0.getSource();
+      String string0 = infraRequests0.getNetworkId();
+      assertEquals("zcYzTK3rhfL`Cw", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test005()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      Long long0 = new Long(1283L);
+      infraRequests0.setProvStatus("'4~OJS*DL/lP");
+      Long.sum((-978L), 1283L);
+      infraRequests0.setProgress(long0);
+      infraRequests0.setServiceInstanceName("'4~OJS*DL/lP");
+      infraRequests0.getSource();
+      infraRequests0.setRequestId("");
+      infraRequests0.getSource();
+      infraRequests0.setVnfParams((String) null);
+      infraRequests0.getNetworkId();
+      infraRequests0.getEndTime();
+      infraRequests0.getNetworkId();
+      infraRequests0.getModifyTime();
+      infraRequests0.getProgress();
+      infraRequests0.getSource();
+      infraRequests0.getModifyTime();
+      infraRequests0.getNetworkId();
+      infraRequests0.getSource();
+      infraRequests0.getModifyTime();
+      infraRequests0.getEndTime();
+      infraRequests0.getEndTime();
+      infraRequests0.getModifyTime();
+      infraRequests0.getProgress();
+      infraRequests0.getProgress();
+      Timestamp timestamp0 = infraRequests0.getStartTime();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test006()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getEndTime();
+      infraRequests0.setVfModuleModelName("");
+      infraRequests0.setVfModuleId("");
+      infraRequests0.getStartTime();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getSource();
+      infraRequests0.setVfModuleModelName("");
+      infraRequests0.setAction("");
+      infraRequests0.setVnfType("32ex<U{");
+      infraRequests0.setVfModuleId("\7f~!_Y!cPw*c_>H$");
+      infraRequests0.getModifyTime();
+      System.setCurrentTimeMillis(0L);
+      infraRequests0.getEndTime();
+      infraRequests0.setRequestStatus("");
+      infraRequests0.setServiceInstanceName("");
+      infraRequests0.getStartTime();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.setVolumeGroupName("");
+      infraRequests0.getProgress();
+      infraRequests0.setProvStatus("");
+      System.setCurrentTimeMillis(0L);
+      infraRequests0.getStartTime();
+      System.setCurrentTimeMillis(0L);
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getNetworkId();
+      infraRequests0.getNetworkId();
+      infraRequests0.getVfModuleModelName();
+      System.setCurrentTimeMillis(0L);
+      infraRequests0.getProgress();
+      Timestamp timestamp0 = infraRequests0.getStartTime();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test007()  throws Throwable  {
+      System.setCurrentTimeMillis((-2047L));
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVolumeGroupName("k*}2I)_;C'i,[i>aRNU");
+      infraRequests0.setSource("%az=");
+      infraRequests0.getModifyTime();
+      infraRequests0.setRequestAction("");
+      infraRequests0.setClientRequestId("");
+      infraRequests0.setAicNodeClli("");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setAction("");
+      infraRequests0.getNetworkId();
+      infraRequests0.getNetworkId();
+      infraRequests0.getProgress();
+      infraRequests0.getProgress();
+      infraRequests0.getNetworkId();
+      infraRequests0.getProgress();
+      infraRequests0.getModifyTime();
+      infraRequests0.setRequestScope("URuw\"b-");
+      infraRequests0.setNetworkName("");
+      infraRequests0.getStartTime();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getProgress();
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.getEndTime();
+      infraRequests0.setVnfId("");
+      infraRequests0.getProgress();
+      infraRequests0.getNetworkId();
+      Long long0 = infraRequests0.getProgress();
+      assertNull(long0);
+  }
+
+  @Test(timeout = 4000)
+  public void test008()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests((String) null, (String) null);
+      infraRequests0.setClientRequestId((String) null);
+      infraRequests0.setVfModuleModelName((String) null);
+      Long long0 = new Long((-43L));
+      Long.compare((-1L), 0L);
+      Long.compare(819L, (-43L));
+      infraRequests0.setProgress(long0);
+      infraRequests0.getModifyTime();
+      infraRequests0.getStartTime();
+      infraRequests0.setAction("");
+      infraRequests0.getSource();
+      infraRequests0.getSource();
+      infraRequests0.getStartTime();
+      infraRequests0.setNetworkId((String) null);
+      infraRequests0.getNetworkId();
+      Long long1 = infraRequests0.getProgress();
+      assertEquals((-43L), (long)long1);
+  }
+
+  @Test(timeout = 4000)
+  public void test009()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getStartTime();
+      infraRequests0.setRequestScope("");
+      System.setCurrentTimeMillis(0L);
+      infraRequests0.setVnfType("");
+      infraRequests0.setProvStatus("");
+      infraRequests0.setRequestScope("LB1xoi:3Wz.5'5uxZ");
+      infraRequests0.setVfModuleId("+x66Ol");
+      infraRequests0.setVfModuleModelName("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setVnfOutputs("LB1xoi:3Wz.5'5uxZ");
+      infraRequests0.setCorrelator("{%N>'KCKdC");
+      infraRequests0.getEndTime();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getSource();
+      infraRequests0.getStartTime();
+      infraRequests0.getNetworkId();
+      infraRequests0.setRequestBody("jBcy6j^");
+      infraRequests0.setAaiServiceId("m,{Gy9PQsY5J/aU!uX");
+      infraRequests0.setVolumeGroupId("");
+      infraRequests0.getEndTime();
+      infraRequests0.getEndTime();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getModifyTime();
+      infraRequests0.getEndTime();
+      infraRequests0.getModifyTime();
+      String string0 = infraRequests0.getSource();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test010()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getEndTime();
+      infraRequests0.setVfModuleId((String) null);
+      infraRequests0.setServiceType("");
+      infraRequests0.getModifyTime();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.setAaiServiceId((String) null);
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getEndTime();
+      infraRequests0.setVfModuleModelName((String) null);
+      infraRequests0.getModifyTime();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getEndTime();
+      infraRequests0.setVnfName((String) null);
+      infraRequests0.getVfModuleId();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getNetworkId();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getSource();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getSource();
+      infraRequests0.getServiceType();
+      infraRequests0.getModifyTime();
+      String string0 = infraRequests0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test011()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVnfName("s4 -bpK");
+      infraRequests0.setLastModifiedBy("");
+      infraRequests0.getProgress();
+      infraRequests0.getServiceType();
+      infraRequests0.setVfModuleName((String) null);
+      infraRequests0.setVnfName("");
+      infraRequests0.setVnfType("");
+      infraRequests0.getVfModuleId();
+      infraRequests0.setResponseBody("");
+      infraRequests0.getStartTime();
+      infraRequests0.setStartTime((Timestamp) null);
+      infraRequests0.setCorrelator("");
+      infraRequests0.getVnfType();
+      infraRequests0.getNetworkId();
+      infraRequests0.setServiceInstanceId("");
+      infraRequests0.getProgress();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getNetworkId();
+      infraRequests0.setCorrelator((String) null);
+      infraRequests0.getNetworkId();
+      infraRequests0.getVnfType();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.setVnfName("");
+      System.setCurrentTimeMillis((-1L));
+      infraRequests0.setProvStatus("");
+      infraRequests0.getVfModuleId();
+      infraRequests0.getSource();
+      infraRequests0.getAicNodeClli();
+      String string0 = infraRequests0.getServiceType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test012()  throws Throwable  {
+      System.setCurrentTimeMillis(1L);
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setEndTime((Timestamp) null);
+      infraRequests0.setTenantId("");
+      infraRequests0.setRequestStatus("");
+      infraRequests0.setClientRequestId("");
+      infraRequests0.setAction("");
+      infraRequests0.setCorrelator("");
+      infraRequests0.setAicNodeClli("");
+      infraRequests0.getVnfParams();
+      System.setCurrentTimeMillis(1L);
+      infraRequests0.setVolumeGroupName("");
+      infraRequests0.setVfModuleId((String) null);
+      infraRequests0.setVnfParams("");
+      infraRequests0.getSource();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getSource();
+      infraRequests0.getVnfParams();
+      infraRequests0.getServiceType();
+      infraRequests0.setAaiServiceId("i`q1kSghF");
+      infraRequests0.setStatusMessage((String) null);
+      infraRequests0.getProgress();
+      infraRequests0.getModifyTime();
+      infraRequests0.getVnfType();
+      infraRequests0.getProgress();
+      infraRequests0.getServiceType();
+      String string0 = infraRequests0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test013()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestScope("");
+      infraRequests0.setAaiServiceId(")9?S*`\"0>k");
+      infraRequests0.getEndTime();
+      infraRequests0.setVolumeGroupName("");
+      infraRequests0.setServiceInstanceId("");
+      infraRequests0.getProgress();
+      infraRequests0.getRequestScope();
+      Long long0 = infraRequests0.getProgress();
+      assertNull(long0);
+  }
+
+  @Test(timeout = 4000)
+  public void test014()  throws Throwable  {
+      System.setCurrentTimeMillis(3986L);
+      InfraRequests infraRequests0 = new InfraRequests("", (String) null);
+      infraRequests0.setVnfName((String) null);
+      infraRequests0.getResponseBody();
+      infraRequests0.setAction((String) null);
+      infraRequests0.setCallBackUrl("(tW~,tC");
+      infraRequests0.setClientRequestId("$Y$nNqJ`e'KL#@v>:");
+      infraRequests0.setVolumeGroupId("mSK_k$\7fP)79N/:l");
+      infraRequests0.setResponseBody("");
+      infraRequests0.setSource("(tW~,tC");
+      infraRequests0.setProvStatus((String) null);
+      infraRequests0.setVfModuleName("9");
+      infraRequests0.getServiceType();
+      infraRequests0.getVnfParams();
+      infraRequests0.getVnfType();
+      infraRequests0.getVnfParams();
+      infraRequests0.getStartTime();
+      infraRequests0.getVnfType();
+      infraRequests0.getStartTime();
+      infraRequests0.getSource();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getStartTime();
+      infraRequests0.getAicNodeClli();
+      System.setCurrentTimeMillis((-1622L));
+      infraRequests0.getVfModuleModelName();
+      String string0 = infraRequests0.getResponseBody();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test015()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("wkT`'", "kMn9?");
+      infraRequests0.setVfModuleName("");
+      infraRequests0.setNetworkType("");
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.setProvStatus("kMn9?");
+      infraRequests0.getRequestScope();
+      infraRequests0.setVfModuleModelName((String) null);
+      infraRequests0.setAicCloudRegion("wkT`'");
+      infraRequests0.setServiceInstanceName("7Stei0W{<@QDoE9~");
+      infraRequests0.setRequestAction("");
+      infraRequests0.getServiceType();
+      infraRequests0.getVnfParams();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getRequestScope();
+      infraRequests0.getNetworkType();
+      infraRequests0.getStartTime();
+      infraRequests0.getNetworkType();
+      infraRequests0.getStartTime();
+      infraRequests0.getRequestAction();
+      infraRequests0.setCorrelator("!5");
+      infraRequests0.getSource();
+      infraRequests0.getServiceType();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getVnfParams();
+      infraRequests0.getModifyTime();
+      infraRequests0.getVnfParams();
+      infraRequests0.getProvStatus();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getVfModuleModelName();
+      assertEquals("wkT`'", infraRequests0.getRequestId());
+      assertEquals("kMn9?", infraRequests0.getAction());
+  }
+
+  @Test(timeout = 4000)
+  public void test016()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", (String) null);
+      infraRequests0.setRequestId("");
+      infraRequests0.setVfModuleId("");
+      infraRequests0.setRequestScope("");
+      infraRequests0.setVfModuleId("");
+      infraRequests0.setSource((String) null);
+      infraRequests0.setClientRequestId("");
+      infraRequests0.setVnfName("3?/m3##");
+      infraRequests0.setVfModuleName("");
+      infraRequests0.setSource("y [b8^A,yt|auh|y");
+      infraRequests0.setRequestScope("y [b8^A,yt|auh|y");
+      infraRequests0.setClientRequestId("");
+      infraRequests0.getEndTime();
+      infraRequests0.setVolumeGroupName("r7szQIK?~Q");
+      infraRequests0.getRequestAction();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.setServiceInstanceId("y [b8^A,yt|auh|y");
+      infraRequests0.getServiceType();
+      infraRequests0.getNetworkType();
+      System.setCurrentTimeMillis(3509L);
+      infraRequests0.getClientRequestId();
+      infraRequests0.setTenantId((String) null);
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getVnfType();
+      infraRequests0.getVnfParams();
+      infraRequests0.getServiceType();
+      infraRequests0.getVnfParams();
+      String string0 = infraRequests0.getVfModuleModelName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test017()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      LocalDateTime localDateTime0 = MockLocalDateTime.of(264, 1, 1, 0, 1, 0);
+      Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
+      infraRequests0.setEndTime(timestamp0);
+      infraRequests0.setServiceInstanceId("TmMT");
+      infraRequests0.setServiceInstanceName("");
+      infraRequests0.setAicNodeClli(";");
+      infraRequests0.setAicCloudRegion("");
+      infraRequests0.setAction("");
+      infraRequests0.setServiceInstanceId("");
+      infraRequests0.setAaiServiceId("");
+      infraRequests0.getVnfType();
+      infraRequests0.getSource();
+      infraRequests0.getVnfParams();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getStartTime();
+      infraRequests0.getProvStatus();
+      infraRequests0.getServiceType();
+      infraRequests0.getProvStatus();
+      infraRequests0.getServiceType();
+      System.setCurrentTimeMillis(1);
+      infraRequests0.setVnfParams((String) null);
+      infraRequests0.getServiceInstanceName();
+      infraRequests0.getEndTime();
+      infraRequests0.setAicNodeClli((String) null);
+      infraRequests0.getNetworkType();
+      infraRequests0.getEndTime();
+      infraRequests0.getRequestScope();
+      System.setCurrentTimeMillis(0);
+  }
+
+  @Test(timeout = 4000)
+  public void test018()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setCorrelator("nBvp})-N}");
+      infraRequests0.setSource("dO\7fe#{Gx#~I(,F)0(");
+      infraRequests0.setVnfId("");
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getCorrelator();
+      infraRequests0.getModifyTime();
+      infraRequests0.getRequestScope();
+      infraRequests0.getVfModuleModelName();
+      String string0 = infraRequests0.getProvStatus();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test019()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("HY7\"yA%CG", "");
+      infraRequests0.setVnfType("");
+      infraRequests0.setAicNodeClli("");
+      infraRequests0.setNetworkId("HY7\"yA%CG");
+      infraRequests0.setAicNodeClli("");
+      infraRequests0.getProgress();
+      infraRequests0.setProgress((Long) null);
+      infraRequests0.setServiceType("");
+      infraRequests0.setLastModifiedBy("");
+      infraRequests0.getRequestScope();
+      infraRequests0.getProvStatus();
+      infraRequests0.setVolumeGroupName((String) null);
+      infraRequests0.getLastModifiedBy();
+      infraRequests0.getProvStatus();
+      infraRequests0.setAicCloudRegion("");
+      infraRequests0.getRequestScope();
+      infraRequests0.getProvStatus();
+      assertEquals("HY7\"yA%CG", infraRequests0.getRequestId());
+      assertEquals("", infraRequests0.getAction());
+  }
+
+  @Test(timeout = 4000)
+  public void test020()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestBody("");
+      infraRequests0.setTenantId("");
+      infraRequests0.setRequestType("");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setRequestAction(">Q'MsuT`)ThP6");
+      infraRequests0.setVfModuleId("");
+      infraRequests0.setResponseBody("");
+      infraRequests0.getVnfName();
+      infraRequests0.getProgress();
+      infraRequests0.setVnfName("");
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.setClientRequestId((String) null);
+      infraRequests0.getServiceType();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getVnfName();
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getNetworkId();
+      infraRequests0.getRequestAction();
+      infraRequests0.getNetworkType();
+      infraRequests0.getCorrelator();
+      infraRequests0.setLastModifiedBy((String) null);
+      infraRequests0.getCorrelator();
+      infraRequests0.getNetworkId();
+      infraRequests0.getTenantId();
+      infraRequests0.getVolumeGroupName();
+      String string0 = infraRequests0.getVolumeGroupName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test021()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getNetworkId();
+      infraRequests0.setRequestAction((String) null);
+      Long long0 = new Long((-965L));
+      infraRequests0.setProgress(long0);
+      infraRequests0.getSource();
+      infraRequests0.setNetworkType("5K\u0002}.V3dm%yU_&r");
+      infraRequests0.setVnfOutputs("5K\u0002}.V3dm%yU_&r");
+      String string0 = infraRequests0.getVnfOutputs();
+      assertEquals("5K\u0002}.V3dm%yU_&r", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test022()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestBody("");
+      infraRequests0.setNetworkName("K|it");
+      infraRequests0.setAction("hcA}j,");
+      infraRequests0.setLastModifiedBy("");
+      infraRequests0.getCallBackUrl();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getRequestScope();
+      String string0 = infraRequests0.getRequestBody();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test023()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("0", "0");
+      infraRequests0.setNetworkType("0");
+      infraRequests0.getStatusMessage();
+      infraRequests0.getProvStatus();
+      infraRequests0.getVnfParams();
+      infraRequests0.getStatusMessage();
+      infraRequests0.setVfModuleName((String) null);
+      infraRequests0.getResponseBody();
+      infraRequests0.setStatusMessage("[3aRfG;XuP");
+      infraRequests0.setVolumeGroupId((String) null);
+      infraRequests0.setAction("");
+      infraRequests0.getEndTime();
+      infraRequests0.getStartTime();
+      infraRequests0.getServiceType();
+      infraRequests0.getResponseBody();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getServiceInstanceName();
+      infraRequests0.getEndTime();
+      infraRequests0.getNetworkType();
+      infraRequests0.getVnfOutputs();
+      infraRequests0.getVnfType();
+      infraRequests0.getRequestScope();
+      infraRequests0.getStartTime();
+      infraRequests0.getRequestAction();
+      infraRequests0.getProgress();
+      infraRequests0.getLastModifiedBy();
+      infraRequests0.getStatusMessage();
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getVnfName();
+      System.setCurrentTimeMillis(1480L);
+      String string0 = infraRequests0.getVnfName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test024()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestType("2AfD]In8p;DK-]O`8}s");
+      infraRequests0.getClientRequestId();
+      infraRequests0.setClientRequestId((String) null);
+      infraRequests0.setResponseBody("2AfD]In8p;DK-]O`8}s");
+      infraRequests0.setAaiServiceId("2AfD]In8p;DK-]O`8}s");
+      infraRequests0.setRequestBody((String) null);
+      infraRequests0.setVfModuleId("");
+      Timestamp timestamp0 = new Timestamp(0L);
+      infraRequests0.setEndTime(timestamp0);
+      infraRequests0.setVfModuleModelName((String) null);
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.setVnfName("}}xiNsZQ:D73z4dha");
+      Clock clock0 = MockClock.systemDefaultZone();
+      Timestamp timestamp1 = infraRequests0.getEndTime();
+      timestamp0.before(timestamp1);
+      Instant instant0 = MockInstant.now(clock0);
+      Instant instant1 = MockInstant.minusNanos(instant0, (-290L));
+      ChronoUnit chronoUnit0 = ChronoUnit.DECADES;
+      // Undeclared exception!
+      try { 
+        MockInstant.plus(instant1, 0L, (TemporalUnit) chronoUnit0);
+        fail("Expecting exception: UnsupportedTemporalTypeException");
+      
+      } catch(UnsupportedTemporalTypeException e) {
+         //
+         // Unsupported unit: Decades
+         //
+         verifyException("java.time.Instant", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test025()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getTenantId();
+      infraRequests0.setServiceType("");
+      infraRequests0.getModifyTime();
+      infraRequests0.setModifyTime((Timestamp) null);
+      infraRequests0.getClientRequestId();
+      infraRequests0.setVolumeGroupId((String) null);
+      infraRequests0.getRequestId();
+      infraRequests0.getVfModuleName();
+      infraRequests0.getServiceInstanceName();
+      infraRequests0.setNetworkId("");
+      infraRequests0.setNetworkName((String) null);
+      infraRequests0.getResponseBody();
+      infraRequests0.getNetworkId();
+      Timestamp timestamp0 = infraRequests0.getModifyTime();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test026()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.setResponseBody(")Y?y`MhJSG>i");
+      infraRequests0.setVfModuleId((String) null);
+      infraRequests0.setRequestStatus((String) null);
+      infraRequests0.getResponseBody();
+      infraRequests0.setVnfOutputs("q+6_~:+S5N.3.Lge\"");
+      infraRequests0.setVfModuleModelName("q+6_~:+S5N.3.Lge\"");
+      infraRequests0.setSource("q+6_~:+S5N.3.Lge\"");
+      infraRequests0.setServiceInstanceName(")Y?y`MhJSG>i");
+      infraRequests0.getServiceType();
+      infraRequests0.getModifyTime();
+      infraRequests0.setNetworkName("YUNs`H&7xu@i2P/1_");
+      InfraRequests infraRequests1 = new InfraRequests();
+      infraRequests1.setVfModuleModelName("");
+      infraRequests1.setRequestStatus("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setRequestId("6A'N2)N@dyHD|PV");
+      infraRequests1.getNetworkType();
+      infraRequests0.getNetworkName();
+      infraRequests1.getLastModifiedBy();
+      infraRequests0.getRequestBody();
+      infraRequests1.setServiceInstanceId("");
+      infraRequests0.setServiceInstanceName(":fK$0REpUY");
+      assertEquals(")Y?y`MhJSG>i", infraRequests0.getResponseBody());
+  }
+
+  @Test(timeout = 4000)
+  public void test027()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setServiceType("i3b%q%2jvX");
+      infraRequests0.getServiceType();
+      infraRequests0.setClientRequestId("i3b%q%2jvX");
+      infraRequests0.setVnfId("");
+      infraRequests0.getSource();
+      ChronoUnit chronoUnit0 = ChronoUnit.NANOS;
+      // Undeclared exception!
+      try { 
+        MockInstant.plus((Instant) null, (-1L), (TemporalUnit) chronoUnit0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.evosuite.runtime.mock.java.time.MockInstant", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test028()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("org.openecomp.mso.requestsdb.InfraRequests", "");
+      infraRequests0.setRequestType("");
+      infraRequests0.setRequestBody("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setAction("");
+      infraRequests0.getVnfParams();
+      InfraRequests infraRequests1 = new InfraRequests();
+      infraRequests0.setVfModuleName((String) null);
+      infraRequests0.getVfModuleName();
+      infraRequests1.setVfModuleName("?ynVFwCW]h");
+      infraRequests0.setVnfParams("");
+      infraRequests1.setResponseBody((String) null);
+      infraRequests1.setLastModifiedBy((String) null);
+      infraRequests1.setClientRequestId("oCb )W1D3x;e}QaJ");
+      infraRequests0.setServiceInstanceName("");
+      infraRequests0.getVfModuleId();
+      infraRequests1.getClientRequestId();
+      infraRequests1.getModifyTime();
+      infraRequests0.setSource("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests1.setVfModuleName("org.openecomp.mso.requestsdb.InfraRequests");
+      String string0 = infraRequests1.getAaiServiceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test029()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setServiceType("");
+      infraRequests0.setVfModuleModelName("QE|");
+      infraRequests0.setStatusMessage("/`_aGH,(,:O9e'");
+      infraRequests0.setStatusMessage("/`_aGH,(,:O9e'");
+      infraRequests0.setLastModifiedBy((String) null);
+      infraRequests0.setServiceInstanceName("QE|");
+      infraRequests0.setCallBackUrl("QE|");
+      infraRequests0.setCallBackUrl("QE|");
+      Long long0 = new Long(0L);
+      Long.getLong("/`_aGH,(,:O9e'", 0L);
+      Long.getLong("QE|", (Long) null);
+      infraRequests0.setProgress(long0);
+      infraRequests0.setVfModuleName("QE|");
+      infraRequests0.setSource("");
+      infraRequests0.setVfModuleId("QE|");
+      infraRequests0.setVolumeGroupId("");
+      infraRequests0.getTenantId();
+      infraRequests0.getClientRequestId();
+      String string0 = infraRequests0.getServiceInstanceName();
+      assertEquals("QE|", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test030()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getResponseBody();
+      infraRequests0.setServiceInstanceName((String) null);
+      InfraRequests infraRequests1 = new InfraRequests((String) null, ";*MXO3Cx^<r~)I#t");
+      infraRequests1.setSource("H>f%;>>.T7]h8?L]*");
+      infraRequests1.setRequestScope((String) null);
+      infraRequests1.setNetworkName("");
+      infraRequests0.setRequestAction("FLknU%");
+      infraRequests1.setCallBackUrl("");
+      InfraRequests infraRequests2 = new InfraRequests(";*MXO3Cx^<r~)I#t", ";*MXO3Cx^<r~)I#t");
+      infraRequests2.setCorrelator("");
+      infraRequests1.getNetworkName();
+      infraRequests0.setRequestBody((String) null);
+      assertNull(infraRequests0.getRequestScope());
+  }
+
+  @Test(timeout = 4000)
+  public void test031()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getNetworkId();
+      infraRequests0.setVfModuleModelName((String) null);
+      infraRequests0.setNetworkType((String) null);
+      infraRequests0.setAction((String) null);
+      infraRequests0.setVfModuleModelName("d@\7f?@e`uVahW|y");
+      infraRequests0.setVolumeGroupName("$1");
+      infraRequests0.getResponseBody();
+      infraRequests0.getVnfParams();
+      infraRequests0.getRequestAction();
+      infraRequests0.setClientRequestId("N] J}ueWB9R)u");
+      infraRequests0.getVfModuleId();
+      infraRequests0.getNetworkType();
+      infraRequests0.getModifyTime();
+      infraRequests0.getNetworkId();
+      infraRequests0.getModifyTime();
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.setVnfOutputs("d@\7f?@e`uVahW|y");
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getRequestAction();
+      infraRequests0.getRequestAction();
+      infraRequests0.setVnfId("2dCOj.");
+      System.setCurrentTimeMillis(509L);
+      infraRequests0.getNetworkId();
+      infraRequests0.getProgress();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getVfModuleId();
+      infraRequests0.getProgress();
+      String string0 = infraRequests0.getAicNodeClli();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test032()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVfModuleName("");
+      infraRequests0.setVfModuleModelName("1Hr");
+      infraRequests0.setNetworkType("");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setSource("[@Z");
+      infraRequests0.setRequestBody(">!b;YwVyr(8");
+      infraRequests0.setRequestBody("[@Z");
+      infraRequests0.setServiceInstanceId("1Hr");
+      infraRequests0.setClientRequestId((String) null);
+      infraRequests0.setRequestAction(">!b;YwVyr(8");
+      infraRequests0.setVnfName(">!b;YwVyr(8");
+      infraRequests0.setAicCloudRegion("[@Z");
+      infraRequests0.setNetworkId("OU%$T'av6Ca'8.%");
+      infraRequests0.setCallBackUrl("1Hr");
+      infraRequests0.setServiceInstanceId("");
+      infraRequests0.setNetworkName("OU%$T'av6Ca'8.%");
+      infraRequests0.setNetworkName("gB~~7^R}E0VY*jjv");
+      infraRequests0.getSource();
+      infraRequests0.getLastModifiedBy();
+      infraRequests0.getVfModuleName();
+      String string0 = infraRequests0.getRequestStatus();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test033()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "c~]g[*");
+      infraRequests0.setServiceType("");
+      infraRequests0.setAaiServiceId("c~]g[*");
+      infraRequests0.setVnfType("8u=!kEh2}E<wR-=T3Eu");
+      infraRequests0.setAicNodeClli("c~]g[*");
+      infraRequests0.getVnfType();
+      infraRequests0.setVnfName("~x");
+      infraRequests0.setVnfOutputs("8u=!kEh2}E<wR-=T3Eu");
+      infraRequests0.setServiceType("");
+      infraRequests0.setVnfOutputs("CxZIOx,v-");
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getAicNodeClli();
+      assertEquals("c~]g[*", infraRequests0.getAction());
+      
+      infraRequests0.setAction("Z+$8\"UD&O@G");
+      assertEquals("", infraRequests0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test034()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      Timestamp timestamp0 = new Timestamp((-2655L));
+      infraRequests0.setModifyTime(timestamp0);
+      Timestamp timestamp1 = infraRequests0.getModifyTime();
+      timestamp1.after(timestamp0);
+      infraRequests0.setStartTime(timestamp1);
+      infraRequests0.getAaiServiceId();
+      infraRequests0.getRequestStatus();
+      infraRequests0.setRequestStatus("I1e1@rWiu`h-");
+      infraRequests0.setVolumeGroupName("I1e1@rWiu`h-");
+      infraRequests0.setAicNodeClli("H/;N:1&TC[5,}");
+      String string0 = infraRequests0.getClientRequestId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test035()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setNetworkType("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.getVnfOutputs();
+      infraRequests0.getProgress();
+      infraRequests0.setClientRequestId((String) null);
+      infraRequests0.setRequestAction("YN8");
+      infraRequests0.setProvStatus("");
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.getProvStatus();
+      infraRequests0.setRequestScope((String) null);
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getRequestScope();
+      infraRequests0.getServiceInstanceName();
+      infraRequests0.setVnfName((String) null);
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getTenantId();
+      infraRequests0.getNetworkId();
+      infraRequests0.setStatusMessage((String) null);
+      infraRequests0.setTenantId("org.openecomp.mso.requestsdb.InfraRequests");
+      // Undeclared exception!
+      try { 
+        Timestamp.valueOf((String) null);
+        fail("Expecting exception: IllegalArgumentException");
+      
+      } catch(IllegalArgumentException e) {
+         //
+         // null string
+         //
+         verifyException("java.sql.Timestamp", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test036()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getVolumeGroupId();
+      infraRequests0.setVnfParams("xeM>h;aPCLLMO/");
+      infraRequests0.setAaiServiceId("xeM>h;aPCLLMO/");
+      infraRequests0.setProvStatus("");
+      infraRequests0.setVfModuleId("xeM>h;aPCLLMO/");
+      infraRequests0.setVnfOutputs("");
+      infraRequests0.setAaiServiceId((String) null);
+      infraRequests0.setClientRequestId("S|%I {=}otjRfuQa8Ab");
+      infraRequests0.setRequestBody("S|%I {=}otjRfuQa8Ab");
+      infraRequests0.setModifyTime((Timestamp) null);
+      infraRequests0.getRequestBody();
+      infraRequests0.setAaiServiceId("");
+      infraRequests0.setRequestId("4_X\":Ety|S,O-RObu");
+      infraRequests0.getCorrelator();
+      infraRequests0.setVnfOutputs("%~+Mc");
+      infraRequests0.getVolumeGroupId();
+      infraRequests0.setVnfId("");
+      assertNull(infraRequests0.getStatusMessage());
+  }
+
+  @Test(timeout = 4000)
+  public void test037()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("org.openecomp.mso.requestsdb.InfraRequests", "YpJ&");
+      infraRequests0.setRequestType("");
+      infraRequests0.setSource("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.getNetworkId();
+      infraRequests0.getSource();
+      infraRequests0.setVfModuleName("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setRequestType((String) null);
+      infraRequests0.getStatusMessage();
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getVnfName();
+      infraRequests0.getModifyTime();
+      MockDate mockDate0 = new MockDate((-1949L));
+      Instant instant0 = mockDate0.toInstant();
+      Instant instant1 = MockInstant.plusSeconds(instant0, (-1949L));
+      Date.from(instant1);
+      infraRequests0.getRequestBody();
+      infraRequests0.getNetworkId();
+      infraRequests0.setModifyTime((Timestamp) null);
+      infraRequests0.getEndTime();
+      infraRequests0.getProvStatus();
+      infraRequests0.getRequestAction();
+      infraRequests0.getVfModuleName();
+      infraRequests0.getRequestAction();
+      assertEquals("YpJ&", infraRequests0.getAction());
+      assertEquals("org.openecomp.mso.requestsdb.InfraRequests", infraRequests0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test038()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setAicCloudRegion((String) null);
+      infraRequests0.setRequestType("_P-9");
+      infraRequests0.getRequestBody();
+      infraRequests0.setRequestStatus("");
+      infraRequests0.setCorrelator(".3!");
+      infraRequests0.setRequestId((String) null);
+      String string0 = infraRequests0.getRequestType();
+      assertEquals("_P-9", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test039()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setAaiServiceId("");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setVnfOutputs("]8N<");
+      infraRequests0.setVfModuleId("");
+      infraRequests0.setCorrelator("]8N<");
+      infraRequests0.setResponseBody("");
+      infraRequests0.setNetworkType("]8N<");
+      infraRequests0.getProgress();
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.getCallBackUrl();
+      infraRequests0.setServiceType("]8N<");
+      infraRequests0.getVnfId();
+      infraRequests0.setRequestAction("");
+      infraRequests0.setVnfName("");
+      infraRequests0.setVnfName("x'+i.S`");
+      infraRequests0.getTenantId();
+      infraRequests0.getAicCloudRegion();
+      infraRequests0.getTenantId();
+      infraRequests0.setStartTime((Timestamp) null);
+      infraRequests0.setRequestId("c");
+      infraRequests0.getRequestType();
+      infraRequests0.getEndTime();
+      infraRequests0.setModifyTime((Timestamp) null);
+      String string0 = infraRequests0.getVnfName();
+      assertEquals("x'+i.S`", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test040()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setNetworkId("8FcIWeVboHbH");
+      infraRequests0.setVnfId("");
+      infraRequests0.setStatusMessage("");
+      infraRequests0.getClientRequestId();
+      infraRequests0.setNetworkName((String) null);
+      infraRequests0.setVnfName((String) null);
+      infraRequests0.setCallBackUrl("sK9}!C'50J,");
+      infraRequests0.setVolumeGroupId("oC");
+      infraRequests0.getVnfOutputs();
+      infraRequests0.setVnfName("sK9}!C'50J,");
+      infraRequests0.setRequestScope("sK9}!C'50J,");
+      infraRequests0.getRequestAction();
+      infraRequests0.setVnfParams("oC");
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.setResponseBody((String) null);
+      infraRequests0.setNetworkId((String) null);
+      infraRequests0.setProvStatus("");
+      infraRequests0.setAicNodeClli("");
+      infraRequests0.getAaiServiceId();
+      infraRequests0.getCallBackUrl();
+      infraRequests0.getResponseBody();
+      infraRequests0.setAaiServiceId((String) null);
+      infraRequests0.getResponseBody();
+      infraRequests0.getEndTime();
+      infraRequests0.setModifyTime((Timestamp) null);
+      infraRequests0.getServiceType();
+      infraRequests0.setResponseBody("");
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.setRequestBody("J2E*wkiH'm}");
+      assertEquals("sK9}!C'50J,", infraRequests0.getCallBackUrl());
+  }
+
+  @Test(timeout = 4000)
+  public void test041()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestStatus("gUu8 g");
+      infraRequests0.setClientRequestId("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setVnfOutputs("");
+      infraRequests0.setResponseBody("");
+      infraRequests0.setVnfId("");
+      infraRequests0.setAaiServiceId("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setAicNodeClli("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setVnfParams("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setResponseBody("");
+      infraRequests0.getModifyTime();
+      infraRequests0.getVnfOutputs();
+      infraRequests0.getRequestStatus();
+      infraRequests0.setVfModuleId("GrYS{|<Q&Zg22qy+qi");
+      infraRequests0.setStartTime((Timestamp) null);
+      infraRequests0.getVnfOutputs();
+      String string0 = infraRequests0.getRequestAction();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test042()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setServiceInstanceId((String) null);
+      infraRequests0.setAction("niZk9/S^^Ok_H^a{");
+      infraRequests0.setVfModuleId("niZk9/S^^Ok_H^a{");
+      infraRequests0.setVolumeGroupId("");
+      infraRequests0.setNetworkId("");
+      infraRequests0.setVnfId("");
+      infraRequests0.setRequestType("\7f?_I%\7fo");
+      infraRequests0.setProvStatus("niZk9/S^^Ok_H^a{");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setServiceInstanceName("XA&Ybqzx\7f!ro6hEU");
+      infraRequests0.setLastModifiedBy("");
+      infraRequests0.setRequestId("");
+      infraRequests0.getRequestScope();
+      infraRequests0.getNetworkName();
+      infraRequests0.getVnfId();
+      infraRequests0.setAaiServiceId("");
+      infraRequests0.setTenantId("XA&Ybqzx\7f!ro6hEU");
+      infraRequests0.setVolumeGroupId("{O)c");
+      infraRequests0.getAction();
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getTenantId();
+      infraRequests0.setServiceInstanceId("");
+      assertNull(infraRequests0.getNetworkType());
+  }
+
+  @Test(timeout = 4000)
+  public void test043()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setTenantId("");
+      infraRequests0.setNetworkName("");
+      infraRequests0.setAction("");
+      Long long0 = new Long(210L);
+      Long.compare(1164L, 210L);
+      infraRequests0.setProgress(long0);
+      infraRequests0.setVfModuleName("");
+      Timestamp timestamp0 = new Timestamp(0L);
+      timestamp0.toInstant();
+      timestamp0.setTime(210L);
+      Instant instant0 = MockInstant.ofEpochMilli(210L);
+      timestamp0.toLocalDateTime();
+      Date.from(instant0);
+      infraRequests0.setModifyTime(timestamp0);
+      infraRequests0.setAicCloudRegion("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setRequestAction("qa^[z3j");
+      infraRequests0.setVnfType("");
+      infraRequests0.getEndTime();
+      infraRequests0.setVnfId("wI");
+      infraRequests0.getAicCloudRegion();
+      infraRequests0.setServiceType("");
+      infraRequests0.getAction();
+      Timestamp timestamp1 = infraRequests0.getStartTime();
+      assertNull(timestamp1);
+  }
+
+  @Test(timeout = 4000)
+  public void test044()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("y_J8g=Q8E|gns?USs", "~6yl5nFR7N_I'Tv@.");
+      infraRequests0.setCallBackUrl("_w^p*-dH4_6v");
+      infraRequests0.setVolumeGroupName("y_J8g=Q8E|gns?USs");
+      String string0 = infraRequests0.getAction();
+      assertEquals("~6yl5nFR7N_I'Tv@.", string0);
+      
+      InfraRequests infraRequests1 = new InfraRequests("S?cD1SU", "");
+      assertEquals("S?cD1SU", infraRequests1.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test045()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVolumeGroupName("");
+      infraRequests0.setServiceInstanceName("");
+      infraRequests0.setVfModuleName("");
+      infraRequests0.setStatusMessage("");
+      infraRequests0.setVnfName("GG-<o?t l");
+      infraRequests0.setVnfName("");
+      infraRequests0.setRequestBody("");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setRequestAction("");
+      infraRequests0.setVnfType("");
+      infraRequests0.setVnfId("");
+      infraRequests0.setServiceInstanceId("{CyVx7 >*vO|");
+      infraRequests0.setVnfId("");
+      infraRequests0.getProvStatus();
+      infraRequests0.setProvStatus("{CyVx7 >*vO|");
+      infraRequests0.setAicNodeClli("?g9!S#sMQWI4rg");
+      infraRequests0.setVnfParams("");
+      infraRequests0.setRequestAction("GG-<o?t l");
+      infraRequests0.getRequestType();
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getRequestAction();
+      infraRequests0.getRequestStatus();
+      InfraRequests infraRequests1 = new InfraRequests();
+      String string0 = infraRequests1.getServiceInstanceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test046()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setVnfName("");
+      infraRequests0.setServiceInstanceId("");
+      infraRequests0.setVolumeGroupId("");
+      infraRequests0.setNetworkId("?");
+      infraRequests0.setVnfName("");
+      infraRequests0.setServiceType("");
+      infraRequests0.setSource("");
+      infraRequests0.getRequestType();
+      InfraRequests infraRequests1 = new InfraRequests();
+      infraRequests1.setVolumeGroupName(")Na<;z");
+      infraRequests1.setRequestAction("");
+      infraRequests1.getAicNodeClli();
+      infraRequests1.setResponseBody((String) null);
+      infraRequests1.setVnfType((String) null);
+      infraRequests1.getVnfName();
+      infraRequests1.getVnfType();
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.setRequestType("");
+      infraRequests1.getVnfName();
+      infraRequests0.getRequestBody();
+      infraRequests1.getVnfType();
+      infraRequests1.setRequestAction("Yy");
+      infraRequests0.setVnfParams("DnrZ78}s");
+      infraRequests0.setServiceInstanceId("]V55Aq\u0003(z<Ct92L`F");
+      infraRequests1.setVfModuleName((String) null);
+      assertNull(infraRequests1.getNetworkId());
+  }
+
+  @Test(timeout = 4000)
+  public void test047()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.getAction();
+      infraRequests0.setVnfName("");
+      infraRequests0.getNetworkType();
+      infraRequests0.getVnfParams();
+      infraRequests0.setLastModifiedBy((String) null);
+      String string0 = infraRequests0.getAaiServiceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test048()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setNetworkType("");
+      infraRequests0.setStatusMessage("");
+      infraRequests0.setRequestAction("");
+      infraRequests0.setSource("");
+      infraRequests0.setVnfId((String) null);
+      infraRequests0.setLastModifiedBy((String) null);
+      infraRequests0.setVolumeGroupId((String) null);
+      infraRequests0.setRequestScope("");
+      infraRequests0.getServiceType();
+      infraRequests0.setRequestBody((String) null);
+      infraRequests0.getProgress();
+      infraRequests0.setVnfType((String) null);
+      infraRequests0.setSource((String) null);
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getStatusMessage();
+      infraRequests0.setResponseBody("");
+      infraRequests0.setRequestStatus((String) null);
+      infraRequests0.getAicCloudRegion();
+      Timestamp timestamp0 = new Timestamp(2519L);
+      infraRequests0.setEndTime(timestamp0);
+      String string0 = infraRequests0.getRequestBody();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test049()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("$V/<$XAp+o>Im\"*", "$V/<$XAp+o>Im\"*");
+      infraRequests0.setNetworkName("$V/<$XAp+o>Im\"*");
+      infraRequests0.setVnfName((String) null);
+      infraRequests0.setVfModuleId("");
+      infraRequests0.getServiceInstanceName();
+      infraRequests0.setAaiServiceId("");
+      infraRequests0.setRequestScope("");
+      infraRequests0.getAaiServiceId();
+      infraRequests0.getModifyTime();
+      infraRequests0.setNetworkName((String) null);
+      infraRequests0.setSource("");
+      infraRequests0.getRequestBody();
+      infraRequests0.setVnfType("");
+      infraRequests0.setStatusMessage("");
+      assertNull(infraRequests0.getVolumeGroupId());
+  }
+
+  @Test(timeout = 4000)
+  public void test050()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestStatus("");
+      infraRequests0.getServiceInstanceName();
+      infraRequests0.setRequestBody((String) null);
+      infraRequests0.getAction();
+      infraRequests0.setVnfParams("");
+      infraRequests0.setAction((String) null);
+      infraRequests0.getSource();
+      infraRequests0.getAicCloudRegion();
+      infraRequests0.getRequestType();
+      infraRequests0.getClientRequestId();
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.setResponseBody("");
+      infraRequests0.getVolumeGroupId();
+      infraRequests0.getRequestStatus();
+      infraRequests0.getRequestScope();
+      infraRequests0.setAicCloudRegion("");
+      Long long0 = new Long(0L);
+      Long.getLong("TQRm 6Q}I>x7UHTd!cH");
+      // Undeclared exception!
+      try { 
+        Long.remainderUnsigned((-1L), 0L);
+        fail("Expecting exception: ArithmeticException");
+      
+      } catch(ArithmeticException e) {
+         //
+         // BigInteger divide by zero
+         //
+         verifyException("java.math.MutableBigInteger", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test051()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setProvStatus("");
+      infraRequests0.setClientRequestId("");
+      infraRequests0.setVnfType("BJ@B");
+      infraRequests0.setProvStatus("");
+      infraRequests0.setRequestType("");
+      infraRequests0.setAaiServiceId("k^;d\7f!:UH+Z");
+      infraRequests0.setRequestType("");
+      infraRequests0.setTenantId("");
+      infraRequests0.getCallBackUrl();
+      InfraRequests infraRequests1 = new InfraRequests();
+      infraRequests1.setVnfName("C,,\"N");
+      infraRequests0.setVnfParams((String) null);
+      InfraRequests infraRequests2 = new InfraRequests("", "");
+      infraRequests1.setVolumeGroupId("");
+      infraRequests2.setTenantId("k^;d\7f!:UH+Z");
+      infraRequests1.setVfModuleName("");
+      infraRequests2.setVnfType("eDfR<b$HYx");
+      infraRequests2.setStatusMessage((String) null);
+      infraRequests2.setVnfId("");
+      infraRequests1.getVolumeGroupId();
+      infraRequests0.setAicCloudRegion("BJ@B");
+      infraRequests1.setNetworkType("");
+      String string0 = infraRequests2.getRequestBody();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test052()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setRequestStatus("");
+      infraRequests0.getAicNodeClli();
+      infraRequests0.setVolumeGroupName("=xQ^U6%j?LcGU");
+      infraRequests0.setVolumeGroupId("~L$J");
+      infraRequests0.setVnfOutputs("C");
+      infraRequests0.setVnfId("YU GUY+c}[>6+QI83q");
+      infraRequests0.setVfModuleName("");
+      infraRequests0.getRequestId();
+      infraRequests0.setVfModuleModelName("S9h\7f|[hF*h/aEBZ--");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.getVnfId();
+      infraRequests0.setVnfParams("");
+      infraRequests0.getSource();
+      infraRequests0.getVnfType();
+      InfraRequests infraRequests1 = new InfraRequests("", "");
+      infraRequests0.setAaiServiceId("S9h\7f|[hF*h/aEBZ--");
+      infraRequests0.setVnfParams("");
+      infraRequests1.getRequestBody();
+      Month month0 = Month.MARCH;
+      // Undeclared exception!
+      try { 
+        MockLocalDateTime.of(1, month0, 1, 1, 0, (-1068));
+        fail("Expecting exception: DateTimeException");
+      
+      } catch(DateTimeException e) {
+         //
+         // Invalid value for SecondOfMinute (valid values 0 - 59): -1068
+         //
+         verifyException("java.time.temporal.ValueRange", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test053()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setLastModifiedBy("M+YL/d");
+      infraRequests0.setCorrelator("M+YL/d");
+      infraRequests0.getLastModifiedBy();
+      Month month0 = Month.MAY;
+      // Undeclared exception!
+      try { 
+        MockLocalDateTime.of((-574), month0, (-574), (-574), 0);
+        fail("Expecting exception: DateTimeException");
+      
+      } catch(DateTimeException e) {
+         //
+         // Invalid value for DayOfMonth (valid values 1 - 28/31): -574
+         //
+         verifyException("java.time.temporal.ValueRange", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test054()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestType("");
+      infraRequests0.setEndTime((Timestamp) null);
+      Long long0 = new Long(0L);
+      Long.compare(0L, 0L);
+      Long.min(0L, 0L);
+      infraRequests0.setProvStatus("");
+      Long.compare(0L, 0L);
+      Long.max(0, 0L);
+      Long.divideUnsigned((-1239L), 561L);
+      Long.divideUnsigned(0, 31L);
+      Long.sum(0, 31L);
+      Long.getLong("}'{?rnxwE~m.*b/<", (-2588L));
+      infraRequests0.setProgress(long0);
+      infraRequests0.setProvStatus("");
+      infraRequests0.setVnfParams("");
+      infraRequests0.setRequestScope("Gz0xF^~M`");
+      infraRequests0.setRequestType("");
+      infraRequests0.getAaiServiceId();
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setNetworkName("");
+      infraRequests0.setRequestStatus("No\7f<5t");
+      infraRequests0.setVolumeGroupId("");
+      infraRequests0.getEndTime();
+      infraRequests0.getProgress();
+      String string0 = infraRequests0.getRequestScope();
+      assertEquals("Gz0xF^~M`", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test055()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("K66EFm]%0}Hi", "K66EFm]%0}Hi");
+      infraRequests0.setVnfName("K66EFm]%0}Hi");
+      infraRequests0.getVfModuleModelName();
+      infraRequests0.getProgress();
+      infraRequests0.setStatusMessage("K66EFm]%0}Hi");
+      infraRequests0.setVolumeGroupId((String) null);
+      infraRequests0.setVolumeGroupName("K66EFm]%0}Hi");
+      infraRequests0.setRequestBody("J1UB");
+      assertNull(infraRequests0.getResponseBody());
+  }
+
+  @Test(timeout = 4000)
+  public void test056()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "UwUvkc");
+      infraRequests0.setVolumeGroupName("UwUvkc");
+      infraRequests0.getVfModuleId();
+      ZoneOffset zoneOffset0 = ZoneOffset.MIN;
+      ZoneOffset zoneOffset1 = (ZoneOffset)ZoneId.ofOffset("", zoneOffset0);
+      LocalDateTime localDateTime0 = MockLocalDateTime.now((ZoneId) zoneOffset1);
+      Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
+      infraRequests0.setModifyTime(timestamp0);
+      String string0 = infraRequests0.getRequestId();
+      assertEquals("", string0);
+      
+      infraRequests0.getCorrelator();
+      assertEquals("UwUvkc", infraRequests0.getAction());
+  }
+
+  @Test(timeout = 4000)
+  public void test057()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getVnfName();
+      infraRequests0.setAction((String) null);
+      infraRequests0.getVfModuleName();
+      infraRequests0.getNetworkId();
+      infraRequests0.getVnfId();
+      infraRequests0.setRequestId((String) null);
+      infraRequests0.setNetworkId((String) null);
+      infraRequests0.setRequestStatus((String) null);
+      infraRequests0.setAaiServiceId("wL6o_:EmO)#");
+      infraRequests0.setSource((String) null);
+      infraRequests0.setVnfType("yMKDqB`W?]q");
+      infraRequests0.setRequestType((String) null);
+      infraRequests0.setRequestType("");
+      infraRequests0.setRequestScope((String) null);
+      infraRequests0.getVfModuleName();
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getSource();
+      infraRequests0.setAicCloudRegion((String) null);
+      infraRequests0.getSource();
+      infraRequests0.getRequestBody();
+      infraRequests0.getAaiServiceId();
+      infraRequests0.setVnfType((String) null);
+      String string0 = infraRequests0.getClientRequestId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test058()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setSource("c");
+      infraRequests0.setRequestType("*Q}l.yW`VI`i_Q8YL]");
+      infraRequests0.setRequestId("");
+      infraRequests0.setCorrelator("Y;5!~N0v@x");
+      infraRequests0.setNetworkType("");
+      infraRequests0.setRequestAction("Y;5!~N0v@x");
+      infraRequests0.setLastModifiedBy("");
+      infraRequests0.setSource("");
+      infraRequests0.setAction("");
+      infraRequests0.setTenantId("");
+      infraRequests0.setAicCloudRegion("");
+      infraRequests0.getRequestScope();
+      infraRequests0.setAicNodeClli("Y;5!~N0v@x");
+      infraRequests0.getAicCloudRegion();
+      infraRequests0.setVnfId("qn|b,'x[1 h*z\"#h");
+      assertNull(infraRequests0.getRequestScope());
+  }
+
+  @Test(timeout = 4000)
+  public void test059()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setVnfType("SRPBs.zeX&dK@\7f&XRQj");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setVnfType("%a26GFoFhBEe");
+      infraRequests0.setServiceInstanceName((String) null);
+      infraRequests0.setVfModuleName((String) null);
+      infraRequests0.getLastModifiedBy();
+      infraRequests0.getVnfType();
+      String string0 = infraRequests0.getServiceInstanceName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test060()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getEndTime();
+      MockDate mockDate0 = new MockDate(965L);
+      Instant instant0 = mockDate0.toInstant();
+      Date.from(instant0);
+      infraRequests0.setEndTime((Timestamp) null);
+      infraRequests0.getEndTime();
+      infraRequests0.getCorrelator();
+      Long long0 = new Long(965L);
+      infraRequests0.setProgress(long0);
+      String string0 = infraRequests0.getTenantId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test061()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("qx?)", "qx?)");
+      Timestamp timestamp0 = new Timestamp(1390L);
+      infraRequests0.setStartTime(timestamp0);
+      infraRequests0.getRequestScope();
+      infraRequests0.setVolumeGroupId("qx?)");
+      infraRequests0.getVolumeGroupId();
+      infraRequests0.setProvStatus((String) null);
+      timestamp0.setNanos(0);
+      infraRequests0.setCorrelator("");
+      infraRequests0.setVnfOutputs("");
+      infraRequests0.setModifyTime(timestamp0);
+      infraRequests0.getServiceType();
+      infraRequests0.setVolumeGroupName("5#&B!D");
+      infraRequests0.setVfModuleId("a");
+      infraRequests0.setNetworkName("a");
+      infraRequests0.getClientRequestId();
+      infraRequests0.setRequestScope("qx?)");
+      infraRequests0.setVolumeGroupName((String) null);
+      infraRequests0.getRequestId();
+      infraRequests0.setRequestScope("-W#aB<Km<U(");
+      infraRequests0.getVnfParams();
+      infraRequests0.getServiceInstanceName();
+      infraRequests0.getCorrelator();
+      infraRequests0.setAicNodeClli("");
+      infraRequests0.setAction("");
+      infraRequests0.setStartTime(timestamp0);
+      assertNull(infraRequests0.getServiceInstanceName());
+  }
+
+  @Test(timeout = 4000)
+  public void test062()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("N.Z5|phE", "");
+      infraRequests0.getClientRequestId();
+      assertEquals("N.Z5|phE", infraRequests0.getRequestId());
+      assertEquals("", infraRequests0.getAction());
+  }
+
+  @Test(timeout = 4000)
+  public void test063()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "\7fh.");
+      infraRequests0.setRequestStatus("");
+      infraRequests0.getVnfParams();
+      infraRequests0.setNetworkType("");
+      assertEquals("\7fh.", infraRequests0.getAction());
+      assertEquals("", infraRequests0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test064()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setRequestType("");
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.setVnfParams("`jECciBa[T7M");
+      infraRequests0.setRequestBody("4ap}Bu0R,P");
+      String string0 = infraRequests0.getRequestType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test065()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      String string0 = infraRequests0.getAicCloudRegion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test066()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("org.openecomp.mso.requestsdb.InfraRequests", "org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setRequestStatus("");
+      infraRequests0.getResponseBody();
+      String string0 = infraRequests0.getRequestAction();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test067()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", (String) null);
+      infraRequests0.setNetworkId("x^qIF~ru");
+      infraRequests0.setServiceInstanceId("IL'5l;^7N^;>0");
+      infraRequests0.setLastModifiedBy("h dET");
+      infraRequests0.setVfModuleModelName("h dET");
+      infraRequests0.setVnfType("");
+      infraRequests0.setVfModuleId("");
+      infraRequests0.setVfModuleName("");
+      infraRequests0.setClientRequestId("");
+      infraRequests0.setVnfId("W1Vd+");
+      infraRequests0.getVnfName();
+      infraRequests0.getNetworkType();
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.setNetworkName("o-");
+      assertNull(infraRequests0.getServiceType());
+  }
+
+  @Test(timeout = 4000)
+  public void test068()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("4E!AHGB", "");
+      infraRequests0.getRequestStatus();
+      String string0 = infraRequests0.getRequestId();
+      assertEquals("4E!AHGB", string0);
+      
+      infraRequests0.setRequestScope("F");
+      infraRequests0.getVfModuleId();
+      infraRequests0.setAicNodeClli("zM\7f4bS");
+      infraRequests0.setServiceInstanceName("4E!AHGB");
+      infraRequests0.setServiceType("");
+      infraRequests0.getVnfType();
+      infraRequests0.setAicNodeClli((String) null);
+      assertEquals("", infraRequests0.getAction());
+  }
+
+  @Test(timeout = 4000)
+  public void test069()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setServiceInstanceName("}<+55QA6'/xzr");
+      infraRequests0.getModifyTime();
+      infraRequests0.getProvStatus();
+      infraRequests0.setVnfOutputs("");
+      infraRequests0.getAction();
+      infraRequests0.setAicCloudRegion("~W -^JP41(-Dg'.+|p$");
+      assertNull(infraRequests0.getServiceType());
+  }
+
+  @Test(timeout = 4000)
+  public void test070()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setAaiServiceId("PJ60cl#^59FDR_>aLqF");
+      infraRequests0.setLastModifiedBy("PJ60cl#^59FDR_>aLqF");
+      infraRequests0.setCorrelator("");
+      infraRequests0.getNetworkType();
+      infraRequests0.setAaiServiceId("PJ60cl#^59FDR_>aLqF");
+      infraRequests0.getAicNodeClli();
+      String string0 = infraRequests0.getVnfType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test071()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests(" ?)Ec.r]zDe6pa).i", "LZP&!xPsP /f");
+      infraRequests0.setVnfType("5YWNFYfj=3.[9u?N");
+      infraRequests0.setSource("LZP&!xPsP /f");
+      infraRequests0.setVfModuleName("9");
+      infraRequests0.getVnfId();
+      Timestamp timestamp0 = new Timestamp(2083L);
+      LocalDateTime localDateTime0 = timestamp0.toLocalDateTime();
+      Timestamp timestamp1 = Timestamp.valueOf(localDateTime0);
+      infraRequests0.setModifyTime(timestamp1);
+      infraRequests0.getCorrelator();
+      infraRequests0.getEndTime();
+      assertEquals(" ?)Ec.r]zDe6pa).i", infraRequests0.getRequestId());
+      assertEquals("LZP&!xPsP /f", infraRequests0.getAction());
+  }
+
+  @Test(timeout = 4000)
+  public void test072()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVnfId("");
+      String string0 = infraRequests0.getVnfId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test073()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setAaiServiceId("");
+      String string0 = infraRequests0.getServiceType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test074()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVolumeGroupName("");
+      String string0 = infraRequests0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test075()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVnfOutputs("");
+      infraRequests0.setNetworkId("RU^6`fci#/");
+      infraRequests0.getVolumeGroupId();
+      infraRequests0.getModifyTime();
+      infraRequests0.setVnfType((String) null);
+      String string0 = infraRequests0.getNetworkName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test076()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      Long long0 = new Long((-1725L));
+      infraRequests0.setProgress(long0);
+      Long long1 = infraRequests0.getProgress();
+      assertEquals((-1725L), (long)long1);
+  }
+
+  @Test(timeout = 4000)
+  public void test077()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("\"}G", "");
+      Timestamp timestamp0 = new Timestamp((-231L));
+      infraRequests0.setModifyTime(timestamp0);
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.getVnfName();
+      infraRequests0.setVfModuleName("org.openecomp.mso.requestsdb.InfraRequests");
+      assertEquals("\"}G", infraRequests0.getRequestId());
+      assertEquals("", infraRequests0.getAction());
+  }
+
+  @Test(timeout = 4000)
+  public void test078()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getAicNodeClli();
+      infraRequests0.getAicNodeClli();
+      String string0 = infraRequests0.getVnfOutputs();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test079()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      InfraRequests infraRequests1 = new InfraRequests();
+      infraRequests1.getEndTime();
+      infraRequests0.setStartTime((Timestamp) null);
+      infraRequests0.setTenantId("#X=o2\7f!~:^_LF!mu%");
+      assertNull(infraRequests0.getVfModuleModelName());
+  }
+
+  @Test(timeout = 4000)
+  public void test080()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getNetworkId();
+      infraRequests0.setRequestAction((String) null);
+      infraRequests0.getSource();
+      infraRequests0.setVnfOutputs("5K\u0002}.V3dm%yU_&r");
+      assertNull(infraRequests0.getRequestScope());
+  }
+
+  @Test(timeout = 4000)
+  public void test081()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests((String) null, "org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.setVfModuleName((String) null);
+      infraRequests0.setServiceType("org.openecomp.mso.requestsdb.InfraRequests");
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.getRequestId();
+      infraRequests0.getVolumeGroupId();
+      String string0 = infraRequests0.getNetworkType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test082()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVolumeGroupId("<LXzO");
+      assertNull(infraRequests0.getRequestType());
+  }
+
+  @Test(timeout = 4000)
+  public void test083()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setRequestAction("");
+      infraRequests0.setServiceInstanceId("");
+      infraRequests0.setAicNodeClli("");
+      assertNull(infraRequests0.getServiceType());
+  }
+
+  @Test(timeout = 4000)
+  public void test084()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "Z={83xlme_b)?zb8");
+      infraRequests0.setSource("");
+      infraRequests0.getStartTime();
+      infraRequests0.getSource();
+      infraRequests0.getModifyTime();
+      assertEquals("Z={83xlme_b)?zb8", infraRequests0.getAction());
+      assertEquals("", infraRequests0.getRequestId());
+  }
+
+  @Test(timeout = 4000)
+  public void test085()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVnfName("d(8}Oc 4|@w8hBNICH");
+      infraRequests0.setRequestScope("d(8}Oc 4|@w8hBNICH");
+      String string0 = infraRequests0.getAaiServiceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test086()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setVfModuleId("b\7fS&'!@{LdL0&");
+      infraRequests0.setRequestStatus("b\7fS&'!@{LdL0&");
+      infraRequests0.setRequestAction((String) null);
+      infraRequests0.setVfModuleModelName("z");
+      infraRequests0.getSource();
+      infraRequests0.getServiceInstanceName();
+      infraRequests0.getVnfName();
+      String string0 = infraRequests0.getAction();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test087()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getRequestType();
+      infraRequests0.setVnfOutputs((String) null);
+      infraRequests0.getCorrelator();
+      infraRequests0.setCallBackUrl((String) null);
+      infraRequests0.setVnfParams(">'n");
+      assertNull(infraRequests0.getVfModuleModelName());
+  }
+
+  @Test(timeout = 4000)
+  public void test088()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("I\"as", (String) null);
+      infraRequests0.getVolumeGroupName();
+      infraRequests0.getRequestBody();
+      infraRequests0.setTenantId((String) null);
+      infraRequests0.getResponseBody();
+      // Undeclared exception!
+      try { 
+        MockURI.create((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("java.net.URI$Parser", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test089()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "");
+      infraRequests0.setResponseBody("");
+      infraRequests0.setRequestId("");
+      infraRequests0.setNetworkId("");
+      infraRequests0.getEndTime();
+      infraRequests0.getVolumeGroupId();
+      String string0 = infraRequests0.getStatusMessage();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test090()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests((String) null, "&6KF");
+      infraRequests0.setRequestBody("&6KF");
+      assertNull(infraRequests0.getRequestScope());
+  }
+
+  @Test(timeout = 4000)
+  public void test091()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("/WcV", "/WcV");
+      infraRequests0.setVnfParams("\"w");
+      String string0 = infraRequests0.getVnfParams();
+      assertEquals("\"w", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test092()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests(">?ozK", ">?ozK");
+      infraRequests0.setVnfOutputs(">?ozK");
+      infraRequests0.setVnfId("");
+      infraRequests0.getLastModifiedBy();
+      infraRequests0.setAicCloudRegion((String) null);
+      infraRequests0.setProvStatus(">?ozK");
+      infraRequests0.setStatusMessage((String) null);
+      String string0 = infraRequests0.getRequestScope();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test093()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setEndTime((Timestamp) null);
+      infraRequests0.setRequestType("");
+      assertNull(infraRequests0.getProvStatus());
+  }
+
+  @Test(timeout = 4000)
+  public void test094()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "Z={83xlme_b)?zb8");
+      infraRequests0.getStartTime();
+  }
+
+  @Test(timeout = 4000)
+  public void test095()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      String string0 = infraRequests0.getRequestStatus();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test096()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("gpXsJ>b/G", "gpXsJ>b/G");
+      infraRequests0.setClientRequestId("gpXsJ>b/G");
+      infraRequests0.setCallBackUrl("");
+      infraRequests0.setNetworkType("TF3Cf[F..K");
+      assertNull(infraRequests0.getAicNodeClli());
+  }
+
+  @Test(timeout = 4000)
+  public void test097()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getVfModuleName();
+      infraRequests0.setAicCloudRegion((String) null);
+      String string0 = infraRequests0.getVnfName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test098()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.setNetworkName("K|it");
+      infraRequests0.setAction("hc}j,");
+      infraRequests0.getServiceInstanceId();
+      infraRequests0.getCallBackUrl();
+      String string0 = infraRequests0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test099()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      String string0 = infraRequests0.getServiceInstanceId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test100()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      infraRequests0.getProvStatus();
+      String string0 = infraRequests0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test101()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests();
+      String string0 = infraRequests0.getCallBackUrl();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test102()  throws Throwable  {
+      InfraRequests infraRequests0 = new InfraRequests("", "j28UDln3go*x");
+      assertEquals("j28UDln3go*x", infraRequests0.getAction());
+      
+      infraRequests0.setAction("X;{A n=y");
+      infraRequests0.setTenantId("");
+      assertEquals("", infraRequests0.getRequestId());
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraRequestsESTestscaffolding.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/InfraRequestsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..9ab77f5
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Wed Dec 14 15:15:48 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
+
+@EvoSuiteClassExclude
+public class InfraRequestsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.requestsdb.InfraRequests"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(InfraRequestsESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.requestsdb.InfraRequests"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(InfraRequestsESTestscaffolding.class.getClassLoader()); 
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.requestsdb.InfraRequests"
+    );
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/RequestsDatabaseESTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/RequestsDatabaseESTest.java
new file mode 100644 (file)
index 0000000..7c1b399
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Wed Dec 14 15:15:27 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.junit.runner.RunWith;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RequestsDatabaseESTest extends RequestsDatabaseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      RequestsDatabase requestsDatabase0 = (RequestsDatabase)PrivateAccess.callDefaultConstructorOfTheClassUnderTest();
+      assertNotNull(requestsDatabase0);
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/RequestsDatabaseESTestscaffolding.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/RequestsDatabaseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..6d5c31f
--- /dev/null
@@ -0,0 +1,120 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Wed Dec 14 15:15:27 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
+
+@EvoSuiteClassExclude
+public class RequestsDatabaseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.requestsdb.RequestsDatabase"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RequestsDatabaseESTestscaffolding.class.getClassLoader() ,
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.hibernate.engine.spi.Mapping",
+      "org.hibernate.criterion.Order",
+      "org.openecomp.mso.requestsdb.InfraRequests",
+      "org.openecomp.mso.requestsdb.HibernateUtil",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.hibernate.Query",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.requestsdb.RequestsDatabase",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.hibernate.criterion.Criterion",
+      "org.openecomp.mso.requestsdb.InfraActiveRequests",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.hibernate.SessionFactory",
+      "com.att.eelf.configuration.EELFManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.openecomp.mso.entity.MsoRequest",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.hibernate.BasicQueryContract",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.requestsdb.MockRequestsDatabase",
+      "org.openecomp.mso.requestsdb.SiteStatus",
+      "org.openecomp.mso.logger.MsoLogger"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RequestsDatabaseESTestscaffolding.class.getClassLoader()); 
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.openecomp.mso.requestsdb.HibernateUtil",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.requestsdb.RequestsDatabase"
+    );
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/SiteStatusESTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/SiteStatusESTest.java
new file mode 100644 (file)
index 0000000..75d7b19
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Wed Dec 14 15:16:15 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import java.sql.Timestamp;
+import java.time.Instant;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.mock.java.time.MockInstant;
+import org.junit.runner.RunWith;
+import org.openecomp.mso.requestsdb.SiteStatus;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class SiteStatusESTest extends SiteStatusESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      siteStatus0.setSiteName("\7fh8w;\7f`)o;(SRi+0Q-");
+      String string0 = siteStatus0.getSiteName();
+      assertEquals("\7fh8w;\7f`)o;(SRi+0Q-", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      siteStatus0.setSiteName("");
+      String string0 = siteStatus0.getSiteName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      Timestamp timestamp0 = new Timestamp((-1L));
+      siteStatus0.setCreated(timestamp0);
+      Timestamp timestamp1 = siteStatus0.getCreated();
+      assertSame(timestamp1, timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      Instant instant0 = MockInstant.ofEpochSecond(5121L);
+      Timestamp timestamp0 = Timestamp.from(instant0);
+      siteStatus0.setCreated(timestamp0);
+      Timestamp timestamp1 = siteStatus0.getCreated();
+      assertEquals(0, timestamp1.getNanos());
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      boolean boolean0 = siteStatus0.getStatus();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      String string0 = siteStatus0.getSiteName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      siteStatus0.setStatus(true);
+      boolean boolean0 = siteStatus0.getStatus();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      String string0 = siteStatus0.toString();
+      assertEquals("SiteStatus{status=false, siteName='null', created=null}", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      SiteStatus siteStatus0 = new SiteStatus();
+      Timestamp timestamp0 = siteStatus0.getCreated();
+      assertNull(timestamp0);
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/SiteStatusESTestscaffolding.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/SiteStatusESTestscaffolding.java
new file mode 100644 (file)
index 0000000..2d50450
--- /dev/null
@@ -0,0 +1,105 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Wed Dec 14 15:16:15 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
+
+@EvoSuiteClassExclude
+public class SiteStatusESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.requestsdb.SiteStatus"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(SiteStatusESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.openecomp.mso.entity.MsoRequest",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.requestsdb.SiteStatus",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(SiteStatusESTestscaffolding.class.getClassLoader()); 
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.requestsdb.SiteStatus"
+    );
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapterESTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapterESTest.java
new file mode 100644 (file)
index 0000000..ea32389
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Wed Dec 14 15:14:31 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb.adapter;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+import java.sql.Timestamp;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+import org.openecomp.mso.requestsdb.adapter.TimestampXMLAdapter;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class TimestampXMLAdapterESTest extends TimestampXMLAdapterESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      TimestampXMLAdapter timestampXMLAdapter0 = new TimestampXMLAdapter();
+      Long long0 = new Long((-3027L));
+      Timestamp timestamp0 = timestampXMLAdapter0.unmarshal(long0);
+      Long long1 = timestampXMLAdapter0.marshal(timestamp0);
+      assertTrue(long1.equals((Object)long0));
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      TimestampXMLAdapter timestampXMLAdapter0 = new TimestampXMLAdapter();
+      Long long0 = new Long(861L);
+      Timestamp timestamp0 = timestampXMLAdapter0.unmarshal(long0);
+      Long long1 = timestampXMLAdapter0.marshal(timestamp0);
+      assertEquals(861L, (long)long1);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      TimestampXMLAdapter timestampXMLAdapter0 = new TimestampXMLAdapter();
+      try { 
+        timestampXMLAdapter0.marshal((Timestamp) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.requestsdb.adapter.TimestampXMLAdapter", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      TimestampXMLAdapter timestampXMLAdapter0 = new TimestampXMLAdapter();
+      Timestamp timestamp0 = timestampXMLAdapter0.unmarshal((Long) null);
+      Long long0 = timestampXMLAdapter0.marshal(timestamp0);
+      assertEquals(0L, (long)long0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      TimestampXMLAdapter timestampXMLAdapter0 = new TimestampXMLAdapter();
+      Long long0 = new Long(497L);
+      Timestamp timestamp0 = timestampXMLAdapter0.unmarshal(long0);
+      Long long1 = timestampXMLAdapter0.marshal(timestamp0);
+      assertEquals(497L, (long)long1);
+  }
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapterESTestscaffolding.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/adapter/TimestampXMLAdapterESTestscaffolding.java
new file mode 100644 (file)
index 0000000..0fdfcd2
--- /dev/null
@@ -0,0 +1,77 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Wed Dec 14 15:14:31 GMT 2016
+ */
+
+package org.openecomp.mso.requestsdb.adapter;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
+
+@EvoSuiteClassExclude
+public class TimestampXMLAdapterESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.requestsdb.adapter.TimestampXMLAdapter"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(TimestampXMLAdapterESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.requestsdb.adapter.TimestampXMLAdapter"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-api-handlers/pom.xml b/mso-api-handlers/pom.xml
new file mode 100644 (file)
index 0000000..87d6453
--- /dev/null
@@ -0,0 +1,32 @@
+<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.openecomp</groupId>
+               <artifactId>mso</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>mso-api-handlers</artifactId>
+       <name>API Handler</name>
+       <description>API Handler for MSO</description>
+       <packaging>pom</packaging>
+
+       <modules>
+               <module>mso-requests-db</module>
+               <module>mso-api-handler-common</module>
+               <module>mso-api-handler-infra</module>
+       </modules>
+       
+       <dependencies>
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpcore</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpclient</artifactId>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/mso-catalog-db/README b/mso-catalog-db/README
new file mode 100644 (file)
index 0000000..cc34288
--- /dev/null
@@ -0,0 +1 @@
+This package contains the Catalog Database hibernate configuration and supporting classes.\r
diff --git a/mso-catalog-db/pom.xml b/mso-catalog-db/pom.xml
new file mode 100644 (file)
index 0000000..fdb6cc1
--- /dev/null
@@ -0,0 +1,157 @@
+<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.openecomp</groupId>
+               <artifactId>mso</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.openecomp.mso</groupId>
+       <artifactId>mso-catalog-db</artifactId>
+       <name>mso-catalog-db</name>
+       <description>MSO Catalog Database definition and Hibernate objects</description>
+
+       <build>
+               <finalName>${project.artifactId}</finalName>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.3</version>
+                               <configuration>
+                                       <warSourceDirectory>WebContent</warSourceDirectory>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>de.juplo</groupId>
+                               <artifactId>hibernate4-maven-plugin</artifactId>
+                               <version>1.1.0</version>
+                               <executions>
+                                       <!-- MySQL -->
+                                       <execution>
+                                               <id>MySQL</id>
+                                               <goals>
+                                                       <goal>export</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <hibernateDialect>org.hibernate.dialect.MySQL5Dialect</hibernateDialect>
+                                                       <hibernateMapping>${project.basedir}/src/main/resources/HeatEnvironment.hbm.xml,${project.basedir}/src/main/resources/HeatNestedTemplate.hbm.xml,${project.basedir}/src/main/resources/HeatTemplate.hbm.xml,${project.basedir}/src/main/resources/NetworkResource.hbm.xml,${project.basedir}/src/main/resources/NetworkRecipe.hbm.xml,${project.basedir}/src/main/resources/Service.hbm.xml,${project.basedir}/src/main/resources/VnfRecipe.hbm.xml,${project.basedir}/src/main/resources/VnfResource.hbm.xml,${project.basedir}/src/main/resources/VnfComponent.hbm.xml,${project.basedir}/src/main/resources/VnfComponentsRecipe.hbm.xml,${project.basedir}/src/main/resources/VfModule.hbm.xml,${project.basedir}/src/main/resources/VfModuleToHeatFiles.hbm.xml</hibernateMapping>
+                                                       <target>SCRIPT</target>
+                                                       <skip>false</skip>
+                                                       <force>true</force>
+                                                       <outputFile>${project.build.directory}/MySQL-Catalog-schema.sql</outputFile>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                          <plugin>
+                    <artifactId>maven-resources-plugin</artifactId>
+                    <version>3.0.1</version>
+                    <executions>
+                      
+                        <execution>
+                            <id>copy-sql-file</id>
+                            <phase>install</phase>
+                            <goals>
+                                <goal>copy-resources</goal>
+                            </goals>
+                            <configuration>
+                               <overwrite>true</overwrite>
+                                
+                                <outputDirectory>${project.basedir}/../packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/main-schemas</outputDirectory>
+                      
+                                <resources>
+                                    <resource>
+                                      <directory>${project.build.directory}</directory>
+                                      <filtering>false</filtering>
+                                      <includes>
+                                           <include>*.sql</include>
+                                      </includes>
+                                    </resource>
+                                </resources>              
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                               <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       <artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               <pluginExecution>
+                                                                       <pluginExecutionFilter>
+                                                                               <groupId>de.juplo</groupId>
+                                                                               <artifactId>
+                                                                                       hibernate4-maven-plugin
+                                                                               </artifactId>
+                                                                               <versionRange>
+                                                                                       [1.0.3,)
+                                                                               </versionRange>
+                                                                               <goals>
+                                                                                       <goal>export</goal>
+                                                                               </goals>
+                                                                       </pluginExecutionFilter>
+                                                                       <action>
+                                                                               <ignore></ignore>
+                                                                       </action>
+                                                               </pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.hibernate</groupId>
+                       <artifactId>hibernate-core</artifactId>
+                       <version>4.3.6.Final</version>
+                       <exclusions>
+                               <!-- Avoid hibernate inclusion as provided in Jboss -->
+                               <exclusion>
+                                       <groupId>org.jboss</groupId>
+                                       <artifactId>jandex</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.javassist</groupId>
+                                       <artifactId>javassist</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.jboss.logging</groupId>
+                                       <artifactId>jboss-logging</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.jboss.logging</groupId>
+                                       <artifactId>jboss-logging-annotations</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.jboss.spec.javax.transaction</groupId>
+                                       <artifactId>jboss-transaction-api_1.2_spec</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>antlr</groupId>
+                                       <artifactId>antlr</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>dom4j</groupId>
+                                       <artifactId>dom4j</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>common</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
new file mode 100644 (file)
index 0000000..35158a4
--- /dev/null
@@ -0,0 +1,1838 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog;
+
+import java.io.Closeable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.openecomp.mso.db.catalog.beans.*;
+import org.hibernate.HibernateException;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.service.ServiceRegistry;
+import org.hibernate.service.ServiceRegistryBuilder;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+/**
+ * This class encapsulates all of the objects that can be queried from a Catalog database.
+ * Clients must use these methods to retrieve catalog objects. The session is not
+ * available for clients to do their own direct queries to the database.
+ *
+ *
+ */
+public class CatalogDatabase implements Closeable {
+
+    private static final String NETWORK_TYPE = "networkType";
+    private static final String ACTION = "action";
+    private static final String VNF_TYPE = "vnfType";
+    private static final String SERVICE_TYPE = "serviceType";
+    private static final String VNF_COMPONENT_TYPE = "vnfComponentType";
+    private static final String MODEL_NAME = "modelName";
+    private static final String TYPE = "type";
+    private static final String VF_MODULE_ID = "vfModuleId";
+    private static boolean initialized = false;
+    private static SessionFactory sessionFactory;
+    private static ServiceRegistry serviceRegistry;
+
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
+
+    private Session session = null;
+
+    public CatalogDatabase () {
+    }
+
+
+    private Session getSession () {
+        if (!initialized) {
+            LOGGER.debug ("Initializing Catalog Database in Hibernate");
+            Configuration configuration = null;
+            try {
+                       if ("MYSQL".equals (System.getProperty ("mso.db"))
+                            || "MARIADB".equals (System.getProperty ("mso.db"))) {
+                        configuration = new Configuration ().configure ("hibernate-catalog-mysql.cfg.xml");
+
+                        serviceRegistry = new ServiceRegistryBuilder ().applySettings (configuration.getProperties ()).buildServiceRegistry ();
+
+                        sessionFactory = configuration.buildSessionFactory (serviceRegistry);
+                    } else {
+                       LOGGER.error (MessageEnum.APIH_DB_ACCESS_EXC_REASON, "DB Connection not specified to the JVM,choose either:-Dmso.db=MARIADB, -Dmso.db=MYSQL or -Dmso.container=AJSC", "", "", MsoLogger.ErrorCode.DataError, "DB Connection not specified to the JVM,choose either:-Dmso.db=MARIADB, -Dmso.db=MYSQL or -Dmso.container=AJSC");
+                    }
+            } catch (Exception e) {
+                LOGGER.error (MessageEnum.GENERAL_EXCEPTION_ARG,
+                              "Catalog DB initialization issue: " + e.getMessage (), "", "", MsoLogger.ErrorCode.DataError, "Catalog DB initialization issue: " + e.getMessage (), e);
+                throw e;
+            }
+            initialized = true;
+
+            LOGGER.debug ("Catalog Database initialization complete");
+        }
+
+        if (session == null) {
+            try {
+                session = sessionFactory.openSession ();
+                session.beginTransaction ();
+            } catch (HibernateException he) {
+                LOGGER.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Error creating Hibernate Session: " + he, "", "", MsoLogger.ErrorCode.DataError, "Error creating Hibernate Session: " + he);
+                throw he;
+            }
+        }
+
+        return session;
+    }
+
+    /**
+     * Close an open Catalog Database session.
+     * This method should always be called when a client is finished using a
+     * CatalogDatabase instance.
+     */
+    @Override
+    public void close () {
+        if (session != null) {
+            session.close ();
+            session = null;
+        }
+    }
+
+    /**
+     * Commits the current transaction on this session and starts a fresh one.
+     */
+    public void commit () {
+        getSession ().getTransaction ().commit ();
+        getSession ().beginTransaction ();
+    }
+
+    /**
+     * Rolls back current transaction and starts a fresh one.
+     */
+    public void rollback () {
+        getSession ().getTransaction ().rollback ();
+        getSession ().beginTransaction ();
+    }
+
+    /**
+     * Return all Heat Templates in the Catalog DB
+     *
+     * @return A list of HeatTemplate objects
+     */
+    @SuppressWarnings("unchecked")
+    public List <HeatTemplate> getAllHeatTemplates () {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get all Heat templates");
+        String hql = "FROM HeatTemplate";
+        Query query = getSession ().createQuery (hql);
+
+        List <HeatTemplate> result = query.list ();
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllHeatTemplates", null);
+        return result;
+    }
+
+    /**
+     * Fetch a specific Heat Template by ID.
+     *
+     * @param templateId
+     * @return HeatTemplate object or null if none found
+     */
+    public HeatTemplate getHeatTemplate (int templateId) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get Heat template with id " + templateId);
+
+        HeatTemplate template = (HeatTemplate) getSession ().get (HeatTemplate.class, templateId);
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
+        return template;
+    }
+
+    /**
+     * Return the newest version of a specific Heat Template (queried by Name).
+     *
+     * @param templateName
+     * @return HeatTemplate object or null if none found
+     */
+    public HeatTemplate getHeatTemplate (String templateName) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get Heat template with name " + templateName);
+
+        String hql = "FROM HeatTemplate WHERE templateName = :template_name";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("template_name", templateName);
+
+        @SuppressWarnings("unchecked")
+        List <HeatTemplate> resultList = query.list ();
+
+        // See if something came back. Name is unique, so
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No template found", "CatalogDB", "getHeatTemplate", null);
+            return null;
+        }
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
+        return resultList.get (0);
+    }
+
+    /**
+     * Return a specific version of a specific Heat Template (queried by Name).
+     *
+     * @param templateName
+     * @param version
+     * @return HeatTemplate object or null if none found
+     */
+    public HeatTemplate getHeatTemplate (String templateName, String version) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get Heat template with name " + templateName
+                                      + " and version "
+                                      + version);
+
+        String hql = "FROM HeatTemplate WHERE templateName = :template_name AND version = :version";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("template_name", templateName);
+        query.setParameter ("version", version);
+
+        @SuppressWarnings("unchecked")
+        List <HeatTemplate> resultList = query.list ();
+
+        // See if something came back.
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No template found.", "CatalogDB", "getHeatTemplate", null);
+            return null;
+        }
+        // Name + Version is unique, so should only be one element
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
+        return resultList.get (0);
+    }
+
+    /**
+     * Fetch a Service definition
+     */
+    public Service getService (String serviceName) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get service with name " + serviceName);
+
+        String hql = "FROM Service WHERE serviceName = :service_name";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("service_name", serviceName);
+
+        Service service = null;
+        try {
+               service = (Service) query.uniqueResult ();
+        } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: serviceName='" + serviceName + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for serviceName=" + serviceName, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for serviceName=" + serviceName);
+               return null;
+        } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: serviceName='" + serviceName + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for serviceName=" + serviceName, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for serviceName=" + serviceName);
+               return null;
+        } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: serviceName='" + serviceName);
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for serviceName=" + serviceName, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for serviceName=" + serviceName);
+               return null;
+        }
+        if (service == null) {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getService", null);
+        } else {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getService", null);
+        }
+
+        return service;
+    }
+    
+    /**
+     * Fetch a Service definition
+     */
+    public Service getServiceByUUID (String serviceNameVersionId) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get service with UUID " + serviceNameVersionId);
+
+        String hql = "FROM Service WHERE serviceNameVersionId = :service_id";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("service_id", serviceNameVersionId);
+
+        Service service = null;
+        try {
+               service = (Service) query.uniqueResult ();
+        } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: serviceNameVersionId='" + serviceNameVersionId + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for serviceNameVersionId=" + serviceNameVersionId, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for serviceNameVersionId=" + serviceNameVersionId);
+               return null;
+        } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: serviceName='" + serviceNameVersionId + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for serviceNameVersionId=" + serviceNameVersionId, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for serviceNameVersionId=" + serviceNameVersionId);
+               return null;
+        } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: serviceName='" + serviceNameVersionId);
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for serviceNameVersionId=" + serviceNameVersionId, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for serviceNameVersionId=" + serviceNameVersionId);
+               return null;
+        }
+        if (service == null) {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getService", null);
+        } else {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getService", null);
+        }
+
+        return service;
+    }
+    
+    /**
+     * Fetch the Common Service API definition using Http Method + serviceNameVersionId
+     */
+    public Service getService(HashMap<String, String> map, String httpMethod) {
+     
+        String serviceNameVersionId = map.get("serviceNameVersionId");
+        Query query;
+        String serviceId = "not_set";
+        String serviceVersion = "not_set";
+        
+        if(serviceNameVersionId != null && serviceNameVersionId.length() > 0){
+               LOGGER.debug ("Catalog database - get serviceNameVersionId with id " + serviceNameVersionId);
+
+               String hql = "FROM Service WHERE service_name_version_id = :service_name_version_id and http_method = :http_method";
+               query = getSession ().createQuery (hql);
+            query.setParameter ("service_name_version_id", serviceNameVersionId);
+         } else {
+               serviceId = map.get("serviceId");
+               serviceVersion = map.get("serviceVersion");
+            LOGGER.debug ("Catalog database - get serviceId with id " + serviceId + " and serviceVersion with " + serviceVersion);
+
+            String hql = "FROM Service WHERE service_id = :service_id and service_version = :service_version and http_method = :http_method";
+            query = getSession ().createQuery (hql);
+            query.setParameter ("service_id", serviceId);
+            query.setParameter ("service_version", serviceVersion);
+         }
+        
+        query.setParameter ("http_method", httpMethod);
+
+        long startTime = System.currentTimeMillis ();
+        Service service = null;
+        try {
+               service = (Service) query.uniqueResult ();
+        } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - data integrity error: service_id='" + serviceId + "', serviceVersion='" + serviceVersion + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for service_id=" + serviceId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for service_id=" + serviceId);
+               service = null;
+        } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: service_id='" + serviceId + "', serviceVersion='" + serviceVersion + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for service_id=" + serviceId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for service_id=" + serviceId);
+               service = null;
+        } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: service_id='" + serviceId + "', serviceVersion='" + serviceVersion + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for service_id=" + serviceId + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for service_id=" + serviceId);
+               service = null;
+        }
+        if (service == null) {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getService", null);
+        } else {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getService", null);
+        }
+        return service;
+    }
+    
+    /**
+     * Return the newest version of a Service (queried by Name).
+     *
+     * @param serviceName
+     * @return Service object or null if none found
+     */
+    public Service getServiceByName (String serviceName) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get service with name " + serviceName);
+
+        String hql = "FROM Service WHERE serviceName = :service_name";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("service_name", serviceName);
+
+        @SuppressWarnings("unchecked")
+        List <Service> resultList = query.list ();
+
+        // See if something came back. 
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByName", null);
+            return null;
+        }
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByName", null);
+        return resultList.get (0);
+    }
+
+    /**
+     * Return a newest version of Service recipe that matches a given SERVICE_ID and ACTION
+     *
+     * @param serviceId
+     * @param action     * 
+     * @return ServiceRecipe object or null if none found
+     */
+    public ServiceRecipe getServiceRecipe (int serviceId, String action) {
+       
+        StringBuilder hql = new StringBuilder ("FROM ServiceRecipe WHERE serviceId = :serviceId AND action = :action ");
+    
+   
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get Service recipe with serviceId " + Integer.toString(serviceId)
+                                      + " and action "
+                                      + action
+                                      );
+
+        Query query = getSession ().createQuery (hql.toString ());
+        query.setParameter ("serviceId", serviceId);
+        query.setParameter (ACTION, action);
+        
+        @SuppressWarnings("unchecked")
+        List <ServiceRecipe> resultList = query.list ();
+
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service recipe not found", "CatalogDB", "getServiceRecipe", null);
+            return null;
+        }
+        
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipe", null);
+        return resultList.get (0);
+    }
+
+    
+    /**
+     * Return the VNF component data - queried by the VNFs ID and the component type.
+     *
+     * @param vnfId
+     * @param type
+     * @return VnfComponent object or null if none found
+     */
+    public VnfComponent getVnfComponent (int vnfId, String type) {
+       
+       long startTime = System.currentTimeMillis();
+       LOGGER.debug ("Catalog database - get VnfComponent where vnfId="+ vnfId+ " AND componentType="+ type);
+       
+        String hql = "FROM VnfComponent WHERE vnfId = :vnf_id AND componentType = :type";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("vnf_id", vnfId);
+        query.setParameter ("type", type);
+
+               VnfComponent result = null;
+               try {
+                       result = (VnfComponent) query.uniqueResult(); 
+               } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: vnf_id='" + vnfId + "', componentType='" + type + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnf_id=" + vnfId + " and componentType=" + type, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for vnf_id=" + vnfId);
+               result = null;
+        } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: vnf_id='" + vnfId + "', componentType='" + type + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for vnf_id=" + vnfId + " and componentType=" + type, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnf_id=" + vnfId);
+               result = null;
+        } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: vnf_id='" + vnfId + "', componentType='" + type + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for vnf_id=" + vnfId + " and componentType=" + type, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for vnf_id=" + vnfId);
+               result = null;
+        }
+
+       //LOGGER.debug("Found VNF Component: " + result.toString());
+               if (result != null) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfComponent", null);
+               } else {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No VNFComponent found", "CatalogDB", "getVnfComponent", null);
+               }
+        return result;
+    }
+
+    /**
+     * Return the newest version of a specific VNF resource (queried by Name).
+     *
+     * @param vnfType
+     * @return VnfResource object or null if none found
+     */
+    public VnfResource getVnfResource (String vnfType) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get vnf resource with name " + vnfType);
+
+        String hql = "FROM VnfResource WHERE vnfType = :vnf_name";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("vnf_name", vnfType);
+
+        @SuppressWarnings("unchecked")
+        List <VnfResource> resultList = query.list ();
+
+        // See if something came back. Name is unique, so
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF not found", "CatalogDB", "getVnfResource", null);
+            return null;
+        }
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResource", null);
+        return resultList.get (0);
+    }
+
+    /**
+     * Return the newest version of a specific VNF resource (queried by Name).
+     *
+     * @param vnfType
+     * @param version
+     * @return VnfResource object or null if none found
+     */
+    public VnfResource getVnfResource (String vnfType, String serviceVersion) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get VNF resource with name " + vnfType);
+
+        String hql = "FROM VnfResource WHERE vnfType = :vnfName and version = :serviceVersion";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("vnfName", vnfType);
+        query.setParameter ("serviceVersion", serviceVersion);
+
+        VnfResource resource = null;
+        try {
+               resource = (VnfResource) query.uniqueResult ();
+        } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: vnfType='" + vnfType + "', serviceVersion='" + serviceVersion + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for vnfType=" + vnfType + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for vnfType=" + vnfType);
+               resource = null;
+        } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: vnfType='" + vnfType + "', asdc_service_model_version='" + serviceVersion + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for vnfType=" + vnfType + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for vnfType=" + vnfType);
+               resource = null;
+        } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: vnfType='" + vnfType + "', serviceVersion='" + serviceVersion + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for vnfType=" + vnfType + " and serviceVersion=" + serviceVersion, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for vnfType=" + vnfType);
+               resource = null;
+        }
+        if (resource == null) {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResource", null);
+        } else {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResource", null);
+        }
+        return resource;
+    }
+
+    /**
+     * Return the newest version of a specific VNF resource (queried by ID).
+     *
+     * @param id The vnf id
+     * @return VnfResource object or null if none found
+     */
+    public VnfResource getVnfResourceById (int id) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get VNF resource with id " + id);
+
+        String hql = "FROM VnfResource WHERE id = :id";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("id", id);
+
+        @SuppressWarnings("unchecked")
+        List <VnfResource> resultList = query.list ();
+
+        // See if something came back. Name is unique, so
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VnfResource not found", "CatalogDB", "getVnfResourceById", null);
+            return null;
+        }
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceById", null);
+        return resultList.get (0);
+    }
+    
+    /**
+     * Return the newest version of a vfModule - 1607 
+     *
+     */
+    public VfModule getVfModuleModelName (String modelName) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get vfModuleModelName with name " + modelName);
+
+        String hql = "FROM VfModule WHERE model_name = :model_name";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("model_name", modelName);
+
+        @SuppressWarnings("unchecked")
+        List <VfModule> resultList = query.list ();
+
+        // See if something came back. Name is unique, so
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VF not found", "CatalogDB", "getVfModuleModelName", null);
+            return null;
+        }
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleModelName", null);
+        return resultList.get (0);
+    }
+    
+    public VfModule getVfModuleModelName (String modelName, String model_version) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get vfModuleModelName with type='" + modelName + "' and asdc_service_model_version='" + model_version + "'");
+
+        String hql = "FROM VfModule WHERE model_name = :model_name and version = :model_version";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("model_name", modelName);
+        query.setParameter ("model_version", model_version);
+        
+        VfModule module = null;
+        try {
+               module = (VfModule) query.uniqueResult ();
+        } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: type='" + modelName + "', asdc_service_model_version='" + model_version + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for type=" + modelName + " and version=" + model_version, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for type=" + modelName);
+               module = null;
+        } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: type='" + modelName + "', asdc_service_model_version='" + model_version + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for type=" + modelName + " and version=" + model_version, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for type=" + modelName);
+               module = null;
+        } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: type='" + modelName + "', asdc_service_model_version='" + model_version + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for type=" + modelName + " and version=" + model_version, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for type=" + modelName);
+               module = null;
+        }
+        if (module == null) {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleModelName", null);
+        } else {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleModelName", null);
+        }
+        return module;
+    }
+   
+
+    /**
+     * Return the newest version of a specific Network resource (queried by Type).
+     *
+     * @param networkType
+     * @return NetworkResource object or null if none found
+     */
+    public NetworkResource getNetworkResource (String networkType) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get network resource with type " + networkType);
+
+        String hql = "FROM NetworkResource WHERE networkType = :network_type";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("network_type", networkType);
+
+        @SuppressWarnings("unchecked")
+        List <NetworkResource> resultList = query.list ();
+
+        // See if something came back. Name is unique, so
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Network Resource not found", "CatalogDB", "getNetworkResource", null);
+            return null;
+        }
+
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResource", null);
+        return resultList.get (0);
+    }
+
+    /**
+     * Return a VNF recipe that matches a given VNF_TYPE, ACTION, and, if specified, SERVICE_TYPE
+     *
+     * @param vnfType
+     * @param action
+     * @param serviceType The service Name, if null or empty is provided, it won't be taken into account
+     * @return VnfRecipe object or null if none found
+     */
+    public VnfRecipe getVnfRecipe (String vnfType, String action, String serviceType) {
+        boolean withServiceType = false;
+
+        StringBuilder hql = new StringBuilder ("FROM VnfRecipe WHERE vnfType = :vnfType AND action = :action ");
+
+        // If query c
+        if (serviceType == null || serviceType.isEmpty ()) {
+            hql.append ("AND serviceType is NULL ");
+        } else {
+            hql.append ("AND serviceType = :serviceType ");
+            withServiceType = true;
+        }
+   
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get VNF recipe with name " + vnfType
+                                      + " and action "
+                                      + action
+                                      + " and service type "
+                                      + serviceType);
+
+        Query query = getSession ().createQuery (hql.toString ());
+        query.setParameter (VNF_TYPE, vnfType);
+        query.setParameter (ACTION, action);
+        if (withServiceType) {
+            query.setParameter (SERVICE_TYPE, serviceType);
+        }
+
+        @SuppressWarnings("unchecked")
+        List <VnfRecipe> resultList = query.list ();
+
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe not found", "CatalogDB", "getVnfRecipe", null);
+            return null;
+        }
+        
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfRecipe", null);
+        return resultList.get (0);
+    }
+
+    /**
+     * Return a VNF recipe that matches a given VNF_TYPE and ACTION
+     *
+     * @param vnfType
+     * @param action
+     * @return VnfRecipe object or null if none found
+     */
+    public VnfRecipe getVnfRecipe (String vnfType, String action) {
+        StringBuilder hql = new StringBuilder ("FROM VnfRecipe WHERE vnfType = :vnfType AND action = :action ");
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get VNF recipe with name " + vnfType
+                                      + " and action "
+                                      + action);
+
+        Query query = getSession ().createQuery (hql.toString ());
+        query.setParameter (VNF_TYPE, vnfType);
+        query.setParameter (ACTION, action);
+
+        @SuppressWarnings("unchecked")
+        List <VnfRecipe> resultList = query.list ();
+
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe not found", "CatalogDB", "getVnfRecipe", null);
+            return null;
+        }
+
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfRecipe", null);
+        return resultList.get (0);
+    }
+    
+    /**
+     * Return a VNF recipe that matches a given VF_MODULE_ID and ACTION
+     *
+     * @param vfModuleId
+     * @param action     
+     * @return VnfRecipe object or null if none found
+     */
+    public VnfRecipe getVnfRecipeByVfModuleId (String vnfType, String vfModuleId, String action) {
+       
+       StringBuilder hql = new StringBuilder ("FROM VnfRecipe WHERE vfModuleId = :vfModuleId and action = :action  ");
+        
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get VNF Recipe with vfModuleId " + vfModuleId);
+           
+        Query query = getSession ().createQuery (hql.toString ());
+        query.setParameter (VF_MODULE_ID, vfModuleId);
+        query.setParameter (ACTION, action);
+        
+        @SuppressWarnings("unchecked")
+        List <VnfRecipe> resultList = query.list ();
+
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe Entry not found", "CatalogDB", "getVnfRecipeByVfModuleId", null);
+            return null;
+        }
+        
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF Recipe Entry found", "CatalogDB", "getVnfRecipeByVfModuleId", null);
+        return resultList.get (0);
+    }
+    
+    public VfModule getVfModuleType(String type) {
+       long startTime = System.currentTimeMillis();
+       LOGGER.debug("Catalog database - get vfModuleType with type " + type);
+       
+       String hql = "FROM VfModule WHERE type = :type";
+       Query query = getSession().createQuery(hql);
+       query.setParameter("type",  type);
+       
+       @SuppressWarnings("unchecked")
+       List<VfModule> resultList = query.list();
+       if (resultList.isEmpty()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VF not found", "CatalogDB", "getVfModuleType", null);
+            return null;
+       }
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleType", null);
+        return resultList.get (0);
+    }
+    
+    public VfModule getVfModuleType(String type, String version) {
+       
+       long startTime = System.currentTimeMillis();
+        LOGGER.debug ("Catalog database - get vfModuleType with type " + type + " and model_version " + version);
+
+        String hql = "FROM VfModule WHERE type = :type and version = :version";
+        Query query = getSession().createQuery(hql);
+        query.setParameter ("type", type);
+        query.setParameter ("version", version);
+        VfModule module = null;
+        try {
+               module = (VfModule) query.uniqueResult ();
+        } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: type='" + type + "', asdc_service_model_version='" + version + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for type=" + type + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for type==" + type);
+               module = null;
+        } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: type='" + type + "', asdc_service_model_version='" + version + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for type=" + type + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for type=" + type);
+               module = null;
+        } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: type='" + type + "', asdc_service_model_version='" + version + "'");
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for type=" + type + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for type=" + type);
+               module = null;
+        }
+        if (module == null) {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVfModuleType", null);
+        } else {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleType", null);
+        }
+        return module;
+    }
+   
+    
+    /**
+     * Return a VNF recipe that matches a given VNF_TYPE, VF_MODULE_MODEL_NAME, and ACTION
+     * first query VF_MODULE table by type, and then use the ID to query 
+     * VNF_RECIPE by VF_MODULE_ID and ACTION 
+     *
+     * @param vnfType
+     * @parm vfModuleModelName
+     * @param action     
+     * @return VnfRecipe object or null if none found
+     */
+    public VnfRecipe getVfModuleRecipe (String vnfType, String vfModuleModelName, String action) {
+       String vfModuleType = vnfType + "::" + vfModuleModelName;
+       
+       StringBuilder hql = new StringBuilder ("FROM VfModule WHERE type = :type ");
+        
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get VF MODULE  with type " + vfModuleType);
+           
+        Query query = getSession ().createQuery (hql.toString ());
+        query.setParameter (TYPE, vfModuleType);
+        
+        @SuppressWarnings("unchecked")
+        List <VfModule> resultList = query.list ();
+
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VF Module Entry not found", "CatalogDB", "getVfModuleRecipe", null);
+            return null;
+        }
+        
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        VfModule vfMod = resultList.get(0);
+        
+        int id = vfMod.getId();
+        String vfModuleId = Integer.toString(id);        
+        
+        StringBuilder hql1 = new StringBuilder ("FROM VnfRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
+          
+        LOGGER.debug ("Catalog database - get VNF recipe with vf module id " + vfModuleId
+                                      + " and action "
+                                      + action);
+
+        Query query1 = getSession ().createQuery (hql1.toString ());
+        query1.setParameter (VF_MODULE_ID, vfModuleId);
+        query1.setParameter (ACTION, action);
+       
+        @SuppressWarnings("unchecked")
+        List <VnfRecipe> resultList1 = query1.list ();
+
+        if (resultList1.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe not found", "CatalogDB", "getVfModuleRecipe", null);
+            return null;
+        }
+        
+        Collections.sort (resultList1, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList1);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe found", "CatalogDB", "getVfModuleRecipe", null);
+        return resultList1.get (0);
+    }
+    
+    /**
+     * Return a VNF COMPONENTSrecipe that matches a given VNF_TYPE, VF_MODULE_MODEL_NAME, 
+     * ASDC_SERVICE_MODEL_VERSION, MODEL_VERSION, and ACTION
+     * first query VF_MODULE table by type, and then use the ID to query 
+     * VNF_COMPONENTS_RECIPE by VF_MODULE_ID and ACTION 
+     *
+     * @param vnfType
+     * @parm vfModuleModelName
+     * @param action     
+     * @return VnfRecipe object or null if none found
+     */
+    public VnfComponentsRecipe getVnfComponentsRecipe (String vnfType, String vfModuleModelName, String asdcServiceModelVersion, String modelVersion, String action) {
+       String vfModuleType = vnfType + "::" + vfModuleModelName;
+       
+       StringBuilder hql = new StringBuilder ("FROM VfModule WHERE type = :type AND version = :version AND modelVersion = :modelVersion");
+        
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get VF MODULE  with type " + vfModuleType + ", asdcServiceModelVersion " + asdcServiceModelVersion + ", modelVersion " + modelVersion);
+           
+        Query query = getSession ().createQuery (hql.toString ());
+        query.setParameter (TYPE, vfModuleType);
+        query.setParameter ("version", asdcServiceModelVersion);
+        query.setParameter ("modelVersion", modelVersion);
+        
+        @SuppressWarnings("unchecked")
+        List <VfModule> resultList = query.list ();
+
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VF Module Entry not found", "CatalogDB", "getVnfComponentsRecipe", null);
+            return null;
+        }
+        
+        Collections.sort (resultList, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList);
+
+        VfModule vfMod = resultList.get(0);
+        
+        int id = vfMod.getId();
+        String vfModuleId = Integer.toString(id);        
+        
+        StringBuilder hql1 = new StringBuilder ("FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
+          
+        LOGGER.debug ("Catalog database - get Vnf Components recipe with vf module id " + vfModuleId
+                                      + " and action "
+                                      + action);
+
+        Query query1 = getSession ().createQuery (hql1.toString ());
+        query1.setParameter (VF_MODULE_ID, vfModuleId);
+        query1.setParameter (ACTION, action);
+       
+        @SuppressWarnings("unchecked")
+        List <VnfComponentsRecipe> resultList1 = query1.list ();
+
+        if (resultList1.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe not found", "CatalogDB", "getVnfComponentsRecipe", null);
+            return null;
+        }
+        
+        Collections.sort (resultList1, new MavenLikeVersioningComparator ());
+        Collections.reverse (resultList1);
+
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe found", "CatalogDB", "getVnfComponentsRecipe", null);
+        if (resultList1.size() > 1 && (!resultList1. get (0).getOrchestrationUri().equals(resultList1.get (1).getOrchestrationUri ()))) {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Different ORCHESTRATION URIs found for same VERSION and ID. No result returned.", "CatalogDB", "getVnfComponentsRecipe", null);
+               return null;
+        }
+        return resultList1.get (0);
+    }
+
+
+    /**
+     * Return all VNF Resources in the Catalog DB
+     *
+     * @return A list of VnfResource objects
+     */
+    @SuppressWarnings("unchecked")
+    public List <VnfResource> getAllVnfResources () {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get all VNF resources");
+
+        String hql = "FROM VnfResource";
+        Query query = getSession ().createQuery (hql);
+
+        List <VnfResource> result = query.list ();
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllVnfResources", null);
+        return result;
+    }
+
+    /**
+     * Return VNF Resources in the Catalog DB that match a given VNF role
+     *
+     * @return A list of VnfResource objects
+     */
+    @SuppressWarnings("unchecked")
+    public List <VnfResource> getVnfResourcesByRole (String vnfRole) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get all VNF resources for role " + vnfRole);
+
+        String hql = "FROM VnfResource WHERE vnfRole = :vnfRole";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("vnfRole", vnfRole);
+
+        List <VnfResource> resources = query.list ();
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourcesByRole", null);
+        return resources;
+    }
+
+    /**
+     * Return all Network Resources in the Catalog DB
+     *
+     * @return A list of NetworkResource objects
+     */
+    @SuppressWarnings("unchecked")
+    public List <NetworkResource> getAllNetworkResources () {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get all network resources");
+
+        String hql = "FROM NetworkResource";
+        Query query = getSession ().createQuery (hql);
+
+        List <NetworkResource> result = query.list ();
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllNetworkResources", null);
+        return result;
+    }
+    
+    /**
+     * Return all VF Modules in the Catalog DB
+     *
+     * @return A list of VfModule objects
+     */
+    @SuppressWarnings("unchecked")
+    public List <VfModule> getAllVfModules () {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get all vf modules");
+
+        String hql = "FROM VfModule";
+        Query query = getSession ().createQuery (hql);
+
+        List <VfModule> result = query.list ();
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllVfModules", null);
+        return result;
+    }
+
+    /**
+     * Return all HeatEnvironment in the Catalog DB
+     *
+     * @return A list of HeatEnvironment objects
+     */
+    @SuppressWarnings("unchecked")
+    public List <HeatEnvironment> getAllHeatEnvironment () {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get all Heat environments");
+
+        String hql = "FROM HeatEnvironment";
+        Query query = getSession ().createQuery (hql);
+
+        List <HeatEnvironment> result = query.list ();
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllHeatEnvironment", null);
+        return result;
+    }
+
+    /**
+     * Fetch the Environment by Environment ID - 1510
+     */
+    public HeatEnvironment getHeatEnvironment (int id) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get Heat environment with id " + id);
+
+        String hql = "FROM HeatEnvironment WHERE id = :idValue";
+
+        LOGGER.debug ("getHeatEnvironment called with id=" + id);
+
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("idValue", id);
+
+        @SuppressWarnings("unchecked")
+        List <HeatEnvironment> resultList = query.list ();
+
+        // See if something came back.
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Heat environment not found", "CatalogDB", "getHeatEnvironment", null);
+            return null;
+        }
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatEnvironment", null);
+        return resultList.get (0);
+    }
+
+    /**
+     * Fetch the nested templates - 1510
+     */
+
+    public Map <String, Object> getNestedTemplates (int templateId) {
+        Map <String, Object> nestedTemplates = null;
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - getNestedTemplates called with templateId " + templateId);
+
+        String hql = "FROM HeatNestedTemplate where parent_template_id = :parentIdValue";
+
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("parentIdValue", templateId);
+
+        @SuppressWarnings("unchecked")
+        List <HeatNestedTemplate> resultList = query.list ();
+        // If nothing comes back, there are no nested templates
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No nestedTemplate found", "CatalogDB", "getNestedTemplates", null);
+            LOGGER.debug ("No nestedTemplates found for templateId=" + templateId + ", " + hql);
+            return null;
+        }
+        // Now, for each entry in NESTED_HEAT_TEMPLATES, we need to grab the template body from HEAT_TEMPLATE
+        nestedTemplates = new HashMap <String, Object> ();
+        for (HeatNestedTemplate hnt : resultList) {
+            LOGGER.debug ("Querying for " + hnt);
+            HeatTemplate ht = this.getHeatTemplate (hnt.getChildTemplateId ());
+            if (ht == null) {
+                LOGGER.debug ("No template found matching childTemplateId=" + hnt.getChildTemplateId ());
+                continue;
+            }
+            String providerResourceFile = hnt.getProviderResourceFile ();
+            String heatTemplateBody = ht.getTemplateBody ();
+            if (providerResourceFile != null && heatTemplateBody != null) {
+                nestedTemplates.put (providerResourceFile, heatTemplateBody);
+            } else {
+                LOGGER.debug ("providerResourceFile or heatTemplateBody were null - do not add to HashMap!");
+            }
+        }
+        // Make sure we're not returning an empty map - if so, just return null
+        if (nestedTemplates.isEmpty ()) {
+            LOGGER.debug ("nestedTemplates is empty - just return null");
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Nested template is empty", "CatalogDB", "getNestedTemplate", null);
+            return null;
+        }
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNestedTemplate", null);
+        return nestedTemplates;
+    }
+
+    /*
+     * Fetch any files in the HEAT_FILES table 1510
+     */
+    public Map <String, HeatFiles> getHeatFiles (int vnfResourceId) {
+       Map <String, HeatFiles> heatFiles = null;
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - getHeatFiles called with vnfResourceId " + vnfResourceId);
+        String hql = "FROM HeatFiles where vnf_resource_id = :vnfResourceIdValue";
+
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("vnfResourceIdValue", vnfResourceId);
+
+        @SuppressWarnings("unchecked")
+        List <HeatFiles> resultList = query.list ();
+        // If nothing comes back, there are no heat files
+        if (resultList.isEmpty ()) {
+            LOGGER.debug ("No heatFiles found for vnfResourceId=" + vnfResourceId);
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No heat files", "CatalogDB", "getHeatFiles", null);
+            return null;
+        }
+        // Now, we just need to return a HashMap (key=fileName, object=fileBody)
+        heatFiles = new HashMap <String, HeatFiles> ();
+        for (HeatFiles hf : resultList) {
+            LOGGER.debug ("Adding " + hf.getFileName () + "->" + hf.getFileBody ());
+            heatFiles.put (hf.getFileName (), hf);
+        }
+        // Make sure we're not returning an empty map - if so, just return null
+        if (heatFiles.isEmpty ()) {
+            LOGGER.debug ("heatFiles is empty - just return null");
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Heat files is empty", "CatalogDB", "getHeatFiles", null);
+            return null;
+        }
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatFiles", null);
+        return heatFiles;
+    }
+    
+    // New 1607 - with modularization, use new table to determine which HEAT_FILES entries to attach
+    
+    public Map <String, HeatFiles> getHeatFilesForVfModule(int vfModuleId) {
+        Map <String, HeatFiles> heatFiles = null;
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - getHeatFilesForVfModule called with vfModuleId " + vfModuleId);
+        String hql = "FROM VfModuleToHeatFiles where vf_module_id = :vfModuleIdValue";
+
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("vfModuleIdValue", vfModuleId);
+        
+        List<VfModuleToHeatFiles> mapList = query.list();
+        if (mapList.isEmpty()) {
+            LOGGER.debug ("No heatFiles found for vfModuleId=" + vfModuleId);
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No heatfiles found for vfModule", "CatalogDB", "getHeatFilesForVfModule", null);
+            return null;
+        }
+        //Now the fun part - we have a list of the heat files we need to get - could clean this up with a join
+        //TODO - convert this all with one join - brute force for now due to time
+        heatFiles = new HashMap<String, HeatFiles>();
+        for (VfModuleToHeatFiles vmthf : mapList) {
+               int heatFilesId = vmthf.getHeatFilesId();
+               hql = "FROM HeatFiles where id = :id_value";
+               query = getSession().createQuery(hql);
+               query.setParameter("id_value", heatFilesId);
+               List<HeatFiles> fileList = query.list();
+               if (fileList.isEmpty()) {
+                       // Should this throw an exception??
+                       LOGGER.debug("Unable to find a HEAT_FILES entry at " + heatFilesId);
+                String errorString = "_ERROR|" + heatFilesId;
+                       // The receiving code needs to know to throw an exception for this - or ignore it.
+                       heatFiles.put(errorString, null);
+               } else {
+                       // Should only ever have 1 result - add it to our Map
+                       LOGGER.debug("Retrieved " + fileList.size() + " heat file entry at " + heatFilesId);
+                       for (HeatFiles hf : fileList) {
+                               LOGGER.debug("Adding " + hf.getFileName() + "->" + hf.getFileBody());
+                               heatFiles.put(hf.getFileName(), hf);
+                       }
+               }
+        }
+        if (heatFiles.isEmpty()) {
+            LOGGER.debug ("heatFiles is empty - just return null");
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. HeatFiles is empty", "CatalogDB", "getHeatFilesForVfModule", null);
+            return null;
+        }
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatFilesForVfModule", null);
+        return heatFiles;
+    }
+
+    
+    
+    /**
+     * Get the heat template object based on asdc attributes
+     *
+     * @param templateName The template name, generally the yaml filename. "example.yaml"
+     * @param version The version as specified by ASDC. "1.1"
+     * @param asdcResourceName The ASDC resource name provided in the ASDC artifact
+     *
+     * @return The HeatTemplate
+     */
+    public HeatTemplate getHeatTemplate (String templateName, String version, String asdcResourceName) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - getHeatTemplate with name " + templateName
+                                      + " and version "
+                                      + version
+                                      + " and ASDC resource name "
+                                      + asdcResourceName);
+
+        String hql = "FROM HeatTemplate WHERE templateName = :template_name AND version = :version AND asdcResourceName = :asdcResourceName";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("template_name", templateName);
+        query.setParameter ("version", version);
+        query.setParameter ("asdcResourceName", asdcResourceName);
+
+        @SuppressWarnings("unchecked")
+        List <HeatTemplate> resultList = query.list ();
+
+        // See if something came back.
+        if (resultList.isEmpty ()) {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Heat template not found", "CatalogDB", "getHeatTemplate", null);
+            return null;
+        }
+        // Name + Version is unique, so should only be one element
+        LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
+        return resultList.get (0);
+    }
+
+    /**
+     * Save the Heat Template
+     *
+     * @param heat The heat template
+     * @param paramSet The list of heat template parameters
+     */
+    public void saveHeatTemplate (HeatTemplate heat, Set <HeatTemplateParam> paramSet) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save Heat Template with name " + heat.getTemplateName());
+
+        heat.setParameters(null);
+        try {
+            HeatTemplate heatTemp = this.getHeatTemplate (heat.getTemplateName (),
+                                                          heat.getVersion (),
+                                                          heat.getAsdcResourceName ());
+            if (heatTemp == null) {
+                this.getSession ().save (heat);
+
+                if (paramSet != null) {
+                    for (HeatTemplateParam param : paramSet) {
+                        param.setHeatTemplateId (heat.getId ());
+                    }
+                    heat.setParameters (paramSet);
+                    this.getSession ().merge (heat);
+                }
+
+            } else {
+               heat.setId(heatTemp.getId());
+            }
+        } finally {
+               heat.setParameters(paramSet);
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveHeatTemplate", null);
+        }
+    }
+
+    /**
+     * Retrieves a Heat environment from DB based on its unique key.
+     *
+     * @param name the environment artifact name
+     * @param version the environment resource version
+     * @param asdcResourceName the environment resource name
+     * @return the heat environment from DB or null if not found
+     */
+    public HeatEnvironment getHeatEnvironment (String name, String version, String asdcResourceName) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get Heat environment with name " + name
+                                      + " and version "
+                                      + version
+                                      + " and ASDC resource name "
+                                      + asdcResourceName);
+
+        String hql = "FROM HeatEnvironment WHERE name=:name AND version=:version AND asdcResourceName=:asdcResourceName";
+        Query query = getSession ().createQuery (hql);
+        query.setParameter ("name", name);
+        query.setParameter ("version", version);
+        query.setParameter ("asdcResourceName", asdcResourceName);
+        HeatEnvironment env = null;
+        try {
+               env = (HeatEnvironment) query.uniqueResult ();
+        } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: envName='" + name + "', version='" + version + "' and asdcResourceName=" + asdcResourceName);
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for envName=" + name + " and version=" + version + " and asdcResourceName=" + asdcResourceName, "", "", MsoLogger.ErrorCode.DataError, "non unique result for envName=" + name);
+               env = null;
+        } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: envName='" + name + "', asdc_service_model_version='" + version + "' and asdcResourceName=" + asdcResourceName);
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for envName=" + name + " and version=" + version + " and asdcResourceName=" + asdcResourceName, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for envName=" + name);
+               env = null;
+        } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: envName='" + name + "', asdc_service_model_version='" + version + "' and asdcResourceName=" + asdcResourceName);
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for envName=" + name + " and version=" + version + " and asdcResourceName=" + asdcResourceName, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for envName=" + name);
+               env = null;
+        }
+        if (env == null) {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getHeatTemplate", null);
+        } else {
+               LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
+        }
+        return env;
+    }
+
+    /**
+     * Save the HeatEnvironment
+     *
+     * @param env The Environment
+     */
+    public void saveHeatEnvironment (HeatEnvironment env) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save Heat environment with name "
+                                      + env.getEnvironment());
+        try {
+            HeatEnvironment dbEnv = getHeatEnvironment (env.getName (), env.getVersion (), env.getAsdcResourceName ());
+            if (dbEnv == null) {
+
+                this.getSession ().save (env);
+               
+            } else {
+               env.setId(dbEnv.getId());
+            }
+
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveHeatTemplate", null);
+        }
+    }
+
+    /**
+     * Save the heatTemplate
+     *
+     * @param heat The heat template
+     */
+    public void saveHeatTemplate (HeatTemplate heat) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save Heat template with name " + heat.getTemplateName ());
+        try {
+            this.getSession ().update (heat);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveHeatTemplate", null);
+        }
+    }
+
+    public void saveHeatFile (HeatFiles heatFile) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save Heat file with name " + heatFile.getFileName ());
+        try {
+            this.getSession ().save (heatFile);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveHeatFile", null);
+        }
+    }
+
+    public void saveVnfRecipe (VnfRecipe vnfRecipe) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save VNF recipe with VNF type " + vnfRecipe.getVnfType ());
+        try {
+            this.getSession ().save (vnfRecipe);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVnfRecipe", null);
+        }
+    }
+    
+    public void saveVnfComponentsRecipe (VnfComponentsRecipe vnfComponentsRecipe) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save VNF Component recipe with VNF type " + vnfComponentsRecipe.getVnfType ());
+        try {
+            this.getSession ().save (vnfComponentsRecipe);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVnfComponentsRecipe", null);
+        }
+    }
+
+
+    public void saveOrUpdateVnfResource (VnfResource vnfResource) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save VNF Resource with VNF type " + vnfResource.getVnfType ());
+        try {
+
+            if (vnfResource.getId() != 0) {
+                this.getSession ().merge (vnfResource);
+            } else {
+                this.getSession ().save (vnfResource);
+            }
+      
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateVnfResource", null);
+        }
+    }
+    
+    public void saveService (Service service) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save Service with ServiceName/Version/serviceUUID(SERVICE_NAME_VERSION_ID)" + service.getServiceName()+"/"+service.getServiceVersion()+"/"+service.getServiceNameVersionId());
+        try {
+               Service serviceDB = this.getServiceByUUID(service.getServiceNameVersionId());
+            if (serviceDB == null) {
+               this.getSession ().save (service);
+            }
+      
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateService", null);
+        }
+    }
+    
+    public void saveOrUpdateVfModule (VfModule vfModule) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save VNF Module with VF Model Name " + vfModule.getModelName());
+        try {
+
+            if (vfModule.getId() != 0) {
+                this.getSession ().merge (vfModule);
+            } else {
+                this.getSession ().save (vfModule);
+            }
+      
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateVfModule", null); 
+        }
+    }
+
+    public HeatNestedTemplate getNestedHeatTemplate(int parentTemplateId, int childTemplateId) {
+         long startTime = System.currentTimeMillis ();
+          LOGGER.debug ("Catalog database - get nested Heat template with PerentId-Child Id "
+                                        + parentTemplateId +"-"+childTemplateId);
+          try {
+              HeatNestedTemplate nestedTemplate = new HeatNestedTemplate ();
+              nestedTemplate.setParentTemplateId (parentTemplateId);
+              nestedTemplate.setChildTemplateId (childTemplateId);
+              
+              return (HeatNestedTemplate)session.get (HeatNestedTemplate.class,nestedTemplate);
+          } finally {
+              LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNestedHeatTemplate", null);
+          }
+    }
+      
+    public void saveNestedHeatTemplate (int parentTemplateId, HeatTemplate childTemplate, String yamlFile) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save nested Heat template with name "
+                                      + childTemplate.getTemplateName ());
+        try {
+      
+               saveHeatTemplate(childTemplate, childTemplate.getParameters());
+               if (getNestedHeatTemplate(parentTemplateId,childTemplate.getId()) == null) { 
+                   HeatNestedTemplate nestedTemplate = new HeatNestedTemplate ();
+                   nestedTemplate.setParentTemplateId (parentTemplateId);
+                   nestedTemplate.setChildTemplateId (childTemplate.getId ());
+                   nestedTemplate.setProviderResourceFile (yamlFile);
+                   session.save (nestedTemplate);
+               }
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveNestedHeatTemplate", null);
+        }
+    }
+    
+    public HeatFiles getHeatFiles(int vnfResourceId,String fileName,String asdcResourceName, String version) {
+         long startTime = System.currentTimeMillis ();
+          LOGGER.debug ("Catalog database - getHeatFiles with name " + fileName
+                                        + " and vnfResourceID "
+                                        + vnfResourceId
+//                                        + " and ASDC resource name "
+                                        + asdcResourceName
+                                        + " and version "
+                                        + version);
+
+          String hql = "FROM HeatFiles WHERE fileName = :fileName AND vnfResourceId = :vnfResourceId AND asdcResourceName = :asdcResourceName AND version = :version";
+          Query query = getSession ().createQuery (hql);
+          query.setParameter ("fileName", fileName);
+          query.setParameter ("vnfResourceId", vnfResourceId);
+          query.setParameter ("asdcResourceName", asdcResourceName);
+          query.setParameter ("version", version);
+
+          @SuppressWarnings("unchecked")
+        
+          HeatFiles heatFilesResult = null;
+          try {
+                 heatFilesResult = (HeatFiles) query.uniqueResult ();
+          } catch (org.hibernate.NonUniqueResultException nure) {
+               LOGGER.debug("Non Unique Result Exception - the Catalog Database does not match a unique row - data integrity error: fileName='" + fileName + "', vnfResourceId='" + vnfResourceId + "' and asdcResourceName=" + asdcResourceName + " and version=" + version);
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " non unique result for fileName=" + fileName + " and vnfResourceId=" + vnfResourceId + " and asdcResourceName=" + asdcResourceName + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Non unique result for fileName=" + fileName);
+               heatFilesResult = null;
+          } catch (org.hibernate.HibernateException he) {
+               LOGGER.debug("Hibernate Exception - while searching for: fileName='" + fileName + "', vnfResourceId='" + vnfResourceId + "' and asdcResourceName=" + asdcResourceName + " and version=" + version);
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Hibernate exception searching for fileName=" + fileName + " and vnfResourceId=" + vnfResourceId + " and asdcResourceName=" + asdcResourceName + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Hibernate exception searching for fileName=" + fileName);
+               heatFilesResult = null;
+          } catch (Exception e) {
+               LOGGER.debug("Generic Exception - while searching for: fileName='" + fileName + "', vnfResourceId='" + vnfResourceId + "' and asdcResourceName=" + asdcResourceName + " and version=" + version);
+               LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " Generic exception searching for fileName=" + fileName + " and vnfResourceId=" + vnfResourceId + " and asdcResourceName=" + asdcResourceName + " and version=" + version, "", "", MsoLogger.ErrorCode.DataError, "Generic exception searching for fileName=" + fileName);
+               heatFilesResult = null;
+          } 
+          
+          // See if something came back.
+          if (heatFilesResult == null) {
+              LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. HeatFiles not found", "CatalogDB", "getHeatFiles", null);
+              return null;
+          }
+          // Name + Version is unique, so should only be one element
+          LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatFiles", null);
+          return heatFilesResult;
+    }
+    
+    public void saveHeatFiles (HeatFiles childFile) {
+        long startTime = System.currentTimeMillis ();
+         LOGGER.debug ("Catalog database - save Heat File with name "
+                                       + childFile.getFileName());
+         try {
+             HeatFiles heatFiles = getHeatFiles (childFile.getVnfResourceId(), childFile.getFileName(), childFile.getAsdcResourceName (),childFile.getVersion());
+             if (heatFiles == null) {
+
+                // asdc_heat_files_save
+                 this.getSession ().save (childFile);
+                 
+             } else {
+                /* replaced 'heatFiles' by 'childFile'
+                   Based on following comment:
+                                       It must be childFile.setId instead of heatFiles.setId, we must return the ID if it exists in DB.
+                                */
+                childFile.setId(heatFiles.getId());
+             }
+
+         } finally {
+             LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveHeatFiles", null);
+         }
+    }
+    
+    public void saveVfModuleToHeatFiles (int parentVfModuleId, HeatFiles childFile) {
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - save Heat File to VFmodule link "
+                                      + childFile.getFileName());
+        try {
+            saveHeatFiles (childFile);
+            VfModuleToHeatFiles vfModuleToHeatFile = new VfModuleToHeatFiles ();
+               vfModuleToHeatFile.setVfModuleId(parentVfModuleId);
+               vfModuleToHeatFile.setHeatFilesId(childFile.getId());
+                   
+               session.save (vfModuleToHeatFile);
+          
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVfModuleToHeatFiles", null);
+        }
+    }
+    
+
+    /**
+     * Return a Network recipe that matches a given NETWORK_TYPE, ACTION, and, if specified, SERVICE_TYPE
+     *
+     * @param networkType
+     * @param action
+     * @param serviceType
+     * @return NetworkRecipe object or null if none found
+     */
+    public NetworkRecipe getNetworkRecipe (String networkType, String action, String serviceType) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get network recipe with network type " + networkType
+                                      + " and action "
+                                      + action
+                                      + " and service type "
+                                      + serviceType);
+
+        try {
+            String hql;
+            if (serviceType == null) {
+                hql = "FROM NetworkRecipe WHERE networkType = :networkType AND action = :action AND serviceType IS NULL ";
+            } else {
+                hql = "FROM NetworkRecipe WHERE networkType = :networkType AND action = :action AND serviceType = :serviceType ";
+            }
+            Query query = getSession ().createQuery (hql);
+            query.setParameter (NETWORK_TYPE, networkType);
+            query.setParameter (ACTION, action);
+            if (serviceType != null) {
+                query.setParameter ("serviceType", serviceType);
+            }
+
+            @SuppressWarnings("unchecked")
+            List <NetworkRecipe> resultList = query.list ();
+
+            if (resultList.isEmpty ()) {
+                return null;
+            }
+            
+            Collections.sort (resultList, new MavenLikeVersioningComparator ());
+            Collections.reverse (resultList);
+            
+            return resultList.get (0);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkRecipe", null);
+        }
+    }
+    
+    /**
+     * Return a Network recipe that matches a given NETWORK_TYPE and ACTION
+     *
+     * @param networkType
+     * @param action 
+     * @return NetworkRecipe object or null if none found
+     */
+    public NetworkRecipe getNetworkRecipe (String networkType, String action) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get network recipe with network type " + networkType
+                                      + " and action "
+                                      + action
+                                      );
+
+        try {
+            String hql = "FROM NetworkRecipe WHERE networkType = :networkType AND action = :action";
+            
+            Query query = getSession ().createQuery (hql);
+            query.setParameter (NETWORK_TYPE, networkType);
+            query.setParameter (ACTION, action);
+            
+            @SuppressWarnings("unchecked")
+            List <NetworkRecipe> resultList = query.list ();
+
+            if (resultList.isEmpty ()) {
+                return null;
+            }
+            
+            Collections.sort (resultList, new MavenLikeVersioningComparator ());
+            Collections.reverse (resultList);
+            
+            return resultList.get (0);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkRecipe", null);
+        }
+    }
+
+    /**
+     * Return a VnfComponents recipe that matches a given VNF_TYPE, VNF_COMPONENT_TYPE, ACTION, and, if specified,
+     * SERVICE_TYPE
+     *
+     * @param vnfType
+     * @param vnfComponentType
+     * @param action
+     * @param serviceType
+     * @return VnfComponentsRecipe object or null if none found
+     */
+    public VnfComponentsRecipe getVnfComponentsRecipe (String vnfType,
+                                                       String vnfComponentType,
+                                                       String action,
+                                                       String serviceType) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get Vnf Component recipe with network type " + vnfType
+                                      + " and component type "
+                                      + vnfComponentType
+                                      + " and action "
+                                      + action
+                                      + " and service type "
+                                      + serviceType);
+
+        try {
+            String hql;
+            if (serviceType == null) {
+                hql = "FROM VnfComponentsRecipe WHERE vnfType = :vnfType AND vnfComponentType = :vnfComponentType AND action = :action AND serviceType IS NULL ";
+            } else {
+                hql = "FROM VnfComponentsRecipe WHERE vnfType = :vnfType AND vnfComponentType = :vnfComponentType AND action = :action AND serviceType = :serviceType ";
+            }
+            Query query = getSession ().createQuery (hql);
+            query.setParameter (VNF_TYPE, vnfType);
+            query.setParameter (VNF_COMPONENT_TYPE, vnfComponentType);
+            query.setParameter (ACTION, action);
+            if (serviceType != null) {
+                query.setParameter ("serviceType", serviceType);
+            }
+
+            @SuppressWarnings("unchecked")
+            List <VnfComponentsRecipe> resultList = query.list ();
+
+            if (resultList.isEmpty ()) {
+                return null;
+            }
+            Collections.sort (resultList, new MavenLikeVersioningComparator ());
+            Collections.reverse (resultList);
+            
+            return resultList.get (0);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfComponentsRecipe", null);
+        }
+    }
+    
+    /**
+     * Return a VnfComponents recipe that matches a given VF_MODULE_ID, VNF_COMPONENT_TYPE, ACTION
+     *
+     * @param vfModuleId
+     * @param vnfComponentType
+     * @param action    
+     * @return VnfComponentsRecipe object or null if none found
+     */
+    public VnfComponentsRecipe getVnfComponentsRecipeByVfModuleId (String vfModuleId,
+                                                       String vnfComponentType,
+                                                       String action) {                     
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get Vnf Component recipe with vfModuleId " + vfModuleId
+                                      + " and component type "
+                                      + vnfComponentType
+                                      + " and action "
+                                      + action);
+
+        try {
+            String hql;
+            hql = "FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND vnfComponentType = :vnfComponentType AND action = :action ";
+            
+            Query query = getSession ().createQuery (hql);
+            query.setParameter (VF_MODULE_ID, vfModuleId);
+            query.setParameter (VNF_COMPONENT_TYPE, vnfComponentType);
+            query.setParameter (ACTION, action);
+            
+            @SuppressWarnings("unchecked")
+            List <VnfComponentsRecipe> resultList = query.list ();
+
+            if (resultList.isEmpty ()) {
+                return null;
+            }
+            Collections.sort (resultList, new MavenLikeVersioningComparator ());
+            Collections.reverse (resultList);
+            
+            return resultList.get (0);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfComponentsRecipeByVfModuleId", null);
+        }
+    }
+
+
+
+    public void saveOrUpdateVnfComponent (VnfComponent vnfComponent) {
+        long startTime = System.currentTimeMillis ();
+
+        LOGGER.debug ("Catalog database - save VnfComponent where vnfId="+ vnfComponent.getVnfId()+ " AND componentType="+ vnfComponent.getComponentType());
+
+        VnfComponent vnfComponentDb = this.getVnfComponent(vnfComponent.getVnfId(), vnfComponent.getComponentType());
+
+        try {
+
+            if (vnfComponentDb != null) {
+                this.getSession ().merge (vnfComponent);
+            } else {
+                this.getSession ().save (vnfComponent);
+            }
+
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveOrUpdateVnfComponent", null);
+        }
+    }
+
+    /**
+     * Return a VfModule record that matches a given MODEL_NAME
+     *
+     * @param modelName
+     * @return VfModule object or null if none found
+     */
+    public VfModule getVfModule (String modelName) {
+
+        long startTime = System.currentTimeMillis ();
+        LOGGER.debug ("Catalog database - get vf module with model name " + modelName);
+
+        try {
+            String hql;
+
+            hql = "FROM VfModule WHERE modelName = :modelName";
+
+            Query query = getSession ().createQuery (hql);
+            query.setParameter (MODEL_NAME, modelName);
+
+            @SuppressWarnings("unchecked")
+            List <VfModule> resultList = query.list ();
+
+            if (resultList.isEmpty ()) {
+                return null;
+            }
+            Collections.sort (resultList, new MavenLikeVersioningComparator ());
+            Collections.reverse (resultList);
+
+            return resultList.get (0);
+        } finally {
+            LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModule", null);
+        }
+    }
+
+
+    /**
+     * Verify the health of the DB.
+     *
+     * @return boolean value indicate whether DB is healthy
+     */
+    public boolean healthCheck () {
+        long startTime = System.currentTimeMillis ();
+        Session session = this.getSession ();
+
+        Query query = session.createSQLQuery (" show tables ");
+
+        List<?> list = query.list();
+        LOGGER.debug("healthCheck CatalogDB - Successful");
+        return true;
+    }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatEnvironment.java
new file mode 100644 (file)
index 0000000..69db27e
--- /dev/null
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class HeatEnvironment extends MavenLikeVersioning {
+       private int id;
+       private String name = null;
+       private String description = null;
+       private String environment = null;
+
+       private String asdcUuid;
+       private String asdcResourceName;
+       private String asdcLabel;
+
+       private Timestamp created;
+       
+       public HeatEnvironment() {}
+
+       public int getId() {
+               return this.id;
+       }
+
+       public void setId(int id) {
+               this.id = id;
+       }
+
+
+    /**
+     * @return the name
+     */
+    public String getName () {
+        return name;
+    }
+
+
+    /**
+     * @param name the name to set
+     */
+    public void setName (String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+               return this.description;
+       }
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getEnvironment() {
+               return this.environment;
+       }
+       public void setEnvironment(String environment) {
+               this.environment = environment;
+       }
+
+       public String getAsdcUuid() {
+               return asdcUuid;
+       }
+
+       public void setAsdcUuid(String asdcUuid) {
+               this.asdcUuid = asdcUuid;
+       }
+       public String getAsdcLabel() {
+               return this.asdcLabel;
+       }
+       public void setAsdcLabel(String asdcLabel) {
+               this.asdcLabel = asdcLabel;
+       }
+
+
+    /**
+     * @return the asdcResourceName
+     */
+    public String getAsdcResourceName () {
+        return asdcResourceName;
+    }
+
+
+    /**
+     * @param asdcResourceName the asdcResourceName to set
+     */
+    public void setAsdcResourceName (String asdcResourceName) {
+        this.asdcResourceName = asdcResourceName;
+    }
+
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+    
+    @Override
+       public String toString () {
+               StringBuffer sb = new StringBuffer();
+               sb.append ("ID=" + this.id);
+        sb.append (", name=");
+        sb.append (name);
+        sb.append (", version=");
+        sb.append (version);
+        sb.append(", description=");
+        sb.append (description == null ? "null" : description);
+        sb.append(", environment=");
+        sb.append (environment == null ? "null" : environment);
+        sb.append(", asdcUuid=");
+        sb.append (asdcUuid == null ? "null" : asdcUuid);
+               sb.append (", asdcResourceName=");
+               sb.append (asdcResourceName == null ? "null" : asdcResourceName);
+               if (created != null) {
+               sb.append (",created=");
+               sb.append (DateFormat.getInstance().format(created));
+           }
+               return sb.toString();
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatFiles.java
new file mode 100644 (file)
index 0000000..a1b6f22
--- /dev/null
@@ -0,0 +1,137 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class HeatFiles extends MavenLikeVersioning {
+       private int id;
+       private String description = null;
+       private String fileName;
+       private String fileBody;
+       private int vnfResourceId;
+       private Timestamp created;
+       private String asdcUuid;
+       private String asdcLabel;
+    private String asdcResourceName;
+       
+       public HeatFiles() {}
+       
+       public int getId() {
+               return this.id;
+       }
+       
+       public void setId(int id) {
+               this.id = id;
+       }
+       
+       public String getDescription() {
+               return this.description;
+       }
+       public void setDescription(String description) {
+               this.description = description;
+       }
+       
+       public String getFileName() {
+               return this.fileName;
+       }
+       public void setFileName(String fileName) {
+               this.fileName = fileName;
+       }
+       
+       public String getFileBody() {
+               return this.fileBody;
+       }
+       public void setFileBody(String fileBody) {
+               this.fileBody = fileBody;
+       }
+       
+       public int getVnfResourceId() {
+               return this.vnfResourceId;
+       }
+       public void setVnfResourceId(int vnfResourceId) {
+               this.vnfResourceId = vnfResourceId;
+       }
+
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+       
+       public String getAsdcUuid() {
+               return this.asdcUuid;
+       }
+       public void setAsdcUuid(String asdcUuid) {
+               this.asdcUuid = asdcUuid;
+       }
+       public String getAsdcLabel() {
+               return this.asdcLabel;
+       }
+       public void setAsdcLabel(String asdcLabel) {
+               this.asdcLabel = asdcLabel;
+       }
+       public String getAsdcResourceName() {
+               return asdcResourceName;
+       }
+
+       public void setAsdcResourceName(String asdcResourceName) {
+               this.asdcResourceName = asdcResourceName;
+       }
+
+       @Override
+       public String toString () {
+               StringBuffer sb = new StringBuffer();
+               sb.append ("ID=" + this.id);
+               if (this.description == null) {
+                       sb.append(", description=null");
+               } else {
+                       sb.append(", description=" + this.description);
+               }
+               if (this.fileName == null) {
+                       sb.append(", fileName=null");
+               } else {
+                       sb.append(",fileName=" + this.fileName);
+               }
+               if (this.fileBody == null) {
+                       sb.append(", fileBody=null");
+               } else {
+                       sb.append(",fileBody=" + this.fileBody);
+               }
+               if (this.asdcResourceName == null) {
+                       sb.append(", asdcResourceName=null");
+               } else {
+                       sb.append(",asdcResourceName=" + this.asdcResourceName);
+               }
+               if (created != null) {
+               sb.append (",created=");
+               sb.append (DateFormat.getInstance().format(created));
+           }
+               sb.append(", vnfResourceId=" + this.vnfResourceId);
+               return sb.toString();
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplate.java
new file mode 100644 (file)
index 0000000..eabbacf
--- /dev/null
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.io.Serializable;
+
+public class HeatNestedTemplate implements Serializable {
+
+    private int parentTemplateId;
+    private int childTemplateId;
+    private String providerResourceFile;
+    public static final long serialVersionUID = -1322322139926390329L;
+
+    public HeatNestedTemplate () {
+        super ();
+    }
+
+    public void setParentTemplateId (int parentTemplateId) {
+        this.parentTemplateId = parentTemplateId;
+    }
+
+    public int getParentTemplateId () {
+        return this.parentTemplateId;
+    }
+
+    public void setChildTemplateId (int childTemplateId) {
+        this.childTemplateId = childTemplateId;
+    }
+
+    public int getChildTemplateId () {
+        return this.childTemplateId;
+    }
+
+    public void setProviderResourceFile (String providerResourceFile) {
+        this.providerResourceFile = providerResourceFile;
+    }
+
+    public String getProviderResourceFile () {
+        return this.providerResourceFile;
+    }
+
+    @Override
+    public String toString () {
+        StringBuilder sb = new StringBuilder ();
+        sb.append ("ParentTemplateId=" + this.parentTemplateId);
+        sb.append (", ChildTemplateId=" + this.childTemplateId);
+        if (this.providerResourceFile == null) {
+            sb.append (", providerResourceFile=null");
+        } else {
+            sb.append (",providerResourceFile=" + this.providerResourceFile);
+        }
+        return sb.toString ();
+    }
+
+    @Override
+    public boolean equals (Object o) {
+        if (!(o instanceof HeatNestedTemplate)) {
+            return false;
+        }
+        if (this == o) {
+            return true;
+        }
+        HeatNestedTemplate hnt = (HeatNestedTemplate) o;
+        if (hnt.getChildTemplateId () == this.childTemplateId && hnt.getParentTemplateId () == this.parentTemplateId) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode () {
+        // hash code does not have to be a unique result - only that two objects that should be treated as equal
+        // return the same value. so this should work.
+        int result = 0;
+        result = this.parentTemplateId + this.childTemplateId;
+        return result;
+    }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplate.java
new file mode 100644 (file)
index 0000000..a80fa59
--- /dev/null
@@ -0,0 +1,217 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import java.util.Date;
+import java.util.Set;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+import org.openecomp.mso.logger.MsoLogger;
+
+public class HeatTemplate extends MavenLikeVersioning {
+
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
+
+    private int id;
+    private String templateName;
+    private String templatePath = null;
+    private String templateBody = null;
+    private int timeoutMinutes;
+    private Set <HeatTemplateParam> parameters;
+    private Set <HeatNestedTemplate> files;
+    private String description;
+    private String asdcUuid;
+    private String asdcResourceName;
+    private String asdcLabel;
+    
+    private Timestamp created;
+    
+    public enum TemplateStatus {
+                                PARENT, CHILD, PARENT_COMPLETE
+    }
+
+    public HeatTemplate () {
+    }
+
+    public int getId () {
+        return id;
+    }
+
+    public void setId (int id) {
+        this.id = id;
+    }
+
+    public String getTemplateName () {
+        return templateName;
+    }
+
+    public void setTemplateName (String templateName) {
+        this.templateName = templateName;
+    }
+
+    public String getTemplatePath () {
+        return templatePath;
+    }
+
+    public void setTemplatePath (String templatePath) {
+        this.templatePath = templatePath;
+    }
+
+    public String getTemplateBody () {
+        return templateBody;
+    }
+
+    public void setTemplateBody (String templateBody) {
+        this.templateBody = templateBody;
+    }
+
+    public int getTimeoutMinutes () {
+        return timeoutMinutes;
+    }
+
+    public void setTimeoutMinutes (int timeout) {
+        this.timeoutMinutes = timeout;
+    }
+
+    public Set <HeatTemplateParam> getParameters () {
+        return parameters;
+    }
+
+    public void setParameters (Set <HeatTemplateParam> parameters) {
+        this.parameters = parameters;
+    }
+    
+    public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getHeatTemplate () {
+        if (templateBody != null && !templateBody.isEmpty ()) {
+            // The template body is in the DB table. Just return it.
+            return templateBody;
+        }
+
+        String body = null;
+
+        try (BufferedReader reader = new BufferedReader (new FileReader (templatePath)))
+        {
+            String line = null;
+            StringBuilder stringBuilder = new StringBuilder ();
+            while ((line = reader.readLine ()) != null) {
+                stringBuilder.append (line);
+            }
+            body = stringBuilder.toString ();
+        } catch (Exception e) {
+            LOGGER.debug ("Error reading template file " + templatePath, e);
+        }
+        
+        return body;
+    }
+
+    public void setFiles (Set <HeatNestedTemplate> files) {
+        this.files = files;
+    }
+
+    public Set <HeatNestedTemplate> getFiles () {
+        return this.files;
+    }
+
+       public String getAsdcUuid() {
+               return asdcUuid;
+       }
+
+       public void setAsdcUuid(String asdcUuidp) {
+               this.asdcUuid = asdcUuidp;
+       }
+           
+    public String getAsdcResourceName() {
+               return asdcResourceName;
+       }
+
+       public void setAsdcResourceName(String asdcResourceName) {
+               this.asdcResourceName = asdcResourceName;
+       }
+       public String getAsdcLabel() {
+               return this.asdcLabel;
+       }
+       public void setAsdcLabel(String asdcLabel) {
+               this.asdcLabel = asdcLabel;
+       }
+       
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+
+       @Override
+    public String toString () {
+        String body = (templateBody != null) ? "(" + templateBody.length () + " chars)" : "(Not defined)";
+        StringBuilder sb = new StringBuilder ();
+        sb.append ("Template=")
+          .append (templateName)
+          .append (",version=")
+          .append (version)
+          .append (",path=")
+          .append (templatePath)
+          .append (",body=")
+          .append (body)
+          .append (",timeout=")
+          .append (timeoutMinutes)
+          .append (",asdcUuid=")
+          .append (asdcUuid)
+          .append (",asdcResourceName=")
+          .append (asdcResourceName)
+          .append (",description=")
+          .append (description);
+        if (created != null) {
+               sb.append (",created=");
+               sb.append (DateFormat.getInstance().format(created));
+        }
+        
+
+        if (parameters != null && !parameters.isEmpty ()) {
+            sb.append (",params=[");
+            for (HeatTemplateParam param : parameters) {
+                sb.append (param.getParamName ());
+                if (param.isRequired ()) {
+                    sb.append ("(reqd)");
+                }
+                sb.append (",");
+            }
+            sb.replace (sb.length () - 1, sb.length (), "]");
+        }
+        return sb.toString ();
+    }
+
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java
new file mode 100644 (file)
index 0000000..0d77a0a
--- /dev/null
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+public class HeatTemplateParam {
+       private int id;
+       private int heatTemplateId;
+       private String paramName;
+       private boolean required;
+       private String paramType;
+       private String paramAlias;
+       
+       public HeatTemplateParam() {}
+       
+       public int getId() {
+               return id;
+       }
+       public void setId(int id) {
+               this.id = id;
+       }
+       public int getHeatTemplateId() {
+               return heatTemplateId;
+       }
+       public void setHeatTemplateId(int heatTemplateId) {
+               this.heatTemplateId = heatTemplateId;
+       }
+       public String getParamName() {
+               return paramName;
+       }
+       public void setParamName(String paramName) {
+               this.paramName = paramName;
+       }
+       public boolean isRequired() {
+               return required;
+       }
+       public void setRequired(boolean required) {
+               this.required = required;
+       }
+       public String getParamAlias() {
+               return paramAlias;
+       }
+       public void setParamAlias(String paramAlias) {
+               this.paramAlias = paramAlias;
+       }
+       
+       public String getParamType() {
+           return paramType;
+       }
+       
+       public void setParamType (String paramType) {
+           this.paramType = paramType;
+       }
+       
+       
+       @Override
+       public String toString () {
+               return "Param=" + paramName + ",type=" + paramType + ",required=" + required + ",paramAlias=" + paramAlias;
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
new file mode 100644 (file)
index 0000000..1cd3526
--- /dev/null
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+public class NetworkRecipe extends Recipe {
+       private String networkType;
+       private String networkParamXSD;
+       public NetworkRecipe() {}
+
+       public String getNetworkType() {
+               return networkType;
+       }
+       public void setNetworkType(String networkType) {
+               this.networkType = networkType;
+       }
+
+       public String getNetworkParamXSD() {
+               return networkParamXSD;
+       }
+       public void setNetworkParamXSD(String networkParamXSD) {
+               this.networkParamXSD = networkParamXSD;
+       }
+       
+       @Override
+       public String toString () {
+               StringBuffer sb = new StringBuffer();
+               sb.append(super.toString());
+               sb.append (",networkType=" + networkType);
+               sb.append (",networkParamXSD=" + networkParamXSD);
+               return sb.toString();
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java
new file mode 100644 (file)
index 0000000..be812fa
--- /dev/null
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+
+public class NetworkResource extends MavenLikeVersioning {
+       private int id;
+       private String networkType;
+       private String orchestrationMode = null;
+       private String description = null;
+       private int templateId;
+       private String neutronNetworkType = null;
+       private String aicVersionMin = null;
+       private String aicVersionMax = null;
+       
+       private Timestamp created;
+       
+       public NetworkResource() {}
+       
+       public int getId() {
+               return id;
+       }
+       
+       public void setId(int id) {
+               this.id = id;
+       }
+       
+       public String getNetworkType() {
+               return networkType;
+       }
+       public void setNetworkType(String networkType) {
+               this.networkType = networkType;
+       }
+       
+       public String getOrchestrationMode() {
+               return orchestrationMode;
+       }
+       public void setOrchestrationMode(String orchestrationMode) {
+               this.orchestrationMode = orchestrationMode;
+       }
+       
+       public String getDescription() {
+               return description;
+       }
+       public void setDescription(String description) {
+               this.description = description;
+       }
+       
+       public int getTemplateId () {
+               return templateId;
+       }
+       
+       public void setTemplateId (int templateId) {
+               this.templateId = templateId;
+       }
+       
+       public String getNeutronNetworkType() {
+               return neutronNetworkType;
+       }
+
+       public void setNeutronNetworkType(String neutronNetworkType) {
+               this.neutronNetworkType = neutronNetworkType;
+       }
+       
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+               
+       public String getAicVersionMin() {
+               return aicVersionMin;
+       }
+
+       public void setAicVersionMin(String aicVersionMin) {
+               this.aicVersionMin = aicVersionMin;
+       }
+
+       public String getAicVersionMax() {
+               return aicVersionMax;
+       }
+
+       public void setAicVersionMax(String aicVersionMax) {
+               this.aicVersionMax = aicVersionMax;
+       }
+
+       @Override
+       public String toString () {
+               StringBuffer sb = new StringBuffer();
+               sb.append("NETWORK=");
+               sb.append(networkType);
+               sb.append(",version=");
+               sb.append(version);
+               sb.append(",mode=");
+               sb.append(orchestrationMode);
+               sb.append(",template=");
+               sb.append(templateId);
+               sb.append(",neutronType=");
+               sb.append(neutronNetworkType);
+               sb.append(",aicVersionMin=");
+               sb.append(aicVersionMin);
+               sb.append(",aicVersionMax=");
+               sb.append(aicVersionMax);
+               
+               sb.append("id=");
+               sb.append(id);
+               
+               if (created != null) {
+               sb.append (",created=");
+               sb.append (DateFormat.getInstance().format(created));
+           }
+               return sb.toString();
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java
new file mode 100644 (file)
index 0000000..b0a34e6
--- /dev/null
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class Recipe extends MavenLikeVersioning {
+
+    private int id;
+    protected String action;
+    private String description;
+    protected String orchestrationUri;
+    private int recipeTimeout;
+    private String serviceType;
+
+       private Timestamp created;
+    
+    public Recipe () {
+        super ();
+    }
+
+    public int getId () {
+       return id;
+    }
+
+    public void setId (int id) {
+       this.id = id;
+    }
+
+    public String getAction () {
+       return action;
+    }
+
+    public void setAction (String action) {
+       this.action = action;
+    }
+
+    public String getDescription () {
+       return description;
+    }
+
+    public void setDescription (String description) {
+       this.description = description;
+    }
+
+    public String getOrchestrationUri () {
+       return orchestrationUri;
+    }
+
+    public void setOrchestrationUri (String orchestrationUri) {
+       this.orchestrationUri = orchestrationUri;
+    }
+
+    public int getRecipeTimeout () {
+       return recipeTimeout;
+    }
+
+    public void setRecipeTimeout (int recipeTimeout) {
+       this.recipeTimeout = recipeTimeout;
+    }
+
+    public String getServiceType () {
+       return serviceType;
+    }
+
+    public void setServiceType (String serviceType) {
+       this.serviceType = serviceType;
+    }
+
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+
+       @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("RECIPE: " + action);
+        sb.append(",uri=" + orchestrationUri);
+       
+        if (created != null) {
+               sb.append (",created=");
+               sb.append (DateFormat.getInstance().format(created));
+           }
+        return sb.toString();
+    }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Service.java
new file mode 100644 (file)
index 0000000..07fb355
--- /dev/null
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import java.util.Map;
+
+public class Service extends MavenLikeVersioning {
+       private int id;
+       private String serviceName;
+       private String description;
+       private String httpMethod;
+       private String serviceNameVersionId;
+       private String serviceVersion;
+       private Map<String,ServiceRecipe> recipes;
+       
+       private String modelInvariantUUID;
+       private Timestamp created;
+       
+       public Service() {}
+       
+       public int getId() {
+               return id;
+       }
+       public void setId(int id) {
+               this.id = id;
+       }
+       
+       public String getServiceName() {
+               return serviceName;
+       }
+       public void setServiceName(String serviceName) {
+               this.serviceName = serviceName;
+       }
+       
+       public String getDescription() {
+               return description;
+       }
+       public void setDescription(String description) {
+               this.description = description;
+       }
+       
+       public Map<String, ServiceRecipe> getRecipes() {
+               return recipes;
+       }
+       public void setRecipes(Map<String, ServiceRecipe> recipes) {
+               this.recipes = recipes;
+       }
+       
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+               
+       public String getHttpMethod() {
+               return httpMethod;
+       }
+
+       public void setHttpMethod(String httpMethod) {
+               this.httpMethod = httpMethod;
+       }
+
+       public String getServiceNameVersionId() {
+               return serviceNameVersionId;
+       }
+
+       public void setServiceNameVersionId(String serviceNameVersionId) {
+               this.serviceNameVersionId = serviceNameVersionId;
+       }
+
+       public String getServiceVersion() {
+               return serviceVersion;
+       }
+
+       public void setServiceVersion(String serviceVersion) {
+               this.serviceVersion = serviceVersion;
+       }
+       
+       public String getModelInvariantUUID() {
+               return modelInvariantUUID;
+       }
+
+       public void setModelInvariantUUID(String modelInvariantUUID) {
+               this.modelInvariantUUID = modelInvariantUUID;
+       }
+
+       @Override
+       public String toString() {
+               StringBuilder sb = new StringBuilder();
+               sb.append("SERVICE: id=" + id + ",name=" + serviceName + ",version=" + version + ",description=" + description+",modelInvariantUUID="+modelInvariantUUID);
+               for (String recipeAction : recipes.keySet()) {
+                       ServiceRecipe recipe = recipes.get(recipeAction);
+                       sb.append ("\n" + recipe.toString());
+               }
+               if (created != null) {
+                       sb.append (",created=");
+                       sb.append (DateFormat.getInstance().format(created));
+               }
+               return sb.toString();
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceRecipe.java
new file mode 100644 (file)
index 0000000..53ec3ba
--- /dev/null
@@ -0,0 +1,119 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class ServiceRecipe extends MavenLikeVersioning {
+       private int id;
+       private int serviceId;
+       private String action;
+       private String description;
+       private String orchestrationUri;
+       private String serviceParamXSD;
+       private int recipeTimeout;
+       private Integer serviceTimeoutInterim;
+       
+       private Timestamp created;
+       
+
+       public int getId() {
+               return id;
+       }
+       public void setId(int id) {
+               this.id = id;
+       }
+
+       public int getServiceId() {
+               return serviceId;
+       }
+       public void setServiceId(int serviceId) {
+               this.serviceId = serviceId;
+       }
+
+       public String getAction() {
+               return action;
+       }
+       public void setAction(String action) {
+               this.action = action;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getOrchestrationUri() {
+               return orchestrationUri;
+       }
+       public void setOrchestrationUri(String orchestrationUri) {
+               this.orchestrationUri = orchestrationUri;
+       }
+
+       public String getServiceParamXSD() {
+               return serviceParamXSD;
+       }
+       public void setServiceParamXSD(String serviceParamXSD) {
+               this.serviceParamXSD = serviceParamXSD;
+       }
+
+       public int getRecipeTimeout() {
+               return recipeTimeout;
+       }
+       public void setRecipeTimeout(int recipeTimeout) {
+               this.recipeTimeout = recipeTimeout;
+       }
+
+       public Integer getServiceTimeoutInterim() {
+               return serviceTimeoutInterim;
+       }
+
+       public void setServiceTimeoutInterim(Integer serviceTimeoutInterim) {
+               this.serviceTimeoutInterim = serviceTimeoutInterim;
+       }
+       
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+
+       @Override
+       public String toString() {
+               StringBuilder sb = new StringBuilder();
+               sb.append("RECIPE: " + action);
+               sb.append(",uri=" + orchestrationUri);
+        if (created != null) {
+               sb.append (",created=");
+               sb.append (DateFormat.getInstance().format(created));
+           }
+               return sb.toString();
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java
new file mode 100644 (file)
index 0000000..505b3bb
--- /dev/null
@@ -0,0 +1,195 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class VfModule extends MavenLikeVersioning {
+       
+       private int id;
+       private Integer vnfResourceId;
+       private String type;
+       private String modelName;
+       private int isBase;
+       private Integer templateId;
+       private Integer environmentId;
+       private Integer volTemplateId;
+       private Integer volEnvironmentId;
+       private String description;
+       private String asdcUuid;
+    private Timestamp created;  
+    private String modelInvariantUuid;
+    private String modelVersion;
+    
+    public VfModule() {
+               super();
+       }
+       
+       public int getId(){
+               return this.id;
+       }
+       public void setId(int id) {
+               this.id = id;
+       }
+       
+       public Integer getVnfResourceId() {
+               return this.vnfResourceId;
+       }
+       public void setVnfResourceId(Integer vnfResourceId) {
+               this.vnfResourceId = vnfResourceId;
+       }
+       
+       public String getModelName() {
+               return this.modelName;
+       }
+       public void setModelName(String modelName) {
+               this.modelName = modelName;
+       }
+               
+       public String getType() {
+               return type;
+       }
+
+       public void setType(String type) {
+               this.type = type;
+       }
+
+       public int getIsBase() {
+               return this.isBase;
+       }
+       public void setIsBase(int isBase) {
+               this.isBase = isBase;
+       }
+       public boolean isBase() {
+               if (this.isBase == 0) {
+                       return false;
+               } else {
+                       return true;
+               }
+       }
+       
+       public Integer getTemplateId() {
+               return this.templateId;
+       }
+       public void setTemplateId(Integer templateId) {
+               this.templateId = templateId;
+       }
+       
+       public Integer getEnvironmentId() {
+               return this.environmentId;
+       }
+       public void setEnvironmentId(Integer environmentId) {
+               this.environmentId = environmentId;
+       }
+
+       public Integer getVolTemplateId() {
+               return this.volTemplateId;
+       }
+       public void setVolTemplateId(Integer volTemplateId) {
+               this.volTemplateId = volTemplateId;
+       }
+       
+       public Integer getVolEnvironmentId() {
+               return this.volEnvironmentId;
+       }
+       public void setVolEnvironmentId(Integer volEnvironmentId) {
+               this.volEnvironmentId = volEnvironmentId;
+       }
+       
+       public String getDescription() {
+               return this.description;
+       }
+       public void setDescription(String description) {
+               this.description = description;
+       }
+       
+       public String getAsdcUuid() {
+               return asdcUuid;
+       }
+
+       public void setAsdcUuid(String asdcUuidp) {
+               this.asdcUuid = asdcUuidp;
+       }
+    
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+       public String getModelInvariantUuid() {
+               return this.modelInvariantUuid;
+       }
+       public void setModelInvariantUuid(String modelInvariantUuid) {
+               this.modelInvariantUuid = modelInvariantUuid;
+       }
+       
+       
+       public String getModelVersion() {
+               return this.modelVersion;
+       }
+       public void setModelVersion(String modelVersion) {
+               this.modelVersion = modelVersion;
+       }
+       
+    @Override
+       public String toString () {
+       StringBuffer buf = new StringBuffer();
+       
+       buf.append("VF=");
+       buf.append(this.type);
+       buf.append(",modelName=");
+       buf.append(modelName);
+       buf.append(",version=");
+       buf.append(version);
+       buf.append(",id=");
+       buf.append(this.id);
+       buf.append(",vnfResourceId=");
+       buf.append(this.vnfResourceId);
+       buf.append(",templateId=");
+       buf.append(this.templateId);
+       buf.append(",envtId=");
+       buf.append(this.environmentId);
+       buf.append(",volTemplateId=");
+       buf.append(this.volTemplateId);
+       buf.append(",volEnvtId=");
+       buf.append(this.volEnvironmentId);
+       buf.append(", description=");
+       buf.append(this.description);
+       buf.append(",asdcUuid=");
+       buf.append(asdcUuid);
+       buf.append(",modelVersion=");
+       buf.append(this.modelVersion);
+       
+        if (this.created != null) {
+                buf.append (",created=");
+                buf.append (DateFormat.getInstance().format(this.created));
+         }
+       return buf.toString();
+    }
+       
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java
new file mode 100644 (file)
index 0000000..b0b0075
--- /dev/null
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+
+import java.io.Serializable;
+
+public class VfModuleToHeatFiles implements Serializable {
+       
+    private int vfModuleId;
+    private int heatFilesId;
+    public static final long serialVersionUID = -1322322139926390329L;
+
+       public VfModuleToHeatFiles() {
+               super();
+       }
+       
+       public int getVfModuleId() {
+               return this.vfModuleId;
+       }
+       public void setVfModuleId(int vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+       
+       public int getHeatFilesId() {
+               return this.heatFilesId;
+       }
+       public void setHeatFilesId(int heatFilesId) {
+               this.heatFilesId = heatFilesId;
+       }
+       
+    @Override
+    public String toString () {
+        StringBuilder sb = new StringBuilder ();
+        sb.append ("VF_MODULE_ID=" + this.vfModuleId);
+        sb.append (", HEAT_FILES_ID=" + this.heatFilesId);
+        return sb.toString ();
+    }
+
+    @Override
+    public boolean equals (Object o) {
+        if (!(o instanceof VfModuleToHeatFiles)) {
+            return false;
+        }
+        if (this == o) {
+            return true;
+        }
+        VfModuleToHeatFiles vmthf = (VfModuleToHeatFiles) o;
+        if (vmthf.getVfModuleId() == this.getVfModuleId() && vmthf.getVfModuleId() == this.getVfModuleId()) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode () {
+        // hash code does not have to be a unique result - only that two objects that should be treated as equal
+        // return the same value. so this should work.
+        int result = 0;
+        result = this.vfModuleId + this.heatFilesId;
+        return result;
+    }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponent.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponent.java
new file mode 100644 (file)
index 0000000..5a05b95
--- /dev/null
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+
+import java.io.Serializable;
+
+public class VnfComponent implements Serializable {
+    private int vnfId;
+    private String componentType = null;
+    private Integer heatTemplateId;
+    private Integer heatEnvironmentId;
+    public static final long serialVersionUID = -1322322139926390329L;
+
+       private Timestamp created;
+    
+    public VnfComponent() {}
+
+    public int getVnfId() {
+        return vnfId;
+    }
+    public void setVnfId(int id) {
+        this.vnfId = id;
+    }
+
+    public String getComponentType() {
+        return componentType;
+    }
+    public void setComponentType(String ct) {
+        this.componentType = ct;
+    }
+
+    public Integer getHeatTemplateId() {
+        return heatTemplateId;
+    }
+    public void setHeatTemplateId(Integer ht) {
+        this.heatTemplateId = ht;
+    }
+
+    public Integer getHeatEnvironmentId() {
+        return heatEnvironmentId;
+    }
+    public void setHeatEnvironmentId(Integer he) {
+        this.heatEnvironmentId = he;
+    }
+
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+    
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("VnfComponent: ");
+        sb.append("vnfId=" + vnfId);
+        sb.append(",componentType=" + componentType);
+        sb.append(",heatTemplateId=" + heatTemplateId);
+        sb.append(",heatEnvironmentId=" + heatEnvironmentId);
+        
+        if (created != null) {
+               sb.append (",created=");
+               sb.append (DateFormat.getInstance().format(created));
+           }
+        return sb.toString();
+    }
+    
+    @Override
+    public boolean equals (Object o) {
+        if (!(o instanceof VnfComponent)) {
+            return false;
+        }
+        if (this == o) {
+            return true;
+        }
+        VnfComponent vnfComponent = (VnfComponent) o;
+        if (vnfComponent.getVnfId() == this.vnfId && vnfComponent.componentType.equalsIgnoreCase(this.componentType)) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode () {
+        // return the hashCode of the concat string of type+vnfId - should be okay.
+        int result = 0;
+        result = (this.componentType + this.vnfId).toString().hashCode();
+        return result;
+    }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
new file mode 100644 (file)
index 0000000..547b2fc
--- /dev/null
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+public class VnfComponentsRecipe extends Recipe {
+
+       private String vnfType;
+       private String vnfComponentParamXSD;
+       private String vnfComponentType;
+       private String vfModuleId; 
+
+       public VnfComponentsRecipe() {}
+
+       public String getVnfType() {
+               return vnfType;
+       }
+       public void setVnfType(String vnfType) {
+               this.vnfType = vnfType;
+       }
+
+       public String getVnfComponentParamXSD() {
+               return vnfComponentParamXSD;
+       }
+       public void setVnfComponentParamXSD(String vnfComponentParamXSD) {
+               this.vnfComponentParamXSD = vnfComponentParamXSD;
+       }
+       
+       public String getVnfComponentType() {
+               return vnfComponentType;
+       }
+       public void setVnfComponentType(String vnfComponentType) {
+               this.vnfComponentType = vnfComponentType;
+       }
+       
+    public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+
+       @Override
+       public String toString () {
+               StringBuffer sb = new StringBuffer();
+               sb.append(super.toString());
+               sb.append (",vnfComponentParamXSD=" + vnfComponentParamXSD);
+               sb.append (",serviceType=" + getServiceType ());
+               sb.append (",vnfComponentType=" + getVnfComponentType ());
+               sb.append (",vfModuleId=" + getVfModuleId ());
+               return sb.toString();
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
new file mode 100644 (file)
index 0000000..1f0cd0a
--- /dev/null
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+public class VnfRecipe extends Recipe {
+
+       private String vnfType;
+       private String vnfParamXSD;
+       private String vfModuleId; 
+
+       public VnfRecipe() {}
+
+       public String getVnfType() {
+               return vnfType;
+       }
+       public void setVnfType(String vnfType) {
+               this.vnfType = vnfType;
+       }
+
+       public String getVnfParamXSD() {
+               return vnfParamXSD;
+       }
+       public void setVnfParamXSD(String vnfParamXSD) {
+               this.vnfParamXSD = vnfParamXSD;
+       }
+       
+       public String getVfModuleId() {
+               return vfModuleId;
+       }
+
+       public void setVfModuleId(String vfModuleId) {
+               this.vfModuleId = vfModuleId;
+       }
+       
+       @Override
+       public String toString () {
+               StringBuffer sb = new StringBuffer();
+               sb.append(super.toString());
+               sb.append (",vnfParamXSD=" + vnfParamXSD);
+               sb.append (",serviceType=" + getServiceType ());
+               sb.append (",vfModuleId=" + getVfModuleId ());
+               return sb.toString();
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java
new file mode 100644 (file)
index 0000000..60c7ef2
--- /dev/null
@@ -0,0 +1,225 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import java.util.Map;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+public class VnfResource extends MavenLikeVersioning {
+
+    private int id;
+    private String vnfType;
+    
+    private String orchestrationMode = null;
+    private String description = null;
+    private Integer templateId;
+    private Integer environmentId = null;
+    
+    private Map <String, HeatFiles> heatFiles;
+    
+    private String asdcUuid;
+
+    private Timestamp created;    
+    
+    private String aicVersionMin = null;
+    private String aicVersionMax = null;
+        
+    private String modelInvariantUuid = null;
+    private String modelVersion = null;
+
+    private String modelCustomizationName = null;
+    
+    private String modelName = null;
+    private String serviceModelInvariantUUID = null;
+    
+    public VnfResource () {
+    }
+
+    public int getId () {
+        return id;
+    }
+
+    public void setId (int id) {
+        this.id = id;
+    }
+
+    public String getVnfType () {
+        return vnfType;
+    }
+
+    public void setVnfType (String vnfType) {
+        this.vnfType = vnfType;
+    }
+
+    public String getOrchestrationMode () {
+        return orchestrationMode;
+    }
+
+    public void setOrchestrationMode (String orchestrationMode) {
+        this.orchestrationMode = orchestrationMode;
+    }
+
+    public String getDescription () {
+        return description;
+    }
+
+    public void setDescription (String description) {
+        this.description = description;
+    }
+
+    public Integer getTemplateId () {
+        return templateId;
+    }
+
+    public void setTemplateId (Integer templateId) {
+        this.templateId = templateId;
+    }
+
+    public Integer getEnvironmentId () {
+        return this.environmentId;
+    }
+
+    public void setEnvironmentId (Integer environmentId) {
+        this.environmentId = environmentId;
+    }
+    
+    public Map <String, HeatFiles> getHeatFiles () {
+        return this.heatFiles;
+    }
+
+    public void setHeatFiles (Map <String, HeatFiles> heatFiles) {
+        this.heatFiles = heatFiles;
+    }
+
+       public String getAsdcUuid() {
+               return asdcUuid;
+       }
+
+       public void setAsdcUuid(String asdcUuidp) {
+               this.asdcUuid = asdcUuidp;
+       }
+    
+       public Timestamp getCreated() {
+               return created;
+       }
+
+       public void setCreated(Timestamp created) {
+               this.created = created;
+       }
+       
+       public String getAicVersionMin() {
+               return this.aicVersionMin;
+       }
+       
+       public void setAicVersionMin(String aicVersionMin) {
+               this.aicVersionMin = aicVersionMin;
+       }
+       
+       public String getAicVersionMax() {
+               return this.aicVersionMax;
+       }
+       
+       public void setAicVersionMax(String aicVersionMax) {
+               this.aicVersionMax = aicVersionMax;
+       }
+       
+       public String getModelInvariantUuid() {
+               return this.modelInvariantUuid;
+       }
+       
+       public void setModelInvariantUuid(String modelInvariantUuid) {
+               this.modelInvariantUuid = modelInvariantUuid;
+       }
+       
+       public String getModelVersion() {
+               return this.modelVersion;
+       }
+       public void setModelVersion(String modelVersion) {
+               this.modelVersion = modelVersion;
+       }
+       
+       public String getModelCustomizationName() {
+               return modelCustomizationName;
+       }
+
+       public void setModelCustomizationName(String modelCustomizationName) {
+               this.modelCustomizationName = modelCustomizationName;
+       }
+
+       public String getModelName() {
+               return modelName;
+       }
+
+       public void setModelName(String modelName) {
+               this.modelName = modelName;
+       }
+
+       public String getServiceModelInvariantUUID() {
+               return serviceModelInvariantUUID;
+       }
+
+       public void setServiceModelInvariantUUID(String serviceModelInvariantUUID) {
+               this.serviceModelInvariantUUID = serviceModelInvariantUUID;
+       }
+
+       @Override
+       public String toString () {
+               StringBuffer buf = new StringBuffer();
+
+               buf.append("VNF=");
+               buf.append(vnfType);
+               buf.append(",version=");
+               buf.append(version);
+               buf.append(",mode=");
+               buf.append(orchestrationMode);
+               buf.append(",template=");
+               buf.append(templateId);
+               buf.append(",envtId=");
+               buf.append(environmentId);
+               buf.append(",asdcUuid=");
+               buf.append(asdcUuid);
+               buf.append(",aicVersionMin=");
+               buf.append(this.aicVersionMin);
+               buf.append(",aicVersionMax=");
+               buf.append(this.aicVersionMax);
+        buf.append(",modelInvariantUuid=");
+        buf.append(this.modelInvariantUuid);
+        buf.append(",modelVersion=");
+        buf.append(this.modelVersion);
+        buf.append(",modelCustomizationName=");
+        buf.append(this.modelCustomizationName);
+        buf.append(",modelName=");
+        buf.append(this.modelName);
+        buf.append(",serviceModelInvariantUUID=");
+        buf.append(this.serviceModelInvariantUUID);
+        
+               if (created != null) {
+                       buf.append(",created=");
+                       buf.append(DateFormat.getInstance().format(created));
+               }
+               return buf.toString();
+    }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java
new file mode 100644 (file)
index 0000000..c617a4a
--- /dev/null
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.utils;
+
+
+
+/**
+ * This class is the base class for object that requires a Version in Catalog DB.
+ * The version is built on a string as ASDC provides a number like 1.2 or 2.0 ...
+ * This class supports also 1.2.3.4...  (Maven like version)
+ * 
+ *
+ */
+public class MavenLikeVersioning {
+
+       protected String version;
+
+       public String getVersion() {
+               return version;
+       }
+
+       public void setVersion(String version) {
+               this.version = version;
+       }
+
+       /**
+        * This method is used to compare the current object version to a specified one
+        * It is assumed that the version is like the maven one, eg: 2.0.1.5.6
+        *
+        * @param versionToCompare The version that will be used for comparison
+        * @return True if the current object is more recent than the specified version, False otherwise
+        *
+        */
+       public Boolean isMoreRecentThan (String versionToCompare) {
+               if (versionToCompare == null || this.version == null) {
+                       return Boolean.FALSE;
+               }
+               String [] currentVersionArray = this.version.split("\\.");
+               String [] specifiedVersionArray = versionToCompare.split("\\.");
+
+               int smalestStringLength = 0;
+
+               if (currentVersionArray.length > specifiedVersionArray.length) {
+                       smalestStringLength = specifiedVersionArray.length;
+               } else {
+                       smalestStringLength = currentVersionArray.length;
+               }
+
+               for (int currentVersionIndex=0;currentVersionIndex < smalestStringLength;++currentVersionIndex) {
+
+                       if (Integer.valueOf(currentVersionArray[currentVersionIndex]) < Integer.valueOf(specifiedVersionArray[currentVersionIndex])) {
+                               return Boolean.FALSE;
+                       } else if (Integer.valueOf(currentVersionArray[currentVersionIndex]) > Integer.valueOf(specifiedVersionArray[currentVersionIndex])) {
+                               return Boolean.TRUE;
+                       }
+               }
+
+               // Even if versionToCompare has more digits, it means versionToCompare is more recent
+               if (Integer.valueOf(currentVersionArray[smalestStringLength-1]).intValue () == Integer.valueOf(specifiedVersionArray[smalestStringLength-1]).intValue ()) {
+                       if (currentVersionArray.length > specifiedVersionArray.length) {
+                               return Boolean.TRUE;
+                       } else {
+                               return Boolean.FALSE;
+                       }
+               }
+
+               return Boolean.TRUE;
+       }
+
+       /**
+        * This method is used to compare the current object version to a specified one
+        * It is assumed that the version is like the maven one, eg: 2.0.1.5.6
+        *
+        * @param versionToCompare The version that will be used for comparison
+        * @return True if the current object is equal to the specified version, False otherwise
+        *
+        */
+       public Boolean isTheSameVersion (String versionToCompare) {
+               if (versionToCompare == null && this.version == null) {
+                       return Boolean.TRUE;
+               } else if (versionToCompare == null || this.version == null) {
+                       return Boolean.FALSE;
+               }
+               String [] currentVersionArray = this.version.split("\\.");
+               String [] specifiedVersionArray = versionToCompare.split("\\.");
+
+               if (currentVersionArray.length != specifiedVersionArray.length) {
+                       return Boolean.FALSE;
+               }
+
+               for (int currentVersionIndex=0;currentVersionIndex < currentVersionArray.length;++currentVersionIndex) {
+
+                       if (Integer.valueOf(currentVersionArray[currentVersionIndex]).intValue () != Integer.valueOf(specifiedVersionArray[currentVersionIndex]).intValue ()) {
+                               return Boolean.FALSE;
+                       }
+               }
+
+               return Boolean.TRUE;
+       }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparator.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparator.java
new file mode 100644 (file)
index 0000000..e80c03c
--- /dev/null
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.utils;
+
+
+import java.util.Comparator;
+
+/**
+ * This class can be used to sort object from MavenLikeVersioning type.
+ * 
+ *  
+ *
+ */
+public class MavenLikeVersioningComparator implements Comparator<MavenLikeVersioning> {
+               
+       @Override
+       public int compare(MavenLikeVersioning o1, MavenLikeVersioning o2) {
+                final int BEFORE = -1;
+                final int EQUAL = 0;
+                final int AFTER = 1;
+                
+                if (o1.isTheSameVersion(o2.getVersion())) {
+                        return EQUAL;
+                } else if (o1.isMoreRecentThan(o2.getVersion())) {
+                        return AFTER;
+                } else {
+                        return BEFORE;
+                }
+       }
+
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/package-info.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/package-info.java
new file mode 100644 (file)
index 0000000..3644529
--- /dev/null
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+/**
+ * Utility classes for catalog DB.
+ */
+
+package org.openecomp.mso.db.catalog.utils;
+
diff --git a/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml b/mso-catalog-db/src/main/resources/HeatEnvironment.hbm.xml
new file mode 100644 (file)
index 0000000..992e5d4
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.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=========================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Aug 6, 2015 1:11:38 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+    <class name="org.openecomp.mso.db.catalog.beans.HeatEnvironment" table="HEAT_ENVIRONMENT">
+               <meta attribute="class-description">
+                       This class describes a HEAT Environment
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+               <properties name="uk_heatenv" unique="true">
+                       <property name="name" type="string" >
+                            <column name="NAME" length="100" not-null="true"/>
+                       </property>
+                       <property name="version" type="string" >
+                             <column name="VERSION" length="20" not-null="true"/>
+                       </property>
+                       <property name="asdcResourceName" type="string" >
+                             <column name="ASDC_RESOURCE_NAME" length="100" default="'MANUAL RECORD'" not-null="true"/>
+                       </property>
+               </properties>
+               <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+               <property name="environment" type="text">
+                     <column name="ENVIRONMENT" not-null="true"/>
+               </property>
+               <property name="created" type="timestamp" generated="insert" insert="false" update="false">
+                   <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+               <property name="asdcUuid" type="string">
+                 <column name="ASDC_UUID" length="200" default="'MANUAL RECORD'" not-null="false"/>
+               </property>
+               <property name="asdcLabel" column="ASDC_LABEL" type="string" length="200"/>
+               
+    </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml b/mso-catalog-db/src/main/resources/HeatNestedTemplate.hbm.xml
new file mode 100644 (file)
index 0000000..90ae8ab
--- /dev/null
@@ -0,0 +1,38 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="HeatNestedTemplate" table="HEAT_NESTED_TEMPLATE">
+               <meta attribute="class-description">
+                       This class describes a nested HEAT template relationship
+               </meta>
+               
+               <composite-id>
+                       <key-property name="parentTemplateId" column="PARENT_TEMPLATE_ID" type="int" />
+                       <key-property name="childTemplateId" column="CHILD_TEMPLATE_ID" type="int" />
+               </composite-id> 
+                               
+               <property name="providerResourceFile" column="PROVIDER_RESOURCE_FILE" type="string" length="100"/>
+               
+       </class>
+       
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml b/mso-catalog-db/src/main/resources/HeatTemplate.hbm.xml
new file mode 100644 (file)
index 0000000..9bc6fb1
--- /dev/null
@@ -0,0 +1,93 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="HeatTemplate" table="HEAT_TEMPLATE">
+               <meta attribute="class-description">
+                       This class describes a HEAT template
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+               
+               <properties name="uk_template" unique="true">
+                       <property name="templateName" type="string" >
+                            <column name="TEMPLATE_NAME" length="200" not-null="true"/>
+                       </property>
+                       <property name="version" type="string" >
+                            <column name="VERSION" length="20" not-null="true"/>
+                       </property>
+                       <property name="asdcResourceName" type="string" >
+                             <column name="ASDC_RESOURCE_NAME" default="'MANUAL RECORD'" length="100" not-null="true"/>
+                       </property>
+               </properties>
+       
+               <property name="templatePath" column="TEMPLATE_PATH" type="string" length="100"/>
+               <property name="templateBody" type="text">
+                  <column name="TEMPLATE_BODY" not-null="true"/>
+               </property>
+               <property name="timeoutMinutes" column="TIMEOUT_MINUTES" type="int"/>
+               <property name="asdcUuid" type="string" >
+                 <column name="ASDC_UUID" length="200" default="'MANUAL RECORD'" not-null="true"/>
+               </property>
+               <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+               <property name="asdcLabel" column="ASDC_LABEL" type="string" length="200"/>
+               <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+                 <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+               <set name="parameters" cascade="all">
+                       <key column="HEAT_TEMPLATE_ID"/>
+                       <one-to-many class="HeatTemplateParam"/>
+               </set>
+               <set name="files" table="HEAT_NESTED_TEMPLATE" cascade="all">
+                       <key column="CHILD_TEMPLATE_ID"/>
+                       <one-to-many class="HeatTemplate" not-found="ignore"/>
+               </set>
+               
+       </class>
+       
+       <class name="HeatTemplateParam" table="HEAT_TEMPLATE_PARAMS">
+               <meta attribute="class-description">
+                       This class describes an input parameter to a heat template
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+
+               <properties name="uk_heat_params" unique="true">
+                       <property name="heatTemplateId" type="int">
+                            <column name="HEAT_TEMPLATE_ID" not-null="true"/>
+                       </property>
+                       <property name="paramName" type="string" >
+                            <column name="PARAM_NAME" length="100" not-null="true"/>
+                       </property>
+               </properties>
+               <property name="required" type="boolean">
+                 <column name="IS_REQUIRED" not-null="true"/>
+               </property>
+               <property name="paramType" column="PARAM_TYPE" type="string" length="20"/>
+               <property name="paramAlias" column="PARAM_ALIAS" type="string" length="45"/>
+       </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml
new file mode 100644 (file)
index 0000000..bdd16d3
--- /dev/null
@@ -0,0 +1,61 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="NetworkRecipe" table="NETWORK_RECIPE">
+               <meta attribute="class-description">
+                       This class describes a Network recipe
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+
+               <properties name="uk_network_recipe" unique="true">
+                       <property name="networkType" type="string" >
+                            <column name="NETWORK_TYPE" not-null="true" length="20"/>
+                       </property>
+                       <property name="action" type="string" >
+                            <column name="ACTION" not-null="true" length="20"/>
+                       </property>
+                       <property name="version" type="string">
+                            <column name="VERSION_STR" not-null="true" length="20"/>
+                       </property>
+                       
+               </properties>
+               
+               <property name="serviceType" type="string" length="45">
+                 <column name="SERVICE_TYPE" not-null="false" length="45"/>
+        </property>
+               <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+               <property name="orchestrationUri" type="string">
+                 <column name="ORCHESTRATION_URI" not-null="true" length="256"/>
+               </property>
+               <property name="networkParamXSD" column="NETWORK_PARAM_XSD" type="string" length="2048"/>
+               <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
+               <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+                   <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+       </class>
+       
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
new file mode 100644 (file)
index 0000000..b3b657a
--- /dev/null
@@ -0,0 +1,55 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="NetworkResource" table="NETWORK_RESOURCE">
+               <meta attribute="class-description">
+                       This class describes a Network Resource
+               </meta>
+               
+               <id name="id" type="int" column="id"/>
+
+               <properties name="uk_network_resource" unique="true">
+                       <property name="networkType" type="string" >
+                          <column name="NETWORK_TYPE" not-null="true" length="45"/>
+                       </property>
+                       <property name="version" type="string" >
+                         <column name="VERSION_STR" not-null="true" length="20"/>
+                       </property>
+               </properties>
+               <property name="orchestrationMode" column="ORCHESTRATION_MODE" type="string" length="20"/>
+               <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+               <property name="templateId" column="TEMPLATE_ID" type="int"/>
+               <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+                   <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+               <property name="aicVersionMin" type="string" >
+                       <column name="AIC_VERSION_MIN" not-null="false" default="2.5" length="20" />
+               </property>
+               <property name="aicVersionMax" type="string">
+                       <column name="AIC_VERSION_MAX" not-null="false" default="2.5" length="20"/>
+               </property>
+               <property name="neutronNetworkType" column="NEUTRON_NETWORK_TYPE" type="string" length="20"/>
+       </class>
+       
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/Service.hbm.xml b/mso-catalog-db/src/main/resources/Service.hbm.xml
new file mode 100644 (file)
index 0000000..4e43413
--- /dev/null
@@ -0,0 +1,84 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="Service" table="SERVICE">
+               <meta attribute="class-description">
+                       This class describes a Service that may be orchestrated
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+               
+               <property name="serviceName" column="SERVICE_NAME" type="string" length="40"/>
+               <property name="version" column="VERSION_STR" type="string" length="20"/>
+               <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+               <property name="serviceNameVersionId" column="SERVICE_NAME_VERSION_ID" type="string" length="50"/>
+               
+               <property name="serviceVersion" column="SERVICE_VERSION" type="string" length="10"/>
+               <property name="httpMethod" column="HTTP_METHOD" type="string" length="50"/>
+               <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+                  <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+               <property name="modelInvariantUUID" type="string">
+           <column name="MODEL_INVARIANT_UUID" default="'MANUAL_RECORD'" not-null="true" length="200"/>
+        </property>
+               
+               <map name="recipes" cascade="all">
+                       <key column="SERVICE_ID"/>
+                       <map-key column="action" type="string"/>
+                       <one-to-many class="ServiceRecipe"/>
+               </map>
+       </class>
+       
+       <class name="ServiceRecipe" table="SERVICE_RECIPE">
+               <meta attribute="class-description">
+                       This class describes a Service recipe
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+
+               <properties name="uk1_service_recipe" unique="true">
+                       <property name="serviceId" type="int">
+                            <column name="SERVICE_ID" not-null="true"/>
+                       </property>
+                       <property name="action" type="string" >
+                            <column name="ACTION" not-null="true" length="40"/>
+                       </property>
+               </properties>
+               <property name="version" column="VERSION_STR" type="string" length="20"/>
+               <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+               <property name="orchestrationUri" type="string">
+          <column name="ORCHESTRATION_URI" not-null="true" length="256"/>
+        </property>
+               <property name="serviceParamXSD" column="SERVICE_PARAM_XSD" type="string" length="2048"/>
+               <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
+               <property name="serviceTimeoutInterim" column="SERVICE_TIMEOUT_INTERIM" type="java.lang.Integer"/>
+               <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+                   <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+       </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VfModule.hbm.xml b/mso-catalog-db/src/main/resources/VfModule.hbm.xml
new file mode 100644 (file)
index 0000000..1ccc48d
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.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=========================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Apr 28, 2016 2:44:06 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+    <class name="VfModule" table="VF_MODULE">
+        <id name="id" type="int" column="id">
+               <generator class="native"/>
+        </id>
+        
+        <properties name="uk_vfmodule" unique="true">
+            <property name="type" type="string" >
+                <column name="TYPE" not-null="true" length="200"/>
+            </property>
+            <property name="version" type="string" >
+                <column name="ASDC_SERVICE_MODEL_VERSION" not-null="true" length="20"/>
+            </property>
+        </properties>
+        
+        <property name="modelName" type="string" >
+            <column name="MODEL_NAME" not-null="true" length="200"/>
+        </property>
+        <property name="modelVersion" type="string" >
+            <column name="MODEL_VERSION" not-null="true" length="20"/>
+        </property>
+        
+        <property name="asdcUuid" type="java.lang.String" >
+            <column name="ASDC_UUID" not-null="false" length="255"/>
+        </property>
+        <property name="volEnvironmentId" type="java.lang.Integer" >
+            <column name="VOL_ENVIRONMENT_ID" not-null="false"/>
+        </property>
+        <property name="templateId" type="java.lang.Integer" >
+            <column name="TEMPLATE_ID" not-null="false"/>
+        </property>
+        <property name="isBase" type="int">
+            <column name="IS_BASE" not-null="true"/>
+        </property>
+
+               <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+                     <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+        
+        <property name="description" type="java.lang.String" >
+            <column name="DESCRIPTION" not-null="false" length="255"/>
+        </property>
+        <property name="volTemplateId" type="java.lang.Integer" >
+            <column name="VOL_TEMPLATE_ID" not-null="false"/>
+        </property>
+        <property name="vnfResourceId" type="java.lang.Integer" >
+            <column name="VNF_RESOURCE_ID" not-null="true"/>
+        </property>
+        <property name="environmentId" type="java.lang.Integer" >
+            <column name="ENVIRONMENT_ID" not-null="false"/>
+        </property>
+        <property name="modelInvariantUuid" type="java.lang.String" >
+            <column name="MODEL_INVARIANT_UUID" not-null="false" length="255"/>
+        </property>
+
+    </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml b/mso-catalog-db/src/main/resources/VfModuleToHeatFiles.hbm.xml
new file mode 100644 (file)
index 0000000..9af02d8
--- /dev/null
@@ -0,0 +1,36 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="VfModuleToHeatFiles" table="VF_MODULE_TO_HEAT_FILES">
+               <meta attribute="class-description">
+                       This class describes a VF Module to HEAT Files Entry
+               </meta>
+               
+               <composite-id>
+                       <key-property name="vfModuleId" column="VF_MODULE_ID" type="int" />
+                       <key-property name="heatFilesId" column="HEAT_FILES_ID" type="int" />
+               </composite-id> 
+                               
+       </class>
+       
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VnfComponent.hbm.xml b/mso-catalog-db/src/main/resources/VnfComponent.hbm.xml
new file mode 100644 (file)
index 0000000..3cda770
--- /dev/null
@@ -0,0 +1,43 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+  
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+    <class name="VnfComponent" table="VNF_COMPONENTS">
+        <meta attribute="class-description">
+            VnfComponent describes a table of components for a VNF_RESOURCE
+        </meta>
+           
+               <composite-id>
+                       <key-property name="vnfId" column="VNF_ID" type="int" />
+                       <key-property name="componentType" column="COMPONENT_TYPE" type="string" length="20"/>
+               </composite-id> 
+            
+        <property name="heatTemplateId" column="HEAT_TEMPLATE_ID" type="int" />
+        <property name="heatEnvironmentId" column="HEAT_ENVIRONMENT_ID" type="int" />
+        <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+           <column name="CREATION_TIMESTAMP" not-null="true"/>
+        </property>
+
+    </class>
+    
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml
new file mode 100644 (file)
index 0000000..e0ef0d2
--- /dev/null
@@ -0,0 +1,53 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="VnfComponentsRecipe" table="VNF_COMPONENTS_RECIPE">
+               <meta attribute="class-description">
+                       This class describes a VNF Components Recipe
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+               <properties name="uk_vnf_component_recipe" unique="true">
+                       <property name="vnfType" column="VNF_TYPE" type="string" length="200"/>
+                       <property name="vfModuleId" column="VF_MODULE_ID" type="string" length="100" not-null="false"/>
+                       <property name="vnfComponentType" type="string">
+                            <column name="VNF_COMPONENT_TYPE" not-null="true" length="45"/>
+                       </property>
+                       <property name="action" type="string">
+                            <column name="ACTION" not-null="true" length="20"/>
+                       </property>
+                       <property name="serviceType" column="SERVICE_TYPE" type="string" length="45"/>
+                       <property name="version" column="VERSION" type="string" length="20"/>
+               </properties>
+               <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+               <property name="orchestrationUri" type="string">
+          <column name="ORCHESTRATION_URI" not-null="true" length="256"/>
+        </property>
+               <property name="vnfComponentParamXSD" column="VNF_COMPONENT_PARAM_XSD" type="string" length="2048"/>
+               <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
+               <property name="created" column="CREATION_TIMESTAMP" type="timestamp" generated="insert" update="false" insert="false" />
+       </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml
new file mode 100644 (file)
index 0000000..ea2b39e
--- /dev/null
@@ -0,0 +1,66 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="VnfRecipe" table="VNF_RECIPE">
+               <meta attribute="class-description">
+                       This class describes a VNF Recipe
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+
+        <properties name="uk_vnf_recipe" unique="true">
+        
+               <property name="vfModuleId" type="string">
+                   <column name="VF_MODULE_ID" not-null="false" length="100" />
+               </property>
+               <property name="action" type="string">
+                   <column name="ACTION" not-null="true" length="20" />
+               </property>
+               <property name="version" type="string">
+                <column name="VERSION_STR" not-null="true" length="20" />
+            </property>
+            
+        </properties>
+        
+               <property name="vnfType" type="string">
+                       <column name="VNF_TYPE" not-null="false" length="200" />
+               </property>
+               
+               <property name="serviceType" type="string">
+                       <column name="SERVICE_TYPE" not-null="false" length="45" />
+               </property>
+                               
+               <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+               
+               <property name="orchestrationUri" type="string">
+          <column name="ORCHESTRATION_URI" not-null="true" length="256"/>
+        </property>
+        
+               <property name="vnfParamXSD" column="VNF_PARAM_XSD" type="string" length="2048"/>
+               <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
+               <property name="created" column="CREATION_TIMESTAMP" type="timestamp" generated="insert" update="false" insert="false" />
+       </class>
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/VnfResource.hbm.xml b/mso-catalog-db/src/main/resources/VnfResource.hbm.xml
new file mode 100644 (file)
index 0000000..4c9e3b5
--- /dev/null
@@ -0,0 +1,134 @@
+<?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-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+       <class name="VnfResource" table="VNF_RESOURCE">
+               <meta attribute="class-description">
+                       This class describes a VNF Resource
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+               <properties name="uk1" unique="true">
+                       <property name="vnfType" type="string" >
+                         <column name="VNF_TYPE" not-null="true" length="200"/>
+                       </property>
+                   <property name="version" type="string" >
+                     <column name="ASDC_SERVICE_MODEL_VERSION" not-null="true" length="20"/>
+                   </property>
+               </properties>
+               <property name="orchestrationMode" type="string" >
+                     <column name="ORCHESTRATION_MODE" not-null="true" length="20"/>
+               </property>
+               <property name="description" type="string" >
+                 <column name="DESCRIPTION" not-null="false" length="1200"/>
+               </property>
+               
+               <property name="templateId" type="int" not-null="false">
+                 <column name="TEMPLATE_ID" not-null="false"/>
+               </property>
+               <property name="environmentId"  type="int">
+                 <column name="ENVIRONMENT_ID" not-null="false"/>
+               </property>
+               <property name="created" type="timestamp" generated="insert" update="false" insert="false" >
+                 <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+               <property name="asdcUuid" type="string" >
+                 <column name="ASDC_UUID" not-null="false" length="200"/>
+               </property>
+               <property name="aicVersionMin" type="string" >
+                 <column name="AIC_VERSION_MIN" not-null="false" length="20"/>
+               </property>
+               <property name="aicVersionMax" type="string" >
+                 <column name="AIC_VERSION_MAX" not-null="false" length="20"/>
+               </property>
+               <property name="modelInvariantUuid" type="string" >
+                 <column name="MODEL_INVARIANT_UUID" not-null="false" length="200"/>
+               </property>
+               <property name="modelVersion" type="string" >
+                 <column name="MODEL_VERSION" not-null="true" length="20"/>
+               </property>
+               <property name="modelCustomizationName" type="string" >
+          <column name="MODEL_CUSTOMIZATION_NAME" not-null="false" length="200"/>
+        </property>
+        <property name="modelName" type="string" >
+          <column name="MODEL_NAME" not-null="false" length="200"/>
+        </property>
+        <property name="serviceModelInvariantUUID" type="string" >
+          <column name="SERVICE_MODEL_INVARIANT_UUID" not-null="false" length="200"/>
+        </property>
+               
+               <map name="heatFiles" cascade="all">
+                       <key column="VNF_RESOURCE_ID" foreign-key="none"/>
+                       <map-key column="FILE_NAME" type="string"/>
+                       <one-to-many class="HeatFiles"/>
+               </map>
+               
+       </class>
+       
+       <class name="HeatFiles" table="HEAT_FILES">
+               <meta attribute="class-description">
+                       This class describes a HEAT Template File
+               </meta>
+               
+               <id name="id" type="int" column="id">
+                       <generator class="native"/>
+               </id>
+
+               <properties name="uk_heat_files" unique="true">
+                       <property name="fileName" type="string" >
+                            <column name="FILE_NAME" not-null="true" length="200"/>
+                       </property>
+                       <property name="asdcResourceName" type="string" >
+                            <column name="ASDC_RESOURCE_NAME" not-null="true" length="100"/>
+                       </property>
+                       <property name="version" type="string" >
+                            <column name="VERSION" not-null="true" length="20"/>
+                       </property>
+               </properties>
+               
+               <property name="vnfResourceId" type="int">
+                 <column name="VNF_RESOURCE_ID" not-null="false"/>
+        </property>
+               <property name="description"  type="string" >
+                 <column name="DESCRIPTION" not-null="false" length="1200"/>
+               </property>
+               <property name="fileBody" type="text">
+                 <column name="FILE_BODY" not-null="true"/>
+               </property>
+               <property name="created"  type="timestamp" generated="insert" update="false" insert="false">
+                 <column name="CREATION_TIMESTAMP" not-null="true"/>
+               </property>
+               
+               <property name="asdcUuid"  type="string"  >
+                 <column name="ASDC_UUID" not-null="false" length="200"/>
+               </property>
+               <property name="asdcLabel"  type="string"  >
+                 <column name="ASDC_LABEL" not-null="false" length="200"/>
+               </property>
+               
+               
+       </class>
+       
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/hibernate-catalog-ajsc.cfg.xml b/mso-catalog-db/src/main/resources/hibernate-catalog-ajsc.cfg.xml
new file mode 100644 (file)
index 0000000..7f28a36
--- /dev/null
@@ -0,0 +1,75 @@
+<?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-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+       <session-factory>
+           <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
+        <property name="hibernate.show_sql">false</property>
+        <property name="hibernate.format_sql">true</property>
+               
+               <mapping resource="VnfResource.hbm.xml"/>
+               <mapping resource="VnfRecipe.hbm.xml"/>
+               <mapping resource="HeatTemplate.hbm.xml"/>
+               <mapping resource="Service.hbm.xml"/>
+               <mapping resource="NetworkResource.hbm.xml"/>
+               <mapping resource="NetworkRecipe.hbm.xml"/>
+               <mapping resource="HeatEnvironment.hbm.xml"/>
+               <mapping resource="HeatNestedTemplate.hbm.xml"/>
+               <mapping resource="VnfComponent.hbm.xml"/>
+               <mapping resource="VnfComponentsRecipe.hbm.xml"/>
+               <mapping resource="VfModule.hbm.xml"/>
+               <mapping resource="VfModuleToHeatFiles.hbm.xml"/>
+        <!--    <property name="connection.url">${CATALOG_CONNECTION_URL}</property>
+        <property name="connection.username">${CATALOG_USERNAME}</property>
+        <property name="connection.password">${CATALOG_PASSWORD}</property> 
+               <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
+               <property name="hibernate.default_schema">mso_catalog</property>
+        <property name="connection.driver_class">org.mariadb.jdbc.Driver</property>
+        <property name="hibernate.current_session_context_class">thread</property>
+        <property name="hibernate.show_sql">false</property>
+        <property name="hibernate.format_sql">true</property>    
+         
+        <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> 
+               <property name="hibernate.c3p0.min_size">${CATALOG_MIN_POOL_SIZE}</property> 
+               <property name="hibernate.c3p0.max_size">${CATALOG_MAX_POOL_SIZE}</property> 
+               <property name="hibernate.c3p0.timeout">${CATALOG_TIMEOUT}</property> 
+               <property name="hibernate.c3p0.max_statements">50</property> 
+               <property name="hibernate.c3p0.idle_test_period">1000</property> 
+               <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> 
+               
+               
+               <mapping resource="VnfResource.hbm.xml"/>
+               <mapping resource="VnfRecipe.hbm.xml"/>
+               <mapping resource="HeatTemplate.hbm.xml"/>
+               <mapping resource="CloudSite.hbm.xml"/>
+               <mapping resource="Service.hbm.xml"/>
+               <mapping resource="NetworkResource.hbm.xml"/>
+               <mapping resource="NetworkRecipe.hbm.xml"/>
+               <mapping resource="HeatEnvironment.hbm.xml"/>
+               <mapping resource="HeatNestedTemplate.hbm.xml"/>
+               <mapping resource="VnfComponent.hbm.xml"/>
+               <mapping resource="VnfComponentsRecipe.hbm.xml"/> -->
+       </session-factory>
+</hibernate-configuration>
diff --git a/mso-catalog-db/src/main/resources/hibernate-catalog-mysql.cfg.xml b/mso-catalog-db/src/main/resources/hibernate-catalog-mysql.cfg.xml
new file mode 100644 (file)
index 0000000..306dfc6
--- /dev/null
@@ -0,0 +1,52 @@
+<?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-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+       <session-factory>
+               <!-- <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property> -->
+        <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
+        <property name="hibernate.show_sql">false</property>
+        <property name="hibernate.format_sql">true</property>
+        <property name="connection.datasource">java:jboss/datasources/mso-catalog</property> 
+               <property name="hibernate.c3p0.min_size">5</property>
+               <property name="hibernate.c3p0.max_size">50</property>
+               <property name="hibernate.c3p0.timeout">1800</property>
+               <property name="hibernate.c3p0.max_statements">50</property>
+               
+<!--           <property name="hibernate.hbm2ddl.auto">create</property> -->
+               
+               <mapping resource="VnfResource.hbm.xml"/>
+               <mapping resource="VnfRecipe.hbm.xml"/>
+               <mapping resource="HeatTemplate.hbm.xml"/>
+               <mapping resource="Service.hbm.xml"/>
+               <mapping resource="NetworkResource.hbm.xml"/>
+               <mapping resource="NetworkRecipe.hbm.xml"/>
+               <mapping resource="HeatEnvironment.hbm.xml"/>
+               <mapping resource="HeatNestedTemplate.hbm.xml"/>
+               <mapping resource="VnfComponent.hbm.xml"/>
+               <mapping resource="VnfComponentsRecipe.hbm.xml"/>
+               <mapping resource="VfModule.hbm.xml"/>
+               <mapping resource="VfModuleToHeatFiles.hbm.xml"/>
+       </session-factory>
+</hibernate-configuration>
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTest.java
new file mode 100644 (file)
index 0000000..bfd4aa8
--- /dev/null
@@ -0,0 +1,1307 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:18:49 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.openecomp.mso.db.catalog.beans.HeatEnvironment;
+import org.openecomp.mso.db.catalog.beans.HeatFiles;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
+import org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles;
+import org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe;
+import org.openecomp.mso.db.catalog.beans.VnfRecipe;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import java.time.chrono.ChronoLocalDate;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.evosuite.runtime.mock.java.time.chrono.MockJapaneseDate;
+import org.evosuite.runtime.mock.java.time.chrono.MockThaiBuddhistDate;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class CatalogDatabaseESTest extends CatalogDatabaseESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = mock(VfModuleToHeatFiles.class, new ViolatedAssumptionAnswer());
+      List<VfModuleToHeatFiles> list0 = (List<VfModuleToHeatFiles>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn(vfModuleToHeatFiles0).when(list0).get(anyInt());
+      doReturn(false).when(list0).isEmpty();
+      doReturn(1, 1).when(list0).size();
+      Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(list0).when(query1).list();
+      doReturn(query0).when(query1).setParameter(anyString() , any());
+      List<ChronoLocalDate> list1 = (List<ChronoLocalDate>) mock(List.class, new ViolatedAssumptionAnswer());
+      Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query3 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn("YF}DP?7kbDc>q", (String) null, "", "").when(session0).toString();
+      doReturn(query1).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatTemplate((String) null);
+        fail("Expecting exception: ClassCastException");
+      
+      } catch(ClassCastException e) {
+         //
+         // org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles$$EnhancerByMockitoWithCGLIB$$309d9392 cannot be cast to org.openecomp.mso.db.catalog.beans.HeatTemplate
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.APIH_GENERATED_REQUEST_ID;
+      MessageEnum messageEnum1 = MessageEnum.APIH_DUPLICATE_CHECK_EXC;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
+      HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVfModuleType((String) null, (String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      VnfComponentsRecipe vnfComponentsRecipe0 = mock(VnfComponentsRecipe.class, new ViolatedAssumptionAnswer());
+      List<VnfComponentsRecipe> list0 = (List<VnfComponentsRecipe>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn(true).when(list0).isEmpty();
+      Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(list0).when(query1).list();
+      doReturn(query0).when(query1).setParameter(anyString() , any());
+      List<MockThaiBuddhistDate> list1 = (List<MockThaiBuddhistDate>) mock(List.class, new ViolatedAssumptionAnswer());
+      Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      Query query3 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(query2, query2, query2, query2).when(query3).setParameter(anyString() , any());
+      doReturn(serviceRecipe0).when(query3).uniqueResult();
+      Query query4 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(query4).list();
+      doReturn((Query) null, (Query) null, (Query) null).when(query4).setParameter(anyString() , any());
+      Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn("F4D:=_l\"v%zem^./^", "", "", ",volTemplateId=", ", fileName=null").when(session1).toString();
+      doReturn(",volTemplateId=").when(session1).save(any());
+      doReturn(query1, query3, query4).when(session1).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
+      catalogDatabase0.getHeatEnvironment((-1));
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      Session session2 = mock(Session.class, new ViolatedAssumptionAnswer());
+      HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
+      doReturn("~+(<.").when(heatTemplate0).getAsdcResourceName();
+      doReturn("qOWRn", "@;i!EF=FjdS;").when(heatTemplate0).getTemplateName();
+      doReturn("o~%Y*9E5Pu.f").when(heatTemplate0).getVersion();
+      Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer());
+      HeatFiles heatFiles0 = mock(HeatFiles.class, new ViolatedAssumptionAnswer());
+      doReturn("").when(heatFiles0).getAsdcResourceName();
+      doReturn("@;i!EF=FjdS;", "~+(<.").when(heatFiles0).getFileName();
+      doReturn((-1)).when(heatFiles0).getVnfResourceId();
+      doReturn("i#C").when(heatFiles0).getVersion();
+      catalogDatabase0.saveHeatFiles(heatFiles0);
+      Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatTemplate(heatTemplate0, set0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      MockJapaneseDate mockJapaneseDate0 = new MockJapaneseDate();
+      List<MockJapaneseDate> list0 = (List<MockJapaneseDate>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn(true).when(list0).isEmpty();
+      Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(list0).when(query1).list();
+      doReturn(query0).when(query1).setParameter(anyString() , any());
+      List<HeatFiles> list1 = (List<HeatFiles>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn((Object) null).when(list1).get(anyInt());
+      doReturn(false).when(list1).isEmpty();
+      doReturn(0).when(list1).size();
+      Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query3 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(list1).when(query3).list();
+      doReturn(query2, query2, query2).when(query3).setParameter(anyString() , any());
+      Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn("F4D:=_l\"v%zem^./^", "po=vr", "po=vr", "po=vr").when(session1).toString();
+      doReturn("po=vr").when(session1).save(any());
+      doReturn(query1, query3).when(session1).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
+      catalogDatabase0.getHeatEnvironment((-1));
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      Session session2 = mock(Session.class, new ViolatedAssumptionAnswer());
+      HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
+      doReturn("").when(heatTemplate0).getAsdcResourceName();
+      doReturn(0).when(heatTemplate0).getId();
+      doReturn("", "RDu8*C_[t4L").when(heatTemplate0).getTemplateName();
+      doReturn((String) null).when(heatTemplate0).getVersion();
+      Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer());
+      doReturn(true).when(iterator0).hasNext();
+      doReturn((Object) null).when(iterator0).next();
+      Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
+      doReturn(iterator0).when(set0).iterator();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatTemplate(heatTemplate0, set0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.RA_DB_INVALID_STATUS;
+      MessageEnum messageEnum1 = MessageEnum.LOGGER_UPDATE_SUC;
+      MessageEnum messageEnum2 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getService(hashMap0, "Successfully. No template found");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getNestedTemplates(2377);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.APIH_QUERY_PARAM_WRONG;
+      MessageEnum messageEnum1 = MessageEnum.RA_SEND_REQUEST_SDNC;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfComponentsRecipe("Generic exception searching for vnf_id=", (String) null, (String) null, (String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      List<VnfRecipe> list0 = (List<VnfRecipe>) mock(List.class, new ViolatedAssumptionAnswer());
+      Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(query0, query0).when(query1).setParameter(anyString() , any());
+      doReturn((Object) null).when(query1).uniqueResult();
+      Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(query2).list();
+      doReturn((Query) null).when(query2).setParameter(anyString() , any());
+      Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn("F4D:=_l\"v%zem^./^", "getVfModuleRecipe").when(session1).toString();
+      doReturn(query1, query2).when(session1).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
+      catalogDatabase0.getVnfComponent(187, "");
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatEnvironment((-1));
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", (String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.APIH_PROPERTY_LOAD_SUC;
+      MessageEnum messageEnum1 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfComponentsRecipeByVfModuleId("", "(3", "");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null, (String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfComponentsRecipe("B4@1", "v@\7f(U", "", (String) null, "");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getService((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVfModuleModelName("", "RiY");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.RA_UPDATE_TENANT_ERR;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      VnfRecipe vnfRecipe0 = mock(VnfRecipe.class, new ViolatedAssumptionAnswer());
+      Service service0 = new Service();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveService(service0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(session0).toString();
+      doReturn((Query) null).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", "");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
+      VnfResource vnfResource0 = mock(VnfResource.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveService((Service) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.RA_CREATE_NETWORK_EXC;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatTemplate((HeatTemplate) null, (Set<HeatTemplateParam>) linkedHashSet0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      VnfResource vnfResource0 = mock(VnfResource.class, new ViolatedAssumptionAnswer());
+      doReturn((-1)).when(vnfResource0).getId();
+      doReturn("#5|%>JWRPJfP)S@").when(vnfResource0).getVnfType();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveOrUpdateVnfResource(vnfResource0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.RA_ANALYZE_ERROR_EXC;
+      MsoLogger.StatusCode.values();
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveVnfRecipe((VnfRecipe) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Service service0 = mock(Service.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(service0).getServiceName();
+      doReturn((String) null, (String) null).when(service0).getServiceNameVersionId();
+      doReturn((String) null).when(service0).getServiceVersion();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveService(service0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.APIH_BAD_ORDER;
+      MessageEnum messageEnum1 = MessageEnum.RA_SEND_VNF_NOTIF_ERR;
+      MessageEnum messageEnum2 = MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND;
+      MessageEnum messageEnum3 = MessageEnum.RA_VNF_NOT_EXIST;
+      MsoLogger.ErrorCode msoLogger_ErrorCode0 = MsoLogger.ErrorCode.PermissionError;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatEnvironment(heatEnvironment0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.APIH_GENERAL_METRICS;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatEnvironment((HeatEnvironment) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfRecipe((String) null, (String) null, (String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      MsoLogger.ErrorCode.values();
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.rollback();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getAllHeatTemplates();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatFilesForVfModule((-1539));
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatEnvironment(0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getAllHeatEnvironment();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.commit();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setVersion("E0)WE F/LaV~i2U01");
+      heatFiles0.setFileName("uIZl|");
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatFiles(heatFiles0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveVnfComponentsRecipe((VnfComponentsRecipe) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.INIT_LOGGER_FAIL;
+      MessageEnum messageEnum1 = MessageEnum.ASDC_CREATE_SERVICE;
+      MessageEnum messageEnum2 = MessageEnum.NO_PROPERTIES;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.healthCheck();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      catalogDatabase0.close();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatTemplate(1197);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getAllNetworkResources();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfComponentsRecipe("Ikrt3T$WS\"UMs#Q", "Ikrt3T$WS\"UMs#Q", "Ikrt3T$WS\"UMs#Q", "");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatTemplate((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfComponent(1987, "R$9=*_j3~I=:_");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test37()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatFiles(0, "r#j>oJCQI5r'@)jSH", "K6#W1{s", "vRm");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test38()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfResourcesByRole("");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test39()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.RA_ASYNC_DELETE_VNF;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getAllVnfResources();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test40()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      List<VfModuleToHeatFiles> list0 = (List<VfModuleToHeatFiles>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn((Object) null).when(list0).get(anyInt());
+      doReturn(false).when(list0).isEmpty();
+      doReturn(0, 0).when(list0).size();
+      Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(list0).when(query1).list();
+      doReturn(query0).when(query1).setParameter(anyString() , any());
+      Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(query2).list();
+      doReturn((Query) null).when(query2).setParameter(anyString() , any());
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn("YF}DP?7kbDc>q", (String) null, "", "", "").when(session0).toString();
+      doReturn(query1, query2).when(session0).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      catalogDatabase0.getHeatTemplate((String) null);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatEnvironment(148);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test41()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      List<VnfComponentsRecipe> list0 = (List<VnfComponentsRecipe>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn((Object) null).when(list0).get(anyInt());
+      doReturn(false).when(list0).isEmpty();
+      doReturn(0).when(list0).size();
+      Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(list0).when(query1).list();
+      doReturn(query0).when(query1).setParameter(anyString() , any());
+      Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn((Query) null, (Query) null, (Query) null, (Query) null).when(query2).setParameter(anyString() , any());
+      doReturn((Object) null).when(query2).uniqueResult();
+      Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn("F4D:=_l\"v%zem^./^", "", "", ",volTemplateId=", (String) null).when(session1).toString();
+      doReturn(",volTemplateId=").when(session1).save(any());
+      doReturn(query1, query2, (Query) null).when(session1).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
+      catalogDatabase0.getHeatEnvironment((-1));
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      Session session2 = mock(Session.class, new ViolatedAssumptionAnswer());
+      HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
+      doReturn("~+(<.").when(heatTemplate0).getAsdcResourceName();
+      doReturn("qOWRn", "@;i!EF=FjdS;").when(heatTemplate0).getTemplateName();
+      doReturn("o~%Y*9E5Pu.f").when(heatTemplate0).getVersion();
+      Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer());
+      HeatFiles heatFiles0 = mock(HeatFiles.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(heatFiles0).getAsdcResourceName();
+      doReturn((String) null, (String) null).when(heatFiles0).getFileName();
+      doReturn(0).when(heatFiles0).getVnfResourceId();
+      doReturn((String) null).when(heatFiles0).getVersion();
+      catalogDatabase0.saveHeatFiles(heatFiles0);
+      Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatTemplate(heatTemplate0, set0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test42()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      List<HeatTemplateParam> list0 = (List<HeatTemplateParam>) mock(List.class, new ViolatedAssumptionAnswer());
+      doReturn((Object) null).when(list0).get(anyInt());
+      doReturn(false).when(list0).isEmpty();
+      doReturn(0).when(list0).size();
+      Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
+      Query query1 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn(list0).when(query1).list();
+      doReturn(query0).when(query1).setParameter(anyString() , any());
+      Query query2 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(query2).list();
+      doReturn((Query) null, (Query) null, (Query) null).when(query2).setParameter(anyString() , any());
+      Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn("F4D:=_l\"v%zem^./^", "", "ASDC_PROPERTIES_NOT_FOUND").when(session1).toString();
+      doReturn(query1, query2).when(session1).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
+      catalogDatabase0.getHeatEnvironment((-1));
+      PrivateAccess.callMethod((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "getSession");
+      Session session2 = mock(Session.class, new ViolatedAssumptionAnswer());
+      HeatTemplate heatTemplate0 = mock(HeatTemplate.class, new ViolatedAssumptionAnswer());
+      doReturn("-wAG8.gOR.b_dq\7f").when(heatTemplate0).getAsdcResourceName();
+      doReturn("", "f:DC0FeMtZ").when(heatTemplate0).getTemplateName();
+      doReturn("F4D:=_l\"v%zem^./^").when(heatTemplate0).getVersion();
+      Iterator<HeatTemplateParam> iterator0 = (Iterator<HeatTemplateParam>) mock(Iterator.class, new ViolatedAssumptionAnswer());
+      Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer());
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatTemplate(heatTemplate0, set0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test43()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session0);
+      Query query0 = mock(Query.class, new ViolatedAssumptionAnswer());
+      doReturn((List) null).when(query0).list();
+      doReturn((Query) null).when(query0).setParameter(anyString() , any());
+      Session session1 = mock(Session.class, new ViolatedAssumptionAnswer());
+      doReturn("F4D:=_l\"v%zem^./^").when(session1).toString();
+      doReturn(query0).when(session1).createQuery(anyString());
+      PrivateAccess.setVariable((Class<CatalogDatabase>) CatalogDatabase.class, catalogDatabase0, "session", (Object) session1);
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatEnvironment((-1));
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test44()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.GENERAL_EXCEPTION_ARG;
+      MessageEnum messageEnum1 = MessageEnum.RA_EVALUATE_XPATH_ERROR;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = ", vnfResourceId=";
+      String string1 = "";
+      String string2 = "U`9Z8:QQUr-c(T@_/)";
+      String string3 = "$q')fpKG]Q&i\"'{x";
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getNetworkResource("FT>Ri6U\"Ks<.H/g[");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test45()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      int int0 = 1030;
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getAllVfModules();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test46()  throws Throwable  {
+      MsoLogger.ResponseCode msoLogger_ResponseCode0 = MsoLogger.ResponseCode.DataNotFound;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVfModuleType("serviceVersion", "serviceVersion");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test47()  throws Throwable  {
+      MsoLogger.ResponseCode msoLogger_ResponseCode0 = MsoLogger.ResponseCode.Conflict;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getNestedTemplates(2377);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test48()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.APIH_SDNC_RESPONSE_ERROR;
+      MessageEnum messageEnum1 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_SUC;
+      MessageEnum messageEnum2 = MessageEnum.RA_UPDATE_NETWORK_ERR;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = null;
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfResource((String) null, (String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test49()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = ", description=";
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getServiceRecipe((-1319), ", description=");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test50()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = ",hpGX76\"X~ow4";
+      String string1 = "735uWxa&iIbU.4]O$";
+      String string2 = "APIH_ERROR_FROM_BPEL_SERVER";
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getNetworkRecipe("735uWxa&iIbU.4]O$", ",hpGX76\"X~ow4", "");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test51()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = ",hpGX76\"X~ow4";
+      String string1 = "APIH_ERROR_FROM_BPEL_SERVER";
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getNetworkRecipe("", ",hpGX76\"X~ow4");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test52()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = "$iJG7Jh~P";
+      String string1 = "b4v5f&LOV|\\";
+      String string2 = "";
+      String string3 = null;
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfResource((String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test53()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = "Ikrt3T$WS\"UMs#Q";
+      String string1 = null;
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getServiceByUUID("Ikrt3T$WS\"UMs#Q");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test54()  throws Throwable  {
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = "v@\7f(U";
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfComponentsRecipe("!4@@1", "v@\7f(U", "", (String) null, "");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test55()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.RA_DB_INVALID_STATUS;
+      MessageEnum messageEnum1 = MessageEnum.LOGGER_UPDATE_SUC;
+      MessageEnum messageEnum2 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      HashMap<String, String> hashMap0 = new HashMap<String, String>();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getService(hashMap0, "Successfully. No template found");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test56()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.APIH_PROPERTY_LOAD_SUC;
+      MessageEnum messageEnum1 = MessageEnum.ASDC_ARTIFACT_DOWNLOAD_FAIL;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfComponentsRecipeByVfModuleId("", "(3", "");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test57()  throws Throwable  {
+      MsoLogger.ResponseCode msoLogger_ResponseCode0 = MsoLogger.ResponseCode.ServiceNotAvailable;
+      MessageEnum messageEnum0 = MessageEnum.RA_CONFIG_LOAD;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      String string0 = "";
+      String string1 = "RiY";
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getHeatEnvironment("", "RiY", "RiY");
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test58()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.RA_CREATE_NETWORK_EXC;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      int int0 = 4811;
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.saveHeatTemplate(heatTemplate0, (Set<HeatTemplateParam>) linkedHashSet0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test59()  throws Throwable  {
+      MessageEnum messageEnum0 = MessageEnum.APIH_QUERY_PARAM_WRONG;
+      MessageEnum messageEnum1 = MessageEnum.RA_SEND_REQUEST_SDNC;
+      CatalogDatabase catalogDatabase0 = new CatalogDatabase();
+      // Undeclared exception!
+      try { 
+        catalogDatabase0.getVnfComponentsRecipe("Generic exception searching for vnf_id=", (String) null, (String) null, (String) null);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.CatalogDatabase", e);
+      }
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/CatalogDatabaseESTestscaffolding.java
new file mode 100644 (file)
index 0000000..c9bf8b4
--- /dev/null
@@ -0,0 +1,1093 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:18:49 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class CatalogDatabaseESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.CatalogDatabase"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CatalogDatabaseESTestscaffolding.class.getClassLoader() ,
+      "org.hibernate.sql.Alias",
+      "org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator",
+      "org.hibernate.type.BasicType",
+      "org.hibernate.service.spi.ServiceInitiator",
+      "org.hibernate.type.UUIDBinaryType",
+      "org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor",
+      "org.hibernate.type.descriptor.java.NClobTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4$1",
+      "org.hibernate.service.spi.SessionFactoryServiceRegistry",
+      "org.hibernate.Transaction",
+      "org.dom4j.tree.NamespaceStack",
+      "org.hibernate.annotations.common.reflection.ReflectionManager",
+      "org.hibernate.type.descriptor.java.ImmutableMutabilityPlan",
+      "org.hibernate.bytecode.spi.ReflectionOptimizer$InstantiationOptimizer",
+      "org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor",
+      "org.hibernate.mapping.FetchProfile",
+      "org.hibernate.id.TableHiLoGenerator",
+      "org.dom4j.tree.AbstractBranch",
+      "org.hibernate.type.NumericBooleanType",
+      "org.hibernate.annotations.common.reflection.ClassLoaderDelegate",
+      "org.hibernate.NaturalIdLoadAccess",
+      "org.hibernate.ScrollableResults",
+      "org.dom4j.Namespace",
+      "org.hibernate.engine.jdbc.batch.spi.BatchBuilder",
+      "org.dom4j.tree.DefaultDocumentType",
+      "org.hibernate.service.ConfigLoader",
+      "org.hibernate.metamodel.source.MetadataImplementor",
+      "org.hibernate.cfg.EJB3NamingStrategy",
+      "org.hibernate.boot.registry.classloading.spi.ClassLoaderService",
+      "org.hibernate.type.DoubleType",
+      "org.hibernate.mapping.Value",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$3$1",
+      "org.hibernate.type.descriptor.java.ClassTypeDescriptor",
+      "org.hibernate.service.internal.ConcurrentServiceBinding$Node",
+      "org.hibernate.CacheMode",
+      "org.hibernate.type.ForeignKeyDirection$2",
+      "org.hibernate.type.IdentifierBagType",
+      "org.hibernate.type.MapType",
+      "org.hibernate.cfg.MetadataSourceType",
+      "org.hibernate.dialect.Dialect",
+      "org.hibernate.boot.registry.selector.StrategyRegistration",
+      "org.hibernate.type.ForeignKeyDirection$1",
+      "org.hibernate.ScrollMode",
+      "org.hibernate.FetchMode",
+      "org.hibernate.type.CurrencyType",
+      "org.hibernate.persister.collection.CollectionPersister",
+      "org.hibernate.service.internal.ConcurrentServiceBinding$Entry",
+      "org.hibernate.metamodel.relational.Size",
+      "org.hibernate.AssertionFailure",
+      "org.hibernate.bytecode.spi.ReflectionOptimizer$AccessOptimizer",
+      "org.dom4j.tree.FlyweightComment",
+      "org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform",
+      "org.hibernate.type.CustomType",
+      "org.hibernate.id.enhanced.TableGenerator",
+      "org.hibernate.mapping.RelationalModel",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$5$1",
+      "org.hibernate.event.spi.PostUpdateEventListener",
+      "org.hibernate.type.descriptor.java.ClobTypeDescriptor",
+      "org.hibernate.hql.spi.MultiTableBulkIdStrategy$DeleteHandler",
+      "org.dom4j.tree.ConcurrentReaderHashMap$ValueIterator",
+      "org.hibernate.cfg.beanvalidation.IntegrationException",
+      "org.hibernate.proxy.ProxyFactory",
+      "org.hibernate.mapping.Filterable",
+      "org.hibernate.tool.hbm2ddl.SingleLineSqlCommandExtractor",
+      "org.hibernate.type.SortedSetType",
+      "org.hibernate.engine.config.spi.ConfigurationService",
+      "org.hibernate.engine.config.internal.ConfigurationServiceInitiator",
+      "org.hibernate.persister.spi.PersisterClassResolver",
+      "org.hibernate.type.TypeFactory",
+      "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl",
+      "org.hibernate.secure.spi.PermissibleAction$1",
+      "org.hibernate.cfg.Configuration$CacheHolder",
+      "org.hibernate.annotations.common.reflection.Filter",
+      "org.hibernate.dialect.Sybase11Dialect",
+      "org.hibernate.engine.jdbc.spi.JdbcServices",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$4$1",
+      "org.hibernate.engine.transaction.jta.platform.internal.JRun4JtaPlatform",
+      "org.hibernate.type.descriptor.java.CalendarDateTypeDescriptor",
+      "org.hibernate.type.descriptor.java.CurrencyTypeDescriptor",
+      "org.hibernate.type.BlobType",
+      "org.hibernate.type.descriptor.java.BlobTypeDescriptor$BlobMutabilityPlan",
+      "org.hibernate.annotations.common.reflection.XClass",
+      "org.hibernate.dialect.PostgresPlusDialect",
+      "org.hibernate.engine.transaction.jta.platform.internal.JtaSynchronizationStrategy",
+      "org.hibernate.type.CharacterArrayType",
+      "org.hibernate.metamodel.binding.AttributeBindingContainer",
+      "org.hibernate.internal.util.xml.XmlDocument",
+      "org.hibernate.engine.jdbc.spi.SqlExceptionHelper",
+      "org.hibernate.dialect.DerbyTenSixDialect",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor",
+      "org.hibernate.hql.spi.MultiTableBulkIdStrategy$UpdateHandler",
+      "org.hibernate.integrator.spi.IntegratorService",
+      "org.hibernate.dialect.SAPDBDialect",
+      "org.hibernate.dialect.SybaseAnywhereDialect",
+      "org.hibernate.internal.util.ValueHolder",
+      "org.hibernate.engine.jdbc.internal.JdbcServicesImpl",
+      "org.hibernate.type.descriptor.sql.BigIntTypeDescriptor",
+      "org.hibernate.dialect.SybaseASE15Dialect",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.hibernate.engine.jdbc.internal.JdbcServicesInitiator",
+      "org.dom4j.tree.ConcurrentReaderHashMap$HashIterator",
+      "org.hibernate.type.AnyType",
+      "org.dom4j.util.SingletonStrategy",
+      "org.hibernate.type.descriptor.java.ByteArrayTypeDescriptor",
+      "org.dom4j.tree.BackedList",
+      "org.hibernate.service.ServiceRegistryBuilder",
+      "org.jboss.logging.JDKLoggerProvider",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl",
+      "org.hibernate.service.internal.ConcurrentServiceBinding",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$2$1",
+      "org.hibernate.type.ListType",
+      "org.hibernate.type.IntegerType",
+      "org.hibernate.dialect.Ingres9Dialect",
+      "org.hibernate.dialect.TeradataDialect",
+      "org.hibernate.AnnotationException",
+      "org.hibernate.proxy.EntityNotFoundDelegate",
+      "org.hibernate.type.SetType",
+      "org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator",
+      "org.hibernate.ReplicationMode$1",
+      "org.hibernate.type.NClobType",
+      "org.hibernate.service.spi.Configurable",
+      "org.hibernate.ReplicationMode$2",
+      "org.hibernate.ReplicationMode$3",
+      "org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory",
+      "org.hibernate.ReplicationMode$4",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$5$1",
+      "org.openecomp.mso.db.catalog.beans.Service",
+      "org.hibernate.annotations.common.reflection.java.JavaReflectionManager",
+      "org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractor",
+      "org.hibernate.TransientObjectException",
+      "org.hibernate.id.IncrementGenerator",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.hibernate.annotations.common.reflection.java.generics.TypeEnvironmentFactory",
+      "org.hibernate.engine.spi.FilterDefinition",
+      "org.hibernate.type.TypeFactory$TypeScopeImpl",
+      "org.hibernate.annotations.common.reflection.XMethod",
+      "org.hibernate.engine.jdbc.connections.spi.ConnectionProvider",
+      "org.hibernate.type.ByteType",
+      "org.hibernate.event.spi.AbstractEvent",
+      "org.hibernate.integrator.spi.Integrator",
+      "org.hibernate.dialect.Oracle8iDialect",
+      "org.dom4j.ElementHandler",
+      "org.dom4j.tree.DefaultAttribute",
+      "org.hibernate.engine.transaction.spi.LocalStatus",
+      "org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor",
+      "org.hibernate.mapping.RootClass",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$3$1",
+      "org.hibernate.engine.loading.internal.CollectionLoadContext",
+      "org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform",
+      "org.hibernate.type.descriptor.sql.DoubleTypeDescriptor",
+      "org.hibernate.type.CompositeCustomType",
+      "org.hibernate.boot.registry.selector.spi.StrategySelectionException",
+      "org.hibernate.dialect.JDataStoreDialect",
+      "org.hibernate.annotations.common.util.impl.Log_$logger",
+      "org.dom4j.rule.Pattern",
+      "org.openecomp.mso.db.catalog.beans.HeatFiles",
+      "org.hibernate.dialect.PointbaseDialect",
+      "org.hibernate.dialect.DerbyDialect",
+      "org.hibernate.event.internal.EntityCopyNotAllowedObserver",
+      "org.hibernate.id.SelectGenerator",
+      "org.hibernate.dialect.TimesTenDialect",
+      "org.hibernate.internal.util.xml.ErrorLogger",
+      "org.hibernate.id.insert.InsertGeneratedIdentifierDelegate",
+      "org.dom4j.tree.AbstractComment",
+      "org.hibernate.MultiTenancyStrategy",
+      "org.dom4j.Branch",
+      "org.jboss.logging.DelegatingBasicLogger",
+      "org.hibernate.type.ShortType",
+      "org.hibernate.service.StandardServiceInitiators",
+      "org.hibernate.type.descriptor.java.JavaTypeDescriptorRegistry",
+      "org.hibernate.type.descriptor.sql.NCharTypeDescriptor",
+      "org.hibernate.service.spi.Manageable",
+      "org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl",
+      "org.hibernate.metamodel.domain.Type",
+      "org.dom4j.XPath",
+      "org.hibernate.type.VersionType",
+      "org.hibernate.integrator.internal.IntegratorServiceImpl",
+      "org.hibernate.dialect.Ingres10Dialect",
+      "org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl",
+      "org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor$TimestampMutabilityPlan",
+      "org.hibernate.type.AdaptedImmutableType",
+      "org.hibernate.type.TypeResolver",
+      "org.hibernate.type.descriptor.java.TimeZoneTypeDescriptor",
+      "org.hibernate.type.BinaryType",
+      "org.hibernate.bytecode.spi.BytecodeProvider",
+      "org.hibernate.SynchronizeableQuery",
+      "org.hibernate.engine.jdbc.spi.ExtractedDatabaseMetaData",
+      "org.hibernate.metamodel.binding.EntityBinding",
+      "org.hibernate.type.descriptor.java.CharacterTypeDescriptor",
+      "org.hibernate.event.spi.EventSource",
+      "org.hibernate.id.IntegralDataTypeHolder",
+      "org.dom4j.tree.DefaultText",
+      "org.hibernate.engine.jdbc.dialect.internal.DialectResolverInitiator",
+      "org.hibernate.type.ManyToOneType",
+      "org.hibernate.engine.transaction.jta.platform.internal.JOTMJtaPlatform",
+      "org.hibernate.engine.jdbc.LobCreationContext",
+      "org.hibernate.engine.transaction.jta.platform.internal.JOnASJtaPlatform",
+      "org.hibernate.id.enhanced.SequenceStyleGenerator",
+      "org.hibernate.tuple.entity.DynamicMapEntityTuplizer",
+      "org.dom4j.tree.ConcurrentReaderHashMap$KeyIterator",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.hibernate.LockOptions",
+      "org.hibernate.type.descriptor.sql.TinyIntTypeDescriptor",
+      "org.hibernate.cache.internal.CollectionCacheInvalidator",
+      "org.hibernate.dialect.AbstractTransactSQLDialect",
+      "org.hibernate.annotations.common.reflection.XAnnotatedElement",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$5",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$3",
+      "org.hibernate.service.spi.ServiceContributor",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$2",
+      "org.hibernate.jdbc.WorkExecutorVisitable",
+      "org.hibernate.service.spi.ServiceRegistryAwareService",
+      "org.hibernate.type.descriptor.sql.DecimalTypeDescriptor",
+      "org.dom4j.tree.AbstractDocument",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator",
+      "org.hibernate.dialect.FirebirdDialect",
+      "org.hibernate.id.SequenceIdentityGenerator",
+      "org.dom4j.Attribute",
+      "org.hibernate.type.descriptor.java.MutabilityPlan",
+      "org.hibernate.dialect.DerbyTenSevenDialect",
+      "org.jboss.logging.AbstractLoggerProvider",
+      "org.dom4j.Document",
+      "org.hibernate.boot.registry.BootstrapServiceRegistryBuilder",
+      "org.hibernate.Criteria",
+      "org.hibernate.annotations.common.reflection.java.JavaXCollectionType",
+      "org.hibernate.event.internal.EntityCopyAllowedLoggedObserver",
+      "org.dom4j.tree.ConcurrentReaderHashMap",
+      "org.hibernate.SessionEventListener",
+      "org.hibernate.dialect.MimerSQLDialect",
+      "org.openecomp.mso.db.catalog.beans.VnfResource",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.hibernate.InvalidMappingException",
+      "org.hibernate.service.UnknownUnwrapTypeException",
+      "org.hibernate.exception.spi.ViolatedConstraintNameExtracter",
+      "org.dom4j.tree.AbstractDocumentType",
+      "org.hibernate.persister.internal.PersisterFactoryInitiator",
+      "org.hibernate.metamodel.Metadata",
+      "org.hibernate.engine.transaction.jta.platform.internal.BorlandEnterpriseServerJtaPlatform",
+      "org.hibernate.engine.spi.Mapping",
+      "org.hibernate.service.Service",
+      "org.dom4j.CDATA",
+      "org.dom4j.tree.FlyweightText",
+      "org.hibernate.type.ObjectType",
+      "org.openecomp.mso.db.catalog.CatalogDatabase",
+      "org.hibernate.service.spi.ServiceRegistryImplementor",
+      "org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformResolver",
+      "org.dom4j.tree.ConcurrentReaderHashMap$BarrierLock",
+      "org.hibernate.type.descriptor.sql.LongVarbinaryTypeDescriptor",
+      "org.hibernate.type.DbTimestampType",
+      "org.hibernate.procedure.ProcedureCall",
+      "org.hibernate.service.UnknownServiceException",
+      "org.hibernate.id.BulkInsertionCapableIdentifierGenerator",
+      "org.hibernate.service.spi.Stoppable",
+      "org.hibernate.annotations.common.reflection.XProperty",
+      "org.hibernate.boot.registry.BootstrapServiceRegistry",
+      "org.hibernate.cfg.Configuration$MetadataSourceQueue",
+      "org.hibernate.type.descriptor.sql.NVarcharTypeDescriptor",
+      "org.hibernate.jdbc.Work",
+      "org.hibernate.type.PrimitiveType",
+      "org.hibernate.type.descriptor.sql.SmallIntTypeDescriptor",
+      "org.hibernate.tuple.entity.PojoEntityTuplizer",
+      "org.hibernate.engine.jdbc.dialect.internal.DialectFactoryInitiator",
+      "org.hibernate.usertype.UserType",
+      "org.hibernate.type.TimeType",
+      "org.hibernate.internal.util.xml.XMLHelper",
+      "org.hibernate.annotations.common.reflection.MetadataProvider",
+      "org.hibernate.cfg.beanvalidation.BeanValidationIntegrator",
+      "org.hibernate.tuple.entity.AbstractEntityTuplizer",
+      "org.hibernate.service.spi.ServiceBinding$ServiceLifecycleOwner",
+      "org.jboss.logging.LoggerProvider",
+      "org.hibernate.tool.hbm2ddl.ImportScriptException",
+      "org.dom4j.io.SAXReader",
+      "org.hibernate.id.IdentityGenerator",
+      "org.hibernate.type.ForeignKeyDirection",
+      "org.hibernate.persister.entity.Joinable",
+      "org.hibernate.type.BigDecimalType",
+      "org.hibernate.type.WrapperBinaryType",
+      "org.hibernate.internal.util.ConfigHelper",
+      "org.hibernate.id.enhanced.AccessCallback",
+      "org.dom4j.DocumentType",
+      "org.hibernate.dialect.PostgreSQL82Dialect",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.hibernate.id.Configurable",
+      "org.hibernate.id.SequenceGenerator",
+      "org.hibernate.dialect.Oracle9iDialect",
+      "org.hibernate.cfg.Configuration",
+      "org.dom4j.tree.DefaultDocument",
+      "org.hibernate.engine.spi.SessionFactoryImplementor",
+      "org.jboss.logging.AbstractMdcLoggerProvider",
+      "org.hibernate.type.SerializationException",
+      "org.hibernate.cfg.annotations.reflection.XMLContext$Default",
+      "org.hibernate.type.descriptor.java.CalendarTypeDescriptor$CalendarMutabilityPlan",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.hibernate.engine.jndi.spi.JndiService",
+      "org.dom4j.tree.ConcurrentReaderHashMap$KeySet",
+      "org.hibernate.type.BooleanType",
+      "org.hibernate.mapping.Collection",
+      "org.hibernate.type.descriptor.sql.TimestampTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor",
+      "org.hibernate.engine.jndi.internal.JndiServiceImpl",
+      "org.hibernate.type.descriptor.java.JdbcDateTypeDescriptor",
+      "org.hibernate.metamodel.source.BindingContext",
+      "org.hibernate.cache.internal.RegionFactoryInitiator",
+      "org.openecomp.mso.db.catalog.beans.HeatTemplateParam",
+      "org.dom4j.util.SimpleSingleton",
+      "org.hibernate.cfg.annotations.reflection.XMLContext",
+      "org.hibernate.metamodel.binding.AttributeBinding",
+      "org.hibernate.type.CharacterType",
+      "org.hibernate.type.FloatType",
+      "org.hibernate.annotations.common.reflection.AnnotationReader",
+      "org.hibernate.internal.util.xml.XmlInfrastructureException",
+      "org.jboss.logging.LoggerProviders$1",
+      "org.hibernate.internal.util.xml.XmlDocumentImpl",
+      "org.openecomp.mso.db.catalog.beans.HeatEnvironment",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$4$1",
+      "org.hibernate.id.factory.IdentifierGeneratorFactory",
+      "org.hibernate.type.CollectionType",
+      "org.hibernate.type.descriptor.java.ByteTypeDescriptor",
+      "org.hibernate.boot.registry.StandardServiceRegistryBuilder",
+      "org.hibernate.secure.internal.DisabledJaccServiceImpl",
+      "org.hibernate.secure.spi.JaccService",
+      "org.hibernate.tuple.Tuplizer",
+      "org.hibernate.internal.util.ValueHolder$DeferredInitializer",
+      "org.hibernate.internal.util.xml.Origin",
+      "org.hibernate.engine.transaction.jta.platform.internal.TransactionManagerAccess",
+      "org.hibernate.type.ComponentType",
+      "org.hibernate.engine.jdbc.spi.ResultSetWrapper",
+      "org.hibernate.service.spi.Startable",
+      "org.hibernate.type.DiscriminatorType",
+      "org.hibernate.type.descriptor.sql.BooleanTypeDescriptor",
+      "org.dom4j.Comment",
+      "org.hibernate.service.internal.ProvidedService",
+      "org.hibernate.type.descriptor.java.BlobTypeDescriptor",
+      "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$TcclSafeAggregatedClassLoader",
+      "org.jboss.logging.Slf4jLoggerProvider",
+      "org.hibernate.type.SortedMapType",
+      "org.hibernate.type.LongType",
+      "org.hibernate.annotations.common.reflection.MetadataProviderInjector",
+      "org.hibernate.type.descriptor.java.LongTypeDescriptor",
+      "org.hibernate.id.UUIDGenerationStrategy",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.hibernate.LockMode",
+      "org.jboss.logging.Slf4jLocationAwareLogger$1",
+      "org.hibernate.boot.registry.selector.spi.StrategySelector",
+      "org.hibernate.EntityMode",
+      "org.hibernate.dialect.HSQLDialect",
+      "org.hibernate.Session$LockRequest",
+      "org.hibernate.type.descriptor.java.BigDecimalTypeDescriptor",
+      "org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory",
+      "org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.openecomp.mso.db.catalog.beans.VnfComponent",
+      "com.att.eelf.configuration.EELFManager",
+      "org.dom4j.Text",
+      "org.dom4j.tree.AbstractCharacterData",
+      "org.hibernate.engine.transaction.jta.platform.internal.ResinJtaPlatform",
+      "org.hibernate.service.ServiceRegistry",
+      "org.dom4j.io.DOMReader",
+      "org.hibernate.type.TimestampType",
+      "org.hibernate.persister.internal.PersisterClassResolverInitiator",
+      "org.jboss.logging.Logger$Level",
+      "org.hibernate.type.NTextType",
+      "org.hibernate.UnknownProfileException",
+      "org.hibernate.engine.spi.CollectionKey",
+      "org.hibernate.type.descriptor.java.JavaTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.LongVarcharTypeDescriptor",
+      "org.hibernate.secure.spi.GrantedPermission",
+      "org.hibernate.type.Type",
+      "org.hibernate.engine.jdbc.cursor.internal.RefCursorSupportInitiator",
+      "org.hibernate.MappingNotFoundException",
+      "org.hibernate.internal.util.collections.JoinedIterator",
+      "org.hibernate.jmx.internal.JmxServiceInitiator",
+      "org.hibernate.type.descriptor.java.JdbcTimeTypeDescriptor",
+      "org.hibernate.type.CustomCollectionType",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$3$1",
+      "org.hibernate.event.service.spi.DuplicationStrategy",
+      "org.hibernate.type.PostgresUUIDType$PostgresUUIDSqlTypeDescriptor",
+      "org.dom4j.io.DispatchHandler",
+      "org.hibernate.annotations.common.util.impl.LoggerFactory",
+      "org.hibernate.dialect.SQLServer2005Dialect",
+      "org.dom4j.Entity",
+      "org.hibernate.boot.registry.selector.StrategyRegistrationProvider",
+      "org.hibernate.id.PostInsertIdentifierGenerator",
+      "org.hibernate.type.descriptor.java.ShortTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.NumericTypeDescriptor",
+      "org.hibernate.dialect.CUBRIDDialect",
+      "org.hibernate.annotations.common.reflection.java.JavaXType",
+      "org.hibernate.integrator.spi.ServiceContributingIntegrator",
+      "org.hibernate.type.descriptor.java.StringTypeDescriptor",
+      "org.dom4j.ProcessingInstruction",
+      "org.hibernate.boot.registry.StandardServiceRegistry",
+      "org.hibernate.type.descriptor.java.JdbcDateTypeDescriptor$DateMutabilityPlan",
+      "org.hibernate.id.IdentifierGenerator",
+      "org.hibernate.engine.jdbc.dialect.spi.DialectResolver",
+      "org.hibernate.engine.jdbc.spi.SqlExceptionHelper$WarningHandler",
+      "org.hibernate.type.OneToOneType",
+      "org.hibernate.id.GUIDGenerator",
+      "org.hibernate.internal.util.xml.MappingReader$SupportedOrmXsdVersion",
+      "org.dom4j.io.ElementStack",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$5",
+      "org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl",
+      "org.hibernate.SessionFactory",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$3",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$4",
+      "org.hibernate.type.MaterializedClobType",
+      "org.hibernate.type.BigIntegerType",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$2",
+      "org.hibernate.service.internal.AbstractServiceRegistryImpl",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.hibernate.dialect.SybaseASE157Dialect",
+      "org.dom4j.tree.AbstractText",
+      "org.hibernate.Version",
+      "org.hibernate.engine.transaction.jta.platform.internal.WeblogicJtaPlatform",
+      "org.hibernate.cache.spi.OptimisticCacheSource",
+      "org.hibernate.dialect.SQLServerDialect",
+      "org.hibernate.dialect.SybaseDialect",
+      "org.hibernate.engine.spi.CascadeStyle",
+      "org.dom4j.tree.NamespaceCache",
+      "org.hibernate.engine.jdbc.dialect.spi.DialectFactory",
+      "org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformResolverInitiator",
+      "org.hibernate.internal.util.xml.OriginImpl",
+      "org.hibernate.jmx.spi.JmxService",
+      "org.hibernate.id.UUIDGenerator",
+      "org.hibernate.persister.spi.PersisterFactory",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$2$1",
+      "org.hibernate.TypeHelper",
+      "org.hibernate.cfg.AvailableSettings",
+      "org.hibernate.type.PostgresUUIDType",
+      "org.hibernate.dialect.DB2Dialect",
+      "org.hibernate.Session",
+      "org.hibernate.internal.util.config.ConfigurationHelper",
+      "org.dom4j.tree.QNameCache",
+      "org.hibernate.SimpleNaturalIdLoadAccess",
+      "org.hibernate.engine.transaction.jta.platform.internal.BitronixJtaPlatform",
+      "org.jboss.logging.BasicLogger",
+      "org.hibernate.type.SpecialOneToOneType",
+      "org.hibernate.internal.util.config.ConfigurationException",
+      "org.hibernate.metamodel.spi.TypeContributor",
+      "org.hibernate.engine.transaction.jta.platform.internal.SunOneJtaPlatform",
+      "org.hibernate.engine.jdbc.connections.internal.MultiTenantConnectionProviderInitiator",
+      "org.hibernate.cfg.Environment",
+      "org.hibernate.hql.spi.TemporaryTableBulkIdStrategy",
+      "org.hibernate.type.LocaleType",
+      "org.hibernate.boot.registry.internal.StandardServiceRegistryImpl",
+      "org.hibernate.type.descriptor.sql.SqlTypeDescriptor",
+      "org.dom4j.NodeFilter",
+      "org.hibernate.type.descriptor.java.FloatTypeDescriptor",
+      "org.hibernate.type.descriptor.java.UrlTypeDescriptor",
+      "org.dom4j.tree.DefaultComment",
+      "org.hibernate.type.descriptor.java.SerializableTypeDescriptor",
+      "org.hibernate.dialect.MySQL5InnoDBDialect",
+      "org.hibernate.id.factory.spi.MutableIdentifierGeneratorFactory",
+      "org.hibernate.usertype.CompositeUserType",
+      "org.hibernate.engine.jdbc.spi.SqlStatementLogger",
+      "org.hibernate.mapping.Table",
+      "org.hibernate.secure.spi.IntegrationException",
+      "org.hibernate.mapping.AuxiliaryDatabaseObject",
+      "org.hibernate.annotations.common.reflection.XMember",
+      "org.hibernate.type.descriptor.sql.VarcharTypeDescriptor",
+      "org.hibernate.type.descriptor.java.PrimitiveCharacterArrayTypeDescriptor",
+      "org.hibernate.type.descriptor.java.UUIDTypeDescriptor",
+      "org.hibernate.engine.jdbc.spi.ExtractedDatabaseMetaData$SQLStateType",
+      "org.openecomp.mso.db.catalog.beans.Recipe",
+      "org.hibernate.secure.spi.JaccIntegrator$1",
+      "org.hibernate.id.factory.internal.MutableIdentifierGeneratorFactoryInitiator",
+      "org.hibernate.cfg.SettingsFactory",
+      "org.dom4j.io.SAXContentHandler",
+      "org.dom4j.QName",
+      "org.hibernate.type.AssociationType",
+      "org.hibernate.cfg.ExtendsQueueEntry",
+      "org.hibernate.ReplicationMode",
+      "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader",
+      "org.dom4j.tree.DefaultElement",
+      "org.hibernate.engine.transaction.spi.TransactionImplementor",
+      "org.hibernate.persister.entity.EntityPersister",
+      "org.dom4j.Node",
+      "org.hibernate.service.spi.ServiceBinding",
+      "org.hibernate.type.BasicTypeRegistry",
+      "org.hibernate.internal.util.ValueHolder$1",
+      "org.hibernate.dialect.function.SQLFunction",
+      "org.hibernate.NonUniqueResultException",
+      "org.hibernate.SessionFactoryObserver",
+      "org.hibernate.type.descriptor.sql.RealTypeDescriptor",
+      "org.hibernate.dialect.PostgreSQL81Dialect",
+      "org.hibernate.collection.spi.PersistentCollection",
+      "org.hibernate.type.descriptor.sql.DateTypeDescriptor",
+      "org.dom4j.tree.AbstractAttribute",
+      "org.hibernate.internal.CoreMessageLogger_$logger",
+      "org.hibernate.dialect.PostgreSQLDialect",
+      "org.hibernate.dialect.MySQLDialect",
+      "org.hibernate.internal.jaxb.cfg.JaxbHibernateConfiguration",
+      "org.openecomp.mso.db.catalog.beans.VnfRecipe",
+      "org.hibernate.engine.transaction.jta.platform.internal.JBossAppServerJtaPlatform",
+      "org.hibernate.service.ConfigLoader$1",
+      "org.hibernate.type.MaterializedNClobType",
+      "org.hibernate.type.IdentifierType",
+      "org.hibernate.type.SingleColumnType",
+      "org.hibernate.type.descriptor.java.CharacterArrayTypeDescriptor",
+      "org.hibernate.SessionBuilder",
+      "org.openecomp.mso.db.catalog.beans.NetworkRecipe",
+      "org.hibernate.mapping.MetaAttributable",
+      "org.hibernate.type.descriptor.java.MutableMutabilityPlan",
+      "org.hibernate.secure.spi.JaccPermissionDeclarations",
+      "org.hibernate.type.UrlType",
+      "org.hibernate.tuple.entity.AbstractEntityTuplizer$MappedIdentifierValueMarshaller",
+      "org.hibernate.tuple.component.ComponentMetamodel",
+      "org.hibernate.persister.walking.spi.EntityDefinition",
+      "org.hibernate.type.YesNoType",
+      "org.hibernate.id.AbstractPostInsertGenerator",
+      "org.openecomp.mso.db.catalog.beans.VfModule",
+      "org.hibernate.annotations.common.reflection.java.JavaXArrayType",
+      "org.hibernate.exception.spi.SQLExceptionConverter",
+      "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader$1",
+      "org.hibernate.type.AbstractStandardBasicType",
+      "org.hibernate.hql.spi.QueryTranslatorFactory",
+      "org.hibernate.SharedSessionContract",
+      "org.hibernate.cfg.Configuration$ObjectNameNormalizerImpl",
+      "org.hibernate.annotations.common.reflection.java.JavaXSimpleType",
+      "org.hibernate.cfg.ObjectNameNormalizer",
+      "org.hibernate.service.internal.SessionFactoryServiceRegistryFactoryImpl",
+      "org.hibernate.service.internal.ServiceDependencyException",
+      "org.hibernate.event.spi.PostDeleteEvent",
+      "org.hibernate.type.descriptor.java.BooleanTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.FloatTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.SqlTypeDescriptorRegistry",
+      "org.hibernate.dialect.InformixDialect",
+      "org.jboss.logging.Logger",
+      "org.hibernate.cfg.Configuration$1",
+      "org.hibernate.tuple.entity.EntityMetamodel$GenerationStrategyPair",
+      "org.hibernate.type.ImageType",
+      "org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory",
+      "org.hibernate.engine.transaction.jta.platform.internal.JBossStandAloneJtaPlatform",
+      "org.hibernate.cfg.Configuration$3",
+      "org.hibernate.engine.jndi.JndiNameException",
+      "org.hibernate.dialect.PostgreSQL9Dialect",
+      "org.hibernate.type.CompositeType",
+      "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate",
+      "org.dom4j.ElementPath",
+      "org.jboss.logging.LoggerProviders",
+      "org.hibernate.type.descriptor.WrapperOptions",
+      "org.hibernate.id.SequenceHiLoGenerator",
+      "org.hibernate.type.descriptor.java.NClobTypeDescriptor$NClobMutabilityPlan",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$3",
+      "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$2",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$4",
+      "org.hibernate.secure.spi.JaccIntegrator",
+      "org.hibernate.tuple.entity.EntityMetamodel",
+      "org.hibernate.dialect.DerbyTenFiveDialect",
+      "org.hibernate.tuple.Instantiator",
+      "org.hibernate.type.descriptor.java.AbstractTypeDescriptor",
+      "org.hibernate.type.BagType",
+      "org.hibernate.type.CalendarType",
+      "org.hibernate.internal.util.ClassLoaderHelper",
+      "org.hibernate.BasicQueryContract",
+      "org.hibernate.CallbackException",
+      "org.hibernate.engine.jdbc.LobCreator",
+      "org.hibernate.type.descriptor.java.DoubleTypeDescriptor",
+      "org.dom4j.Element",
+      "org.hibernate.dialect.FrontBaseDialect",
+      "org.hibernate.boot.registry.classloading.spi.ClassLoadingException",
+      "org.hibernate.tuple.entity.EntityTuplizerFactory",
+      "org.hibernate.stat.SessionStatistics",
+      "org.hibernate.type.OrderedSetType",
+      "org.hibernate.mapping.TableOwner",
+      "org.hibernate.type.descriptor.ValueBinder",
+      "org.hibernate.bytecode.spi.ReflectionOptimizer",
+      "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$Work",
+      "org.hibernate.dialect.DB2390Dialect",
+      "org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl",
+      "org.hibernate.type.descriptor.java.LocaleTypeDescriptor",
+      "org.hibernate.engine.transaction.jta.platform.internal.WebSphereJtaPlatform",
+      "org.hibernate.engine.jdbc.spi.JdbcConnectionAccess",
+      "org.hibernate.SharedSessionBuilder",
+      "org.openecomp.mso.db.catalog.beans.NetworkResource",
+      "org.hibernate.type.TimeZoneType",
+      "org.hibernate.mapping.PersistentClass",
+      "org.hibernate.tuple.entity.EntityTuplizer",
+      "org.hibernate.engine.transaction.jta.platform.internal.OC4JJtaPlatform",
+      "org.hibernate.type.descriptor.java.ClobTypeDescriptor$ClobMutabilityPlan",
+      "org.hibernate.Query",
+      "org.hibernate.annotations.common.reflection.java.generics.TypeEnvironment",
+      "org.hibernate.internal.util.beans.BeanInfoHelper$BeanInfoDelegate",
+      "org.hibernate.event.spi.PostDeleteEventListener",
+      "org.jboss.logging.Slf4jLogger",
+      "org.hibernate.annotations.common.Version",
+      "org.hibernate.EmptyInterceptor",
+      "org.hibernate.type.descriptor.sql.TimeTypeDescriptor",
+      "org.hibernate.type.descriptor.java.IntegerTypeDescriptor",
+      "org.hibernate.bytecode.spi.ClassTransformer",
+      "org.hibernate.id.TableGenerator",
+      "org.hibernate.id.Assigned",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.hibernate.type.ClobType",
+      "org.hibernate.id.UUIDHexGenerator",
+      "org.hibernate.engine.transaction.internal.jta.JtaTransactionFactory",
+      "org.hibernate.id.enhanced.DatabaseStructure",
+      "org.hibernate.cache.CacheException",
+      "org.hibernate.event.spi.PostUpdateEvent",
+      "org.hibernate.type.TypeFactory$1",
+      "org.hibernate.HibernateException",
+      "org.hibernate.engine.jdbc.connections.spi.MultiTenantConnectionProvider",
+      "org.hibernate.cfg.annotations.reflection.JPAMetadataProvider",
+      "org.hibernate.cfg.NamingStrategy",
+      "org.hibernate.dialect.H2Dialect",
+      "org.hibernate.type.descriptor.sql.BasicBinder",
+      "org.hibernate.dialect.IngresDialect",
+      "org.hibernate.persister.walking.spi.CollectionDefinition",
+      "org.dom4j.tree.ConcurrentReaderHashMap$Entry",
+      "org.hibernate.tool.hbm2ddl.DatabaseMetadata",
+      "org.hibernate.id.ForeignGenerator",
+      "org.hibernate.type.EmbeddedComponentType",
+      "org.hibernate.event.spi.PostInsertEvent",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.hibernate.type.descriptor.sql.LongNVarcharTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.CharTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.IntegerTypeDescriptor",
+      "org.hibernate.type.CharacterNCharType",
+      "org.hibernate.internal.util.xml.DTDEntityResolver",
+      "org.dom4j.io.JAXPHelper",
+      "org.hibernate.cache.spi.RegionFactory",
+      "org.dom4j.tree.FlyweightAttribute",
+      "org.hibernate.engine.jndi.internal.JndiServiceInitiator",
+      "org.dom4j.IllegalAddException",
+      "org.hibernate.type.descriptor.java.BigIntegerTypeDescriptor",
+      "org.hibernate.annotations.common.reflection.XPackage",
+      "org.hibernate.persister.walking.spi.AttributeSource",
+      "org.hibernate.internal.util.compare.ComparableComparator",
+      "org.dom4j.tree.AbstractNode",
+      "org.dom4j.Visitor",
+      "org.hibernate.type.XmlRepresentableType",
+      "org.dom4j.CharacterData",
+      "org.hibernate.type.AbstractSingleColumnStandardBasicType",
+      "org.hibernate.bytecode.spi.ProxyFactoryFactory",
+      "org.hibernate.cfg.Mappings",
+      "org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform",
+      "org.hibernate.type.DateType",
+      "org.hibernate.type.descriptor.java.UUIDTypeDescriptor$ValueTransformer",
+      "org.hibernate.cfg.RecoverableException",
+      "org.hibernate.type.SerializableType",
+      "org.hibernate.bytecode.buildtime.spi.ClassFilter",
+      "org.hibernate.internal.util.xml.MappingReader",
+      "org.hibernate.dialect.DB2400Dialect",
+      "org.openecomp.mso.db.catalog.beans.HeatTemplate",
+      "org.hibernate.hql.spi.PersistentTableBulkIdStrategy",
+      "org.hibernate.engine.jdbc.spi.SchemaNameResolver",
+      "org.hibernate.annotations.common.util.StandardClassLoaderDelegateImpl",
+      "org.hibernate.IdentifierLoadAccess",
+      "org.hibernate.annotations.common.reflection.ClassLoadingException",
+      "org.hibernate.metamodel.domain.AttributeContainer",
+      "org.hibernate.type.UUIDCharType",
+      "org.hibernate.transform.ResultTransformer",
+      "org.hibernate.cache.internal.NoCachingRegionFactory",
+      "org.hibernate.service.spi.ServiceException",
+      "org.hibernate.internal.util.collections.CollectionHelper",
+      "org.hibernate.exception.spi.SQLExceptionConversionDelegate",
+      "org.hibernate.secure.spi.PermissibleAction",
+      "org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe",
+      "org.hibernate.annotations.common.reflection.java.JavaMetadataProvider",
+      "org.hibernate.Filter",
+      "org.hibernate.context.spi.CurrentTenantIdentifierResolver",
+      "org.hibernate.SQLQuery",
+      "org.hibernate.Interceptor",
+      "org.dom4j.tree.ConcurrentReaderHashMap$Values",
+      "org.dom4j.io.SAXHelper",
+      "org.hibernate.engine.jndi.JndiException",
+      "org.hibernate.dialect.MckoiDialect",
+      "org.hibernate.engine.transaction.internal.TransactionFactoryInitiator",
+      "org.hibernate.LobHelper",
+      "org.hibernate.exception.spi.ConversionContext",
+      "org.hibernate.JDBCException",
+      "org.hibernate.engine.jdbc.dialect.internal.DialectResolverSet",
+      "org.hibernate.type.TextType",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor",
+      "org.hibernate.dialect.Oracle10gDialect",
+      "org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport",
+      "org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder",
+      "org.hibernate.id.AbstractUUIDGenerator",
+      "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
+      "org.hibernate.hql.spi.MultiTableBulkIdStrategy",
+      "org.hibernate.type.LiteralType",
+      "org.hibernate.service.internal.SessionFactoryServiceRegistryFactoryInitiator",
+      "org.hibernate.service.spi.SessionFactoryServiceRegistryFactory",
+      "org.hibernate.metamodel.spi.TypeContributions",
+      "org.hibernate.service.spi.InjectService",
+      "org.hibernate.engine.loading.internal.EntityLoadContext",
+      "org.hibernate.type.ClassType",
+      "org.hibernate.type.TypeFactory$TypeScope",
+      "org.hibernate.type.descriptor.java.ArrayMutabilityPlan",
+      "org.hibernate.bytecode.buildtime.spi.FieldFilter",
+      "org.hibernate.cache.spi.QueryCacheFactory",
+      "org.hibernate.criterion.CriteriaSpecification",
+      "org.hibernate.type.ArrayType",
+      "org.hibernate.type.CharArrayType",
+      "org.hibernate.engine.transaction.jta.platform.internal.OrionJtaPlatform",
+      "org.jboss.logging.Logger$1",
+      "org.hibernate.boot.registry.selector.internal.StrategySelectorImpl",
+      "org.hibernate.type.ProcedureParameterExtractionAware",
+      "org.hibernate.MappingException",
+      "org.hibernate.mapping.Fetchable",
+      "org.hibernate.type.AbstractType",
+      "org.hibernate.dialect.MySQL5Dialect",
+      "org.hibernate.engine.spi.SessionImplementor",
+      "org.hibernate.dialect.InterbaseDialect",
+      "org.hibernate.type.descriptor.sql.BinaryTypeDescriptor",
+      "org.dom4j.tree.ConcurrentReaderHashMap$1",
+      "org.hibernate.type.TrueFalseType",
+      "org.hibernate.event.spi.PostInsertEventListener",
+      "org.hibernate.type.StringRepresentableType",
+      "org.hibernate.internal.CoreMessageLogger",
+      "org.hibernate.tuple.InDatabaseValueGenerationStrategy",
+      "org.hibernate.dialect.Cache71Dialect",
+      "org.hibernate.secure.spi.PermissionCheckEntityInformation",
+      "org.hibernate.type.descriptor.java.JdbcTimeTypeDescriptor$TimeMutabilityPlan",
+      "org.hibernate.tuple.InMemoryValueGenerationStrategy",
+      "org.hibernate.type.EntityType",
+      "org.hibernate.event.internal.EntityCopyAllowedObserver",
+      "org.dom4j.tree.AbstractElement",
+      "org.hibernate.dialect.ProgressDialect",
+      "org.hibernate.cfg.Settings",
+      "org.dom4j.DocumentFactory",
+      "org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractorInitiator",
+      "org.dom4j.DocumentException",
+      "org.hibernate.type.descriptor.java.SerializableTypeDescriptor$SerializableMutabilityPlan",
+      "org.dom4j.tree.ConcurrentReaderHashMap$EntrySet",
+      "org.hibernate.type.CalendarDateType",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.hibernate.type.StringType",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.jboss.logging.Slf4jLocationAwareLogger",
+      "org.hibernate.type.StringNVarcharType",
+      "org.hibernate.engine.transaction.spi.TransactionFactory",
+      "org.hibernate.cfg.AttributeConverterDefinition",
+      "org.hibernate.FlushMode",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$2$1",
+      "org.hibernate.type.MaterializedBlobType",
+      "org.hibernate.event.spi.EntityCopyObserver",
+      "org.hibernate.cfg.EJB3DTDEntityResolver",
+      "org.hibernate.annotations.common.util.impl.Log",
+      "org.hibernate.dialect.SQLServer2008Dialect",
+      "org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfoSource",
+      "org.hibernate.type.descriptor.java.CalendarTypeDescriptor",
+      "org.hibernate.type.descriptor.ValueExtractor",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.hibernate.service.spi.Wrapped",
+      "org.hibernate.bytecode.spi.EntityInstrumentationMetadata",
+      "org.hibernate.id.PersistentIdentifierGenerator",
+      "org.hibernate.internal.CoreLogging",
+      "org.hibernate.type.OrderedMapType",
+      "org.hibernate.jdbc.ReturningWork",
+      "org.hibernate.metamodel.relational.Size$LobMultiplier",
+      "org.hibernate.boot.registry.StandardServiceInitiator"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CatalogDatabaseESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.db.catalog.CatalogDatabase",
+      "org.openecomp.mso.db.catalog.beans.VnfComponent",
+      "org.openecomp.mso.db.catalog.beans.HeatTemplate",
+      "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate",
+      "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles",
+      "org.jboss.logging.Logger",
+      "org.jboss.logging.DelegatingBasicLogger",
+      "org.hibernate.internal.CoreMessageLogger_$logger",
+      "org.jboss.logging.Slf4jLocationAwareLogger",
+      "org.jboss.logging.Logger$Level",
+      "org.jboss.logging.Slf4jLocationAwareLogger$1",
+      "org.jboss.logging.LoggerProviders",
+      "org.hibernate.cfg.MetadataSourceType",
+      "org.hibernate.cfg.Configuration",
+      "org.hibernate.cfg.SettingsFactory",
+      "org.hibernate.type.TypeResolver",
+      "org.hibernate.type.BasicTypeRegistry",
+      "org.hibernate.metamodel.relational.Size",
+      "org.hibernate.metamodel.relational.Size$LobMultiplier",
+      "org.hibernate.type.AbstractStandardBasicType",
+      "org.hibernate.type.AbstractSingleColumnStandardBasicType",
+      "org.hibernate.type.descriptor.sql.SqlTypeDescriptorRegistry",
+      "org.hibernate.type.descriptor.sql.BooleanTypeDescriptor",
+      "org.hibernate.type.descriptor.java.AbstractTypeDescriptor",
+      "org.hibernate.type.descriptor.java.ImmutableMutabilityPlan",
+      "org.hibernate.internal.util.compare.ComparableComparator",
+      "org.hibernate.type.descriptor.java.JavaTypeDescriptorRegistry",
+      "org.hibernate.type.descriptor.java.BooleanTypeDescriptor",
+      "org.hibernate.type.BooleanType",
+      "org.hibernate.type.descriptor.sql.IntegerTypeDescriptor",
+      "org.hibernate.type.NumericBooleanType",
+      "org.hibernate.type.descriptor.sql.VarcharTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.CharTypeDescriptor",
+      "org.hibernate.type.TrueFalseType",
+      "org.hibernate.type.YesNoType",
+      "org.hibernate.type.descriptor.sql.TinyIntTypeDescriptor",
+      "org.hibernate.type.descriptor.java.ByteTypeDescriptor",
+      "org.hibernate.type.ByteType",
+      "org.hibernate.type.descriptor.java.CharacterTypeDescriptor",
+      "org.hibernate.type.CharacterType",
+      "org.hibernate.type.descriptor.sql.SmallIntTypeDescriptor",
+      "org.hibernate.type.descriptor.java.ShortTypeDescriptor",
+      "org.hibernate.type.ShortType",
+      "org.hibernate.type.descriptor.java.IntegerTypeDescriptor",
+      "org.hibernate.type.IntegerType",
+      "org.hibernate.type.descriptor.sql.BigIntTypeDescriptor",
+      "org.hibernate.type.descriptor.java.LongTypeDescriptor",
+      "org.hibernate.type.LongType",
+      "org.hibernate.type.descriptor.sql.RealTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.FloatTypeDescriptor",
+      "org.hibernate.type.descriptor.java.FloatTypeDescriptor",
+      "org.hibernate.type.FloatType",
+      "org.hibernate.type.descriptor.sql.DoubleTypeDescriptor",
+      "org.hibernate.type.descriptor.java.DoubleTypeDescriptor",
+      "org.hibernate.type.DoubleType",
+      "org.hibernate.type.descriptor.sql.DecimalTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.NumericTypeDescriptor",
+      "org.hibernate.type.descriptor.java.BigDecimalTypeDescriptor",
+      "org.hibernate.type.BigDecimalType",
+      "org.hibernate.type.descriptor.java.BigIntegerTypeDescriptor",
+      "org.hibernate.type.BigIntegerType",
+      "org.hibernate.type.descriptor.java.StringTypeDescriptor",
+      "org.hibernate.type.StringType",
+      "org.hibernate.type.descriptor.sql.NVarcharTypeDescriptor",
+      "org.hibernate.type.StringNVarcharType",
+      "org.hibernate.type.descriptor.sql.NCharTypeDescriptor",
+      "org.hibernate.type.CharacterNCharType",
+      "org.hibernate.type.descriptor.java.UrlTypeDescriptor",
+      "org.hibernate.type.UrlType",
+      "org.hibernate.type.descriptor.sql.DateTypeDescriptor",
+      "org.hibernate.type.descriptor.java.MutableMutabilityPlan",
+      "org.hibernate.type.descriptor.java.JdbcDateTypeDescriptor$DateMutabilityPlan",
+      "org.hibernate.type.descriptor.java.JdbcDateTypeDescriptor",
+      "org.hibernate.type.DateType",
+      "org.hibernate.type.descriptor.sql.TimeTypeDescriptor",
+      "org.hibernate.type.descriptor.java.JdbcTimeTypeDescriptor$TimeMutabilityPlan",
+      "org.hibernate.type.descriptor.java.JdbcTimeTypeDescriptor",
+      "org.hibernate.type.TimeType",
+      "org.hibernate.type.descriptor.sql.TimestampTypeDescriptor",
+      "org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor$TimestampMutabilityPlan",
+      "org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor",
+      "org.hibernate.type.TimestampType",
+      "org.hibernate.type.DbTimestampType",
+      "org.hibernate.type.descriptor.java.CalendarTypeDescriptor$CalendarMutabilityPlan",
+      "org.hibernate.type.descriptor.java.CalendarTypeDescriptor",
+      "org.hibernate.type.CalendarType",
+      "org.hibernate.type.descriptor.java.CalendarDateTypeDescriptor",
+      "org.hibernate.type.CalendarDateType",
+      "org.hibernate.type.descriptor.java.LocaleTypeDescriptor",
+      "org.hibernate.type.LocaleType",
+      "org.hibernate.type.descriptor.java.CurrencyTypeDescriptor",
+      "org.hibernate.type.CurrencyType",
+      "org.hibernate.type.descriptor.java.TimeZoneTypeDescriptor",
+      "org.hibernate.type.TimeZoneType",
+      "org.hibernate.type.descriptor.java.ClassTypeDescriptor",
+      "org.hibernate.type.ClassType",
+      "org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor",
+      "org.hibernate.type.descriptor.sql.BinaryTypeDescriptor",
+      "org.hibernate.type.descriptor.java.UUIDTypeDescriptor",
+      "org.hibernate.type.UUIDBinaryType",
+      "org.hibernate.type.UUIDCharType",
+      "org.hibernate.type.PostgresUUIDType$PostgresUUIDSqlTypeDescriptor",
+      "org.hibernate.type.PostgresUUIDType",
+      "org.hibernate.type.descriptor.java.ArrayMutabilityPlan",
+      "org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor",
+      "org.hibernate.type.BinaryType",
+      "org.hibernate.type.descriptor.java.ByteArrayTypeDescriptor",
+      "org.hibernate.type.WrapperBinaryType",
+      "org.hibernate.type.descriptor.sql.LongVarbinaryTypeDescriptor",
+      "org.hibernate.type.ImageType",
+      "org.hibernate.type.descriptor.java.PrimitiveCharacterArrayTypeDescriptor",
+      "org.hibernate.type.CharArrayType",
+      "org.hibernate.type.descriptor.java.CharacterArrayTypeDescriptor",
+      "org.hibernate.type.CharacterArrayType",
+      "org.hibernate.type.descriptor.sql.LongVarcharTypeDescriptor",
+      "org.hibernate.type.TextType",
+      "org.hibernate.type.descriptor.sql.LongNVarcharTypeDescriptor",
+      "org.hibernate.type.NTextType",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$2",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$3",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$4",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor$5",
+      "org.hibernate.type.descriptor.sql.BlobTypeDescriptor",
+      "org.hibernate.type.descriptor.java.BlobTypeDescriptor$BlobMutabilityPlan",
+      "org.hibernate.type.descriptor.java.BlobTypeDescriptor",
+      "org.hibernate.type.BlobType",
+      "org.hibernate.type.MaterializedBlobType",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$2",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$3",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor$5",
+      "org.hibernate.type.descriptor.sql.ClobTypeDescriptor",
+      "org.hibernate.type.descriptor.java.ClobTypeDescriptor$ClobMutabilityPlan",
+      "org.hibernate.type.descriptor.java.ClobTypeDescriptor",
+      "org.hibernate.type.ClobType",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$2",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$3",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor$4",
+      "org.hibernate.type.descriptor.sql.NClobTypeDescriptor",
+      "org.hibernate.type.descriptor.java.NClobTypeDescriptor$NClobMutabilityPlan",
+      "org.hibernate.type.descriptor.java.NClobTypeDescriptor",
+      "org.hibernate.type.NClobType",
+      "org.hibernate.type.MaterializedClobType",
+      "org.hibernate.type.MaterializedNClobType",
+      "org.hibernate.type.descriptor.java.SerializableTypeDescriptor",
+      "org.hibernate.type.descriptor.java.SerializableTypeDescriptor$SerializableMutabilityPlan",
+      "org.hibernate.type.SerializableType",
+      "org.hibernate.type.AbstractType",
+      "org.hibernate.type.AnyType",
+      "org.hibernate.type.ObjectType",
+      "org.hibernate.type.AdaptedImmutableType",
+      "org.hibernate.type.TypeFactory",
+      "org.hibernate.type.TypeFactory$TypeScopeImpl",
+      "org.hibernate.cfg.Configuration$ObjectNameNormalizerImpl",
+      "org.hibernate.cfg.Configuration$MetadataSourceQueue",
+      "org.hibernate.cfg.annotations.reflection.JPAMetadataProvider",
+      "org.hibernate.cfg.annotations.reflection.XMLContext",
+      "org.hibernate.annotations.common.util.impl.Log_$logger",
+      "org.hibernate.annotations.common.reflection.java.JavaReflectionManager",
+      "org.hibernate.annotations.common.util.StandardClassLoaderDelegateImpl",
+      "org.hibernate.internal.util.xml.DTDEntityResolver",
+      "org.hibernate.internal.util.xml.XMLHelper",
+      "org.hibernate.EmptyInterceptor",
+      "org.hibernate.internal.util.ConfigHelper",
+      "org.hibernate.internal.util.ClassLoaderHelper",
+      "org.hibernate.HibernateException",
+      "org.hibernate.internal.util.config.ConfigurationHelper",
+      "org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl",
+      "org.hibernate.cfg.Environment",
+      "org.hibernate.tuple.entity.EntityTuplizerFactory",
+      "org.hibernate.EntityMode",
+      "org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory",
+      "org.hibernate.cfg.EJB3NamingStrategy",
+      "org.hibernate.cfg.EJB3DTDEntityResolver",
+      "org.hibernate.internal.util.xml.ErrorLogger",
+      "org.dom4j.io.SAXReader",
+      "org.dom4j.io.SAXHelper",
+      "org.dom4j.DocumentFactory",
+      "org.dom4j.tree.AbstractNode",
+      "org.dom4j.tree.AbstractBranch",
+      "org.dom4j.tree.AbstractDocument",
+      "org.dom4j.tree.DefaultDocument",
+      "org.dom4j.tree.AbstractCharacterData",
+      "org.dom4j.tree.AbstractComment",
+      "org.dom4j.tree.FlyweightComment",
+      "org.dom4j.tree.DefaultComment",
+      "org.dom4j.tree.AbstractDocumentType",
+      "org.dom4j.tree.DefaultDocumentType",
+      "org.dom4j.tree.NamespaceCache",
+      "org.dom4j.tree.ConcurrentReaderHashMap",
+      "org.dom4j.tree.ConcurrentReaderHashMap$BarrierLock",
+      "org.dom4j.Namespace",
+      "org.dom4j.QName",
+      "org.dom4j.tree.AbstractElement",
+      "org.dom4j.tree.DefaultElement",
+      "org.dom4j.tree.AbstractAttribute",
+      "org.dom4j.tree.FlyweightAttribute",
+      "org.dom4j.tree.DefaultAttribute",
+      "org.dom4j.tree.AbstractText",
+      "org.dom4j.tree.FlyweightText",
+      "org.dom4j.tree.DefaultText",
+      "org.dom4j.tree.BackedList",
+      "org.hibernate.internal.util.xml.OriginImpl",
+      "org.hibernate.internal.util.xml.MappingReader",
+      "org.hibernate.internal.util.xml.XmlDocumentImpl",
+      "org.hibernate.boot.registry.StandardServiceRegistryBuilder",
+      "org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder",
+      "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl",
+      "org.hibernate.integrator.internal.IntegratorServiceImpl",
+      "org.hibernate.cfg.beanvalidation.BeanValidationIntegrator",
+      "org.hibernate.secure.spi.JaccIntegrator",
+      "org.hibernate.cache.internal.CollectionCacheInvalidator",
+      "org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl",
+      "org.hibernate.boot.registry.selector.internal.StrategySelectorImpl",
+      "org.hibernate.service.spi.ServiceBinding",
+      "org.hibernate.engine.config.internal.ConfigurationServiceInitiator",
+      "org.hibernate.tool.hbm2ddl.SingleLineSqlCommandExtractor",
+      "org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractorInitiator",
+      "org.hibernate.engine.jndi.internal.JndiServiceInitiator",
+      "org.hibernate.jmx.internal.JmxServiceInitiator",
+      "org.hibernate.persister.internal.PersisterClassResolverInitiator",
+      "org.hibernate.persister.internal.PersisterFactoryInitiator",
+      "org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator",
+      "org.hibernate.engine.jdbc.connections.internal.MultiTenantConnectionProviderInitiator",
+      "org.hibernate.engine.jdbc.dialect.internal.DialectResolverInitiator",
+      "org.hibernate.engine.jdbc.dialect.internal.DialectFactoryInitiator",
+      "org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator",
+      "org.hibernate.engine.jdbc.internal.JdbcServicesInitiator",
+      "org.hibernate.engine.jdbc.cursor.internal.RefCursorSupportInitiator",
+      "org.hibernate.id.factory.internal.MutableIdentifierGeneratorFactoryInitiator",
+      "org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformResolverInitiator",
+      "org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator",
+      "org.hibernate.engine.transaction.internal.TransactionFactoryInitiator",
+      "org.hibernate.service.internal.SessionFactoryServiceRegistryFactoryInitiator",
+      "org.hibernate.cache.internal.RegionFactoryInitiator",
+      "org.hibernate.service.StandardServiceInitiators",
+      "org.hibernate.service.ConfigLoader",
+      "org.hibernate.internal.util.ValueHolder",
+      "org.hibernate.secure.internal.DisabledJaccServiceImpl",
+      "org.hibernate.service.internal.AbstractServiceRegistryImpl",
+      "org.hibernate.service.internal.ConcurrentServiceBinding",
+      "org.hibernate.internal.util.collections.CollectionHelper",
+      "org.hibernate.engine.jdbc.internal.JdbcServicesImpl",
+      "org.hibernate.MultiTenancyStrategy",
+      "org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl",
+      "org.hibernate.engine.jndi.internal.JndiServiceImpl"
+    );
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTest.java
new file mode 100644 (file)
index 0000000..4c3a257
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:13:39 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.sql.Timestamp;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HeatEnvironmentESTest extends HeatEnvironmentESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setName("");
+      String string0 = heatEnvironment0.getName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setId(4618);
+      int int0 = heatEnvironment0.getId();
+      assertEquals(4618, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setId((-2248));
+      int int0 = heatEnvironment0.getId();
+      assertEquals((-2248), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setEnvironment("=?");
+      String string0 = heatEnvironment0.getEnvironment();
+      assertEquals("=?", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setEnvironment("");
+      String string0 = heatEnvironment0.getEnvironment();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setDescription("&G");
+      String string0 = heatEnvironment0.getDescription();
+      assertEquals("&G", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setDescription("");
+      String string0 = heatEnvironment0.getDescription();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      Timestamp timestamp0 = new Timestamp((long) 0);
+      heatEnvironment0.setCreated(timestamp0);
+      Timestamp timestamp1 = heatEnvironment0.getCreated();
+      assertSame(timestamp1, timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setAsdcUuid("L5UX?<T)6#pS4l");
+      String string0 = heatEnvironment0.getAsdcUuid();
+      assertEquals("L5UX?<T)6#pS4l", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setAsdcUuid("");
+      String string0 = heatEnvironment0.getAsdcUuid();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setAsdcResourceName("?zKdIbs8Xk_.4!");
+      String string0 = heatEnvironment0.getAsdcResourceName();
+      assertEquals("?zKdIbs8Xk_.4!", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setAsdcResourceName("");
+      String string0 = heatEnvironment0.getAsdcResourceName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setAsdcLabel(".");
+      String string0 = heatEnvironment0.getAsdcLabel();
+      assertEquals(".", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setAsdcLabel("");
+      String string0 = heatEnvironment0.getAsdcLabel();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      Timestamp timestamp0 = new Timestamp((long) 0);
+      heatEnvironment0.setCreated(timestamp0);
+      String string0 = heatEnvironment0.toString();
+      assertEquals("ID=0, name=null, version=null, description=null, environment=null, asdcUuid=null, asdcResourceName=null,created=1/1/70 12:00 AM", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setAsdcResourceName("?zKdIbs8Xk_.4!");
+      String string0 = heatEnvironment0.toString();
+      assertEquals("ID=0, name=null, version=null, description=null, environment=null, asdcUuid=null, asdcResourceName=?zKdIbs8Xk_.4!", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setAsdcUuid("");
+      String string0 = heatEnvironment0.toString();
+      assertEquals("ID=0, name=null, version=null, description=null, environment=null, asdcUuid=, asdcResourceName=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setDescription("?zKdIbs8Xk_.4!");
+      String string0 = heatEnvironment0.toString();
+      assertEquals("ID=0, name=null, version=null, description=?zKdIbs8Xk_.4!, environment=null, asdcUuid=null, asdcResourceName=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setName("}");
+      String string0 = heatEnvironment0.getName();
+      assertEquals("}", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      String string0 = heatEnvironment0.getAsdcUuid();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      String string0 = heatEnvironment0.getEnvironment();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      int int0 = heatEnvironment0.getId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      Timestamp timestamp0 = new Timestamp(356L);
+      heatEnvironment0.setCreated(timestamp0);
+      Timestamp timestamp1 = heatEnvironment0.getCreated();
+      assertSame(timestamp1, timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      String string0 = heatEnvironment0.getAsdcResourceName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      String string0 = heatEnvironment0.getName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      heatEnvironment0.setEnvironment("");
+      String string0 = heatEnvironment0.toString();
+      assertEquals("ID=0, name=null, version=null, description=null, environment=, asdcUuid=null, asdcResourceName=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      Timestamp timestamp0 = heatEnvironment0.getCreated();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      String string0 = heatEnvironment0.getAsdcLabel();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      HeatEnvironment heatEnvironment0 = new HeatEnvironment();
+      String string0 = heatEnvironment0.getDescription();
+      assertNull(string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatEnvironmentESTestscaffolding.java
new file mode 100644 (file)
index 0000000..2a67441
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:13:39 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class HeatEnvironmentESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatEnvironment"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatEnvironmentESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.db.catalog.beans.HeatEnvironment"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTest.java
new file mode 100644 (file)
index 0000000..ceb7f3b
--- /dev/null
@@ -0,0 +1,268 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:17:06 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.sql.Timestamp;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HeatFilesESTest extends HeatFilesESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setVnfResourceId(1);
+      int int0 = heatFiles0.getVnfResourceId();
+      assertEquals(1, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setVnfResourceId((-1));
+      int int0 = heatFiles0.getVnfResourceId();
+      assertEquals((-1), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setId(1401);
+      int int0 = heatFiles0.getId();
+      assertEquals(1401, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setId((-356));
+      int int0 = heatFiles0.getId();
+      assertEquals((-356), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setFileName("~%Ab#a%tf");
+      String string0 = heatFiles0.getFileName();
+      assertEquals("~%Ab#a%tf", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setFileName("");
+      String string0 = heatFiles0.getFileName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setFileBody("M9]V'AWK/44+BD");
+      String string0 = heatFiles0.getFileBody();
+      assertEquals("M9]V'AWK/44+BD", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setFileBody("");
+      String string0 = heatFiles0.getFileBody();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setDescription("~%Ab#a%tf");
+      String string0 = heatFiles0.getDescription();
+      assertEquals("~%Ab#a%tf", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setDescription("");
+      String string0 = heatFiles0.getDescription();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      Timestamp timestamp0 = new Timestamp(0L);
+      heatFiles0.setCreated(timestamp0);
+      Timestamp timestamp1 = heatFiles0.getCreated();
+      assertEquals("1970-01-01 00:00:00.0", timestamp1.toString());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setAsdcUuid("g$ vwC-q.`GT#b[<C");
+      String string0 = heatFiles0.getAsdcUuid();
+      assertEquals("g$ vwC-q.`GT#b[<C", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setAsdcUuid("");
+      String string0 = heatFiles0.getAsdcUuid();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setAsdcResourceName("");
+      String string0 = heatFiles0.getAsdcResourceName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setAsdcLabel("ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0");
+      String string0 = heatFiles0.getAsdcLabel();
+      assertEquals("ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      Timestamp timestamp0 = new Timestamp(0L);
+      heatFiles0.setCreated(timestamp0);
+      String string0 = heatFiles0.toString();
+      assertEquals("ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null,created=1/1/70 12:00 AM, vnfResourceId=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setAsdcResourceName("ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0");
+      String string0 = heatFiles0.toString();
+      assertEquals("ID=0, description=null, fileName=null, fileBody=null,asdcResourceName=ID=0, description=null, fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0, vnfResourceId=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setDescription(".");
+      String string0 = heatFiles0.toString();
+      assertEquals("ID=0, description=., fileName=null, fileBody=null, asdcResourceName=null, vnfResourceId=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setAsdcResourceName("+^hG");
+      String string0 = heatFiles0.getAsdcResourceName();
+      assertEquals("+^hG", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setFileName("");
+      String string0 = heatFiles0.toString();
+      assertEquals("ID=0, description=null,fileName=, fileBody=null, asdcResourceName=null, vnfResourceId=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      int int0 = heatFiles0.getVnfResourceId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      Timestamp timestamp0 = heatFiles0.getCreated();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      String string0 = heatFiles0.getDescription();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      Timestamp timestamp0 = new Timestamp(2247L);
+      heatFiles0.setCreated(timestamp0);
+      Timestamp timestamp1 = heatFiles0.getCreated();
+      assertEquals(247000000, timestamp1.getNanos());
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setFileBody("");
+      String string0 = heatFiles0.toString();
+      assertEquals("ID=0, description=null, fileName=null,fileBody=, asdcResourceName=null, vnfResourceId=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      String string0 = heatFiles0.getAsdcLabel();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      String string0 = heatFiles0.getFileName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      int int0 = heatFiles0.getId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      String string0 = heatFiles0.getFileBody();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      String string0 = heatFiles0.getAsdcResourceName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      String string0 = heatFiles0.getAsdcUuid();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      HeatFiles heatFiles0 = new HeatFiles();
+      heatFiles0.setAsdcLabel("");
+      String string0 = heatFiles0.getAsdcLabel();
+      assertEquals("", string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatFilesESTestscaffolding.java
new file mode 100644 (file)
index 0000000..8fd20de
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:17:06 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class HeatFilesESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatFiles"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatFilesESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.db.catalog.beans.HeatFiles"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTest.java
new file mode 100644 (file)
index 0000000..a741bb6
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:15:57 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HeatNestedTemplateESTest extends HeatNestedTemplateESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setChildTemplateId(3403);
+      heatNestedTemplate0.hashCode();
+      assertEquals(3403, heatNestedTemplate0.getChildTemplateId());
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setParentTemplateId(1980);
+      HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
+      boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate1);
+      assertEquals(1980, heatNestedTemplate0.getParentTemplateId());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
+      heatNestedTemplate0.setChildTemplateId((-2202));
+      boolean boolean0 = heatNestedTemplate1.equals(heatNestedTemplate0);
+      assertEquals(-2202, heatNestedTemplate0.getChildTemplateId());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setProviderResourceFile("org.openecomp.mso.db.catalog.beans.HeatNestedTemplate");
+      String string0 = heatNestedTemplate0.getProviderResourceFile();
+      assertEquals("org.openecomp.mso.db.catalog.beans.HeatNestedTemplate", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setProviderResourceFile("");
+      String string0 = heatNestedTemplate0.getProviderResourceFile();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setParentTemplateId(1173);
+      int int0 = heatNestedTemplate0.getParentTemplateId();
+      assertEquals(1173, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setParentTemplateId((-1085));
+      int int0 = heatNestedTemplate0.getParentTemplateId();
+      assertEquals((-1085), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setChildTemplateId(1307);
+      int int0 = heatNestedTemplate0.getChildTemplateId();
+      assertEquals(1307, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setChildTemplateId((-1857));
+      int int0 = heatNestedTemplate0.getChildTemplateId();
+      assertEquals((-1857), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      int int0 = heatNestedTemplate0.getParentTemplateId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      int int0 = heatNestedTemplate0.getChildTemplateId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
+      heatNestedTemplate1.setChildTemplateId(231);
+      boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate1);
+      assertEquals(231, heatNestedTemplate1.getChildTemplateId());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      boolean boolean0 = heatNestedTemplate0.equals((Object) null);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      String string0 = heatNestedTemplate0.toString();
+      assertEquals("ParentTemplateId=0, ChildTemplateId=0, providerResourceFile=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setProviderResourceFile("org.openecomp.mso.db.catalog.beans.HeatNestedTemplate");
+      String string0 = heatNestedTemplate0.toString();
+      assertEquals("ParentTemplateId=0, ChildTemplateId=0,providerResourceFile=org.openecomp.mso.db.catalog.beans.HeatNestedTemplate", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      String string0 = heatNestedTemplate0.getProviderResourceFile();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
+      boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate1);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      heatNestedTemplate0.setParentTemplateId((-511));
+      HeatNestedTemplate heatNestedTemplate1 = new HeatNestedTemplate();
+      boolean boolean0 = heatNestedTemplate0.equals(heatNestedTemplate1);
+      assertEquals(-511, heatNestedTemplate0.getParentTemplateId());
+      assertFalse(boolean0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatNestedTemplateESTestscaffolding.java
new file mode 100644 (file)
index 0000000..31b4b03
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:15:57 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class HeatNestedTemplateESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatNestedTemplateESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HeatNestedTemplateESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate"
+    );
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTest.java
new file mode 100644 (file)
index 0000000..d20f64a
--- /dev/null
@@ -0,0 +1,397 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:12:27 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.mock.java.time.MockLocalDateTime;
+import org.evosuite.runtime.testdata.EvoSuiteFile;
+import org.evosuite.runtime.testdata.FileSystemHandling;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HeatTemplateESTest extends HeatTemplateESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTimeoutMinutes(313);
+      int int0 = heatTemplate0.getTimeoutMinutes();
+      assertEquals(313, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTimeoutMinutes((-1781));
+      int int0 = heatTemplate0.getTimeoutMinutes();
+      assertEquals((-1781), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplatePath("9PO'c]OQ>6N |");
+      String string0 = heatTemplate0.getTemplatePath();
+      assertEquals("9PO'c]OQ>6N |", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplateName("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null");
+      String string0 = heatTemplate0.getTemplateName();
+      assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplateName("");
+      String string0 = heatTemplate0.getTemplateName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplateBody("ParentTemplateId=");
+      String string0 = heatTemplate0.getTemplateBody();
+      assertEquals("ParentTemplateId=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplateBody("");
+      String string0 = heatTemplate0.getTemplateBody();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      heatTemplate0.setParameters(linkedHashSet0);
+      Set<HeatTemplateParam> set0 = heatTemplate0.getParameters();
+      assertEquals(0, set0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      linkedHashSet0.add(heatTemplateParam0);
+      heatTemplate0.setParameters(linkedHashSet0);
+      Set<HeatTemplateParam> set0 = heatTemplate0.getParameters();
+      assertFalse(set0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setId(118);
+      int int0 = heatTemplate0.getId();
+      assertEquals(118, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setId((-340));
+      int int0 = heatTemplate0.getId();
+      assertEquals((-340), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatNestedTemplate> linkedHashSet0 = new LinkedHashSet<HeatNestedTemplate>();
+      HeatNestedTemplate heatNestedTemplate0 = new HeatNestedTemplate();
+      linkedHashSet0.add(heatNestedTemplate0);
+      heatTemplate0.setFiles(linkedHashSet0);
+      Set<HeatNestedTemplate> set0 = heatTemplate0.getFiles();
+      assertFalse(set0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setDescription("PARENT_COMPLETE");
+      String string0 = heatTemplate0.getDescription();
+      assertEquals("PARENT_COMPLETE", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setDescription("");
+      String string0 = heatTemplate0.getDescription();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LocalDateTime localDateTime0 = MockLocalDateTime.now();
+      Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
+      heatTemplate0.setCreated(timestamp0);
+      Timestamp timestamp1 = heatTemplate0.getCreated();
+      assertSame(timestamp1, timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setAsdcUuid("msg");
+      String string0 = heatTemplate0.getAsdcUuid();
+      assertEquals("msg", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setAsdcResourceName("!\7fIMW$RE2UtEWIEeJc5");
+      String string0 = heatTemplate0.getAsdcResourceName();
+      assertEquals("!\7fIMW$RE2UtEWIEeJc5", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setAsdcLabel("<JH|c2");
+      String string0 = heatTemplate0.getAsdcLabel();
+      assertEquals("<JH|c2", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setAsdcLabel("");
+      String string0 = heatTemplate0.getAsdcLabel();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      linkedHashSet0.add((HeatTemplateParam) null);
+      heatTemplate0.setParameters(linkedHashSet0);
+      // Undeclared exception!
+      try { 
+        heatTemplate0.toString();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.beans.HeatTemplate", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setRequired(true);
+      linkedHashSet0.add(heatTemplateParam0);
+      heatTemplate0.setParameters(linkedHashSet0);
+      String string0 = heatTemplate0.toString();
+      assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null,params=[null(reqd)]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      linkedHashSet0.add(heatTemplateParam0);
+      heatTemplate0.setParameters(linkedHashSet0);
+      String string0 = heatTemplate0.toString();
+      assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null,params=[null]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LocalDateTime localDateTime0 = MockLocalDateTime.now();
+      Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
+      heatTemplate0.setCreated(timestamp0);
+      String string0 = heatTemplate0.toString();
+      assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null,created=2/14/14 8:21 PM", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplateBody("]");
+      String string0 = heatTemplate0.toString();
+      assertEquals("Template=null,version=null,path=null,body=(1 chars),timeout=0,asdcUuid=null,asdcResourceName=null,description=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplateBody("]");
+      String string0 = heatTemplate0.getHeatTemplate();
+      assertEquals("]", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      String string0 = heatTemplate0.getAsdcLabel();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      String string0 = heatTemplate0.getTemplatePath();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      Set<HeatNestedTemplate> set0 = heatTemplate0.getFiles();
+      assertNull(set0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplateBody("");
+      String string0 = heatTemplate0.getHeatTemplate();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      Timestamp timestamp0 = heatTemplate0.getCreated();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      Set<HeatTemplateParam> set0 = heatTemplate0.getParameters();
+      assertNull(set0);
+  }
+
+  @Test(timeout = 4000)
+  public void test34()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      String string0 = heatTemplate0.getDescription();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test35()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setAsdcResourceName("");
+      String string0 = heatTemplate0.getAsdcResourceName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test36()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      String string0 = heatTemplate0.getAsdcUuid();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test37()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatNestedTemplate> linkedHashSet0 = new LinkedHashSet<HeatNestedTemplate>();
+      heatTemplate0.setFiles(linkedHashSet0);
+      Set<HeatNestedTemplate> set0 = heatTemplate0.getFiles();
+      assertTrue(set0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test38()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>();
+      heatTemplate0.setParameters(linkedHashSet0);
+      String string0 = heatTemplate0.toString();
+      assertEquals("Template=null,version=null,path=null,body=(Not defined),timeout=0,asdcUuid=null,asdcResourceName=null,description=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test39()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setTemplatePath("");
+      String string0 = heatTemplate0.getTemplatePath();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test40()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      Timestamp timestamp0 = new Timestamp(0L);
+      heatTemplate0.setCreated(timestamp0);
+      Timestamp timestamp1 = heatTemplate0.getCreated();
+      assertSame(timestamp1, timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test41()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      String string0 = heatTemplate0.getAsdcResourceName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test42()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      int int0 = heatTemplate0.getId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test43()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      String string0 = heatTemplate0.getTemplateName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test44()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      String string0 = heatTemplate0.getTemplateBody();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test45()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      int int0 = heatTemplate0.getTimeoutMinutes();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test46()  throws Throwable  {
+      HeatTemplate heatTemplate0 = new HeatTemplate();
+      heatTemplate0.setAsdcUuid("");
+      String string0 = heatTemplate0.getAsdcUuid();
+      assertEquals("", string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateESTestscaffolding.java
new file mode 100644 (file)
index 0000000..538852c
--- /dev/null
@@ -0,0 +1,111 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:12:27 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class HeatTemplateESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatTemplate"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatTemplateESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.db.catalog.beans.HeatTemplate",
+      "org.openecomp.mso.db.catalog.beans.HeatTemplateParam",
+      "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "com.att.eelf.i18n.EELFResourceManager"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HeatTemplateESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.db.catalog.beans.HeatTemplate",
+      "org.openecomp.mso.db.catalog.beans.HeatNestedTemplate"
+    );
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTest.java
new file mode 100644 (file)
index 0000000..f084204
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:22:57 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HeatTemplateParamESTest extends HeatTemplateParamESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setRequired(true);
+      boolean boolean0 = heatTemplateParam0.isRequired();
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setParamType("");
+      String string0 = heatTemplateParam0.getParamType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setParamName("c_(T_\7f3dD%");
+      String string0 = heatTemplateParam0.getParamName();
+      assertEquals("c_(T_\7f3dD%", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setParamName("");
+      String string0 = heatTemplateParam0.getParamName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setParamAlias("Param=c_(T_\7f3dD%,type=null,required=false,paramAlias=null");
+      String string0 = heatTemplateParam0.getParamAlias();
+      assertEquals("Param=c_(T_\7f3dD%,type=null,required=false,paramAlias=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setParamAlias("");
+      String string0 = heatTemplateParam0.getParamAlias();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setId(10);
+      int int0 = heatTemplateParam0.getId();
+      assertEquals(10, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setId((-5343));
+      int int0 = heatTemplateParam0.getId();
+      assertEquals((-5343), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setHeatTemplateId(10);
+      int int0 = heatTemplateParam0.getHeatTemplateId();
+      assertEquals(10, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      String string0 = heatTemplateParam0.toString();
+      assertEquals("Param=null,type=null,required=false,paramAlias=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      int int0 = heatTemplateParam0.getHeatTemplateId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      String string0 = heatTemplateParam0.getParamType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      String string0 = heatTemplateParam0.getParamAlias();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      boolean boolean0 = heatTemplateParam0.isRequired();
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setHeatTemplateId((-1));
+      int int0 = heatTemplateParam0.getHeatTemplateId();
+      assertEquals((-1), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      int int0 = heatTemplateParam0.getId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      String string0 = heatTemplateParam0.getParamName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam();
+      heatTemplateParam0.setParamType("(pA6");
+      String string0 = heatTemplateParam0.getParamType();
+      assertEquals("(pA6", string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParamESTestscaffolding.java
new file mode 100644 (file)
index 0000000..1fbef16
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:22:57 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class HeatTemplateParamESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.HeatTemplateParam"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HeatTemplateParamESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.HeatTemplateParam"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTest.java
new file mode 100644 (file)
index 0000000..4d7d131
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:22:12 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkRecipeESTest extends NetworkRecipeESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      NetworkRecipe networkRecipe0 = new NetworkRecipe();
+      networkRecipe0.setOrchestrationUri("");
+      String string0 = networkRecipe0.toString();
+      assertEquals("RECIPE: null,uri=,networkType=null,networkParamXSD=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      NetworkRecipe networkRecipe0 = new NetworkRecipe();
+      networkRecipe0.setAction("WL:?f53^x");
+      String string0 = networkRecipe0.toString();
+      assertEquals("RECIPE: WL:?f53^x,uri=null,networkType=null,networkParamXSD=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      NetworkRecipe networkRecipe0 = new NetworkRecipe();
+      networkRecipe0.setNetworkType("RECIPE: ");
+      String string0 = networkRecipe0.getNetworkType();
+      assertEquals("RECIPE: ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      NetworkRecipe networkRecipe0 = new NetworkRecipe();
+      networkRecipe0.setNetworkParamXSD("!R\"am4?r!");
+      String string0 = networkRecipe0.getNetworkParamXSD();
+      assertEquals("!R\"am4?r!", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      NetworkRecipe networkRecipe0 = new NetworkRecipe();
+      String string0 = networkRecipe0.getNetworkParamXSD();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      NetworkRecipe networkRecipe0 = new NetworkRecipe();
+      networkRecipe0.setNetworkType("");
+      String string0 = networkRecipe0.getNetworkType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      NetworkRecipe networkRecipe0 = new NetworkRecipe();
+      networkRecipe0.setNetworkParamXSD("");
+      String string0 = networkRecipe0.getNetworkParamXSD();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      NetworkRecipe networkRecipe0 = new NetworkRecipe();
+      String string0 = networkRecipe0.getNetworkType();
+      assertNull(string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkRecipeESTestscaffolding.java
new file mode 100644 (file)
index 0000000..04184f5
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:22:12 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class NetworkRecipeESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.NetworkRecipe"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkRecipeESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.NetworkRecipe",
+      "org.openecomp.mso.db.catalog.beans.Recipe",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTest.java
new file mode 100644 (file)
index 0000000..71520bb
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:21:59 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import java.sql.Timestamp;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class NetworkResourceESTest extends NetworkResourceESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setTemplateId((-835));
+      int int0 = networkResource0.getTemplateId();
+      assertEquals((-835), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setOrchestrationMode("V");
+      String string0 = networkResource0.getOrchestrationMode();
+      assertEquals("V", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setOrchestrationMode("");
+      String string0 = networkResource0.getOrchestrationMode();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setNeutronNetworkType(",aicVersionMin=");
+      String string0 = networkResource0.getNeutronNetworkType();
+      assertEquals(",aicVersionMin=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setNeutronNetworkType("");
+      String string0 = networkResource0.getNeutronNetworkType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setNetworkType("zOD2");
+      String string0 = networkResource0.getNetworkType();
+      assertEquals("zOD2", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setId(1);
+      int int0 = networkResource0.getId();
+      assertEquals(1, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setId((-6321));
+      int int0 = networkResource0.getId();
+      assertEquals((-6321), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setDescription("NETWORK=null,version=null,mode=null,template=0,neutronType=null,aicVersionMin=VO>5~X,aicVersionMax=VO>5~Xid=0");
+      String string0 = networkResource0.getDescription();
+      assertEquals("NETWORK=null,version=null,mode=null,template=0,neutronType=null,aicVersionMin=VO>5~X,aicVersionMax=VO>5~Xid=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setAicVersionMin("");
+      String string0 = networkResource0.getAicVersionMin();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setAicVersionMax("E{6!_C$\7f30Kby>]gllF");
+      String string0 = networkResource0.getAicVersionMax();
+      assertEquals("E{6!_C$\7f30Kby>]gllF", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setAicVersionMax("");
+      String string0 = networkResource0.getAicVersionMax();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      Timestamp timestamp0 = mock(Timestamp.class, new ViolatedAssumptionAnswer());
+      doReturn(1L).when(timestamp0).getTime();
+      networkResource0.setCreated(timestamp0);
+      String string0 = networkResource0.toString();
+      assertEquals("NETWORK=null,version=null,mode=null,template=0,neutronType=null,aicVersionMin=null,aicVersionMax=nullid=0,created=1/1/70 12:00 AM", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      String string0 = networkResource0.toString();
+      assertEquals("NETWORK=null,version=null,mode=null,template=0,neutronType=null,aicVersionMin=null,aicVersionMax=nullid=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      String string0 = networkResource0.getDescription();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setAicVersionMin("VO>5~X");
+      String string0 = networkResource0.getAicVersionMin();
+      assertEquals("VO>5~X", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      String string0 = networkResource0.getNeutronNetworkType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      String string0 = networkResource0.getOrchestrationMode();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      String string0 = networkResource0.getAicVersionMax();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      String string0 = networkResource0.getAicVersionMin();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      int int0 = networkResource0.getTemplateId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setDescription("");
+      String string0 = networkResource0.getDescription();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      String string0 = networkResource0.getNetworkType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      Timestamp timestamp0 = networkResource0.getCreated();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      int int0 = networkResource0.getId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setNetworkType("");
+      String string0 = networkResource0.getNetworkType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      NetworkResource networkResource0 = new NetworkResource();
+      networkResource0.setTemplateId(2085);
+      int int0 = networkResource0.getTemplateId();
+      assertEquals(2085, int0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/NetworkResourceESTestscaffolding.java
new file mode 100644 (file)
index 0000000..fdef26e
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:21:59 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class NetworkResourceESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.NetworkResource"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NetworkResourceESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.NetworkResource",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTest.java
new file mode 100644 (file)
index 0000000..03ad09c
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:21:28 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import java.sql.Timestamp;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class RecipeESTest extends RecipeESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setOrchestrationUri("");
+      String string0 = recipe0.toString();
+      assertEquals("RECIPE: null,uri=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setServiceType("s5s< CkZ9K:R0~\7f ;");
+      String string0 = recipe0.getServiceType();
+      assertEquals("s5s< CkZ9K:R0~\7f ;", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setServiceType("");
+      String string0 = recipe0.getServiceType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setRecipeTimeout((-639));
+      int int0 = recipe0.getRecipeTimeout();
+      assertEquals((-639), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.orchestrationUri = ".";
+      String string0 = recipe0.getOrchestrationUri();
+      assertEquals(".", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setOrchestrationUri("");
+      String string0 = recipe0.getOrchestrationUri();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setId(1);
+      int int0 = recipe0.getId();
+      assertEquals(1, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setId((-529));
+      int int0 = recipe0.getId();
+      assertEquals((-529), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setDescription("F+/=");
+      String string0 = recipe0.getDescription();
+      assertEquals("F+/=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setDescription("");
+      String string0 = recipe0.getDescription();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setAction("RECIPE: null,uri=null");
+      String string0 = recipe0.getAction();
+      assertEquals("RECIPE: null,uri=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.action = "";
+      String string0 = recipe0.getAction();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      Timestamp timestamp0 = mock(Timestamp.class, new ViolatedAssumptionAnswer());
+      doReturn(0L).when(timestamp0).getTime();
+      recipe0.setCreated(timestamp0);
+      String string0 = recipe0.toString();
+      assertEquals("RECIPE: null,uri=null,created=1/1/70 12:00 AM", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      int int0 = recipe0.getId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      String string0 = recipe0.getDescription();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      int int0 = recipe0.getRecipeTimeout();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      recipe0.setRecipeTimeout(957);
+      int int0 = recipe0.getRecipeTimeout();
+      assertEquals(957, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      String string0 = recipe0.getAction();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      Timestamp timestamp0 = recipe0.getCreated();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      String string0 = recipe0.getOrchestrationUri();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      Recipe recipe0 = new Recipe();
+      String string0 = recipe0.getServiceType();
+      assertNull(string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/RecipeESTestscaffolding.java
new file mode 100644 (file)
index 0000000..667bc93
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:21:28 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class RecipeESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.Recipe"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RecipeESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.Recipe",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTest.java
new file mode 100644 (file)
index 0000000..57f2d5d
--- /dev/null
@@ -0,0 +1,296 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:19:44 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.sql.Timestamp;
+import java.time.Clock;
+import java.time.LocalDateTime;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.evosuite.runtime.mock.java.time.MockClock;
+import org.evosuite.runtime.mock.java.time.MockLocalDateTime;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ServiceESTest extends ServiceESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setServiceVersion("RECIPE: ");
+      String string0 = service0.getServiceVersion();
+      assertEquals("RECIPE: ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setServiceNameVersionId(">{PeD}EDcITG;{Z%FH");
+      String string0 = service0.getServiceNameVersionId();
+      assertEquals(">{PeD}EDcITG;{Z%FH", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setServiceName("RECIPE: ");
+      String string0 = service0.getServiceName();
+      assertEquals("RECIPE: ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setServiceName("");
+      String string0 = service0.getServiceName();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      Service service0 = new Service();
+      HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      hashMap0.put(",created=", serviceRecipe0);
+      service0.setRecipes(hashMap0);
+      Map<String, ServiceRecipe> map0 = service0.getRecipes();
+      assertFalse(map0.isEmpty());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setModelInvariantUUID("BZ@s");
+      String string0 = service0.getModelInvariantUUID();
+      assertEquals("BZ@s", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setId(1033);
+      int int0 = service0.getId();
+      assertEquals(1033, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setId((-164));
+      int int0 = service0.getId();
+      assertEquals((-164), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setHttpMethod(",description=");
+      String string0 = service0.getHttpMethod();
+      assertEquals(",description=", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setDescription("");
+      String string0 = service0.getDescription();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      Service service0 = new Service();
+      Timestamp timestamp0 = new Timestamp(0L);
+      service0.setCreated(timestamp0);
+      Timestamp timestamp1 = service0.getCreated();
+      assertEquals(0, timestamp1.getNanos());
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      Service service0 = new Service();
+      Clock clock0 = MockClock.systemUTC();
+      LocalDateTime localDateTime0 = MockLocalDateTime.now(clock0);
+      Timestamp timestamp0 = Timestamp.valueOf(localDateTime0);
+      service0.setCreated(timestamp0);
+      Timestamp timestamp1 = service0.getCreated();
+      assertSame(timestamp1, timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      Service service0 = new Service();
+      // Undeclared exception!
+      try { 
+        service0.toString();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.beans.Service", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      Service service0 = new Service();
+      HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      hashMap0.put(",created=", serviceRecipe0);
+      service0.setRecipes(hashMap0);
+      String string0 = service0.toString();
+      assertEquals("SERVICE: id=0,name=null,version=null,description=null,modelInvariantUUID=null\nRECIPE: null,uri=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setServiceNameVersionId("83y*#72]},kHXOT");
+      service0.setServiceNameVersionId("f6t}qujI)DMM>b=J");
+      Map<String, ServiceRecipe> map0 = (Map<String, ServiceRecipe>) mock(Map.class, new ViolatedAssumptionAnswer());
+      doReturn((String) null).when(map0).toString();
+      doReturn((Set) null).when(map0).keySet();
+      service0.setRecipes(map0);
+      service0.isTheSameVersion("83y*#72]},kHXOT");
+      service0.isMoreRecentThan(")0");
+      service0.getRecipes();
+      // Undeclared exception!
+      try { 
+        service0.toString();
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.beans.Service", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      Service service0 = new Service();
+      String string0 = service0.getDescription();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      Service service0 = new Service();
+      HashMap<String, ServiceRecipe> hashMap0 = new HashMap<String, ServiceRecipe>();
+      service0.setRecipes(hashMap0);
+      Map<String, ServiceRecipe> map0 = service0.getRecipes();
+      assertEquals(0, map0.size());
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      Service service0 = new Service();
+      int int0 = service0.getId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      Service service0 = new Service();
+      String string0 = service0.getServiceName();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setHttpMethod("");
+      String string0 = service0.getHttpMethod();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      Service service0 = new Service();
+      String string0 = service0.getModelInvariantUUID();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      Service service0 = new Service();
+      String string0 = service0.getServiceVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setServiceNameVersionId("");
+      String string0 = service0.getServiceNameVersionId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      Service service0 = new Service();
+      String string0 = service0.getHttpMethod();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      Service service0 = new Service();
+      Map<String, ServiceRecipe> map0 = service0.getRecipes();
+      assertNull(map0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setDescription("Ir%#'ua8B=h&yW\"(|");
+      String string0 = service0.getDescription();
+      assertEquals("Ir%#'ua8B=h&yW\"(|", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      Service service0 = new Service();
+      String string0 = service0.getServiceNameVersionId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setServiceVersion("");
+      String string0 = service0.getServiceVersion();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      Service service0 = new Service();
+      Timestamp timestamp0 = service0.getCreated();
+      service0.setCreated(timestamp0);
+      assertNull(service0.getServiceName());
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      Service service0 = new Service();
+      service0.setModelInvariantUUID("");
+      String string0 = service0.getModelInvariantUUID();
+      assertEquals("", string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceESTestscaffolding.java
new file mode 100644 (file)
index 0000000..d420236
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:19:44 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ServiceESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.Service"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.db.catalog.beans.Service"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTest.java
new file mode 100644 (file)
index 0000000..4b4ec68
--- /dev/null
@@ -0,0 +1,239 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:20:36 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+
+import java.sql.Timestamp;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class ServiceRecipeESTest extends ServiceRecipeESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      Integer integer0 = new Integer(0);
+      serviceRecipe0.setServiceTimeoutInterim(integer0);
+      Integer integer1 = serviceRecipe0.getServiceTimeoutInterim();
+      assertEquals(0, (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      Integer integer0 = new Integer(536);
+      serviceRecipe0.setServiceTimeoutInterim(integer0);
+      Integer integer1 = serviceRecipe0.getServiceTimeoutInterim();
+      assertEquals(536, (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      Integer integer0 = new Integer((-1032));
+      serviceRecipe0.setServiceTimeoutInterim(integer0);
+      Integer integer1 = serviceRecipe0.getServiceTimeoutInterim();
+      assertEquals((-1032), (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setServiceParamXSD("*9+?bc]Ov");
+      String string0 = serviceRecipe0.getServiceParamXSD();
+      assertEquals("*9+?bc]Ov", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setServiceId(1643);
+      int int0 = serviceRecipe0.getServiceId();
+      assertEquals(1643, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setServiceId((-1639));
+      int int0 = serviceRecipe0.getServiceId();
+      assertEquals((-1639), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setRecipeTimeout(536);
+      int int0 = serviceRecipe0.getRecipeTimeout();
+      assertEquals(536, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setRecipeTimeout((-1));
+      int int0 = serviceRecipe0.getRecipeTimeout();
+      assertEquals((-1), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setOrchestrationUri("R~N]`p<1UH\7fw6JYz");
+      String string0 = serviceRecipe0.getOrchestrationUri();
+      assertEquals("R~N]`p<1UH\7fw6JYz", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setId(1);
+      int int0 = serviceRecipe0.getId();
+      assertEquals(1, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setDescription("wLV^;f35^#");
+      String string0 = serviceRecipe0.getDescription();
+      assertEquals("wLV^;f35^#", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setAction("@T7x,XN.)\7f]mDZ");
+      String string0 = serviceRecipe0.getAction();
+      assertEquals("@T7x,XN.)\7f]mDZ", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setAction("");
+      String string0 = serviceRecipe0.getAction();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      Timestamp timestamp0 = mock(Timestamp.class, new ViolatedAssumptionAnswer());
+      doReturn(0L).when(timestamp0).getTime();
+      serviceRecipe0.setCreated(timestamp0);
+      String string0 = serviceRecipe0.toString();
+      assertEquals("RECIPE: null,uri=null,created=1/1/70 12:00 AM", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      String string0 = serviceRecipe0.toString();
+      assertEquals("RECIPE: null,uri=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      String string0 = serviceRecipe0.getOrchestrationUri();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      String string0 = serviceRecipe0.getAction();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      Timestamp timestamp0 = serviceRecipe0.getCreated();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      String string0 = serviceRecipe0.getServiceParamXSD();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setId((-642));
+      int int0 = serviceRecipe0.getId();
+      assertEquals((-642), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setDescription("");
+      String string0 = serviceRecipe0.getDescription();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      String string0 = serviceRecipe0.getDescription();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      int int0 = serviceRecipe0.getServiceId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      Integer integer0 = serviceRecipe0.getServiceTimeoutInterim();
+      assertNull(integer0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      int int0 = serviceRecipe0.getRecipeTimeout();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setOrchestrationUri("");
+      String string0 = serviceRecipe0.getOrchestrationUri();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      int int0 = serviceRecipe0.getId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      ServiceRecipe serviceRecipe0 = new ServiceRecipe();
+      serviceRecipe0.setServiceParamXSD("");
+      String string0 = serviceRecipe0.getServiceParamXSD();
+      assertEquals("", string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/ServiceRecipeESTestscaffolding.java
new file mode 100644 (file)
index 0000000..b17b447
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:20:36 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class ServiceRecipeESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.ServiceRecipe"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ServiceRecipeESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.ServiceRecipe",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTest.java
new file mode 100644 (file)
index 0000000..1a1c6ea
--- /dev/null
@@ -0,0 +1,726 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:19:11 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import java.sql.Timestamp;
+import java.time.Instant;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.PrivateAccess;
+import org.evosuite.runtime.System;
+import org.evosuite.runtime.mock.java.time.MockInstant;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VfModuleESTest extends VfModuleESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setModelVersion("EzJ)~3C++");
+      Integer integer0 = new Integer((-1));
+      vfModule0.setVnfResourceId(integer0);
+      vfModule0.getModelInvariantUuid();
+      vfModule0.getModelInvariantUuid();
+      VfModule vfModule1 = new VfModule();
+      vfModule1.setDescription("");
+      vfModule1.setIsBase((-1));
+      Integer integer1 = new Integer((-289));
+      vfModule1.setTemplateId(integer1);
+      vfModule1.getTemplateId();
+      vfModule1.setModelName("\7fYp{,,+-pFJp!Ym6r^");
+      vfModule1.getDescription();
+      vfModule0.setId((-1));
+      vfModule0.setId((-4103));
+      vfModule0.getId();
+      vfModule1.getVnfResourceId();
+      vfModule1.setTemplateId((Integer) null);
+      Timestamp timestamp0 = new Timestamp((-3970L));
+      vfModule0.setCreated(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.isTheSameVersion("1&T-qG");
+      Integer integer0 = new Integer((-385));
+      Integer integer1 = Integer.valueOf((-385));
+      Integer.toUnsignedString((-1));
+      Integer.getInteger("", integer1);
+      vfModule0.setVolTemplateId(integer0);
+      vfModule0.setModelInvariantUuid("1&T-qG");
+      vfModule0.toString();
+      vfModule0.getIsBase();
+      vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=-385,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule0.setType("wO");
+      vfModule0.getType();
+      vfModule0.isBase();
+      vfModule0.getIsBase();
+      vfModule0.setAsdcUuid("VF=");
+      vfModule0.getModelVersion();
+      vfModule0.setId(1);
+      vfModule0.setModelName("VF=");
+      vfModule0.getVolEnvironmentId();
+      vfModule0.setVolTemplateId((Integer) null);
+      vfModule0.setAsdcUuid("");
+      vfModule0.setModelVersion("1&T-qG");
+      vfModule0.isBase();
+      vfModule0.getEnvironmentId();
+      vfModule0.toString();
+      vfModule0.getDescription();
+      vfModule0.setType("");
+      vfModule0.setVnfResourceId(integer1);
+      System.setCurrentTimeMillis((-1L));
+      vfModule0.getVnfResourceId();
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      System.setCurrentTimeMillis(1L);
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setModelInvariantUuid("57f9");
+      vfModule0.setModelName("");
+      vfModule0.getDescription();
+      vfModule0.toString();
+      vfModule0.setType("");
+      vfModule0.getDescription();
+      vfModule0.getCreated();
+      vfModule0.setCreated((Timestamp) null);
+      Integer integer0 = new Integer(2109);
+      Integer integer1 = new Integer(1);
+      Integer.getInteger("D}'htOb?", integer1);
+      vfModule0.setVolEnvironmentId(integer0);
+      vfModule0.getVnfResourceId();
+      vfModule0.getModelName();
+      System.setCurrentTimeMillis(0L);
+      vfModule0.getModelName();
+      vfModule0.getCreated();
+      vfModule0.getModelName();
+      vfModule0.getDescription();
+      vfModule0.getDescription();
+      vfModule0.getModelName();
+      vfModule0.toString();
+      vfModule0.getCreated();
+      System.setCurrentTimeMillis(1L);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setId(600);
+      vfModule0.toString();
+      Integer integer0 = new Integer((-1));
+      Integer.divideUnsigned((-1), 1);
+      Integer.min((-1), 1);
+      Integer.max(2123, 600);
+      Integer integer1 = new Integer(2123);
+      vfModule0.setEnvironmentId(integer1);
+      vfModule0.setEnvironmentId(integer0);
+      vfModule0.isMoreRecentThan(",volEnvtId=");
+      vfModule0.getId();
+      Integer.compareUnsigned(467, (-1));
+      vfModule0.setEnvironmentId(integer0);
+      VfModule vfModule1 = new VfModule();
+      vfModule1.isMoreRecentThan("VF=null,modelName=null,version=null,id=600,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule1.toString();
+      VfModule vfModule2 = new VfModule();
+      vfModule0.getEnvironmentId();
+      vfModule2.getDescription();
+      vfModule2.setDescription((String) null);
+      vfModule2.setModelVersion(", description=");
+      vfModule2.toString();
+      vfModule1.getModelInvariantUuid();
+      vfModule1.toString();
+      vfModule1.getEnvironmentId();
+      vfModule0.setAsdcUuid("");
+      vfModule0.setDescription((String) null);
+      vfModule0.getIsBase();
+      vfModule0.getAsdcUuid();
+      vfModule0.getCreated();
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.getDescription();
+      Integer integer0 = new Integer(0);
+      vfModule0.setVolTemplateId(integer0);
+      vfModule0.setVersion((String) null);
+      vfModule0.getDescription();
+      vfModule0.setAsdcUuid((String) null);
+      Integer integer1 = new Integer(0);
+      Integer.getInteger((String) null);
+      vfModule0.setVnfResourceId(integer1);
+      vfModule0.setIsBase(1);
+      vfModule0.getVolEnvironmentId();
+      vfModule0.setId(0);
+      vfModule0.getModelInvariantUuid();
+      vfModule0.getEnvironmentId();
+      vfModule0.getIsBase();
+      vfModule0.setTemplateId(integer1);
+      vfModule0.getCreated();
+      vfModule0.getId();
+      vfModule0.getCreated();
+      vfModule0.getId();
+      vfModule0.setModelInvariantUuid((String) null);
+      vfModule0.getAsdcUuid();
+      vfModule0.getVnfResourceId();
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.getDescription();
+      Integer integer0 = new Integer(0);
+      Integer.divideUnsigned(1, 659);
+      vfModule0.setVolTemplateId(integer0);
+      vfModule0.setVersion((String) null);
+      vfModule0.getDescription();
+      vfModule0.setAsdcUuid((String) null);
+      Integer integer1 = new Integer(0);
+      Integer.getInteger((String) null);
+      vfModule0.setVnfResourceId(integer1);
+      vfModule0.setIsBase(1);
+      vfModule0.getVolEnvironmentId();
+      vfModule0.setId(0);
+      vfModule0.getModelInvariantUuid();
+      vfModule0.getEnvironmentId();
+      vfModule0.getIsBase();
+      vfModule0.setTemplateId(integer1);
+      vfModule0.getCreated();
+      vfModule0.getId();
+      vfModule0.getCreated();
+      vfModule0.getId();
+      vfModule0.setModelInvariantUuid((String) null);
+      vfModule0.getAsdcUuid();
+      System.setCurrentTimeMillis((-1L));
+      vfModule0.getTemplateId();
+      vfModule0.getDescription();
+      vfModule0.getAsdcUuid();
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.getVolEnvironmentId();
+      vfModule0.setEnvironmentId((Integer) null);
+      assertNull(vfModule0.getModelVersion());
+      
+      Integer integer0 = new Integer(1);
+      Integer.getInteger((String) null, (Integer) null);
+      vfModule0.setEnvironmentId(integer0);
+      vfModule0.setModelVersion((String) null);
+      vfModule0.setId(171);
+      vfModule0.toString();
+      vfModule0.getEnvironmentId();
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = Integer.valueOf((-2041));
+      Integer.compareUnsigned((-2041), (-1));
+      vfModule0.setTemplateId(integer0);
+      vfModule0.setIsBase(3154);
+      vfModule0.setModelInvariantUuid("");
+      vfModule0.setDescription("nPVyq+_;@IZP:L");
+      vfModule0.setId(883);
+      vfModule0.toString();
+      vfModule0.setIsBase((-2041));
+      vfModule0.getTemplateId();
+      vfModule0.getModelName();
+      vfModule0.getVnfResourceId();
+      vfModule0.toString();
+      vfModule0.isBase();
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setIsBase(0);
+      vfModule0.isMoreRecentThan(".");
+      vfModule0.toString();
+      vfModule0.setIsBase((-1465));
+      vfModule0.setModelInvariantUuid("u5L");
+      vfModule0.getIsBase();
+      vfModule0.setId(0);
+      vfModule0.getVolEnvironmentId();
+      System.setCurrentTimeMillis((-1465));
+      vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule0.setVersion("");
+      vfModule0.toString();
+      vfModule0.getAsdcUuid();
+      vfModule0.getEnvironmentId();
+      vfModule0.setVolEnvironmentId((Integer) null);
+      vfModule0.getVnfResourceId();
+      vfModule0.getDescription();
+      vfModule0.getVolEnvironmentId();
+      vfModule0.getCreated();
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.isMoreRecentThan("zL");
+      vfModule0.getType();
+      vfModule0.setModelName((String) null);
+      Integer integer0 = new Integer(0);
+      Integer.getInteger("zL", (Integer) null);
+      vfModule0.setType("");
+      Integer.sum(34, 34);
+      Integer.min(0, 2510);
+      Integer.divideUnsigned(0, (-1));
+      Integer.compare(0, 0);
+      vfModule0.setVolEnvironmentId(integer0);
+      vfModule0.setCreated((Timestamp) null);
+      vfModule0.getCreated();
+      vfModule0.getIsBase();
+      vfModule0.setAsdcUuid("");
+      vfModule0.setId(0);
+      vfModule0.getModelVersion();
+      vfModule0.setCreated((Timestamp) null);
+      vfModule0.setModelVersion((String) null);
+      vfModule0.getEnvironmentId();
+      vfModule0.getVolEnvironmentId();
+      vfModule0.getType();
+      vfModule0.setAsdcUuid((String) null);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setModelInvariantUuid("");
+      vfModule0.setType(",modelName=");
+      vfModule0.setModelVersion("");
+      vfModule0.setModelName("+cQA/1wAo}o/T7,S");
+      vfModule0.getVolTemplateId();
+      vfModule0.getVolEnvironmentId();
+      vfModule0.getVolTemplateId();
+      vfModule0.getModelInvariantUuid();
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = new Integer((-495));
+      Integer.getInteger("M0@M@T", (-495));
+      vfModule0.setVolEnvironmentId(integer0);
+      vfModule0.setId(892);
+      vfModule0.getTemplateId();
+      vfModule0.toString();
+      vfModule0.getVolEnvironmentId();
+      vfModule0.setDescription("M0@M@T");
+      vfModule0.getTemplateId();
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = new Integer(2707);
+      Integer integer1 = new Integer((-1));
+      Integer.getInteger("", integer1);
+      vfModule0.setVolEnvironmentId(integer0);
+      vfModule0.getModelName();
+      vfModule0.isMoreRecentThan("");
+      vfModule0.getAsdcUuid();
+      vfModule0.isMoreRecentThan((String) null);
+      vfModule0.getVnfResourceId();
+      vfModule0.toString();
+      vfModule0.getCreated();
+      vfModule0.getVolEnvironmentId();
+      vfModule0.getModelName();
+      vfModule0.getVnfResourceId();
+      vfModule0.getVnfResourceId();
+      vfModule0.getModelName();
+      vfModule0.getAsdcUuid();
+      vfModule0.getCreated();
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.isMoreRecentThan((String) null);
+      vfModule0.getCreated();
+      vfModule0.setVolEnvironmentId((Integer) null);
+      vfModule0.getVnfResourceId();
+      Integer integer0 = new Integer(2983);
+      vfModule0.isTheSameVersion((String) null);
+      vfModule0.setDescription(")b,;fs\"&l\"#:Z");
+      Integer.min(296, 0);
+      vfModule0.setTemplateId(integer0);
+      vfModule0.setType(")b,;fs\"&l\"#:Z");
+      vfModule0.setModelInvariantUuid(")b,;fs\"&l\"#:Z");
+      vfModule0.getId();
+      vfModule0.setModelVersion("");
+      vfModule0.getTemplateId();
+      vfModule0.getModelVersion();
+      vfModule0.setIsBase(2983);
+      Integer integer1 = new Integer(0);
+      try { 
+        Integer.decode("X&-4c&g>;lQ`");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"X&-4c&g>;lQ`\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.toString();
+      vfModule0.isMoreRecentThan("ql");
+      vfModule0.toString();
+      vfModule0.isMoreRecentThan("v;ese");
+      vfModule0.getCreated();
+      Integer integer0 = new Integer(0);
+      Integer.getInteger("v;ese", 0);
+      vfModule0.setVolTemplateId(integer0);
+      vfModule0.isBase();
+      vfModule0.getIsBase();
+      vfModule0.setAsdcUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule0.getId();
+      vfModule0.getTemplateId();
+      vfModule0.getVolTemplateId();
+      vfModule0.getAsdcUuid();
+      vfModule0.setId(0);
+      Integer integer1 = new Integer(0);
+      try { 
+        Integer.parseUnsignedInt("ql", (-122));
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // radix -122 less than Character.MIN_RADIX
+         //
+         verifyException("java.lang.Integer", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = new Integer((-1847));
+      vfModule0.setTemplateId(integer0);
+      vfModule0.setVolTemplateId(integer0);
+      vfModule0.getVolTemplateId();
+      try { 
+        Integer.decode("");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // Zero length string
+         //
+         verifyException("java.lang.Integer", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = new Integer(1);
+      vfModule0.setVolTemplateId(integer0);
+      vfModule0.setType("");
+      vfModule0.setDescription("");
+      vfModule0.getVolTemplateId();
+      vfModule0.getTemplateId();
+      vfModule0.setModelInvariantUuid("");
+      vfModule0.getType();
+      vfModule0.setVersion("");
+      vfModule0.getEnvironmentId();
+      try { 
+        Integer.decode("");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // Zero length string
+         //
+         verifyException("java.lang.Integer", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = Integer.valueOf(797);
+      vfModule0.setVnfResourceId(integer0);
+      vfModule0.isMoreRecentThan("xApm&c~GA&l*X$");
+      vfModule0.getVnfResourceId();
+      vfModule0.getModelInvariantUuid();
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setModelVersion("");
+      Integer integer0 = new Integer(1170);
+      vfModule0.setVnfResourceId(integer0);
+      vfModule0.getCreated();
+      vfModule0.setVolTemplateId(integer0);
+      vfModule0.setType("");
+      vfModule0.setDescription("");
+      vfModule0.getVnfResourceId();
+      VfModule vfModule1 = new VfModule();
+      vfModule1.setId((-1424));
+      vfModule1.getVolTemplateId();
+      vfModule1.getModelVersion();
+      vfModule0.getId();
+      vfModule0.setAsdcUuid("");
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = new Integer((-1483));
+      Integer.toUnsignedString((-1742));
+      Integer.toUnsignedString(0);
+      Integer.getInteger("", (-1483));
+      vfModule0.setModelVersion(".");
+      Integer.divideUnsigned(0, 1371);
+      vfModule0.setVolTemplateId(integer0);
+      Integer.compare(1783, (-1404));
+      vfModule0.setEnvironmentId(integer0);
+      vfModule0.setVersion("");
+      vfModule0.getModelVersion();
+      vfModule0.getId();
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.getId();
+      vfModule0.setDescription("JZ)_Y_-H SVr5xC");
+      Integer integer0 = new Integer(1266);
+      Integer.remainderUnsigned(0, 1266);
+      vfModule0.setEnvironmentId(integer0);
+      vfModule0.getModelInvariantUuid();
+      vfModule0.setDescription((String) null);
+      vfModule0.getEnvironmentId();
+      vfModule0.getModelName();
+      vfModule0.getIsBase();
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setModelInvariantUuid(",version=");
+      vfModule0.toString();
+      vfModule0.toString();
+      vfModule0.toString();
+      vfModule0.isTheSameVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule0.setId(1438);
+      vfModule0.getVolTemplateId();
+      Instant instant0 = MockInstant.ofEpochMilli(1438);
+      Timestamp timestamp0 = Timestamp.from(instant0);
+      timestamp0.clone();
+      vfModule0.setCreated(timestamp0);
+      vfModule0.setDescription(",version=");
+      vfModule0.getTemplateId();
+      vfModule0.getId();
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setModelVersion("EzJ)~3C++");
+      Integer integer0 = new Integer((-1));
+      vfModule0.setVnfResourceId(integer0);
+      vfModule0.getModelInvariantUuid();
+      vfModule0.getModelInvariantUuid();
+      VfModule vfModule1 = new VfModule();
+      vfModule1.setIsBase((-1));
+      Integer integer1 = new Integer((-289));
+      vfModule1.setTemplateId(integer1);
+      vfModule1.getTemplateId();
+      vfModule1.setModelName("\7fYp{,,+-pFJp!Ym6r^");
+      vfModule1.getDescription();
+      vfModule0.setId((-1));
+      vfModule0.setId((-4103));
+      vfModule0.getId();
+      vfModule1.getVnfResourceId();
+      vfModule1.setTemplateId((Integer) null);
+      Timestamp timestamp0 = new Timestamp((-3970L));
+      vfModule0.setCreated(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.isTheSameVersion(", description=");
+      vfModule0.setType("");
+      Integer integer0 = new Integer(0);
+      Integer.max(0, 0);
+      Integer.min(0, 0);
+      vfModule0.setEnvironmentId(integer0);
+      vfModule0.setDescription("Kx6@ Rh^oX; 9s(c&>|");
+      vfModule0.setId((-2750));
+      vfModule0.setType((String) null);
+      vfModule0.getDescription();
+      vfModule0.setId(0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setType("}f");
+      vfModule0.setModelName("?2n6Dj");
+      vfModule0.toString();
+      vfModule0.getModelName();
+      vfModule0.setAsdcUuid("?2n6Dj");
+      vfModule0.getId();
+      vfModule0.isTheSameVersion("");
+      vfModule0.getAsdcUuid();
+      vfModule0.getVolTemplateId();
+      try { 
+        Integer.parseUnsignedInt("6pu", 0);
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // radix 0 less than Character.MIN_RADIX
+         //
+         verifyException("java.lang.Integer", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Timestamp timestamp0 = new Timestamp(0L);
+      timestamp0.clone();
+      timestamp0.setNanos(3848);
+      vfModule0.setCreated(timestamp0);
+      vfModule0.getVolTemplateId();
+      Timestamp timestamp1 = vfModule0.getCreated();
+      timestamp1.toInstant();
+      Integer integer0 = new Integer(719);
+      timestamp1.setNanos(3848);
+      try { 
+        Integer.parseUnsignedInt("1\t`FE9f:0z]~");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"1\t`FE9f:0z]~\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = new Integer(2069);
+      Integer.compare(0, 0);
+      Integer.min(2661, 2661);
+      Integer.max(2069, 2069);
+      vfModule0.setVnfResourceId(integer0);
+      vfModule0.setDescription(",id=");
+      vfModule0.isTheSameVersion(",id=");
+      vfModule0.isMoreRecentThan(",id=");
+      vfModule0.getEnvironmentId();
+      vfModule0.setType("h4:pQoD8*M");
+      vfModule0.getType();
+      vfModule0.getType();
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = new Integer(0);
+      vfModule0.setEnvironmentId(integer0);
+      vfModule0.setModelInvariantUuid("H'CQI+Q^^WoGt^Q2X]");
+      vfModule0.toString();
+      vfModule0.getModelInvariantUuid();
+      Integer integer1 = vfModule0.getEnvironmentId();
+      vfModule0.setVersion("");
+      Integer.getInteger("", integer0);
+      Integer.getInteger("", integer0);
+      vfModule0.setVnfResourceId(integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.toString();
+      vfModule0.setModelVersion("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule0.setDescription("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule0.setId(0);
+      vfModule0.getModelName();
+      vfModule0.getAsdcUuid();
+      Timestamp timestamp0 = new Timestamp((long) 0);
+      timestamp0.toLocalDateTime();
+      vfModule0.setCreated(timestamp0);
+      vfModule0.getVolTemplateId();
+      int int0 = vfModule0.getId();
+      vfModule0.getTemplateId();
+      vfModule0.setModelInvariantUuid((String) null);
+      vfModule0.setType("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      Timestamp timestamp1 = vfModule0.getCreated();
+      vfModule0.setDescription((String) null);
+      vfModule0.setCreated(timestamp1);
+      vfModule0.setVolTemplateId((Integer) null);
+      vfModule0.getTemplateId();
+      int int1 = vfModule0.getIsBase();
+      assertTrue(int1 == int0);
+      
+      vfModule0.setModelVersion((String) null);
+      boolean boolean0 = vfModule0.isBase();
+      assertFalse(boolean0);
+      
+      vfModule0.setVolEnvironmentId((Integer) null);
+      vfModule0.setModelInvariantUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule0.getDescription();
+      String string0 = vfModule0.toString();
+      assertEquals("VF=VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null,created=1/1/70 12:00 AM", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.setIsBase(1);
+      vfModule0.getVnfResourceId();
+      vfModule0.getEnvironmentId();
+      vfModule0.toString();
+      vfModule0.isBase();
+      Integer integer0 = new Integer(0);
+      vfModule0.getCreated();
+      vfModule0.setAsdcUuid("VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      vfModule0.getCreated();
+      PrivateAccess.setVariable((Class<VfModule>) VfModule.class, vfModule0, "asdcUuid", (Object) "VF=null,modelName=null,version=null,id=0,vnfResourceId=null,templateId=null,envtId=null,volTemplateId=null,volEnvtId=null, description=null,asdcUuid=null,modelVersion=null");
+      assertEquals(1, vfModule0.getIsBase());
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      vfModule0.toString();
+      vfModule0.getModelVersion();
+      String string0 = vfModule0.getType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      VfModule vfModule0 = new VfModule();
+      Integer integer0 = new Integer((-1));
+      vfModule0.setVnfResourceId(integer0);
+      vfModule0.getModelInvariantUuid();
+      vfModule0.setTemplateId(integer0);
+      vfModule0.setModelName((String) null);
+      Timestamp timestamp0 = vfModule0.getCreated();
+      assertNull(timestamp0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleESTestscaffolding.java
new file mode 100644 (file)
index 0000000..5688849
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:19:11 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VfModuleESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VfModule"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.db.catalog.beans.VfModule"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTest.java
new file mode 100644 (file)
index 0000000..fa35d93
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:18:06 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VfModuleToHeatFilesESTest extends VfModuleToHeatFilesESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      vfModuleToHeatFiles0.setVfModuleId(1842);
+      VfModuleToHeatFiles vfModuleToHeatFiles1 = new VfModuleToHeatFiles();
+      boolean boolean0 = vfModuleToHeatFiles0.equals(vfModuleToHeatFiles1);
+      assertEquals(1842, vfModuleToHeatFiles0.getVfModuleId());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      vfModuleToHeatFiles0.setVfModuleId((-999));
+      int int0 = vfModuleToHeatFiles0.getVfModuleId();
+      assertEquals((-999), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      vfModuleToHeatFiles0.setHeatFilesId(3619);
+      int int0 = vfModuleToHeatFiles0.getHeatFilesId();
+      assertEquals(3619, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      vfModuleToHeatFiles0.setHeatFilesId((-1390));
+      int int0 = vfModuleToHeatFiles0.getHeatFilesId();
+      assertEquals((-1390), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      VfModuleToHeatFiles vfModuleToHeatFiles1 = new VfModuleToHeatFiles();
+      boolean boolean0 = vfModuleToHeatFiles0.equals(vfModuleToHeatFiles1);
+      assertTrue(boolean0);
+      assertEquals(0, vfModuleToHeatFiles1.getVfModuleId());
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      VfModuleToHeatFiles vfModuleToHeatFiles1 = new VfModuleToHeatFiles();
+      vfModuleToHeatFiles0.setVfModuleId((-232));
+      boolean boolean0 = vfModuleToHeatFiles0.equals(vfModuleToHeatFiles1);
+      assertEquals(-232, vfModuleToHeatFiles0.getVfModuleId());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      Object object0 = new Object();
+      boolean boolean0 = vfModuleToHeatFiles0.equals(object0);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      boolean boolean0 = vfModuleToHeatFiles0.equals(vfModuleToHeatFiles0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      int int0 = vfModuleToHeatFiles0.getHeatFilesId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      int int0 = vfModuleToHeatFiles0.getVfModuleId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      vfModuleToHeatFiles0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      String string0 = vfModuleToHeatFiles0.toString();
+      assertEquals("VF_MODULE_ID=0, HEAT_FILES_ID=0", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      vfModuleToHeatFiles0.setHeatFilesId((-1));
+      vfModuleToHeatFiles0.hashCode();
+      assertEquals(-1, vfModuleToHeatFiles0.getHeatFilesId());
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      VfModuleToHeatFiles vfModuleToHeatFiles0 = new VfModuleToHeatFiles();
+      vfModuleToHeatFiles0.setVfModuleId(1);
+      int int0 = vfModuleToHeatFiles0.getVfModuleId();
+      assertEquals(1, int0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFilesESTestscaffolding.java
new file mode 100644 (file)
index 0000000..d22bff4
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:18:06 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VfModuleToHeatFilesESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleToHeatFilesESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VfModuleToHeatFilesESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.db.catalog.beans.VfModuleToHeatFiles"
+    );
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTest.java
new file mode 100644 (file)
index 0000000..7a31349
--- /dev/null
@@ -0,0 +1,247 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:14:48 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import java.sql.Timestamp;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VnfComponentESTest extends VnfComponentESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      vnfComponent0.setVnfId(2405);
+      VnfComponent vnfComponent1 = new VnfComponent();
+      boolean boolean0 = vnfComponent0.equals(vnfComponent1);
+      assertEquals(2405, vnfComponent0.getVnfId());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      boolean boolean0 = vnfComponent0.equals(vnfComponent0);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      vnfComponent0.setVnfId(1343);
+      int int0 = vnfComponent0.getVnfId();
+      assertEquals(1343, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      vnfComponent0.setVnfId((-1));
+      int int0 = vnfComponent0.getVnfId();
+      assertEquals((-1), int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = new Integer(0);
+      vnfComponent0.setHeatTemplateId(integer0);
+      Integer integer1 = vnfComponent0.getHeatTemplateId();
+      assertEquals(0, (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = new Integer((-1));
+      vnfComponent0.setHeatTemplateId(integer0);
+      Integer integer1 = vnfComponent0.getHeatTemplateId();
+      assertEquals((-1), (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = new Integer(0);
+      vnfComponent0.setHeatEnvironmentId(integer0);
+      Integer integer1 = vnfComponent0.getHeatEnvironmentId();
+      assertEquals(0, (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = new Integer(1);
+      vnfComponent0.setHeatEnvironmentId(integer0);
+      Integer integer1 = vnfComponent0.getHeatEnvironmentId();
+      assertEquals(1, (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = new Integer((-1));
+      vnfComponent0.setHeatEnvironmentId(integer0);
+      Integer integer1 = vnfComponent0.getHeatEnvironmentId();
+      assertEquals((-1), (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Timestamp timestamp0 = new Timestamp(0L);
+      vnfComponent0.setCreated(timestamp0);
+      Timestamp timestamp1 = vnfComponent0.getCreated();
+      assertEquals(0, timestamp1.getNanos());
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Timestamp timestamp0 = new Timestamp((-1098L));
+      vnfComponent0.setCreated(timestamp0);
+      Timestamp timestamp1 = vnfComponent0.getCreated();
+      assertSame(timestamp1, timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      vnfComponent0.setComponentType("BiXPVXS}ta?x9wcq");
+      String string0 = vnfComponent0.getComponentType();
+      assertEquals("BiXPVXS}ta?x9wcq", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      vnfComponent0.setComponentType("");
+      String string0 = vnfComponent0.getComponentType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      int int0 = vnfComponent0.getVnfId();
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      VnfComponent vnfComponent1 = new VnfComponent();
+      vnfComponent0.setComponentType("");
+      vnfComponent1.setComponentType("");
+      boolean boolean0 = vnfComponent0.equals(vnfComponent1);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      VnfComponent vnfComponent1 = new VnfComponent();
+      vnfComponent1.setComponentType("X\"p(eM");
+      boolean boolean0 = vnfComponent0.equals(vnfComponent1);
+      assertEquals(0, vnfComponent1.getVnfId());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = new Integer((-1));
+      boolean boolean0 = vnfComponent0.equals(integer0);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Timestamp timestamp0 = new Timestamp((-38L));
+      vnfComponent0.setCreated(timestamp0);
+      String string0 = vnfComponent0.toString();
+      assertEquals("VnfComponent: vnfId=0,componentType=null,heatTemplateId=null,heatEnvironmentId=null,created=12/31/69 11:59 PM", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      String string0 = vnfComponent0.toString();
+      assertEquals("VnfComponent: vnfId=0,componentType=null,heatTemplateId=null,heatEnvironmentId=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      vnfComponent0.setVnfId((-1));
+      VnfComponent vnfComponent1 = new VnfComponent();
+      boolean boolean0 = vnfComponent0.equals(vnfComponent1);
+      assertEquals(-1, vnfComponent0.getVnfId());
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      vnfComponent0.hashCode();
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Timestamp timestamp0 = vnfComponent0.getCreated();
+      assertNull(timestamp0);
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = vnfComponent0.getHeatEnvironmentId();
+      assertNull(integer0);
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      String string0 = vnfComponent0.getComponentType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = vnfComponent0.getHeatTemplateId();
+      assertNull(integer0);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      Integer integer0 = new Integer(1910);
+      vnfComponent0.setHeatTemplateId(integer0);
+      Integer integer1 = vnfComponent0.getHeatTemplateId();
+      assertEquals(1910, (int)integer1);
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      VnfComponent vnfComponent0 = new VnfComponent();
+      VnfComponent vnfComponent1 = new VnfComponent();
+      // Undeclared exception!
+      try { 
+        vnfComponent0.equals(vnfComponent1);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+      }
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentESTestscaffolding.java
new file mode 100644 (file)
index 0000000..de17733
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:14:48 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VnfComponentESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VnfComponent"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfComponentESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.VnfComponent"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VnfComponentESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.db.catalog.beans.VnfComponent"
+    );
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTest.java
new file mode 100644 (file)
index 0000000..651e7f7
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:22:43 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VnfComponentsRecipeESTest extends VnfComponentsRecipeESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setOrchestrationUri("{bpW{ ow");
+      String string0 = vnfComponentsRecipe0.toString();
+      assertEquals("RECIPE: null,uri={bpW{ ow,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.action = "(G:J?!6e";
+      String string0 = vnfComponentsRecipe0.toString();
+      assertEquals("RECIPE: (G:J?!6e,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setVnfType("RECIPE: null,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null");
+      String string0 = vnfComponentsRecipe0.getVnfType();
+      assertEquals("RECIPE: null,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setVnfType("");
+      String string0 = vnfComponentsRecipe0.getVnfType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setVnfComponentType("RECIPE: null,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null");
+      String string0 = vnfComponentsRecipe0.getVnfComponentType();
+      assertEquals("RECIPE: null,uri=null,vnfComponentParamXSD=null,serviceType=null,vnfComponentType=null,vfModuleId=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setVnfComponentParamXSD("d'fp(");
+      String string0 = vnfComponentsRecipe0.getVnfComponentParamXSD();
+      assertEquals("d'fp(", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setVnfComponentParamXSD("");
+      String string0 = vnfComponentsRecipe0.getVnfComponentParamXSD();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setVfModuleId("Wg>|PNS?");
+      String string0 = vnfComponentsRecipe0.getVfModuleId();
+      assertEquals("Wg>|PNS?", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      String string0 = vnfComponentsRecipe0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      String string0 = vnfComponentsRecipe0.getVnfType();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setVnfComponentType("");
+      String string0 = vnfComponentsRecipe0.getVnfComponentType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      String string0 = vnfComponentsRecipe0.getVnfComponentParamXSD();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      vnfComponentsRecipe0.setVfModuleId("");
+      String string0 = vnfComponentsRecipe0.getVfModuleId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      VnfComponentsRecipe vnfComponentsRecipe0 = new VnfComponentsRecipe();
+      String string0 = vnfComponentsRecipe0.getVnfComponentType();
+      assertNull(string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipeESTestscaffolding.java
new file mode 100644 (file)
index 0000000..da535d4
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:22:43 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VnfComponentsRecipeESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfComponentsRecipeESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.Recipe",
+      "org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTest.java
new file mode 100644 (file)
index 0000000..d866479
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:23:26 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VnfRecipeESTest extends VnfRecipeESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      vnfRecipe0.setVnfParamXSD("@!JsE$ &");
+      String string0 = vnfRecipe0.toString();
+      assertEquals("RECIPE: null,uri=null,vnfParamXSD=@!JsE$ &,serviceType=null,vfModuleId=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      vnfRecipe0.setVnfType("<[sFL");
+      String string0 = vnfRecipe0.getVnfType();
+      assertEquals("<[sFL", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      vnfRecipe0.setVnfType("");
+      String string0 = vnfRecipe0.getVnfType();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      vnfRecipe0.setVnfParamXSD("");
+      String string0 = vnfRecipe0.getVnfParamXSD();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test4()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      vnfRecipe0.setVfModuleId("QL");
+      String string0 = vnfRecipe0.getVfModuleId();
+      assertEquals("QL", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test5()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      vnfRecipe0.setVfModuleId("");
+      String string0 = vnfRecipe0.getVfModuleId();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test6()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      String string0 = vnfRecipe0.getVnfParamXSD();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test7()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      vnfRecipe0.setVnfParamXSD("RECIPE: null,uri=null,vnfParamXSD=null,serviceType=null,vfModuleId=null");
+      String string0 = vnfRecipe0.getVnfParamXSD();
+      assertEquals("RECIPE: null,uri=null,vnfParamXSD=null,serviceType=null,vfModuleId=null", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test8()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      String string0 = vnfRecipe0.getVfModuleId();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test9()  throws Throwable  {
+      VnfRecipe vnfRecipe0 = new VnfRecipe();
+      String string0 = vnfRecipe0.getVnfType();
+      assertNull(string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfRecipeESTestscaffolding.java
new file mode 100644 (file)
index 0000000..4532226
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:23:26 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VnfRecipeESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VnfRecipe"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfRecipeESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.beans.Recipe",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.db.catalog.beans.VnfRecipe"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTest.java
new file mode 100644 (file)
index 0000000..74562f8
--- /dev/null
@@ -0,0 +1,636 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:21:05 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.shaded.org.mockito.Mockito.*;
+import static org.evosuite.runtime.MockitoExtension.*;
+
+import java.sql.Timestamp;
+import java.util.Map;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.evosuite.runtime.ViolatedAssumptionAnswer;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class VnfResourceESTest extends VnfResourceESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.getAicVersionMax();
+      Integer integer0 = new Integer(347);
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.toString();
+      vnfResource0.setModelInvariantUuid(", vnfResourceId=");
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.isTheSameVersion((String) null);
+      vnfResource0.getId();
+      Integer integer1 = new Integer(0);
+      vnfResource0.setTemplateId(integer1);
+      vnfResource0.setOrchestrationMode((String) null);
+      vnfResource0.getModelName();
+      vnfResource0.getId();
+      vnfResource0.getEnvironmentId();
+      vnfResource0.setModelName("");
+      vnfResource0.getOrchestrationMode();
+      vnfResource0.toString();
+      vnfResource0.getModelName();
+      vnfResource0.setModelCustomizationName(", vnfResourceId=");
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setAicVersionMax("W8eoH");
+      vnfResource0.setVnfType("");
+      vnfResource0.setAicVersionMin("");
+      vnfResource0.getServiceModelInvariantUUID();
+      vnfResource0.setAsdcUuid("");
+      VnfResource vnfResource1 = new VnfResource();
+      vnfResource0.getTemplateId();
+      vnfResource0.getVnfType();
+      vnfResource0.setModelName("");
+      vnfResource1.setModelCustomizationName((String) null);
+      vnfResource0.getHeatFiles();
+      vnfResource1.getModelName();
+      vnfResource1.setDescription("");
+      vnfResource1.setModelCustomizationName((String) null);
+      vnfResource0.getEnvironmentId();
+      vnfResource0.getAsdcUuid();
+      vnfResource1.setVnfType("<[%6q]17$<ANY");
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setAsdcUuid(",aicVersionMin=");
+      vnfResource0.setOrchestrationMode(",aicVersionMin=");
+      Integer integer0 = new Integer((-2387));
+      vnfResource0.setEnvironmentId(integer0);
+      vnfResource0.setModelCustomizationName("");
+      vnfResource0.getHeatFiles();
+      vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
+      vnfResource0.setServiceModelInvariantUUID("");
+      vnfResource0.getServiceModelInvariantUUID();
+      vnfResource0.setDescription("");
+      vnfResource0.getCreated();
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setAicVersionMax("");
+      vnfResource0.isTheSameVersion("ID=");
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.getVnfType();
+      vnfResource0.setModelInvariantUuid((String) null);
+      vnfResource0.getHeatFiles();
+      vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
+      vnfResource0.toString();
+      vnfResource0.setServiceModelInvariantUUID("");
+      vnfResource0.setModelVersion("");
+      vnfResource0.getCreated();
+      vnfResource0.getCreated();
+      vnfResource0.setVnfType("");
+      Integer integer0 = new Integer(0);
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.getHeatFiles();
+      vnfResource0.getAicVersionMax();
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setServiceModelInvariantUUID("");
+      vnfResource0.setId(1731);
+      vnfResource0.setAsdcUuid((String) null);
+      vnfResource0.setVersion((String) null);
+      vnfResource0.setAsdcUuid((String) null);
+      vnfResource0.getEnvironmentId();
+      vnfResource0.setServiceModelInvariantUUID((String) null);
+      vnfResource0.setId(1731);
+      vnfResource0.getDescription();
+      vnfResource0.setEnvironmentId((Integer) null);
+      vnfResource0.getAicVersionMin();
+      vnfResource0.getId();
+      vnfResource0.setModelCustomizationName("`y0\"\7fkaFz37W|^|'Y");
+      vnfResource0.getId();
+      vnfResource0.setVersion(",created=");
+      vnfResource0.setModelInvariantUuid((String) null);
+      vnfResource0.getCreated();
+      vnfResource0.getAicVersionMax();
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.isMoreRecentThan("2+Mv%?pGcj");
+      vnfResource0.setAsdcUuid("2+Mv%?pGcj");
+      vnfResource0.getModelInvariantUuid();
+      vnfResource0.getModelVersion();
+      vnfResource0.setVnfType("");
+      vnfResource0.getVnfType();
+      vnfResource0.setId(0);
+      vnfResource0.getCreated();
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.setDescription("");
+      vnfResource0.getModelVersion();
+      vnfResource0.getAicVersionMin();
+      vnfResource0.getOrchestrationMode();
+      vnfResource0.getDescription();
+      vnfResource0.setAsdcUuid("");
+      vnfResource0.setAicVersionMax(",template=");
+      Integer integer0 = new Integer(4008);
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.setAicVersionMax(",aicVersionMax=");
+      vnfResource0.setVnfType("");
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.getHeatFiles();
+      vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
+      vnfResource0.isMoreRecentThan("");
+      vnfResource0.toString();
+      Integer integer0 = new Integer((-3414));
+      vnfResource0.setEnvironmentId(integer0);
+      vnfResource0.getEnvironmentId();
+      vnfResource0.getCreated();
+      vnfResource0.setModelInvariantUuid("");
+      vnfResource0.setModelInvariantUuid("");
+      vnfResource0.setAicVersionMin(",template=");
+      vnfResource0.getEnvironmentId();
+      vnfResource0.getServiceModelInvariantUUID();
+      vnfResource0.getCreated();
+      Integer integer1 = new Integer(898);
+      vnfResource0.setTemplateId(integer1);
+      vnfResource0.setModelVersion("VNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null");
+      vnfResource0.getHeatFiles();
+      vnfResource0.getServiceModelInvariantUUID();
+      vnfResource0.getId();
+      VnfResource vnfResource1 = new VnfResource();
+      vnfResource0.setId(0);
+      vnfResource0.setId(1);
+      vnfResource1.setServiceModelInvariantUUID(",template=");
+      vnfResource1.setVnfType("");
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.toString();
+      Integer integer0 = new Integer(2830);
+      vnfResource0.setEnvironmentId(integer0);
+      vnfResource0.getAicVersionMin();
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.getHeatFiles();
+      vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
+      vnfResource0.setId((-802));
+      vnfResource0.getHeatFiles();
+      vnfResource0.getAicVersionMin();
+      vnfResource0.setOrchestrationMode((String) null);
+      vnfResource0.setAicVersionMax((String) null);
+      vnfResource0.setModelCustomizationName("mU");
+      vnfResource0.getEnvironmentId();
+      vnfResource0.setModelInvariantUuid((String) null);
+      vnfResource0.getModelName();
+      vnfResource0.getCreated();
+      vnfResource0.getHeatFiles();
+      vnfResource0.setModelCustomizationName(",template=");
+      Integer integer1 = new Integer((-802));
+      vnfResource0.setEnvironmentId(integer1);
+      vnfResource0.getAicVersionMax();
+      vnfResource0.setCreated((Timestamp) null);
+      vnfResource0.getModelCustomizationName();
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      Integer integer0 = new Integer((-850));
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.setAsdcUuid(",modelInvariantUuid=");
+      vnfResource0.getAsdcUuid();
+      vnfResource0.setVersion("M:u'/:}/c=[kT$1|~");
+      vnfResource0.setVnfType("Sz!+cMn");
+      vnfResource0.getTemplateId();
+      vnfResource0.setId((-850));
+      vnfResource0.getModelVersion();
+      vnfResource0.setVersion("M:u'/:}/c=[kT$1|~");
+      vnfResource0.setServiceModelInvariantUUID("M:u'/:}/c=[kT$1|~");
+      vnfResource0.setVnfType((String) null);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      Integer integer0 = new Integer(0);
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.setModelVersion("");
+      vnfResource0.getAsdcUuid();
+      vnfResource0.setModelCustomizationName("e]B=gmKEhOL");
+      vnfResource0.getModelVersion();
+      vnfResource0.getHeatFiles();
+      vnfResource0.setModelName("");
+      vnfResource0.setDescription("v\u0000tj])h=a");
+      vnfResource0.setAicVersionMax("v\u0000tj])h=a");
+      vnfResource0.getAicVersionMin();
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setModelInvariantUuid("");
+      VnfResource vnfResource1 = new VnfResource();
+      vnfResource1.getCreated();
+      vnfResource0.setCreated((Timestamp) null);
+      Integer integer0 = new Integer((-821));
+      vnfResource0.setEnvironmentId(integer0);
+      vnfResource0.setServiceModelInvariantUUID("");
+      vnfResource0.setVnfType("[=");
+      vnfResource0.getModelInvariantUuid();
+      vnfResource0.getModelVersion();
+      vnfResource0.setOrchestrationMode("");
+      vnfResource1.setAicVersionMax("");
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.getAicVersionMax();
+      Integer integer0 = new Integer(0);
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.isMoreRecentThan((String) null);
+      vnfResource0.setVnfType((String) null);
+      vnfResource0.setServiceModelInvariantUUID(".");
+      Integer integer1 = new Integer(1);
+      vnfResource0.setTemplateId(integer1);
+      vnfResource0.toString();
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.setId(0);
+      vnfResource0.setModelVersion(",modelVersion=");
+      vnfResource0.getCreated();
+      vnfResource0.setCreated((Timestamp) null);
+      vnfResource0.getTemplateId();
+      vnfResource0.getServiceModelInvariantUUID();
+      vnfResource0.getModelInvariantUuid();
+      vnfResource0.getEnvironmentId();
+      vnfResource0.setAicVersionMax(",modelName=");
+      Integer integer2 = new Integer((-777));
+      vnfResource0.setTemplateId(integer2);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.getHeatFiles();
+      vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
+      vnfResource0.setModelName("Wwy:ofB");
+      Integer integer0 = new Integer(0);
+      vnfResource0.setTemplateId(integer0);
+      Integer integer1 = new Integer(0);
+      vnfResource0.setEnvironmentId(integer1);
+      vnfResource0.setModelVersion("H[4j < uiNVQa.0w-P");
+      vnfResource0.toString();
+      vnfResource0.getModelInvariantUuid();
+      vnfResource0.setVnfType("Wwy:ofB");
+      vnfResource0.setAicVersionMin("]$0J9oRP[=9");
+      vnfResource0.getModelName();
+      vnfResource0.getVnfType();
+      vnfResource0.getTemplateId();
+      vnfResource0.getAicVersionMax();
+      vnfResource0.setAsdcUuid("VNF=null,version=null,mode=null,template=0,envtId=0,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=H[4j < uiNVQa.0w-P,modelCustomizationName=null,modelName=Wwy:ofB,serviceModelInvariantUUID=null");
+      vnfResource0.getHeatFiles();
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setModelCustomizationName("@%}qMRUUV?U7X~(re");
+      vnfResource0.getEnvironmentId();
+      vnfResource0.setOrchestrationMode("@%}qMRUUV?U7X~(re");
+      vnfResource0.setEnvironmentId((Integer) null);
+      vnfResource0.setModelName("@%}qMRUUV?U7X~(re");
+      vnfResource0.getEnvironmentId();
+      vnfResource0.toString();
+      vnfResource0.setAsdcUuid("VNF=null,version=null,mode=@%}qMRUUV?U7X~(re,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=@%}qMRUUV?U7X~(re,modelName=@%}qMRUUV?U7X~(re,serviceModelInvariantUUID=null");
+      vnfResource0.getAsdcUuid();
+      vnfResource0.setAsdcUuid("l<;mp");
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.toString();
+      vnfResource0.setModelName("KPE,e");
+      vnfResource0.setAsdcUuid("KPE,e");
+      vnfResource0.setAicVersionMax("KPE,e");
+      vnfResource0.setAicVersionMin("");
+      vnfResource0.setModelCustomizationName((String) null);
+      vnfResource0.setDescription("UI!~W@$,");
+      vnfResource0.setModelCustomizationName("UI!~W@$,");
+      vnfResource0.setModelVersion(", description=null");
+      Integer integer0 = new Integer((-1783));
+      vnfResource0.setEnvironmentId(integer0);
+      vnfResource0.getAicVersionMin();
+      vnfResource0.getModelInvariantUuid();
+      vnfResource0.setAsdcUuid("nsmO^IEr4");
+      vnfResource0.getModelVersion();
+      vnfResource0.setDescription("KPE,e");
+      vnfResource0.setModelInvariantUuid((String) null);
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.getAsdcUuid();
+      vnfResource0.getHeatFiles();
+      vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
+      vnfResource0.setModelVersion("");
+      Integer integer0 = new Integer(0);
+      vnfResource0.setEnvironmentId(integer0);
+      vnfResource0.setModelName("&\7f");
+      vnfResource0.getCreated();
+      vnfResource0.getAsdcUuid();
+      vnfResource0.setOrchestrationMode("");
+      vnfResource0.setServiceModelInvariantUUID("");
+      vnfResource0.setServiceModelInvariantUUID("&\7f");
+      vnfResource0.setModelInvariantUuid("");
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.getOrchestrationMode();
+      vnfResource0.setOrchestrationMode((String) null);
+      vnfResource0.getModelCustomizationName();
+      VnfResource vnfResource1 = new VnfResource();
+      vnfResource1.setAicVersionMax("");
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setModelVersion("nT~K_A6F(}G");
+      vnfResource0.getModelVersion();
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      Integer integer0 = new Integer(4093);
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.setModelVersion("o)|85b9k");
+      vnfResource0.isTheSameVersion("o)|85b9k");
+      vnfResource0.getCreated();
+      vnfResource0.setCreated((Timestamp) null);
+      vnfResource0.getTemplateId();
+      vnfResource0.toString();
+      vnfResource0.getServiceModelInvariantUUID();
+      vnfResource0.toString();
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setAicVersionMax("e");
+      vnfResource0.getAicVersionMax();
+  }
+
+  @Test(timeout = 4000)
+  public void test19()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setAicVersionMax("s%I`;jJq\"jMHIJ");
+      vnfResource0.getCreated();
+      vnfResource0.setCreated((Timestamp) null);
+      vnfResource0.setAicVersionMin("s%I`;jJq\"jMHIJ");
+      vnfResource0.setVnfType("s%I`;jJq\"jMHIJ");
+      vnfResource0.getVnfType();
+      vnfResource0.setModelName("s%I`;jJq\"jMHIJ");
+      vnfResource0.setModelVersion("s%I`;jJq\"jMHIJ");
+      vnfResource0.getModelInvariantUuid();
+      vnfResource0.setVnfType("s%I`;jJq\"jMHIJ");
+  }
+
+  @Test(timeout = 4000)
+  public void test20()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setModelName("hF&vbMtZNXOQ");
+      vnfResource0.setDescription(",serviceModelInvariantUUID=");
+      vnfResource0.setModelCustomizationName("?v>=ahb.RUT$");
+      vnfResource0.getCreated();
+      vnfResource0.setCreated((Timestamp) null);
+      vnfResource0.setModelVersion("Vz:NMii");
+      vnfResource0.setOrchestrationMode("Vz:NMii");
+      vnfResource0.getEnvironmentId();
+      VnfResource vnfResource1 = new VnfResource();
+      vnfResource0.getModelName();
+      vnfResource1.setId(0);
+  }
+
+  @Test(timeout = 4000)
+  public void test21()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setDescription((String) null);
+      vnfResource0.setId((-1887));
+      vnfResource0.getId();
+      vnfResource0.toString();
+      vnfResource0.toString();
+  }
+
+  @Test(timeout = 4000)
+  public void test22()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setModelCustomizationName("lGX-!8UJxdrx]B'3");
+      vnfResource0.setId(0);
+      vnfResource0.setServiceModelInvariantUUID("");
+      vnfResource0.setOrchestrationMode("lGX-!8UJxdrx]B'3");
+      vnfResource0.setModelName("");
+      vnfResource0.setServiceModelInvariantUUID("");
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.setServiceModelInvariantUUID("");
+      vnfResource0.setModelName("!{XY#&,~p1Ku");
+      vnfResource0.getEnvironmentId();
+      vnfResource0.getAicVersionMax();
+      vnfResource0.getAicVersionMin();
+      vnfResource0.setModelVersion(",fileName=");
+      vnfResource0.toString();
+      vnfResource0.toString();
+      vnfResource0.setId(0);
+      vnfResource0.getAsdcUuid();
+      vnfResource0.getAsdcUuid();
+      vnfResource0.setDescription("");
+  }
+
+  @Test(timeout = 4000)
+  public void test23()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      Integer integer0 = new Integer((-1033));
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.setAicVersionMin("?ph");
+      vnfResource0.setVnfType("_LG54");
+      vnfResource0.getAicVersionMin();
+      vnfResource0.getEnvironmentId();
+      vnfResource0.setDescription(",fileBody=");
+      vnfResource0.toString();
+      vnfResource0.getId();
+      vnfResource0.setModelVersion(">dV");
+  }
+
+  @Test(timeout = 4000)
+  public void test24()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.getEnvironmentId();
+      vnfResource0.setModelInvariantUuid((String) null);
+      Integer integer0 = new Integer((-513));
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.setModelVersion("");
+      Integer integer1 = new Integer(1650);
+      vnfResource0.setTemplateId(integer1);
+      vnfResource0.getHeatFiles();
+      vnfResource0.getTemplateId();
+      vnfResource0.getDescription();
+      vnfResource0.getServiceModelInvariantUUID();
+      Integer integer2 = new Integer(0);
+      vnfResource0.setTemplateId(integer2);
+  }
+
+  @Test(timeout = 4000)
+  public void test25()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setVnfType("");
+      vnfResource0.setModelName("");
+      vnfResource0.setDescription(",envtId=");
+      vnfResource0.getDescription();
+      vnfResource0.setVnfType(",envtId=");
+      vnfResource0.setAicVersionMax("");
+      vnfResource0.getOrchestrationMode();
+  }
+
+  @Test(timeout = 4000)
+  public void test26()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setAicVersionMin("");
+      vnfResource0.getModelInvariantUuid();
+  }
+
+  @Test(timeout = 4000)
+  public void test27()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setVnfType("Va`9");
+      vnfResource0.setModelVersion("gBfjaCmk_2B");
+      vnfResource0.toString();
+      vnfResource0.setVnfType("VNF=Va`9,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=gBfjaCmk_2B,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null");
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.setOrchestrationMode("Va`9");
+      vnfResource0.getDescription();
+      vnfResource0.getOrchestrationMode();
+      vnfResource0.getServiceModelInvariantUUID();
+      vnfResource0.getAsdcUuid();
+  }
+
+  @Test(timeout = 4000)
+  public void test28()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.getVnfType();
+  }
+
+  @Test(timeout = 4000)
+  public void test29()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setVnfType("z?*}&4;|s");
+      vnfResource0.setAicVersionMin("z?*}&4;|s");
+      vnfResource0.toString();
+      Map<String, HeatFiles> map0 = (Map<String, HeatFiles>) mock(Map.class, new ViolatedAssumptionAnswer());
+      Timestamp timestamp0 = mock(Timestamp.class, new ViolatedAssumptionAnswer());
+      doReturn(0L, 0L, 0L, 0L, 0L).when(timestamp0).getTime();
+      doReturn((String) null, (String) null, (String) null, (String) null, (String) null).when(timestamp0).toString();
+      vnfResource0.setCreated(timestamp0);
+      vnfResource0.setHeatFiles(map0);
+      vnfResource0.setServiceModelInvariantUUID("VNF=z?*}&4;|s,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=z?*}&4;|s,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=null,modelName=null,serviceModelInvariantUUID=null");
+      vnfResource0.toString();
+      Timestamp timestamp1 = vnfResource0.getCreated();
+      vnfResource0.toString();
+      vnfResource0.toString();
+      vnfResource0.toString();
+      vnfResource0.setAicVersionMax("z?*}&4;|s");
+      vnfResource0.setId(531);
+      vnfResource0.getCreated();
+      vnfResource0.toString();
+      vnfResource0.getCreated();
+      vnfResource0.getCreated();
+      Timestamp timestamp2 = vnfResource0.getCreated();
+      assertSame(timestamp2, timestamp1);
+  }
+
+  @Test(timeout = 4000)
+  public void test30()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setVnfType("Va`9");
+      vnfResource0.setModelVersion("gBfjaCmk_2B");
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.getDescription();
+      vnfResource0.getOrchestrationMode();
+      vnfResource0.getServiceModelInvariantUUID();
+      String string0 = vnfResource0.getAsdcUuid();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test31()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setOrchestrationMode("nT~K_A6F(}G");
+      String string0 = vnfResource0.getModelVersion();
+      assertNull(string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test32()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.setModelCustomizationName("");
+      vnfResource0.toString();
+      vnfResource0.setModelInvariantUuid("VNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=,modelName=null,serviceModelInvariantUUID=null");
+      Integer integer0 = new Integer(0);
+      vnfResource0.setEnvironmentId(integer0);
+      vnfResource0.getAicVersionMin();
+      vnfResource0.getOrchestrationMode();
+      vnfResource0.setModelName((String) null);
+      vnfResource0.setVnfType("");
+      vnfResource0.getHeatFiles();
+      vnfResource0.setHeatFiles((Map<String, HeatFiles>) null);
+      vnfResource0.getVnfType();
+      vnfResource0.getEnvironmentId();
+      vnfResource0.setVnfType("VNF=null,version=null,mode=null,template=null,envtId=null,asdcUuid=null,aicVersionMin=null,aicVersionMax=null,modelInvariantUuid=null,modelVersion=null,modelCustomizationName=,modelName=null,serviceModelInvariantUUID=null");
+      vnfResource0.getModelCustomizationName();
+      vnfResource0.getCreated();
+      vnfResource0.getAicVersionMax();
+      vnfResource0.getModelInvariantUuid();
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.setAsdcUuid("");
+      assertNull(vnfResource0.getServiceModelInvariantUUID());
+  }
+
+  @Test(timeout = 4000)
+  public void test33()  throws Throwable  {
+      VnfResource vnfResource0 = new VnfResource();
+      vnfResource0.getDescription();
+      vnfResource0.setVnfType("8@%dK*Sm}Sc[/\"*^vL");
+      vnfResource0.setAicVersionMax("8@%dK*Sm}Sc[/\"*^vL");
+      vnfResource0.setModelCustomizationName((String) null);
+      vnfResource0.setDescription(";bAY~(4TDJ[r4<!nHi");
+      int int0 = vnfResource0.getId();
+      assertEquals(0, int0);
+      
+      vnfResource0.getTemplateId();
+      Integer integer0 = new Integer((-886));
+      vnfResource0.setTemplateId(integer0);
+      vnfResource0.getAicVersionMin();
+      vnfResource0.setAicVersionMax(",aicVers?onMhx=");
+      Integer integer1 = new Integer(0);
+      vnfResource0.getModelName();
+      assertEquals(0, vnfResource0.getId());
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/beans/VnfResourceESTestscaffolding.java
new file mode 100644 (file)
index 0000000..853b9ed
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:21:05 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class VnfResourceESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.beans.VnfResource"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfResourceESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.db.catalog.beans.HeatFiles",
+      "org.openecomp.mso.db.catalog.beans.VnfResource"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogTestDatabase.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/CatalogTestDatabase.java
new file mode 100644 (file)
index 0000000..d7b53a4
--- /dev/null
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.test;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+
+/**
+ * This class is purely for development testing.  It hard-codes a very limited
+ * catalog of HeatTemplates and Services for the case where no actual database
+ * is available.
+ * 
+ *
+ */
+public class CatalogTestDatabase extends CatalogDatabase {
+       
+       private static int id = 1;
+       private static Map<String,HeatTemplate> heatTemplates;
+       
+       static {
+               heatTemplates = new HashMap<String,HeatTemplate>();
+               
+               addTemplate("ApacheDemo", "C:/temp/apache-demo.json", 2,
+                                       new ArrayList<String>(Arrays.asList("private_subnet_gateway", "private_subnet_cidr")),
+                                       new ArrayList<String> (Arrays.asList("vnf_id", "public_net_id")));
+       }
+
+       public CatalogTestDatabase () {
+       }
+       
+       private static void addTemplate (String name, String path, int timeout, List<String> reqd, List<String> opt)
+       {
+               HeatTemplate template = new HeatTemplate();
+               template.setId(id++);
+               template.setTemplateName("ApacheDemo");
+               template.setTemplatePath("C:/temp/apache-demo.json");
+               template.setTimeoutMinutes(2);
+               
+               Set<HeatTemplateParam> params = new HashSet<HeatTemplateParam>();
+               
+               for (String s : reqd) {
+                       HeatTemplateParam param = new HeatTemplateParam();
+                       param.setId(id++);
+                       param.setParamName(s);
+                       param.setRequired(true);
+                       params.add(param);
+               }
+               
+               for (String s : opt) {
+                       HeatTemplateParam param = new HeatTemplateParam();
+                       param.setId(id++);
+                       param.setParamName(s);
+                       param.setRequired(false);
+                       params.add(param);
+               }
+               template.setParameters(params);
+               
+               heatTemplates.put(name,  template);
+       }
+       
+    @Override
+    public HeatTemplate getHeatTemplate (String templateName)
+    {
+       if (heatTemplates.containsKey(templateName)) {
+               return heatTemplates.get(templateName);
+       } else {
+               return null;
+       }
+    }
+    
+    @Override
+    public HeatTemplate getHeatTemplate (String templateName, String version)
+    {
+       return getHeatTemplate(templateName);
+    }
+
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java
new file mode 100644 (file)
index 0000000..bf8f3ea
--- /dev/null
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.test;
+
+
+import static org.junit.Assert.*;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.HashSet;
+
+import org.junit.Test;
+
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.HeatTemplateParam;
+
+/**
+ */
+
+public class HeatTemplateTest {
+       
+    @Test
+    public final void heatTemplateTest () {
+        HeatTemplate heatTemplate = new HeatTemplate ();
+        heatTemplate.setTemplateBody ("testBody");
+        assertTrue (heatTemplate.getHeatTemplate ().equals ("testBody"));
+        assertTrue (heatTemplate.toString ().contains ("8 chars"));
+        heatTemplate.setTemplateBody (null);
+        assertTrue (heatTemplate.toString ().contains ("Not defined"));
+        HashSet<HeatTemplateParam> set = new HashSet<> ();
+        HeatTemplateParam param = new HeatTemplateParam ();
+        param.setParamName ("param name");
+        param.setParamType ("string");
+        param.setRequired (false);
+        set.add (param);
+        HeatTemplateParam param2 = new HeatTemplateParam ();
+        param2.setParamName ("param 2");
+        param2.setParamType ("string");
+        param2.setRequired (true);
+        set.add (param2);
+        heatTemplate.setParameters (set);
+        String heatStr = heatTemplate.toString (); 
+        assertTrue (heatStr.contains ("param name"));
+        assertTrue (heatStr.toString ().contains ("param 2(reqd)"));
+
+        File tempFile;
+        try {
+            tempFile = File.createTempFile ("heatTemplate", "test");
+            tempFile.deleteOnExit ();
+            try (Writer writer = new BufferedWriter (new OutputStreamWriter (new FileOutputStream (tempFile),
+                                                                             "utf-8"))) {
+                writer.write ("something\n");
+                writer.write ("something2\n");
+            }
+            heatTemplate.setTemplatePath (tempFile.getAbsolutePath ());
+            assertTrue (heatTemplate.getHeatTemplate ().contains ("something2"));
+        } catch (IOException e) {
+            e.printStackTrace ();
+            fail ("Exception caught");
+        }
+    }
+
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/MavenVersioningTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/MavenVersioningTest.java
new file mode 100644 (file)
index 0000000..2f24a4c
--- /dev/null
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.test;
+
+
+import static org.junit.Assert.*;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.junit.Test;
+
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator;
+import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
+
+
+public class MavenVersioningTest {
+
+       @Test
+       public final void testVersion () {
+               MavenLikeVersioning mavenVersioning = new MavenLikeVersioning ();
+               assertFalse(mavenVersioning.isMoreRecentThan("0.0.0"));
+               assertFalse(mavenVersioning.isMoreRecentThan(null));
+               mavenVersioning.setVersion("0.0.1");
+               
+               assertFalse(mavenVersioning.isMoreRecentThan(null));
+               assertTrue(mavenVersioning.isMoreRecentThan("0.0.0"));
+               assertTrue(mavenVersioning.isMoreRecentThan("0.0.0.1"));
+               
+               assertFalse(mavenVersioning.isMoreRecentThan("0.0.2"));
+               assertFalse(mavenVersioning.isMoreRecentThan("0.0.1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("00.00.01"));
+               
+               assertFalse(mavenVersioning.isMoreRecentThan("0.1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("0.1.0.2"));
+               
+               assertFalse(mavenVersioning.isMoreRecentThan("0.1.1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("2.1.1"));
+               
+               mavenVersioning.setVersion("1.0.1");
+               assertTrue(mavenVersioning.isMoreRecentThan("0.0.0"));
+               assertTrue(mavenVersioning.isMoreRecentThan("0.5.2"));
+               assertTrue(mavenVersioning.isMoreRecentThan("1.0.0"));
+               
+               assertFalse(mavenVersioning.isMoreRecentThan("2.1.1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("02.001.0001"));
+               assertFalse(mavenVersioning.isMoreRecentThan("1.0.1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("1.0.2"));
+               assertFalse(mavenVersioning.isMoreRecentThan("1.1.1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("1.0.10"));
+               
+               
+               mavenVersioning.setVersion("100.0.1");
+               assertTrue(mavenVersioning.isMoreRecentThan("0.0.0"));
+               assertTrue(mavenVersioning.isMoreRecentThan("0.5.2"));
+               assertTrue(mavenVersioning.isMoreRecentThan("1.0.0"));
+               
+               assertFalse(mavenVersioning.isMoreRecentThan("101.1.1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("100.0.1"));
+               assertFalse(mavenVersioning.isMoreRecentThan("100.0.2"));
+               assertFalse(mavenVersioning.isMoreRecentThan("100.1.1"));
+               
+               assertFalse(mavenVersioning.isMoreRecentThan("100.0.1.4"));
+       }
+       
+       @Test
+       public final void testOneDigitVersion() {
+               MavenLikeVersioning oneDigit = new MavenLikeVersioning();
+               oneDigit.setVersion("1");
+               assertFalse(oneDigit.isMoreRecentThan("2"));
+               assertFalse(oneDigit.isMoreRecentThan("2.0"));
+               assertFalse(oneDigit.isMoreRecentThan("1.0"));
+               
+               oneDigit.setVersion("1.0");
+               assertTrue(oneDigit.isMoreRecentThan("1"));
+               
+               oneDigit.setVersion("1");
+               assertFalse(oneDigit.isTheSameVersion("1.1"));
+               assertFalse(oneDigit.isTheSameVersion("1.0"));
+               assertFalse(oneDigit.isTheSameVersion("1.0.0"));
+                               
+               oneDigit.setVersion("2");
+               assertTrue(oneDigit.isMoreRecentThan("1"));
+               assertTrue(oneDigit.isMoreRecentThan("1.0"));
+               assertTrue(oneDigit.isMoreRecentThan("1.1"));
+               assertTrue(oneDigit.isMoreRecentThan("0.1"));
+               assertFalse(oneDigit.isMoreRecentThan("2.0"));
+               
+       }
+       
+       @Test
+       public final void testVersionEquals () {
+               
+               MavenLikeVersioning heatTemplate = new MavenLikeVersioning();
+               assertFalse(heatTemplate.isTheSameVersion("100.0"));
+               assertTrue(heatTemplate.isTheSameVersion(null));
+               heatTemplate.setVersion("100.0.1");
+               assertFalse(heatTemplate.isTheSameVersion(null));
+               assertFalse(heatTemplate.isTheSameVersion("100.0"));
+               assertFalse(heatTemplate.isTheSameVersion("100"));
+               assertFalse(heatTemplate.isTheSameVersion("100.0.1.1"));
+               assertTrue(heatTemplate.isTheSameVersion("100.0.1"));
+               assertTrue(heatTemplate.isTheSameVersion("00100.000.0001"));
+               assertFalse(heatTemplate.isTheSameVersion("0.0.1"));
+               assertTrue(heatTemplate.isTheSameVersion("100.0.01"));
+               
+       }
+       
+       @Test
+       public final void testListSort () {
+               MavenLikeVersioning test1 = new MavenLikeVersioning();
+               test1.setVersion("1.1");
+               MavenLikeVersioning test2 = new MavenLikeVersioning();
+               test2.setVersion("1.10");
+               MavenLikeVersioning test3 = new MavenLikeVersioning();
+               test3.setVersion("1.2");
+               MavenLikeVersioning test4 = new MavenLikeVersioning();
+               test4.setVersion("1.20");
+               MavenLikeVersioning test5 = new MavenLikeVersioning();
+               test5.setVersion("1.02");
+               MavenLikeVersioning test6 = new MavenLikeVersioning();
+               test6.setVersion("2.02");
+               MavenLikeVersioning test7 = new MavenLikeVersioning();
+               test7.setVersion("0.02");
+               MavenLikeVersioning test8 = new MavenLikeVersioning();
+               test8.setVersion("2.02");
+               MavenLikeVersioning test9 = new MavenLikeVersioning();
+               test9.setVersion("10.2004");
+               MavenLikeVersioning test10 = new MavenLikeVersioning();
+               test10.setVersion("2");
+               MavenLikeVersioning test11 = new MavenLikeVersioning();
+               test11.setVersion("12");
+               MavenLikeVersioning test12 = new MavenLikeVersioning();
+               test12.setVersion("2.0");
+               
+               List<MavenLikeVersioning> list= new LinkedList<MavenLikeVersioning>();
+               list.add(test1);
+               list.add(test2);
+               list.add(test3);
+               list.add(test4);
+               list.add(test5);
+               list.add(test6);
+               list.add(test7);
+               list.add(test8);
+               list.add(test9);
+               list.add(test10);
+               list.add(test11);
+               list.add(test12);
+               
+               Collections.sort(list,new MavenLikeVersioningComparator());
+               //Collections.reverse(list);
+               assertTrue(list.get(0).getVersion().equals("0.02"));
+               assertTrue(list.get(1).getVersion().equals("1.1"));
+               assertTrue(list.get(2).getVersion().equals("1.02") || list.get(3).getVersion().equals("1.02"));
+               assertTrue(list.get(3).getVersion().equals("1.2") || list.get(2).getVersion().equals("1.2"));
+               assertTrue(list.get(4).getVersion().equals("1.10"));
+               assertTrue(list.get(5).getVersion().equals("1.20"));
+               assertTrue(list.get(6).getVersion().equals("2"));
+               assertTrue(list.get(7).getVersion().equals("2.0"));
+               assertTrue(list.get(8).getVersion().equals("2.02"));
+               assertTrue(list.get(9).getVersion().equals("2.02"));
+               assertTrue(list.get(10).getVersion().equals("10.2004"));
+               assertTrue(list.get(11).getVersion().equals("12"));
+                               
+       }
+}
+
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTest.java
new file mode 100644 (file)
index 0000000..86a10d3
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:20:06 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MavenLikeVersioningComparatorESTest extends MavenLikeVersioningComparatorESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MavenLikeVersioningComparator mavenLikeVersioningComparator0 = new MavenLikeVersioningComparator();
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.setVersion("");
+      // Undeclared exception!
+      try { 
+        mavenLikeVersioningComparator0.compare(mavenLikeVersioning0, mavenLikeVersioning0);
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      MavenLikeVersioningComparator mavenLikeVersioningComparator0 = new MavenLikeVersioningComparator();
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      // Undeclared exception!
+      try { 
+        mavenLikeVersioningComparator0.compare((MavenLikeVersioning) null, mavenLikeVersioning0);
+        fail("Expecting exception: NullPointerException");
+      
+      } catch(NullPointerException e) {
+         //
+         // no message in exception (getMessage() returned null)
+         //
+         verifyException("org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      MavenLikeVersioningComparator mavenLikeVersioningComparator0 = new MavenLikeVersioningComparator();
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      int int0 = mavenLikeVersioningComparator0.compare(mavenLikeVersioning0, mavenLikeVersioning0);
+      assertEquals(0, int0);
+  }
+
+  @Test(timeout = 4000)
+  public void test3()  throws Throwable  {
+      MavenLikeVersioningComparator mavenLikeVersioningComparator0 = new MavenLikeVersioningComparator();
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.setVersion("");
+      MavenLikeVersioning mavenLikeVersioning1 = new MavenLikeVersioning();
+      int int0 = mavenLikeVersioningComparator0.compare(mavenLikeVersioning0, mavenLikeVersioning1);
+      assertEquals((-1), int0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningComparatorESTestscaffolding.java
new file mode 100644 (file)
index 0000000..3dea78d
--- /dev/null
@@ -0,0 +1,79 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:20:06 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.utils;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MavenLikeVersioningComparatorESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MavenLikeVersioningComparatorESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning",
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioningComparator"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTest.java
new file mode 100644 (file)
index 0000000..cb1df74
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:10:39 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.utils;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.evosuite.runtime.EvoAssertions.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MavenLikeVersioningESTest extends MavenLikeVersioningESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test00()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.setVersion("8");
+      Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("0");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test01()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "nS!?LIvx.hXgs?:=";
+      Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("xqR");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test02()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "8";
+      String string0 = mavenLikeVersioning0.getVersion();
+      assertEquals("8", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test03()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "";
+      String string0 = mavenLikeVersioning0.getVersion();
+      assertEquals("", string0);
+  }
+
+  @Test(timeout = 4000)
+  public void test04()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "/g";
+      // Undeclared exception!
+      try { 
+        mavenLikeVersioning0.isTheSameVersion("/g");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"/g\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test05()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.setVersion("8");
+      Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("90");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test06()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "";
+      Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("dbqf\u0005I/ufZo.8No");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test07()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "8";
+      Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("8");
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test08()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "nS!?LIvx.hXgs?:=";
+      Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion((String) null);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test09()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion((String) null);
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test10()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      Boolean boolean0 = mavenLikeVersioning0.isTheSameVersion("8");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test11()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "8";
+      mavenLikeVersioning0.version = "90";
+      Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan("8");
+      assertTrue(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test12()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "8";
+      Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan("90");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test13()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.version = "8";
+      Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan("8");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test14()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.setVersion("3n+.F");
+      // Undeclared exception!
+      try { 
+        mavenLikeVersioning0.isMoreRecentThan("Q");
+        fail("Expecting exception: NumberFormatException");
+      
+      } catch(NumberFormatException e) {
+         //
+         // For input string: \"3n+\"
+         //
+         verifyException("java.lang.NumberFormatException", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test15()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan("Q");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test16()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      Boolean boolean0 = mavenLikeVersioning0.isMoreRecentThan((String) null);
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test17()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      mavenLikeVersioning0.setVersion(".");
+      // Undeclared exception!
+      try { 
+        mavenLikeVersioning0.isMoreRecentThan("Q");
+        fail("Expecting exception: ArrayIndexOutOfBoundsException");
+      
+      } catch(ArrayIndexOutOfBoundsException e) {
+         //
+         // -1
+         //
+         verifyException("org.openecomp.mso.db.catalog.utils.MavenLikeVersioning", e);
+      }
+  }
+
+  @Test(timeout = 4000)
+  public void test18()  throws Throwable  {
+      MavenLikeVersioning mavenLikeVersioning0 = new MavenLikeVersioning();
+      String string0 = mavenLikeVersioning0.getVersion();
+      assertNull(string0);
+  }
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTestscaffolding.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioningESTestscaffolding.java
new file mode 100644 (file)
index 0000000..81bef44
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:10:39 GMT 2016
+ */
+
+package org.openecomp.mso.db.catalog.utils;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MavenLikeVersioningESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MavenLikeVersioningESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning"
+    );
+  } 
+
+  private static void resetClasses() {
+  }
+}
diff --git a/mso-catalog-db/src/test/resources/logback-test.xml b/mso-catalog-db/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..a23395f
--- /dev/null
@@ -0,0 +1,47 @@
+<!--
+  ============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=========================================================
+  -->
+
+<configuration >
+
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+    </encoder>
+  </appender>
+
+
+  <logger name="com.att.eelf.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> 
+
+  <root level="info">
+    <appender-ref ref="STDOUT" />
+  </root>
+
+</configuration>
diff --git a/packages/arquillian-unit-tests/pom.xml b/packages/arquillian-unit-tests/pom.xml
new file mode 100644 (file)
index 0000000..012e793
--- /dev/null
@@ -0,0 +1,403 @@
+<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.openecomp.mso</groupId>
+               <artifactId>packages</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.openecomp.mso.packages</groupId>
+       <name>Arquillian Unit Testing on MSO</name>
+       <artifactId>arquillian-unit-tests</artifactId>
+
+       <packaging>jar</packaging>
+       
+       <profiles>
+               <profile>
+               <id>default-tests</id>
+                <activation>
+                       <activeByDefault>true</activeByDefault>
+               </activation>
+                       <properties>
+                               <it-suite-to-execute>**/IntegrationTestsSuite.java</it-suite-to-execute>
+                               <container-to-start>jboss-as</container-to-start>
+                               <mso.project.version>${project.version}</mso.project.version>
+                       </properties>
+               </profile>
+                       
+    </profiles>
+    
+   
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>org.jboss.arquillian</groupId>
+                               <artifactId>arquillian-bom</artifactId>
+                               <version>1.1.11.Final</version>
+                               <scope>import</scope>
+                               <type>pom</type>
+                       </dependency>
+                           
+                       <dependency>
+                               <groupId>org.jboss.spec</groupId>
+                               <artifactId>jboss-javaee-6.0</artifactId>
+                               <version>3.0.2.Final</version>
+                               <type>pom</type>
+                               <scope>import</scope>
+       
+                       </dependency>
+       
+               </dependencies>
+               
+               
+       </dependencyManagement>
+
+
+       <dependencies>
+               <!-- For testing -->
+               <dependency>
+                       <groupId>org.jboss.marshalling</groupId>
+                       <artifactId>jboss-marshalling</artifactId>
+                       <version>1.3.16.GA</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.11</version>
+                       <scope>test</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.jboss.arquillian.junit</groupId>
+                       <artifactId>arquillian-junit-container</artifactId>
+                       <scope>test</scope>
+
+               </dependency>
+
+<!--        <dependency>
+            <groupId>org.jboss.as</groupId>
+            <artifactId>jboss-as-arquillian-container-remote</artifactId>
+            <version>7.2.0.Final</version>
+            <scope>test</scope>
+        </dependency>-->
+        
+       <dependency>
+               <groupId>org.wildfly.arquillian</groupId>
+                       <artifactId>wildfly-arquillian-container-remote</artifactId>
+                       <version>1.1.0.Final</version>
+                       <scope>test</scope>
+               </dependency>
+               
+               <dependency>
+                        <groupId>org.jboss.remoting</groupId>
+                        <artifactId>jboss-remoting</artifactId>
+               <version>4.0.9.Final</version>
+                       <scope>test</scope>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.jboss.logging</groupId>
+               <artifactId>jboss-logging</artifactId>
+               <version>3.2.1.Final</version>
+               <scope>test</scope>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.jboss.arquillian.protocol</groupId>
+                       <artifactId>arquillian-protocol-servlet</artifactId>
+                       <scope>test</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.jboss.shrinkwrap.resolver</groupId>
+                       <artifactId>shrinkwrap-resolver-bom</artifactId>
+                       <version>2.1.0-alpha-1</version>
+                       <scope>runtime</scope>
+                       <type>pom</type>
+               </dependency>
+               
+               <!-- FOR DOCKER CONTROLLED BY ARQUILLIAN-->   
+               <dependency>
+              <groupId>org.arquillian.cube</groupId>
+              <artifactId>arquillian-cube-openshift-parent</artifactId>
+              <version>1.0.0.Alpha15</version>
+              <type>pom</type>
+              <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.arquillian.cube</groupId>
+            <artifactId>arquillian-cube-docker</artifactId>
+            <version>1.0.0.Alpha15</version>
+            <scope>test</scope>
+        </dependency>
+               
+               <!-- <dependency>
+                       <groupId>org.eu.ingwar.tools</groupId>
+                       <artifactId>arquillian-suite-extension</artifactId>
+                       <version>1.1.1</version>
+                       <scope>test</scope>
+               </dependency> -->
+               
+
+               <!-- For testing -->
+
+               <!-- FOR JBOSS CODE -->
+               <dependency>
+                       <groupId>org.hibernate</groupId>
+                       <artifactId>hibernate-core</artifactId>
+                       <version>4.2.7.SP1</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.hibernate</groupId>
+                       <artifactId>hibernate-entitymanager</artifactId>
+                       <version>4.2.7.SP1</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.codehaus.jackson</groupId>
+                       <artifactId>jackson-mapper-asl</artifactId>
+                       <version>1.9.9</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>javax.validation</groupId>
+                       <artifactId>validation-api</artifactId>
+                       <version>1.0.0.GA</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.jboss.as</groupId>
+                       <artifactId>jboss-as-ejb3</artifactId>
+                       <version>7.2.0.Final</version>
+                       <scope>test</scope>
+               </dependency>
+
+
+               <dependency>
+             <groupId>com.smartbear.soapui</groupId>
+             <artifactId>soapui</artifactId>
+             <version>5.1.0</version>
+             <type>jar</type>
+             <scope>test</scope>
+             <exclusions>
+                   <exclusion>
+                       <groupId>thoughtworks</groupId>
+                               <artifactId>xstream</artifactId>
+                       </exclusion>
+                   <exclusion>
+                       <groupId>gnu.cajo</groupId>
+                               <artifactId>cajo</artifactId>
+                       </exclusion>
+                 </exclusions>
+       </dependency>
+       
+       <dependency>
+                       <groupId>commons-codec</groupId>
+                       <artifactId>commons-codec</artifactId>
+                       <version>1.4</version>
+                       <type>jar</type>
+                       <scope>test</scope>
+               </dependency>
+       
+       <dependency>
+               <groupId>org.seleniumhq.selenium</groupId>
+               <artifactId>selenium-java</artifactId>
+               <version>2.45.0</version>    
+               <scope>test</scope>       
+               </dependency>    
+               <dependency>
+                   <groupId>org.seleniumhq.selenium</groupId>
+                   <artifactId>selenium-firefox-driver</artifactId>
+                   <version>2.45.0</version>
+                   <scope>test</scope>
+               </dependency> 
+               <dependency>
+                       <groupId>org.seleniumhq.selenium</groupId>
+                   <artifactId>selenium-server</artifactId>
+                   <version>2.45.0</version> 
+                   <scope>test</scope>   
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpclient</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpcore</artifactId>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>asdc-controller</artifactId>
+                       <version>${project.version}</version>
+                       <scope>test</scope>
+                       <classifier>classes</classifier>
+               </dependency>
+               
+               <!-- <dependency>
+            <groupId>org.openecomp.mso.adapters</groupId>
+            <artifactId>mso-appc-adapter</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <classifier>classes</classifier>
+        </dependency> -->
+               
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-all</artifactId>
+                       <version>1.10.19</version>
+                       <scope>test</scope>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.openecomp.sdc</groupId>
+            <artifactId>sdc-distribution-client</artifactId>
+            <version>1.1.2</version>
+                       <scope>test</scope>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.openecomp.mso</groupId>
+                       <artifactId>mso-catalog-db</artifactId>
+                       <version>${project.version}</version>
+                       <scope>test</scope>
+               </dependency>
+       <!-- FOR JMETER -->
+               <dependency>
+                       <groupId>org.apache.jmeter</groupId>
+                       <artifactId>ApacheJMeter_core</artifactId>
+                       <version>2.13</version>
+       
+                       <scope>test</scope>
+                       <exclusions>
+                               <exclusion>
+                                       <artifactId>commons-math3</artifactId>
+                                       <groupId>commons-math3</groupId>
+                               </exclusion>
+                               <exclusion>
+                                       <artifactId>commons-pool2</artifactId>
+                                       <groupId>commons-pool2</groupId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.jmeter</groupId>
+                       <artifactId>ApacheJMeter_http</artifactId>
+                       <version>2.13</version>
+       
+                       <scope>test</scope>
+                       <exclusions>
+                               <exclusion>
+                                       <artifactId>commons-math3</artifactId>
+                                       <groupId>commons-math3</groupId>
+                               </exclusion>
+                               <exclusion>
+                                       <artifactId>commons-pool2</artifactId>
+                                       <groupId>commons-pool2</groupId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.jmeter</groupId>
+                       <artifactId>ApacheJMeter_jdbc</artifactId>
+                       <version>2.13</version>
+       
+                       <scope>test</scope>
+                       <exclusions>
+                               <exclusion>
+                                       <artifactId>commons-math3</artifactId>
+                                       <groupId>commons-math3</groupId>
+                               </exclusion>
+                               <exclusion>
+                                       <artifactId>commons-pool2</artifactId>
+                                       <groupId>commons-pool2</groupId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               
+               <!-- END  FOR JMETER -->
+       </dependencies>
+
+       <build>
+               <finalName>arquillian-tests</finalName>
+               <plugins>
+                       <plugin>
+                           <groupId>org.codehaus.groovy.maven</groupId>
+                               <artifactId>gmaven-plugin</artifactId>
+                           <executions>
+                             <execution>
+                               <phase>generate-resources</phase>
+                               <goals>
+                                 <goal>execute</goal>
+                               </goals>
+                               <configuration>
+                                 <source>
+                                   if ( project.properties['docker.host'] != null ) {
+                                               project.properties['docker.host.truncated']=project.properties['docker.host'].replaceFirst("^(http://|https://)","");
+                                               int indexPort = project.properties['docker.host.truncated'].indexOf(":");
+                                               project.properties['docker.host.truncated']=project.properties['docker.host.truncated'].substring(0,indexPort);
+                                               println 'docker.host.truncated:'+ project.properties['docker.host.truncated'];
+                                       } else {
+                                               project.properties['docker.host.truncated']="127.0.0.1";
+                                               project.properties['docker.host']="unix:///var/run/docker.sock"
+                                       }
+                                       
+                                       if ( project.properties['mso.project.version'].endsWith("-SNAPSHOT") ) {
+                                               project.properties['mso.version']="latest";
+                                       } else {
+                                               project.properties['mso.version']=project.properties['mso.project.version'];
+                                       }                                       
+                                 </source>
+                               </configuration>
+                             </execution>
+                         </executions>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-failsafe-plugin</artifactId>
+                               <version>2.16</version>
+
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>integration-test</goal>
+                                                       <goal>verify</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                               
+                               <configuration>
+                                       <systemPropertyVariables>                        
+                                               <arquillian.launch>${container-to-start}</arquillian.launch>
+                                               <target.folder>${project.build.directory}</target.folder>
+                                               <docker.url>${docker.host}</docker.url>
+                                               <docker.hostname>${docker.host.truncated}</docker.hostname>
+                                               <images.version>${mso.version}</images.version>
+                                       </systemPropertyVariables>
+                                       <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+                                       <testFailureIgnore>true</testFailureIgnore>
+                                       <includes>
+                                               <include>${it-suite-to-execute}</include>
+                                       </includes>
+                               </configuration>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+
+                               <configuration>
+                                       <skipTests>true</skipTests>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+</project>
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/filesearching/LogFileSearching.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/filesearching/LogFileSearching.java
new file mode 100644 (file)
index 0000000..2321b3f
--- /dev/null
@@ -0,0 +1,112 @@
+package org.openecomp.mso.filesearching;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.NoSuchElementException;
+import java.util.Scanner;
+
+public class LogFileSearching {
+       
+       private static PrintWriter writer;
+       
+       public static void initFile(String filePath) {
+               if (writer == null) {
+                       try {
+                               // This is to reopen an existing file
+                               writer = new PrintWriter(new FileOutputStream(filePath,true));
+                       } catch ( IOException e) {
+                               System.out.println("Exception caught when trying to open the file /tmp/mso-log-checker.log to dump the result");
+                               e.printStackTrace();
+                       }
+               }
+       }
+       
+       public static void closeFile() {
+               if (writer != null) {
+                       writer.close();
+                       writer = null;
+               }
+       }
+       
+       
+       public static boolean searchInFile(final String needle, final File file) throws FileNotFoundException {
+               Scanner logScanner = new Scanner(file);
+               try {
+                       writer.println("Searching pattern " + needle + " in " + file.getAbsolutePath());
+                       //System.out.println("Searching pattern " + needle + " in " + file.getAbsolutePath());
+
+                       String filedata = logScanner.useDelimiter("\\Z").next();
+
+                       int occurrences = 0;
+                       int index = 0;
+
+                       while (index < filedata.length() && (index = filedata.indexOf(needle, index)) >= 0) {
+                               occurrences++;
+                               
+                               int separatorIndex = filedata.indexOf(System.getProperty("line.separator"), index);
+                               if (separatorIndex >=0){
+                                       writer.println("FOUND:" + filedata.substring(index, separatorIndex));
+                                       //System.out.println("FOUND:"
+                                               //      + filedata.substring(index, separatorIndex));
+                               } else {
+                                       writer.println("FOUND:" + filedata.substring(index, filedata.length()-1));
+                                       //System.out.println("FOUND:"
+                                               //      + filedata.substring(index, filedata.length()-1));
+                               }
+                               index += needle.length();
+                       }
+                       writer.println("TOTAL:" + occurrences + " FOUND");
+                       //System.out.println("TOTAL:" + occurrences + " FOUND");
+                       if (occurrences > 0) {
+
+                               return true;
+                       } else {
+
+                               return false;
+                       }
+               } catch (NoSuchElementException e) {
+                       writer.println("TOTAL:0 FOUND");
+                       //System.out.println("TOTAL:0 FOUND");
+                       return false;
+               } finally {
+                       logScanner.close();
+               }
+       }
+
+       public static boolean searchInDirectory(final String needle, final File directory) throws FileNotFoundException {
+
+               boolean res = false;
+               String[] dirFiles = directory.list();
+
+               if (dirFiles != null) {
+
+                       for (String dir : dirFiles) {
+                               res = res || searchInDirectory(needle, new File(directory.getAbsolutePath() + "/" + dir));
+                       }
+
+               } else {
+                       return LogFileSearching.searchInFile(needle, directory);
+               }
+               return res;
+       }
+       
+       public static boolean searchInDirectoryForCommonIssues(final String[] needles, final File directory) throws FileNotFoundException {
+               String[] defaultPatternsToUse = {"ClassNotFound","NullPointer","RuntimeException","IllegalStateException","FATAL"};
+               
+               if (needles != null && needles.length>0) {
+                       defaultPatternsToUse=needles;
+               }
+               
+               boolean returnValue=false;
+               for (String needle:defaultPatternsToUse) {
+                       returnValue |= LogFileSearching.searchInDirectory(needle,directory);
+               }
+                               
+               return returnValue;
+       }
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java
new file mode 100644 (file)
index 0000000..9b80d25
--- /dev/null
@@ -0,0 +1,57 @@
+package org.openecomp.mso.global_tests;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Iterator;
+
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+
+public class ArquillianPackagerForITCases {
+
+       public static Archive<?> createPackageFromExistingOne(String path, String globPattern, String newPackageName) {
+               Path dir = Paths.get(path);
+
+               try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, globPattern)) {
+                       Iterator<Path> it = stream.iterator();
+                       if (it.hasNext()) {
+
+                               if (newPackageName.endsWith(".war")) {
+                                       File archive = it.next().toFile();
+                                       WebArchive webArchive = ShrinkWrap.create(WebArchive.class, newPackageName);
+                                       webArchive.merge((ShrinkWrap.createFromZipFile(WebArchive.class, archive)));
+                                       return webArchive;
+                               } else if (newPackageName.endsWith(".jar")) {
+                                       File archive = it.next().toFile();
+                                       JavaArchive javaArchive = ShrinkWrap.create(JavaArchive.class, newPackageName);
+                                       javaArchive.merge((ShrinkWrap.createFromZipFile(JavaArchive.class, archive)));
+                                       return javaArchive;
+                               } else if (newPackageName.endsWith(".ear")) {
+                                       File archive = it.next().toFile();
+                                       EnterpriseArchive earArchive = ShrinkWrap.create(EnterpriseArchive.class, newPackageName);
+                                       earArchive.merge((ShrinkWrap.createFromZipFile(EnterpriseArchive.class, archive)));
+                                       return earArchive;
+                               } else {
+                                       return null;
+                               }
+
+                       } else {
+                               return null;
+                       }
+
+               } catch (IOException e) {
+                       e.printStackTrace();
+                       return null;
+               }
+
+       }
+       
+       
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/IntegrationTestsSuite.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/IntegrationTestsSuite.java
new file mode 100644 (file)
index 0000000..a1fa04d
--- /dev/null
@@ -0,0 +1,25 @@
+package org.openecomp.mso.global_tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+//import org.openecomp.mso.global_tests.appc.AppCAdapterITCase;
+import org.openecomp.mso.global_tests.asdc.ASDCITCase;
+import org.openecomp.mso.global_tests.logging.LogsCheckerITCase;
+import org.openecomp.mso.global_tests.soapui.SoapUiITCase;
+
+
+@RunWith(Suite.class)
+@SuiteClasses({ 
+
+//    MSOUiITCase.class,
+//     AppCAdapterITCase.class,
+       SoapUiITCase.class,
+    ASDCITCase.class,
+    LogsCheckerITCase.class
+    
+})
+public class IntegrationTestsSuite {
+
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/ASDCITCase.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/ASDCITCase.java
new file mode 100644 (file)
index 0000000..47b261a
--- /dev/null
@@ -0,0 +1,497 @@
+package org.openecomp.mso.global_tests.asdc;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.URISyntaxException;
+import java.security.NoSuchAlgorithmException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OperateOnDeployment;
+import org.jboss.arquillian.container.test.api.Testable;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.Maven;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.openecomp.sdc.api.consumer.IDistributionStatusMessage;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+import org.openecomp.sdc.utils.DistributionStatusEnum;
+import org.openecomp.mso.asdc.client.ASDCConfiguration;
+import org.openecomp.mso.asdc.client.ASDCController;
+import org.openecomp.mso.asdc.client.exceptions.ASDCControllerException;
+import org.openecomp.mso.asdc.client.exceptions.ASDCParametersException;
+import org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException;
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.db.catalog.beans.HeatEnvironment;
+import org.openecomp.mso.db.catalog.beans.HeatFiles;
+import org.openecomp.mso.db.catalog.beans.HeatTemplate;
+import org.openecomp.mso.db.catalog.beans.Service;
+import org.openecomp.mso.db.catalog.beans.VfModule;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.global_tests.ArquillianPackagerForITCases;
+import org.openecomp.mso.global_tests.asdc.notif_emulator.DistributionClientEmulator;
+import org.openecomp.mso.global_tests.asdc.notif_emulator.JsonNotificationData;
+
+@RunWith(Arquillian.class)
+public class ASDCITCase {
+
+       /**
+        * Add the resources in the right folder of a jar
+        * @param jar The jarArchive
+        * @param dir The main dir containing things that must be added
+        * @throws Exception In case of issues with the files
+        */
+       private static void addFiles(JavaArchive jar, File dir,String destFolder) throws Exception  {
+
+               if (!dir.isDirectory()) {
+                       throw new Exception("not a directory");
+               }
+               for (File f : dir.listFiles()) {
+
+                       
+                       if (f.isFile()) {
+                               jar.addAsResource(f, destFolder + "/" + f.getName());
+                       } else {
+
+                               addFiles(jar, f, destFolder+"/"+f.getName());
+                       }
+               }
+       }
+
+       @Deployment(name="asdc-controller",testable=true)
+       public static Archive<?> createAsdcControllerWarDeployment () throws Exception {
+               System.out.println("Deploying ASDC Controller WAR with additional resources on default server");
+
+               WebArchive warArchive = (WebArchive)ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war");
+
+               // Add the current test class
+               JavaArchive testclasses = ShrinkWrap.create (JavaArchive.class, "testClasses.jar");
+               
+               testclasses.addPackage("org.openecomp.mso.global_tests.asdc.notif_emulator");
+               
+               addFiles(testclasses,new File(Thread.currentThread().getContextClassLoader().getResource("resource-examples/asdc").getFile()),"resource-examples/asdc");
+               
+               System.out.println(testclasses.toString(true));
+               warArchive.addAsLibraries(testclasses);
+               
+               
+               
+               // BE CAREFUL a settings.xml file must be located in ${home.user}/.m2/settings.xml
+               warArchive.addAsLibraries(Maven.resolver()
+                               .resolve("org.mockito:mockito-all:1.10.19")
+                               .withoutTransitivity ()
+                               .asFile ());
+
+               //warArchive.addPackage("org.openecomp.mso.global_tests.asdc.notif_emulator");
+               //addFiles(warArchive,new File(ASDCITCase.class.getClassLoader().getResource("resource-examples").getPath()),"resource-examples");
+               
+               // Take one war randomly to make arquilian happy
+               Testable.archiveToTest(warArchive);
+               
+               
+               System.out.println(warArchive.toString(true));
+
+               return warArchive;
+       }
+
+       @BeforeClass
+       public static final void waitBeforeStart() throws InterruptedException,
+                       IOException,
+                       URISyntaxException,
+                       NoSuchAlgorithmException {
+               System.out.println("Executing " + ASDCITCase.class.getName());
+       }
+       
+       @AfterClass
+       public static final void waitAfterStart() throws InterruptedException,
+                       IOException,
+                       URISyntaxException,
+                       NoSuchAlgorithmException {
+               System.out.println("Waiting 60000ms " + ASDCITCase.class.getName());
+               Thread.sleep(60000);
+       }
+       
+       /**
+        * Be careful when using that notification fake structure, the UUID of notif artifacts MUST be different.
+        * There is a static Map behind the scene.
+        */
+       private JsonNotificationData notifDataWithoutModuleInfo;
+       private DistributionClientEmulator distribClientWithoutModuleInfo;
+       
+       private JsonNotificationData notifDataV1, notifDataV2, notifDataV3, notifDataV4, notifDataV5,notifDataDNS,notifDataVFW;
+       private DistributionClientEmulator distribClientV1, distribClientV2, distribClientV3, distribClientV4, distribClientV5, distribClientV1ForSameNotif, distribClientDNS,distribClientVFW;
+       
+       
+       @Before
+       public final void beforeEachTest() throws IOException {
+
+               distribClientV1= new DistributionClientEmulator("/resource-examples/asdc/simpleNotif-V1");
+               distribClientV1ForSameNotif= new DistributionClientEmulator("/resource-examples/asdc/simpleNotif-V1");
+               notifDataV1 = JsonNotificationData.instantiateNotifFromJsonFile("/resource-examples/asdc/simpleNotif-V1");
+               
+               // This is a duplicate in version 2 of the version 1
+               distribClientV2= new DistributionClientEmulator("/resource-examples/asdc/simpleNotif-V2");
+               notifDataV2 = JsonNotificationData.instantiateNotifFromJsonFile("/resource-examples/asdc/simpleNotif-V2");
+               
+               distribClientV3= new DistributionClientEmulator("/resource-examples/asdc/simpleNotif-V3");
+               notifDataV3 = JsonNotificationData.instantiateNotifFromJsonFile("/resource-examples/asdc/simpleNotif-V3");
+               
+               // This is a duplicate in version 4 of the version 3
+               distribClientV4= new DistributionClientEmulator("/resource-examples/asdc/simpleNotif-V4");
+               notifDataV4 = JsonNotificationData.instantiateNotifFromJsonFile("/resource-examples/asdc/simpleNotif-V4");
+               
+               // This notification is to test the deployment of volume with nested + an artifact not used (should send notification with DEPLOY_ERROR
+               distribClientV5= new DistributionClientEmulator("/resource-examples/asdc/simpleNotif-V5");
+               notifDataV5 = JsonNotificationData.instantiateNotifFromJsonFile("/resource-examples/asdc/simpleNotif-V5");
+               
+               
+               distribClientWithoutModuleInfo= new DistributionClientEmulator("/resource-examples/asdc/notif-without-modules-metadata");
+               notifDataWithoutModuleInfo = JsonNotificationData.instantiateNotifFromJsonFile("/resource-examples/asdc/notif-without-modules-metadata");
+               
+               
+               distribClientDNS= new DistributionClientEmulator("/resource-examples/asdc/demo-dns-V1");
+               notifDataDNS = JsonNotificationData.instantiateNotifFromJsonFile("/resource-examples/asdc/demo-dns-V1");
+               
+               
+               distribClientVFW= new DistributionClientEmulator("/resource-examples/asdc/demo-vfw-V1");
+               notifDataVFW = JsonNotificationData.instantiateNotifFromJsonFile("/resource-examples/asdc/demo-vfw-V1");
+               
+               
+       }
+       
+       @Test
+       @OperateOnDeployment("asdc-controller")
+       public void testNotifWithoutModuleInfo () throws NoSuchAlgorithmException,
+                       IOException,
+                       URISyntaxException,
+                       ArtifactInstallerException, ASDCControllerException, ASDCParametersException {
+               
+       
+               
+               ASDCController asdcController = new ASDCController("asdc-controller1", distribClientWithoutModuleInfo);
+               asdcController.initASDC();
+               asdcController.treatNotification(notifDataWithoutModuleInfo);
+               
+               assertTrue(distribClientWithoutModuleInfo.getDistributionMessageReceived().size() > 0);
+               
+               int badDeployment=0;
+               for (IDistributionStatusMessage message:distribClientWithoutModuleInfo.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:"+message.getArtifactURL()+", Value:"+message.getStatus().name());
+                       if(message.getStatus().equals(DistributionStatusEnum.DEPLOY_ERROR)) {
+                               badDeployment++;
+                       }
+               }
+               assertTrue(badDeployment == 3);
+               
+               // Check if something has been recorder in DB, as it should not
+               CatalogDatabase catalogDB = new CatalogDatabase();
+               
+               HeatTemplate heatTemplate = catalogDB.getHeatTemplate("Whot-nimbus-oam_v1.0.yaml", "1.0", "resourceName-1");
+               assertNull(heatTemplate);
+       }
+       
+       private void validateVnfResource(JsonNotificationData inputNotification,List<IVfModuleMetadata> moduleList) {
+               
+               CatalogDatabase catalogDB = new CatalogDatabase();
+               
+                               
+               for (IResourceInstance resource:inputNotification.getResources()) {
+                       VnfResource vnfResourceDB = catalogDB.getVnfResource(inputNotification.getServiceName()+"/"+resource.getResourceInstanceName(), inputNotification.getServiceVersion());
+                       assertNotNull(vnfResourceDB);
+                       
+                       assertTrue(vnfResourceDB.getAsdcUuid().equals(resource.getResourceUUID()));
+                       assertTrue(vnfResourceDB.getDescription().equals(inputNotification.getServiceDescription()));
+                       assertTrue(vnfResourceDB.getModelInvariantUuid().equals(resource.getResourceInvariantUUID()));
+                       assertTrue(vnfResourceDB.getModelVersion().equals(resource.getResourceVersion()));
+                       assertTrue(vnfResourceDB.getOrchestrationMode().equals("HEAT"));
+                       assertTrue(vnfResourceDB.getVersion().equals(inputNotification.getServiceVersion()));
+                       assertTrue(vnfResourceDB.getVnfType().equals(inputNotification.getServiceName()+"/"+resource.getResourceInstanceName()));
+                       assertTrue(vnfResourceDB.getModelCustomizationName().equals(resource.getResourceInstanceName()));
+                       assertTrue(vnfResourceDB.getModelName().equals(resource.getResourceName()));
+                       assertTrue(vnfResourceDB.getServiceModelInvariantUUID().equals(inputNotification.getServiceInvariantUUID()));
+                       
+                       for (IVfModuleMetadata module:moduleList) {
+                               
+                               VfModule vfModuleDB = catalogDB.getVfModuleModelName(module.getVfModuleModelName(),inputNotification.getServiceVersion());
+                               assertNotNull(vfModuleDB);
+                               assertTrue(module.getVfModuleModelName().equals(vfModuleDB.getModelName()));
+                               
+                               assertTrue((inputNotification.getServiceName()+"/"+resource.getResourceInstanceName()+"::"+vfModuleDB.getModelName()).equals(vfModuleDB.getType()));
+                               assertTrue(vnfResourceDB.getId()!=0);
+                               assertNotNull(vfModuleDB.getVnfResourceId());
+                               
+                               assertTrue(vnfResourceDB.getId()==vfModuleDB.getVnfResourceId().intValue());
+                                                               
+                               for (String artifactUUID:module.getArtifacts()) {
+                                       IArtifactInfo artifact = null;
+                                       for (IArtifactInfo artifactTemp:resource.getArtifacts()) {
+                                               if (artifactTemp.getArtifactUUID().equals(artifactUUID)) {
+                                                       artifact = artifactTemp;
+                                                       break;
+                                               }
+                                       }
+                                       assertNotNull(artifact);
+                                       
+                                       switch (artifact.getArtifactType()) {
+                                               case ASDCConfiguration.HEAT:
+                                                       HeatTemplate heatTemplateDB= catalogDB.getHeatTemplate(vfModuleDB.getTemplateId());
+                                                       assertNotNull(heatTemplateDB);
+                                                       assertTrue(heatTemplateDB.getAsdcResourceName().equals(resource.getResourceName()));
+                                                       assertTrue(heatTemplateDB.getAsdcUuid().equals(artifact.getArtifactUUID()));
+                                                       assertTrue(heatTemplateDB.getDescription().equals(artifact.getArtifactDescription()));
+                                                       assertTrue(heatTemplateDB.getTemplateBody() != null && !heatTemplateDB.getTemplateBody().isEmpty());
+                                                       assertTrue(heatTemplateDB.getParameters().size()>0);
+                                               
+                                                       assertTrue(heatTemplateDB.getTemplateName().equals(artifact.getArtifactName()));
+                                                       
+                                                       if (artifact.getArtifactTimeout() != null) {
+                                                               assertTrue(heatTemplateDB.getTimeoutMinutes()== artifact.getArtifactTimeout().intValue());
+                                                       } else {
+                                                               assertTrue(heatTemplateDB.getTimeoutMinutes()== 240);
+                                                       }
+                                                       assertTrue(heatTemplateDB.getVersion().equals(artifact.getArtifactVersion()));
+                                                       
+                                                       assertFalse(heatTemplateDB.getTemplateBody().contains("file:///"));
+                                                       break;
+                                               case ASDCConfiguration.HEAT_ENV:
+                                                       
+                                                       HeatEnvironment heatEnvironmentDB = catalogDB.getHeatEnvironment(artifact.getArtifactName(), artifact.getArtifactVersion(), inputNotification.getServiceName()+"/"+resource.getResourceInstanceName());
+                                                       
+                                                       assertNotNull(heatEnvironmentDB);
+                                                       assertTrue((vfModuleDB.getVolEnvironmentId() != null && vfModuleDB.getVolEnvironmentId().intValue() == heatEnvironmentDB.getId())
+                                                                       || (vfModuleDB.getEnvironmentId() != null && vfModuleDB.getEnvironmentId() == heatEnvironmentDB.getId()));
+                                                       
+                                                       assertTrue(heatEnvironmentDB.getAsdcResourceName().equals(inputNotification.getServiceName()+"/"+resource.getResourceInstanceName()));
+                                                       
+                                                       assertTrue(heatEnvironmentDB.getAsdcUuid().equals(artifact.getArtifactUUID()));
+                                                       assertTrue(heatEnvironmentDB.getDescription().equals(artifact.getArtifactDescription()));
+                                                       assertTrue(heatEnvironmentDB.getVersion().equals(artifact.getArtifactVersion()));
+                                                       assertTrue(heatEnvironmentDB.getName().equals(artifact.getArtifactName()));
+                                                       assertTrue(heatEnvironmentDB.getEnvironment() != null);
+                                                       assertFalse(heatEnvironmentDB.getEnvironment().contains("file:///"));
+                                                                                                       
+                                                       break;
+                                               case ASDCConfiguration.HEAT_NESTED:
+                                                       Map<String,Object> listNestedDBMainHeat=new HashMap<String,Object>();
+                                                       Map<String,Object> listNestedDBVolHeat=new HashMap<String,Object>();
+                                                       
+                                                       if (vfModuleDB.getTemplateId() != null) {
+                                                               listNestedDBMainHeat = catalogDB.getNestedTemplates(vfModuleDB.getTemplateId());
+                                                       }
+                                                       if (vfModuleDB.getVolTemplateId() != null) {
+                                                               listNestedDBVolHeat = catalogDB.getNestedTemplates(vfModuleDB.getVolTemplateId());
+                                                       }
+                                       
+                                                       assertTrue(listNestedDBMainHeat.size() > 0 || listNestedDBVolHeat.size() > 0);
+                                                       
+                                                       
+                                                       assertTrue(listNestedDBMainHeat.get(artifact.getArtifactName()) != null 
+                                                                       || listNestedDBVolHeat.get(artifact.getArtifactName()) != null);
+                                                       
+                                                       HeatTemplate rightNestedTemplateDB = catalogDB.getHeatTemplate(artifact.getArtifactName(), artifact.getArtifactVersion(), resource.getResourceName());
+                                                       assertNotNull(rightNestedTemplateDB);
+                                                       assertTrue(catalogDB.getNestedHeatTemplate(vfModuleDB.getTemplateId(), rightNestedTemplateDB.getId()) != null || catalogDB.getNestedHeatTemplate(vfModuleDB.getVolTemplateId(), rightNestedTemplateDB.getId()) != null);
+                                                       
+                                                       assertTrue(rightNestedTemplateDB.getAsdcResourceName().equals(resource.getResourceName()));
+                                                       assertTrue(rightNestedTemplateDB.getAsdcUuid().equals(artifact.getArtifactUUID()));
+                                                       assertTrue(rightNestedTemplateDB.getDescription().equals(artifact.getArtifactDescription()));
+                                                       assertTrue(rightNestedTemplateDB.getTemplateBody() != null && !rightNestedTemplateDB.getTemplateBody().isEmpty());
+                                                       assertTrue(rightNestedTemplateDB.getTemplateName().equals(artifact.getArtifactName()));
+                                                       
+                                                       if (artifact.getArtifactTimeout() != null) {
+                                                               assertTrue(rightNestedTemplateDB.getTimeoutMinutes()== artifact.getArtifactTimeout().intValue());
+                                                       } else {
+                                                               assertTrue(rightNestedTemplateDB.getTimeoutMinutes()== 240);
+                                                       }
+                                                       assertTrue(rightNestedTemplateDB.getVersion().equals(artifact.getArtifactVersion()));
+                                                       assertFalse(rightNestedTemplateDB.getTemplateBody().contains("file:///"));
+                                                       
+                                                       break;
+                                               case ASDCConfiguration.HEAT_VOL:
+                                                       HeatTemplate heatTemplateVolDB = catalogDB.getHeatTemplate(vfModuleDB.getVolTemplateId());
+                                                       assertNotNull(heatTemplateVolDB);
+                                                       
+                                                       assertTrue(heatTemplateVolDB.getAsdcResourceName().equals(resource.getResourceName()));
+                                                       assertTrue(heatTemplateVolDB.getAsdcUuid().equals(artifact.getArtifactUUID()));
+                                                       assertTrue(heatTemplateVolDB.getDescription().equals(artifact.getArtifactDescription()));
+                                                       assertTrue(heatTemplateVolDB.getTemplateBody() != null && !heatTemplateVolDB.getTemplateBody().isEmpty());
+                                                       assertTrue(heatTemplateVolDB.getTemplateName().equals(artifact.getArtifactName()));
+                                                       
+                                                       if (artifact.getArtifactTimeout() != null) {
+                                                               assertTrue(heatTemplateVolDB.getTimeoutMinutes()== artifact.getArtifactTimeout().intValue());
+                                                       } else {
+                                                               assertTrue(heatTemplateVolDB.getTimeoutMinutes()== 240);
+                                                       }
+                                                       assertTrue(heatTemplateVolDB.getVersion().equals(artifact.getArtifactVersion()));
+                                                       assertFalse(heatTemplateVolDB.getTemplateBody().contains("file:///"));
+                                                       
+                                                       break;
+                                               case ASDCConfiguration.HEAT_ARTIFACT:
+                                                       Map<String,HeatFiles> heatFilesDB= catalogDB.getHeatFilesForVfModule(vfModuleDB.getId());
+                                                       assertTrue(heatFilesDB.size()>0);
+                                                       HeatFiles rightHeatFilesDB=heatFilesDB.get( artifact.getArtifactName());
+                                                       assertNotNull(rightHeatFilesDB);
+                                                       
+                                                       assertTrue(rightHeatFilesDB.getAsdcResourceName().equals(resource.getResourceName()));
+                                                       assertTrue(rightHeatFilesDB.getAsdcUuid().equals(artifact.getArtifactUUID()));
+                                                       assertTrue(rightHeatFilesDB.getDescription().equals(artifact.getArtifactDescription()));
+                                                       assertTrue(rightHeatFilesDB.getFileBody() != null && !rightHeatFilesDB.getFileBody().isEmpty());
+                                                       assertTrue(rightHeatFilesDB.getFileName().equals( artifact.getArtifactName()));
+                                                       assertTrue(rightHeatFilesDB.getVersion().equals(artifact.getArtifactVersion()));
+                                                       
+                                                       break;
+                                               default:
+                                                       break;
+                                               
+                                       }
+                               }
+                       
+                       }
+       
+               }
+               
+               Service service = catalogDB.getServiceByUUID(inputNotification.getServiceUUID());
+               assertNotNull(service);
+               assertTrue(service.getCreated() !=null && service.getCreated().getTime()>0);
+               assertTrue(service.getDescription().equals(inputNotification.getServiceDescription()));
+               assertTrue(service.getId()>0);
+               assertTrue(service.getModelInvariantUUID().equals(inputNotification.getServiceInvariantUUID()));
+               assertTrue(service.getServiceName().equals(inputNotification.getServiceName()));
+               assertTrue(service.getServiceNameVersionId().equals(inputNotification.getServiceUUID()));
+               assertTrue(service.getVersion().equals(inputNotification.getServiceVersion()));
+
+       }
+       
+       @Test
+       @OperateOnDeployment("asdc-controller")
+       public void testNotifsDeployment () throws NoSuchAlgorithmException,
+                       IOException,
+                       URISyntaxException,
+                       ArtifactInstallerException, ASDCControllerException, ASDCParametersException {
+               
+       
+               
+               ASDCController asdcControllerV1 = new ASDCController("asdc-controller1", distribClientV1);
+               asdcControllerV1.initASDC();
+               asdcControllerV1.treatNotification(notifDataV1);
+               
+               assertTrue(distribClientV1.getDistributionMessageReceived().size() > 0);
+               for (IDistributionStatusMessage message:distribClientV1.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:"+message.getArtifactURL()+", Value:"+message.getStatus().name());
+                       assertTrue(message.getStatus().equals(DistributionStatusEnum.DEPLOY_OK) || message.getStatus().equals(DistributionStatusEnum.DOWNLOAD_OK));
+               }
+               
+               this.validateVnfResource(notifDataV1,distribClientV1.getListVFModuleMetaData());
+               
+               
+               
+               // Try again to load the same notif
+               ASDCController asdcControllerNewNotif = new ASDCController("asdc-controller1", distribClientV1ForSameNotif);
+               asdcControllerNewNotif.initASDC();
+               asdcControllerNewNotif.treatNotification(notifDataV1);
+               
+               for (IDistributionStatusMessage message:distribClientV1ForSameNotif.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:"+message.getArtifactURL()+", Value:"+message.getStatus().name());
+                       assertTrue(message.getStatus().equals(DistributionStatusEnum.ALREADY_DEPLOYED) || message.getStatus().equals(DistributionStatusEnum.ALREADY_DOWNLOADED));
+               }
+               
+               
+               // Try again to load same notif but in V2
+               ASDCController asdcControllerV2 = new ASDCController("asdc-controller1", distribClientV2);
+               asdcControllerV2.initASDC();
+               asdcControllerV2.treatNotification(notifDataV2);
+               
+               for (IDistributionStatusMessage message:distribClientV2.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:"+message.getArtifactURL()+", Value:"+message.getStatus().name());
+                       assertTrue(message.getStatus().equals(DistributionStatusEnum.DEPLOY_OK) || message.getStatus().equals(DistributionStatusEnum.DOWNLOAD_OK));
+               }
+               
+               this.validateVnfResource(notifDataV2,distribClientV2.getListVFModuleMetaData());
+               
+               
+               // Try again to load same notif + Script + Volume artifacts and in service V3
+               ASDCController asdcControllerV3 = new ASDCController("asdc-controller1", distribClientV3);
+               asdcControllerV3.initASDC();
+               asdcControllerV3.treatNotification(notifDataV3);
+               
+               for (IDistributionStatusMessage message:distribClientV3.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:"+message.getArtifactURL()+", Value:"+message.getStatus().name());
+                       assertTrue(message.getStatus().equals(DistributionStatusEnum.DEPLOY_OK) || message.getStatus().equals(DistributionStatusEnum.DOWNLOAD_OK));
+               }
+               
+               this.validateVnfResource(notifDataV3,distribClientV3.getListVFModuleMetaData());
+               
+               // Try again to load same notif + Script + Volume artifacts and in service V4
+               ASDCController asdcControllerV4 = new ASDCController("asdc-controller1", distribClientV4);
+               asdcControllerV4.initASDC();
+               asdcControllerV4.treatNotification(notifDataV4);
+                               
+               for (IDistributionStatusMessage message:distribClientV4.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:"+message.getArtifactURL()+", Value:"+message.getStatus().name());
+                       assertTrue(message.getStatus().equals(DistributionStatusEnum.DEPLOY_OK) || message.getStatus().equals(DistributionStatusEnum.DOWNLOAD_OK));
+               }
+                               
+               this.validateVnfResource(notifDataV4,distribClientV4.getListVFModuleMetaData());
+               
+               
+               // Try again with service V5 (Nested template attached to Volume + HEat artifact not used by module), 
+               //this should force the notification DEPLOY_ERROR to be sent for this artifact
+               ASDCController asdcControllerV5 = new ASDCController("asdc-controller1", distribClientV5);
+               asdcControllerV5.initASDC();
+               asdcControllerV5.treatNotification(notifDataV5);
+                               
+               for (IDistributionStatusMessage message:distribClientV5.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:"+message.getArtifactURL()+", Value:"+message.getStatus().name());
+                       if ("cloud-nimbus.sh".equals(message.getArtifactURL())) {
+                               assertTrue(message.getStatus().equals(DistributionStatusEnum.DEPLOY_ERROR) || message.getStatus().equals(DistributionStatusEnum.DOWNLOAD_OK));
+                       } else {
+                               assertTrue(message.getStatus().equals(DistributionStatusEnum.DEPLOY_OK) || message.getStatus().equals(DistributionStatusEnum.DOWNLOAD_OK));
+                       }
+               }
+                               
+               this.validateVnfResource(notifDataV5,distribClientV5.getListVFModuleMetaData());
+               
+               
+               // Try again with demo DNS
+               ASDCController asdcControllerDNS = new ASDCController("asdc-controller1", distribClientDNS);
+               asdcControllerDNS.initASDC();
+               asdcControllerDNS.treatNotification(notifDataDNS);
+                                       
+               for (IDistributionStatusMessage message:distribClientDNS.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:"+message.getArtifactURL()+", Value:"+message.getStatus().name());
+                               assertTrue(message.getStatus().equals(DistributionStatusEnum.DEPLOY_OK) || message.getStatus().equals(DistributionStatusEnum.DOWNLOAD_OK));
+               }
+                                               
+               this.validateVnfResource(notifDataDNS,distribClientDNS.getListVFModuleMetaData());
+               
+               // Try again with demo VFW
+               ASDCController asdcControllerVFW = new ASDCController("asdc-controller1", distribClientVFW);
+               asdcControllerVFW.initASDC();
+               asdcControllerVFW.treatNotification(notifDataVFW);
+
+               for (IDistributionStatusMessage message : distribClientVFW.getDistributionMessageReceived()) {
+                       System.out.println("Message received, URL:" + message.getArtifactURL() + ", Value:" + message.getStatus().name());
+                       assertTrue(message.getStatus().equals(DistributionStatusEnum.DEPLOY_OK)
+                                               || message.getStatus().equals(DistributionStatusEnum.DOWNLOAD_OK));
+               }
+
+               this.validateVnfResource(notifDataVFW, distribClientVFW.getListVFModuleMetaData());
+
+       }
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/DistributionClientEmulator.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/DistributionClientEmulator.java
new file mode 100644 (file)
index 0000000..f2fabc0
--- /dev/null
@@ -0,0 +1,133 @@
+package org.openecomp.mso.global_tests.asdc.notif_emulator;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.commons.io.IOUtils;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.type.TypeReference;
+import org.openecomp.sdc.api.IDistributionClient;
+import org.openecomp.sdc.api.consumer.IConfiguration;
+import org.openecomp.sdc.api.consumer.IDistributionStatusMessage;
+import org.openecomp.sdc.api.consumer.INotificationCallback;
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
+import org.openecomp.sdc.api.results.IDistributionClientResult;
+import org.openecomp.sdc.impl.DistributionClientDownloadResultImpl;
+import org.openecomp.sdc.impl.DistributionClientResultImpl;
+import org.openecomp.sdc.utils.DistributionActionResultEnum;
+
+public class DistributionClientEmulator implements IDistributionClient {
+
+       private String resourcePath;
+       
+       private List<IVfModuleMetadata> listVFModuleMetaData;
+       
+       private List<IDistributionStatusMessage> distributionMessageReceived = new LinkedList<>();
+       
+       public DistributionClientEmulator(String notifFolderInResource) {
+               
+               resourcePath = notifFolderInResource;
+       }
+
+       public List<IDistributionStatusMessage> getDistributionMessageReceived() {
+               return distributionMessageReceived;
+       }
+
+       @Override
+       public List<IVfModuleMetadata> decodeVfModuleArtifact(byte[] arg0) {
+               try {
+                       listVFModuleMetaData = new ObjectMapper().readValue(arg0, new TypeReference<List<JsonVfModuleMetaData>>(){});
+                       return listVFModuleMetaData;
+                        
+               } catch (JsonParseException e) {
+                       e.printStackTrace();
+               } catch (JsonMappingException e) {
+                       e.printStackTrace();
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+               return null;
+       }
+       
+       public List<IVfModuleMetadata> getListVFModuleMetaData() {
+               return listVFModuleMetaData;
+       }
+
+       @Override
+       public IDistributionClientDownloadResult download (IArtifactInfo arg0) {
+               
+               
+               //String filename = resourcePath+"/artifacts/"+arg0.getArtifactURL();
+               String filename = arg0.getArtifactURL();
+               System.out.println("Emulating the download from resources files:"+filename);
+               InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath+"/artifacts/"+filename);
+               
+               if (inputStream == null) {
+                       System.out.println("InputStream is NULL for:"+filename);
+               }
+               try {
+                       return new DistributionClientDownloadResultImpl(DistributionActionResultEnum.SUCCESS, DistributionActionResultEnum.SUCCESS.name(),arg0.getArtifactName(),IOUtils.toByteArray(inputStream));
+               } catch (IOException e) {
+                       
+                       e.printStackTrace();
+               }
+               return null;
+       }
+
+       @Override
+       public IConfiguration getConfiguration() {
+               return null;
+       }
+
+       @Override
+       public IDistributionClientResult init(IConfiguration arg0, INotificationCallback arg1) {
+               return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name());
+       }
+
+       @Override
+       public IDistributionClientResult sendDeploymentStatus(IDistributionStatusMessage arg0) {
+               this.distributionMessageReceived.add(arg0);
+               return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name());
+       }
+
+       @Override
+       public IDistributionClientResult sendDeploymentStatus(IDistributionStatusMessage arg0, String arg1) {
+               this.distributionMessageReceived.add(arg0);
+               return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name());
+       }
+
+       @Override
+       public IDistributionClientResult sendDownloadStatus(IDistributionStatusMessage arg0) {
+               this.distributionMessageReceived.add(arg0);
+               return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name());
+       }
+
+       @Override
+       public IDistributionClientResult sendDownloadStatus(IDistributionStatusMessage arg0, String arg1) {
+               this.distributionMessageReceived.add(arg0);
+               return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name());
+       }
+
+       @Override
+       public IDistributionClientResult start() {
+               return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name());
+       }
+
+       @Override
+       public IDistributionClientResult stop() {
+               return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name());
+               
+       }
+
+       @Override
+       public IDistributionClientResult updateConfiguration(IConfiguration arg0) {
+               return new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS,DistributionActionResultEnum.SUCCESS.name());
+       }
+
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java
new file mode 100644 (file)
index 0000000..f37235b
--- /dev/null
@@ -0,0 +1,102 @@
+package org.openecomp.mso.global_tests.asdc.notif_emulator;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.annotate.JsonIgnore;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+
+public class JsonArtifactInfo implements IArtifactInfo {
+
+       @JsonIgnore
+       private Map<String,IArtifactInfo> artifactsMapByUUID = new HashMap<>();
+       
+       @JsonIgnore
+       private Map<String,Object> attributesMap = new HashMap<>();
+       
+       public JsonArtifactInfo() {
+               
+       }
+       
+       public synchronized void addArtifactToUUIDMap (List<JsonArtifactInfo> artifactList) {
+               for (JsonArtifactInfo artifact:artifactList) {
+                       artifactsMapByUUID.put(artifact.getArtifactUUID(), artifact);   
+               }
+               
+       }
+       
+       @SuppressWarnings("unused")
+       @JsonAnySetter
+       public final void setAttribute(String attrName, Object attrValue) {
+               if ((null != attrName) && (!attrName.isEmpty()) && (null != attrValue) && (null != attrValue.toString())) {
+                       this.attributesMap.put(attrName,attrValue);
+               }
+       }
+       
+       
+       
+       public Map<String, IArtifactInfo> getArtifactsMapByUUID() {
+               return artifactsMapByUUID;
+       }
+
+       @Override
+       public String getArtifactChecksum() {
+               return (String)attributesMap.get("artifactCheckSum");
+       }
+
+       @Override
+       public String getArtifactDescription() {
+               return (String)attributesMap.get("artifactDescription");
+       }
+
+       @Override
+       public String getArtifactName() {
+               return (String)attributesMap.get("artifactName");
+       }
+
+       @Override
+       public Integer getArtifactTimeout() {
+               return (Integer)attributesMap.get("artifactTimeout");
+       }
+
+       @Override
+       public String getArtifactType() {
+               return (String)attributesMap.get("artifactType");
+       }
+
+       @Override
+       public String getArtifactURL() {
+               return (String)attributesMap.get("artifactURL");
+       }
+
+       @Override
+       public String getArtifactUUID() {
+               return (String)attributesMap.get("artifactUUID");
+       }
+
+       @Override
+       public String getArtifactVersion() {
+               return (String)attributesMap.get("artifactVersion");
+       }
+
+       @Override
+       public IArtifactInfo getGeneratedArtifact () {
+               return artifactsMapByUUID.get(attributesMap.get("generatedArtifact"));
+       }
+
+       @Override
+       public List<IArtifactInfo> getRelatedArtifacts() {
+               List<IArtifactInfo> listArtifacts = new LinkedList<>();
+               List<String> uuidList = (List<String>)attributesMap.get("relatedArtifact");
+               if (uuidList != null) {
+                       for(String uuid:uuidList) {
+                               listArtifacts.add(artifactsMapByUUID.get(uuid));
+                       }
+               }
+               return listArtifacts;
+       }
+
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfoDeserializer.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfoDeserializer.java
new file mode 100644 (file)
index 0000000..6e24acc
--- /dev/null
@@ -0,0 +1,28 @@
+package org.openecomp.mso.global_tests.asdc.notif_emulator;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.map.DeserializationContext;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.type.TypeReference;
+
+public class JsonArtifactInfoDeserializer extends JsonDeserializer<List<JsonArtifactInfo>>{
+
+       @Override
+       public List<JsonArtifactInfo> deserialize(JsonParser jp, DeserializationContext ctxt)
+                       throws IOException, JsonProcessingException {
+               List<JsonArtifactInfo> jsonArtifactInfoList =  new ObjectMapper().readValue(jp, new TypeReference<List<JsonArtifactInfo>>(){}); 
+
+               // For each artifact add the list of artifact retrieved 
+               // This could be used later to index by UUID
+               for (JsonArtifactInfo artifactInfo:jsonArtifactInfoList) {
+                       artifactInfo.addArtifactToUUIDMap(jsonArtifactInfoList);
+               }
+               return jsonArtifactInfoList;
+       }
+
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonNotificationData.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonNotificationData.java
new file mode 100644 (file)
index 0000000..02ed01d
--- /dev/null
@@ -0,0 +1,108 @@
+package org.openecomp.mso.global_tests.asdc.notif_emulator;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.annotate.JsonDeserialize;
+import org.jboss.shrinkwrap.api.exporter.FileExistsException;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.INotificationData;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+
+
+public class JsonNotificationData implements INotificationData {
+
+       @JsonIgnore
+       private Map<String,Object> attributesMap = new HashMap<>();
+       
+       @JsonProperty("serviceArtifacts")
+       @JsonDeserialize(using=JsonArtifactInfoDeserializer.class)
+       private List<IArtifactInfo> serviceArtifacts;
+       
+       @JsonProperty("resources")
+       @JsonDeserialize(using=JsonResourceInfoDeserializer.class)
+       private List<IResourceInstance> resourcesList;
+       
+       public JsonNotificationData() {
+               
+       }
+               
+       /**
+        * Method instantiate a INotificationData implementation from a JSON file.
+        * 
+        * @param notifFilePath The file path in String
+        * @return A JsonNotificationData instance
+        * @throws IOException in case of the file is not readable or not accessible 
+        */
+       public static JsonNotificationData instantiateNotifFromJsonFile(String notifFilePath) throws IOException {
+               
+               InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(notifFilePath+"/notif-structure.json");
+               
+               if (is == null) {
+                       throw new FileExistsException("Resource Path does not exist: "+notifFilePath);
+               }
+               ObjectMapper mapper = new ObjectMapper();
+               return mapper.readValue(is, JsonNotificationData.class);
+       }
+       
+       @SuppressWarnings("unused")
+       @JsonAnySetter
+       public final void setAttribute(String attrName, Object attrValue) {
+               if ((null != attrName) && (!attrName.isEmpty()) && (null != attrValue) && (null != attrValue.toString())) {
+                       this.attributesMap.put(attrName,attrValue);
+               }
+       }
+
+       @Override
+       public IArtifactInfo getArtifactMetadataByUUID(String arg0) {
+               return null;
+       }
+
+       @Override
+       public String getDistributionID() {
+               return (String)this.attributesMap.get("distributionID");
+       }
+
+       @Override
+       public List<IResourceInstance> getResources() {
+               return resourcesList;
+       }
+
+       @Override
+       public List<IArtifactInfo> getServiceArtifacts() {
+               return this.serviceArtifacts;
+       }
+
+       @Override
+       public String getServiceDescription() {
+               return (String)this.attributesMap.get("serviceDescription");
+       }
+
+       @Override
+       public String getServiceInvariantUUID() {
+               return (String)this.attributesMap.get("serviceInvariantUUID");
+       }
+
+       @Override
+       public String getServiceName() {
+               return (String)this.attributesMap.get("serviceName");
+       }
+
+       @Override
+       public String getServiceUUID() {
+               return (String)this.attributesMap.get("serviceUUID");
+       }
+
+       @Override
+       public String getServiceVersion() {
+               return (String)this.attributesMap.get("serviceVersion");
+       }
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfo.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfo.java
new file mode 100644 (file)
index 0000000..e30bb5f
--- /dev/null
@@ -0,0 +1,70 @@
+package org.openecomp.mso.global_tests.asdc.notif_emulator;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonDeserialize;
+
+import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.openecomp.sdc.api.notification.IResourceInstance;
+
+public class JsonResourceInfo implements IResourceInstance {
+
+       @JsonIgnore
+       private Map<String,Object> attributesMap = new HashMap<>();
+       
+       @JsonProperty("artifacts")
+       @JsonDeserialize(using=JsonArtifactInfoDeserializer.class)
+       private List<IArtifactInfo> artifacts;
+       
+       public JsonResourceInfo() {
+       
+       }
+       
+       @Override
+       public List<IArtifactInfo> getArtifacts() {
+               return artifacts;
+       }
+
+       @Override
+       public String getResourceInstanceName() {
+               return (String)attributesMap.get("resourceInstanceName");
+       }
+
+       @Override
+       public String getResourceInvariantUUID() {
+               return (String)attributesMap.get("resourceInvariantUUID");
+       }
+
+       @Override
+       public String getResourceName() {
+               return (String)attributesMap.get("resourceName");
+       }
+
+       @Override
+       public String getResourceType() {
+               return (String)attributesMap.get("resourceType");
+       }
+
+       @Override
+       public String getResourceUUID() {
+               return (String)attributesMap.get("resourceUUID");
+       }
+
+       @Override
+       public String getResourceVersion() {
+               return (String)attributesMap.get("resourceVersion");
+       }
+       
+       @SuppressWarnings("unused")
+       @JsonAnySetter
+       public final void setAttribute(String attrName, Object attrValue) {
+               if ((null != attrName) && (!attrName.isEmpty()) && (null != attrValue) && (null != attrValue.toString())) {
+                       this.attributesMap.put(attrName,attrValue);
+               }
+       }
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfoDeserializer.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonResourceInfoDeserializer.java
new file mode 100644 (file)
index 0000000..5ff92f7
--- /dev/null
@@ -0,0 +1,23 @@
+package org.openecomp.mso.global_tests.asdc.notif_emulator;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.map.DeserializationContext;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.type.TypeReference;
+
+public class JsonResourceInfoDeserializer extends JsonDeserializer<List<JsonResourceInfo>>{
+
+       @Override
+       public List<JsonResourceInfo> deserialize(JsonParser jp, DeserializationContext ctxt)
+                       throws IOException, JsonProcessingException {
+               List<JsonResourceInfo> jsonResourceInfoList =  new ObjectMapper().readValue(jp, new TypeReference<List<JsonResourceInfo>>(){}); 
+               
+               return jsonResourceInfoList;
+       }
+
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonVfModuleMetaData.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonVfModuleMetaData.java
new file mode 100644 (file)
index 0000000..dbf953f
--- /dev/null
@@ -0,0 +1,63 @@
+package org.openecomp.mso.global_tests.asdc.notif_emulator;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.openecomp.sdc.api.notification.IVfModuleMetadata;
+
+public class JsonVfModuleMetaData implements IVfModuleMetadata {
+
+       @JsonProperty("artifacts")
+       private List<String> artifacts;
+       
+       @JsonIgnore
+       private Map<String,Object> attributesMap = new HashMap<>();
+       
+       @Override
+       public List<String> getArtifacts() {
+               return artifacts;
+       }
+
+       @Override
+       public String getVfModuleModelDescription() {
+               return (String)attributesMap.get("vfModuleModelDescription");
+       }
+
+       @Override
+       public String getVfModuleModelInvariantUUID() {
+               return (String)attributesMap.get("vfModuleModelInvariantUUID");
+       }
+
+       @Override
+       public String getVfModuleModelName() {
+               return (String)attributesMap.get("vfModuleModelName");
+       }
+
+       @Override
+       public String getVfModuleModelUUID() {
+               return (String)attributesMap.get("vfModuleModelUUID");
+       }
+
+       @Override
+       public String getVfModuleModelVersion() {
+               return (String)attributesMap.get("vfModuleModelVersion");
+       }
+
+       @Override
+       public boolean isBase() {
+               return (boolean)attributesMap.get("isBase");
+       }
+       
+       @SuppressWarnings("unused")
+       @JsonAnySetter
+       public final void setAttribute(String attrName, Object attrValue) {
+               if ((null != attrName) && (!attrName.isEmpty()) && (null != attrValue) && (null != attrValue.toString())) {
+                       this.attributesMap.put(attrName,attrValue);
+               }
+       }
+
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java
new file mode 100644 (file)
index 0000000..ebbf657
--- /dev/null
@@ -0,0 +1,147 @@
+
+package org.openecomp.mso.global_tests.jmeter;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+
+import org.apache.jmeter.engine.StandardJMeterEngine;
+import org.apache.jmeter.save.SaveService;
+import org.apache.jmeter.util.JMeterUtils;
+import org.apache.jorphan.collections.HashTree;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.container.test.api.Testable;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.Maven;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.openecomp.mso.global_tests.ArquillianPackagerForITCases;
+
+@RunWith(Arquillian.class)
+public class JMeterITCase {
+       
+       @Deployment(name="mso-api-handler-infra",testable=false)
+       public static Archive<?> createMsoApiHandlerInfraWarDeployment () {
+               System.out.println("Deploying ApiHandler Infra WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../mso-api-handlers/mso-api-handler-infra/target/", "mso-api-handler-infra*.war", "mso-api-handler-infra.war");
+       }
+       
+       @Deployment(name="mso-vnf-adapter",testable=false)
+       public static Archive<?> createMsoVnfAdapterWarDeployment () {
+               System.out.println("Deploying VNF Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-vnf-adapter/target/", "mso-vnf-adapter*.war", "mso-vnf-adapter.war");
+       }
+       
+       @Deployment(name="mso-tenant-adapter",testable=false)
+       public static Archive<?> createMsoTenantAdapterWarDeployment () {
+               System.out.println("Deploying Tenant Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-tenant-adapter/target/", "mso-tenant-adapter*.war", "mso-tenant-adapter.war");
+       }
+       
+       @Deployment(name="mso-sdnc-adapter",testable=false)
+       public static Archive<?> createMsoSdncAdapterWarDeployment () {
+               System.out.println("Deploying SDNC Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-sdnc-adapter/target/", "mso-sdnc-adapter*.war", "mso-sdnc-adapter.war");
+       }
+       
+       @Deployment(name="mso-network-adapter",testable=false)
+       public static Archive<?> createMsoNetworkAdapterWarDeployment () {
+               System.out.println("Deploying Network Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-network-adapter/target/", "mso-network-adapter*.war", "mso-network-adapter.war");
+       }
+       
+       @Deployment(name="mso-requests-db-adapter",testable=false)
+       public static Archive<?> createMsoRequestsDbAdapterWarDeployment () {
+               System.out.println("Deploying Requests DB Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-requests-db-adapter/target/", "mso-requests-db-adapter*.war", "mso-requests-db-adapter.war");
+       }
+       
+       @Deployment(name="asdc-controller",testable=true)
+       public static Archive<?> createAsdcControllerWarDeployment () {
+               System.out.println("Deploying ASDC Controller WAR with additional resources on default server");
+               
+               WebArchive warArchive = (WebArchive)ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war");
+               
+               // Add the current test class
+        JavaArchive testclasses = ShrinkWrap.create (JavaArchive.class, "testClasses.jar");
+               testclasses.addClasses(JMeterITCase.class);
+                               
+               warArchive.addAsLibraries(testclasses);
+                               
+               // BE CAREFUL a settings.xml file must be located in ${home.user}/.m2/settings.xml
+               warArchive.addAsLibraries(Maven.resolver()
+                               .resolve("org.mockito:mockito-all:1.10.19")
+                                        .withoutTransitivity ()
+                                        .asFile ());
+
+               // Take one war randomly to make arquilian happy
+
+               Testable.archiveToTest(warArchive);
+
+               
+               return warArchive;
+       }
+       
+  
+    @BeforeClass
+    public static void waitBeforeStart () throws InterruptedException {
+        System.out.println ("Executing " + JMeterITCase.class.getName ());
+    }
+
+    @Test
+       @RunAsClient()
+       public void testJMeter() throws IOException  {
+                 // JMeter Engine
+        StandardJMeterEngine jmeter = new StandardJMeterEngine();
+
+
+        // Initialize Properties, logging, locale, etc.
+        JMeterUtils.loadJMeterProperties("/tmp/apache-jmeter-2.13/bin/jmeter.properties");
+        JMeterUtils.setJMeterHome("/tmp/apache-jmeter-2.13");
+        JMeterUtils.initLogging();// you can comment this line out to see extra log messages of i.e. DEBUG level
+        JMeterUtils.initLocale();
+        
+        // Initialize JMeter SaveService
+        SaveService.loadProperties();
+
+        // Load existing .jmx Test Plan
+    
+        FileInputStream in = new FileInputStream("./src/test/resources/JMeter/MSO-Perf.jmx");
+        HashTree testPlanTree = SaveService.loadTree(in);
+        testPlanTree.getTree("test variables");
+        in.close();
+
+        // Run JMeter Test
+        jmeter.configure(testPlanTree);
+        jmeter.run();
+       }
+
+    @AfterClass
+    public static void afterArquillianTest() {
+       try {
+                       Files.move (Paths.get ("./jmeter.log"),
+                                       Paths.get ("./target/surefire-reports/jmeter.log"),
+                                       StandardCopyOption.REPLACE_EXISTING);
+                       
+               /*      Files.move (Paths.get ("./mso-perf.jtl"),
+                                       Paths.get ("./target/surefire-reports/mso-perf.log"),
+                                       StandardCopyOption.REPLACE_EXISTING);*/
+
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+    }
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java
new file mode 100644 (file)
index 0000000..68bd222
--- /dev/null
@@ -0,0 +1,88 @@
+package org.openecomp.mso.global_tests.logging;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.IOException;
+
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OperateOnDeployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.container.test.api.Testable;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.openecomp.mso.filesearching.LogFileSearching;
+import org.openecomp.mso.global_tests.ArquillianPackagerForITCases;
+
+@RunWith(Arquillian.class)
+public class LogsCheckerITCase {
+
+  
+    @BeforeClass
+    public static void waitBeforeStart () throws InterruptedException {
+        System.out.println ("Executing " + LogsCheckerITCase.class.getName ());
+      
+    }
+        
+       @Deployment(name="log-check",testable=true)
+       public static Archive<?> createAsdcControllerWarDeployment () throws Exception {
+               // Any war could be used here, we just take that one randomly
+               // Be careful some WAR does not work when being injected in JBOSS, probably due to Servlet conflict 
+               System.out.println("Deploying ASDC Controller WAR for log checker");
+               WebArchive warArchive =  (WebArchive)ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war");
+               
+               JavaArchive testclasses = ShrinkWrap.create (JavaArchive.class, "testClasses.jar");
+               
+               testclasses.addPackage("org.openecomp.mso.filesearching");
+       
+               warArchive.addAsLibraries(testclasses);
+               
+               Testable.archiveToTest(warArchive);
+               return warArchive;
+       }
+    
+       @Before
+       public void beforeEachTest() {
+               LogFileSearching.initFile("/tmp/mso-log-checker.log");
+       }
+       
+       @After
+       public void afterEachTest() {
+               LogFileSearching.closeFile();
+       }
+       
+    @Test
+       @OperateOnDeployment("log-check")
+       public void testJbossServerLog() throws IOException  {
+       
+       File serverLogs = new File("/opt/jboss/standalone/log");
+       //File serverLogs = new File("/tmp/jbosslogs/server.log");
+       
+       assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, serverLogs));
+       
+    }
+    
+    @Test
+    @OperateOnDeployment("log-check")
+       public void testMSOLog() throws IOException  {
+       //File serverLogs = new File("/opt/app/mso/jboss-eap-6.2/standalone/log/server.log");
+       File msoLogs = new File("/var/log/ecomp/MSO");
+       
+       assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, msoLogs));
+       
+    }
+    
+    
+  
+    
+}
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/soapui/SoapUiITCase.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/soapui/SoapUiITCase.java
new file mode 100644 (file)
index 0000000..ac730c5
--- /dev/null
@@ -0,0 +1,298 @@
+
+package org.openecomp.mso.global_tests.soapui;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Map;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.openecomp.mso.global_tests.ArquillianPackagerForITCases;
+import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepResult;
+import com.eviware.soapui.model.testsuite.TestAssertion;
+import com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus;
+import com.eviware.soapui.tools.SoapUITestCaseRunner;
+
+@RunWith(Arquillian.class)
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class SoapUiITCase {
+
+       private static String jbossHost=System.getProperty("docker.hostname");
+       private static String jbossPort="18080";
+       
+       @Deployment(name="mso-api-handler-infra",testable=false)
+       public static Archive<?> createMsoApiHandlerInfraWarDeployment () {
+               System.out.println("Deploying ApiHandler Infra WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../mso-api-handlers/mso-api-handler-infra/target/", "mso-api-handler-infra*.war", "mso-api-handler-infra.war");
+       }
+       
+       @Deployment(name="mso-vnf-adapter",testable=false)
+       public static Archive<?> createMsoVnfAdapterWarDeployment () {
+               System.out.println("Deploying VNF Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-vnf-adapter/target/", "mso-vnf-adapter*.war", "mso-vnf-adapter.war");
+       }
+       
+       @Deployment(name="mso-tenant-adapter",testable=false)
+       public static Archive<?> createMsoTenantAdapterWarDeployment () {
+               System.out.println("Deploying Tenant Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-tenant-adapter/target/", "mso-tenant-adapter*.war", "mso-tenant-adapter.war");
+       }
+       
+       @Deployment(name="mso-sdnc-adapter",testable=false)
+       public static Archive<?> createMsoSdncAdapterWarDeployment () {
+               System.out.println("Deploying SDNC Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-sdnc-adapter/target/", "mso-sdnc-adapter*.war", "mso-sdnc-adapter.war");
+       }
+       
+       @Deployment(name="mso-network-adapter",testable=false)
+       public static Archive<?> createMsoNetworkAdapterWarDeployment () {
+               System.out.println("Deploying Network Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-network-adapter/target/", "mso-network-adapter*.war", "mso-network-adapter.war");
+       }
+       
+       @Deployment(name="mso-requests-db-adapter",testable=false)
+       public static Archive<?> createMsoRequestsDbAdapterWarDeployment () {
+               System.out.println("Deploying Requests DB Adapter WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-requests-db-adapter/target/", "mso-requests-db-adapter*.war", "mso-requests-db-adapter.war");
+       }
+       
+       @Deployment(name="asdc-controller",testable=true)
+       public static Archive<?> createAsdcControllerWarDeployment () {
+               System.out.println("Deploying ASDC Controller WAR with additional resources on default server");
+               
+               WebArchive warArchive = (WebArchive)ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war");
+               
+               // Take one war randomly to make arquilian happy
+
+                       
+               return warArchive;
+       }
+       
+       @Deployment(name="gammaBPMN",testable=false)
+       public static Archive<?> createGammaBPMNDeployment () {
+               System.out.println("Deploying Gamma BPMN WAR on default server");
+               return ArquillianPackagerForITCases.createPackageFromExistingOne("../../bpmn/MSOGammaBPMN/target/", "MSOGammaBPMN*.war", "MSOGammaBPMN.war");
+       }
+/*     
+    @Deployment(name = "SoapUIMocks", testable = false)
+    public static Archive <?> createSoapUIMocksWarDeployment () {
+
+        File file = new File ("src/test/resources/SoapUIMocks.war");
+
+        WebArchive archive = ShrinkWrap.create (WebArchive.class, "SoapUIMocks.war");
+
+        archive.merge ((ShrinkWrap.createFromZipFile (WebArchive.class, file)));
+
+        return archive;
+    }*/
+
+    @BeforeClass
+    public static void waitBeforeStart () throws InterruptedException {
+       Thread.currentThread().sleep(10000);
+        System.out.println ("Executing " + SoapUiITCase.class.getName ());
+       
+    }
+
+    @Test
+    @RunAsClient
+    public void test01Healthcheck () {
+        SoapUITestCaseRunner runner = new SoapUITestCaseRunner ();
+        runner.setSettingsFile("./src/test/resources/SoapUI/soapui-settings.xml");
+        runner.setJUnitReport(true);
+        runner.setProjectFile ("./src/test/resources/SoapUI/Healthcheck-soapui-project.xml");
+        runner.setOutputFolder ("./target/surefire-reports");
+        String[] properties = new String[7];
+        properties[0] = "apihhost="+jbossHost+":"+jbossPort;
+        properties[1] = "jrahost="+jbossHost+":"+jbossPort;
+        properties[2] = "userlogin=sitecontrol";
+        properties[3] = "userpassword=Domain2.0!";
+        properties[4] = "bpmnhost="+jbossHost+":"+jbossPort;
+        properties[5] = "sitename=mso-docker";
+        properties[6] = "enableBpmn=false";
+        runner.setProjectProperties (properties);
+
+        try {
+            runner.setTestSuite ("Healthcheck TestSuite");
+            runner.run ();
+            Map<TestAssertion,WsdlTestStepResult> mapResult= runner.getAssertionResults();
+            for(Map.Entry<TestAssertion,WsdlTestStepResult> entry : mapResult.entrySet()) {
+                assertTrue(entry.getValue().getStatus().equals(TestStepStatus.OK));
+            }
+            assertTrue (runner.getFailedTests ().size () == 0);
+
+        } catch (Exception e) {
+            e.printStackTrace ();
+            fail("Failure in SOAPUI Healthcheck");
+        }
+    }
+
+    @Test
+    @RunAsClient
+    public void test03StartNetworkAdapter () {
+       SoapUITestCaseRunner runner = new SoapUITestCaseRunner ();
+        runner.setSettingsFile("./src/test/resources/SoapUI/soapui-settings.xml");
+        runner.setJUnitReport(true);
+       runner.setProjectFile ("./src/test/resources/SoapUI/MSONetworkAdapter-soapui-project.xml");
+       runner.setOutputFolder ("./target/surefire-reports");
+       String[] properties = new String[1];
+       properties[0] = "host="+jbossHost+":"+jbossPort;
+       runner.setProjectProperties (properties);
+
+
+       try {
+               runner.setTestSuite ("MsoNetworkAdapter TestSuite");
+               runner.run ();
+
+               Map<TestAssertion,WsdlTestStepResult> mapResult= runner.getAssertionResults();
+               for(Map.Entry<TestAssertion,WsdlTestStepResult> entry : mapResult.entrySet()) {
+                       assertTrue(entry.getValue().getStatus().equals(TestStepStatus.OK));
+               }
+               assertTrue (runner.getFailedTests ().size () == 0);
+
+       } catch (Exception e) {
+            e.printStackTrace ();
+               fail("Failure in SOAPUI NetworkAdapter");
+       }
+    }
+
+
+    @Test
+    @RunAsClient
+    public void test04StartVnfAdapter () {
+        SoapUITestCaseRunner runner = new SoapUITestCaseRunner ();
+        runner.setSettingsFile("./src/test/resources/SoapUI/soapui-settings.xml");
+        runner.setJUnitReport(true);
+        runner.setProjectFile ("./src/test/resources/SoapUI/MSOVnfAdapter-soapui-project.xml");
+        runner.setOutputFolder ("./target/surefire-reports");
+        String[] properties = new String[1];
+        properties[0] = "host="+jbossHost+":"+jbossPort;
+        runner.setProjectProperties (properties);
+
+        try {
+            runner.setTestSuite ("MsoVnfAdapter TestSuite");
+            runner.run ();
+
+            Map<TestAssertion,WsdlTestStepResult> mapResult= runner.getAssertionResults();
+            for(Map.Entry<TestAssertion,WsdlTestStepResult> entry : mapResult.entrySet()) {
+                assertTrue(entry.getValue().getStatus().equals(TestStepStatus.OK));
+            }
+            assertTrue (runner.getFailedTests ().size () == 0);
+
+        } catch (Exception e) {
+            e.printStackTrace ();
+            fail("Failure in SOAPUI VnfAdapter");
+        }
+    }
+
+
+    @Test
+    @RunAsClient
+    public void test05StartTenantAdapter () {
+        SoapUITestCaseRunner runner = new SoapUITestCaseRunner ();
+        runner.setSettingsFile("./src/test/resources/SoapUI/soapui-settings.xml");
+        runner.setJUnitReport(true);
+        runner.setProjectFile ("./src/test/resources/SoapUI/MSOTenantAdapter-soapui-project.xml");
+        runner.setOutputFolder ("./target/surefire-reports");
+        String[] properties = new String[3];
+        properties[0] = "host="+jbossHost+":"+jbossPort;
+        properties[1] = "user-bpel=BPELClient";
+        properties[2] = "password-bpel=password1$";
+        runner.setProjectProperties (properties);
+
+        try {
+            runner.setTestSuite ("MsoTenantAdapter TestSuite");
+            runner.run ();
+
+            Map<TestAssertion,WsdlTestStepResult> mapResult= runner.getAssertionResults();
+            for(Map.Entry<TestAssertion,WsdlTestStepResult> entry : mapResult.entrySet()) {
+                assertTrue(entry.getValue().getStatus().equals(TestStepStatus.OK));
+            }
+            assertTrue (runner.getFailedTests ().size () == 0);
+
+        } catch (Exception e) {
+            e.printStackTrace ();
+            fail("Failure in SOAPUI TenantAdapter");
+        }
+    }
+
+
+    @Test
+    @RunAsClient
+    public void test06StartRequestDBAdapter () {
+        SoapUITestCaseRunner runner = new SoapUITestCaseRunner ();
+        runner.setSettingsFile("./src/test/resources/SoapUI/soapui-settings.xml");
+        runner.setJUnitReport(true);
+        runner.setProjectFile ("./src/test/resources/SoapUI/MsoRequestDB-soapui-project.xml");
+        runner.setOutputFolder ("./target/surefire-reports");
+        String[] properties = new String[3];
+        properties[0] = "host="+jbossHost+":"+jbossPort;
+        properties[1] = "user-infraportal=InfraPortalClient";
+        properties[2] = "password-infraportal=password1$";
+        runner.setProjectProperties (properties);
+
+
+        try {
+            runner.setTestSuite ("MsoRequestsDbAdapterImplPortBinding TestSuite");
+            runner.run ();
+
+            Map<TestAssertion,WsdlTestStepResult> mapResult= runner.getAssertionResults();
+            for(Map.Entry<TestAssertion,WsdlTestStepResult> entry : mapResult.entrySet()) {
+                assertTrue(entry.getValue().getStatus().equals(TestStepStatus.OK));
+            }
+            assertTrue (runner.getFailedTests ().size () == 0);
+
+        } catch (Exception e) {
+            e.printStackTrace ();
+               fail("Failure in SOAPUI RequestDB adapter");
+        }
+    }
+
+    @Test
+    @RunAsClient
+    public void test07MsoConfigEndpoints () {
+        SoapUITestCaseRunner runner = new SoapUITestCaseRunner ();
+               runner.setSettingsFile("./src/test/resources/SoapUI/soapui-settings.xml");
+               runner.setJUnitReport(true);
+        runner.setProjectFile ("./src/test/resources/SoapUI/MSOConfig-soapui-project.xml");
+        runner.setOutputFolder ("./target/surefire-reports");
+        String[] properties = new String[3];
+        properties[0] = "host="+jbossHost+":"+jbossPort;
+        properties[1] = "user-infraportal=InfraPortalClient";
+        properties[2] = "password-infraportal=password1$";
+        runner.setProjectProperties (properties);
+
+
+        try {
+            runner.setTestSuite ("test_config_endpoints TestSuite");
+            runner.run ();
+
+            Map<TestAssertion,WsdlTestStepResult> mapResult= runner.getAssertionResults();
+            for(Map.Entry<TestAssertion,WsdlTestStepResult> entry : mapResult.entrySet()) {
+                assertTrue(entry.getValue().getStatus().equals(TestStepStatus.OK));
+            }
+            assertTrue (runner.getFailedTests ().size () == 0);
+
+        } catch (Exception e) {
+            e.printStackTrace ();
+               fail("Failure in SOAPUI MSOConfig Endpoints");
+        }
+    }
+}
diff --git a/packages/arquillian-unit-tests/src/test/resources/JMeter/MSO-Perf.jmx b/packages/arquillian-unit-tests/src/test/resources/JMeter/MSO-Perf.jmx
new file mode 100644 (file)
index 0000000..4d7e95c
--- /dev/null
@@ -0,0 +1,866 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13 r1665067">
+  <hashTree>
+    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
+      <stringProp name="TestPlan.comments"></stringProp>
+      <boolProp name="TestPlan.functional_mode">false</boolProp>
+      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
+      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+        <collectionProp name="Arguments.arguments"/>
+      </elementProp>
+      <stringProp name="TestPlan.user_define_classpath"></stringProp>
+    </TestPlan>
+    <hashTree>
+      <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="Test variables" enabled="true">
+        <collectionProp name="Arguments.arguments">
+          <elementProp name="MSO_HOST" elementType="Argument">
+            <stringProp name="Argument.name">MSO_HOST</stringProp>
+            <stringProp name="Argument.value">localhost</stringProp>
+            <stringProp name="Argument.desc">The host/ip where to send the MSO queries</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+          <elementProp name="MSO_PORT" elementType="Argument">
+            <stringProp name="Argument.name">MSO_PORT</stringProp>
+            <stringProp name="Argument.value">18080</stringProp>
+            <stringProp name="Argument.desc">The port where to send the mso queries</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+          <elementProp name="USER_CSI" elementType="Argument">
+            <stringProp name="Argument.name">USER_CSI</stringProp>
+            <stringProp name="Argument.value">CSIClient</stringProp>
+            <stringProp name="Argument.desc">The csi queriy user to use</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+          <elementProp name="PASSWORD_CSI" elementType="Argument">
+            <stringProp name="Argument.name">PASSWORD_CSI</stringProp>
+            <stringProp name="Argument.value">password1$</stringProp>
+            <stringProp name="Argument.desc">The csi query password to use</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+          <elementProp name="USER_GUI" elementType="Argument">
+            <stringProp name="Argument.name">USER_GUI</stringProp>
+            <stringProp name="Argument.value">GUIClient</stringProp>
+            <stringProp name="Argument.desc">The gui queriy user to use</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+          <elementProp name="PASSWORD_GUI" elementType="Argument">
+            <stringProp name="Argument.name">PASSWORD_GUI</stringProp>
+            <stringProp name="Argument.value">password1$</stringProp>
+            <stringProp name="Argument.desc">The gui query password to use</stringProp>
+            <stringProp name="Argument.metadata">=</stringProp>
+          </elementProp>
+        </collectionProp>
+      </Arguments>
+      <hashTree/>
+      <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
+        <collectionProp name="AuthManager.auth_list">
+          <elementProp name="" elementType="Authorization">
+            <stringProp name="Authorization.url">http://${MSO_HOST}:${MSO_PORT}/ecomp/mso/v1/services/</stringProp>
+            <stringProp name="Authorization.username">${USER_CSI}</stringProp>
+            <stringProp name="Authorization.password">${PASSWORD_CSI}</stringProp>
+            <stringProp name="Authorization.domain"></stringProp>
+            <stringProp name="Authorization.realm"></stringProp>
+          </elementProp>
+          <elementProp name="" elementType="Authorization">
+            <stringProp name="Authorization.url">http://${MSO_HOST}:${MSO_PORT}/ecomp/mso/v2/services/features/</stringProp>
+            <stringProp name="Authorization.username">${USER_GUI}</stringProp>
+            <stringProp name="Authorization.password">${PASSWORD_GUI}</stringProp>
+            <stringProp name="Authorization.domain"></stringProp>
+            <stringProp name="Authorization.realm"></stringProp>
+          </elementProp>
+          <elementProp name="" elementType="Authorization">
+            <stringProp name="Authorization.url">http://${MSO_HOST}:${MSO_PORT}/ecomp/mso/v1/requests/services/</stringProp>
+            <stringProp name="Authorization.username">${USER_GUI}</stringProp>
+            <stringProp name="Authorization.password">${PASSWORD_GUI}</stringProp>
+            <stringProp name="Authorization.domain"></stringProp>
+            <stringProp name="Authorization.realm"></stringProp>
+          </elementProp>
+          <elementProp name="" elementType="Authorization">
+            <stringProp name="Authorization.url">http://${MSO_HOST}:${MSO_PORT}/ecomp/mso/v1/requests/services/features</stringProp>
+            <stringProp name="Authorization.username">${USER_GUI}</stringProp>
+            <stringProp name="Authorization.password">${PASSWORD_GUI}</stringProp>
+            <stringProp name="Authorization.domain"></stringProp>
+            <stringProp name="Authorization.realm"></stringProp>
+          </elementProp>
+          <elementProp name="" elementType="Authorization">
+            <stringProp name="Authorization.url">http://${MSO_HOST}:${MSO_PORT}/ecomp/mso/v1/requests/</stringProp>
+            <stringProp name="Authorization.username">${USER_GUI}</stringProp>
+            <stringProp name="Authorization.password">${PASSWORD_GUI}</stringProp>
+            <stringProp name="Authorization.domain"></stringProp>
+            <stringProp name="Authorization.realm"></stringProp>
+          </elementProp>
+        </collectionProp>
+      </AuthManager>
+      <hashTree/>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="ApiHandler Thread Group" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">1000</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">60</stringProp>
+        <longProp name="ThreadGroup.start_time">1448375429000</longProp>
+        <longProp name="ThreadGroup.end_time">1448375429000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="request-id increment" enabled="true">
+          <stringProp name="CounterConfig.start">0</stringProp>
+          <stringProp name="CounterConfig.end"></stringProp>
+          <stringProp name="CounterConfig.incr">1</stringProp>
+          <stringProp name="CounterConfig.name">REQUEST_ID</stringProp>
+          <stringProp name="CounterConfig.format"></stringProp>
+          <boolProp name="CounterConfig.per_user">false</boolProp>
+        </CounterConfig>
+        <hashTree/>
+        <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="service-id increment" enabled="true">
+          <stringProp name="CounterConfig.start">0</stringProp>
+          <stringProp name="CounterConfig.end"></stringProp>
+          <stringProp name="CounterConfig.incr">1</stringProp>
+          <stringProp name="CounterConfig.name">SERVICE_ID</stringProp>
+          <stringProp name="CounterConfig.format"></stringProp>
+          <boolProp name="CounterConfig.per_user">false</boolProp>
+        </CounterConfig>
+        <hashTree/>
+        <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="feature-id increment" enabled="true">
+          <stringProp name="CounterConfig.start">0</stringProp>
+          <stringProp name="CounterConfig.end"></stringProp>
+          <stringProp name="CounterConfig.incr">1</stringProp>
+          <stringProp name="CounterConfig.name">FEATURE_ID</stringProp>
+          <stringProp name="CounterConfig.format"></stringProp>
+          <boolProp name="CounterConfig.per_user">false</boolProp>
+        </CounterConfig>
+        <hashTree/>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="REST POST Service Request" enabled="true">
+          <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
+            <collectionProp name="Arguments.arguments">
+              <elementProp name="" elementType="HTTPArgument">
+                <boolProp name="HTTPArgument.always_encode">false</boolProp>
+                <stringProp name="Argument.value">&lt;service-request xmlns=&quot;http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1&quot; xmlns:msolayer3=&quot;http://ecomp.att.com/mso/request/layer3/schema/v1&quot; xmlns:msoservtypes=&quot;http://ecomp.att.com/mso/request/types/v1&quot;&gt;&#xd;
+&lt;msoservtypes:request-information&gt;&#xd;
+&lt;msoservtypes:request-id&gt;test${REQUEST_ID}-service&lt;/msoservtypes:request-id&gt;&#xd;
+&lt;msoservtypes:request-action&gt;Layer3ServiceActivateRequest&lt;/msoservtypes:request-action&gt;&#xd;
+&lt;msoservtypes:source&gt;OMX&lt;/msoservtypes:source&gt;&#xd;
+&lt;msoservtypes:notification-url&gt;https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws&lt;/msoservtypes:notification-url&gt;&#xd;
+&lt;msoservtypes:order-number&gt;5051560&lt;/msoservtypes:order-number&gt;&#xd;
+&lt;msoservtypes:order-version&gt;1&lt;/msoservtypes:order-version&gt;&#xd;
+&lt;/msoservtypes:request-information&gt;&#xd;
+&lt;msoservtypes:service-information&gt;&#xd;
+&lt;msoservtypes:service-type&gt;SDN-ETHERNET-INTERNET&lt;/msoservtypes:service-type&gt;&#xd;
+&lt;msoservtypes:service-instance-id&gt;serv-id${SERVICE_ID}&lt;/msoservtypes:service-instance-id&gt;&#xd;
+&lt;msoservtypes:subscriber-name&gt;ST E2E Test50565_13000050565&lt;/msoservtypes:subscriber-name&gt;&#xd;
+&lt;/msoservtypes:service-information&gt;&#xd;
+&lt;service-parameters&gt;&#xd;
+&lt;msolayer3:l2-homing-information&gt;&#xd;
+&lt;msolayer3:evc-name&gt;AS/VLXM/003717//SW&lt;/msolayer3:evc-name&gt;&#xd;
+&lt;msolayer3:topology&gt;MultiPoint&lt;/msolayer3:topology&gt;&#xd;
+&lt;msolayer3:preferred-aic-clli&gt;MTSNJA4LCP1&lt;/msolayer3:preferred-aic-clli&gt;&#xd;
+&lt;/msolayer3:l2-homing-information&gt;&#xd;
+&lt;msolayer3:internet-service-information&gt;&#xd;
+&lt;msolayer3:internet-evc-access-information&gt;&#xd;
+&lt;msolayer3:internet-evc-speed-value&gt;8&lt;/msolayer3:internet-evc-speed-value&gt;&#xd;
+&lt;msolayer3:internet-evc-speed-units&gt;Mbps&lt;/msolayer3:internet-evc-speed-units&gt;&#xd;
+&lt;msolayer3:ip-version&gt;ds&lt;/msolayer3:ip-version&gt;&#xd;
+&lt;/msolayer3:internet-evc-access-information&gt;&#xd;
+&lt;msolayer3:vr-lan&gt;&#xd;
+&lt;msolayer3:routing-protocol&gt;none&lt;/msolayer3:routing-protocol&gt;&#xd;
+&lt;msolayer3:vr-lan-interface&gt;&#xd;
+&lt;msolayer3:vr-designation&gt;primary&lt;/msolayer3:vr-designation&gt;&#xd;
+&lt;msolayer3:v4-vr-lan-prefix&gt;10.172.125.0&lt;/msolayer3:v4-vr-lan-prefix&gt;&#xd;
+&lt;msolayer3:v4-vr-lan-prefix-length&gt;28&lt;/msolayer3:v4-vr-lan-prefix-length&gt;&#xd;
+&lt;msolayer3:v6-vr-lan-prefix&gt;2001:112a:86c6:0045:1007:8a5d:0412:9179&lt;/msolayer3:v6-vr-lan-prefix&gt;&#xd;
+&lt;msolayer3:v6-vr-lan-prefix-length&gt;64&lt;/msolayer3:v6-vr-lan-prefix-length&gt;&#xd;
+&lt;msolayer3:v4-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:t-provided-v4-lan-public-prefixes&gt;&#xd;
+&lt;msolayer3:request-index&gt;1&lt;/msolayer3:request-index&gt;&#xd;
+&lt;msolayer3:v4-lan-public-prefix&gt;18.181.120.12&lt;/msolayer3:v4-lan-public-prefix&gt;&#xd;
+&lt;msolayer3:v4-lan-public-prefix-length&gt;28&lt;/msolayer3:v4-lan-public-prefix-length&gt;&#xd;
+&lt;/msolayer3:t-provided-v4-lan-public-prefixes&gt;&#xd;
+&lt;/msolayer3:v4-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:v6-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:t-provided-v6-lan-public-prefixes&gt;&#xd;
+&lt;msolayer3:request-index&gt;1&lt;/msolayer3:request-index&gt;&#xd;
+&lt;msolayer3:v6-lan-public-prefix&gt;2022:0cf7:87a6:0048:1008:8a4c:0373:1048&lt;/msolayer3:v6-lan-public-prefix&gt;&#xd;
+&lt;msolayer3:v6-lan-public-prefix-length&gt;64&lt;/msolayer3:v6-lan-public-prefix-length&gt;&#xd;
+&lt;/msolayer3:t-provided-v6-lan-public-prefixes&gt;&#xd;
+&lt;/msolayer3:v6-public-lan-prefixes&gt;&#xd;
+&#xd;
+&lt;msolayer3:dhcp&gt;&#xd;
+&lt;msolayer3:v4-dhcp-server-enabled&gt;Y&lt;/msolayer3:v4-dhcp-server-enabled&gt;&#xd;
+&lt;msolayer3:v6-dhcp-server-enabled&gt;Y&lt;/msolayer3:v6-dhcp-server-enabled&gt;&#xd;
+&lt;msolayer3:use-v4-default-pool&gt;N&lt;/msolayer3:use-v4-default-pool&gt;&#xd;
+&lt;msolayer3:use-v6-default-pool&gt;N&lt;/msolayer3:use-v6-default-pool&gt;&#xd;
+&lt;/msolayer3:dhcp&gt;&#xd;
+&lt;msolayer3:pat&gt;&#xd;
+&lt;msolayer3:v4-pat-enabled&gt;Y&lt;/msolayer3:v4-pat-enabled&gt;&#xd;
+&lt;msolayer3:use-v4-default-pool&gt;N&lt;/msolayer3:use-v4-default-pool&gt;&#xd;
+&lt;/msolayer3:pat&gt;&#xd;
+&lt;msolayer3:firewall-lite&gt;&#xd;
+&lt;msolayer3:stateful-firewall-lite-v4-enabled&gt;Y&lt;/msolayer3:stateful-firewall-lite-v4-enabled&gt;&#xd;
+&lt;msolayer3:stateful-firewall-lite-v6-enabled&gt;Y&lt;/msolayer3:stateful-firewall-lite-v6-enabled&gt;&#xd;
+&lt;/msolayer3:firewall-lite&gt;&#xd;
+&lt;/msolayer3:vr-lan-interface&gt;&#xd;
+&lt;/msolayer3:vr-lan&gt;&#xd;
+&lt;/msolayer3:internet-service-information&gt;&#xd;
+&lt;/service-parameters&gt;&#xd;
+&lt;/service-request&gt;</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">${MSO_HOST}</stringProp>
+          <stringProp name="HTTPSampler.port">${MSO_PORT}</stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">10000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+          <stringProp name="HTTPSampler.protocol"></stringProp>
+          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
+          <stringProp name="HTTPSampler.path">/ecomp/mso/v1/services/</stringProp>
+          <stringProp name="HTTPSampler.method">POST</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
+          <boolProp name="HTTPSampler.monitor">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+        </HTTPSamplerProxy>
+        <hashTree>
+          <BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
+            <stringProp name="filename"></stringProp>
+            <stringProp name="parameters"></stringProp>
+            <boolProp name="resetInterpreter">false</boolProp>
+            <stringProp name="script">if (prev.getResponseCode().equals(&quot;500&quot;) == true) { 
+    prev.setResponseOK();  
+
+    /* the same is 
+    prev.setSuccessful(true);
+    prev.setResponseCodeOK();
+    prev.setResponseMessageOK();
+    */
+}</stringProp>
+          </BeanShellPostProcessor>
+          <hashTree/>
+        </hashTree>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="REST POST Feature Request" enabled="true">
+          <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
+            <collectionProp name="Arguments.arguments">
+              <elementProp name="" elementType="HTTPArgument">
+                <boolProp name="HTTPArgument.always_encode">false</boolProp>
+                <stringProp name="Argument.value">&lt;feature-request&#xd;
+       xmlns=&quot;http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1&quot;&#xd;
+       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:msolayer3=&quot;http://ecomp.att.com/mso/request/layer3/schema/v1&quot;&#xd;
+       xmlns:msoservtypes=&quot;http://ecomp.att.com/mso/request/types/v1&quot;&gt;&#xd;
+       &lt;msoservtypes:request-information&gt;&#xd;
+               &lt;msoservtypes:request-id&gt;test${REQUEST_ID}-feature&lt;/msoservtypes:request-id&gt;&#xd;
+               &lt;msoservtypes:request-action&gt;ChangeFeatureActivateRequest&lt;/msoservtypes:request-action&gt;&#xd;
+               &lt;msoservtypes:source&gt;OMX&lt;/msoservtypes:source&gt;&#xd;
+               &lt;msoservtypes:notification-url&gt;https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws&lt;/msoservtypes:notification-url&gt;&#xd;
+               &lt;msoservtypes:order-number&gt;5051560&lt;/msoservtypes:order-number&gt;&#xd;
+               &lt;msoservtypes:order-version&gt;1&lt;/msoservtypes:order-version&gt;&#xd;
+       &lt;/msoservtypes:request-information&gt;&#xd;
+       &lt;msoservtypes:service-information&gt;&#xd;
+               &lt;msoservtypes:service-type&gt;SDN-ETHERNET-INTERNET&lt;/msoservtypes:service-type&gt;&#xd;
+               &lt;msoservtypes:service-instance-id&gt;serv-id${SERVICE_ID}&lt;/msoservtypes:service-instance-id&gt;&#xd;
+               &lt;msoservtypes:subscriber-name&gt;ST E2E Test50565_13000050565&lt;/msoservtypes:subscriber-name&gt;&#xd;
+       &lt;/msoservtypes:service-information&gt;&#xd;
+       &lt;msoservtypes:feature-information&gt;&#xd;
+               &lt;msoservtypes:feature-type&gt;FIREWALL-LITE&lt;/msoservtypes:feature-type&gt;&#xd;
+               &lt;msoservtypes:feature-instance-id&gt;feature-id${FEATURE_ID}&lt;/msoservtypes:feature-instance-id&gt;&#xd;
+               &lt;msoservtypes:feature-yang-model&gt;ST E2E Test50565_13000050565&lt;/msoservtypes:feature-yang-model&gt;&#xd;
+       &lt;/msoservtypes:feature-information&gt;&#xd;
+       &lt;/feature-request&gt;&#xd;
+</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">${MSO_HOST}</stringProp>
+          <stringProp name="HTTPSampler.port">${MSO_PORT}</stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">10000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+          <stringProp name="HTTPSampler.protocol"></stringProp>
+          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
+          <stringProp name="HTTPSampler.path">/ecomp/mso/v2/services/features/</stringProp>
+          <stringProp name="HTTPSampler.method">POST</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
+          <boolProp name="HTTPSampler.monitor">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+        </HTTPSamplerProxy>
+        <hashTree>
+          <BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
+            <stringProp name="filename"></stringProp>
+            <stringProp name="parameters"></stringProp>
+            <boolProp name="resetInterpreter">false</boolProp>
+            <stringProp name="script">if (prev.getResponseCode().equals(&quot;500&quot;) == true) { 
+    prev.setResponseOK();  
+
+    /* the same is 
+    prev.setSuccessful(true);
+    prev.setResponseCodeOK();
+    prev.setResponseMessageOK();
+    */
+}</stringProp>
+          </BeanShellPostProcessor>
+          <hashTree/>
+        </hashTree>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="REST GET Service Request on RequestID" enabled="true">
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">${MSO_HOST}</stringProp>
+          <stringProp name="HTTPSampler.port">${MSO_PORT}</stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">10000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+          <stringProp name="HTTPSampler.protocol"></stringProp>
+          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
+          <stringProp name="HTTPSampler.path">/ecomp/mso/v1/requests/test${REQUEST_ID}-service</stringProp>
+          <stringProp name="HTTPSampler.method">GET</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
+          <boolProp name="HTTPSampler.monitor">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+        </HTTPSamplerProxy>
+        <hashTree/>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="REST GET Feature Request on RequestID" enabled="true">
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">${MSO_HOST}</stringProp>
+          <stringProp name="HTTPSampler.port">${MSO_PORT}</stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">10000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+          <stringProp name="HTTPSampler.protocol"></stringProp>
+          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
+          <stringProp name="HTTPSampler.path">/ecomp/mso/v1/requests/test${REQUEST_ID}-feature</stringProp>
+          <stringProp name="HTTPSampler.method">GET</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
+          <boolProp name="HTTPSampler.monitor">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+        </HTTPSamplerProxy>
+        <hashTree/>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="REST GET Feature Request on ServiceID" enabled="true">
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">${MSO_HOST}</stringProp>
+          <stringProp name="HTTPSampler.port">${MSO_PORT}</stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">10000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+          <stringProp name="HTTPSampler.protocol"></stringProp>
+          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
+          <stringProp name="HTTPSampler.path">/ecomp/mso/v1/requests/services/serv-id${SERVICE_ID}</stringProp>
+          <stringProp name="HTTPSampler.method">GET</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
+          <boolProp name="HTTPSampler.monitor">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+        </HTTPSamplerProxy>
+        <hashTree/>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="REST GET Feature Request on FeatureID" enabled="true">
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+            <collectionProp name="Arguments.arguments"/>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">${MSO_HOST}</stringProp>
+          <stringProp name="HTTPSampler.port">${MSO_PORT}</stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">10000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+          <stringProp name="HTTPSampler.protocol"></stringProp>
+          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
+          <stringProp name="HTTPSampler.path">/ecomp/mso/v1/requests/services/features/feature-id${FEATURE_ID}</stringProp>
+          <stringProp name="HTTPSampler.method">GET</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
+          <boolProp name="HTTPSampler.monitor">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+        </HTTPSamplerProxy>
+        <hashTree/>
+        <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>false</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <threadCounts>true</threadCounts>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+          <boolProp name="ResultCollector.success_only_logging">true</boolProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="StatGraphVisualizer" testclass="ResultCollector" testname="Aggregate Graph" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <threadCounts>true</threadCounts>
+            </value>
+          </objProp>
+          <stringProp name="filename">/tmp/mso-perf.jtl</stringProp>
+          <boolProp name="ResultCollector.success_only_logging">true</boolProp>
+        </ResultCollector>
+        <hashTree/>
+      </hashTree>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="ApiHandler Homing Thread Group" enabled="false">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">1</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">60</stringProp>
+        <longProp name="ThreadGroup.start_time">1448375429000</longProp>
+        <longProp name="ThreadGroup.end_time">1448375429000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="service-id increment" enabled="true">
+          <stringProp name="CounterConfig.start">0</stringProp>
+          <stringProp name="CounterConfig.end"></stringProp>
+          <stringProp name="CounterConfig.incr">1</stringProp>
+          <stringProp name="CounterConfig.name">SERVICE_ID</stringProp>
+          <stringProp name="CounterConfig.format"></stringProp>
+          <boolProp name="CounterConfig.per_user">false</boolProp>
+        </CounterConfig>
+        <hashTree/>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="REST Service Request" enabled="true">
+          <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
+            <collectionProp name="Arguments.arguments">
+              <elementProp name="" elementType="HTTPArgument">
+                <boolProp name="HTTPArgument.always_encode">false</boolProp>
+                <stringProp name="Argument.value">&lt;service-request xmlns=&quot;http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1&quot; xmlns:msolayer3=&quot;http://ecomp.att.com/mso/request/layer3/schema/v1&quot; xmlns:msoservtypes=&quot;http://ecomp.att.com/mso/request/types/v1&quot;&gt;&#xd;
+&lt;msoservtypes:request-information&gt;&#xd;
+&lt;msoservtypes:request-id&gt;test${SERVICE_ID}-service&lt;/msoservtypes:request-id&gt;&#xd;
+&lt;msoservtypes:request-action&gt;Layer3ServiceActivateRequest&lt;/msoservtypes:request-action&gt;&#xd;
+&lt;msoservtypes:source&gt;OMX&lt;/msoservtypes:source&gt;&#xd;
+&lt;msoservtypes:notification-url&gt;https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws&lt;/msoservtypes:notification-url&gt;&#xd;
+&lt;msoservtypes:order-number&gt;5051560&lt;/msoservtypes:order-number&gt;&#xd;
+&lt;msoservtypes:order-version&gt;1&lt;/msoservtypes:order-version&gt;&#xd;
+&lt;/msoservtypes:request-information&gt;&#xd;
+&lt;msoservtypes:service-information&gt;&#xd;
+&lt;msoservtypes:service-type&gt;SDN-ETHERNET-INTERNET&lt;/msoservtypes:service-type&gt;&#xd;
+&lt;msoservtypes:service-instance-id&gt;serv-id0&lt;/msoservtypes:service-instance-id&gt;&#xd;
+&lt;msoservtypes:subscriber-name&gt;ST E2E Test50565_13000050565&lt;/msoservtypes:subscriber-name&gt;&#xd;
+&lt;/msoservtypes:service-information&gt;&#xd;
+&lt;service-parameters&gt;&#xd;
+&lt;msolayer3:l2-homing-information&gt;&#xd;
+&lt;msolayer3:evc-name&gt;AS/VLXM/003717//SW&lt;/msolayer3:evc-name&gt;&#xd;
+&lt;msolayer3:topology&gt;MultiPoint&lt;/msolayer3:topology&gt;&#xd;
+&lt;msolayer3:preferred-aic-clli&gt;MTSNJA4LCP1&lt;/msolayer3:preferred-aic-clli&gt;&#xd;
+&lt;/msolayer3:l2-homing-information&gt;&#xd;
+&lt;msolayer3:internet-service-information&gt;&#xd;
+&lt;msolayer3:internet-evc-access-information&gt;&#xd;
+&lt;msolayer3:internet-evc-speed-value&gt;8&lt;/msolayer3:internet-evc-speed-value&gt;&#xd;
+&lt;msolayer3:internet-evc-speed-units&gt;Mbps&lt;/msolayer3:internet-evc-speed-units&gt;&#xd;
+&lt;msolayer3:ip-version&gt;ds&lt;/msolayer3:ip-version&gt;&#xd;
+&lt;/msolayer3:internet-evc-access-information&gt;&#xd;
+&lt;msolayer3:vr-lan&gt;&#xd;
+&lt;msolayer3:routing-protocol&gt;none&lt;/msolayer3:routing-protocol&gt;&#xd;
+&lt;msolayer3:vr-lan-interface&gt;&#xd;
+&lt;msolayer3:vr-designation&gt;primary&lt;/msolayer3:vr-designation&gt;&#xd;
+&lt;msolayer3:v4-vr-lan-prefix&gt;10.172.125.0&lt;/msolayer3:v4-vr-lan-prefix&gt;&#xd;
+&lt;msolayer3:v4-vr-lan-prefix-length&gt;28&lt;/msolayer3:v4-vr-lan-prefix-length&gt;&#xd;
+&lt;msolayer3:v6-vr-lan-prefix&gt;2001:112a:86c6:0045:1007:8a5d:0412:9179&lt;/msolayer3:v6-vr-lan-prefix&gt;&#xd;
+&lt;msolayer3:v6-vr-lan-prefix-length&gt;64&lt;/msolayer3:v6-vr-lan-prefix-length&gt;&#xd;
+&lt;msolayer3:v4-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:t-provided-v4-lan-public-prefixes&gt;&#xd;
+&lt;msolayer3:request-index&gt;1&lt;/msolayer3:request-index&gt;&#xd;
+&lt;msolayer3:v4-lan-public-prefix&gt;18.181.120.12&lt;/msolayer3:v4-lan-public-prefix&gt;&#xd;
+&lt;msolayer3:v4-lan-public-prefix-length&gt;28&lt;/msolayer3:v4-lan-public-prefix-length&gt;&#xd;
+&lt;/msolayer3:t-provided-v4-lan-public-prefixes&gt;&#xd;
+&lt;/msolayer3:v4-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:v6-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:t-provided-v6-lan-public-prefixes&gt;&#xd;
+&lt;msolayer3:request-index&gt;1&lt;/msolayer3:request-index&gt;&#xd;
+&lt;msolayer3:v6-lan-public-prefix&gt;2022:0cf7:87a6:0048:1008:8a4c:0373:1048&lt;/msolayer3:v6-lan-public-prefix&gt;&#xd;
+&lt;msolayer3:v6-lan-public-prefix-length&gt;64&lt;/msolayer3:v6-lan-public-prefix-length&gt;&#xd;
+&lt;/msolayer3:t-provided-v6-lan-public-prefixes&gt;&#xd;
+&lt;/msolayer3:v6-public-lan-prefixes&gt;&#xd;
+&#xd;
+&lt;msolayer3:dhcp&gt;&#xd;
+&lt;msolayer3:v4-dhcp-server-enabled&gt;Y&lt;/msolayer3:v4-dhcp-server-enabled&gt;&#xd;
+&lt;msolayer3:v6-dhcp-server-enabled&gt;Y&lt;/msolayer3:v6-dhcp-server-enabled&gt;&#xd;
+&lt;msolayer3:use-v4-default-pool&gt;N&lt;/msolayer3:use-v4-default-pool&gt;&#xd;
+&lt;msolayer3:use-v6-default-pool&gt;N&lt;/msolayer3:use-v6-default-pool&gt;&#xd;
+&lt;/msolayer3:dhcp&gt;&#xd;
+&lt;msolayer3:pat&gt;&#xd;
+&lt;msolayer3:v4-pat-enabled&gt;Y&lt;/msolayer3:v4-pat-enabled&gt;&#xd;
+&lt;msolayer3:use-v4-default-pool&gt;N&lt;/msolayer3:use-v4-default-pool&gt;&#xd;
+&lt;/msolayer3:pat&gt;&#xd;
+&lt;msolayer3:firewall-lite&gt;&#xd;
+&lt;msolayer3:stateful-firewall-lite-v4-enabled&gt;Y&lt;/msolayer3:stateful-firewall-lite-v4-enabled&gt;&#xd;
+&lt;msolayer3:stateful-firewall-lite-v6-enabled&gt;Y&lt;/msolayer3:stateful-firewall-lite-v6-enabled&gt;&#xd;
+&lt;/msolayer3:firewall-lite&gt;&#xd;
+&lt;/msolayer3:vr-lan-interface&gt;&#xd;
+&lt;/msolayer3:vr-lan&gt;&#xd;
+&lt;/msolayer3:internet-service-information&gt;&#xd;
+&lt;/service-parameters&gt;&#xd;
+&lt;/service-request&gt;</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">${MSO_HOST}</stringProp>
+          <stringProp name="HTTPSampler.port">${MSO_PORT}</stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">10000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+          <stringProp name="HTTPSampler.protocol"></stringProp>
+          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
+          <stringProp name="HTTPSampler.path">/ecomp/mso/v1/services/</stringProp>
+          <stringProp name="HTTPSampler.method">POST</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
+          <boolProp name="HTTPSampler.monitor">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+        </HTTPSamplerProxy>
+        <hashTree/>
+        <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
+          <boolProp name="ResultCollector.error_logging">true</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>false</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <threadCounts>true</threadCounts>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="StatGraphVisualizer" testclass="ResultCollector" testname="Aggregate Graph" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>false</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <threadCounts>true</threadCounts>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC Request" enabled="true">
+          <stringProp name="dataSource"></stringProp>
+          <stringProp name="query"></stringProp>
+          <stringProp name="queryArguments"></stringProp>
+          <stringProp name="queryArgumentsTypes"></stringProp>
+          <stringProp name="queryTimeout"></stringProp>
+          <stringProp name="queryType">Select Statement</stringProp>
+          <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultVariable"></stringProp>
+          <stringProp name="variableNames"></stringProp>
+        </JDBCSampler>
+        <hashTree/>
+      </hashTree>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="ApiHandler Infra Thread Group" enabled="false">
+        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">1</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">60</stringProp>
+        <longProp name="ThreadGroup.start_time">1448375429000</longProp>
+        <longProp name="ThreadGroup.end_time">1448375429000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="service-id increment" enabled="true">
+          <stringProp name="CounterConfig.start">0</stringProp>
+          <stringProp name="CounterConfig.end"></stringProp>
+          <stringProp name="CounterConfig.incr">1</stringProp>
+          <stringProp name="CounterConfig.name">SERVICE_ID</stringProp>
+          <stringProp name="CounterConfig.format"></stringProp>
+          <boolProp name="CounterConfig.per_user">false</boolProp>
+        </CounterConfig>
+        <hashTree/>
+        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="REST Service Request" enabled="true">
+          <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
+          <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
+            <collectionProp name="Arguments.arguments">
+              <elementProp name="" elementType="HTTPArgument">
+                <boolProp name="HTTPArgument.always_encode">false</boolProp>
+                <stringProp name="Argument.value">&lt;service-request xmlns=&quot;http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1&quot; xmlns:msolayer3=&quot;http://ecomp.att.com/mso/request/layer3/schema/v1&quot; xmlns:msoservtypes=&quot;http://ecomp.att.com/mso/request/types/v1&quot;&gt;&#xd;
+&lt;msoservtypes:request-information&gt;&#xd;
+&lt;msoservtypes:request-id&gt;test${SERVICE_ID}-service&lt;/msoservtypes:request-id&gt;&#xd;
+&lt;msoservtypes:request-action&gt;Layer3ServiceActivateRequest&lt;/msoservtypes:request-action&gt;&#xd;
+&lt;msoservtypes:source&gt;OMX&lt;/msoservtypes:source&gt;&#xd;
+&lt;msoservtypes:notification-url&gt;https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws&lt;/msoservtypes:notification-url&gt;&#xd;
+&lt;msoservtypes:order-number&gt;5051560&lt;/msoservtypes:order-number&gt;&#xd;
+&lt;msoservtypes:order-version&gt;1&lt;/msoservtypes:order-version&gt;&#xd;
+&lt;/msoservtypes:request-information&gt;&#xd;
+&lt;msoservtypes:service-information&gt;&#xd;
+&lt;msoservtypes:service-type&gt;SDN-ETHERNET-INTERNET&lt;/msoservtypes:service-type&gt;&#xd;
+&lt;msoservtypes:service-instance-id&gt;serv-id0&lt;/msoservtypes:service-instance-id&gt;&#xd;
+&lt;msoservtypes:subscriber-name&gt;ST E2E Test50565_13000050565&lt;/msoservtypes:subscriber-name&gt;&#xd;
+&lt;/msoservtypes:service-information&gt;&#xd;
+&lt;service-parameters&gt;&#xd;
+&lt;msolayer3:l2-homing-information&gt;&#xd;
+&lt;msolayer3:evc-name&gt;AS/VLXM/003717//SW&lt;/msolayer3:evc-name&gt;&#xd;
+&lt;msolayer3:topology&gt;MultiPoint&lt;/msolayer3:topology&gt;&#xd;
+&lt;msolayer3:preferred-aic-clli&gt;MTSNJA4LCP1&lt;/msolayer3:preferred-aic-clli&gt;&#xd;
+&lt;/msolayer3:l2-homing-information&gt;&#xd;
+&lt;msolayer3:internet-service-information&gt;&#xd;
+&lt;msolayer3:internet-evc-access-information&gt;&#xd;
+&lt;msolayer3:internet-evc-speed-value&gt;8&lt;/msolayer3:internet-evc-speed-value&gt;&#xd;
+&lt;msolayer3:internet-evc-speed-units&gt;Mbps&lt;/msolayer3:internet-evc-speed-units&gt;&#xd;
+&lt;msolayer3:ip-version&gt;ds&lt;/msolayer3:ip-version&gt;&#xd;
+&lt;/msolayer3:internet-evc-access-information&gt;&#xd;
+&lt;msolayer3:vr-lan&gt;&#xd;
+&lt;msolayer3:routing-protocol&gt;none&lt;/msolayer3:routing-protocol&gt;&#xd;
+&lt;msolayer3:vr-lan-interface&gt;&#xd;
+&lt;msolayer3:vr-designation&gt;primary&lt;/msolayer3:vr-designation&gt;&#xd;
+&lt;msolayer3:v4-vr-lan-prefix&gt;10.172.125.0&lt;/msolayer3:v4-vr-lan-prefix&gt;&#xd;
+&lt;msolayer3:v4-vr-lan-prefix-length&gt;28&lt;/msolayer3:v4-vr-lan-prefix-length&gt;&#xd;
+&lt;msolayer3:v6-vr-lan-prefix&gt;2001:112a:86c6:0045:1007:8a5d:0412:9179&lt;/msolayer3:v6-vr-lan-prefix&gt;&#xd;
+&lt;msolayer3:v6-vr-lan-prefix-length&gt;64&lt;/msolayer3:v6-vr-lan-prefix-length&gt;&#xd;
+&lt;msolayer3:v4-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:t-provided-v4-lan-public-prefixes&gt;&#xd;
+&lt;msolayer3:request-index&gt;1&lt;/msolayer3:request-index&gt;&#xd;
+&lt;msolayer3:v4-lan-public-prefix&gt;18.181.120.12&lt;/msolayer3:v4-lan-public-prefix&gt;&#xd;
+&lt;msolayer3:v4-lan-public-prefix-length&gt;28&lt;/msolayer3:v4-lan-public-prefix-length&gt;&#xd;
+&lt;/msolayer3:t-provided-v4-lan-public-prefixes&gt;&#xd;
+&lt;/msolayer3:v4-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:v6-public-lan-prefixes&gt;&#xd;
+&lt;msolayer3:t-provided-v6-lan-public-prefixes&gt;&#xd;
+&lt;msolayer3:request-index&gt;1&lt;/msolayer3:request-index&gt;&#xd;
+&lt;msolayer3:v6-lan-public-prefix&gt;2022:0cf7:87a6:0048:1008:8a4c:0373:1048&lt;/msolayer3:v6-lan-public-prefix&gt;&#xd;
+&lt;msolayer3:v6-lan-public-prefix-length&gt;64&lt;/msolayer3:v6-lan-public-prefix-length&gt;&#xd;
+&lt;/msolayer3:t-provided-v6-lan-public-prefixes&gt;&#xd;
+&lt;/msolayer3:v6-public-lan-prefixes&gt;&#xd;
+&#xd;
+&lt;msolayer3:dhcp&gt;&#xd;
+&lt;msolayer3:v4-dhcp-server-enabled&gt;Y&lt;/msolayer3:v4-dhcp-server-enabled&gt;&#xd;
+&lt;msolayer3:v6-dhcp-server-enabled&gt;Y&lt;/msolayer3:v6-dhcp-server-enabled&gt;&#xd;
+&lt;msolayer3:use-v4-default-pool&gt;N&lt;/msolayer3:use-v4-default-pool&gt;&#xd;
+&lt;msolayer3:use-v6-default-pool&gt;N&lt;/msolayer3:use-v6-default-pool&gt;&#xd;
+&lt;/msolayer3:dhcp&gt;&#xd;
+&lt;msolayer3:pat&gt;&#xd;
+&lt;msolayer3:v4-pat-enabled&gt;Y&lt;/msolayer3:v4-pat-enabled&gt;&#xd;
+&lt;msolayer3:use-v4-default-pool&gt;N&lt;/msolayer3:use-v4-default-pool&gt;&#xd;
+&lt;/msolayer3:pat&gt;&#xd;
+&lt;msolayer3:firewall-lite&gt;&#xd;
+&lt;msolayer3:stateful-firewall-lite-v4-enabled&gt;Y&lt;/msolayer3:stateful-firewall-lite-v4-enabled&gt;&#xd;
+&lt;msolayer3:stateful-firewall-lite-v6-enabled&gt;Y&lt;/msolayer3:stateful-firewall-lite-v6-enabled&gt;&#xd;
+&lt;/msolayer3:firewall-lite&gt;&#xd;
+&lt;/msolayer3:vr-lan-interface&gt;&#xd;
+&lt;/msolayer3:vr-lan&gt;&#xd;
+&lt;/msolayer3:internet-service-information&gt;&#xd;
+&lt;/service-parameters&gt;&#xd;
+&lt;/service-request&gt;</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <stringProp name="HTTPSampler.domain">${MSO_HOST}</stringProp>
+          <stringProp name="HTTPSampler.port">${MSO_PORT}</stringProp>
+          <stringProp name="HTTPSampler.connect_timeout">10000</stringProp>
+          <stringProp name="HTTPSampler.response_timeout">30000</stringProp>
+          <stringProp name="HTTPSampler.protocol"></stringProp>
+          <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
+          <stringProp name="HTTPSampler.path">/ecomp/mso/v1/services/</stringProp>
+          <stringProp name="HTTPSampler.method">POST</stringProp>
+          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+          <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
+          <boolProp name="HTTPSampler.monitor">false</boolProp>
+          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+        </HTTPSamplerProxy>
+        <hashTree/>
+        <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
+          <boolProp name="ResultCollector.error_logging">true</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>false</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <threadCounts>true</threadCounts>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="StatGraphVisualizer" testclass="ResultCollector" testname="Aggregate Graph" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>false</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+              <threadCounts>true</threadCounts>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC Request" enabled="true">
+          <stringProp name="dataSource"></stringProp>
+          <stringProp name="query"></stringProp>
+          <stringProp name="queryArguments"></stringProp>
+          <stringProp name="queryArgumentsTypes"></stringProp>
+          <stringProp name="queryTimeout"></stringProp>
+          <stringProp name="queryType">Select Statement</stringProp>
+          <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultVariable"></stringProp>
+          <stringProp name="variableNames"></stringProp>
+        </JDBCSampler>
+        <hashTree/>
+      </hashTree>
+    </hashTree>
+  </hashTree>
+</jmeterTestPlan>
diff --git a/packages/arquillian-unit-tests/src/test/resources/SoapUI/Healthcheck-soapui-project.xml b/packages/arquillian-unit-tests/src/test/resources/SoapUI/Healthcheck-soapui-project.xml
new file mode 100644 (file)
index 0000000..4629cd8
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<con:soapui-project id="5e41efd3-b2b2-4507-a41a-02227bd51b8a" activeEnvironment="Default" name="HealthCheck" resourceRoot="" soapui-version="5.3.0" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:RestService" id="c7309861-55a2-458f-9408-6ddee8ed79a7" wadlVersion="http://wadl.dev.java.net/2009/02" name="SetStatus" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:8080</con:endpoint></con:endpoints><con:resource name="SetStatus false infra" path="/ecomp/mso/infra/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus false Infra" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 401 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="FAULT"><con:mediaType>text/plain</con:mediaType><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus true infra" path="/ecomp/mso/infra/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus true infra" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 401</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="FAULT"><con:mediaType>text/plain</con:mediaType><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus false apih asdc" path="/asdc/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus false apih asdc" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 401 403</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:domain/><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus true apih asdc" path="/asdc/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus true apih asdc" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 401 403</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/plain</con:mediaType><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus false networks" path="/networks/rest/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus false networks" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 404 401</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus true networks" path="/networks/rest/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus true networks" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus false vnfs" path="/vnfs/rest/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus false vnfs" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 404 401</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus true vnfs" path="/vnfs/rest/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus true vnfs" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 404 401</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:domain/><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus false tenants" path="/tenants/rest/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus false tenants" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 404 401</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus true tenants" path="/tenants/rest/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus true tenants" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus false JRA" path="/adapters/rest/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus false JRA" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="SetStatus true JRA" path="/adapters/rest/setStatus/{siteName}" id="d03a4e5b-b5a2-4215-a37d-d5852a03e2e8"><con:settings/><con:parameters><con:parameter><con:name>enable</con:name><con:value>true</con:value><con:style>QUERY</con:style><con:default>true</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>siteName</con:name><con:value>${#Project#sitename}</con:value><con:style>TEMPLATE</con:style><con:default>${#Project#sitename}</con:default></con:parameter></con:parameters><con:method name="SetStatus true JRA" id="5d87cc87-ef01-44e7-8e6f-e177e088a6fe" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405 404 403</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="FAULT"><con:mediaType>text/plain</con:mediaType><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:request></con:method></con:resource></con:interface><con:interface xsi:type="con:RestService" id="f1eae1f1-1a12-43a3-84ea-b966442eafb0" wadlVersion="http://wadl.dev.java.net/2009/02" name="GlobalHealthcheck" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:8080</con:endpoint></con:endpoints><con:resource name="Infra" path="/ecomp/mso/infra/globalhealthcheck" id="85e05d47-4f09-4925-ab77-63f8a1665c27"><con:settings/><con:parameters><con:parameter><con:name>enableBpmn</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:method name="GlobalHC Infra" id="1b6937c7-9d88-43c6-99b6-9dca4e891d5c" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="42ea1c51-a0ca-445e-8f98-4af039a2b59c" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/globalhealthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enableBpmn</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="JRA adapters" path="/adapters/rest/globalhealthcheck" id="cba118a2-5d68-47ab-9440-51920466fff0"><con:settings/><con:parameters><con:parameter><con:name>enableBpmn</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:method name="GlobalHC adapters" id="52ffdb3c-6f8a-43b0-8a52-a2b603e3d9c5" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="b1109ecf-fd73-4a30-8c98-ac50a10e9cb7" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/globalhealthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enableBpmn</con:entry></con:parameterOrder></con:request></con:method></con:resource></con:interface><con:interface xsi:type="con:RestService" id="4609f980-4202-4e50-b09f-abec5534dfa3" wadlVersion="http://wadl.dev.java.net/2009/02" name="SubModulesHealthcheck" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://${#Project#jrahost}</con:endpoint></con:endpoints><con:resource name="JRA networks" path="/networks/rest/healthcheck" id="61b35716-b06e-47ba-9567-7757980f1b5a"><con:settings/><con:parameters/><con:method name="LocalHC networks" id="48acb940-91ac-4b32-b32b-8808b552e059" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>500</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="a8aa066b-ad81-40bc-9976-de44fe3dcc0a" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/networks/admin/healthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="JRA adapters" path="/adapters/rest/healthcheck" id="fa70036c-7280-43c5-a26d-8e2d42584ee1"><con:settings/><con:parameters/><con:method name="LocalHC adapters" id="7587d026-ebda-4c13-80df-b5a26f322164" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="ea2c9416-63eb-4219-83fd-db0593bf63e3" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@bind_address"/><con:setting id="com.eviware.soapui.impl.support.AbstractHttpRequest@follow-redirects">true</con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/healthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="JRA vnfs" path="/vnfs/rest/healthcheck" id="ee547629-e2ac-4932-b582-9586c6a3f464"><con:settings/><con:parameters/><con:method name="LocalHC vnfs" id="285c0bac-3c68-4f07-b231-5bba3217b60a" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="f2effc08-5569-4e5b-a2e8-fa3bebc958b9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/vnfs/rest/healthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="JRA tenants" path="/tenants/rest/healthcheck" id="796ada77-fce3-493d-b003-10d4c1ecc498"><con:settings/><con:parameters/><con:method name="LocalHC tenants" id="2f9ae7ac-c18d-48eb-a43c-8624d9475b7f" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="432c2172-deba-4173-a0af-0b6fccfd60dc" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/tenants/admin/healthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="APIH Infra" path="/ecomp/mso/infra/healthcheck" id="29001acb-f40a-4ed3-af96-0415649eeacf"><con:settings/><con:parameters/><con:method name="LocalHC infra" id="6d7685fa-354e-44c6-b512-0e802673d341" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>404</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="287d8590-e1da-49e5-afef-5f7191a55925" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/healthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="APIH asdc" path="/asdc/healthcheck" id="b79d1f28-0b27-4897-90a5-b17032d533da"><con:settings/><con:parameters/><con:method name="LocalHC asdc" id="f251569b-3e62-44c0-80c2-b806a0b2cda1" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="b0d9d540-073e-4d1d-ac19-32566206d0c6" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/asdc/healthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="Camunadalocal" path="/mso/healthcheck" id="6740d63f-f8ba-40d8-8397-c8d9135d241a"><con:settings/><con:parameters/><con:method name="CamundaLocal" id="a3ae9bf4-e129-4c12-a1ac-0f2fab31d509" method="GET"><con:description>not used in Arquilian as not same repo</con:description><con:settings/><con:parameters/><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="FAULT"><con:mediaType>application/json</con:mediaType><con:status>500 503</con:status><con:params/><con:element xmlns:heal="localhost/mso/async/services/HealthCheck">heal:Fault</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>400 404 405</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/json</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:heal="localhost/mso/async/services/HealthCheck">heal:Response</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="b85f87ca-6c69-46be-aa1d-cd9f0b1ce48d" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#bpmnhost}</con:endpoint><con:request>{"variables":{}}</con:request><con:originalUri>localhost/mso/async/services/HealthCheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="APIH dbadapters" path="/dbadapters/healthcheck" id="c9adf66c-dbfa-4f87-ba07-be9799ed3ef7"><con:settings/><con:parameters/><con:method name="LocalHC apih dbadapters" id="602a2bad-4bac-4bdc-b64a-c6b0250997e7" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="91778949-a8b8-4211-be98-5dcb477512a8" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/healthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="Camunadalocal variables2" path="/mso/async/services/HealthCheck" id="6740d63f-f8ba-40d8-8397-c8d9135d241a"><con:settings/><con:parameters/><con:method name="CamundaLocal2" id="a3ae9bf4-e129-4c12-a1ac-0f2fab31d509" method="POST"><con:description>not used in Arquilian as not same repo</con:description><con:settings/><con:parameters/><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="FAULT"><con:mediaType>application/json</con:mediaType><con:status>500 503</con:status><con:params/><con:element xmlns:heal="localhost/mso/async/services/HealthCheck">heal:Fault</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>400 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/json</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:heal="localhost/mso/async/services/HealthCheck">heal:Response</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="b85f87ca-6c69-46be-aa1d-cd9f0b1ce48d" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#bpmnhost}</con:endpoint><con:request>{"variables":{"requestId":{"value":"test","type":"String"}}}</con:request><con:originalUri>localhost/mso/async/services/HealthCheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource></con:interface><con:interface xsi:type="con:RestService" id="bc7ec14b-913e-4b98-bdd2-772f5a98e77d" wadlVersion="http://wadl.dev.java.net/2009/02" name="GetStatus" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://192.168.126.130:8080</con:endpoint></con:endpoints><con:resource name="GetStatus DB Adapter" path="/dbadapters/RequestsDbAdapter" id="911c26b8-4b1d-49e3-b969-02de4c62bd3f"><con:settings/><con:parameters/><con:method name="GetStatus RequestsDbAdapter" id="4748011f-fcc6-4920-b1f2-1956b8cafa34" method="POST"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/xml;charset=ISO-8859-1</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">soapenv:Envelope</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/xml</con:mediaType><con:params/><con:element xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">soapenv:Envelope</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/xml;charset=ISO-8859-1</con:mediaType><con:status>500</con:status><con:params/><con:element xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">soapenv:Envelope</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>404</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource></con:interface><con:interface xsi:type="con:RestService" id="045c84cd-4ad1-4f49-a187-7b4448b5cf97" wadlVersion="http://wadl.dev.java.net/2009/02" name="NodeHealthCheck" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:8080</con:endpoint></con:endpoints><con:resource name="NodehealthcheckJRA" path="/adapters/rest/nodehealthcheck" id="eb7dc74a-2b7f-4d1e-88f3-15987452e24d"><con:settings/><con:parameters/><con:method name="NodehealthcheckJRA" id="67871396-2679-4871-bbe4-2e2b63ed4180" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="00db386c-942d-4286-853f-01e279f6c2cb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/nodehealthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="NodehealthcheckAPIH-Infra" path="/ecomp/mso/infra/nodehealthcheck" id="eb7dc74a-2b7f-4d1e-88f3-15987452e24d"><con:settings/><con:parameters/><con:method name="NodehealthcheckAPIH-Infra" id="67871396-2679-4871-bbe4-2e2b63ed4180" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>text/html</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>503</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="00db386c-942d-4286-853f-01e279f6c2cb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/nodehealthcheck</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource></con:interface><con:testSuite id="bcee4cc9-9c4e-4eeb-a520-9a3c73458e1f" name="Healthcheck TestSuite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="9b4e70e4-1cd1-4152-89e9-18e8a0225108" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCaseHC" searchProperties="true"><con:settings/><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1" id="b3161fab-24b4-442d-b662-49bdc46f697b"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="0d4baeb9-cf0f-41f5-b47e-a84420d09a01" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="NodehealthcheckAPIH - Request 1" id="b536c25a-81e6-40b6-9f15-77f1d8979538"><con:settings/><con:config service="NodeHealthCheck" resourcePath="/ecomp/mso/infra/nodehealthcheck" methodName="NodehealthcheckAPIH-Infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="NodehealthcheckAPIH - Request 1" id="00db386c-942d-4286-853f-01e279f6c2cb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/nodehealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="df9f7231-157f-48c5-ab1d-bf24b90dfe40" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="NodehealthcheckJRA - Request 1" id="58782f61-2494-431c-9a66-19929df6c8a7"><con:settings/><con:config service="NodeHealthCheck" resourcePath="/adapters/rest/nodehealthcheck" methodName="NodehealthcheckJRA" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="NodehealthcheckJRA - Request 1" id="00db386c-942d-4286-853f-01e279f6c2cb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/nodehealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="9cc69173-94f7-4ee2-914e-85ff403e4144" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GlobalHC Infra - Request 1" id="49f125c8-758c-4f5f-af02-d4ddb39090d5"><con:settings/><con:config service="GlobalHealthcheck" resourcePath="/ecomp/mso/infra/globalhealthcheck" methodName="GlobalHC Infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GlobalHC Infra - Request 1" id="42ea1c51-a0ca-445e-8f98-4af039a2b59c" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/globalhealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="9c163024-dc62-4627-8380-6857c84de260" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enableBpmn</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC networks - Request 1" id="17db751c-68f9-46be-bc56-fdc929568f51"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/networks/rest/healthcheck" methodName="LocalHC networks" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC networks - Request 1" id="a8aa066b-ad81-40bc-9976-de44fe3dcc0a" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/networks/admin/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="004632bc-91d6-4bd5-a523-39cdeb006fec" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC apih dbadapters - Request 1" id="cb2b26e7-5802-4036-bd4d-449b94d832be"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/dbadapters/healthcheck" methodName="LocalHC apih dbadapters" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC apih dbadapters - Request 1" id="91778949-a8b8-4211-be98-5dcb477512a8" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="37cc03ab-e15c-4c50-9d67-29774d027248" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="CamundaLocal - Request 1" id="a021ebe2-405e-4ee6-9716-4fafabdfa733"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/mso/healthcheck" methodName="CamundaLocal" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="CamundaLocal - Request 1" id="b85f87ca-6c69-46be-aa1d-cd9f0b1ce48d" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#bpmnhost}</con:endpoint><con:request>{"variables":{}}</con:request><con:originalUri>localhost/mso/async/services/HealthCheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="ed318ece-b0c3-49ab-bc98-6ce1435de0e2" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus true JRA - Request 1" id="42d46836-ff78-4ee3-8c78-4713870c812e"><con:settings/><con:config service="SetStatus" resourcePath="/adapters/rest/setStatus/{siteName}" methodName="SetStatus true JRA" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus true JRA - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="4e92dbf7-3fcb-40cd-81ae-c5f520db9ff8" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 1" id="3001990b-8953-4249-a25c-685de18b3898"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 1" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="220970f3-fe8e-4115-8f6d-2beb0fc8e577" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="NodehealthcheckJRA - Request 1 1" id="0776c1af-9663-4edb-b243-e0f3ed23682c"><con:settings/><con:config service="NodeHealthCheck" resourcePath="/adapters/rest/nodehealthcheck" methodName="NodehealthcheckJRA" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="NodehealthcheckJRA - Request 1 1" id="00db386c-942d-4286-853f-01e279f6c2cb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/nodehealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="8225165c-dcfe-48da-b040-91c872df0a70" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GlobalHC Infra - Request 1 1" id="5e825e5f-1d69-4d3d-a761-6fe7d2678d1e"><con:settings/><con:config service="GlobalHealthcheck" resourcePath="/ecomp/mso/infra/globalhealthcheck" methodName="GlobalHC Infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GlobalHC Infra - Request 1 1" id="42ea1c51-a0ca-445e-8f98-4af039a2b59c" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/globalhealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="262448a9-3374-4369-b42f-95335161b8e4" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enableBpmn</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GlobalHC adapters - Request 1" id="6c5741f9-68cd-438d-9272-5076a0054f27"><con:settings/><con:config service="GlobalHealthcheck" resourcePath="/adapters/rest/globalhealthcheck" methodName="GlobalHC adapters" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GlobalHC adapters - Request 1" id="b1109ecf-fd73-4a30-8c98-ac50a10e9cb7" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/globalhealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="da1b8948-fde9-4e24-b2d8-129cf8bef62f" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enableBpmn</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC networks - Request 1 1" id="ee7826a8-efce-4212-b96f-7c7902fd86d3"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/networks/rest/healthcheck" methodName="LocalHC networks" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC networks - Request 1 1" id="a8aa066b-ad81-40bc-9976-de44fe3dcc0a" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/networks/admin/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="bf703c98-99ce-4389-91f2-fc703d4bd654" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC adapters - Request 1" id="c1b02370-f2c8-4029-91df-31d9c5ef73eb"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/adapters/rest/healthcheck" methodName="LocalHC adapters" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC adapters - Request 1" id="ea2c9416-63eb-4219-83fd-db0593bf63e3" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="2369cd0c-fec8-479d-aec0-d76f67ff5f5a" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC vnfs - Request 1" id="3db90ee0-ae36-45b8-97c9-9c9bccaa8ebf"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/vnfs/rest/healthcheck" methodName="LocalHC vnfs" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC vnfs - Request 1" id="f2effc08-5569-4e5b-a2e8-fa3bebc958b9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/vnfs/admin/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="21263d81-b74a-4b27-a15e-7c0f3276b66a" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC tenants - Request 1" id="e72cfa6f-88cc-4ce0-94b7-36c9ee990411"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/tenants/rest/healthcheck" methodName="LocalHC tenants" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC tenants - Request 1" id="432c2172-deba-4173-a0af-0b6fccfd60dc" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/tenants/admin/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="52b2ef4a-efc7-4ccb-93e1-320f03b6a05e" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC infra - Request 1" id="7d789ad8-d3c1-4835-bac1-570fa2291fb9"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/ecomp/mso/infra/healthcheck" methodName="LocalHC infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC infra - Request 1" id="287d8590-e1da-49e5-afef-5f7191a55925" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="c79591a0-8f1e-4d1f-8fd0-ea8ddcb7aca3" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC asdc - Request 1" id="4e594435-b0f0-47ca-80a0-432e29c1e475"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/asdc/healthcheck" methodName="LocalHC asdc" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC asdc - Request 1" id="b0d9d540-073e-4d1d-ac19-32566206d0c6" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/asdc/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="82db3c9b-b2d7-46dc-834b-17bec15e11bb" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus false Infra - Request 1" id="78f2d9fe-f2e4-4f29-a8f4-80db05b4b75a"><con:settings/><con:config service="SetStatus" resourcePath="/ecomp/mso/infra/setStatus/{siteName}" methodName="SetStatus false Infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus false Infra - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="4238a0f7-e280-47ef-b3cc-07915e61f7cd" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="NodehealthcheckAPIH - Request 1 1" id="99fa4bb9-99ee-459b-a987-63a1696a7fa8"><con:settings/><con:config service="NodeHealthCheck" resourcePath="/ecomp/mso/infra/nodehealthcheck" methodName="NodehealthcheckAPIH-Infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="NodehealthcheckAPIH - Request 1 1" id="00db386c-942d-4286-853f-01e279f6c2cb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/nodehealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="9d876f54-e867-4521-b534-de42f20c1ea4" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="NodehealthcheckJRA - Request 1 2" id="934d5932-dc4c-4a32-86a1-99dc64404d9c"><con:settings/><con:config service="NodeHealthCheck" resourcePath="/adapters/rest/nodehealthcheck" methodName="NodehealthcheckJRA" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="NodehealthcheckJRA - Request 1 2" id="00db386c-942d-4286-853f-01e279f6c2cb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/nodehealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="d928f732-703f-4f42-a22b-f1745fc3e78f" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 2" id="329a88cc-6f24-415e-97ac-6166ae875945"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 2" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="552caecc-0fca-49f6-810a-1890c3c0e16a" name="Contains"><con:configuration><token>&lt;return>false&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GlobalHC Infra - Request 1 2" id="0705c3fd-483e-42c4-b5dd-ded9b9725b6a"><con:settings/><con:config service="GlobalHealthcheck" resourcePath="/ecomp/mso/infra/globalhealthcheck" methodName="GlobalHC Infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GlobalHC Infra - Request 1 2" id="42ea1c51-a0ca-445e-8f98-4af039a2b59c" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/globalhealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="319c062a-1168-4fdc-8e43-77c7c3d0cdf3" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry/></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC apih dbadapters - Request 1 1" id="f814d54b-ab10-4b66-b84d-02f0e4df4230"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/dbadapters/healthcheck" methodName="LocalHC apih dbadapters" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC apih dbadapters - Request 1 1" id="91778949-a8b8-4211-be98-5dcb477512a8" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="a61f1c79-187b-4b24-80fc-73332cdcad2e" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GlobalHC adapters - Request 1 1" id="e773c770-2aa6-491a-bf6f-df6782707c68"><con:settings/><con:config service="GlobalHealthcheck" resourcePath="/adapters/rest/globalhealthcheck" methodName="GlobalHC adapters" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GlobalHC adapters - Request 1 1" id="b1109ecf-fd73-4a30-8c98-ac50a10e9cb7" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/globalhealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="5a8fffda-700a-4dec-96ce-e977ee5edbb1" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enableBpmn</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus true infra - Request 1" id="ca250eea-61a9-42fb-a98c-2095f2be4fb5"><con:settings/><con:config service="SetStatus" resourcePath="/ecomp/mso/infra/setStatus/{siteName}" methodName="SetStatus true infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus true infra - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="019fd239-2a59-4ebe-afdb-44c0ba06a22d" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 3" id="351479f0-668d-4b29-81b5-6ab3658484e9"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 3" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="cd0e6ff7-a773-46d8-8e40-1026874935dd" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus false apih asdc - Request 1" id="8babbc98-be64-49a2-b4e8-30d082b743b4"><con:settings/><con:config service="SetStatus" resourcePath="/asdc/setStatus/{siteName}" methodName="SetStatus false apih asdc" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus false apih asdc - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="33372076-e44a-41a4-87b3-53224902ea3d" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:domain/><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="CamundaLocal - Request 1 1" id="73cf1af0-457b-4f48-a6d5-21e524790cc8"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/mso/healthcheck" methodName="CamundaLocal" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="CamundaLocal - Request 1 1" id="b85f87ca-6c69-46be-aa1d-cd9f0b1ce48d" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#bpmnhost}</con:endpoint><con:request>{"variables":{}}</con:request><con:originalUri>localhost/mso/async/services/HealthCheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="7519aa65-5db5-4a7e-9fe0-a5f8f779d07e" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 8" id="a517f8ab-c6c9-40ae-b526-d0d23997fa84"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 8" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="33d90e7c-a609-4d69-a645-5ba0c22e8a4a" name="Contains"><con:configuration><token>&lt;return>false&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus true apih asdc - Request 1" id="196ef5fc-79b7-4255-b09c-3469c92d647a"><con:settings/><con:config service="SetStatus" resourcePath="/asdc/setStatus/{siteName}" methodName="SetStatus true apih asdc" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus true apih asdc - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="02be4928-a27d-4781-8db5-1accc422290a" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 9" id="e60e2b76-a0cf-4add-9910-86a93ab0b8ec"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 9" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="8c76c441-fb97-4109-86a9-9ac17b42fd39" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus false networks - Request 1" id="0952d95c-ba75-4ecc-9e18-71a8fb01b090"><con:settings/><con:config service="SetStatus" resourcePath="/networks/rest/setStatus/{siteName}" methodName="SetStatus false networks" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus false networks - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="71569172-14b1-44e9-af03-8745e03554c3" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 10" id="c296e206-9d9c-4301-9980-b171bc27ecc4"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 10" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="3e915988-b69e-40b1-b6ae-53984761b768" name="Contains"><con:configuration><token>&lt;return>false&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus true networks - Request 1" id="86979a42-f16c-4f01-ae8e-3788b3ec10ec"><con:settings/><con:config service="SetStatus" resourcePath="/networks/rest/setStatus/{siteName}" methodName="SetStatus true networks" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus true networks - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="d185f2eb-7574-4dba-aed5-5a562790b1c8" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 11" id="1e0213f2-3674-436b-b887-b68ead2388d6"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 11" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="65c09a35-6869-413d-ab78-f1a62e3e2fe7" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus false vnfs - Request 1" id="ef176490-0593-4519-8008-72ed4b73089b"><con:settings/><con:config service="SetStatus" resourcePath="/vnfs/rest/setStatus/{siteName}" methodName="SetStatus false vnfs" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus false vnfs - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="99ff417e-f1d4-4bb2-a237-b8e12a49f88d" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 12" id="ad2f5c9a-d0b4-4e8d-82c1-6a05dde1d7bf"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 12" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="cc19cbb5-e3ef-40bb-ba96-778fcfeab6ff" name="Contains"><con:configuration><token>&lt;return>false&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus true vnfs - Request 1" id="609b6dcc-b423-496c-a653-e8a1018ca22a"><con:settings/><con:config service="SetStatus" resourcePath="/vnfs/rest/setStatus/{siteName}" methodName="SetStatus true vnfs" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus true vnfs - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="b2f5e2a0-4db0-479c-b235-26da2112e0c0" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:domain/><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 13" id="602fd957-8f06-48f0-87fe-9f23fc3b4ada"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 13" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="12de6cbc-56c0-4761-aef5-e626ea947b18" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus false tenants - Request 1" id="c8446182-a6f3-4266-bb5f-3cb850d24701"><con:settings/><con:config service="SetStatus" resourcePath="/tenants/rest/setStatus/{siteName}" methodName="SetStatus false tenants" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus false tenants - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="3c08903b-5d7c-40a6-94eb-b93b9f044ee5" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 14" id="3fa1624e-aed7-4cc9-9691-d3b4f7ccc7ef"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 14" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="07d6eb5b-ad84-469b-8e91-1fe49af16708" name="Contains"><con:configuration><token>&lt;return>false&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus true tenants - Request 1" id="f243bb07-7d05-447e-88ce-4aa86b68dbf0"><con:settings/><con:config service="SetStatus" resourcePath="/tenants/rest/setStatus/{siteName}" methodName="SetStatus true tenants" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus true tenants - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="f4c7e794-2670-4b2a-b20c-a2d980f5c054" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 15" id="b0d8a064-b7ee-4415-8802-229afa7cd4d5"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 15" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="e7e43f20-9fba-4895-83e3-380564e264fc" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus true JRA - Request 1 1" id="3c1d6822-e3d2-4344-9e02-2068adda61be"><con:settings/><con:config service="SetStatus" resourcePath="/adapters/rest/setStatus/{siteName}" methodName="SetStatus true JRA" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus true JRA - Request 1 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="ee7665ce-a4db-4154-b045-b02310f7a402" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 16" id="f62a8ace-62c2-4cd9-ac93-70c585362446"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 16" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="ee0a2a02-9193-4fca-9a1d-4b6ce3a3f254" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus false JRA - Request 1" id="c6e48787-d7e0-46fb-ad23-f69bb192e718"><con:settings/><con:config service="SetStatus" resourcePath="/adapters/rest/setStatus/{siteName}" methodName="SetStatus false JRA" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus false JRA - Request 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="75732629-9334-40fb-aff4-f81306e9a166" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:domain/><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enable" value="false" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 17" id="fc2ff543-7fea-4e07-bd6c-f97d24767fa8"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 17" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="38b23e5b-1596-40ca-8c43-91cb529c613d" name="Contains"><con:configuration><token>&lt;return>false&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GlobalHC adapters - Request 1 2" id="b5282e27-4b4f-4587-9df7-bc6275f4ddee"><con:settings/><con:config service="GlobalHealthcheck" resourcePath="/adapters/rest/globalhealthcheck" methodName="GlobalHC adapters" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GlobalHC adapters - Request 1 2" id="b1109ecf-fd73-4a30-8c98-ac50a10e9cb7" mediaType="application/json"><con:settings/><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/globalhealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="2487096b-aba4-48d3-8d25-6a29883fabaf" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enableBpmn</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC networks - Request 1 2" id="c33458af-0d58-4e02-906d-cf643ce0687c"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/networks/rest/healthcheck" methodName="LocalHC networks" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC networks - Request 1 2" id="a8aa066b-ad81-40bc-9976-de44fe3dcc0a" mediaType="application/json"><con:settings/><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/networks/admin/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="9ce5ce7e-167f-402f-9cfd-6772ca3a473a" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC adapters - Request 1 1" id="cf556704-c4d7-4df5-a73e-28c861ab842b"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/adapters/rest/healthcheck" methodName="LocalHC adapters" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC adapters - Request 1 1" id="ea2c9416-63eb-4219-83fd-db0593bf63e3" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="55a8802a-c4c7-4b00-9c34-544b6f2c2e4f" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC vnfs - Request 1 1" id="cb8e0324-4f2d-4dd2-bf30-4194894e4a86"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/vnfs/rest/healthcheck" methodName="LocalHC vnfs" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC vnfs - Request 1 1" id="f2effc08-5569-4e5b-a2e8-fa3bebc958b9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/vnfs/admin/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="96fa9c64-d4cb-4906-933b-f36c3c31eab1" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC tenants - Request 1 1" id="03ffbb1f-5959-427a-acad-5169b5bf26bf"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/tenants/rest/healthcheck" methodName="LocalHC tenants" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC tenants - Request 1 1" id="432c2172-deba-4173-a0af-0b6fccfd60dc" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/tenants/admin/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="8ed6f872-3caa-498e-8fd1-242454f55f71" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC infra - Request 1 1" id="3fe1e622-d664-4d08-86a9-6df423b53d18"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/ecomp/mso/infra/healthcheck" methodName="LocalHC infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC infra - Request 1 1" id="287d8590-e1da-49e5-afef-5f7191a55925" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="7b18d303-ecb6-4723-9f6d-f0711ad48a80" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC asdc - Request 1 1" id="4d170588-4d18-4661-81db-f8a5d1174e75"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/asdc/healthcheck" methodName="LocalHC asdc" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC asdc - Request 1 1" id="b0d9d540-073e-4d1d-ac19-32566206d0c6" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/asdc/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="463074c6-e0f5-44e8-958d-b9dbd58be95c" name="Valid HTTP Status Codes"><con:configuration><codes>503</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="SetStatus true networks - Request 1 1" id="90dae7f6-d5a8-41aa-8aa6-a1715e1aec5d"><con:settings/><con:config service="SetStatus" resourcePath="/networks/rest/setStatus/{siteName}" methodName="SetStatus true networks" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="SetStatus true networks - Request 1 1" id="e0314e05-9a73-4402-a404-3a1b0aa78232" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/setStatus</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="94f233a7-37c8-40b9-8d57-53c6e50e2c3b" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#userlogin}</con:username><con:password>${#Project#userpassword}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>enable</con:entry><con:entry>siteName</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GetStatus RequestsDbAdapter - Request 1 18" id="f5131443-ad0d-4c22-bac0-1be3107bd44b"><con:settings/><con:config service="GetStatus" resourcePath="/dbadapters/RequestsDbAdapter" methodName="GetStatus RequestsDbAdapter" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GetStatus RequestsDbAdapter - Request 1 18" id="8fbeebe9-cdf0-4715-837c-16ae3cfdd5fb" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+<soapenv:Header/>
+<soapenv:Body>
+<req:getSiteStatus>
+<siteName>${#Project#sitename}</siteName>
+</req:getSiteStatus>
+</soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:originalUri>http://localhost/dbadapters/RequestsDbAdapter</con:originalUri><con:assertion type="Simple Contains" id="98f1d604-1865-45ac-ae71-3d94000738f3" name="Contains"><con:configuration><token>&lt;return>true&lt;/return></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="NodehealthcheckAPIH - Request 1 2" id="afd352c1-685b-4bd3-be41-72ba3f3e2885"><con:settings/><con:config service="NodeHealthCheck" resourcePath="/ecomp/mso/infra/nodehealthcheck" methodName="NodehealthcheckAPIH-Infra" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="NodehealthcheckAPIH - Request 1 2" id="00db386c-942d-4286-853f-01e279f6c2cb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/nodehealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="222b1461-2b33-4951-9c5d-87a850dc1971" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GlobalHC adapters - Request 1 3" id="0e877ae9-1d63-486c-8530-fc99e5416ac6"><con:settings/><con:config service="GlobalHealthcheck" resourcePath="/adapters/rest/globalhealthcheck" methodName="GlobalHC adapters" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GlobalHC adapters - Request 1 3" id="b1109ecf-fd73-4a30-8c98-ac50a10e9cb7" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/adapters/rest/globalhealthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="96e389cc-3e30-4ec0-b9bd-5eda145f6bbb" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="enableBpmn" value="${#Project#enableBpmn}" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>enableBpmn</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC tenants - Request 1 2" id="c87beffd-7f8b-408d-9275-5876f5eb5dd4"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/tenants/rest/healthcheck" methodName="LocalHC tenants" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC tenants - Request 1 2" id="432c2172-deba-4173-a0af-0b6fccfd60dc" mediaType="application/json"><con:settings/><con:endpoint>http://${#Project#jrahost}</con:endpoint><con:request/><con:originalUri>http://localhost/tenants/admin/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="99a55011-59f5-4693-9b9f-5c0400172b8e" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="LocalHC asdc - Request 1 2" id="5ea8229f-7cb6-4660-8b84-b9930822934a"><con:settings/><con:config service="SubModulesHealthcheck" resourcePath="/asdc/healthcheck" methodName="LocalHC asdc" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="LocalHC asdc - Request 1 2" id="b0d9d540-073e-4d1d-ac19-32566206d0c6" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#apihhost}</con:endpoint><con:request/><con:originalUri>http://localhost/asdc/healthcheck</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="eb5af8a7-1730-4b42-a604-10172a4a10ac" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:properties><con:property><con:name>apihhost</con:name><con:value>localhost:8080</con:value></con:property><con:property><con:name>jrahost</con:name><con:value>localhost:8080</con:value></con:property><con:property><con:name>userlogin</con:name><con:value>sitecontrol</con:value></con:property><con:property><con:name>userpassword</con:name><con:value>Domain2.0!</con:value></con:property><con:property><con:name>bpmnhost</con:name><con:value>localhost:8080</con:value></con:property><con:property><con:name>sitename</con:name><con:value>mso-docker</con:value></con:property><con:property><con:name>enableBpmn</con:name><con:value/></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/SoapUI/Local-API-Handler-soapui-project.xml b/packages/arquillian-unit-tests/src/test/resources/SoapUI/Local-API-Handler-soapui-project.xml
new file mode 100644 (file)
index 0000000..ca36eec
--- /dev/null
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<con:soapui-project name="Local API Handler" soapui-version="5.3.0" abortOnError="false" runType="SEQUENTIAL" activeEnvironment="Default" resourceRoot="" id="9a646d8d-db03-4dfa-95cd-648d7f44b915" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:RestService" wadlVersion="http://wadl.dev.java.net/2009/02" name="Services" type="rest" basePath="" id="317bf83a-7f7b-4729-ba1a-e2899ca168c1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:8080</con:endpoint></con:endpoints><con:resource name="POST Infra Service" path="/ecomp/mso/infra/v3/vnf-request" id="fb089255-2194-46e1-b406-345e2fad35f2"><con:settings/><con:parameters/><con:method name="POST VNF Request" method="POST" id="8b60dd49-212e-4db7-a548-f1c093e9844a"><con:settings/><con:parameters/><con:representation type="REQUEST"><con:mediaType>application/xml</con:mediaType><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1">v1:service-request</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/xml</con:mediaType><con:status>500 400 503 404 502 409</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/schema/v1">v1:service-response</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/xml</con:mediaType><con:status>202</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/schema/v1">v1:service-response</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 404 403 405 500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" mediaType="application/xml" postQueryString="false" id="18e2e366-aaf0-4df2-92a3-7a919e1c2fe8"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<aetgt:vnf-request xmlns:aetgt="http://ecomp.att.com/mso/infra/vnf-request/v1"
+                   xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1"
+                   xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+    <request-info>
+        <request-id>3d878a8e-51fa-44aa-8cb5-a56ae9352252</request-id>
+        <action>CREATE</action>
+        <source>PORTAL</source>
+    </request-info>
+    <vnf-inputs>
+        <vnf-name>yjvnfvmsc</vnf-name>
+        <vnf-type>VPE</vnf-type>
+        <service-type>SDN-ETHERNET-INTERNET</service-type>
+        <aic-node-clli>AUSTXAALCP1</aic-node-clli>
+        <tenant-id>276b95b6d2b04e2e830c976eb70c9405</tenant-id>
+    </vnf-inputs>
+    <vnf-params xmlns:tns="http://ecomp.att.com/mso/infra/vnf-request/v1"/>
+</aetgt:vnf-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:request></con:method><con:method name="GET VNF-Request" id="98b74741-c644-4c92-9dab-ec42a7dbdf83" method="GET"><con:settings/><con:parameters><con:parameter><con:name>vnf-type</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>service-type</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>aic-node-clli</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>tenant-id</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>volume-group-id</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>volume-group-name</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/vnf-request/v1">v1:vnf-requests</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>405</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="50221050-4e8a-46e3-95ab-471b796fdb07" mediaType="application/json"><con:settings/><con:endpoint>http://localhost:8080</con:endpoint><con:request/><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>vnf-type</con:entry><con:entry>service-type</con:entry><con:entry>aic-node-clli</con:entry><con:entry>tenant-id</con:entry><con:entry>volume-group-id</con:entry><con:entry>volume-group-name</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="vnf-types" path="/ecomp/mso/infra/v1/vnf-types" id="1185ee32-2213-45f5-ade4-d6e1ac56da94"><con:settings/><con:parameters><con:parameter><con:name>vnf-role</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:method name="Method 1" id="6061ff5b-9b9b-4351-8279-97f947f581b1" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 404 500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/vnf-request/v1">v1:vnf-types</con:element></con:representation><con:request name="Request 1" id="2cec4861-6675-43b2-82ef-a732613ad46b" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/V1/vnf-types</con:originalUri><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="vnf-role" value="test" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>vnf-role</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="Get Infra Network Request" path="/ecomp/mso/infra/v3/network-request" id="1185ee32-2213-45f5-ade4-d6e1ac56da94"><con:settings/><con:parameters/><con:method name="Method 1" id="6061ff5b-9b9b-4351-8279-97f947f581b1" method="GET"><con:settings/><con:parameters><con:parameter><con:name>network-type</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>tenant-id</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>service-type</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>aic-node-clli</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 404 500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/vnf-request/v1">v1:vnf-types</con:element></con:representation><con:request name="Get with params" id="2cec4861-6675-43b2-82ef-a732613ad46b" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/V1/vnf-types</con:originalUri><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>network-type</con:entry><con:entry>tenant-id</con:entry><con:entry>service-type</con:entry><con:entry>aic-node-clli</con:entry></con:parameterOrder></con:request></con:method><con:method name="POST Request" id="33786292-e4fc-4aeb-9526-265fe19a41c6" method="POST"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>application/xml</con:mediaType><con:status>400 500 409</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/network-request/v1">v1:network-request</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/xml</con:mediaType><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/vnf-request/v1">v1:network-request</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/xml</con:mediaType><con:status>202</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/network-request/v1">v1:network-request</con:element></con:representation><con:request name="Request 1" id="712ec3ee-609f-4b36-9f3a-75dfc1333714" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://localhost:8080</con:endpoint><con:request><![CDATA[ <vnfreq:request-info>
+            <vnfreq:action>CREATE</vnfreq:action>
+            <vnfreq:status-message>init-status-string</vnfreq:status-message>
+            <vnfreq:progress>1</vnfreq:progress>
+            <vnfreq:start-time>100</vnfreq:start-time>
+            <vnfreq:end-time>999</vnfreq:end-time>
+            <vnfreq:source>PORTAL</vnfreq:source>
+          </vnfreq:request-info>
+          <vnfreq:network-inputs>
+                <vnfreq:network-id>84fb3c78-7d4a-4297-9892-c4519fcc0552</vnfreq:network-id>
+                <vnfreq:network-name>Cricket_OCS_protected_net_0</vnfreq:network-name>
+                <vnfreq:network-type>vlan</vnfreq:network-type>
+                <vnfreq:service-type>0</vnfreq:service-type>
+                <vnfreq:aic-node-clli>RDM2WAGPLCP</vnfreq:aic-node-clli>
+                <vnfreq:tenant-id>ccd3946adf8e46ccb516fbb0a35db9e2</vnfreq:tenant-id>
+                <vnfreq:prov-status>str1234</vnfreq:prov-status>
+          </vnfreq:network-inputs>
+          <vnfreq:network-params>
+                <param name="shared">0</param>
+          </vnfreq:network-params>
+          <vnfreq:network-outputs>
+                <vnfreq:network-id></vnfreq:network-id>
+                <vnfreq:network-name>0</vnfreq:network-name>
+          </vnfreq:network-outputs>
+        </vnf-request>
+]]></con:request><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:request></con:method></con:resource><con:resource name="network-types" path="/ecomp/mso/infra/v1/network-types" id="1185ee32-2213-45f5-ade4-d6e1ac56da94"><con:settings/><con:parameters/><con:method name="Method 1" id="6061ff5b-9b9b-4351-8279-97f947f581b1" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 404 500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/vnf-request/v1">v1:vnf-types</con:element></con:representation><con:request name="Request 1" id="2cec4861-6675-43b2-82ef-a732613ad46b" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/V1/vnf-types</con:originalUri><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:request></con:method></con:resource><con:resource name="Get Infra Network RequestID" path="/ecomp/mso/infra/v1/network-request/{request-id}" id="1185ee32-2213-45f5-ade4-d6e1ac56da94"><con:settings/><con:parameters><con:parameter><con:name>request-id</con:name><con:value/><con:style>TEMPLATE</con:style><con:default/></con:parameter></con:parameters><con:method name="Method 2" id="7ede6b49-9556-4c5b-91bf-1e057edc3dbb" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/network-request/v1">v1:network-request</con:element></con:representation><con:request name="Get request-id" id="b2ee42d4-3290-4194-954b-5599ad728a8f" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://localhost:8080</con:endpoint><con:request/><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:request></con:method></con:resource><con:resource name="GET VNF Request RequestId" path="/ecomp/mso/infra/v1/vnf-request/{request-id}" id="fb089255-2194-46e1-b406-345e2fad35f2"><con:settings/><con:parameters><con:parameter><con:name>request-id</con:name><con:value/><con:style>TEMPLATE</con:style><con:default/></con:parameter></con:parameters><con:method name="GET VNF-Request on RequestID" id="98b74741-c644-4c92-9dab-ec42a7dbdf83" method="GET"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/vnf-request/v1">v1:vnf-request</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>404 400</con:status><con:params/><con:element>html</con:element></con:representation><con:request name="Request 1" id="50221050-4e8a-46e3-95ab-471b796fdb07" mediaType="application/json"><con:settings/><con:endpoint>http://localhost:8080</con:endpoint><con:request/><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:request></con:method></con:resource><con:resource name="POST Infra volume request" path="/ecomp/mso/infra/v2/volume-request" id="1185ee32-2213-45f5-ade4-d6e1ac56da94"><con:settings/><con:parameters><con:parameter><con:name>tenantId</con:name><con:style>QUERY</con:style></con:parameter><con:parameter><con:name>vnf-type</con:name><con:style>QUERY</con:style></con:parameter></con:parameters><con:method name="Method 2" id="7ede6b49-9556-4c5b-91bf-1e057edc3dbb" method="POST"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/network-request/v1">v1:network-request</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/volume-request/v1">v1:volume-request</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/xml</con:mediaType><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/volume-request/v1">v1:volume-request</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/xml</con:mediaType><con:status>400 501</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/volume-request/v1">v1:volume-request</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/xml</con:mediaType><con:status>202</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/volume-request/v1">v1:volume-request</con:element></con:representation><con:request name="POST volume Request" id="b2ee42d4-3290-4194-954b-5599ad728a8f" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://localhost:8080</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<volume-request xmlns="http://ecomp.att.com/mso/infra/volume-request/v1">
+    <request-info>
+        <request-id>cfbca420-14d5-4e68-ad84-b56715c946f4</request-id>
+        <action>DELETE_VF_MODULE_VOL</action>
+        <source>PORTAL</source>
+    </request-info>
+    <volume-inputs>
+        <vnf-type>Nimbus_LU2_PXTC_Svc/PXTC_v5 1</vnf-type>
+        <vf-module-model-name>PXTC_v5::module-1</vf-module-model-name>
+        <backout-on-failure>true</backout-on-failure>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <aic-cloud-region>rdm3</aic-cloud-region>
+        <tenant-id>eecd15e8e7ee46c3bbc2096f0924f4c4</tenant-id>
+        <volume-group-id>da9e0bdf-7d88-4111-bcad-8b72e3a5e601</volume-group-id>
+    </volume-inputs>
+</volume-request>
+]]></con:request><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#user-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:request></con:method><con:method name="Getinfo" id="bbad9a54-6630-4679-b6ef-2298202784ac" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>404 405</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/volume-request/v1">v1:volume-requests</con:element></con:representation><con:request name="Request 1" id="706b2d9c-7802-4160-9fa2-31537f0131fb" mediaType="application/json"><con:settings/><con:endpoint>http://localhost:8080</con:endpoint><con:request/><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>tenantId</con:entry><con:entry>vnf-type</con:entry></con:parameterOrder></con:request></con:method></con:resource></con:interface><con:testSuite name="simple_tests_endpoints" id="580326d7-451f-4771-8ac3-4f3607322cfd"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="API-Handler Infra" searchProperties="true" id="c89486a1-bb89-47fd-80e4-f02c099406a7" timeout="0" wsrmEnabled="false" wsrmVersion="1.0" wsrmAckTo="" amfAuthorisation="false" amfEndpoint="" amfLogin="" amfPassword=""><con:settings/><con:testStep type="restrequest" name="POST VNF request - Bad Operation type" id="2f6be053-b9d9-491e-bbf1-5e8eb6f3e6e5"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v3/vnf-request" methodName="POST VNF Request" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST VNF request - Bad Operation type" mediaType="application/xml" postQueryString="false" id="3b7e6477-e002-43f0-9350-ea126ad08aaf"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<vnf-request xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+    <request-info>
+        <request-id>3d878a8e-51fa-44aa-8cb5-a56ae9352262</request-id>
+        <action>CREATE_VF_MODUL</action>
+        <source>PORTAL</source>
+    </request-info>
+    <vnf-inputs>
+                <vnf-id>f7949288-876d-47c2-9a8c-aed107e7e016</vnf-id>
+        <vf-module-id>a9f67f55-7424-43e2-b000-f97663194976</vf-module-id>
+        <vnf-name>zrdm3ssdr02</vnf-name>
+        <vf-module-name>zrdm3ssdr02_mod_1</vf-module-name>
+        <vnf-type>Nimbus_LU2_SSDnoLM_Svc/SSDR_wo_LM_v10 2</vnf-type>
+        <vf-module-model-name>SSDR_wo_LM_v10::module-0</vf-module-model-name>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <service-instance-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-instance-id>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <aic-cloud-region>rdm3</aic-cloud-region>
+        <tenant-id>eecd15e8e7ee46c3bbc2096f0924f4c4</tenant-id>
+    </vnf-inputs>
+</vnf-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services</con:originalUri><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes 404" id="ddd48b7b-605e-461a-a80d-bd105db133ca"><con:configuration><codes>400
+
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains Status FAILED" id="8175eda8-425c-4d1d-9dd2-267c8150f241"><con:configuration><token>No valid action</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="POST VNF request" id="1e52593b-ee1d-499d-a95e-7f1f7235b904"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v3/vnf-request" methodName="POST VNF Request" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST VNF request" mediaType="application/xml" postQueryString="false" id="6d727ada-da68-4a94-8f33-f82953731cd5"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<vnf-request xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+    <request-info>
+        <request-id>3d878a8e-51fa-44aa-8cb5-a56ae9352262</request-id>
+        <action>CREATE_VF_MODULE</action>
+        <source>PORTAL</source>
+    </request-info>
+    <vnf-inputs>
+          <vnf-id>f7949288-876d-47c2-9a8c-aed107e7e016</vnf-id>
+        <vf-module-id>a9f67f55-7424-43e2-b000-f97663194976</vf-module-id>
+        <vnf-name>zrdm3ssdr02</vnf-name>
+        <vf-module-name>zrdm3ssdr02_mod_1</vf-module-name>
+        <vnf-type>Nimbus_LU2_SSDnoLM_Svc/SSDR_wo_LM_v10 2</vnf-type>
+        <vf-module-model-name>SSDR_wo_LM_v10::module-0</vf-module-model-name>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <service-instance-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-instance-id>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <aic-cloud-region>rdm3</aic-cloud-region>
+        <tenant-id>eecd15e8e7ee46c3bbc2096f0924f4c4</tenant-id>
+    </vnf-inputs>
+</vnf-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services</con:originalUri><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="19038271-9229-4ae5-a743-24d0b2790cae"><con:configuration><codes>202
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains Status FAILED" id="dfef30b8-13ab-486f-97b8-8f9eed1c9ac1"><con:configuration><token> &lt;request-status>IN_PROGRESS&lt;/request-status></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" id="a2ada473-6532-4a17-a5ca-067edaa35bc1" name="Contains Vnf-name"><con:configuration><token>&lt;vnf-name>zrdm3ssdr02&lt;/vnf-name></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="transfer" name="RequestID Property Transfer" id="de18c687-eef5-4dbf-8f32-25d3e7e139e3"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>request-id</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>POST VNF request</con:sourceStep><con:sourcePath>//*:request-id</con:sourcePath><con:targetType>request-id</con:targetType><con:targetStep>GET VNF Request by requestID</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="POST VNF request - Duplicated" id="69dbd824-7fd0-4d51-ad97-aedd3144dd79"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v3/vnf-request" methodName="POST VNF Request" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST VNF request - Duplicated" mediaType="application/xml" postQueryString="false" id="cd5b21f7-2aad-416c-af90-fe2825b52eef"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<vnf-request xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+    <request-info>
+        <request-id>3d878a8e-51fa-44aa-8cb5-a56ae9352262</request-id>
+        <action>CREATE_VF_MODULE</action>
+        <source>PORTAL</source>
+    </request-info>
+    <vnf-inputs>
+          <vnf-id>f7949288-876d-47c2-9a8c-aed107e7e016</vnf-id>
+        <vf-module-id>a9f67f55-7424-43e2-b000-f97663194976</vf-module-id>
+        <vnf-name>zrdm3ssdr02</vnf-name>
+        <vf-module-name>zrdm3ssdr02_mod_1</vf-module-name>
+        <vnf-type>Nimbus_LU2_SSDnoLM_Svc/SSDR_wo_LM_v10 2</vnf-type>
+        <vf-module-model-name>SSDR_wo_LM_v10::module-0</vf-module-model-name>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <service-instance-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-instance-id>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <aic-cloud-region>rdm3</aic-cloud-region>
+        <tenant-id>eecd15e8e7ee46c3bbc2096f0924f4c4</tenant-id>
+    </vnf-inputs>
+</vnf-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services</con:originalUri><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes 404" id="5a64a648-ebe2-4ff2-ba2c-f8ea495cfce4"><con:configuration><codes>409
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains status FAILED" id="9af594a7-04c3-42b5-bf3b-63bf83feaabb"><con:configuration><token>&lt;request-status>FAILED&lt;/request-status></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains vnf-type not found" id="cd1b9d06-5e29-4f36-b021-ab2da2c806c0"><con:configuration><token>vnf-id (f7949288-876d-47c2-9a8c-aed107e7e016) is locked</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="POST VNF request - vf-module-name not there" id="d71f1516-a666-49b7-86e9-3d6a636eb711"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v3/vnf-request" methodName="POST VNF Request" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST VNF request - vf-module-name not there" mediaType="application/xml" postQueryString="false" id="420544d1-9f22-4985-b950-0ac6aeb8704d"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<vnf-request xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+    <request-info>
+        <request-id>3d878a8e-51fa-44aa-8cb5-a56ae9352263</request-id>
+        <action>CREATE_VF_MODULE</action>
+        <source>PORTAL</source>
+    </request-info>
+    <vnf-inputs>
+    
+        <vnf-name>zrdm3ssdr02</vnf-name>
+        <vnf-type>Nimbus_LU2_SSDnoLM_Svc/SSDR_wo_LM_v10 2</vnf-type>
+        <vf-module-model-name>SSDR_wo_LM_v10::module-0</vf-module-model-name>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <service-instance-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-instance-id>
+      
+        <aic-cloud-region>rdm3</aic-cloud-region>
+        <tenant-id>eecd15e8e7ee46c3bbc2096f0924f4c4</tenant-id>
+    </vnf-inputs>
+</vnf-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services</con:originalUri><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes 400" id="5deb0c9a-3c9f-4dd4-b9f7-3c09a63691dc"><con:configuration><codes>400
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains status FAILED" id="349536b5-b5d7-40f4-b556-a2c2704c2969"><con:configuration><token>&lt;request-status>FAILED&lt;/request-status></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" id="0a0adadc-1871-498f-a1d4-ceb0b81ff5e4" name="Contains validation failed"><con:configuration><token>&lt;status-message>Service request FAILED schema validation.</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" id="804da7da-09ae-4361-8ba7-857065cbd0b8" name="Contains"><con:configuration><token>No valid vf-module-name is</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="POST DELETE VNF request" id="8e6a8f21-46e3-49e4-aab8-040110a0dca4"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v3/vnf-request" methodName="POST VNF Request" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST DELETE VNF request" mediaType="application/xml" postQueryString="false" id="7abc7153-bc0b-422b-ba7c-d78559911539"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<vnf-request xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1">
+    <request-info>
+        <request-id>3d878a8e-51fa-44aa-8cb5-a56ae9352263</request-id>
+        <action>DELETE_VF_MODULE</action>
+        <source>PORTAL</source>
+    </request-info>
+    <vnf-inputs>
+        <vnf-id>f7949288-876d-47c2-9a8c-aed107e7e016</vnf-id>
+        <vnf-name>zrdm3ssdr02</vnf-name>
+        <vf-module-name>zrdm3ssdr02_mod_1</vf-module-name>
+        <vnf-type>Nimbus_LU2_SSDnoLM_Svc/SSDR_wo_LM_v10 2</vnf-type>
+        <vf-module-model-name>SSDR_wo_LM_v10::module-0</vf-module-model-name>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <service-instance-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-instance-id>
+        <vf-module-id>a9f67f55-7424-43e2-b000-f97663194976</vf-module-id>
+        <aic-cloud-region>rdm3</aic-cloud-region>
+        <tenant-id>eecd15e8e7ee46c3bbc2096f0924f4c4</tenant-id>
+    </vnf-inputs>
+</vnf-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services</con:originalUri><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes 500" id="96d06fb6-9b19-4e8d-b683-e53933387ef1"><con:configuration><codes>202</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains status FAILED" id="88bce2e8-9fa3-412c-8bda-2d499316f7e7"><con:configuration><token>&lt;request-status>IN_PROGRESS&lt;/request-status></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" id="8189de04-9702-4728-a6ce-fb5c0b52890c" name="Contains vnf-name"><con:configuration><token>&lt;vnf-name>zrdm3ssdr02&lt;/vnf-name></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GET VNF Request by requestID" id="5eef4656-368c-4f30-8959-f6deb3464f8a"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v1/vnf-request/{request-id}" methodName="GET VNF-Request on RequestID" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GET VNF Request by requestID" id="50221050-4e8a-46e3-95ab-471b796fdb07" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/v1/vnf-request/01bef4ef-fa1b-4fd4-b46d-12ada0d4d7e1</con:originalUri><con:assertion type="Simple Contains" id="8a421cd3-9266-4bda-bd86-b525f6b51e42" name="Contains status FAILED"><con:configuration><token>  &lt;request-status>IN_PROGRESS&lt;/request-status></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="2d5f6711-2821-4378-af92-df7a4a5a4a94" name="Contain HTTP 200"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters>
+  <con:entry key="tenantId" value="276b95b6d2b04e2e830c976eb70c9405"/>
+  <con:entry key="request-id" value="eb8ffc49-3ec9-47aa-906b-a73a7321576f"/>
+</con:parameters><con:parameterOrder><con:entry>vnf-type</con:entry><con:entry>service-type</con:entry><con:entry>aic-node-clli</con:entry><con:entry>tenantId</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GET VNF type without params" id="38720eda-db36-4211-b016-56fda64432a2"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v1/vnf-types" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GET VNF type without params" id="2cec4861-6675-43b2-82ef-a732613ad46b" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/V1/vnf-types</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="ea718918-02d8-449b-b121-bb457f97af9e" name="Contains HTTP 200"><con:configuration><codes>200
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" id="7e273fa1-4feb-4f37-91b8-aefafa35710a" name="Contains XML Header"><con:configuration><token>&lt;vnf-types xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1"/></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>vnf-role</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="POST Network Request CREATE" id="07d8a090-8366-474c-943e-1e31c5afae23"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v3/network-request" methodName="POST Request" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST Network Request CREATE" id="712ec3ee-609f-4b36-9f3a-75dfc1333714" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<network-request xmlns="http://ecomp.att.com/mso/infra/network-request/v1">
+       <request-info>
+               <request-id>f9d87288-b726-4b23-a207-8eb845a7b8d9</request-id>
+               <action>CREATE</action>
+               <source>PORTAL</source>
+       </request-info>
+       <network-inputs>
+               <network-name>Mobisupport-25193-T-Willows2_cor_pcrf_sy_net_1</network-name>
+               <network-type>CONTRAIL30_BASIC</network-type>
+               <service-instance-id>868d854d-b145-4929-b476-f0f9dc01d0ab</service-instance-id>
+               <backout-on-failure>true</backout-on-failure>
+               <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+               <aic-cloud-region>rdm3</aic-cloud-region>
+               <tenant-id>e5225256ffcc4e22928a432f2bcee195</tenant-id>
+       </network-inputs>
+</network-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/infra/v1/network-request</con:originalUri><con:assertion type="Simple Contains" id="0ffaae8e-6fdd-46ca-af73-2c3361a855de" name="FAILED"><con:configuration><token>IN_PROGRESS</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="e8b9b7c8-909b-4cb5-b995-d744f8a1553f" name="Contains HTTP 404,500"><con:configuration><codes>202
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" id="d5f2d559-2b0e-4283-8c24-f268aa9a5968" name="Contains network name"><con:configuration><token>&lt;network-name>Mobisupport-25193-T-Willows2_cor_pcrf_sy_net_1&lt;/network-name></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="POST Network Request CREATE - duplicate" id="03273950-53b3-4f16-b384-0c887ba57b53"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v3/network-request" methodName="POST Request" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST Network Request CREATE - duplicate" id="712ec3ee-609f-4b36-9f3a-75dfc1333714" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<network-request xmlns="http://ecomp.att.com/mso/infra/network-request/v1">
+       <request-info>
+               <request-id>f9d87288-b726-4b23-a207-8eb845a7b8d9</request-id>
+               <action>CREATE</action>
+               <source>PORTAL</source>
+       </request-info>
+       <network-inputs>
+               <network-name>Mobisupport-25193-T-Willows2_cor_pcrf_sy_net_1</network-name>
+               <network-type>CONTRAIL30_BASIC</network-type>
+               <service-instance-id>868d854d-b145-4929-b476-f0f9dc01d0ab</service-instance-id>
+               <backout-on-failure>true</backout-on-failure>
+               <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+               <aic-cloud-region>rdm3</aic-cloud-region>
+               <tenant-id>e5225256ffcc4e22928a432f2bcee195</tenant-id>
+       </network-inputs>
+</network-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/infra/v1/network-request</con:originalUri><con:assertion type="Simple Contains" id="0ffaae8e-6fdd-46ca-af73-2c3361a855de" name="FAILED"><con:configuration><token>IN_PROGRESS</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="e8b9b7c8-909b-4cb5-b995-d744f8a1553f" name="Contains HTTP 404,500"><con:configuration><codes>409</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" id="d5f2d559-2b0e-4283-8c24-f268aa9a5968" name="Contains network name"><con:configuration><token>&lt;network-name>Mobisupport-25193-T-Willows2_cor_pcrf_sy_net_1&lt;/network-name></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" id="288d5084-4871-4ba1-89e1-c7166dc81e93" name="Contains"><con:configuration><token>is locked</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="transfer" name="Network RequestID Property Transfer" id="52b0a921-6b93-4308-b081-68534a706601"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>request-id</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>POST Network Request CREATE</con:sourceStep><con:sourcePath>//*:request-id</con:sourcePath><con:targetType>request-id</con:targetType><con:targetStep>GET NEtwork Request by request ID</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="GET NEtwork Request by tenant" id="dfb85365-6e91-4f03-a729-95f3af8ded0f"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v3/network-request" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GET NEtwork Request by tenant" id="2cec4861-6675-43b2-82ef-a732613ad46b" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/V1/vnf-types</con:originalUri><con:assertion type="Simple Contains" id="ec232741-fb15-47ce-9c65-3f280557c6a1" name="Contains TenantId"><con:configuration><token>e5225256ffcc4e22928a432f2bcee195</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="9db3d729-a3a7-4244-84b8-5ccad5112b44" name="Contains HTTP 200"><con:configuration><codes>200
+</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="tenant-id" value="e5225256ffcc4e22928a432f2bcee195" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>network-type</con:entry><con:entry>tenant-id</con:entry><con:entry>service-type</con:entry><con:entry>aic-node-clli</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="GET NEtwork Request by request ID" id="3dd308e9-e017-4578-8c4b-8b76089a6f12"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v1/network-request/{request-id}" methodName="Method 2" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="GET NEtwork Request by request ID" id="2cec4861-6675-43b2-82ef-a732613ad46b" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/V1/vnf-types</con:originalUri><con:assertion type="Simple Contains" id="ec232741-fb15-47ce-9c65-3f280557c6a1" name="Contains RequestID"><con:configuration><token>Mobisupport-25193-T-Willows2_cor_pcrf_sy_net_1</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="9db3d729-a3a7-4244-84b8-5ccad5112b44" name="Contains HTTP 200"><con:configuration><codes>200
+</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters>
+  <con:entry key="tenantId" value="ccd3946adf8e46ccb516fbb0a35db9e2"/>
+  <con:entry key="request-id" value="6e4b6ce1-4c90-4d1b-aba7-7f148bbcfeb5"/>
+</con:parameters><con:parameterOrder><con:entry>network-type</con:entry><con:entry>tenantId</con:entry><con:entry>service-type</con:entry><con:entry>aic-node-clli</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="Get Network Types" id="b612f151-c8c5-4bc4-89b9-211b88d458ad"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v1/network-types" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Get Network Types" id="2cec4861-6675-43b2-82ef-a732613ad46b" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/V1/vnf-types</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="347865b8-b8d8-4d84-9ae9-b45725a094b0" name="Contain HTTP 200"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" id="d6e3ef64-f089-451c-a670-60cc8b2406f0" name="Contains vlan"><con:configuration><token>vlan</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" id="3b20159c-94ab-4040-887c-11cb8149dc3b" name="Contains  Description"><con:configuration><token> &lt;description>Cool network&lt;/description>
+</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="POST Volume request" id="3a64e190-b5fc-483e-9a25-0a6f2ce333db"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v2/volume-request" methodName="Method 2" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST Volume request" id="b2ee42d4-3290-4194-954b-5599ad728a8f" mediaType="application/xml" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<volume-request xmlns="http://ecomp.att.com/mso/infra/volume-request/v1">
+    <request-info>
+        <request-id>cfbca420-14d5-4e68-ad84-b56715c946f4</request-id>
+        <action>CREATE_VF_MODULE_VOL</action>
+        <source>PORTAL</source>
+    </request-info>
+    <volume-inputs>
+          <vnf-id>test</vnf-id>
+        <vnf-type>Nimbus_LU2_PXTC_Svc/PXTC_v5 1</vnf-type>
+        <vf-module-model-name>PXTC_v5::module-1</vf-module-model-name>
+        <backout-on-failure>true</backout-on-failure>
+        <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
+        <service-instance-id>test</service-instance-id>
+        <aic-cloud-region>rdm3</aic-cloud-region>
+        <tenant-id>eecd15e8e7ee46c3bbc2096f0924f4c4</tenant-id>
+        <volume-group-id>da9e0bdf-7d88-4111-bcad-8b72e3a5e601</volume-group-id>
+        <volume-group-name>test</volume-group-name>
+    </volume-inputs>
+</volume-request>
+]]></con:request><con:originalUri>http://ihoap24.cif.att.com/ecomp/mso/infra/v3/volume-request</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="4b4088c5-0c35-4234-a473-82ee5a7c47a3" name="Valid HTTP Status Codes"><con:configuration><codes>202
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" id="e4ba3d2e-554a-4ee5-b3b0-065e18405937" name="Contains"><con:configuration><token>&lt;request-status>IN_PROGRESS&lt;/request-status></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="Get volume-request" id="07b3941f-5c08-40ff-8520-e05e3c07cc21"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v2/volume-request" methodName="Getinfo" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Get volume-request" id="706b2d9c-7802-4160-9fa2-31537f0131fb" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/infra/v3/volume-request</con:originalUri><con:assertion type="Simple Contains" id="738527b7-addd-47e7-8c7a-1f16172ea857" name="Contains"><con:configuration><token>&lt;tenant-id>eecd15e8e7ee46c3bbc2096f0924f4c4&lt;/tenant-id></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="2eb7e819-df02-47d6-8539-e96cba65ba0b" name="Valid HTTP Status Codes"><con:configuration><codes>200
+
+</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="tenantId" value="eecd15e8e7ee46c3bbc2096f0924f4c4" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>tenantId</con:entry><con:entry>vnf-type</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:properties><con:property><con:name>host</con:name><con:value>ihoap24.cif.att.com:18080</con:value></con:property><con:property><con:name>user-infraportal</con:name><con:value>InfraPortalClient</con:value></con:property><con:property><con:name>password-infraportal</con:name><con:value>password1$</con:value></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOConfig-soapui-project.xml b/packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOConfig-soapui-project.xml
new file mode 100644 (file)
index 0000000..82c0fae
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<con:soapui-project name="MsoConfig" soapui-version="5.3.0" abortOnError="false" runType="SEQUENTIAL" activeEnvironment="Default" resourceRoot="" id="9a646d8d-db03-4dfa-95cd-648d7f44b915" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:RestService" wadlVersion="http://wadl.dev.java.net/2009/02" name="Services" type="rest" basePath="" id="317bf83a-7f7b-4729-ba1a-e2899ca168c1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:8080</con:endpoint></con:endpoints><con:resource name="apihandlerinfra-show" path="/ecomp/mso/infra/properties/show" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters/><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="apihandlerinfra-encrypt" path="/ecomp/mso/infra/properties/encrypt/{value}/{cryptkey}" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters><con:parameter><con:name>value</con:name><con:value>mso</con:value><con:style>TEMPLATE</con:style><con:default>mso</con:default></con:parameter><con:parameter><con:name>cryptkey</con:name><con:value>566B754875657232314F5548556D3665</con:value><con:style>TEMPLATE</con:style><con:default>566B754875657232314F5548556D3665</con:default></con:parameter></con:parameters><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>value</con:entry><con:entry>cryptkey</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="network-show" path="/networks/rest/properties/show" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters/><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="network-encrypt" path="/networks/rest/properties/encrypt/{value}/{cryptkey}" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters><con:parameter><con:name>value</con:name><con:value>mso</con:value><con:style>TEMPLATE</con:style><con:default>mso</con:default></con:parameter><con:parameter><con:name>cryptkey</con:name><con:value>566B754875657232314F5548556D3665</con:value><con:style>TEMPLATE</con:style><con:default>566B754875657232314F5548556D3665</con:default></con:parameter></con:parameters><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>value</con:entry><con:entry>cryptkey</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="network-cloud-show" path="/networks/rest/cloud/showConfig" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters/><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="network-cloud-resetClientCache" path="/networks/rest/cloud/resetClientCaches" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters/><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="network-cloud-cleanupClientCaches" path="/networks/rest/cloud/cleanupClientCaches" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters/><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="network-cloud-encryptPassword" path="/networks/rest/cloud/encryptPassword/{pwd}" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters><con:parameter><con:name>pwd</con:name><con:value/><con:style>TEMPLATE</con:style><con:default/></con:parameter></con:parameters><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="pwd" value="mso" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>pwd</con:entry></con:parameterOrder></con:request></con:method></con:resource><con:resource name="asdc-show" path="/asdc/properties/show" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters/><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:request></con:method></con:resource><con:resource name="asdc-encrypt" path="/asdc/properties/encrypt/{value}/{cryptkey}" id="eb251d03-9d97-4a50-b16d-883b5aacf44c"><con:settings/><con:parameters><con:parameter><con:name>value</con:name><con:value>mso</con:value><con:style>TEMPLATE</con:style><con:default>mso</con:default></con:parameter><con:parameter><con:name>cryptkey</con:name><con:value>566B754875657232314F5548556D3665</con:value><con:style>TEMPLATE</con:style><con:default>566B754875657232314F5548556D3665</con:default></con:parameter></con:parameters><con:method name="Method 1" id="3a097f13-cf93-44f3-923e-9f35d92ba347" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 403 500 404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/plain</con:mediaType><con:status>200</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>value</con:entry><con:entry>cryptkey</con:entry></con:parameterOrder></con:request></con:method></con:resource></con:interface><con:testSuite name="test_config_endpoints TestSuite" id="580326d7-451f-4771-8ac3-4f3607322cfd"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="ada487f2-c127-4032-86fc-24c3b401939d" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="APiHandlerInfra testConfig" searchProperties="true"><con:settings/><con:testStep type="restrequest" name="ApiHandlerInfra-MsoPropertiesShow" id="fa19cf56-ee4c-45c7-8b6c-bc7cb81b122e"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/properties/show" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="ApiHandlerInfra-MsoPropertiesShow" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="04575060-e81b-4609-893c-47df2386c9fe" name="Contains ApiHandlerInfra config"><con:configuration><token>Config file </token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="17fc52a7-ab93-47e7-aadf-3f5e7d1e80a8" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="ApiHandlerInfra-MsoPropertiesEncrypt" id="c7120b5b-3188-42a7-a5da-e34e1f2783d6"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/properties/encrypt/{value}/{cryptkey}" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="ApiHandlerInfra-MsoPropertiesEncrypt" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="c0e9dbbd-bcd4-423a-89bd-47b749b6efd7" name="Contains Encoded string"><con:configuration><token>32221B0E4D30434BAE82C67492419CF8</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>value</con:entry><con:entry>cryptkey</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="76989651-aadf-4253-9ced-f31488e62f56" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Network testConfig" searchProperties="true"><con:settings/><con:testStep type="restrequest" name="Network-MsoPropertiesShow" id="718babec-0d05-4663-96a6-2ff2c01e3d53"><con:settings/><con:config service="Services" resourcePath="/networks/rest/properties/show" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Network-MsoPropertiesShow" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="04575060-e81b-4609-893c-47df2386c9fe" name="Contains ApiHandlerInfra config"><con:configuration><token>Config file </token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="305e66b9-4cba-4111-8c24-e4cef067aa7a" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="Network-MsoPropertiesEncrypt" id="4d36e0fa-9c6e-4b7f-bc5d-0ccb9f2b9772"><con:settings/><con:config service="Services" resourcePath="/networks/rest/properties/encrypt/{value}/{cryptkey}" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Network-MsoPropertiesEncrypt" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="c0e9dbbd-bcd4-423a-89bd-47b749b6efd7" name="Contains Encoded string"><con:configuration><token>32221B0E4D30434BAE82C67492419CF8</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>value</con:entry><con:entry>cryptkey</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="cc441f6b-920a-4b6c-80c3-976f75bd452e" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Network testCloudConfig" searchProperties="true"><con:settings/><con:testStep type="restrequest" name="Network-showCloudConfig" id="0a1ec3c9-113b-45f0-903f-dc38fec8281c"><con:settings/><con:config service="Services" resourcePath="/networks/rest/cloud/showConfig" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Network-showCloudConfig" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="5256ce2c-a288-4df0-87e5-4676af987f09" name="Contains CloudConfig 1"><con:configuration><token>CloudSite:</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" id="46a1a2a1-db66-4104-acfb-c925ae813fe8" name="Contains"><con:configuration><token>Cloud Identity Service:</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="a4b1b9de-207c-477d-b607-831a7f3744d2" name="Valid HTTP Status Codes"><con:configuration><codes>200
+</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="Network-resetClientCache" id="128e3402-e939-44cb-8a0a-0f3f3b9fce86"><con:settings/><con:config service="Services" resourcePath="/networks/rest/cloud/resetClientCaches" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Network-resetClientCache" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="a55d0f14-6fb3-4b3c-930e-16810f6dd67f" name="Contains Caches reset"><con:configuration><token>Client caches reset.  All entries removed.</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="Network-cleanupClientCache" id="723e6809-17ad-4529-bb71-4134f1f9e645"><con:settings/><con:config service="Services" resourcePath="/networks/rest/cloud/cleanupClientCaches" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Network-cleanupClientCache" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="fecccae4-9493-479a-be30-9015dabf84c2" name="Contains Caches cleanup"><con:configuration><token>Client caches cleaned up.  All expired entries removed</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="Network-encryptPassword" id="09622065-23e6-4bf0-967a-95e7cfcd7daa"><con:settings/><con:config service="Services" resourcePath="/networks/rest/cloud/encryptPassword/{pwd}" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Network-encryptPassword" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="0251a62b-70b7-4d59-a41d-b924118ea515" name="Contains Encrypted Password"><con:configuration><token>Encrypted Password = BD658F0271882F8285C0D9EC839C4178</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="pwd" value="mso" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>pwd</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="922f33ed-8787-4cdc-9b10-573371760e80" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="ASDC testConfig" searchProperties="true"><con:settings/><con:testStep type="restrequest" name="ASDC-MsoPropertiesShow" id="5fa93824-29e8-4af1-a93a-d56002e9c93b"><con:settings/><con:config service="Services" resourcePath="/asdc/properties/show" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="ASDC-MsoPropertiesShow" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="04575060-e81b-4609-893c-47df2386c9fe" name="Contains ASDC config"><con:configuration><token>Config file </token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="e33b8f20-f0fb-4e9f-bf8c-e1960ee5c3f8" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/></con:restRequest></con:config></con:testStep><con:testStep type="restrequest" name="ASDC-MsoPropertiesEncrypt" id="3f8b4c24-0d35-4735-840c-2e1d8194cd8e"><con:settings/><con:config service="Services" resourcePath="/asdc/properties/encrypt/{value}/{cryptkey}" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="ASDC-MsoPropertiesEncrypt" id="fa27bb04-9df7-4e1d-b4a7-668ab7b241a9" mediaType="application/json"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request/><con:originalUri>http://localhost/ecomp/mso/properties/show</con:originalUri><con:assertion type="Simple Contains" id="c0e9dbbd-bcd4-423a-89bd-47b749b6efd7" name="Contains Encoded string"><con:configuration><token>32221B0E4D30434BAE82C67492419CF8</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder><con:entry>value</con:entry><con:entry>cryptkey</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:properties><con:property><con:name>host</con:name><con:value>localhost:18080</con:value></con:property><con:property><con:name>user-infraportal</con:name><con:value>InfraPortalClient</con:value></con:property><con:property><con:name>password-infraportal</con:name><con:value>password1$</con:value></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/SoapUI/MSONetworkAdapter-soapui-project.xml b/packages/arquillian-unit-tests/src/test/resources/SoapUI/MSONetworkAdapter-soapui-project.xml
new file mode 100644 (file)
index 0000000..27c7fec
--- /dev/null
@@ -0,0 +1,596 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<con:soapui-project id="5ab0314b-3550-4174-a9da-938c45d052ad" activeEnvironment="Default" name="MSONetworkAdapter" resourceRoot="${projectDir}" soapui-version="5.3.0" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" id="511a8e41-5d4c-4259-9027-0e95942c06fe" wsaVersion="NONE" name="MsoNetworkAdapterImplPortBinding" type="wsdl" bindingName="{http://com.att.mso/network}MsoNetworkAdapterImplPortBinding" soapVersion="1_1" anonymous="optional" definition="../../../../../../adapters/mso-network-adapter/target/generated-sources/wsdl/NetworkAdapter.wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="file:\C:\Dev\Git\mso-unified\adapters\mso-network-adapter\target\generated-sources\wsdl\NetworkAdapter.wsdl"><con:part><con:url>file:\C:\Dev\Git\mso-unified\adapters\mso-network-adapter\target\generated-sources\wsdl\NetworkAdapter.wsdl</con:url><con:content><![CDATA[<!--Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01  svn-revision#13316.-->
+<definitions targetNamespace="http://com.att.mso/network" name="NetworkAdapter" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://com.att.mso/network" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+  <types>
+    <xs:schema version="1.0" targetNamespace="http://com.att.mso/network" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:element name="NetworkAlreadyExists" nillable="true" type="tns:networkExceptionBean"/>
+      <xs:element name="NetworkException" nillable="true" type="tns:networkExceptionBean"/>
+      <xs:element name="createNetwork" type="tns:createNetwork"/>
+      <xs:element name="createNetworkResponse" type="tns:createNetworkResponse"/>
+      <xs:element name="deleteNetwork" type="tns:deleteNetwork"/>
+      <xs:element name="deleteNetworkResponse" type="tns:deleteNetworkResponse"/>
+      <xs:element name="healthCheck" type="tns:healthCheck"/>
+      <xs:element name="healthCheckResponse" type="tns:healthCheckResponse"/>
+      <xs:element name="queryNetwork" type="tns:queryNetwork"/>
+      <xs:element name="queryNetworkResponse" type="tns:queryNetworkResponse"/>
+      <xs:element name="rollbackNetwork" type="tns:rollbackNetwork"/>
+      <xs:element name="rollbackNetworkResponse" type="tns:rollbackNetworkResponse"/>
+      <xs:element name="updateNetwork" type="tns:updateNetwork"/>
+      <xs:element name="updateNetworkResponse" type="tns:updateNetworkResponse"/>
+      <xs:complexType name="createNetwork">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="networkType" type="xs:string"/>
+          <xs:element name="networkName" type="xs:string"/>
+          <xs:element name="physicalNetworkName" type="xs:string" minOccurs="0"/>
+          <xs:element name="vlans" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
+          <xs:element name="failIfExists" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="msoRequest">
+        <xs:sequence>
+          <xs:element name="requestId" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="createNetworkResponse">
+        <xs:sequence>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="networkRollback">
+        <xs:sequence>
+          <xs:element name="cloudId" type="xs:string" minOccurs="0"/>
+          <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/>
+          <xs:element name="networkCreated" type="xs:boolean"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkName" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkType" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkUpdated" type="xs:boolean"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="physicalNetwork" type="xs:string" minOccurs="0"/>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vlans" type="xs:int" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="networkExceptionBean">
+        <xs:sequence>
+          <xs:element name="category" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="message" type="xs:string" minOccurs="0"/>
+          <xs:element name="rolledBack" type="xs:boolean" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="queryNetwork">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="networkNameOrId" type="xs:string"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="queryNetworkResponse">
+        <xs:sequence>
+          <xs:element name="networkExists" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="status" type="tns:networkStatus" minOccurs="0"/>
+          <xs:element name="vlans" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="updateNetwork">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="networkType" type="xs:string"/>
+          <xs:element name="networkId" type="xs:string"/>
+          <xs:element name="networkName" type="xs:string"/>
+          <xs:element name="physicalNetworkName" type="xs:string"/>
+          <xs:element name="vlans" type="xs:int" maxOccurs="unbounded"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="updateNetworkResponse">
+        <xs:sequence>
+          <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="deleteNetwork">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="networkType" type="xs:string"/>
+          <xs:element name="networkId" type="xs:string"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="deleteNetworkResponse">
+        <xs:sequence>
+          <xs:element name="networkDeleted" type="xs:boolean" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="healthCheck">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="healthCheckResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="rollbackNetwork">
+        <xs:sequence>
+          <xs:element name="rollback" type="tns:networkRollback"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="rollbackNetworkResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:simpleType name="msoExceptionCategory">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="OPENSTACK"/>
+          <xs:enumeration value="IO"/>
+          <xs:enumeration value="INTERNAL"/>
+          <xs:enumeration value="USERDATA"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:simpleType name="networkStatus">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="NOTFOUND"/>
+          <xs:enumeration value="ACTIVE"/>
+          <xs:enumeration value="DOWN"/>
+          <xs:enumeration value="BUILD"/>
+          <xs:enumeration value="ERROR"/>
+          <xs:enumeration value="UNKNOWN"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:schema>
+  </types>
+  <message name="healthCheck">
+    <part name="parameters" element="tns:healthCheck"/>
+  </message>
+  <message name="healthCheckResponse">
+    <part name="parameters" element="tns:healthCheckResponse"/>
+  </message>
+  <message name="createNetwork">
+    <part name="parameters" element="tns:createNetwork"/>
+  </message>
+  <message name="createNetworkResponse">
+    <part name="parameters" element="tns:createNetworkResponse"/>
+  </message>
+  <message name="NetworkException">
+    <part name="fault" element="tns:NetworkException"/>
+  </message>
+  <message name="NetworkAlreadyExists">
+    <part name="fault" element="tns:NetworkAlreadyExists"/>
+  </message>
+  <message name="updateNetwork">
+    <part name="parameters" element="tns:updateNetwork"/>
+  </message>
+  <message name="updateNetworkResponse">
+    <part name="parameters" element="tns:updateNetworkResponse"/>
+  </message>
+  <message name="queryNetwork">
+    <part name="parameters" element="tns:queryNetwork"/>
+  </message>
+  <message name="queryNetworkResponse">
+    <part name="parameters" element="tns:queryNetworkResponse"/>
+  </message>
+  <message name="deleteNetwork">
+    <part name="parameters" element="tns:deleteNetwork"/>
+  </message>
+  <message name="deleteNetworkResponse">
+    <part name="parameters" element="tns:deleteNetworkResponse"/>
+  </message>
+  <message name="rollbackNetwork">
+    <part name="parameters" element="tns:rollbackNetwork"/>
+  </message>
+  <message name="rollbackNetworkResponse">
+    <part name="parameters" element="tns:rollbackNetworkResponse"/>
+  </message>
+  <portType name="NetworkAdapter">
+    <operation name="healthCheck">
+      <input wsam:Action="http://com.att.mso/network/NetworkAdapter/healthCheckRequest" message="tns:healthCheck"/>
+      <output wsam:Action="http://com.att.mso/network/NetworkAdapter/healthCheckResponse" message="tns:healthCheckResponse"/>
+    </operation>
+    <operation name="createNetwork">
+      <input wsam:Action="http://com.att.mso/network/NetworkAdapter/createNetworkRequest" message="tns:createNetwork"/>
+      <output wsam:Action="http://com.att.mso/network/NetworkAdapter/createNetworkResponse" message="tns:createNetworkResponse"/>
+      <fault message="tns:NetworkException" name="NetworkException" wsam:Action="http://com.att.mso/network/NetworkAdapter/createNetwork/Fault/NetworkException"/>
+      <fault message="tns:NetworkAlreadyExists" name="NetworkAlreadyExists" wsam:Action="http://com.att.mso/network/NetworkAdapter/createNetwork/Fault/NetworkAlreadyExists"/>
+    </operation>
+    <operation name="updateNetwork">
+      <input wsam:Action="http://com.att.mso/network/NetworkAdapter/updateNetworkRequest" message="tns:updateNetwork"/>
+      <output wsam:Action="http://com.att.mso/network/NetworkAdapter/updateNetworkResponse" message="tns:updateNetworkResponse"/>
+      <fault message="tns:NetworkException" name="NetworkException" wsam:Action="http://com.att.mso/network/NetworkAdapter/updateNetwork/Fault/NetworkException"/>
+    </operation>
+    <operation name="queryNetwork">
+      <input wsam:Action="http://com.att.mso/network/NetworkAdapter/queryNetworkRequest" message="tns:queryNetwork"/>
+      <output wsam:Action="http://com.att.mso/network/NetworkAdapter/queryNetworkResponse" message="tns:queryNetworkResponse"/>
+      <fault message="tns:NetworkException" name="NetworkException" wsam:Action="http://com.att.mso/network/NetworkAdapter/queryNetwork/Fault/NetworkException"/>
+    </operation>
+    <operation name="deleteNetwork">
+      <input wsam:Action="http://com.att.mso/network/NetworkAdapter/deleteNetworkRequest" message="tns:deleteNetwork"/>
+      <output wsam:Action="http://com.att.mso/network/NetworkAdapter/deleteNetworkResponse" message="tns:deleteNetworkResponse"/>
+      <fault message="tns:NetworkException" name="NetworkException" wsam:Action="http://com.att.mso/network/NetworkAdapter/deleteNetwork/Fault/NetworkException"/>
+    </operation>
+    <operation name="rollbackNetwork">
+      <input wsam:Action="http://com.att.mso/network/NetworkAdapter/rollbackNetworkRequest" message="tns:rollbackNetwork"/>
+      <output wsam:Action="http://com.att.mso/network/NetworkAdapter/rollbackNetworkResponse" message="tns:rollbackNetworkResponse"/>
+      <fault message="tns:NetworkException" name="NetworkException" wsam:Action="http://com.att.mso/network/NetworkAdapter/rollbackNetwork/Fault/NetworkException"/>
+    </operation>
+  </portType>
+  <binding name="MsoNetworkAdapterImplPortBinding" type="tns:NetworkAdapter">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="healthCheck">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="createNetwork">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="NetworkException">
+        <soap:fault name="NetworkException" use="literal"/>
+      </fault>
+      <fault name="NetworkAlreadyExists">
+        <soap:fault name="NetworkAlreadyExists" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="updateNetwork">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="NetworkException">
+        <soap:fault name="NetworkException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="queryNetwork">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="NetworkException">
+        <soap:fault name="NetworkException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="deleteNetwork">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="NetworkException">
+        <soap:fault name="NetworkException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="rollbackNetwork">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="NetworkException">
+        <soap:fault name="NetworkException" use="literal"/>
+      </fault>
+    </operation>
+  </binding>
+  <service name="NetworkAdapter">
+    <port name="MsoNetworkAdapterImplPort" binding="tns:MsoNetworkAdapterImplPortBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint></con:endpoints><con:operation id="b58b639c-8fa1-4bbd-bb60-1797f1d7b30b" isOneWay="false" action="" name="createNetwork" bindingOperationName="createNetwork" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="c21bb880-9199-428c-8369-eb830b7ae1a5" name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/dbadapters/RequestsDbAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:createNetwork>\r
+         <cloudSiteId>cloud</cloudSiteId>\r
+         <tenantId>tenant</tenantId>\r
+         <networkType>networkType</networkType>\r
+         <networkName>networkName</networkName>\r
+         <!--Optional:-->\r
+         <physicalNetworkName>physicalNetworkName</physicalNetworkName>\r
+         <!--Zero or more repetitions:-->\r
+         <vlans>lan1</vlans>\r
+         <!--Optional:-->\r
+         <failIfExists>false</failIfExists>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>IntegTests</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>toto</serviceInstanceId>\r
+         </request>\r
+      </net:createNetwork>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/network/NetworkAdapter/createNetworkRequest"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation id="a2fdaa98-ace3-450a-8e9d-43e890a8e8eb" isOneWay="false" action="" name="deleteNetwork" bindingOperationName="deleteNetwork" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="b6d03c13-b6d4-4eb1-a291-19c0fe6adac3" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:deleteNetwork>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <networkType>?</networkType>\r
+         <networkId>?</networkId>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </net:deleteNetwork>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/network/NetworkAdapter/deleteNetworkRequest"/></con:call></con:operation><con:operation id="116baa59-652c-4fa8-9b83-ed47b649a7e0" isOneWay="false" action="" name="healthCheck" bindingOperationName="healthCheck" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="074e4beb-337a-4cce-9d82-8766b2ee05a1" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:healthCheck/>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/network/NetworkAdapter/healthCheckRequest"/></con:call></con:operation><con:operation id="df8ee9ae-86f1-4453-b7c2-c158fbe9feb2" isOneWay="false" action="" name="queryNetwork" bindingOperationName="queryNetwork" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="ce7f34ca-2952-4198-b7f4-6ea6d800d3d8" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:queryNetwork>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <networkNameOrId>?</networkNameOrId>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </net:queryNetwork>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/network/NetworkAdapter/queryNetworkRequest"/></con:call></con:operation><con:operation id="e5404399-615d-4cd7-9f67-ead64cf968f9" isOneWay="false" action="" name="rollbackNetwork" bindingOperationName="rollbackNetwork" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="20936161-aa4c-4014-8eda-ac8996a49723" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:rollbackNetwork>\r
+         <rollback>\r
+            <!--Optional:-->\r
+            <cloudId>?</cloudId>\r
+            <!--Optional:-->\r
+            <msoRequest>\r
+               <!--Optional:-->\r
+               <requestId>?</requestId>\r
+               <!--Optional:-->\r
+               <serviceInstanceId>?</serviceInstanceId>\r
+            </msoRequest>\r
+            <networkCreated>?</networkCreated>\r
+            <!--Optional:-->\r
+            <networkId>?</networkId>\r
+            <!--Optional:-->\r
+            <networkName>?</networkName>\r
+            <!--Optional:-->\r
+            <networkType>?</networkType>\r
+            <networkUpdated>?</networkUpdated>\r
+            <!--Optional:-->\r
+            <neutronNetworkId>?</neutronNetworkId>\r
+            <!--Optional:-->\r
+            <physicalNetwork>?</physicalNetwork>\r
+            <!--Optional:-->\r
+            <tenantId>?</tenantId>\r
+            <!--Zero or more repetitions:-->\r
+            <vlans>?</vlans>\r
+         </rollback>\r
+      </net:rollbackNetwork>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/network/NetworkAdapter/rollbackNetworkRequest"/></con:call></con:operation><con:operation id="fd83c3ba-bf0e-45f3-8ea6-bdfb976d26b7" isOneWay="false" action="" name="updateNetwork" bindingOperationName="updateNetwork" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="8720ff50-26ab-4ba8-b1f4-b60520a061e3" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:updateNetwork>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <networkType>?</networkType>\r
+         <networkId>?</networkId>\r
+         <networkName>?</networkName>\r
+         <physicalNetworkName>?</physicalNetworkName>\r
+         <!--1 or more repetitions:-->\r
+         <vlans>?</vlans>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </net:updateNetwork>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/network/NetworkAdapter/updateNetworkRequest"/></con:call></con:operation></con:interface><con:testSuite id="38ade4ab-683c-4476-a708-c8fc3d0c229e" name="MsoNetworkAdapter TestSuite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="e672bfa9-0de6-431f-86b2-ef3b8e591d68" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="createNetwork TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="6589e594-92e4-48b4-9fb7-6af6d3c9c6ab" name="createNetwork"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>createNetwork</con:operation><con:request name="createNetwork" id="0ba35f43-89b5-45d6-8d2d-8664105aee9e"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <net:createNetwork>
+         <cloudSiteId>toto</cloudSiteId>
+         <tenantId>b0784c65ad104c9ab2df27c1b2e04bd0</tenantId>
+         <networkType>vlan</networkType>
+         <networkName>tete</networkName>
+         <!--Optional:-->
+         
+         <!--Zero or more repetitions:-->
+         <physicalNetworkName>titi</physicalNetworkName><vlans>10</vlans>
+         <!--Optional:-->
+         <failIfExists>true</failIfExists>
+         <!--Optional:-->
+         <request>
+            <!--Optional:-->
+            
+            <!--Optional:-->
+            <requestId>requestId</requestId><serviceInstanceId>serviceInstanceId</serviceInstanceId>
+         </request>
+      </net:createNetwork>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="f0e9b782-d1d7-46aa-aff0-5da428d76531"><con:configuration><codes>500</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains" id="a1891fc0-4e82-4ae5-a4b7-5afbe7a461b0"><con:configuration><token>CloudSite does not exist in MSO Configuration</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/createNetworkRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="createNetwork no name" id="fea3a6c5-b5a4-4db8-abe5-42bb7dc84718"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>createNetwork</con:operation><con:request name="createNetwork no name" id="0ba35f43-89b5-45d6-8d2d-8664105aee9e"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <net:createNetwork>
+         <cloudSiteId>MT</cloudSiteId>
+         <tenantId>b0784c65ad104c9ab2df27c1b2e04bd0</tenantId>
+         <networkType>vlan</networkType>
+         <!--Optional:-->
+         
+         <!--Zero or more repetitions:-->
+         <physicalNetworkName>titi</physicalNetworkName><vlans>10</vlans>
+         <!--Optional:-->
+         <failIfExists>true</failIfExists>
+         <!--Optional:-->
+         <request>
+            <!--Optional:-->
+            
+            <!--Optional:-->
+            <requestId>requestId</requestId><serviceInstanceId>serviceInstanceId</serviceInstanceId>
+         </request>
+      </net:createNetwork>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="4745dcba-91b9-4ac0-a727-7e2941f59f33"><con:configuration><codes>500</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains" id="d917281a-0a2b-468c-acff-e5473170c8a8"><con:configuration><token>Create Network: Missing parameters: networkName</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/createNetworkRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="createNetwork bad type" id="cd8760de-00e0-4828-996e-f73c24951dbc"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>createNetwork</con:operation><con:request name="createNetwork bad type" id="0ba35f43-89b5-45d6-8d2d-8664105aee9e"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <net:createNetwork>
+         <cloudSiteId>MT</cloudSiteId>
+         <tenantId>b0784c65ad104c9ab2df27c1b2e04bd0</tenantId>
+         <networkType>tata</networkType>
+         <!--Optional:-->
+         
+         <!--Zero or more repetitions:-->
+         <physicalNetworkName>titi</physicalNetworkName><vlans>10</vlans>
+         <!--Optional:-->
+         <failIfExists>true</failIfExists>
+         <!--Optional:-->
+         <request>
+            <!--Optional:-->
+            
+            <!--Optional:-->
+            <requestId>requestId</requestId><serviceInstanceId>serviceInstanceId</serviceInstanceId>
+         </request>
+      </net:createNetwork>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="0e27fb95-ecdd-4994-ae47-bf7bfebec8b3"><con:configuration><codes>500</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains" id="336f121d-b4e5-48b6-a5f6-91ea18aeaeb9"><con:configuration><token>&lt;faultstring>CreateNetwork: Unknown Network Type: tata&lt;/faultstring></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/createNetworkRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/><con:reportParameters/></con:testCase><con:testCase id="bfed2f45-9ec1-479a-9fc2-79981c1614c9" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="deleteNetwork TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="4d121d19-08b6-4547-ba56-3be575651c77" name="deleteNetwork"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>deleteNetwork</con:operation><con:request name="deleteNetwork" id="a5958801-a7b7-429a-9c8a-fcf7d22e4fee"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>
+   <soapenv:Body>
+      <net:deleteNetwork>
+         <cloudSiteId>?</cloudSiteId>
+         <tenantId>?</tenantId>
+         <networkType>?</networkType>
+         <networkId>?</networkId>
+         <!--Optional:-->
+         <request>
+            <!--Optional:-->
+            <requestId>?</requestId>
+            <!--Optional:-->
+            <serviceInstanceId>?</serviceInstanceId>
+         </request>
+      </net:deleteNetwork>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="ae765673-245e-42b3-85a1-d61a902855f9"><con:configuration><codes>500
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains" id="89e60334-b667-4845-b806-e1568bb21364"><con:configuration><token>&lt;message>Unknown Network Type: ?&lt;/message></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/deleteNetworkRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="deleteNetwork no id" id="0342b44b-f463-4ca4-a381-ec8e159614af"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>deleteNetwork</con:operation><con:request name="deleteNetwork no id" id="a5958801-a7b7-429a-9c8a-fcf7d22e4fee"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>
+   <soapenv:Body>
+      <net:deleteNetwork>
+         <cloudSiteId>Jenkins_TEST_Cloud</cloudSiteId>
+         <tenantId>toto</tenantId>
+         <networkType>vlan</networkType>
+         <!--Optional:-->
+         <request>
+            <!--Optional:-->
+            <requestId>?</requestId>
+            <!--Optional:-->
+            <serviceInstanceId>?</serviceInstanceId>
+         </request>
+      </net:deleteNetwork>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="87ce9425-4cca-404d-bb04-626920fc11d4"><con:configuration><codes>500
+</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains" id="0e2f8fb4-e940-4fc6-9617-7b74aeedb54f"><con:configuration><token>&lt;faultstring>Missing mandatory parameter cloudSiteId, tenantId or networkId&lt;/faultstring></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/deleteNetworkRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/><con:reportParameters/></con:testCase><con:testCase id="bc5b5187-a3ee-4993-8fc5-dc0ed125ede7" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="healthCheck TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="0604c296-d3ed-4e96-9ae1-e662b3d99917" name="healthCheck"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>healthCheck</con:operation><con:request name="healthCheck" id="b9b9cfa9-ecbb-4543-a718-d6cc7c65cd01"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:healthCheck/>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="3fa5cfc0-f69f-4c3b-a7ca-1f85ecfe90d9"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/healthCheckRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/><con:reportParameters/></con:testCase><con:testCase id="56154ce5-1ee3-4b26-b6c9-8075ac1a8684" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="queryNetwork TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="3b0bc90a-e7a4-467e-a543-95f14d83b6b9" name="queryNetwork"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>queryNetwork</con:operation><con:request name="queryNetwork" id="f8b0fd29-58ee-4e7c-baca-9796c28be780"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:queryNetwork>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <networkNameOrId>?</networkNameOrId>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </net:queryNetwork>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="158ee6df-e631-4161-9a59-77f3d609d3e6"><con:configuration><codes>500</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains" id="7608b5b8-0947-4b96-b5b5-fee47298fedc"><con:configuration><token>CloudSite does not exist in MSO Configuration</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/queryNetworkRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/><con:reportParameters/></con:testCase><con:testCase id="e7522966-5712-4e76-9434-be104c77c449" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="rollbackNetwork TestCase" searchProperties="true" disabled="true"><con:settings/><con:testStep type="request" id="eb6f002a-e935-4413-a0cb-b85b3ef089ca" name="rollbackNetwork"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>rollbackNetwork</con:operation><con:request name="rollbackNetwork" id="ba43ff76-633c-4c01-bea8-c84dd1b3cb12"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:rollbackNetwork>\r
+         <rollback>\r
+            <!--Optional:-->\r
+            <cloudId>?</cloudId>\r
+            <!--Optional:-->\r
+            <msoRequest>\r
+               <!--Optional:-->\r
+               <requestId>12</requestId>\r
+               <!--Optional:-->\r
+               <serviceInstanceId>?</serviceInstanceId>\r
+            </msoRequest>\r
+            <networkCreated>?</networkCreated>\r
+            <!--Optional:-->\r
+            <networkId>?</networkId>\r
+            <!--Optional:-->\r
+            <networkName>?</networkName>\r
+            <!--Optional:-->\r
+            <networkType>?</networkType>\r
+            <networkUpdated>?</networkUpdated>\r
+            <!--Optional:-->\r
+            <neutronNetworkId>?</neutronNetworkId>\r
+            <networkStackId>?</networkStackId>
+            <!--Optional:-->\r
+            <physicalNetwork>?</physicalNetwork>\r
+            <!--Optional:-->\r
+            <tenantId>?</tenantId>\r
+            <!--Zero or more repetitions:-->\r
+            <vlans></vlans>\r
+         </rollback>\r
+      </net:rollbackNetwork>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="1d3ad35c-4769-4ed0-9257-40751b39ef4e"><con:configuration><codes>500</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains" id="a96b5406-914f-48a6-9c45-0803d020707d"><con:configuration><token>&lt;message>Rollback Network: Unknown Network Type: ?&lt;/message></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/rollbackNetworkRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/><con:reportParameters/></con:testCase><con:testCase id="af9555e0-d44e-4988-8a0b-c77d500713d7" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="updateNetwork TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="499e258a-eeeb-48f4-9f31-3d6372c32b7b" name="updateNetwork"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoNetworkAdapterImplPortBinding</con:interface><con:operation>updateNetwork</con:operation><con:request name="updateNetwork" id="c1a2d3aa-df9e-4952-8dc6-d9366d72d863"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/networks/NetworkAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://com.att.mso/network">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <net:updateNetwork>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <networkType>?</networkType>\r
+         <networkId>?</networkId>\r
+         <networkName>?</networkName>\r
+         <physicalNetworkName>?</physicalNetworkName>\r
+         <!--1 or more repetitions:-->\r
+         <vlans></vlans>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </net:updateNetwork>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes" id="266839a6-9ba8-46ab-b5c9-18eee8e1e263"><con:configuration><codes>500</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains" id="6ce82e5e-762a-40ab-bd05-29d3353743aa"><con:configuration><token> CloudSite does not exist in MSO Configuration</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig action="http://com.att.mso/network/NetworkAdapter/updateNetworkRequest" mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/><con:reportParameters/></con:testCase><con:properties/><con:reportParameters/></con:testSuite><con:properties><con:property><con:name>host</con:name><con:value>localhost:18080</con:value></con:property></con:properties><con:wssContainer/><con:databaseConnectionContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:reporting><con:xmlTemplates/><con:parameters/></con:reporting><con:sensitiveInformation/></con:soapui-project>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOTenantAdapter-soapui-project.xml b/packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOTenantAdapter-soapui-project.xml
new file mode 100644 (file)
index 0000000..77ef5e0
--- /dev/null
@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<con:soapui-project id="c01f429d-b7d0-4300-a508-6192e1568052" activeEnvironment="Default" name="MSOTenantAdapter" resourceRoot="" soapui-version="5.3.0" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" id="a52c1618-e217-43e6-81d3-ecdfc8506517" wsaVersion="NONE" name="MsoTenantAdapterImplPortBinding" type="wsdl" bindingName="{http://com.att.mso/tenant}MsoTenantAdapterImplPortBinding" soapVersion="1_1" anonymous="optional" definition="file:/C:/Dev/Git/mso/adapters/mso-tenant-adapter/target/generated-sources/wsdl/TenantAdapter.wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="file:\C:\Dev\Git\mso\adapters\mso-tenant-adapter\target\generated-sources\wsdl\TenantAdapter.wsdl"><con:part><con:url>file:\C:\Dev\Git\mso\adapters\mso-tenant-adapter\target\generated-sources\wsdl\TenantAdapter.wsdl</con:url><con:content><![CDATA[<!--Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01  svn-revision#13316.-->
+<definitions targetNamespace="http://com.att.mso/tenant" name="TenantAdapter" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://com.att.mso/tenant" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+  <types>
+    <xs:schema version="1.0" targetNamespace="http://com.att.mso/tenant" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:element name="TenantAlreadyExists" nillable="true" type="tns:tenantExceptionBean"/>
+      <xs:element name="TenantException" nillable="true" type="tns:tenantExceptionBean"/>
+      <xs:element name="createTenant" type="tns:createTenant"/>
+      <xs:element name="createTenantResponse" type="tns:createTenantResponse"/>
+      <xs:element name="deleteTenant" type="tns:deleteTenant"/>
+      <xs:element name="deleteTenantResponse" type="tns:deleteTenantResponse"/>
+      <xs:element name="healthCheck" type="tns:healthCheck"/>
+      <xs:element name="healthCheckResponse" type="tns:healthCheckResponse"/>
+      <xs:element name="queryTenant" type="tns:queryTenant"/>
+      <xs:element name="queryTenantResponse" type="tns:queryTenantResponse"/>
+      <xs:element name="rollbackTenant" type="tns:rollbackTenant"/>
+      <xs:element name="rollbackTenantResponse" type="tns:rollbackTenantResponse"/>
+      <xs:complexType name="createTenant">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantName" type="xs:string"/>
+          <xs:element name="metadata">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="failIfExists" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="msoRequest">
+        <xs:sequence>
+          <xs:element name="requestId" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="createTenantResponse">
+        <xs:sequence>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+          <xs:element name="rollback" type="tns:tenantRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="tenantRollback">
+        <xs:sequence>
+          <xs:element name="cloudId" type="xs:string" minOccurs="0"/>
+          <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/>
+          <xs:element name="tenantCreated" type="xs:boolean"/>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="tenantExceptionBean">
+        <xs:sequence>
+          <xs:element name="category" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="message" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="rollbackTenant">
+        <xs:sequence>
+          <xs:element name="rollback" type="tns:tenantRollback"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="rollbackTenantResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="healthCheck">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="healthCheckResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="deleteTenant">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="deleteTenantResponse">
+        <xs:sequence>
+          <xs:element name="tenantDeleted" type="xs:boolean" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="queryTenant">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantNameOrId" type="xs:string"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="queryTenantResponse">
+        <xs:sequence>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+          <xs:element name="tenantName" type="xs:string" minOccurs="0"/>
+          <xs:element name="metadata">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="msoExceptionCategory">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="OPENSTACK"/>
+          <xs:enumeration value="IO"/>
+          <xs:enumeration value="INTERNAL"/>
+          <xs:enumeration value="USERDATA"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:schema>
+  </types>
+  <message name="rollbackTenant">
+    <part name="parameters" element="tns:rollbackTenant"/>
+  </message>
+  <message name="rollbackTenantResponse">
+    <part name="parameters" element="tns:rollbackTenantResponse"/>
+  </message>
+  <message name="TenantException">
+    <part name="fault" element="tns:TenantException"/>
+  </message>
+  <message name="createTenant">
+    <part name="parameters" element="tns:createTenant"/>
+  </message>
+  <message name="createTenantResponse">
+    <part name="parameters" element="tns:createTenantResponse"/>
+  </message>
+  <message name="TenantAlreadyExists">
+    <part name="fault" element="tns:TenantAlreadyExists"/>
+  </message>
+  <message name="healthCheck">
+    <part name="parameters" element="tns:healthCheck"/>
+  </message>
+  <message name="healthCheckResponse">
+    <part name="parameters" element="tns:healthCheckResponse"/>
+  </message>
+  <message name="queryTenant">
+    <part name="parameters" element="tns:queryTenant"/>
+  </message>
+  <message name="queryTenantResponse">
+    <part name="parameters" element="tns:queryTenantResponse"/>
+  </message>
+  <message name="deleteTenant">
+    <part name="parameters" element="tns:deleteTenant"/>
+  </message>
+  <message name="deleteTenantResponse">
+    <part name="parameters" element="tns:deleteTenantResponse"/>
+  </message>
+  <portType name="TenantAdapter">
+    <operation name="rollbackTenant">
+      <input wsam:Action="http://com.att.mso/tenant/TenantAdapter/rollbackTenantRequest" message="tns:rollbackTenant"/>
+      <output wsam:Action="http://com.att.mso/tenant/TenantAdapter/rollbackTenantResponse" message="tns:rollbackTenantResponse"/>
+      <fault message="tns:TenantException" name="TenantException" wsam:Action="http://com.att.mso/tenant/TenantAdapter/rollbackTenant/Fault/TenantException"/>
+    </operation>
+    <operation name="createTenant">
+      <input wsam:Action="http://com.att.mso/tenant/TenantAdapter/createTenantRequest" message="tns:createTenant"/>
+      <output wsam:Action="http://com.att.mso/tenant/TenantAdapter/createTenantResponse" message="tns:createTenantResponse"/>
+      <fault message="tns:TenantException" name="TenantException" wsam:Action="http://com.att.mso/tenant/TenantAdapter/createTenant/Fault/TenantException"/>
+      <fault message="tns:TenantAlreadyExists" name="TenantAlreadyExists" wsam:Action="http://com.att.mso/tenant/TenantAdapter/createTenant/Fault/TenantAlreadyExists"/>
+    </operation>
+    <operation name="healthCheck">
+      <input wsam:Action="http://com.att.mso/tenant/TenantAdapter/healthCheckRequest" message="tns:healthCheck"/>
+      <output wsam:Action="http://com.att.mso/tenant/TenantAdapter/healthCheckResponse" message="tns:healthCheckResponse"/>
+    </operation>
+    <operation name="queryTenant">
+      <input wsam:Action="http://com.att.mso/tenant/TenantAdapter/queryTenantRequest" message="tns:queryTenant"/>
+      <output wsam:Action="http://com.att.mso/tenant/TenantAdapter/queryTenantResponse" message="tns:queryTenantResponse"/>
+      <fault message="tns:TenantException" name="TenantException" wsam:Action="http://com.att.mso/tenant/TenantAdapter/queryTenant/Fault/TenantException"/>
+    </operation>
+    <operation name="deleteTenant">
+      <input wsam:Action="http://com.att.mso/tenant/TenantAdapter/deleteTenantRequest" message="tns:deleteTenant"/>
+      <output wsam:Action="http://com.att.mso/tenant/TenantAdapter/deleteTenantResponse" message="tns:deleteTenantResponse"/>
+      <fault message="tns:TenantException" name="TenantException" wsam:Action="http://com.att.mso/tenant/TenantAdapter/deleteTenant/Fault/TenantException"/>
+    </operation>
+  </portType>
+  <binding name="MsoTenantAdapterImplPortBinding" type="tns:TenantAdapter">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="rollbackTenant">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="TenantException">
+        <soap:fault name="TenantException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="createTenant">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="TenantException">
+        <soap:fault name="TenantException" use="literal"/>
+      </fault>
+      <fault name="TenantAlreadyExists">
+        <soap:fault name="TenantAlreadyExists" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="healthCheck">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="queryTenant">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="TenantException">
+        <soap:fault name="TenantException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="deleteTenant">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="TenantException">
+        <soap:fault name="TenantException" use="literal"/>
+      </fault>
+    </operation>
+  </binding>
+  <service name="TenantAdapter">
+    <port name="MsoTenantAdapterImplPort" binding="tns:MsoTenantAdapterImplPortBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint></con:endpoints><con:operation id="da6ac635-e28a-4689-982f-5723b2265e13" isOneWay="false" action="" name="createTenant" bindingOperationName="createTenant" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="6d9e9e3b-f725-452d-bb3e-12d70cc5e4ad" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:createTenant>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantName>?</tenantName>\r
+         <metadata>\r
+            <!--Zero or more repetitions:-->\r
+            <entry>\r
+               <!--Optional:-->\r
+               <key>?</key>\r
+               <!--Optional:-->\r
+               <value>?</value>\r
+            </entry>\r
+         </metadata>\r
+         <!--Optional:-->\r
+         <failIfExists>?</failIfExists>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </ten:createTenant>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/createTenantRequest"/></con:call></con:operation><con:operation id="62050684-ca33-45b1-9ffa-68a3b7d269b6" isOneWay="false" action="" name="deleteTenant" bindingOperationName="deleteTenant" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="53a2e6f6-6851-440c-99dd-5782deac5750" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:deleteTenant>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </ten:deleteTenant>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/deleteTenantRequest"/></con:call></con:operation><con:operation id="351c3102-190a-47d8-9723-077413751163" isOneWay="false" action="" name="healthCheck" bindingOperationName="healthCheck" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="7826caac-2f47-4b1c-85d2-f36486b97957" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:healthCheck/>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/healthCheckRequest"/></con:call></con:operation><con:operation id="5ca1fd95-ebe2-4d0c-9ad7-ac05b8da0b59" isOneWay="false" action="" name="queryTenant" bindingOperationName="queryTenant" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="778bb9b1-ae71-46db-8e74-8f2eae60edb1" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:queryTenant>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantNameOrId>?</tenantNameOrId>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </ten:queryTenant>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/queryTenantRequest"/></con:call></con:operation><con:operation id="5b4bb04c-6c29-4743-b492-0a642da96d21" isOneWay="false" action="" name="rollbackTenant" bindingOperationName="rollbackTenant" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="cb21012f-9c70-4381-b798-81d1ba8253b2" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:rollbackTenant>\r
+         <rollback>\r
+            <!--Optional:-->\r
+            <cloudId>?</cloudId>\r
+            <!--Optional:-->\r
+            <msoRequest>\r
+               <!--Optional:-->\r
+               <requestId>?</requestId>\r
+               <!--Optional:-->\r
+               <serviceInstanceId>?</serviceInstanceId>\r
+            </msoRequest>\r
+            <tenantCreated>?</tenantCreated>\r
+            <!--Optional:-->\r
+            <tenantId>?</tenantId>\r
+         </rollback>\r
+      </ten:rollbackTenant>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/rollbackTenantRequest"/></con:call></con:operation></con:interface><con:testSuite id="f25a8a48-ce32-4e6d-a7dc-8c829a91ec88" name="MsoTenantAdapter TestSuite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="6bfcdc6e-0da1-4a60-894a-27f37d133407" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="createTenant TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="1c7c7707-f9a5-4ff6-a84e-804dd4ba5842" name="createTenant"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoTenantAdapterImplPortBinding</con:interface><con:operation>createTenant</con:operation><con:request name="createTenant" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="bab1e2a5-ce36-43b6-9bda-b3722163eb89"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/tenants/TenantAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:createTenant>\r
+         <cloudSiteId>MT</cloudSiteId>\r
+         <tenantName>tenant</tenantName>\r
+         <metadata>\r
+            <!--Zero or more repetitions:-->\r
+            <entry>\r
+               <!--Optional:-->\r
+               <key>key1</key>\r
+               <!--Optional:-->\r
+               <value>value1</value>\r
+            </entry>\r
+         </metadata>\r
+         <!--Optional:-->\r
+         <failIfExists>true</failIfExists>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>req</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>serv</serviceInstanceId>\r
+         </request>\r
+      </ten:createTenant>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="ea506f96-9104-42ed-b80b-4269020a84ad" name="SOAP Fault"/><con:assertion type="Simple Contains" id="23bcd9d5-de82-4dc5-ba7e-1f5097e23640" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-bpel}</con:username><con:password>${#Project#password-bpel}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/createTenantRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="3b109f95-f964-459e-979d-2d446a10f083" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="deleteTenant TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="489c149d-99b5-45f2-92f4-8622a660abf0" name="deleteTenant"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoTenantAdapterImplPortBinding</con:interface><con:operation>deleteTenant</con:operation><con:request name="deleteTenant" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="958e291a-6355-47ca-9238-d036fe2f0427"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/tenants/TenantAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:deleteTenant>\r
+         <cloudSiteId>MT</cloudSiteId>\r
+         <tenantId>someTenant</tenantId>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>reqD</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>servD</serviceInstanceId>\r
+         </request>\r
+      </ten:deleteTenant>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="3dad7b94-b0c0-40ee-8473-d689535e994f" name="SOAP Fault"/><con:assertion type="Simple Contains" id="fab97a2f-3537-425d-b182-2081f84268f3" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-bpel}</con:username><con:password>${#Project#password-bpel}</con:password><con:domain/><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/deleteTenantRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="49f0412b-87dc-4f0d-b83a-90fb3887859c" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="healthCheck TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="b10d0f1b-9b0f-46b6-8ec6-6f078d767a6d" name="healthCheck"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoTenantAdapterImplPortBinding</con:interface><con:operation>healthCheck</con:operation><con:request name="healthCheck" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="52d89f8c-7688-48ec-a08d-96a55518305d"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/tenants/TenantAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:healthCheck/>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" id="acb5f500-17ef-4dc8-91f8-0cd7ddf1baa0" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-bpel}</con:username><con:password>${#Project#password-bpel}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/healthCheckRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="361f993b-f73c-455f-9e4e-d92b2587a34d" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="queryTenant TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="dedd7cde-13e7-4399-baa0-17a132202c90" name="queryTenant NOK"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoTenantAdapterImplPortBinding</con:interface><con:operation>queryTenant</con:operation><con:request name="queryTenant NOK" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="ec87745e-2d80-4655-9825-22e5b8fdf397"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/tenants/TenantAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:queryTenant>\r
+         <cloudSiteId>MT</cloudSiteId>\r
+         <tenantNameOrId>notWorkingTenant</tenantNameOrId>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>qReq</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>qServ</serviceInstanceId>\r
+         </request>\r
+      </ten:queryTenant>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="5102a4cd-a0cd-4386-b73c-6f36d50c983d" name="SOAP Fault"/><con:assertion type="Simple Contains" id="c85cc90b-fd79-435d-82ae-8b34f3168d40" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-bpel}</con:username><con:password>${#Project#password-bpel}</con:password><con:domain/><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/queryTenantRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="3d4d3fe5-b146-4d3a-bffe-410235950701" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="rollbackTenant TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="868690e2-810e-4c30-8d00-c64b9532fd64" name="rollbackTenant"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoTenantAdapterImplPortBinding</con:interface><con:operation>rollbackTenant</con:operation><con:request name="rollbackTenant" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="a3d70125-cd70-440c-997d-7fb12b70747e"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/tenants/TenantAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ten="http://com.att.mso/tenant">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <ten:rollbackTenant>\r
+         <rollback>\r
+            <!--Optional:-->\r
+            <cloudId>MT</cloudId>\r
+            <!--Optional:-->\r
+            <msoRequest>\r
+               <!--Optional:-->\r
+               <requestId>toto</requestId>\r
+               <!--Optional:-->\r
+               <serviceInstanceId>tutu</serviceInstanceId>\r
+            </msoRequest>\r
+            <tenantCreated>true</tenantCreated>\r
+            <!--Optional:-->\r
+            <tenantId>tenantId</tenantId>\r
+         </rollback>\r
+      </ten:rollbackTenant>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="6a2f7016-8a35-4c0f-92c2-52cf1627ac66" name="SOAP Fault"/><con:assertion type="Simple Contains" id="fcad2d0e-237f-4986-ae8e-87d3ed7dd363" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-bpel}</con:username><con:password>${#Project#password-bpel}</con:password><con:domain/><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/tenant/TenantAdapter/rollbackTenantRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:properties><con:property><con:name>host</con:name><con:value>localhost:18080</con:value></con:property><con:property><con:name>user-bpel</con:name><con:value>BPELClient</con:value></con:property><con:property><con:name>password-bpel</con:name><con:value>password1$</con:value></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOVnfAdapter-soapui-project.xml b/packages/arquillian-unit-tests/src/test/resources/SoapUI/MSOVnfAdapter-soapui-project.xml
new file mode 100644 (file)
index 0000000..0dc2c62
--- /dev/null
@@ -0,0 +1,623 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<con:soapui-project id="e9378998-88a1-4bb9-891e-e40a5f45a001" activeEnvironment="Default" name="MSOVnfAdapter" resourceRoot="" soapui-version="5.3.0" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" id="8ef48853-638b-4c23-8863-03b8ab572ed4" wsaVersion="NONE" name="MsoVnfAdapterImplPortBinding" type="wsdl" bindingName="{http://com.att.mso/vnf}MsoVnfAdapterImplPortBinding" soapVersion="1_1" anonymous="optional" definition="file:/C:/Dev/Git/mso/adapters/mso-vnf-adapter/target/generated-sources/wsdl/VnfAdapter.wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="file:\C:\Dev\Git\mso\adapters\mso-vnf-adapter\target\generated-sources\wsdl\VnfAdapter.wsdl"><con:part><con:url>file:\C:\Dev\Git\mso\adapters\mso-vnf-adapter\target\generated-sources\wsdl\VnfAdapter.wsdl</con:url><con:content><![CDATA[<!--Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01  svn-revision#13316.-->
+<definitions targetNamespace="http://com.att.mso/vnf" name="VnfAdapter" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://com.att.mso/vnf" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+  <types>
+    <xs:schema version="1.0" targetNamespace="http://com.att.mso/vnf" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:element name="VnfAlreadyExists" nillable="true" type="tns:vnfExceptionBean"/>
+      <xs:element name="VnfException" nillable="true" type="tns:vnfExceptionBean"/>
+      <xs:element name="createVnf" type="tns:createVnf"/>
+      <xs:element name="createVnfResponse" type="tns:createVnfResponse"/>
+      <xs:element name="deleteVnf" type="tns:deleteVnf"/>
+      <xs:element name="deleteVnfResponse" type="tns:deleteVnfResponse"/>
+      <xs:element name="healthCheck" type="tns:healthCheck"/>
+      <xs:element name="healthCheckResponse" type="tns:healthCheckResponse"/>
+      <xs:element name="queryVnf" type="tns:queryVnf"/>
+      <xs:element name="queryVnfResponse" type="tns:queryVnfResponse"/>
+      <xs:element name="rollbackVnf" type="tns:rollbackVnf"/>
+      <xs:element name="rollbackVnfResponse" type="tns:rollbackVnfResponse"/>
+      <xs:element name="updateVnf" type="tns:updateVnf"/>
+      <xs:element name="updateVnfResponse" type="tns:updateVnfResponse"/>
+      <xs:complexType name="healthCheck">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="healthCheckResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="deleteVnf">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="vnfName" type="xs:string"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="msoRequest">
+        <xs:sequence>
+          <xs:element name="requestId" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="deleteVnfResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="vnfExceptionBean">
+        <xs:sequence>
+          <xs:element name="category" type="tns:msoExceptionCategory" minOccurs="0"/>
+          <xs:element name="message" type="xs:string" minOccurs="0"/>
+          <xs:element name="rolledBack" type="xs:boolean" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="queryVnf">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="vnfName" type="xs:string"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="queryVnfResponse">
+        <xs:sequence>
+          <xs:element name="vnfExists" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="vnfId" type="xs:string" minOccurs="0"/>
+          <xs:element name="status" type="tns:vnfStatus" minOccurs="0"/>
+          <xs:element name="outputs">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="createVnf">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="vnfType" type="xs:string"/>
+          <xs:element name="vnfVersion" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfName" type="xs:string"/>
+          <xs:element name="inputs">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="failIfExists" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="createVnfResponse">
+        <xs:sequence>
+          <xs:element name="vnfId" type="xs:string" minOccurs="0"/>
+          <xs:element name="outputs">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="rollback" type="tns:vnfRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="vnfRollback">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string" minOccurs="0"/>
+          <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/>
+          <xs:element name="tenantCreated" type="xs:boolean"/>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfCreated" type="xs:boolean"/>
+          <xs:element name="vnfId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="rollbackVnf">
+        <xs:sequence>
+          <xs:element name="rollback" type="tns:vnfRollback"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="rollbackVnfResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="updateVnf">
+        <xs:sequence>
+          <xs:element name="cloudSiteId" type="xs:string"/>
+          <xs:element name="tenantId" type="xs:string"/>
+          <xs:element name="vnfType" type="xs:string"/>
+          <xs:element name="vnfVersion" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfName" type="xs:string"/>
+          <xs:element name="inputs">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="request" type="tns:msoRequest" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="updateVnfResponse">
+        <xs:sequence>
+          <xs:element name="outputs">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
+                  <xs:complexType>
+                    <xs:sequence>
+                      <xs:element name="key" minOccurs="0" type="xs:string"/>
+                      <xs:element name="value" minOccurs="0" type="xs:string"/>
+                    </xs:sequence>
+                  </xs:complexType>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="rollback" type="tns:vnfRollback" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="msoExceptionCategory">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="OPENSTACK"/>
+          <xs:enumeration value="IO"/>
+          <xs:enumeration value="INTERNAL"/>
+          <xs:enumeration value="USERDATA"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:simpleType name="vnfStatus">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="ACTIVE"/>
+          <xs:enumeration value="FAILED"/>
+          <xs:enumeration value="NOTFOUND"/>
+          <xs:enumeration value="UNKNOWN"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:schema>
+  </types>
+  <message name="createVnf">
+    <part name="parameters" element="tns:createVnf"/>
+  </message>
+  <message name="createVnfResponse">
+    <part name="parameters" element="tns:createVnfResponse"/>
+  </message>
+  <message name="VnfException">
+    <part name="fault" element="tns:VnfException"/>
+  </message>
+  <message name="VnfAlreadyExists">
+    <part name="fault" element="tns:VnfAlreadyExists"/>
+  </message>
+  <message name="healthCheck">
+    <part name="parameters" element="tns:healthCheck"/>
+  </message>
+  <message name="healthCheckResponse">
+    <part name="parameters" element="tns:healthCheckResponse"/>
+  </message>
+  <message name="updateVnf">
+    <part name="parameters" element="tns:updateVnf"/>
+  </message>
+  <message name="updateVnfResponse">
+    <part name="parameters" element="tns:updateVnfResponse"/>
+  </message>
+  <message name="queryVnf">
+    <part name="parameters" element="tns:queryVnf"/>
+  </message>
+  <message name="queryVnfResponse">
+    <part name="parameters" element="tns:queryVnfResponse"/>
+  </message>
+  <message name="deleteVnf">
+    <part name="parameters" element="tns:deleteVnf"/>
+  </message>
+  <message name="deleteVnfResponse">
+    <part name="parameters" element="tns:deleteVnfResponse"/>
+  </message>
+  <message name="rollbackVnf">
+    <part name="parameters" element="tns:rollbackVnf"/>
+  </message>
+  <message name="rollbackVnfResponse">
+    <part name="parameters" element="tns:rollbackVnfResponse"/>
+  </message>
+  <portType name="VnfAdapter">
+    <operation name="createVnf">
+      <input wsam:Action="http://com.att.mso/vnf/VnfAdapter/createVnfRequest" message="tns:createVnf"/>
+      <output wsam:Action="http://com.att.mso/vnf/VnfAdapter/createVnfResponse" message="tns:createVnfResponse"/>
+      <fault message="tns:VnfException" name="VnfException" wsam:Action="http://com.att.mso/vnf/VnfAdapter/createVnf/Fault/VnfException"/>
+      <fault message="tns:VnfAlreadyExists" name="VnfAlreadyExists" wsam:Action="http://com.att.mso/vnf/VnfAdapter/createVnf/Fault/VnfAlreadyExists"/>
+    </operation>
+    <operation name="healthCheck">
+      <input wsam:Action="http://com.att.mso/vnf/VnfAdapter/healthCheckRequest" message="tns:healthCheck"/>
+      <output wsam:Action="http://com.att.mso/vnf/VnfAdapter/healthCheckResponse" message="tns:healthCheckResponse"/>
+    </operation>
+    <operation name="updateVnf">
+      <input wsam:Action="http://com.att.mso/vnf/VnfAdapter/updateVnfRequest" message="tns:updateVnf"/>
+      <output wsam:Action="http://com.att.mso/vnf/VnfAdapter/updateVnfResponse" message="tns:updateVnfResponse"/>
+      <fault message="tns:VnfException" name="VnfException" wsam:Action="http://com.att.mso/vnf/VnfAdapter/updateVnf/Fault/VnfException"/>
+    </operation>
+    <operation name="queryVnf">
+      <input wsam:Action="http://com.att.mso/vnf/VnfAdapter/queryVnfRequest" message="tns:queryVnf"/>
+      <output wsam:Action="http://com.att.mso/vnf/VnfAdapter/queryVnfResponse" message="tns:queryVnfResponse"/>
+      <fault message="tns:VnfException" name="VnfException" wsam:Action="http://com.att.mso/vnf/VnfAdapter/queryVnf/Fault/VnfException"/>
+    </operation>
+    <operation name="deleteVnf">
+      <input wsam:Action="http://com.att.mso/vnf/VnfAdapter/deleteVnfRequest" message="tns:deleteVnf"/>
+      <output wsam:Action="http://com.att.mso/vnf/VnfAdapter/deleteVnfResponse" message="tns:deleteVnfResponse"/>
+      <fault message="tns:VnfException" name="VnfException" wsam:Action="http://com.att.mso/vnf/VnfAdapter/deleteVnf/Fault/VnfException"/>
+    </operation>
+    <operation name="rollbackVnf">
+      <input wsam:Action="http://com.att.mso/vnf/VnfAdapter/rollbackVnfRequest" message="tns:rollbackVnf"/>
+      <output wsam:Action="http://com.att.mso/vnf/VnfAdapter/rollbackVnfResponse" message="tns:rollbackVnfResponse"/>
+      <fault message="tns:VnfException" name="VnfException" wsam:Action="http://com.att.mso/vnf/VnfAdapter/rollbackVnf/Fault/VnfException"/>
+    </operation>
+  </portType>
+  <binding name="MsoVnfAdapterImplPortBinding" type="tns:VnfAdapter">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="createVnf">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="VnfException">
+        <soap:fault name="VnfException" use="literal"/>
+      </fault>
+      <fault name="VnfAlreadyExists">
+        <soap:fault name="VnfAlreadyExists" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="healthCheck">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="updateVnf">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="VnfException">
+        <soap:fault name="VnfException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="queryVnf">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="VnfException">
+        <soap:fault name="VnfException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="deleteVnf">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="VnfException">
+        <soap:fault name="VnfException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="rollbackVnf">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="VnfException">
+        <soap:fault name="VnfException" use="literal"/>
+      </fault>
+    </operation>
+  </binding>
+  <service name="VnfAdapter">
+    <port name="MsoVnfAdapterImplPort" binding="tns:MsoVnfAdapterImplPortBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint></con:endpoints><con:operation id="b545611c-10af-4376-8828-320559ee74e3" isOneWay="false" action="" name="createVnf" bindingOperationName="createVnf" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="2671a8f5-d5f9-45d2-9826-fb3b37b8757c" name="CreateVNF"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/vnfs/VnfAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:createVnf>\r
+         <cloudSiteId>Toto</cloudSiteId>\r
+         <tenantId>tenant</tenantId>\r
+         <vnfType>VF</vnfType>\r
+         <!--Optional:-->\r
+         <vnfVersion>1</vnfVersion>\r
+         <vnfName>Turlututu</vnfName>\r
+         <inputs>\r
+            <!--Zero or more repetitions:-->\r
+            <entry>\r
+               <!--Optional:-->\r
+               <key>key1</key>\r
+               <!--Optional:-->\r
+               <value>value1</value>\r
+            </entry>\r
+         </inputs>\r
+         <!--Optional:-->\r
+         <failIfExists>true</failIfExists>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>reqSoapUI</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>servSoapUI</serviceInstanceId>\r
+         </request>\r
+      </vnf:createVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/createVnfRequest"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation id="b34239df-f801-4541-acd1-02a113005d09" isOneWay="false" action="" name="deleteVnf" bindingOperationName="deleteVnf" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="85399339-b09e-4925-b255-b56104c33886" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:deleteVnf>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <vnfName>?</vnfName>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </vnf:deleteVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/deleteVnfRequest"/></con:call></con:operation><con:operation id="9c0286b4-146d-4190-bac2-3450d179b238" isOneWay="false" action="" name="healthCheck" bindingOperationName="healthCheck" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="9c7a5ae0-0b95-45ab-b0c7-b084c1f564c8" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:healthCheck/>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/healthCheckRequest"/></con:call></con:operation><con:operation id="faef04de-f492-4831-ad4d-c9ec3f43346b" isOneWay="false" action="" name="queryVnf" bindingOperationName="queryVnf" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="d0ce94d9-16d8-4f8c-bc6f-538e8affeabf" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:queryVnf>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <vnfName>?</vnfName>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </vnf:queryVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/queryVnfRequest"/></con:call></con:operation><con:operation id="c72d2d3f-a9cd-46ee-9b44-e880f0b8429d" isOneWay="false" action="" name="rollbackVnf" bindingOperationName="rollbackVnf" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="fa939945-151c-4a72-b476-5d65551fd483" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:rollbackVnf>\r
+         <rollback>\r
+            <!--Optional:-->\r
+            <cloudSiteId>?</cloudSiteId>\r
+            <!--Optional:-->\r
+            <msoRequest>\r
+               <!--Optional:-->\r
+               <requestId>?</requestId>\r
+               <!--Optional:-->\r
+               <serviceInstanceId>?</serviceInstanceId>\r
+            </msoRequest>\r
+            <tenantCreated>?</tenantCreated>\r
+            <!--Optional:-->\r
+            <tenantId>?</tenantId>\r
+            <vnfCreated>?</vnfCreated>\r
+            <!--Optional:-->\r
+            <vnfId>?</vnfId>\r
+         </rollback>\r
+      </vnf:rollbackVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/rollbackVnfRequest"/></con:call></con:operation><con:operation id="8835ef36-b71c-470b-9a83-9fdf2bef7fe9" isOneWay="false" action="" name="updateVnf" bindingOperationName="updateVnf" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="f056db27-1843-47d1-a17f-bae1d74571b5" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:updateVnf>\r
+         <cloudSiteId>?</cloudSiteId>\r
+         <tenantId>?</tenantId>\r
+         <vnfType>?</vnfType>\r
+         <!--Optional:-->\r
+         <vnfVersion>?</vnfVersion>\r
+         <vnfName>?</vnfName>\r
+         <inputs>\r
+            <!--Zero or more repetitions:-->\r
+            <entry>\r
+               <!--Optional:-->\r
+               <key>?</key>\r
+               <!--Optional:-->\r
+               <value>?</value>\r
+            </entry>\r
+         </inputs>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>?</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>?</serviceInstanceId>\r
+         </request>\r
+      </vnf:updateVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/updateVnfRequest"/></con:call></con:operation></con:interface><con:testSuite id="dc83900f-87f1-4ea2-8930-200f41748686" name="MsoVnfAdapter TestSuite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="abceaa02-5d09-469f-9b23-f3646a3090c8" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="createVnf TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="96605331-616d-411c-b4a9-9f2a6d6fdde1" name="createVnf"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoVnfAdapterImplPortBinding</con:interface><con:operation>createVnf</con:operation><con:request name="createVnf" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="67ec8acf-ac98-464e-b242-f6e4f1616ae9"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/vnfs/VnfAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <vnf:createVnf>
+         <cloudSiteId>Toto</cloudSiteId>
+         <tenantId>tenant</tenantId>
+         <vnfType>VF</vnfType>
+         <!--Optional:-->
+         <vnfVersion>1</vnfVersion>
+         <vnfName>Turlututu</vnfName>
+         <inputs>
+            <!--Zero or more repetitions:-->
+            <entry>
+               <!--Optional:-->
+               <key>key1</key>
+               <!--Optional:-->
+               <value>value1</value>
+            </entry>
+         </inputs>
+         <!--Optional:-->
+         <failIfExists>true</failIfExists>
+         <!--Optional:-->
+         <request>
+            <!--Optional:-->
+            <requestId>reqSoapUI</requestId>
+            <!--Optional:-->
+            <serviceInstanceId>servSoapUI</serviceInstanceId>
+         </request>
+      </vnf:createVnf>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="d6b707c9-ac60-4213-8dbf-2076021e50e4" name="SOAP Fault"/><con:assertion type="Simple Contains" id="6915f4e4-13cc-4006-9760-937a45300135" name="Contains"><con:configuration><token>&lt;message>[CreateVFModule] Cloud Site [Toto] not found&lt;/message></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/createVnfRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" id="c346b2f5-fea4-4665-a503-8d827aefa503" name="createVnf no name"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoVnfAdapterImplPortBinding</con:interface><con:operation>createVnf</con:operation><con:request name="createVnf no name" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="67ec8acf-ac98-464e-b242-f6e4f1616ae9"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/vnfs/VnfAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <vnf:createVnf>
+         <cloudSiteId>MT</cloudSiteId>
+         <tenantId>tenant</tenantId>
+         <vnfType>VF</vnfType>
+         <!--Optional:-->
+         <vnfVersion>1</vnfVersion>
+         <vnfName/>
+         <inputs>
+            <!--Zero or more repetitions:-->
+            <entry>
+               <!--Optional:-->
+               <key>key1</key>
+               <!--Optional:-->
+               <value>value1</value>
+            </entry>
+         </inputs>
+         <!--Optional:-->
+         <failIfExists>true</failIfExists>
+         <!--Optional:-->
+         <request>
+            <!--Optional:-->
+            <requestId>reqSoapUI</requestId>
+            <!--Optional:-->
+            <serviceInstanceId>servSoapUI</serviceInstanceId>
+         </request>
+      </vnf:createVnf>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="d6b707c9-ac60-4213-8dbf-2076021e50e4" name="SOAP Fault"/><con:assertion type="Simple Contains" id="6915f4e4-13cc-4006-9760-937a45300135" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/createVnfRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="3d197248-7223-4422-99d8-13c9e3722dd8" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="deleteVnf TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="e3ee2457-84d0-48ca-a946-c2049731e279" name="deleteVnf"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoVnfAdapterImplPortBinding</con:interface><con:operation>deleteVnf</con:operation><con:request name="deleteVnf" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="02a9e934-d2f7-41c4-b186-ccd55f481de1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/vnfs/VnfAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:deleteVnf>\r
+         <cloudSiteId>MT</cloudSiteId>\r
+         <tenantId>tenant</tenantId>\r
+         <vnfName>name</vnfName>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>reqSoapUI</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>servSoapUI</serviceInstanceId>\r
+         </request>\r
+      </vnf:deleteVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="3b17740f-67dd-4e9b-8555-5408bbb1316f" name="SOAP Fault"/><con:assertion type="Simple Contains" id="27b5579f-dfdc-44e0-bc7c-25060bf19302" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/deleteVnfRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="a42192f9-e3c0-44dc-98b6-d5fcc977e56e" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="healthCheck TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="0b08733f-3e6e-4ed6-93b4-85ee5657bcf2" name="healthCheck"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoVnfAdapterImplPortBinding</con:interface><con:operation>healthCheck</con:operation><con:request name="healthCheck" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="4a2436e1-77b6-4fe4-a837-a3146cdc6bba"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/vnfs/VnfAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:healthCheck/>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" id="92219146-442f-48c5-9b1a-d9d52655f689" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/healthCheckRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="fbc5a034-b5b3-4038-a4d8-c52423957e3b" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="queryVnf TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="4a41a857-6faa-48cb-b346-bf00e712d18f" name="queryVnf"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoVnfAdapterImplPortBinding</con:interface><con:operation>queryVnf</con:operation><con:request name="queryVnf" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="07944f97-f417-423a-bee6-faa10ff6595b"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/vnfs/VnfAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:queryVnf>\r
+         <cloudSiteId>MT</cloudSiteId>\r
+         <tenantId>tt</tenantId>\r
+         <vnfName>vv</vnfName>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>req</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>serv</serviceInstanceId>\r
+         </request>\r
+      </vnf:queryVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="e619b7e7-6ea3-4fe3-b0f2-ad2db613da07" name="SOAP Fault"/><con:assertion type="Simple Contains" id="6f267d05-5676-43cd-91b7-119796a313ce" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/queryVnfRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="0ddf3b96-c253-432a-a475-65d5b00969e1" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="rollbackVnf TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="04feea7a-3825-4496-83ce-3c34e66f6856" name="rollbackVnf"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoVnfAdapterImplPortBinding</con:interface><con:operation>rollbackVnf</con:operation><con:request name="rollbackVnf" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="469ab0a7-9d8e-444b-b9b5-24298758fb48"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/vnfs/VnfAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:rollbackVnf>\r
+         <rollback>\r
+            <!--Optional:-->\r
+            <cloudSiteId>MT</cloudSiteId>\r
+            <!--Optional:-->\r
+            <msoRequest>\r
+               <!--Optional:-->\r
+               <requestId>rq</requestId>\r
+               <!--Optional:-->\r
+               <serviceInstanceId>sv</serviceInstanceId>\r
+            </msoRequest>\r
+            <tenantCreated>true</tenantCreated>\r
+            <!--Optional:-->\r
+            <tenantId>tt</tenantId>\r
+            <vnfCreated>true</vnfCreated>\r
+            <!--Optional:-->\r
+            <vnfId>vv</vnfId>\r
+         </rollback>\r
+      </vnf:rollbackVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="9d2e62ef-7de8-42cc-a7d7-ee59c50164f7" name="SOAP Fault"/><con:assertion type="Simple Contains" id="aafbdcc8-413b-42bb-b2f0-2af735146f60" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/rollbackVnfRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:testCase id="f9b4b408-d267-4a83-9003-b4c55267aab8" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="updateVnf TestCase" searchProperties="true"><con:settings/><con:testStep type="request" id="db21513a-4ae4-4284-b5b3-c53272977257" name="updateVnf"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoVnfAdapterImplPortBinding</con:interface><con:operation>updateVnf</con:operation><con:request name="updateVnf" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="70a92e44-0841-4eec-9555-5c1beae7cbb3"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/vnfs/VnfAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vnf="http://com.att.mso/vnf">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <vnf:updateVnf>\r
+         <cloudSiteId>MT</cloudSiteId>\r
+         <tenantId>to</tenantId>\r
+         <vnfType>vo</vnfType>\r
+         <!--Optional:-->\r
+         <vnfVersion>1</vnfVersion>\r
+         <vnfName>name</vnfName>\r
+         <inputs>\r
+            <!--Zero or more repetitions:-->\r
+            <entry>\r
+               <!--Optional:-->\r
+               <key>key1</key>\r
+               <!--Optional:-->\r
+               <value>val1</value>\r
+            </entry>\r
+         </inputs>\r
+         <!--Optional:-->\r
+         <request>\r
+            <!--Optional:-->\r
+            <requestId>reqq</requestId>\r
+            <!--Optional:-->\r
+            <serviceInstanceId>servv</serviceInstanceId>\r
+         </request>\r
+      </vnf:updateVnf>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:assertion type="Not SOAP Fault Assertion" id="8c7be0ab-d1c4-4525-90f6-46427afb1454" name="SOAP Fault"/><con:assertion type="Simple Contains" id="404c82cd-ce60-4a00-adba-1486fd47a3d3" name="Contains"><con:configuration><token>Connection refused</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>BPELClient</con:username><con:password>password1$</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/vnf/VnfAdapter/updateVnfRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:properties><con:property><con:name>host</con:name><con:value>localhost:18080</con:value></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/SoapUI/MsoRequestDB-soapui-project.xml b/packages/arquillian-unit-tests/src/test/resources/SoapUI/MsoRequestDB-soapui-project.xml
new file mode 100644 (file)
index 0000000..d6d4183
--- /dev/null
@@ -0,0 +1,377 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<con:soapui-project id="59ec1eae-57ab-4eb4-9060-6033845c3079" activeEnvironment="Default" name="MsoRequestDB" resourceRoot="" soapui-version="5.3.0" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" id="245dad31-1423-4c0f-a230-e5e00dfa4ed3" wsaVersion="NONE" name="MsoRequestsDbAdapterImplPortBinding" type="wsdl" bindingName="{http://com.att.mso/requestsdb}MsoRequestsDbAdapterImplPortBinding" soapVersion="1_1" anonymous="optional" definition="/RequestsDbAdapter.wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="file:/RequestsDbAdapter.wsdl"><con:part><con:url>file:/RequestsDbAdapter.wsdl</con:url><con:content><![CDATA[<!--Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01  svn-revision#13316.-->
+<definitions targetNamespace="http://com.att.mso/requestsdb" name="RequestsDbAdapter" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:tns="http://com.att.mso/requestsdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+  <types>
+    <xs:schema version="1.0" targetNamespace="http://com.att.mso/requestsdb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:element name="MsoRequestsDbException" nillable="true" type="tns:msoRequestsDbExceptionBean"/>
+      <xs:element name="getInfraRequest" type="tns:getInfraRequest"/>
+      <xs:element name="getInfraRequestResponse" type="tns:getInfraRequestResponse"/>
+      <xs:element name="getSiteStatus" type="tns:getSiteStatus"/>
+      <xs:element name="getSiteStatusResponse" type="tns:getSiteStatusResponse"/>
+      <xs:element name="updateInfraRequest" type="tns:updateInfraRequest"/>
+      <xs:element name="updateInfraRequestResponse" type="tns:updateInfraRequestResponse"/>
+      <xs:complexType name="updateInfraRequest">
+        <xs:sequence>
+          <xs:element name="requestId" type="xs:string"/>
+          <xs:element name="lastModifiedBy" type="xs:string"/>
+          <xs:element name="statusMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="responseBody" type="xs:string" minOccurs="0"/>
+          <xs:element name="requestStatus" type="tns:request-status-type" minOccurs="0"/>
+          <xs:element name="progress" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfOutputs" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vfModuleId" type="xs:string" minOccurs="0"/>
+          <xs:element name="volumeGroupId" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="updateInfraRequestResponse">
+        <xs:sequence/>
+      </xs:complexType>
+      <xs:complexType name="msoRequestsDbExceptionBean">
+        <xs:sequence>
+          <xs:element name="message" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="getInfraRequest">
+        <xs:sequence>
+          <xs:element name="requestId" type="xs:string"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="getInfraRequestResponse">
+        <xs:sequence>
+          <xs:element name="return" type="tns:infraActiveRequests" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="infraActiveRequests">
+        <xs:complexContent>
+          <xs:extension base="tns:infraRequests">
+            <xs:sequence/>
+          </xs:extension>
+        </xs:complexContent>
+      </xs:complexType>
+      <xs:complexType name="infraRequests">
+        <xs:sequence>
+          <xs:element name="aaiServiceId" type="xs:string" minOccurs="0"/>
+          <xs:element name="action" type="xs:string" minOccurs="0"/>
+          <xs:element name="aicCloudRegion" type="xs:string" minOccurs="0"/>
+          <xs:element name="aicNodeClli" type="xs:string" minOccurs="0"/>
+          <xs:element name="callBackUrl" type="xs:string" minOccurs="0"/>
+          <xs:element name="clientRequestId" type="xs:string" minOccurs="0"/>
+          <xs:element name="correlator" type="xs:string" minOccurs="0"/>
+          <xs:element name="endTime" type="xs:long" minOccurs="0"/>
+          <xs:element name="lastModifiedBy" type="xs:string" minOccurs="0"/>
+          <xs:element name="modifyTime" type="xs:long" minOccurs="0"/>
+          <xs:element name="networkId" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkName" type="xs:string" minOccurs="0"/>
+          <xs:element name="networkType" type="xs:string" minOccurs="0"/>
+          <xs:element name="progress" type="xs:long" minOccurs="0"/>
+          <xs:element name="provStatus" type="xs:string" minOccurs="0"/>
+          <xs:element name="requestAction" type="xs:string" minOccurs="0"/>
+          <xs:element name="requestBody" type="xs:string" minOccurs="0"/>
+          <xs:element name="requestId" type="xs:string" minOccurs="0"/>
+          <xs:element name="requestScope" type="xs:string" minOccurs="0"/>
+          <xs:element name="requestStatus" type="xs:string" minOccurs="0"/>
+          <xs:element name="requestType" type="xs:string" minOccurs="0"/>
+          <xs:element name="responseBody" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceInstanceName" type="xs:string" minOccurs="0"/>
+          <xs:element name="serviceType" type="xs:string" minOccurs="0"/>
+          <xs:element name="source" type="xs:string" minOccurs="0"/>
+          <xs:element name="startTime" type="xs:long" minOccurs="0"/>
+          <xs:element name="statusMessage" type="xs:string" minOccurs="0"/>
+          <xs:element name="tenantId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vfModuleId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vfModuleModelName" type="xs:string" minOccurs="0"/>
+          <xs:element name="vfModuleName" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfId" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfName" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfOutputs" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfParams" type="xs:string" minOccurs="0"/>
+          <xs:element name="vnfType" type="xs:string" minOccurs="0"/>
+          <xs:element name="volumeGroupId" type="xs:string" minOccurs="0"/>
+          <xs:element name="volumeGroupName" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="getSiteStatus">
+        <xs:sequence>
+          <xs:element name="siteName" type="xs:string"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="getSiteStatusResponse">
+        <xs:sequence>
+          <xs:element name="return" type="xs:boolean"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="request-status-type">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="COMPLETE"/>
+          <xs:enumeration value="FAILED"/>
+          <xs:enumeration value="IN_PROGRESS"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:schema>
+  </types>
+  <message name="updateInfraRequest">
+    <part name="parameters" element="tns:updateInfraRequest"/>
+  </message>
+  <message name="updateInfraRequestResponse">
+    <part name="parameters" element="tns:updateInfraRequestResponse"/>
+  </message>
+  <message name="MsoRequestsDbException">
+    <part name="fault" element="tns:MsoRequestsDbException"/>
+  </message>
+  <message name="getInfraRequest">
+    <part name="parameters" element="tns:getInfraRequest"/>
+  </message>
+  <message name="getInfraRequestResponse">
+    <part name="parameters" element="tns:getInfraRequestResponse"/>
+  </message>
+  <message name="getSiteStatus">
+    <part name="parameters" element="tns:getSiteStatus"/>
+  </message>
+  <message name="getSiteStatusResponse">
+    <part name="parameters" element="tns:getSiteStatusResponse"/>
+  </message>
+  <portType name="RequestsDbAdapter">
+    <operation name="updateInfraRequest">
+      <input wsam:Action="http://com.att.mso/requestsdb/RequestsDbAdapter/updateInfraRequestRequest" message="tns:updateInfraRequest"/>
+      <output wsam:Action="http://com.att.mso/requestsdb/RequestsDbAdapter/updateInfraRequestResponse" message="tns:updateInfraRequestResponse"/>
+      <fault message="tns:MsoRequestsDbException" name="MsoRequestsDbException" wsam:Action="http://com.att.mso/requestsdb/RequestsDbAdapter/updateInfraRequest/Fault/MsoRequestsDbException"/>
+    </operation>
+    <operation name="getInfraRequest">
+      <input wsam:Action="http://com.att.mso/requestsdb/RequestsDbAdapter/getInfraRequestRequest" message="tns:getInfraRequest"/>
+      <output wsam:Action="http://com.att.mso/requestsdb/RequestsDbAdapter/getInfraRequestResponse" message="tns:getInfraRequestResponse"/>
+      <fault message="tns:MsoRequestsDbException" name="MsoRequestsDbException" wsam:Action="http://com.att.mso/requestsdb/RequestsDbAdapter/getInfraRequest/Fault/MsoRequestsDbException"/>
+    </operation>
+    <operation name="getSiteStatus">
+      <input wsam:Action="http://com.att.mso/requestsdb/RequestsDbAdapter/getSiteStatusRequest" message="tns:getSiteStatus"/>
+      <output wsam:Action="http://com.att.mso/requestsdb/RequestsDbAdapter/getSiteStatusResponse" message="tns:getSiteStatusResponse"/>
+    </operation>
+  </portType>
+  <binding name="MsoRequestsDbAdapterImplPortBinding" type="tns:RequestsDbAdapter">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="updateInfraRequest">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="MsoRequestsDbException">
+        <soap:fault name="MsoRequestsDbException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="getInfraRequest">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="MsoRequestsDbException">
+        <soap:fault name="MsoRequestsDbException" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="getSiteStatus">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+  </binding>
+  <service name="RequestsDbAdapter">
+    <port name="MsoRequestsDbAdapterImplPort" binding="tns:MsoRequestsDbAdapterImplPortBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint></con:endpoints><con:operation id="e3a7d1f5-8130-4bdd-92d8-292897634187" isOneWay="false" action="" name="getInfraRequest" bindingOperationName="getInfraRequest" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="05eeaf45-4e87-41d3-990a-7cc587a8200b" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <req:getInfraRequest>\r
+         <requestId>?</requestId>\r
+      </req:getInfraRequest>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/requestsdb/RequestsDbAdapter/getInfraRequestRequest"/></con:call></con:operation><con:operation id="8a51a273-feed-4160-b7f4-adb16bb04143" isOneWay="false" action="" name="updateInfraRequest" bindingOperationName="updateInfraRequest" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="f7bd11d2-3e62-4548-9ef8-16eade6d2bae" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">\r
+   <soapenv:Header/>\r
+   <soapenv:Body>\r
+      <req:updateInfraRequest>\r
+         <requestId>?</requestId>\r
+         <lastModifiedBy>?</lastModifiedBy>\r
+         <!--Optional:-->\r
+         <statusMessage>?</statusMessage>\r
+         <!--Optional:-->\r
+         <responseBody>?</responseBody>\r
+         <!--Optional:-->\r
+         <requestStatus>?</requestStatus>\r
+         <!--Optional:-->\r
+         <progress>?</progress>\r
+         <!--Optional:-->\r
+         <vnfOutputs>?</vnfOutputs>\r
+      </req:updateInfraRequest>\r
+   </soapenv:Body>\r
+</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/requestsdb/RequestsDbAdapter/updateInfraRequestRequest"/></con:call></con:operation><con:operation id="66bc9192-7f64-4529-bbfb-e08c59ddf8ae" isOneWay="false" action="" name="getSiteStatus" bindingOperationName="getSiteStatus" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="8fb41a34-98d1-4695-a6be-936e612ef30c" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>REPLACE_WITH_ACTUAL_URL</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <req:getSiteStatus>
+         <siteName>?</siteName>
+      </req:getSiteStatus>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/requestsdb/RequestsDbAdapter/getSiteStatusRequest"/></con:call></con:operation></con:interface><con:interface xsi:type="con:RestService" wadlVersion="http://wadl.dev.java.net/2009/02" name="Services" type="rest" basePath="" id="b27c3a4f-f300-4b6c-9ab9-a228f72e1d8a" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:8080</con:endpoint></con:endpoints><con:resource name="POST Infra Service" path="/ecomp/mso/infra/v1/vnf-request" id="83e49cf4-3ed6-4e8f-8b3e-f948faa2147c"><con:settings/><con:parameters/><con:method name="POST Service" method="POST" id="6cc44937-74f5-493b-b395-32272539160f"><con:settings/><con:parameters/><con:representation type="REQUEST"><con:mediaType>application/xml</con:mediaType><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1">v1:service-request</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/xml</con:mediaType><con:status>500 400 503 404 502 409</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/schema/v1">v1:service-response</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/xml</con:mediaType><con:status>202</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/schema/v1">v1:service-response</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 404 403 405 500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="Request 1" mediaType="application/xml" postQueryString="false" id="5a0bb560-c181-42a6-ad3d-082acf724d6a"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<aetgt:vnf-request xmlns:aetgt="http://ecomp.att.com/mso/infra/vnf-request/v1"
+                   xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1"
+                   xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+    <request-info>
+        <request-id>3d878a8e-51fa-44aa-8cb5-a56ae9352252</request-id>
+        <action>CREATE</action>
+        <source>PORTAL</source>
+    </request-info>
+    <vnf-inputs>
+        <vnf-name>yjvnfvmsc</vnf-name>
+        <vnf-type>VPE</vnf-type>
+        <service-type>SDN-ETHERNET-INTERNET</service-type>
+        <aic-node-clli>AUSTXAALCP1</aic-node-clli>
+        <tenant-id>276b95b6d2b04e2e830c976eb70c9405</tenant-id>
+    </vnf-inputs>
+    <vnf-params xmlns:tns="http://ecomp.att.com/mso/infra/vnf-request/v1"/>
+</aetgt:vnf-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:request></con:method></con:resource><con:resource name="GET Infra Request" path="/ecomp/mso/infra/v1/vnf-request/{request-id}" id="a04a14a0-b7cc-4c24-bdd4-72d5a7fa1dc9"><con:settings/><con:parameters><con:parameter><con:name>request-id</con:name><con:value/><con:style>TEMPLATE</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:method name="Method 1" method="GET" id="c61df2ee-5d7a-4d94-8e73-bd10afd104ff"><con:settings/><con:parameters/><con:representation type="REQUEST"><con:mediaType>application/xml</con:mediaType><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1">v1:service-request</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html</con:mediaType><con:status>500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/xml</con:mediaType><con:status>500 400 503 404</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/schema/v1">v1:service-response</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/xml</con:mediaType><con:status>202</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/schema/v1">v1:service-response</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=utf-8</con:mediaType><con:status>401 404 403 405 500</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>*/*</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/request/query/schema/v1">v1:query-response</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/octet-stream</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:v1="http://ecomp.att.com/mso/infra/vnf-request/v1">v1:vnf-request</con:element></con:representation><con:request name="GetService" mediaType="application/xml" postQueryString="false" id="7b0d5ac4-8e25-4f63-bd6a-b4fc0004bad3"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<feature-request
+       xmlns="http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:msolayer3="http://ecomp.att.com/mso/request/layer3/schema/v1"
+       xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1">
+       <msoservtypes:request-information>
+               <msoservtypes:request-id>155415ab-b4a7-4382-b4c6-d17d950565</msoservtypes:request-id>
+               <msoservtypes:request-action>FeatureChangeActivateRequest</msoservtypes:request-action>
+               <msoservtypes:source>OMX</msoservtypes:source>
+               <msoservtypes:notification-url>https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws</msoservtypes:notification-url>
+               <msoservtypes:order-number>5051560</msoservtypes:order-number>
+               <msoservtypes:order-version>1</msoservtypes:order-version>
+       </msoservtypes:request-information>
+       <msoservtypes:service-information>
+               <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>
+               <msoservtypes:service-instance-id>HI/VLXM/003717//SW_INTERNET</msoservtypes:service-instance-id>
+               <msoservtypes:subscriber-name>ST E2E Test50565_13000050565</msoservtypes:subscriber-name>
+       </msoservtypes:service-information>
+       <msoservtypes:feature-information>
+               <msoservtypes:feature-type>FIREWALL-LITE</msoservtypes:feature-type>
+               <msoservtypes:feature-instance-id>HI/VLXM/003717//SW_INTERNET</msoservtypes:feature-instance-id>
+               <msoservtypes:feature-yang-model>ST E2E Test50565_13000050565</msoservtypes:feature-yang-model>
+       </msoservtypes:feature-information>
+       </feature-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services/feature</con:originalUri><con:credentials><con:username>${#Project#user-csi}</con:username><con:password>${#Project#password-csi}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="request-id" value="test0-service" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>request-id</con:entry></con:parameterOrder></con:request></con:method></con:resource></con:interface><con:testSuite id="44a1f9ae-4601-4eec-8315-3ecbc3de275b" name="MsoRequestsDbAdapterImplPortBinding TestSuite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="b69961dd-4f10-4b75-a411-330dbf9bc42c" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="updateInfraRequest TestCase" searchProperties="true"><con:settings/><con:testStep type="restrequest" name="POST VNF infra request - NO BPEL" id="ea3454c5-8e93-40d8-9399-d79b2f6329ff"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v1/vnf-request" methodName="POST Service" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="POST VNF infra request - NO BPEL" mediaType="application/xml" postQueryString="false" id="6d727ada-da68-4a94-8f33-f82953731cd5"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<aetgt:vnf-request xmlns:aetgt="http://ecomp.att.com/mso/infra/vnf-request/v1"
+                   xmlns="http://ecomp.att.com/mso/infra/vnf-request/v1"
+                   xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd">
+    <request-info>
+        <request-id>IntegTestsInfra</request-id>
+        <action>CREATE</action>
+        <source>PORTAL</source>
+    </request-info>
+    <vnf-inputs>
+        <vnf-name>ArqVnf</vnf-name>
+        <vnf-type>VPE</vnf-type>
+        <service-type>SDN-ETHERNET-INTERNET</service-type>
+        <aic-node-clli>AUSTXAALCP1</aic-node-clli>
+        <tenant-id>276b95b6d2b04e2e830c976eb70c9405</tenant-id>
+    </vnf-inputs>
+    <vnf-params xmlns:tns="http://ecomp.att.com/mso/infra/vnf-request/v1"/>
+</aetgt:vnf-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services</con:originalUri><con:assertion type="Valid HTTP Status Codes" name="Valid HTTP Status Codes 500" id="19038271-9229-4ae5-a743-24d0b2790cae"><con:configuration><codes>500,400</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" name="Contains Status FAILED" id="dfef30b8-13ab-486f-97b8-8f9eed1c9ac1"><con:configuration><token>&lt;request-status>FAILED&lt;/request-status></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters/><con:parameterOrder/></con:restRequest></con:config></con:testStep><con:testStep type="transfer" name="RequestId Transfer" id="2f9e16f1-55ce-4ddb-a934-785b28e1e57f"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="false" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>RequestId</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>POST VNF infra request - NO BPEL</con:sourceStep><con:sourcePath>declare namespace vnf='http://ecomp.att.com/mso/infra/vnf-request/v1';
+//vnf:vnf-request[1]/vnf:request-info[1]/vnf:request-id[1]</con:sourcePath><con:targetType>Request</con:targetType><con:targetStep>updateInfraRequest</con:targetStep><con:targetPath>declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace req='http://com.att.mso/requestsdb';
+//soapenv:Envelope/soapenv:Body/req:updateInfraRequest/requestId
+</con:targetPath><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>ToGet</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>POST VNF infra request - NO BPEL</con:sourceStep><con:sourcePath>declare namespace vnf='http://ecomp.att.com/mso/infra/vnf-request/v1';
+//vnf:vnf-request[1]/vnf:request-info[1]/vnf:request-id[1]</con:sourcePath><con:targetType>request-id</con:targetType><con:targetStep>Get Infra request</con:targetStep><con:targetPath/><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>ToSoapGet</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>POST VNF infra request - NO BPEL</con:sourceStep><con:sourcePath>declare namespace vnf='http://ecomp.att.com/mso/infra/vnf-request/v1';
+//vnf:vnf-request[1]/vnf:request-info[1]/vnf:request-id[1]</con:sourcePath><con:targetType>Request</con:targetType><con:targetStep>get infra soap</con:targetStep><con:targetPath>declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace req='http://com.att.mso/requestsdb';
+//soapenv:Envelope/soapenv:Body/req:getInfraRequest/requestId
+</con:targetPath><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="false" transferTextContent="true" failOnError="true" disabled="false" entitize="false" ignoreEmpty="false" transferChildNodes="false" transferToAll="false" useXQuery="false"><con:name>RequestId2</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>POST VNF infra request - NO BPEL</con:sourceStep><con:sourcePath>declare namespace vnf='http://ecomp.att.com/mso/infra/vnf-request/v1';
+//vnf:vnf-request[1]/vnf:request-info[1]/vnf:request-id[1]</con:sourcePath><con:targetType>Request</con:targetType><con:targetStep>updateInfraRequest 2</con:targetStep><con:targetPath>declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace req='http://com.att.mso/requestsdb';
+//soapenv:Envelope/soapenv:Body/req:updateInfraRequest/requestId
+</con:targetPath><con:type>XPATH</con:type><con:targetTransferType>XPATH</con:targetTransferType><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" disabled="false" entitize="false" ignoreEmpty="false" transferChildNodes="false" transferToAll="false" useXQuery="false"><con:name>ToSoapGet2</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>POST VNF infra request - NO BPEL</con:sourceStep><con:sourcePath>declare namespace vnf='http://ecomp.att.com/mso/infra/vnf-request/v1';
+//vnf:vnf-request[1]/vnf:request-info[1]/vnf:request-id[1]</con:sourcePath><con:targetType>Request</con:targetType><con:targetStep>get infra soap 2</con:targetStep><con:targetPath>declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace req='http://com.att.mso/requestsdb';
+//soapenv:Envelope/soapenv:Body/req:getInfraRequest/requestId
+</con:targetPath><con:type>XPATH</con:type><con:targetTransferType>XPATH</con:targetTransferType><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="false" transferTextContent="true" failOnError="true" disabled="false" entitize="false" ignoreEmpty="false" transferChildNodes="false" transferToAll="false" useXQuery="false"><con:name>RequestId status</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>POST VNF infra request - NO BPEL</con:sourceStep><con:sourcePath>declare namespace vnf='http://ecomp.att.com/mso/infra/vnf-request/v1';
+//vnf:vnf-request[1]/vnf:request-info[1]/vnf:request-id[1]</con:sourcePath><con:targetType>Request</con:targetType><con:targetStep>updateInfraRequest status</con:targetStep><con:targetPath>declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
+declare namespace req='http://com.att.mso/requestsdb';
+//soapenv:Envelope/soapenv:Body/req:updateInfraRequest/requestId
+</con:targetPath><con:type>XPATH</con:type><con:targetTransferType>XPATH</con:targetTransferType><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="request" id="82ce5ddb-df4c-4b6b-b1c3-874c2e615c02" name="updateInfraRequest"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoRequestsDbAdapterImplPortBinding</con:interface><con:operation>updateInfraRequest</con:operation><con:request name="updateInfraRequest" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="3345e90e-035c-470b-a4e4-41765ccb8b27"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/dbadapters/RequestsDbAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <req:updateInfraRequest>
+         <requestId>22ae9257-022b-4050-8b31-998034cc49a8</requestId>
+         <lastModifiedBy>Arq</lastModifiedBy>
+         <requestStatus>IN_PROGRESS</requestStatus>
+      </req:updateInfraRequest>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" id="5e83a766-cff3-473e-8a6b-7a19fec9bc03" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/requestsdb/RequestsDbAdapter/updateInfraRequestRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" id="22ed441e-1e1f-447a-a570-da0b6bb39a5b" name="updateInfraRequest status"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoRequestsDbAdapterImplPortBinding</con:interface><con:operation>updateInfraRequest</con:operation><con:request name="updateInfraRequest status" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="3345e90e-035c-470b-a4e4-41765ccb8b27"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/dbadapters/RequestsDbAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <req:updateInfraRequest>
+         <requestId>22ae9257-022b-4050-8b31-998034cc49a8</requestId>
+         <lastModifiedBy>Arq</lastModifiedBy>
+         <requestStatus>COMPLETE</requestStatus>
+      </req:updateInfraRequest>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" id="5e83a766-cff3-473e-8a6b-7a19fec9bc03" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/requestsdb/RequestsDbAdapter/updateInfraRequestRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="restrequest" name="Get Infra request" id="3ec19844-8cb2-483c-992b-5e735e8be32d"><con:settings/><con:config service="Services" resourcePath="/ecomp/mso/infra/v1/vnf-request/{request-id}" methodName="Method 1" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="Get Infra request" mediaType="application/xml" postQueryString="false" id="7b0d5ac4-8e25-4f63-bd6a-b4fc0004bad3"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://${#Project#host}</con:endpoint><con:request><![CDATA[<feature-request
+       xmlns="http://ecomp.att.com/mso/request/layer3serviceactivate/schema/v1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:msolayer3="http://ecomp.att.com/mso/request/layer3/schema/v1"
+       xmlns:msoservtypes="http://ecomp.att.com/mso/request/types/v1">
+       <msoservtypes:request-information>
+               <msoservtypes:request-id>155415ab-b4a7-4382-b4c6-d17d950565</msoservtypes:request-id>
+               <msoservtypes:request-action>FeatureChangeActivateRequest</msoservtypes:request-action>
+               <msoservtypes:source>OMX</msoservtypes:source>
+               <msoservtypes:notification-url>https://csi-tst-q22.it.att.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws</msoservtypes:notification-url>
+               <msoservtypes:order-number>5051560</msoservtypes:order-number>
+               <msoservtypes:order-version>1</msoservtypes:order-version>
+       </msoservtypes:request-information>
+       <msoservtypes:service-information>
+               <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>
+               <msoservtypes:service-instance-id>HI/VLXM/003717//SW_INTERNET</msoservtypes:service-instance-id>
+               <msoservtypes:subscriber-name>ST E2E Test50565_13000050565</msoservtypes:subscriber-name>
+       </msoservtypes:service-information>
+       <msoservtypes:feature-information>
+               <msoservtypes:feature-type>FIREWALL-LITE</msoservtypes:feature-type>
+               <msoservtypes:feature-instance-id>HI/VLXM/003717//SW_INTERNET</msoservtypes:feature-instance-id>
+               <msoservtypes:feature-yang-model>ST E2E Test50565_13000050565</msoservtypes:feature-yang-model>
+       </msoservtypes:feature-information>
+       </feature-request>
+]]></con:request><con:originalUri>http://localhost/ecomp/mso/v1/services/feature</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="87fd8d08-2b41-48fe-b09a-4fc8126db768" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:assertion type="Simple Contains" id="df899510-c7f4-40ee-8804-eee04f358b61" name="Contains"><con:configuration><token>&lt;request-status>COMPLETE&lt;/request-status></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:assertion type="Simple Contains" id="cd085d60-dc5a-426b-87e2-76536d7636aa" name="Contains UUID"><con:configuration><token>(?s).*&lt;request-id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}&lt;\/request-id>(?s).*</token><ignoreCase>false</ignoreCase><useRegEx>true</useRegEx></con:configuration></con:assertion><con:credentials><con:username>${#Project#user-infraportal}</con:username><con:password>${#Project#password-infraportal}</con:password><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters><entry key="request-id" value="22ae9257-022b-4050-8b31-998034cc49a8" xmlns="http://eviware.com/soapui/config"/></con:parameters><con:parameterOrder><con:entry>request-id</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:testStep type="request" name="get infra soap" id="46a78de9-c0b9-4f3d-bfac-bb4c1d0464e3"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoRequestsDbAdapterImplPortBinding</con:interface><con:operation>getInfraRequest</con:operation><con:request name="get infra soap" id="d9bdad79-b89c-4939-bfc8-a1eb7f9bbfad"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/dbadapters/RequestsDbAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <req:getInfraRequest>
+         <requestId>22ae9257-022b-4050-8b31-998034cc49a8</requestId>
+      </req:getInfraRequest>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response" id="50273e00-b97b-4ed3-888f-950fa14bee5e"/><con:assertion type="SOAP Fault Assertion" id="59908871-5e28-4c04-a5e0-fbc23c2bb962"/><con:assertion type="Simple Contains" id="0c450ede-ed03-47b6-be4e-93b718b2cc05" name="Contains"><con:configuration><token>&lt;lastModifiedBy>Arq&lt;/lastModifiedBy></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" id="452fa72a-3bb1-4891-b941-c0faa59a6fb9" name="updateInfraRequest 2"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoRequestsDbAdapterImplPortBinding</con:interface><con:operation>updateInfraRequest</con:operation><con:request name="updateInfraRequest 2" outgoingWss="" incomingWss="" timeout="" sslKeystore="" useWsAddressing="false" useWsReliableMessaging="false" wssPasswordType="" id="3345e90e-035c-470b-a4e4-41765ccb8b27"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/dbadapters/RequestsDbAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <req:updateInfraRequest>
+         <requestId>22ae9257-022b-4050-8b31-998034cc49a8</requestId>
+         <lastModifiedBy>Arq</lastModifiedBy>
+         <!--Optional:-->
+         <statusMessage>newStatus</statusMessage>
+         <!--Optional:-->
+         <responseBody>body</responseBody>
+         <!--Optional:-->
+         <requestStatus>status</requestStatus>
+         <!--Optional:-->
+         <progress>98</progress>
+         <!--Optional:-->
+         <vnfOutputs>OneSmallStepForMan</vnfOutputs>
+      </req:updateInfraRequest>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="Valid HTTP Status Codes" id="5e83a766-cff3-473e-8a6b-7a19fec9bc03" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://com.att.mso/requestsdb/RequestsDbAdapter/updateInfraRequestRequest"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:testStep type="request" name="get infra soap 2" id="f6ac229b-fac5-4c7e-afd0-8e1ce72ddaa9"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>MsoRequestsDbAdapterImplPortBinding</con:interface><con:operation>getInfraRequest</con:operation><con:request name="get infra soap 2" id="d9bdad79-b89c-4939-bfc8-a1eb7f9bbfad"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://${#Project#host}/dbadapters/RequestsDbAdapter</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://com.att.mso/requestsdb">
+   <soapenv:Header/>
+   <soapenv:Body>
+      <req:getInfraRequest>
+         <requestId>22ae9257-022b-4050-8b31-998034cc49a8</requestId>
+      </req:getInfraRequest>
+   </soapenv:Body>
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response" id="50273e00-b97b-4ed3-888f-950fa14bee5e"/><con:assertion type="SOAP Fault Assertion" id="59908871-5e28-4c04-a5e0-fbc23c2bb962"/><con:assertion type="Simple Contains" id="0c450ede-ed03-47b6-be4e-93b718b2cc05" name="Contains"><con:configuration><token>&lt;lastModifiedBy>Arq&lt;/lastModifiedBy></token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:properties><con:property><con:name>host</con:name><con:value>localhost:18080</con:value></con:property><con:property><con:name>user-infraportal</con:name><con:value>InfraPortalClient</con:value></con:property><con:property><con:name>password-infraportal</con:name><con:value>password1$</con:value></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/SoapUI/soapui-settings.xml b/packages/arquillian-unit-tests/src/test/resources/SoapUI/soapui-settings.xml
new file mode 100644 (file)
index 0000000..2c03cdc
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<con:soapui-settings xmlns:con="http://eviware.com/soapui/config"><con:setting id="WsdlSettings@excluded-types">&lt;con:entry xmlns:con="http://eviware.com/soapui/config">schema@http://www.w3.org/2001/XMLSchema&lt;/con:entry></con:setting><con:setting id="WsdlSettings@name-with-binding">true</con:setting><con:setting id="HttpSettings@http_version">1.1</con:setting><con:setting id="HttpSettings@max_total_connections">2000</con:setting><con:setting id="HttpSettings@response-compression">true</con:setting><con:setting id="HttpSettings@leave_mockengine">true</con:setting><con:setting id="UISettings@auto_save_projects_on_exit">true</con:setting><con:setting id="UISettings@show_descriptions">true</con:setting><con:setting id="WsdlSettings@xml-generation-always-include-optional-elements">true</con:setting><con:setting id="WsaSettings@useDefaultRelatesTo">true</con:setting><con:setting id="WsaSettings@useDefaultRelationshipType">true</con:setting><con:setting id="UISettings@show_startup_page">true</con:setting><con:setting id="UISettings@gc_interval">60</con:setting><con:setting id="WsdlSettings@cache-wsdls">true</con:setting><con:setting id="WsdlSettings@pretty-print-response-xml">true</con:setting><con:setting id="HttpSettings@include_request_in_time_taken">true</con:setting><con:setting id="HttpSettings@include_response_in_time_taken">true</con:setting><con:setting id="HttpSettings@start_mock_service">true</con:setting><con:setting id="UISettings@auto_save_interval">0</con:setting><con:setting id="WsaSettings@soapActionOverridesWsaAction">true</con:setting><con:setting id="WsaSettings@overrideExistingHeaders">true</con:setting><con:setting id="WsaSettings@enableForOptional">true</con:setting><con:setting id="VersionUpdateSettings@auto-check-version-update">true</con:setting><con:setting id="ProxySettings@autoProxy">true</con:setting><con:setting id="ProxySettings@enableProxy">false</con:setting><con:setting id="WSISettings@location">/usr/share/SoapUI-5.2.1/wsi-test-tools</con:setting><con:setting id="UISettings@disable_analytics">true</con:setting><con:setting id="UISettings@analytics_opt_out_version">5.2</con:setting><con:setting id="GlobalPropertySettings@properties">&lt;xml-fragment/></con:setting><con:setting id="RecentProjects"><![CDATA[<xml-fragment xmlns:con="http://eviware.com/soapui/config">
+</xml-fragment>]]></con:setting></con:soapui-settings>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/arquillian.xml b/packages/arquillian-unit-tests/src/test/resources/arquillian.xml
new file mode 100644 (file)
index 0000000..ea07bc5
--- /dev/null
@@ -0,0 +1,102 @@
+<arquillian xmlns="http://jboss.org/schema/arquillian"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="
+        http://jboss.org/schema/arquillian
+        http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+    <defaultProtocol type="Servlet 3.0" />
+
+       <extension qualifier="cube">
+         <property name="connectionMode">STARTANDSTOP</property>
+       </extension>
+
+    <extension qualifier="docker">
+
+      <property name="serverVersion">1.23</property>
+     
+      <property name="serverUri">${docker.url}</property> 
+      <property name="definitionFormat">CUBE</property>
+      <property name="dockerContainers">
+         mso:
+           image: ecomp/mso-arquillian:${images.version}
+           beforeStop:
+            - copy:
+                   from: /opt/jboss/standalone/log/
+                   to: ${target.folder}/mso-automated-tests/jboss-logs
+            - copy:
+                   from: /var/log/ecomp/MSO
+                   to: ${target.folder}/mso-automated-tests/mso-logs
+            - copy:
+                   from: /tmp/mso-log-checker.log
+                   to: ${target.folder}/mso-automated-tests/
+           hostName: mso
+           await:
+              strategy: http
+              match: 'regexp:(.*)Welcome to WildFly 10(.*)'
+              responseCode: 200
+              url: http://dockerHost:18080
+              sleepPollingTime: 30 s
+              iterations: 20
+           portBindings: [18080->8080/tcp, 9990/tcp, 9999/tcp]
+           volumes: [/shared]
+           binds:
+            - ${target.folder}/test-classes/docker/mso:/shared
+           links:
+             - mariadb:mariadb
+             - jacoco-shared:jacoco-shared
+         jacoco-shared:
+            image: ecomp/jacoco:1.0
+            beforeStop:
+             - copy:
+                   from: /shared/jacoco-it.exec
+                   to: ${target.folder}/mso-automated-tests/
+            hostName: jacoco
+            volumes: [/shared]
+            binds:
+             - ${target.folder}/test-classes/docker/mso:/shared:ro
+         mariadb:
+            image: mariadb:10.1.11
+            beforeStop:
+                - log:
+                   to: ${target.folder}/mso-automated-tests/db/mariadb.log  
+                   follow: false
+                   stdout: true
+                   stderr: true
+                   timestamps: true
+            exposedPorts: [3306/tcp]
+            await:
+             strategy: polling
+             ports: [3306]
+             sleepPollingTime: 5 s
+             iterations: 24
+            env: [MYSQL_ROOT_PASSWORD=Etoile19_]
+            portBindings: [3306/tcp]
+            hostName: mariadb
+            volumes: [/etc/mysql/conf.d,/docker-entrypoint-initdb.d]
+            binds:
+             - ${target.folder}/test-classes/docker/mariadb/conf1:/etc/mysql/conf.d:ro
+             - ${target.folder}/../../root-pack-extras/config-resources/mariadb:/docker-entrypoint-initdb.d:ro
+  
+        </property>
+        <property name="shouldAllowToConnectToRunningContainers">false</property>
+        <property name="clean">true</property>
+        <property name="removeVolumes">true</property>
+        <property name="autoStartContainers">mso</property>
+    </extension>
+    
+
+    <container qualifier="jboss-as" default="true">
+        <configuration>
+            <property name="managementAddress">${docker.hostname}</property>
+            <property name="managementPort">9990</property>
+            <property name="username">admin</property>
+            <property name="password">Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U</property>
+        </configuration>
+        <protocol type="Servlet 3.0">
+               <property name="host">${docker.hostname}</property>
+               <property name="port">18080</property>
+       </protocol>
+    </container>
+
+
+</arquillian>
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf1/mariadb1.cnf b/packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf1/mariadb1.cnf
new file mode 100644 (file)
index 0000000..0be1bd7
--- /dev/null
@@ -0,0 +1,194 @@
+# Example MySQL config file for medium systems.
+#
+# This is for a system with memory 8G where MySQL plays
+# an important part, or systems up to 128M where MySQL is used together with
+# other programs (such as a web server)
+#
+# In this file, you can use all long options that a program supports.
+# If you want to know which options a program supports, run the program
+# with the "--help" option.
+
+# The following options will be passed to all MySQL clients
+##[client]
+##user            = root
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+##performance_schema
+
+slow_query_log =ON
+long_query_time =2
+slow_query_log_file =//var/lib/mysql/slow_query.log
+##basedir         = //opt/app/mysql/product/mariadb-10.1.11-linux-x86_64
+##datadir         = //opt/app/mysql/data
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+skip-external-locking
+explicit_defaults_for_timestamp = true
+skip-symbolic-links
+local-infile = 0
+#ignore_db_dir=lost+found
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 100
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+max_connections = 500
+lower_case_table_names = 1
+thread_stack = 256K
+thread_cache_size = 25
+query_cache_size = 8M
+query_cache_type = 0
+query_prealloc_size = 512K
+query_cache_limit = 1M
+
+# Password validation
+##plugin-load-add=simple_password_check.so
+##simple_password_check_other_characters=0
+
+# Audit Log settings
+plugin-load-add=server_audit.so
+server_audit=FORCE_PLUS_PERMANENT
+server_audit_file_path=//var/lib/mysql/audit.log
+server_audit_file_rotate_size=50M
+server_audit_events=CONNECT,QUERY,TABLE
+server_audit_logging=on
+
+# Don't listen on a TCP/IP port at all. This can be a security enhancement,
+# if all processes that need to connect to mysqld run on the same host.
+# All interaction with mysqld must be made via Unix sockets or named pipes.
+# Note that using this option without enabling named pipes on Windows
+# (via the "enable-named-pipe" option) will render mysqld useless!
+#
+#skip-networking
+
+# Replication Master Server (default)
+# binary logging is required for replication
+##log-bin=//var/lib/mysql/mysql-bin
+
+# binary logging format - mixed recommended
+binlog_format=row
+
+# required unique id between 1 and 2^32 - 1
+# defaults to 1 if master-host is not set
+# but will not function as a master if omitted
+
+# Replication Slave (comment out master section to use this)
+#
+# To configure this host as a replication slave, you can choose between
+# two methods :
+#
+# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
+#    the syntax is:
+#
+#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
+#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
+#
+#    where you replace <host>, <user>, <password> by quoted strings and
+#    <port> by the master's port number (3306 by default).
+#
+#    Example:
+#
+#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
+#    MASTER_USER='joe', MASTER_PASSWORD='secret';
+#
+# OR
+#
+# 2) Set the variables below. However, in case you choose this method, then
+#    start replication for the first time (even unsuccessfully, for example
+#    if you mistyped the password in master-password and the slave fails to
+#    connect), the slave will create a master.info file, and any later
+#    change in this file to the variables' values below will be ignored and
+#    overridden by the content of the master.info file, unless you shutdown
+#    the slave server, delete master.info and restart the slaver server.
+#    For that reason, you may want to leave the lines below untouched
+#    (commented) and instead use CHANGE MASTER TO (see above)
+#
+# required unique id between 2 and 2^32 - 1
+# (and different from the master)
+# defaults to 2 if master-host is set
+# but will not function as a slave if omitted
+#server-id       = 2
+#
+# The replication master for this slave - required
+#master-host     =   <hostname>
+#
+# The username the slave will use for authentication when connecting
+# to the master - required
+#master-user     =   <username>
+#
+# The password the slave will authenticate with when connecting to
+# the master - required
+#master-password =   <password>
+#
+# The port the master is listening on.
+# optional - defaults to 3306
+#master-port     =  <port>
+#
+# binary logging - not required for slaves, but recommended
+#log-bin=mysql-bin
+
+# Uncomment the following if you are using InnoDB tables
+##innodb_data_home_dir = //opt/app/mysql/data
+##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
+##innodb_log_group_home_dir = //opt/app/mysql/iblogs
+# You can set .._buffer_pool_size up to 50 - 80 %
+# of RAM but beware of setting memory usage too high
+innodb_buffer_pool_size = 6380M
+#innodb_additional_mem_pool_size = 2M
+# Set .._log_file_size to 25 % of buffer pool size
+innodb_log_file_size = 150M
+innodb_log_files_in_group = 3
+innodb_log_buffer_size = 8M
+#innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_autoextend_increment = 100
+expire_logs_days = 8
+open_files_limit = 2000
+transaction-isolation=READ-COMMITTED
+####### Galera parameters #######
+## Galera Provider configuration
+wsrep_provider=/usr/lib/galera/libgalera_smm.so
+wsrep_provider_options="gcache.size=2G; gcache.page_size=1G"
+## Galera Cluster configuration
+wsrep_cluster_name="MSO-automated-tests-cluster"
+wsrep_cluster_address="gcomm://"
+#wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
+##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
+## Galera Synchronization configuration
+wsrep_sst_method=rsync
+#wsrep_sst_method=xtrabackup-v2
+#wsrep_sst_auth="sstuser:Mon#2o!6"
+## Galera Node configuration
+wsrep_node_name="mariadb1"
+##wsrep_node_address="192.169.3.184"
+wsrep_on=ON
+## Status notification
+#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
+#######
+
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+no-auto-rehash
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[myisamchk]
+key_buffer_size = 20971520
+
+##[mysqlhotcopy]
+##interactive-timeout
+##[mysqld_safe]
+##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
+##log-error=//opt/app/mysql/log/mysqld.log
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf2/mariadb2.cnf b/packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf2/mariadb2.cnf
new file mode 100644 (file)
index 0000000..bf5f9c1
--- /dev/null
@@ -0,0 +1,193 @@
+# Example MySQL config file for medium systems.
+#
+# This is for a system with memory 8G where MySQL plays
+# an important part, or systems up to 128M where MySQL is used together with
+# other programs (such as a web server)
+#
+# In this file, you can use all long options that a program supports.
+# If you want to know which options a program supports, run the program
+# with the "--help" option.
+
+# The following options will be passed to all MySQL clients
+##[client]
+##user            = root
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+##performance_schema
+
+slow_query_log =ON
+long_query_time =2
+slow_query_log_file =//var/lib/mysql/slow_query.log
+##basedir         = //opt/app/mysql/product/mariadb-10.1.11-linux-x86_64
+##datadir         = //opt/app/mysql/data
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+skip-external-locking
+explicit_defaults_for_timestamp = true
+skip-symbolic-links
+local-infile = 0
+#ignore_db_dir=lost+found
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 100
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+max_connections = 500
+lower_case_table_names = 1
+thread_stack = 256K
+thread_cache_size = 25
+query_cache_size = 8M
+query_cache_type = 0
+query_prealloc_size = 512K
+query_cache_limit = 1M
+
+# Password validation
+##plugin-load-add=simple_password_check.so
+##simple_password_check_other_characters=0
+
+# Audit Log settings
+plugin-load-add=server_audit.so
+server_audit=FORCE_PLUS_PERMANENT
+server_audit_file_path=//var/lib/mysql/audit.log
+server_audit_file_rotate_size=50M
+server_audit_events=CONNECT,QUERY,TABLE
+server_audit_logging=on
+
+# Don't listen on a TCP/IP port at all. This can be a security enhancement,
+# if all processes that need to connect to mysqld run on the same host.
+# All interaction with mysqld must be made via Unix sockets or named pipes.
+# Note that using this option without enabling named pipes on Windows
+# (via the "enable-named-pipe" option) will render mysqld useless!
+#
+#skip-networking
+
+# Replication Master Server (default)
+# binary logging is required for replication
+##log-bin=//var/lib/mysql/mysql-bin
+
+# binary logging format - mixed recommended
+binlog_format=row
+
+# required unique id between 1 and 2^32 - 1
+# defaults to 1 if master-host is not set
+# but will not function as a master if omitted
+
+# Replication Slave (comment out master section to use this)
+#
+# To configure this host as a replication slave, you can choose between
+# two methods :
+#
+# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
+#    the syntax is:
+#
+#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
+#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
+#
+#    where you replace <host>, <user>, <password> by quoted strings and
+#    <port> by the master's port number (3306 by default).
+#
+#    Example:
+#
+#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
+#    MASTER_USER='joe', MASTER_PASSWORD='secret';
+#
+# OR
+#
+# 2) Set the variables below. However, in case you choose this method, then
+#    start replication for the first time (even unsuccessfully, for example
+#    if you mistyped the password in master-password and the slave fails to
+#    connect), the slave will create a master.info file, and any later
+#    change in this file to the variables' values below will be ignored and
+#    overridden by the content of the master.info file, unless you shutdown
+#    the slave server, delete master.info and restart the slaver server.
+#    For that reason, you may want to leave the lines below untouched
+#    (commented) and instead use CHANGE MASTER TO (see above)
+#
+# required unique id between 2 and 2^32 - 1
+# (and different from the master)
+# defaults to 2 if master-host is set
+# but will not function as a slave if omitted
+#server-id       = 2
+#
+# The replication master for this slave - required
+#master-host     =   <hostname>
+#
+# The username the slave will use for authentication when connecting
+# to the master - required
+#master-user     =   <username>
+#
+# The password the slave will authenticate with when connecting to
+# the master - required
+#master-password =   <password>
+#
+# The port the master is listening on.
+# optional - defaults to 3306
+#master-port     =  <port>
+#
+# binary logging - not required for slaves, but recommended
+#log-bin=mysql-bin
+
+# Uncomment the following if you are using InnoDB tables
+##innodb_data_home_dir = //opt/app/mysql/data
+##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
+##innodb_log_group_home_dir = //opt/app/mysql/iblogs
+# You can set .._buffer_pool_size up to 50 - 80 %
+# of RAM but beware of setting memory usage too high
+innodb_buffer_pool_size = 6380M
+#innodb_additional_mem_pool_size = 2M
+# Set .._log_file_size to 25 % of buffer pool size
+innodb_log_file_size = 150M
+innodb_log_files_in_group = 3
+innodb_log_buffer_size = 8M
+#innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_autoextend_increment = 100
+expire_logs_days = 8
+open_files_limit = 2000
+transaction-isolation=READ-COMMITTED
+####### Galera parameters #######
+## Galera Provider configuration
+wsrep_provider=/usr/lib/galera/libgalera_smm.so
+wsrep_provider_options="gcache.size=2G; gcache.page_size=1G"
+## Galera Cluster configuration
+wsrep_cluster_name="MSO-automated-tests-cluster"
+wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
+##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
+## Galera Synchronization configuration
+wsrep_sst_method=rsync
+#wsrep_sst_method=xtrabackup-v2
+#wsrep_sst_auth="sstuser:Mon#2o!6"
+## Galera Node configuration
+wsrep_node_name="mariadb2"
+##wsrep_node_address="192.169.3.184"
+wsrep_on=ON
+## Status notification
+#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
+#######
+
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+no-auto-rehash
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[myisamchk]
+key_buffer_size = 20971520
+
+##[mysqlhotcopy]
+##interactive-timeout
+##[mysqld_safe]
+##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
+##log-error=//opt/app/mysql/log/mysqld.log
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf3/mariadb3.cnf b/packages/arquillian-unit-tests/src/test/resources/docker/mariadb/conf3/mariadb3.cnf
new file mode 100644 (file)
index 0000000..74f7a31
--- /dev/null
@@ -0,0 +1,193 @@
+# Example MySQL config file for medium systems.
+#
+# This is for a system with memory 8G where MySQL plays
+# an important part, or systems up to 128M where MySQL is used together with
+# other programs (such as a web server)
+#
+# In this file, you can use all long options that a program supports.
+# If you want to know which options a program supports, run the program
+# with the "--help" option.
+
+# The following options will be passed to all MySQL clients
+##[client]
+##user            = root
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+##performance_schema
+
+slow_query_log =ON
+long_query_time =2
+slow_query_log_file =//var/lib/mysql/slow_query.log
+##basedir         = //opt/app/mysql/product/mariadb-10.1.11-linux-x86_64
+##datadir         = //opt/app/mysql/data
+##port            = 3306
+##socket          = //opt/app/mysql/mysql.sock
+skip-external-locking
+explicit_defaults_for_timestamp = true
+skip-symbolic-links
+local-infile = 0
+#ignore_db_dir=lost+found
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 100
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+max_connections = 500
+lower_case_table_names = 1
+thread_stack = 256K
+thread_cache_size = 25
+query_cache_size = 8M
+query_cache_type = 0
+query_prealloc_size = 512K
+query_cache_limit = 1M
+
+# Password validation
+##plugin-load-add=simple_password_check.so
+##simple_password_check_other_characters=0
+
+# Audit Log settings
+plugin-load-add=server_audit.so
+server_audit=FORCE_PLUS_PERMANENT
+server_audit_file_path=//var/lib/mysql/audit.log
+server_audit_file_rotate_size=50M
+server_audit_events=CONNECT,QUERY,TABLE
+server_audit_logging=on
+
+# Don't listen on a TCP/IP port at all. This can be a security enhancement,
+# if all processes that need to connect to mysqld run on the same host.
+# All interaction with mysqld must be made via Unix sockets or named pipes.
+# Note that using this option without enabling named pipes on Windows
+# (via the "enable-named-pipe" option) will render mysqld useless!
+#
+#skip-networking
+
+# Replication Master Server (default)
+# binary logging is required for replication
+##log-bin=//var/lib/mysql/mysql-bin
+
+# binary logging format - mixed recommended
+binlog_format=row
+
+# required unique id between 1 and 2^32 - 1
+# defaults to 1 if master-host is not set
+# but will not function as a master if omitted
+
+# Replication Slave (comment out master section to use this)
+#
+# To configure this host as a replication slave, you can choose between
+# two methods :
+#
+# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
+#    the syntax is:
+#
+#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
+#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
+#
+#    where you replace <host>, <user>, <password> by quoted strings and
+#    <port> by the master's port number (3306 by default).
+#
+#    Example:
+#
+#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
+#    MASTER_USER='joe', MASTER_PASSWORD='secret';
+#
+# OR
+#
+# 2) Set the variables below. However, in case you choose this method, then
+#    start replication for the first time (even unsuccessfully, for example
+#    if you mistyped the password in master-password and the slave fails to
+#    connect), the slave will create a master.info file, and any later
+#    change in this file to the variables' values below will be ignored and
+#    overridden by the content of the master.info file, unless you shutdown
+#    the slave server, delete master.info and restart the slaver server.
+#    For that reason, you may want to leave the lines below untouched
+#    (commented) and instead use CHANGE MASTER TO (see above)
+#
+# required unique id between 2 and 2^32 - 1
+# (and different from the master)
+# defaults to 2 if master-host is set
+# but will not function as a slave if omitted
+#server-id       = 2
+#
+# The replication master for this slave - required
+#master-host     =   <hostname>
+#
+# The username the slave will use for authentication when connecting
+# to the master - required
+#master-user     =   <username>
+#
+# The password the slave will authenticate with when connecting to
+# the master - required
+#master-password =   <password>
+#
+# The port the master is listening on.
+# optional - defaults to 3306
+#master-port     =  <port>
+#
+# binary logging - not required for slaves, but recommended
+#log-bin=mysql-bin
+
+# Uncomment the following if you are using InnoDB tables
+##innodb_data_home_dir = //opt/app/mysql/data
+##innodb_data_file_path = ibdata1:20M:autoextend:max:32G
+##innodb_log_group_home_dir = //opt/app/mysql/iblogs
+# You can set .._buffer_pool_size up to 50 - 80 %
+# of RAM but beware of setting memory usage too high
+innodb_buffer_pool_size = 6380M
+#innodb_additional_mem_pool_size = 2M
+# Set .._log_file_size to 25 % of buffer pool size
+innodb_log_file_size = 150M
+innodb_log_files_in_group = 3
+innodb_log_buffer_size = 8M
+#innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_autoextend_increment = 100
+expire_logs_days = 8
+open_files_limit = 2000
+transaction-isolation=READ-COMMITTED
+####### Galera parameters #######
+## Galera Provider configuration
+wsrep_provider=/usr/lib/galera/libgalera_smm.so
+wsrep_provider_options="gcache.size=2G; gcache.page_size=1G"
+## Galera Cluster configuration
+wsrep_cluster_name="MSO-automated-tests-cluster"
+wsrep_cluster_address="gcomm://mariadb1,mariadb2,mariadb3"
+##wsrep_cluster_address="gcomm://192.169.3.184,192.169.3.185,192.169.3.186"
+## Galera Synchronization configuration
+wsrep_sst_method=rsync
+#wsrep_sst_method=xtrabackup-v2
+#wsrep_sst_auth="sstuser:Mon#2o!6"
+## Galera Node configuration
+wsrep_node_name="mariadb3"
+##wsrep_node_address="192.169.3.184"
+wsrep_on=ON
+## Status notification
+#wsrep_notify_cmd=/opt/app/mysql/bin/wsrep_notify
+#######
+
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+no-auto-rehash
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[myisamchk]
+key_buffer_size = 20971520
+
+##[mysqlhotcopy]
+##interactive-timeout
+##[mysqld_safe]
+##malloc-lib=//opt/app/mysql/local/lib/libjemalloc.so.1
+##log-error=//opt/app/mysql/log/mysqld.log
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/docker/mso/mso-docker.json b/packages/arquillian-unit-tests/src/test/resources/docker/mso/mso-docker.json
new file mode 100644 (file)
index 0000000..994d17e
--- /dev/null
@@ -0,0 +1,219 @@
+{
+    "name": "mso-docker",
+    "description": "MSO Docker Images",
+    "chef_type": "environment",
+    "json_class": "Chef::Environment",
+    "default_attributes": 
+    {
+        "mso_config_path": "/etc/mso/config.d/",
+
+        "mso-api-handler-infra-config": 
+        {
+            "bpelURL": "http://mso:8080",
+            "bpelAuth": "786864AA53D0DCD881AED1154230C0C3058D58B9339D2EFB6193A0F0D82530E1",
+            "camundaURL": "http://mso:8080",
+            "camundaAuth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1"
+        },
+
+        "asdc-connections": 
+        {
+            "asdc-controller1": 
+            {
+                "user": "user",
+                "consumerGroup": "mso",
+                "consumerId": "mso",
+                "environmentName": "PROD",
+                "asdcAddress": "asdc_hostname1:8443",
+                "password": "f3895035812addbf115bfaf7d2dc850e",
+                "pollingInterval": 30,
+                "pollingTimeout": 30,
+                "relevantArtifactTypes": "HEAT,HEAT_ENV,HEAT_VOL",
+                "activateServerTLSAuth": "false",
+                "keyStorePassword": "",
+                "keyStorePath": ""
+            },
+
+            "asdc-controller2": 
+            {
+                "user": "user",
+                "consumerGroup": "mso",
+                "consumerId": "mso",
+                "environmentName": "PROD",
+                "asdcAddress": "asdc_hostname2:8443",
+                "password": "f3895035812addbf115bfaf7d2dc850e",
+                "pollingInterval": 30,
+                "pollingTimeout": 30,
+                "relevantArtifactTypes": "HEAT,HEAT_ENV,HEAT_VOL",
+                "activateServerTLSAuth": "false",
+                "keyStorePassword": "",
+                "keyStorePath": ""
+            }
+        },
+
+        "mso-sdnc-adapter-config": 
+        {
+            "sdncurls": 
+            [
+                "https://localhost:8443/restconf/operations/L3SDN-API:",
+                "https://localhost:8443/restconf/config/L3SDN-API:",
+                "https://localhost:8443/restconf/operations/Firewall-API:",
+                "https://localhost:8443/restconf/config",
+                "https://localhost:8443/restconf/operations/VNF-API:",
+                "https://localhost:8443/restconf/operations/NBNC-API:"
+            ],
+
+            "bpelurl": "http://mso:8080/mso/SDNCAdapterCallbackService",
+            "myurl": "http://mso:8080/adapters/rest/SDNCNotify",
+            "sdncauth": "406B2AE613211B6FB52466DE6E1769AC",
+            "bpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1",
+            "sdncconnecttime": "5000"
+        },
+
+        "mso-po-adapter-config": 
+        {
+            "identity_services": 
+            [
+                {
+                    "dcp_clli": "MT_KEYSTONE",
+                    "identity_url": "https://localhost:5000/v2.0",
+                    "mso_id": "userid",
+                    "mso_pass": "password",
+                    "admin_tenant": "service",
+                    "member_role": "admin",
+                    "tenant_metadata": "true",
+                    "identity_server_type": "KEYSTONE",
+                    "identity_authentication_type": "RACKSPACE_APIKEY"
+                },
+
+                {
+                    "dcp_clli": "MT_KEYSTONE2",
+                    "identity_url": "https://localhost:5000/v2.0",
+                    "mso_id": "userid",
+                    "mso_pass": "password",
+                    "admin_tenant": "service",
+                    "member_role": "admin",
+                     "tenant_metadata": "true",
+                    "identity_server_type": "KEYSTONE",
+                    "identity_authentication_type": "USERNAME_PASSWORD"
+                }
+            ],
+
+            "cloud_sites": 
+            [
+                {
+                    "id": "MT",
+                    "aic_version": "2.5",
+                    "lcp_clli": "MT",
+                    "region_id": "lcp_region",
+                    "identity_service_id": "MT_KEYSTONE"
+                },
+
+                {
+                    "id": "MT2",
+                    "aic_version": "2.5",
+                    "lcp_clli": "MT2",
+                    "region_id": "lcp_region",
+                    "identity_service_id": "MT_KEYSTONE2"
+                }
+            ],
+
+            "vnfbpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1",
+            "checkrequiredparameters": "true",
+            "nwbpelauth": "5119D1AF37F671FC01FFAD2151D93EFB2BBB503E879FD07104D024EDDF118FD1"
+        },
+
+        "mso-bpmn-config": 
+        {
+            "urnFileSystemLoadingEnabled": "true"
+        },
+
+        "mso-bpmn-urn-config": 
+        {
+            "logDebugAsyncQueryAAICustomer": "false",
+            "logDebugChangeFeatureActivateV1": "false",
+            "logDebugChangeLayer3ServiceActivateV1": "false",
+            "logDebugChangeLayer3ServiceProvV1": "false",
+            "logDebugLayer3TestAndTurnUpV1": "false",
+            "logDebugVnfAdapterRollbackV1": "false",
+            "logDebugVnfAdapterQueryV1": "false",
+            "logDebugCreateNetworkV1": "false",
+            "logDebugCreateCinderVolumeV1": "false",
+            "logDebugDeleteCinderVolumeV1": "false",
+            "logDebugUpdateCinderVolumeV1": "false",
+            "logDebugDeleteGenericVNFV1": "false",
+            "logDebugDisconnectLayer3Service": "false",
+            "logDebugCompleteMsoProcess": "false",
+            "logDebugCreateCustomerV1": "false",
+            "logDebugCreateTenantV1": "false",
+            "logDebugDeleteNetworkV1": "false",
+            "logDebugDeleteTenantV1": "false",
+            "logDebugDeleteVCEV1": "false",
+            "logDebugGetLayer3ServiceDetailsV1": "false",
+            "logDebugL3ToHigherLayerAddBonding": "false",
+            "logDebugL3ToHigherLayerDeleteBonding": "false",
+            "logDebugLayer3ServiceActivateV1": "false",
+            "logDebugQueryAAICustomer": "false",
+            "logDebugQueryTenantInfo": "false",
+            "logDebugSdncAdapter": "false",
+            "logDebugVnfAdapterCreateV1": "false",
+            "logDebugVnfAdapterDeleteV1": "false",
+            "logDebugRemoveLayer3Service": "false",
+            "logDebugUpdateNetworkV2": "false",
+            "logDebugCreateVfModuleVolumeInfraV1": "false",
+            "logDebugDeleteVfModuleVolumeInfraV1": "false",
+            "logDebugUpdateVfModuleVolumeInfraV1": "false",
+            "logDebugCreateServiceInstanceInfra": "false",
+            "logDebugDeleteServiceInstanceInfra": "false",
+            "logDebugCreateNetworkInstanceInfra": "false",
+            "logDebugDeleteNetworkInstanceInfra": "false",
+            "logDebugUpdateNetworkInstanceInfra": "false",
+            "aaiEndpoint": "http://mso:8080/aai-emul",
+            "adaptersCompletemsoprocessEndpoint": "http://mso:8080/CompleteMsoProcess",
+            "adaptersDbEndpoint": "http://mso:8080/dbadapters/RequestsDbAdapter",
+            "adaptersSdncEndpoint": "http://mso:8080/adapters/SDNCAdapter",
+            "adaptersTenantEndpoint": "http://mso:8080/tenants/TenantAdapter",
+            "workflowSdncadapterCallback": "http://mso:8080/mso/SDNCAdapterCallbackService",
+            "msoKey": "07a7159d3bf51a0e53be7a8f89699be7",
+            "adaptersPoAuth": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74",
+            "sdncTimeout": "PT5M",
+            "rollback": "true",
+            "adaptersNetworkEndpoint": "http://mso:8080/networks/NetworkAdapter",
+            "adaptersNetworkRestEndpoint": "http://mso:8080/networks/rest/v1/networks",
+            "adaptersVnfAsyncEndpoint": "http://mso/vnfs/VnfAdapterAsync",
+            "workflowVnfAdapterDeleteCallback": "http://mso:8080/mso/vnfAdapterNotify",
+            "workflowVnfAdapterCreateCallback": "http://mso:8080/mso/vnfAdapterNotify",
+            "adaptersVnfRestEndpoint": "http://mso:8080/vnfs/rest/v1/vnfs",
+            "workflowVnfAdapterRestCallback": "http://mso:8080/mso/vnfAdapterRestNotify",
+            "poTimeout": "PT5M",
+            "sdncFirewallYangModel": "http://com/att/svc/mis/firewall-lite-gui",
+            "sdncFirewallYangModelVersion": "2015-05-15",
+            "sdncTimeoutFirewall": "20",
+            "callbackRetryAttempts": "30",
+            "callbackRetrySleepTime": "1000",
+            "workflowDefaultAAINetworkGenericVnfUri": "/aai/v8/network/generic-vnfs/generic-vnf",
+            "workflowDeleteGenericVNFV1AAINetworkGenericVnfUri": "/aai/v8/network/generic-vnfs/generic-vnf",
+            "workflowDefaultAAINetworkVpnBindingUri": "/aai/v8/network/vpn-bindings/vpn-binding",
+            "workflowCreateNetworkV1AAINetworkVpnBindingUri": "",
+            "workflowDefaultAAINetworkVceUri": "/aai/v8/network/vces/vce",
+            "workflowDeleteVCEV1AAINetworkVceUri": "",
+            "workflowDefaultAAINetworkL3NetworkUri": "/aai/v8/network/l3-networks/l3-network",
+            "workflowCreateNetworkV1AAINetworkL3NetworkUri": "/aai/v8/network/l3-networks/l3-network",
+            "workflowDeleteNetworkV1AAINetworkL3NetworkUri": "/aai/v8/network/l3-networks/l3-network",
+            "workflowDefaultAAIBusinessCustomerUri": "/aai/v8/business/customers/customer",
+            "workflowDefaultAAICloudInfrastructureVolumeGroupUri": "/aai/v8/cloud-infrastructure/volume-groups/volume-group",
+            "workflowCreateCinderVolumeV1AAICloudInfrastructureVolumeGroupUri": "",
+            "workflowDefaultAAICloudInfrastructureTenantUri": "/aai/v8/cloud-infrastructure/tenants/tenant",
+            "workflowDefaultAAISearchGenericQueryUri": "/aai/v8/search/generic-query",
+            "aaiAuth": "2630606608347B7124C244AB0FE34F6F"
+        }
+    },
+
+    "override_attributes": 
+    {
+    },
+
+    "cookbook_versions": 
+    {
+        "mso-config": "~> 1.0.0"
+    }
+}
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/base_vlb.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/base_vlb.env
new file mode 100644 (file)
index 0000000..b8cb810
--- /dev/null
@@ -0,0 +1,20 @@
+parameters:
+  vlb_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
+  vlb_flavor_name: 4 GB General Purpose v1
+  public_net_id: 00000000-0000-0000-0000-000000000000
+  vlb_private_net_id: zdfw1lb01_private
+  ecomp_private_net_id: oam_ecomp
+  vlb_private_net_cidr: 192.168.10.0/24
+  ecomp_private_net_cidr: 192.168.9.0/24
+  vlb_private_ip_0: 192.168.10.100
+  vlb_private_ip_1: 192.168.20.100
+  vdns_private_ip_0: 192.168.10.200
+  vdns_private_ip_1: 192.168.9.200
+  vlb_name_0: zdfw1lb01lb01
+  vdns_name_0: zdfw1lb01dns01
+  vnf_id: vLoadBalancer_demo_app
+  vf_module_id: vLoadBalancer
+  webserver_ip: 162.242.237.182
+  dcae_collector_ip: 192.168.9.1
+  key_name: vfw_key
+  pub_key: INSERT PUBLIC KEY HERE
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/base_vlb.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/base_vlb.yaml
new file mode 100644 (file)
index 0000000..089fcee
--- /dev/null
@@ -0,0 +1,188 @@
+heat_template_version: 2013-05-23
+
+description: Heat template to deploy vLoadBalancer/vDNS demo app for OpenECOMP
+
+parameters:
+  vlb_image_name:
+    type: string
+    label: Image name or ID
+    description: Image to be used for compute instance
+  vlb_flavor_name:
+    type: string
+    label: Flavor
+    description: Type of instance (flavor) to be used
+  public_net_id:
+    type: string
+    label: Public network name or ID
+    description: Public network that enables remote connection to VNF
+  vlb_private_net_id:
+    type: string
+    label: vLoadBalancer private network name or ID
+    description: Private network that connects vLoadBalancer with vDNSs
+  ecomp_private_net_id:
+    type: string
+    label: ECOMP management network name or ID
+    description: Private network that connects ECOMP component and the VNF
+  vlb_private_net_cidr:
+    type: string
+    label: vLoadBalancer private network CIDR
+    description: The CIDR of the vLoadBalancer private network
+  ecomp_private_net_cidr:
+    type: string
+    label: ECOMP private network CIDR
+    description: The CIDR of the protected private network
+  vlb_private_ip_0:
+    type: string
+    label: vLoadBalancer private IP address towards the private network
+    description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs
+  vlb_private_ip_1:
+    type: string
+    label: vLoadBalancer private IP address towards the ECOMP management network
+    description: Private IP address that is assigned to the vLoadBalancer to communicate with ECOMP components
+  vdns_private_ip_0:
+    type: string
+    label: vDNS private IP address towards the private network
+    description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer
+  vdns_private_ip_1:
+    type: string
+    label: vDNS private IP address towards the ECOMP management network
+    description: Private IP address that is assigned to the vDNS to communicate with ECOMP components
+  vlb_name_0:
+    type: string
+    label: vLoadBalancer name
+    description: Name of the vLoadBalancer
+  vdsn_name_0:
+    type: string
+    label: vDNS name
+    description: Name of the vDNS
+  vnf_id:
+    type: string
+    label: VNF ID
+    description: The VNF ID is provided by ECOMP
+  vf_module_id:
+    type: string
+    label: vFirewall module ID
+    description: The vLoadBalancer Module ID is provided by ECOMP
+  webserver_ip:
+    type: string
+    label: Webserver IP address
+    description: IP address of the webserver that hosts the source code and binaries
+  dcae_collector_ip:
+    type: string
+    label: DCAE collector IP address
+    description: IP address of the DCAE collector
+  key_name:
+    type: string
+    label: Key pair name
+    description: Public/Private key pair name
+  pub_key:
+    type: string
+    label: Public key
+    description: Public key to be installed on the compute instance
+
+resources:
+  my_keypair:
+    type: OS::Nova::KeyPair
+    properties:
+      name: { get_param: key_name }
+      public_key: { get_param: pub_key }
+      save_private_key: false
+
+  vlb_private_network:
+    type: OS::Neutron::Net
+    properties:
+      name: { get_param: vlb_private_net_id }
+
+  vlb_private_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: vlb_private_network }
+      cidr: { get_param: vlb_private_net_cidr }
+
+  vlb_0:
+    type: OS::Nova::Server
+    properties:
+      image: { get_param: vlb_image_name }
+      flavor: { get_param: vlb_flavor_name }
+      name: { get_param: vlb_name_0 }
+      key_name: { get_resource: my_keypair }
+      networks:
+        - network: { get_param: public_net_id }
+        - port: { get_resource: vlb_private_0_port }
+        - port: { get_resource: vlb_private_1_port }
+      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
+      user_data_format: RAW
+      user_data:
+        str_replace:
+          params:
+            __webserver__: { get_param: webserver_ip }
+            __dcae_collector_ip__ : { get_param: dcae_collector_ip }
+          template: |
+            #!/bin/bash
+
+            WEBSERVER_IP=__webserver__
+            DCAE_COLLECTOR_IP=__dcae_collector_ip__
+
+            mkdir /opt/config
+            cd /opt
+            wget http://$WEBSERVER_IP/demo_repo/v_lb_init.sh
+            chmod +x v_lb_init.sh
+            echo $WEBSERVER_IP > config/webserver_ip.txt
+            echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt
+            ./v_lb_init.sh
+
+  vlb_private_0_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: vlb_private_network }
+      fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}]
+
+  vlb_private_1_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_param: ecomp_private_net_id }
+      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vlb_private_ip_1 }}]
+
+  vdns_0:
+    type: OS::Nova::Server
+    properties:
+      image: { get_param: vlb_image_name }
+      flavor: { get_param: vlb_flavor_name }
+      name: { get_param: vdsn_name_0 }
+      key_name: { get_resource: my_keypair }
+      networks:
+        - network: { get_param: public_net_id }
+        - port: { get_resource: vdns_private_0_port }
+        - port: { get_resource: vdns_private_1_port }
+      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
+      user_data_format: RAW
+      user_data:
+        str_replace:
+          params:
+            __webserver__: { get_param: webserver_ip }
+            __fw_ipaddr__: { get_param: vlb_private_ip_0 }
+          template: |
+            #!/bin/bash
+
+            WEBSERVER_IP=__webserver__
+            LB_IPADDR=__lb_ipaddr__
+
+            mkdir /opt/config
+            cd /opt
+            wget http://$WEBSERVER_IP/demo_repo/v_dns_init.sh
+            chmod +x v_dns_init.sh
+            echo $WEBSERVER_IP > config/webserver_ip.txt
+            echo $LB_IPADDR > config/lb_ipaddr.txt
+            ./v_dns_init.sh
+
+  vdns_private_0_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: vlb_private_network }
+      fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}]
+
+  vdns_private_1_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_param: ecomp_private_net_id }
+      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vdns_private_ip_1 }}]
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/dnsscaling.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/dnsscaling.env
new file mode 100644 (file)
index 0000000..15895ac
--- /dev/null
@@ -0,0 +1,16 @@
+parameters:
+  vlb_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
+  vlb_flavor_name: 4 GB General Purpose v1
+  public_net_id: 00000000-0000-0000-0000-000000000000
+  vlb_private_net_id: zdfw1lb01_private
+  ecomp_private_net_id: oam_ecomp
+  vlb_private_ip_0: 192.168.10.100
+  vdns_private_ip_0: 192.168.10.200
+  vdns_private_ip_1: 192.168.9.200
+  vdns_name_0: zdfw1lb01dns01
+  vnf_id: vLoadBalancer_demo_app
+  vf_module_id: vLoadBalancer
+  webserver_ip: 162.242.237.182
+  dcae_collector_ip: 192.168.9.1
+  key_name: vfw_key
+  pub_key: INSERT PUBLIC KEY HERE
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/dnsscaling.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/dnsscaling.yaml
new file mode 100644 (file)
index 0000000..6ec4b0b
--- /dev/null
@@ -0,0 +1,117 @@
+heat_template_version: 2013-05-23
+
+description: Heat template to deploy a vDNS for OpenECOMP (scaling-up scenario)
+
+parameters:
+  vlb_image_name:
+    type: string
+    label: Image name or ID
+    description: Image to be used for compute instance
+  vlb_flavor_name:
+    type: string
+    label: Flavor
+    description: Type of instance (flavor) to be used
+  public_net_id:
+    type: string
+    label: Public network name or ID
+    description: Public network that enables remote connection to VNF
+  vlb_private_net_id:
+    type: string
+    label: vLoadBalancer private network name or ID
+    description: Private network that connects vLoadBalancer with vDNSs
+  ecomp_private_net_id:
+    type: string
+    label: ECOMP management network name or ID
+    description: Private network that connects ECOMP component and the VNF
+  vlb_private_ip_0:
+    type: string
+    label: vLoadBalancer private IP address towards the private network
+    description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs
+  vdns_private_ip_0:
+    type: string
+    label: vDNS private IP address towards the private network
+    description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer
+  vdns_private_ip_1:
+    type: string
+    label: vDNS private IP address towards the ECOMP management network
+    description: Private IP address that is assigned to the vDNS to communicate with ECOMP components
+  vdsn_name_0:
+    type: string
+    label: vDNS name
+    description: Name of the vDNS
+  vnf_id:
+    type: string
+    label: VNF ID
+    description: The VNF ID is provided by ECOMP
+  vf_module_id:
+    type: string
+    label: vFirewall module ID
+    description: The vLoadBalancer Module ID is provided by ECOMP
+  webserver_ip:
+    type: string
+    label: Webserver IP address
+    description: IP address of the webserver that hosts the source code and binaries
+  dcae_collector_ip:
+    type: string
+    label: DCAE collector IP address
+    description: IP address of the DCAE collector
+  key_name:
+    type: string
+    label: Key pair name
+    description: Public/Private key pair name
+  pub_key:
+    type: string
+    label: Public key
+    description: Public key to be installed on the compute instance
+
+resources:
+  my_keypair:
+    type: OS::Nova::KeyPair
+    properties:
+      name: { get_param: key_name }
+      public_key: { get_param: pub_key }
+      save_private_key: false
+
+  vdns_0:
+    type: OS::Nova::Server
+    properties:
+      image: { get_param: vlb_image_name }
+      flavor: { get_param: vlb_flavor_name }
+      name: { get_param: vdsn_name_0 }
+      key_name: { get_resource: my_keypair }
+      networks:
+        - network: { get_param: public_net_id }
+        - port: { get_resource: vdns_private_0_port }
+        - port: { get_resource: vdns_private_1_port }
+      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
+      user_data_format: RAW
+      user_data:
+        str_replace:
+          params:
+            __webserver__: { get_param: webserver_ip }
+            __fw_ipaddr__: { get_param: vlb_private_ip_0 }
+          template: |
+            #!/bin/bash
+
+            WEBSERVER_IP=__webserver__
+            LB_IPADDR=__lb_ipaddr__
+
+            mkdir /opt/config
+            cd /opt
+            wget http://$WEBSERVER_IP/demo_repo/v_dns_init.sh
+            chmod +x v_dns_init.sh
+            echo $WEBSERVER_IP > config/webserver_ip.txt
+            echo $LB_IPADDR > config/lb_ipaddr.txt
+            ./v_dns_init.sh
+
+  vdns_private_0_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_param: vlb_private_net_id }
+      fixed_ips: [{"subnet": { get_param: vlb_private_net_id }, "ip_address": { get_param: vdns_private_ip_0 }}]
+
+  vdns_private_1_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_param: ecomp_private_net_id }
+      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vdns_private_ip_1 }}]
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/vnf-module-artifact.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/artifacts/vnf-module-artifact.json
new file mode 100644 (file)
index 0000000..91e6ac8
--- /dev/null
@@ -0,0 +1,24 @@
+[
+  {
+    "vfModuleModelName": "VF_RI1_DNS::module-1",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f132",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI1_DNS::module-1::module-1.group",
+    "isBase": true,
+    "artifacts": [
+      "Artifact-UUID1",
+      "EnvArtifact-UUID1"
+    ]
+  },
+  {
+    "vfModuleModelName": "VF_RI1_DNS::module-2",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f133",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI1_DNS::module-2::module-1.group",
+    "isBase": false,
+    "artifacts": [
+      "Artifact-UUID2",
+      "EnvArtifact-UUID2"
+    ]
+  }
+]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/notif-structure.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-dns-V1/notif-structure.json
new file mode 100644 (file)
index 0000000..63f32cb
--- /dev/null
@@ -0,0 +1,94 @@
+{
+    "serviceName": "dns-service",
+    "serviceInvariantUUID": "585822c8-4027-4f84-ba50-e9248606f111",
+    "serviceUUID": "1e34774e-715e-4fd6-bd09-7b654622f35i",
+    "serviceVersion": "1.0",
+    "serviceArtifacts": 
+    [
+    ],
+
+    "resources": 
+    [
+        {
+            "resourceInstanceName": "DNSResource-1",
+            "resourceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f112",
+            "resourceName": "DNSResource",
+            "resourceType": "VF",
+            "resourceUUID": "585822c7-4027-4f84-ba50-e9248606f131",
+            "resourceVersion": "1.0",
+            "artifacts": 
+            [
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Meta data for VFModule",
+                    "artifactName": "vnf-module-artifact.json",
+                    
+                    "artifactType": "VF_MODULES_METADATA",
+                    "artifactURL": "vnf-module-artifact.json",
+                    "artifactUUID": "VfArtifact-UUID1",
+                    "artifactVersion": "1.0"
+
+                },
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Base VLB Heat",
+                    "artifactName": "base_vlb.yaml",
+                    "artifactTimeout": 300,
+                    "artifactType": "HEAT",
+                    "artifactURL": "base_vlb.yaml",
+                    "artifactUUID": "Artifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID1",
+                    "relatedArtifact": 
+                    [
+                       
+                    ]
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "BASE VLB ENV file",
+                    "artifactName": "base_vlb.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "base_vlb.env",
+                    "artifactUUID": "EnvArtifact-UUID1",
+                    "artifactVersion": "1.0"
+                  
+                },
+               {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "DNS Scaling Heat",
+                    "artifactName": "dnsscaling.yaml",
+                    "artifactTimeout": 300,
+                    "artifactType": "HEAT",
+                    "artifactURL": "dnsscaling.yaml",
+                    "artifactUUID": "Artifact-UUID2",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID2",
+                    "relatedArtifact": 
+                    [
+                       
+                    ]
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "DNS Scaling ENV file",
+                    "artifactName": "dnsscaling.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "dnsscaling.env",
+                    "artifactUUID": "EnvArtifact-UUID2",
+                    "artifactVersion": "1.0"
+                  
+                }
+
+            ]
+        }
+    ],
+
+    "serviceDescription": "dns service for unit test",
+    "distributionID": "35120a87-1f83-4276-9735-f6de5a244d61"
+}
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/base_vfw.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/base_vfw.env
new file mode 100644 (file)
index 0000000..27ccb3b
--- /dev/null
@@ -0,0 +1,26 @@
+parameters:
+  vfw_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
+  vfw_flavor_name: 4 GB General Purpose v1
+  public_net_id: 00000000-0000-0000-0000-000000000000
+  unprotected_private_net_id: zdfw1fwl01_unprotected
+  protected_private_net_id: zdfw1fwl01_protected
+  ecomp_private_net_id: oam_ecomp
+  unprotected_private_net_cidr: 192.168.10.0/24
+  protected_private_net_cidr: 192.168.20.0/24
+  ecomp_private_net_cidr: 192.168.9.0/24
+  vfw_private_ip_0: 192.168.10.100
+  vfw_private_ip_1: 192.168.20.100
+  vfw_private_ip_2: 192.168.9.100
+  vpg_private_ip_0: 192.168.10.200
+  vpg_private_ip_1: 192.168.9.200
+  vsn_private_ip_0: 192.168.20.250
+  vsn_private_ip_1: 192.168.9.250
+  vfw_name_0: zdfw1fwl01fwl01
+  vpg_name_0: zdfw1fwl01pgn01
+  vsn_name_0: zdfw1fwl01snk01
+  vnf_id: vFirewall_demo_app
+  vf_module_id: vFirewall
+  webserver_ip: 162.242.237.182
+  dcae_collector_ip: 192.168.9.1
+  key_name: vfw_key
+  pub_key: PUT YOUR PUBLIC KEY HERE
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/base_vfw.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/base_vfw.yaml
new file mode 100644 (file)
index 0000000..d4e89ad
--- /dev/null
@@ -0,0 +1,298 @@
+heat_template_version: 2013-05-23
+
+description: Heat template to deploy vFirewall demo app for OpenECOMP
+
+parameters:
+  vfw_image_name:
+    type: string
+    label: Image name or ID
+    description: Image to be used for compute instance
+  vfw_flavor_name:
+    type: string
+    label: Flavor
+    description: Type of instance (flavor) to be used
+  public_net_id:
+    type: string
+    label: Public network name or ID
+    description: Public network that enables remote connection to VNF
+  unprotected_private_net_id:
+    type: string
+    label: Unprotected private network name or ID
+    description: Private network that connects vPacketGenerator with vFirewall
+  protected_private_net_id:
+    type: string
+    label: Protected private network name or ID
+    description: Private network that connects vFirewall with vSink
+  ecomp_private_net_id:
+    type: string
+    label: ECOMP management network name or ID
+    description: Private network that connects ECOMP component and the VNF
+  unprotected_private_net_cidr:
+    type: string
+    label: Unprotected private network CIDR
+    description: The CIDR of the unprotected private network
+  protected_private_net_cidr:
+    type: string
+    label: Protected private network CIDR
+    description: The CIDR of the protected private network
+  ecomp_private_net_cidr:
+    type: string
+    label: ECOMP private network CIDR
+    description: The CIDR of the protected private network
+  vfw_private_ip_0:
+    type: string
+    label: vFirewall private IP address towards the unprotected network
+    description: Private IP address that is assigned to the vFirewall to communicate with the vPacketGenerator
+  vfw_private_ip_1:
+    type: string
+    label: vFirewall private IP address towards the protected network
+    description: Private IP address that is assigned to the vFirewall to communicate with the vSink
+  vfw_private_ip_2:
+    type: string
+    label: vFirewall private IP address towards the ECOMP management network
+    description: Private IP address that is assigned to the vFirewall to communicate with ECOMP components
+  vpg_private_ip_0:
+    type: string
+    label: vPacketGenerator private IP address towards the unprotected network
+    description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall
+  vpg_private_ip_1:
+    type: string
+    label: vPacketGenerator private IP address towards the ECOMP management network
+    description: Private IP address that is assigned to the vPacketGenerator to communicate with ECOMP components
+  vsn_private_ip_0:
+    type: string
+    label: vSink private IP address towards the protected network
+    description: Private IP address that is assigned to the vSink to communicate with the vFirewall
+  vsn_private_ip_1:
+    type: string
+    label: vSink private IP address towards the ECOMP management network
+    description: Private IP address that is assigned to the vSink to communicate with ECOMP components
+  vfw_name_0:
+    type: string
+    label: vFirewall name
+    description: Name of the vFirewall
+  vpg_name_0:
+    type: string
+    label: vPacketGenerator name
+    description: Name of the vPacketGenerator
+  vsn_name_0:
+    type: string
+    label: vSink name
+    description: Name of the vSink
+  vnf_id:
+    type: string
+    label: VNF ID
+    description: The VNF ID is provided by ECOMP
+  vf_module_id:
+    type: string
+    label: vFirewall module ID
+    description: The vFirewall Module ID is provided by ECOMP
+  webserver_ip:
+    type: string
+    label: Webserver IP address
+    description: IP address of the webserver that hosts the source code and binaries
+  dcae_collector_ip:
+    type: string
+    label: DCAE collector IP address
+    description: IP address of the DCAE collector
+  key_name:
+    type: string
+    label: Key pair name
+    description: Public/Private key pair name
+  pub_key:
+    type: string
+    label: Public key
+    description: Public key to be installed on the compute instance
+
+resources:
+  my_keypair:
+    type: OS::Nova::KeyPair
+    properties:
+      name: { get_param: key_name }
+      public_key: { get_param: pub_key }
+      save_private_key: false
+
+  unprotected_private_network:
+    type: OS::Neutron::Net
+    properties:
+      name: { get_param: unprotected_private_net_id }
+
+  protected_private_network:
+    type: OS::Neutron::Net
+    properties:
+      name: { get_param: protected_private_net_id }
+
+  unprotected_private_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: unprotected_private_network }
+      cidr: { get_param: unprotected_private_net_cidr }
+
+  protected_private_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: protected_private_network }
+      cidr: { get_param: protected_private_net_cidr }
+
+  vfw_0:
+    type: OS::Nova::Server
+    properties:
+      image: { get_param: vfw_image_name }
+      flavor: { get_param: vfw_flavor_name }
+      name: { get_param: vfw_name_0 }
+      key_name: { get_resource: my_keypair }
+      networks:
+        - network: { get_param: public_net_id }
+        - port: { get_resource: vfw_private_0_port }
+        - port: { get_resource: vfw_private_1_port }
+        - port: { get_resource: vfw_private_2_port }
+      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
+      user_data_format: RAW
+      user_data:
+        str_replace:
+          params:
+            __webserver__: { get_param: webserver_ip }
+            __dcae_collector_ip__ : { get_param: dcae_collector_ip }
+          template: |
+            #!/bin/bash
+
+            WEBSERVER_IP=__webserver__
+            DCAE_COLLECTOR_IP=__dcae_collector_ip__
+
+            mkdir /opt/config
+            cd /opt
+            wget http://$WEBSERVER_IP/demo_repo/v_firewall_init.sh
+            wget http://$WEBSERVER_IP/demo_repo/vfirewall.sh
+            chmod +x v_firewall_init.sh
+            chmod +x vfirewall.sh
+            echo $WEBSERVER_IP > config/webserver_ip.txt
+            echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt
+            echo "no" > config/install.txt
+            mv vfirewall.sh /etc/init.d
+            sudo update-rc.d vfirewall.sh defaults
+            ./v_firewall_init.sh
+
+  vfw_private_0_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: unprotected_private_network }
+      fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}]
+
+  vfw_private_1_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: protected_private_network }
+      fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}]
+
+  vfw_private_2_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_param: ecomp_private_net_id }
+      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vfw_private_ip_2 }}]
+
+  vpg_0:
+    type: OS::Nova::Server
+    properties:
+      image: { get_param: vfw_image_name }
+      flavor: { get_param: vfw_flavor_name }
+      name: { get_param: vpg_name_0 }
+      key_name: { get_resource: my_keypair }
+      networks:
+        - network: { get_param: public_net_id }
+        - port: { get_resource: vpg_private_0_port }
+        - port: { get_resource: vpg_private_1_port }
+      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
+      user_data_format: RAW
+      user_data:
+        str_replace:
+          params:
+            __webserver__: { get_param: webserver_ip }
+            __fw_ipaddr__: { get_param: vfw_private_ip_0 }
+            __protected_net_cidr__: { get_param: protected_private_net_cidr }
+            __sink_ipaddr__: { get_param: vsn_private_ip_0 }
+          template: |
+            #!/bin/bash
+
+            WEBSERVER_IP=__webserver__
+            FW_IPADDR=__fw_ipaddr__
+            PROTECTED_NET_CIDR=__protected_net_cidr__
+            SINK_IPADDR=__sink_ipaddr__
+
+            mkdir /opt/config
+            cd /opt
+            wget http://$WEBSERVER_IP/demo_repo/v_packetgen_init.sh
+            wget http://$WEBSERVER_IP/demo_repo/vpacketgen.sh
+            chmod +x v_packetgen_init.sh
+            chmod +x vpacketgen.sh
+            echo $WEBSERVER_IP > config/webserver_ip.txt
+            echo $FW_IPADDR > config/fw_ipaddr.txt
+            echo $PROTECTED_NET_CIDR > config/protected_net_cidr.txt
+            echo $SINK_IPADDR > config/sink_ipaddr.txt
+            echo "no" > config/install.txt
+            mv vpacketgen.sh /etc/init.d
+            sudo update-rc.d vpacketgen.sh defaults
+            ./v_packetgen_init.sh
+
+  vpg_private_0_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: unprotected_private_network }
+      fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]
+
+  vpg_private_1_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_param: ecomp_private_net_id }
+      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vpg_private_ip_1 }}]
+
+  vsn_0:
+    type: OS::Nova::Server
+    properties:
+      image: { get_param: vfw_image_name }
+      flavor: { get_param: vfw_flavor_name }
+      name: { get_param: vsn_name_0 }
+      key_name: { get_resource: my_keypair }
+      networks:
+        - network: { get_param: public_net_id }
+        - port: { get_resource: vsn_private_0_port }
+        - port: { get_resource: vsn_private_1_port }
+      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
+      user_data_format: RAW
+      user_data:
+        str_replace:
+          params:
+            __webserver__: { get_param: webserver_ip }
+            __protected_net_gw__: { get_param: vfw_private_ip_1 }
+            __unprotected_net__: { get_param: unprotected_private_net_cidr }
+          template: |
+            #!/bin/bash
+
+            WEBSERVER_IP=__webserver__
+            PROTECTED_NET_GW=__protected_net_gw__
+            UNPROTECTED_NET=__unprotected_net__
+            UNPROTECTED_NET=$(echo $UNPROTECTED_NET | cut -d'/' -f1)
+
+            mkdir /opt/config
+            cd /opt
+            wget http://$WEBSERVER_IP/demo_repo/v_sink_init.sh
+            wget http://$WEBSERVER_IP/demo_repo/vsink.sh
+            chmod +x v_sink_init.sh
+            chmod +x vsink.sh
+            echo $PROTECTED_NET_GW > config/protected_net_gw.txt
+            echo $UNPROTECTED_NET > config/unprotected_net.txt
+            echo "no" > config/install.txt
+            mv vsink.sh /etc/init.d
+            sudo update-rc.d vsink.sh defaults
+            ./v_sink_init.sh
+
+  vsn_private_0_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: protected_private_network }
+      fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}]
+
+  vsn_private_1_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_param: ecomp_private_net_id }
+      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vsn_private_ip_1 }}]
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/vnf-module-artifact.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/artifacts/vnf-module-artifact.json
new file mode 100644 (file)
index 0000000..5a732fc
--- /dev/null
@@ -0,0 +1,13 @@
+[
+  {
+    "vfModuleModelName": "VF_RI1_VFW::module-1",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f33f.VF_RI1_VFW::module-1::module-1.group",
+    "isBase": true,
+    "artifacts": [
+      "Artifact-UUID3",
+      "EnvArtifact-UUID3"
+    ]
+  }
+]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/notif-structure.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/demo-vfw-V1/notif-structure.json
new file mode 100644 (file)
index 0000000..63ca36e
--- /dev/null
@@ -0,0 +1,65 @@
+{
+    "serviceName": "vfw-service",
+    "serviceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f112",
+    "serviceUUID": "2e34774e-715e-4fd5-bd09-7b654622f35i",
+    "serviceVersion": "1.0",
+    "serviceArtifacts": 
+    [
+    ],
+
+    "resources": 
+    [
+        {
+            "resourceInstanceName": "VFWResource-1",
+            "resourceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f113",
+            "resourceName": "VFWResource",
+            "resourceType": "VF",
+            "resourceUUID": "685822c7-4027-4f84-ba50-e9248606f132",
+            "resourceVersion": "1.0",
+            "artifacts": 
+            [
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Meta data for VFModule",
+                    "artifactName": "vnf-module-artifact.json",
+                    
+                    "artifactType": "VF_MODULES_METADATA",
+                    "artifactURL": "vnf-module-artifact.json",
+                    "artifactUUID": "VfArtifact-UUID2",
+                    "artifactVersion": "1.0"
+
+                },
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Base VFW Heat",
+                    "artifactName": "base_vfw.yaml",
+                    "artifactTimeout": 300,
+                    "artifactType": "HEAT",
+                    "artifactURL": "base_vfw.yaml",
+                    "artifactUUID": "Artifact-UUID3",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID3",
+                    "relatedArtifact": 
+                    [
+                       
+                    ]
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "base_vfw ENV file",
+                    "artifactName": "base_vfw.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "base_vfw.env",
+                    "artifactUUID": "EnvArtifact-UUID3",
+                    "artifactVersion": "1.0"
+                 }
+            ]
+        }
+    ],
+
+    "serviceDescription": "VFW service",
+    "distributionID": "35120a87-1f82-4276-9735-f6de5a244d62"
+}
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/cloud-nimbus.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/cloud-nimbus.sh
new file mode 100644 (file)
index 0000000..48485f3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash\r
+echo "Running first-boot script"\r
+FLAG="first-boot.sh"\r
+echo "First boot run" > ${FLAG}\r
+echo "$vm_name" >> ${FLAG}\r
+touch /var/lib/cloud/instance/payload/launch-params\r
+chmod 644 /var/lib/cloud/instance/payload/launch-params\r
+#for i in $(ls /sys/class/net); do\r
+#  echo "Restart $i" >> ${FLAG}\r
+#  ifdown ${i}\r
+#  ifup ${i}\r
+#done\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/hot-nimbus-oam_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/hot-nimbus-oam_v1.0.env
new file mode 100644 (file)
index 0000000..7e51e67
--- /dev/null
@@ -0,0 +1,18 @@
+parameters:\r
+  pcrf_oam_server_names: ZRDM1PCRF01OAM001,ZRDM1PCRF01OAM002\r
+  pcrf_oam_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_oam_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.111,172.26.16.112\r
+  pcrf_arbiter_vip: 172.26.16.115\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.117,107.239.64.118\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_oam_volume_id_1: a4aa05fb-fcdc-457b-8077-6845fdfc3257\r
+  pcrf_oam_volume_id_2: 93d8fc1f-f1c3-4933-86b2-039881ee910f\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/hot-nimbus-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/hot-nimbus-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..98c4e3b
--- /dev/null
@@ -0,0 +1,109 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates multiple PCRF OAM nodes stack\r
+\r
+parameters:\r
+  pcrf_oam_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF OAM server names\r
+    description: name of the PCRF OAM instance\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: PCRF OAM image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id_1:\r
+    type: string\r
+    label: CPS OAM 001 Cinder Volume\r
+    description: CPS OAM 001 Cinder Volumes\r
+  pcrf_oam_volume_id_2:\r
+    type: string\r
+    label: CPS OAM 002 Cinder Volume\r
+    description: CPS OAM 002 Cinder Volumes\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_oam_001:\r
+    type: nested-oam_v1.0.yaml\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 0] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_oam_002:\r
+    type: nested-oam_v1.0.yaml\r
+    depends_on: [server_pcrf_oam_001]\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 1] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_2 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/nested-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/artifacts/nested-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..fa3b04e
--- /dev/null
@@ -0,0 +1,156 @@
+heat_template_version: 2013-05-23\r
+\r
+description: nested heat template that creates a PCRF OAM node stack\r
+\r
+parameters:\r
+  pcrf_oam_server_name:\r
+    type: string\r
+    label: PCRF OAM server name\r
+    description: PCRF OAM server name\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id:\r
+    type: string\r
+    label: CPS OAM Cinder Volume\r
+    description: CPS OAM Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_oam_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_oam:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_oam_server_name }\r
+      image: { get_param: pcrf_oam_image_name }\r
+      flavor: { get_param: pcrf_oam_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_oam_port_0}\r
+        - port: { get_resource: pcrf_oam_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+  \r
+  pcrf_oam_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_arbiter_vip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_vol_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_oam_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_oam }\r
+\r
+outputs:\r
+  pcrf_oam_vol_attachment_id:\r
+    description: the pcrf_oam_vol_attachment_id id\r
+    value: { get_resource: pcrf_oam_vol_attachment }\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/notif-structure.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/notif-without-modules-metadata/notif-structure.json
new file mode 100644 (file)
index 0000000..2fb12ed
--- /dev/null
@@ -0,0 +1,68 @@
+{
+    "serviceName": "test-service",
+    "serviceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f132",
+    "serviceUUID": "1e34774e-715e-4fd5-bd09-7b654622f33e",
+    "serviceVersion": "1.0",
+    "serviceArtifacts": 
+    [
+    ],
+
+    "resources": 
+    [
+        {
+            "resourceInstanceName": "wrong-resource-1",
+            "resourceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+            "resourceName": "wrong-resourceName-1",
+            "resourceType": "VF",
+            "resourceUUID": "585822c7-4027-4f84-ba50-e9248606f136",
+            "resourceVersion": "1.0",
+            "artifacts": 
+            [
+               
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactTimeout": 100,
+                    "artifactType": "HEAT",
+                    "artifactURL": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactUUID": "Artifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID2",
+                    "relatedArtifact": 
+                    [
+                        "NestedArtifact-UUID3"
+                    ]
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat ENV OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.env",
+                    "artifactTimeout": 100,
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam_v1.0.env",
+                    "artifactUUID": "EnvArtifact-UUID2",
+                    "artifactVersion": "1.0"
+                  
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nested OAM",
+                    "artifactName": "nested-oam_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_NESTED",
+                    "artifactURL": "nested-oam_v1.0.yaml",
+                    "artifactUUID": "NestedArtifact-UUID3",
+                    "artifactVersion": "1.0"
+          
+                }
+            ]
+        }
+    ],
+
+    "serviceDescription": "test service for unit testing",
+    "distributionID": "35120a87-1f82-4276-9735-f6de5a244d65"
+}
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/cloud-nimbus.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/cloud-nimbus.sh
new file mode 100644 (file)
index 0000000..48485f3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash\r
+echo "Running first-boot script"\r
+FLAG="first-boot.sh"\r
+echo "First boot run" > ${FLAG}\r
+echo "$vm_name" >> ${FLAG}\r
+touch /var/lib/cloud/instance/payload/launch-params\r
+chmod 644 /var/lib/cloud/instance/payload/launch-params\r
+#for i in $(ls /sys/class/net); do\r
+#  echo "Restart $i" >> ${FLAG}\r
+#  ifdown ${i}\r
+#  ifup ${i}\r
+#done\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..b494d8c
--- /dev/null
@@ -0,0 +1,6 @@
+parameters:
+  pcrf_oam_vol_size: 500
+  pcrf_oam_volume_silver-1: Silver
+  pcrf_oam_volume_silver-2: Silver
+  pcrf_oam_vol_name_1: sde1-pcrfx01-oam001-vol-1
+  pcrf_oam_vol_name_2: sde1-pcrfx01-oam001-vol-2
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..9e12054
--- /dev/null
@@ -0,0 +1,45 @@
+heat_template_version:  2013-05-23
+
+parameters:
+    pcrf_oam_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+    pcrf_oam_vol_name_1:
+     type: string
+     label: OAM volume name 1
+     description: Assigning name to volume
+    pcrf_oam_vol_name_2:
+     type: string
+     label: OAM volume name 2
+     description: Assigning name to volume
+    pcrf_oam_volume_silver-1:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM1
+    pcrf_oam_volume_silver-2:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM2
+
+resources:
+  pcrf_oam_volume_1:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-1}
+      name: {get_param: pcrf_oam_vol_name_1}
+
+  pcrf_oam_volume_2:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-2}
+      name: {get_param: pcrf_oam_vol_name_2}
+outputs:
+  pcrf_oam_volume_id_1:
+    description: the oam 001 volume id
+    value: { get_resource: pcrf_oam_volume_1 }
+  pcrf_oam_volume_id_2:
+    description: the oam 002 volume id
+    value: { get_resource: pcrf_oam_volume_2 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam_v1.0.env
new file mode 100644 (file)
index 0000000..7e51e67
--- /dev/null
@@ -0,0 +1,18 @@
+parameters:\r
+  pcrf_oam_server_names: ZRDM1PCRF01OAM001,ZRDM1PCRF01OAM002\r
+  pcrf_oam_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_oam_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.111,172.26.16.112\r
+  pcrf_arbiter_vip: 172.26.16.115\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.117,107.239.64.118\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_oam_volume_id_1: a4aa05fb-fcdc-457b-8077-6845fdfc3257\r
+  pcrf_oam_volume_id_2: 93d8fc1f-f1c3-4933-86b2-039881ee910f\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..98c4e3b
--- /dev/null
@@ -0,0 +1,109 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates multiple PCRF OAM nodes stack\r
+\r
+parameters:\r
+  pcrf_oam_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF OAM server names\r
+    description: name of the PCRF OAM instance\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: PCRF OAM image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id_1:\r
+    type: string\r
+    label: CPS OAM 001 Cinder Volume\r
+    description: CPS OAM 001 Cinder Volumes\r
+  pcrf_oam_volume_id_2:\r
+    type: string\r
+    label: CPS OAM 002 Cinder Volume\r
+    description: CPS OAM 002 Cinder Volumes\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_oam_001:\r
+    type: nested-oam_v1.0.yaml\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 0] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_oam_002:\r
+    type: nested-oam_v1.0.yaml\r
+    depends_on: [server_pcrf_oam_001]\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 1] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_2 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..788365d
--- /dev/null
@@ -0,0 +1,4 @@
+parameters:
+  pcrf_pcm_vol_size: 50
+  pcrf_pcm_volume_silver: Silver
+  pcrf_pcm_vol_name_1: sde1-pcrfx01-pcm001-vol-1
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..bcc3e89
--- /dev/null
@@ -0,0 +1,28 @@
+heat_template_version:  2013-05-23
+
+parameters:
+   pcrf_pcm_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+   pcrf_pcm_vol_name_1:
+     type: string
+     label: PCM volume name
+     description: Assigning name to volume
+   pcrf_pcm_volume_silver:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for PCM
+
+resources: 
+  pcrf_pcm_volume_1:
+     type: OS::Cinder::Volume
+     properties:
+      size: { get_param: pcrf_pcm_vol_size }
+      volume_type: { get_param: pcrf_pcm_volume_silver }
+      name: { get_param: pcrf_pcm_vol_name_1 }
+
+outputs:
+  pcrf_pcm_volume_id_1:
+    description: the pcrf_pcm_volume_id
+    value: { get_resource: pcrf_pcm_volume_1 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm_v1.0.env
new file mode 100644 (file)
index 0000000..b23014d
--- /dev/null
@@ -0,0 +1,16 @@
+parameters:\r
+  pcrf_pcm_server_names: ZRDM1PCRF01PCM001\r
+  pcrf_pcm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pcm_flavor_name: lc.2xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.113\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.121\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_pcm_volume_id_1: 3438a3fe-1241-4390-80f2-d0b86238c40e\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..defb373
--- /dev/null
@@ -0,0 +1,80 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF CM server names\r
+    description: name of the PCRF CM instance\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: PCRF CM image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id_1:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pcm_001:\r
+    type: nested-pcm_v1.0.yaml\r
+    properties:\r
+      pcrf_pcm_server_name: { get_param: [pcrf_pcm_server_names, 0] }\r
+      pcrf_pcm_image_name: { get_param: pcrf_pcm_image_name }\r
+      pcrf_pcm_flavor_name: { get_param: pcrf_pcm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_pcm_volume_id: { get_param: pcrf_pcm_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..8631592
--- /dev/null
@@ -0,0 +1,286 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PD server names\r
+    description: name of the PCRF PD instance\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: PCRF PD image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Gx network ips\r
+    description: Gx network ips\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sp network ips\r
+    description: Sp network ips\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sy network ips\r
+    description: Sy network ips\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Rx network ips\r
+    description: Rx network ips\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sd network ips\r
+    description: Sd network ips\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sgi Sy network ips\r
+    description: Sgi Sy network ips\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_ppd_001:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 0] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 0] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 0] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 0] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 0] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 0] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 0] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_002:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 1] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 1] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 1] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 1] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 1] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 1] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 1] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_003:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 2] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 2] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 2] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 2] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 2] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 2] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 2] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 2] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_004:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 3] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 3] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 3] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 3] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 3] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 3] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 3] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 3] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-ppd_v1.1.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-ppd_v1.1.env
new file mode 100644 (file)
index 0000000..10697bc
--- /dev/null
@@ -0,0 +1,35 @@
+parameters:\r
+  pcrf_ppd_server_names: ZRDM1PCRF01PPD001,ZRDM1PCRF01PPD002,ZRDM1PCRF01PPD003,ZRDM1PCRF01PPD004\r
+  pcrf_ppd_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_ppd_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.3,172.26.16.4,172.26.16.5,172.26.16.6\r
+  pcrf_lb_internal_vip: 172.26.16.114\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.113,107.239.64.114,107.239.64.115,107.239.64.116\r
+  pcrf_lb_management_vip: 107.239.64.123\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_gx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_gx_net_0\r
+  pcrf_gx_net_ips: 107.239.24.67,107.239.24.68,107.239.24.69,107.239.24.70\r
+  pcrf_gx_net_mask: 255.255.255.248\r
+  pcrf_sp_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sp_net_0\r
+  pcrf_sp_net_ips: 107.239.24.75,107.239.24.76,107.239.24.77,107.239.24.78\r
+  pcrf_sp_net_mask: 255.255.255.248\r
+  pcrf_sy_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sy_net_0\r
+  pcrf_sy_net_ips: 107.239.24.83,107.239.24.84,107.239.24.85,107.239.24.86\r
+  pcrf_sy_net_mask: 255.255.255.248\r
+  pcrf_rx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_rx_net_0\r
+  pcrf_rx_net_ips: 107.239.24.91,107.239.24.92,107.239.24.93,107.239.24.94\r
+  pcrf_rx_net_mask: 255.255.255.248\r
+  pcrf_sd_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sd_net_0\r
+  pcrf_sd_net_ips: 107.239.24.99,107.239.24.100,107.239.24.101,107.239.24.102\r
+  pcrf_sd_net_mask: 255.255.255.248\r
+  pcrf_sgi_sy_net_name: Mobisupport-25193-I-INT1_sgi_pcrf_sy_net_0\r
+  pcrf_sgi_sy_net_ips: 107.239.26.131,107.239.26.132,107.239.26.133,107.239.26.134\r
+  pcrf_sgi_sy_net_mask: 255.255.255.248\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pps_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pps_v1.0.env
new file mode 100644 (file)
index 0000000..18c064c
--- /dev/null
@@ -0,0 +1,11 @@
+parameters:\r
+  pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006\r
+  pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pps_flavor_name: lc.3xlarge\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..0fadd00
--- /dev/null
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PS server names\r
+    description: PCRF PS server names\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pps_001:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_002:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_003:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_004:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_005:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_006:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-psm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-psm_v1.0.env
new file mode 100644 (file)
index 0000000..95e450e
--- /dev/null
@@ -0,0 +1,10 @@
+parameters:\r
+  pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012\r
+  pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_psm_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..217b0fe
--- /dev/null
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF SM server names\r
+    description: name of the PCRF SM instance\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: PCRF SM image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_psm_001:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_002:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_003:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_004:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_005:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_006:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_007:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_008:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_009:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_010:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_011:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_012:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-swift-container_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-swift-container_v1.0.env
new file mode 100644 (file)
index 0000000..5267ee4
--- /dev/null
@@ -0,0 +1,3 @@
+parameters:\r
+  pcrf_swift_container_name_1: PCRF_Config_Container_1\r
+  pcrf_swift_container_purge_on_delete_flag_1: false\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-swift-container_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/hot-nimbus-swift-container_v1.0.yaml
new file mode 100644 (file)
index 0000000..ab427bb
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+   pcrf_swift_container_name_1:\r
+     type: string\r
+     label: Swift Container name\r
+     description: Swift Container Name\r
+   pcrf_swift_container_purge_on_delete_flag_1:\r
+     type: boolean\r
+     label: Purge on Delete Flag\r
+     description: Purge on Delete Flag\r
+\r
+resources:\r
+  pcrf_swift_container_1:\r
+    type: OS::Swift::Container\r
+    properties:\r
+      name: { get_param: pcrf_swift_container_name_1 }\r
+      PurgeOnDelete: { get_param: pcrf_swift_container_purge_on_delete_flag_1 }\r
+      X-Container-Read: ".r:*"\r
+     \r
+outputs:\r
+  pcrf_swift_container_id_1:\r
+    description: the pcrf_swift_container_1 id\r
+    value: { get_resource: pcrf_swift_container_1 }\r
+  pcrf_swift_container_url_1:\r
+    description: the pcrf_swift_container_1 url\r
+    value: { get_attr: [ pcrf_swift_container_1, WebsiteURL ] }\r
+    
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/mount_iso_script.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/mount_iso_script.sh
new file mode 100644 (file)
index 0000000..91df598
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash\r
+\r
+#. .config \r
+#following would be in the .config file\r
+ device_name="/dev/vde"\r
+ install_script="install_nimbus.sh"\r
+ enable_logic_flag_file=".flag"\r
+#end of config file\r
+\r
+#get the semaphore, 0 - disbaled, 1- enabled\r
+flag=$(cat ${enable_logic_flag_file})\r
+\r
+#check if device is mounted already\r
+test=$(mount | grep ${device_name})\r
+if [ "$flag" == "1" ]; then\r
+       if [ -e ${device_name} ] && [ ! "${test}" ]; then\r
+               #mount the iso image\r
+               mount -t iso9660 -v -o loop /dev/vde/ /mnt/iso\r
+               #if availabe run the install script (it contains the install.sh steps)\r
+               if [ -e "${install_script}" ] && [ -f "${install_script}" ]; then\r
+                       ${install_script}\r
+               fi\r
+               #disable the script from attempting to \r
+               #  mount and run install again until needed;\r
+               echo "0" > ${enable_logic_flag_file}\r
+               #if nedeed add step to comment out the crontab line here;\r
+       fi\r
+else\r
+       echo "Auto mounting ISO & run install logic disabled!"\r
+fi\r
+\r
+#cron job\r
+# * * * * * /mount_iso_script.sh\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..fa3b04e
--- /dev/null
@@ -0,0 +1,156 @@
+heat_template_version: 2013-05-23\r
+\r
+description: nested heat template that creates a PCRF OAM node stack\r
+\r
+parameters:\r
+  pcrf_oam_server_name:\r
+    type: string\r
+    label: PCRF OAM server name\r
+    description: PCRF OAM server name\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id:\r
+    type: string\r
+    label: CPS OAM Cinder Volume\r
+    description: CPS OAM Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_oam_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_oam:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_oam_server_name }\r
+      image: { get_param: pcrf_oam_image_name }\r
+      flavor: { get_param: pcrf_oam_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_oam_port_0}\r
+        - port: { get_resource: pcrf_oam_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+  \r
+  pcrf_oam_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_arbiter_vip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_vol_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_oam_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_oam }\r
+\r
+outputs:\r
+  pcrf_oam_vol_attachment_id:\r
+    description: the pcrf_oam_vol_attachment_id id\r
+    value: { get_resource: pcrf_oam_vol_attachment }\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..a3129bb
--- /dev/null
@@ -0,0 +1,150 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_name:\r
+    type: string\r
+    label: PCRF CM server name\r
+    description: PCRF CM server name\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pcm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pcm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pcm_server_name }\r
+      image: { get_param: pcrf_pcm_image_name }\r
+      flavor: { get_param: pcrf_pcm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pcm_port_0}\r
+        - port: { get_resource: pcrf_pcm_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pcm_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_pcm_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  volume_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_pcm_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_pcm }\r
+\r
+outputs:\r
+  pcrf_server_pcm_id:\r
+    description: the pcm server id\r
+    value: { get_resource: pcrf_server_pcm }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..169522b
--- /dev/null
@@ -0,0 +1,333 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_name:\r
+    type: string\r
+    label: PCRF PD server name\r
+    description: PCRF PD server name\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ip:\r
+    type: string\r
+    label: Gx network ip\r
+    description: Gx network ip\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ip:\r
+    type: string\r
+    label: Sp network ip\r
+    description: Sp network ip\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ip:\r
+    type: string\r
+    label: Sy network ip\r
+    description: Sy network ip\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ip:\r
+    type: string\r
+    label: Rx network ip\r
+    description: Rx network ip\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ip:\r
+    type: string\r
+    label: Sd network ip\r
+    description: Sd network ip\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ip:\r
+    type: string\r
+    label: Sgi Sy network ip\r
+    description: Sgi Sy network ip\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth2\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth2\r
+                  $ip: { get_param: pcrf_gx_net_ip }\r
+                  $netmask: { get_param: pcrf_gx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth3\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth3\r
+                  $ip: { get_param: pcrf_sp_net_ip }\r
+                  $netmask: { get_param: pcrf_sp_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth4\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth4\r
+                  $ip: { get_param: pcrf_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sy_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth5\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth5\r
+                  $ip: { get_param: pcrf_rx_net_ip }\r
+                  $netmask: { get_param: pcrf_rx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth6\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth6\r
+                  $ip: { get_param: pcrf_sd_net_ip }\r
+                  $netmask: { get_param: pcrf_sd_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth7\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth7\r
+                  $ip: { get_param: pcrf_sgi_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sgi_sy_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+          - ifdown eth2 && ifup eth2\r
+          - ifdown eth3 && ifup eth3\r
+          - ifdown eth4 && ifup eth4\r
+          - ifdown eth5 && ifup eth5\r
+          - ifdown eth6 && ifup eth6\r
+          - ifdown eth7 && ifup eth7\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_ppd_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_ppd: \r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_ppd_server_name }\r
+      image: { get_param: pcrf_ppd_image_name }\r
+      flavor: { get_param: pcrf_ppd_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_ppd_port_0}\r
+        - port: { get_resource: pcrf_ppd_port_1}\r
+        - port: { get_resource: pcrf_ppd_port_2}\r
+        - port: { get_resource: pcrf_ppd_port_3}\r
+        - port: { get_resource: pcrf_ppd_port_4}\r
+        - port: { get_resource: pcrf_ppd_port_5}\r
+        - port: { get_resource: pcrf_ppd_port_6}\r
+        - port: { get_resource: pcrf_ppd_port_7}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_ppd_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_internal_vip }\r
+\r
+  pcrf_ppd_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_management_vip } \r
\r
+  pcrf_ppd_port_2:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_gx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_gx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_3:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sp_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sp_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_4:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_5:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_rx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_rx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+  \r
+  pcrf_ppd_port_6:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sd_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sd_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_7:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sgi_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sgi_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..8cb6e15
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_name:\r
+    type: string\r
+    label: PCRF PS server name\r
+    description: PCRF PS server name\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pps_server_name }\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pps:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pps_server_name }\r
+      image: { get_param: pcrf_pps_image_name }\r
+      flavor: { get_param: pcrf_pps_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pps_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pps_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/nested-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..64c7484
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_name:\r
+    type: string\r
+    label: PCRF SM server name\r
+    description: PCRF SM server name\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_psm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_psm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_psm_server_name }\r
+      image: { get_param: pcrf_psm_image_name }\r
+      flavor: { get_param: pcrf_psm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: psm01_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+      #scheduler_hints: {group: { get_resource: servergroup_nimbus }}\r
+  \r
+  psm01_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/vnf-module-artifact.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/artifacts/vnf-module-artifact.json
new file mode 100644 (file)
index 0000000..f196467
--- /dev/null
@@ -0,0 +1,14 @@
+[
+  {
+    "vfModuleModelName": "VF_RI2_G6_withArtifacts::module-0",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f131",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI2_G6_withArtifacts::module-0.group",
+    "isBase": true,
+    "artifacts": [
+      "Artifact-UUID1",
+      "EnvArtifact-UUID2",
+      "NestedArtifact-UUID3"
+    ]
+  }
+]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/notif-structure.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V1/notif-structure.json
new file mode 100644 (file)
index 0000000..1f5e081
--- /dev/null
@@ -0,0 +1,75 @@
+{
+    "serviceName": "test-service",
+    "serviceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f132",
+    "serviceUUID": "1e34774e-715e-4fd5-bd09-7b654622f33e",
+    "serviceVersion": "1.0",
+    "serviceArtifacts": 
+    [
+    ],
+
+    "resources": 
+    [
+        {
+            "resourceInstanceName": "resource-1",
+            "resourceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+            "resourceName": "resourceName-1",
+            "resourceType": "VF",
+            "resourceUUID": "585822c7-4027-4f84-ba50-e9248606f136",
+            "resourceVersion": "1.0",
+            "artifacts": 
+            [
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Meta data for VFModule",
+                    "artifactName": "vnf-module-artifact.json",
+                    
+                    "artifactType": "VF_MODULES_METADATA",
+                    "artifactURL": "vnf-module-artifact.json",
+                    "artifactUUID": "VfArtifact-UUID1",
+                    "artifactVersion": "1.0"
+
+                },
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactTimeout": 100,
+                    "artifactType": "HEAT",
+                    "artifactURL": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactUUID": "Artifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID2"
+                    
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat ENV OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam_v1.0.env",
+                    "artifactUUID": "EnvArtifact-UUID2",
+                    "artifactVersion": "1.0"
+                  
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nested OAM",
+                    "artifactName": "nested-oam_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_NESTED",
+                    "artifactURL": "nested-oam_v1.0.yaml",
+                    "artifactUUID": "NestedArtifact-UUID3",
+                    "artifactVersion": "1.0"
+          
+                }
+            ]
+        }
+    ],
+
+    "serviceDescription": "vfw service for unit test",
+    "distributionID": "35120a87-1f82-4276-9735-f6de5a244d65"
+}
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/cloud-nimbus.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/cloud-nimbus.sh
new file mode 100644 (file)
index 0000000..48485f3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash\r
+echo "Running first-boot script"\r
+FLAG="first-boot.sh"\r
+echo "First boot run" > ${FLAG}\r
+echo "$vm_name" >> ${FLAG}\r
+touch /var/lib/cloud/instance/payload/launch-params\r
+chmod 644 /var/lib/cloud/instance/payload/launch-params\r
+#for i in $(ls /sys/class/net); do\r
+#  echo "Restart $i" >> ${FLAG}\r
+#  ifdown ${i}\r
+#  ifup ${i}\r
+#done\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..b494d8c
--- /dev/null
@@ -0,0 +1,6 @@
+parameters:
+  pcrf_oam_vol_size: 500
+  pcrf_oam_volume_silver-1: Silver
+  pcrf_oam_volume_silver-2: Silver
+  pcrf_oam_vol_name_1: sde1-pcrfx01-oam001-vol-1
+  pcrf_oam_vol_name_2: sde1-pcrfx01-oam001-vol-2
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..9e12054
--- /dev/null
@@ -0,0 +1,45 @@
+heat_template_version:  2013-05-23
+
+parameters:
+    pcrf_oam_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+    pcrf_oam_vol_name_1:
+     type: string
+     label: OAM volume name 1
+     description: Assigning name to volume
+    pcrf_oam_vol_name_2:
+     type: string
+     label: OAM volume name 2
+     description: Assigning name to volume
+    pcrf_oam_volume_silver-1:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM1
+    pcrf_oam_volume_silver-2:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM2
+
+resources:
+  pcrf_oam_volume_1:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-1}
+      name: {get_param: pcrf_oam_vol_name_1}
+
+  pcrf_oam_volume_2:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-2}
+      name: {get_param: pcrf_oam_vol_name_2}
+outputs:
+  pcrf_oam_volume_id_1:
+    description: the oam 001 volume id
+    value: { get_resource: pcrf_oam_volume_1 }
+  pcrf_oam_volume_id_2:
+    description: the oam 002 volume id
+    value: { get_resource: pcrf_oam_volume_2 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam_v1.0.env
new file mode 100644 (file)
index 0000000..7e51e67
--- /dev/null
@@ -0,0 +1,18 @@
+parameters:\r
+  pcrf_oam_server_names: ZRDM1PCRF01OAM001,ZRDM1PCRF01OAM002\r
+  pcrf_oam_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_oam_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.111,172.26.16.112\r
+  pcrf_arbiter_vip: 172.26.16.115\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.117,107.239.64.118\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_oam_volume_id_1: a4aa05fb-fcdc-457b-8077-6845fdfc3257\r
+  pcrf_oam_volume_id_2: 93d8fc1f-f1c3-4933-86b2-039881ee910f\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..98c4e3b
--- /dev/null
@@ -0,0 +1,109 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates multiple PCRF OAM nodes stack\r
+\r
+parameters:\r
+  pcrf_oam_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF OAM server names\r
+    description: name of the PCRF OAM instance\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: PCRF OAM image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id_1:\r
+    type: string\r
+    label: CPS OAM 001 Cinder Volume\r
+    description: CPS OAM 001 Cinder Volumes\r
+  pcrf_oam_volume_id_2:\r
+    type: string\r
+    label: CPS OAM 002 Cinder Volume\r
+    description: CPS OAM 002 Cinder Volumes\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_oam_001:\r
+    type: nested-oam_v1.0.yaml\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 0] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_oam_002:\r
+    type: nested-oam_v1.0.yaml\r
+    depends_on: [server_pcrf_oam_001]\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 1] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_2 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..788365d
--- /dev/null
@@ -0,0 +1,4 @@
+parameters:
+  pcrf_pcm_vol_size: 50
+  pcrf_pcm_volume_silver: Silver
+  pcrf_pcm_vol_name_1: sde1-pcrfx01-pcm001-vol-1
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..bcc3e89
--- /dev/null
@@ -0,0 +1,28 @@
+heat_template_version:  2013-05-23
+
+parameters:
+   pcrf_pcm_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+   pcrf_pcm_vol_name_1:
+     type: string
+     label: PCM volume name
+     description: Assigning name to volume
+   pcrf_pcm_volume_silver:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for PCM
+
+resources: 
+  pcrf_pcm_volume_1:
+     type: OS::Cinder::Volume
+     properties:
+      size: { get_param: pcrf_pcm_vol_size }
+      volume_type: { get_param: pcrf_pcm_volume_silver }
+      name: { get_param: pcrf_pcm_vol_name_1 }
+
+outputs:
+  pcrf_pcm_volume_id_1:
+    description: the pcrf_pcm_volume_id
+    value: { get_resource: pcrf_pcm_volume_1 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm_v1.0.env
new file mode 100644 (file)
index 0000000..b23014d
--- /dev/null
@@ -0,0 +1,16 @@
+parameters:\r
+  pcrf_pcm_server_names: ZRDM1PCRF01PCM001\r
+  pcrf_pcm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pcm_flavor_name: lc.2xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.113\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.121\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_pcm_volume_id_1: 3438a3fe-1241-4390-80f2-d0b86238c40e\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..defb373
--- /dev/null
@@ -0,0 +1,80 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF CM server names\r
+    description: name of the PCRF CM instance\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: PCRF CM image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id_1:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pcm_001:\r
+    type: nested-pcm_v1.0.yaml\r
+    properties:\r
+      pcrf_pcm_server_name: { get_param: [pcrf_pcm_server_names, 0] }\r
+      pcrf_pcm_image_name: { get_param: pcrf_pcm_image_name }\r
+      pcrf_pcm_flavor_name: { get_param: pcrf_pcm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_pcm_volume_id: { get_param: pcrf_pcm_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..8631592
--- /dev/null
@@ -0,0 +1,286 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PD server names\r
+    description: name of the PCRF PD instance\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: PCRF PD image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Gx network ips\r
+    description: Gx network ips\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sp network ips\r
+    description: Sp network ips\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sy network ips\r
+    description: Sy network ips\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Rx network ips\r
+    description: Rx network ips\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sd network ips\r
+    description: Sd network ips\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sgi Sy network ips\r
+    description: Sgi Sy network ips\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_ppd_001:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 0] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 0] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 0] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 0] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 0] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 0] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 0] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_002:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 1] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 1] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 1] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 1] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 1] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 1] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 1] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_003:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 2] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 2] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 2] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 2] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 2] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 2] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 2] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 2] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_004:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 3] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 3] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 3] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 3] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 3] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 3] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 3] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 3] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-ppd_v1.1.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-ppd_v1.1.env
new file mode 100644 (file)
index 0000000..10697bc
--- /dev/null
@@ -0,0 +1,35 @@
+parameters:\r
+  pcrf_ppd_server_names: ZRDM1PCRF01PPD001,ZRDM1PCRF01PPD002,ZRDM1PCRF01PPD003,ZRDM1PCRF01PPD004\r
+  pcrf_ppd_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_ppd_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.3,172.26.16.4,172.26.16.5,172.26.16.6\r
+  pcrf_lb_internal_vip: 172.26.16.114\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.113,107.239.64.114,107.239.64.115,107.239.64.116\r
+  pcrf_lb_management_vip: 107.239.64.123\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_gx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_gx_net_0\r
+  pcrf_gx_net_ips: 107.239.24.67,107.239.24.68,107.239.24.69,107.239.24.70\r
+  pcrf_gx_net_mask: 255.255.255.248\r
+  pcrf_sp_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sp_net_0\r
+  pcrf_sp_net_ips: 107.239.24.75,107.239.24.76,107.239.24.77,107.239.24.78\r
+  pcrf_sp_net_mask: 255.255.255.248\r
+  pcrf_sy_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sy_net_0\r
+  pcrf_sy_net_ips: 107.239.24.83,107.239.24.84,107.239.24.85,107.239.24.86\r
+  pcrf_sy_net_mask: 255.255.255.248\r
+  pcrf_rx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_rx_net_0\r
+  pcrf_rx_net_ips: 107.239.24.91,107.239.24.92,107.239.24.93,107.239.24.94\r
+  pcrf_rx_net_mask: 255.255.255.248\r
+  pcrf_sd_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sd_net_0\r
+  pcrf_sd_net_ips: 107.239.24.99,107.239.24.100,107.239.24.101,107.239.24.102\r
+  pcrf_sd_net_mask: 255.255.255.248\r
+  pcrf_sgi_sy_net_name: Mobisupport-25193-I-INT1_sgi_pcrf_sy_net_0\r
+  pcrf_sgi_sy_net_ips: 107.239.26.131,107.239.26.132,107.239.26.133,107.239.26.134\r
+  pcrf_sgi_sy_net_mask: 255.255.255.248\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pps_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pps_v1.0.env
new file mode 100644 (file)
index 0000000..18c064c
--- /dev/null
@@ -0,0 +1,11 @@
+parameters:\r
+  pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006\r
+  pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pps_flavor_name: lc.3xlarge\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..0fadd00
--- /dev/null
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PS server names\r
+    description: PCRF PS server names\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pps_001:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_002:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_003:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_004:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_005:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_006:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-psm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-psm_v1.0.env
new file mode 100644 (file)
index 0000000..95e450e
--- /dev/null
@@ -0,0 +1,10 @@
+parameters:\r
+  pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012\r
+  pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_psm_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..217b0fe
--- /dev/null
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF SM server names\r
+    description: name of the PCRF SM instance\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: PCRF SM image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_psm_001:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_002:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_003:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_004:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_005:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_006:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_007:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_008:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_009:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_010:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_011:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_012:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-swift-container_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-swift-container_v1.0.env
new file mode 100644 (file)
index 0000000..5267ee4
--- /dev/null
@@ -0,0 +1,3 @@
+parameters:\r
+  pcrf_swift_container_name_1: PCRF_Config_Container_1\r
+  pcrf_swift_container_purge_on_delete_flag_1: false\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-swift-container_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/hot-nimbus-swift-container_v1.0.yaml
new file mode 100644 (file)
index 0000000..ab427bb
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+   pcrf_swift_container_name_1:\r
+     type: string\r
+     label: Swift Container name\r
+     description: Swift Container Name\r
+   pcrf_swift_container_purge_on_delete_flag_1:\r
+     type: boolean\r
+     label: Purge on Delete Flag\r
+     description: Purge on Delete Flag\r
+\r
+resources:\r
+  pcrf_swift_container_1:\r
+    type: OS::Swift::Container\r
+    properties:\r
+      name: { get_param: pcrf_swift_container_name_1 }\r
+      PurgeOnDelete: { get_param: pcrf_swift_container_purge_on_delete_flag_1 }\r
+      X-Container-Read: ".r:*"\r
+     \r
+outputs:\r
+  pcrf_swift_container_id_1:\r
+    description: the pcrf_swift_container_1 id\r
+    value: { get_resource: pcrf_swift_container_1 }\r
+  pcrf_swift_container_url_1:\r
+    description: the pcrf_swift_container_1 url\r
+    value: { get_attr: [ pcrf_swift_container_1, WebsiteURL ] }\r
+    
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/mount_iso_script.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/mount_iso_script.sh
new file mode 100644 (file)
index 0000000..91df598
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash\r
+\r
+#. .config \r
+#following would be in the .config file\r
+ device_name="/dev/vde"\r
+ install_script="install_nimbus.sh"\r
+ enable_logic_flag_file=".flag"\r
+#end of config file\r
+\r
+#get the semaphore, 0 - disbaled, 1- enabled\r
+flag=$(cat ${enable_logic_flag_file})\r
+\r
+#check if device is mounted already\r
+test=$(mount | grep ${device_name})\r
+if [ "$flag" == "1" ]; then\r
+       if [ -e ${device_name} ] && [ ! "${test}" ]; then\r
+               #mount the iso image\r
+               mount -t iso9660 -v -o loop /dev/vde/ /mnt/iso\r
+               #if availabe run the install script (it contains the install.sh steps)\r
+               if [ -e "${install_script}" ] && [ -f "${install_script}" ]; then\r
+                       ${install_script}\r
+               fi\r
+               #disable the script from attempting to \r
+               #  mount and run install again until needed;\r
+               echo "0" > ${enable_logic_flag_file}\r
+               #if nedeed add step to comment out the crontab line here;\r
+       fi\r
+else\r
+       echo "Auto mounting ISO & run install logic disabled!"\r
+fi\r
+\r
+#cron job\r
+# * * * * * /mount_iso_script.sh\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..fa3b04e
--- /dev/null
@@ -0,0 +1,156 @@
+heat_template_version: 2013-05-23\r
+\r
+description: nested heat template that creates a PCRF OAM node stack\r
+\r
+parameters:\r
+  pcrf_oam_server_name:\r
+    type: string\r
+    label: PCRF OAM server name\r
+    description: PCRF OAM server name\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id:\r
+    type: string\r
+    label: CPS OAM Cinder Volume\r
+    description: CPS OAM Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_oam_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_oam:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_oam_server_name }\r
+      image: { get_param: pcrf_oam_image_name }\r
+      flavor: { get_param: pcrf_oam_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_oam_port_0}\r
+        - port: { get_resource: pcrf_oam_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+  \r
+  pcrf_oam_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_arbiter_vip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_vol_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_oam_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_oam }\r
+\r
+outputs:\r
+  pcrf_oam_vol_attachment_id:\r
+    description: the pcrf_oam_vol_attachment_id id\r
+    value: { get_resource: pcrf_oam_vol_attachment }\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..a3129bb
--- /dev/null
@@ -0,0 +1,150 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_name:\r
+    type: string\r
+    label: PCRF CM server name\r
+    description: PCRF CM server name\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pcm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pcm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pcm_server_name }\r
+      image: { get_param: pcrf_pcm_image_name }\r
+      flavor: { get_param: pcrf_pcm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pcm_port_0}\r
+        - port: { get_resource: pcrf_pcm_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pcm_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_pcm_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  volume_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_pcm_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_pcm }\r
+\r
+outputs:\r
+  pcrf_server_pcm_id:\r
+    description: the pcm server id\r
+    value: { get_resource: pcrf_server_pcm }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..169522b
--- /dev/null
@@ -0,0 +1,333 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_name:\r
+    type: string\r
+    label: PCRF PD server name\r
+    description: PCRF PD server name\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ip:\r
+    type: string\r
+    label: Gx network ip\r
+    description: Gx network ip\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ip:\r
+    type: string\r
+    label: Sp network ip\r
+    description: Sp network ip\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ip:\r
+    type: string\r
+    label: Sy network ip\r
+    description: Sy network ip\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ip:\r
+    type: string\r
+    label: Rx network ip\r
+    description: Rx network ip\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ip:\r
+    type: string\r
+    label: Sd network ip\r
+    description: Sd network ip\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ip:\r
+    type: string\r
+    label: Sgi Sy network ip\r
+    description: Sgi Sy network ip\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth2\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth2\r
+                  $ip: { get_param: pcrf_gx_net_ip }\r
+                  $netmask: { get_param: pcrf_gx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth3\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth3\r
+                  $ip: { get_param: pcrf_sp_net_ip }\r
+                  $netmask: { get_param: pcrf_sp_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth4\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth4\r
+                  $ip: { get_param: pcrf_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sy_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth5\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth5\r
+                  $ip: { get_param: pcrf_rx_net_ip }\r
+                  $netmask: { get_param: pcrf_rx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth6\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth6\r
+                  $ip: { get_param: pcrf_sd_net_ip }\r
+                  $netmask: { get_param: pcrf_sd_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth7\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth7\r
+                  $ip: { get_param: pcrf_sgi_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sgi_sy_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+          - ifdown eth2 && ifup eth2\r
+          - ifdown eth3 && ifup eth3\r
+          - ifdown eth4 && ifup eth4\r
+          - ifdown eth5 && ifup eth5\r
+          - ifdown eth6 && ifup eth6\r
+          - ifdown eth7 && ifup eth7\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_ppd_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_ppd: \r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_ppd_server_name }\r
+      image: { get_param: pcrf_ppd_image_name }\r
+      flavor: { get_param: pcrf_ppd_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_ppd_port_0}\r
+        - port: { get_resource: pcrf_ppd_port_1}\r
+        - port: { get_resource: pcrf_ppd_port_2}\r
+        - port: { get_resource: pcrf_ppd_port_3}\r
+        - port: { get_resource: pcrf_ppd_port_4}\r
+        - port: { get_resource: pcrf_ppd_port_5}\r
+        - port: { get_resource: pcrf_ppd_port_6}\r
+        - port: { get_resource: pcrf_ppd_port_7}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_ppd_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_internal_vip }\r
+\r
+  pcrf_ppd_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_management_vip } \r
\r
+  pcrf_ppd_port_2:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_gx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_gx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_3:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sp_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sp_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_4:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_5:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_rx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_rx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+  \r
+  pcrf_ppd_port_6:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sd_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sd_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_7:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sgi_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sgi_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..8cb6e15
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_name:\r
+    type: string\r
+    label: PCRF PS server name\r
+    description: PCRF PS server name\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pps_server_name }\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pps:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pps_server_name }\r
+      image: { get_param: pcrf_pps_image_name }\r
+      flavor: { get_param: pcrf_pps_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pps_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pps_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/nested-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..64c7484
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_name:\r
+    type: string\r
+    label: PCRF SM server name\r
+    description: PCRF SM server name\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_psm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_psm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_psm_server_name }\r
+      image: { get_param: pcrf_psm_image_name }\r
+      flavor: { get_param: pcrf_psm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: psm01_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+      #scheduler_hints: {group: { get_resource: servergroup_nimbus }}\r
+  \r
+  psm01_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/vnf-module-artifact.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/artifacts/vnf-module-artifact.json
new file mode 100644 (file)
index 0000000..f196467
--- /dev/null
@@ -0,0 +1,14 @@
+[
+  {
+    "vfModuleModelName": "VF_RI2_G6_withArtifacts::module-0",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f131",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI2_G6_withArtifacts::module-0.group",
+    "isBase": true,
+    "artifacts": [
+      "Artifact-UUID1",
+      "EnvArtifact-UUID2",
+      "NestedArtifact-UUID3"
+    ]
+  }
+]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/notif-structure.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V2/notif-structure.json
new file mode 100644 (file)
index 0000000..0b2b312
--- /dev/null
@@ -0,0 +1,78 @@
+{
+    "serviceName": "test-service",
+    "serviceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f132",
+    "serviceUUID": "1e34774e-715e-4fd5-bd09-7b654622f33f",
+    "serviceVersion": "2.0",
+    "serviceArtifacts": 
+    [
+    ],
+
+    "resources": 
+    [
+        {
+            "resourceInstanceName": "resource-1",
+            "resourceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+            "resourceName": "resourceName-1",
+            "resourceType": "VF",
+            "resourceUUID": "585822c7-4027-4f84-ba50-e9248606f136",
+            "resourceVersion": "1.0",
+            "artifacts": 
+            [
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Meta data for VFModule",
+                    "artifactName": "vnf-module-artifact.json",
+                    
+                    "artifactType": "VF_MODULES_METADATA",
+                    "artifactURL": "vnf-module-artifact.json",
+                    "artifactUUID": "VfArtifact-UUID1",
+                    "artifactVersion": "1.0"
+
+                },
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactTimeout": 100,
+                    "artifactType": "HEAT",
+                    "artifactURL": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactUUID": "Artifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID2",
+                    "relatedArtifact": 
+                    [
+                        "NestedArtifact-UUID3"
+                    ]
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat ENV OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam_v1.0.env",
+                    "artifactUUID": "EnvArtifact-UUID2",
+                    "artifactVersion": "1.0"
+                  
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nested OAM",
+                    "artifactName": "nested-oam_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_NESTED",
+                    "artifactURL": "nested-oam_v1.0.yaml",
+                    "artifactUUID": "NestedArtifact-UUID3",
+                    "artifactVersion": "1.0"
+          
+                }
+            ]
+        }
+    ],
+
+    "serviceDescription": "test service for unit testing",
+    "distributionID": "35120a87-1f82-4276-9735-f6de5a244d65"
+}
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/cloud-nimbus.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/cloud-nimbus.sh
new file mode 100644 (file)
index 0000000..48485f3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash\r
+echo "Running first-boot script"\r
+FLAG="first-boot.sh"\r
+echo "First boot run" > ${FLAG}\r
+echo "$vm_name" >> ${FLAG}\r
+touch /var/lib/cloud/instance/payload/launch-params\r
+chmod 644 /var/lib/cloud/instance/payload/launch-params\r
+#for i in $(ls /sys/class/net); do\r
+#  echo "Restart $i" >> ${FLAG}\r
+#  ifdown ${i}\r
+#  ifup ${i}\r
+#done\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..b494d8c
--- /dev/null
@@ -0,0 +1,6 @@
+parameters:
+  pcrf_oam_vol_size: 500
+  pcrf_oam_volume_silver-1: Silver
+  pcrf_oam_volume_silver-2: Silver
+  pcrf_oam_vol_name_1: sde1-pcrfx01-oam001-vol-1
+  pcrf_oam_vol_name_2: sde1-pcrfx01-oam001-vol-2
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..9e12054
--- /dev/null
@@ -0,0 +1,45 @@
+heat_template_version:  2013-05-23
+
+parameters:
+    pcrf_oam_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+    pcrf_oam_vol_name_1:
+     type: string
+     label: OAM volume name 1
+     description: Assigning name to volume
+    pcrf_oam_vol_name_2:
+     type: string
+     label: OAM volume name 2
+     description: Assigning name to volume
+    pcrf_oam_volume_silver-1:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM1
+    pcrf_oam_volume_silver-2:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM2
+
+resources:
+  pcrf_oam_volume_1:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-1}
+      name: {get_param: pcrf_oam_vol_name_1}
+
+  pcrf_oam_volume_2:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-2}
+      name: {get_param: pcrf_oam_vol_name_2}
+outputs:
+  pcrf_oam_volume_id_1:
+    description: the oam 001 volume id
+    value: { get_resource: pcrf_oam_volume_1 }
+  pcrf_oam_volume_id_2:
+    description: the oam 002 volume id
+    value: { get_resource: pcrf_oam_volume_2 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam_v1.0.env
new file mode 100644 (file)
index 0000000..7e51e67
--- /dev/null
@@ -0,0 +1,18 @@
+parameters:\r
+  pcrf_oam_server_names: ZRDM1PCRF01OAM001,ZRDM1PCRF01OAM002\r
+  pcrf_oam_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_oam_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.111,172.26.16.112\r
+  pcrf_arbiter_vip: 172.26.16.115\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.117,107.239.64.118\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_oam_volume_id_1: a4aa05fb-fcdc-457b-8077-6845fdfc3257\r
+  pcrf_oam_volume_id_2: 93d8fc1f-f1c3-4933-86b2-039881ee910f\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..98c4e3b
--- /dev/null
@@ -0,0 +1,109 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates multiple PCRF OAM nodes stack\r
+\r
+parameters:\r
+  pcrf_oam_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF OAM server names\r
+    description: name of the PCRF OAM instance\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: PCRF OAM image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id_1:\r
+    type: string\r
+    label: CPS OAM 001 Cinder Volume\r
+    description: CPS OAM 001 Cinder Volumes\r
+  pcrf_oam_volume_id_2:\r
+    type: string\r
+    label: CPS OAM 002 Cinder Volume\r
+    description: CPS OAM 002 Cinder Volumes\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_oam_001:\r
+    type: nested-oam_v1.0.yaml\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 0] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_oam_002:\r
+    type: nested-oam_v1.0.yaml\r
+    depends_on: [server_pcrf_oam_001]\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 1] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_2 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..788365d
--- /dev/null
@@ -0,0 +1,4 @@
+parameters:
+  pcrf_pcm_vol_size: 50
+  pcrf_pcm_volume_silver: Silver
+  pcrf_pcm_vol_name_1: sde1-pcrfx01-pcm001-vol-1
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..bcc3e89
--- /dev/null
@@ -0,0 +1,28 @@
+heat_template_version:  2013-05-23
+
+parameters:
+   pcrf_pcm_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+   pcrf_pcm_vol_name_1:
+     type: string
+     label: PCM volume name
+     description: Assigning name to volume
+   pcrf_pcm_volume_silver:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for PCM
+
+resources: 
+  pcrf_pcm_volume_1:
+     type: OS::Cinder::Volume
+     properties:
+      size: { get_param: pcrf_pcm_vol_size }
+      volume_type: { get_param: pcrf_pcm_volume_silver }
+      name: { get_param: pcrf_pcm_vol_name_1 }
+
+outputs:
+  pcrf_pcm_volume_id_1:
+    description: the pcrf_pcm_volume_id
+    value: { get_resource: pcrf_pcm_volume_1 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm_v1.0.env
new file mode 100644 (file)
index 0000000..b23014d
--- /dev/null
@@ -0,0 +1,16 @@
+parameters:\r
+  pcrf_pcm_server_names: ZRDM1PCRF01PCM001\r
+  pcrf_pcm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pcm_flavor_name: lc.2xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.113\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.121\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_pcm_volume_id_1: 3438a3fe-1241-4390-80f2-d0b86238c40e\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..defb373
--- /dev/null
@@ -0,0 +1,80 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF CM server names\r
+    description: name of the PCRF CM instance\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: PCRF CM image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id_1:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pcm_001:\r
+    type: nested-pcm_v1.0.yaml\r
+    properties:\r
+      pcrf_pcm_server_name: { get_param: [pcrf_pcm_server_names, 0] }\r
+      pcrf_pcm_image_name: { get_param: pcrf_pcm_image_name }\r
+      pcrf_pcm_flavor_name: { get_param: pcrf_pcm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_pcm_volume_id: { get_param: pcrf_pcm_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..8631592
--- /dev/null
@@ -0,0 +1,286 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PD server names\r
+    description: name of the PCRF PD instance\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: PCRF PD image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Gx network ips\r
+    description: Gx network ips\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sp network ips\r
+    description: Sp network ips\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sy network ips\r
+    description: Sy network ips\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Rx network ips\r
+    description: Rx network ips\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sd network ips\r
+    description: Sd network ips\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sgi Sy network ips\r
+    description: Sgi Sy network ips\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_ppd_001:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 0] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 0] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 0] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 0] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 0] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 0] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 0] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_002:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 1] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 1] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 1] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 1] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 1] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 1] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 1] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_003:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 2] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 2] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 2] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 2] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 2] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 2] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 2] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 2] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_004:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 3] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 3] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 3] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 3] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 3] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 3] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 3] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 3] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-ppd_v1.1.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-ppd_v1.1.env
new file mode 100644 (file)
index 0000000..10697bc
--- /dev/null
@@ -0,0 +1,35 @@
+parameters:\r
+  pcrf_ppd_server_names: ZRDM1PCRF01PPD001,ZRDM1PCRF01PPD002,ZRDM1PCRF01PPD003,ZRDM1PCRF01PPD004\r
+  pcrf_ppd_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_ppd_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.3,172.26.16.4,172.26.16.5,172.26.16.6\r
+  pcrf_lb_internal_vip: 172.26.16.114\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.113,107.239.64.114,107.239.64.115,107.239.64.116\r
+  pcrf_lb_management_vip: 107.239.64.123\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_gx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_gx_net_0\r
+  pcrf_gx_net_ips: 107.239.24.67,107.239.24.68,107.239.24.69,107.239.24.70\r
+  pcrf_gx_net_mask: 255.255.255.248\r
+  pcrf_sp_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sp_net_0\r
+  pcrf_sp_net_ips: 107.239.24.75,107.239.24.76,107.239.24.77,107.239.24.78\r
+  pcrf_sp_net_mask: 255.255.255.248\r
+  pcrf_sy_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sy_net_0\r
+  pcrf_sy_net_ips: 107.239.24.83,107.239.24.84,107.239.24.85,107.239.24.86\r
+  pcrf_sy_net_mask: 255.255.255.248\r
+  pcrf_rx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_rx_net_0\r
+  pcrf_rx_net_ips: 107.239.24.91,107.239.24.92,107.239.24.93,107.239.24.94\r
+  pcrf_rx_net_mask: 255.255.255.248\r
+  pcrf_sd_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sd_net_0\r
+  pcrf_sd_net_ips: 107.239.24.99,107.239.24.100,107.239.24.101,107.239.24.102\r
+  pcrf_sd_net_mask: 255.255.255.248\r
+  pcrf_sgi_sy_net_name: Mobisupport-25193-I-INT1_sgi_pcrf_sy_net_0\r
+  pcrf_sgi_sy_net_ips: 107.239.26.131,107.239.26.132,107.239.26.133,107.239.26.134\r
+  pcrf_sgi_sy_net_mask: 255.255.255.248\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pps_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pps_v1.0.env
new file mode 100644 (file)
index 0000000..18c064c
--- /dev/null
@@ -0,0 +1,11 @@
+parameters:\r
+  pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006\r
+  pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pps_flavor_name: lc.3xlarge\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..0fadd00
--- /dev/null
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PS server names\r
+    description: PCRF PS server names\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pps_001:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_002:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_003:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_004:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_005:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_006:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-psm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-psm_v1.0.env
new file mode 100644 (file)
index 0000000..95e450e
--- /dev/null
@@ -0,0 +1,10 @@
+parameters:\r
+  pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012\r
+  pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_psm_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..217b0fe
--- /dev/null
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF SM server names\r
+    description: name of the PCRF SM instance\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: PCRF SM image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_psm_001:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_002:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_003:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_004:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_005:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_006:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_007:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_008:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_009:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_010:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_011:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_012:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-swift-container_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-swift-container_v1.0.env
new file mode 100644 (file)
index 0000000..5267ee4
--- /dev/null
@@ -0,0 +1,3 @@
+parameters:\r
+  pcrf_swift_container_name_1: PCRF_Config_Container_1\r
+  pcrf_swift_container_purge_on_delete_flag_1: false\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-swift-container_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/hot-nimbus-swift-container_v1.0.yaml
new file mode 100644 (file)
index 0000000..ab427bb
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+   pcrf_swift_container_name_1:\r
+     type: string\r
+     label: Swift Container name\r
+     description: Swift Container Name\r
+   pcrf_swift_container_purge_on_delete_flag_1:\r
+     type: boolean\r
+     label: Purge on Delete Flag\r
+     description: Purge on Delete Flag\r
+\r
+resources:\r
+  pcrf_swift_container_1:\r
+    type: OS::Swift::Container\r
+    properties:\r
+      name: { get_param: pcrf_swift_container_name_1 }\r
+      PurgeOnDelete: { get_param: pcrf_swift_container_purge_on_delete_flag_1 }\r
+      X-Container-Read: ".r:*"\r
+     \r
+outputs:\r
+  pcrf_swift_container_id_1:\r
+    description: the pcrf_swift_container_1 id\r
+    value: { get_resource: pcrf_swift_container_1 }\r
+  pcrf_swift_container_url_1:\r
+    description: the pcrf_swift_container_1 url\r
+    value: { get_attr: [ pcrf_swift_container_1, WebsiteURL ] }\r
+    
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/mount_iso_script.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/mount_iso_script.sh
new file mode 100644 (file)
index 0000000..91df598
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash\r
+\r
+#. .config \r
+#following would be in the .config file\r
+ device_name="/dev/vde"\r
+ install_script="install_nimbus.sh"\r
+ enable_logic_flag_file=".flag"\r
+#end of config file\r
+\r
+#get the semaphore, 0 - disbaled, 1- enabled\r
+flag=$(cat ${enable_logic_flag_file})\r
+\r
+#check if device is mounted already\r
+test=$(mount | grep ${device_name})\r
+if [ "$flag" == "1" ]; then\r
+       if [ -e ${device_name} ] && [ ! "${test}" ]; then\r
+               #mount the iso image\r
+               mount -t iso9660 -v -o loop /dev/vde/ /mnt/iso\r
+               #if availabe run the install script (it contains the install.sh steps)\r
+               if [ -e "${install_script}" ] && [ -f "${install_script}" ]; then\r
+                       ${install_script}\r
+               fi\r
+               #disable the script from attempting to \r
+               #  mount and run install again until needed;\r
+               echo "0" > ${enable_logic_flag_file}\r
+               #if nedeed add step to comment out the crontab line here;\r
+       fi\r
+else\r
+       echo "Auto mounting ISO & run install logic disabled!"\r
+fi\r
+\r
+#cron job\r
+# * * * * * /mount_iso_script.sh\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..fa3b04e
--- /dev/null
@@ -0,0 +1,156 @@
+heat_template_version: 2013-05-23\r
+\r
+description: nested heat template that creates a PCRF OAM node stack\r
+\r
+parameters:\r
+  pcrf_oam_server_name:\r
+    type: string\r
+    label: PCRF OAM server name\r
+    description: PCRF OAM server name\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id:\r
+    type: string\r
+    label: CPS OAM Cinder Volume\r
+    description: CPS OAM Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_oam_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_oam:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_oam_server_name }\r
+      image: { get_param: pcrf_oam_image_name }\r
+      flavor: { get_param: pcrf_oam_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_oam_port_0}\r
+        - port: { get_resource: pcrf_oam_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+  \r
+  pcrf_oam_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_arbiter_vip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_vol_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_oam_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_oam }\r
+\r
+outputs:\r
+  pcrf_oam_vol_attachment_id:\r
+    description: the pcrf_oam_vol_attachment_id id\r
+    value: { get_resource: pcrf_oam_vol_attachment }\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..a3129bb
--- /dev/null
@@ -0,0 +1,150 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_name:\r
+    type: string\r
+    label: PCRF CM server name\r
+    description: PCRF CM server name\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pcm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pcm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pcm_server_name }\r
+      image: { get_param: pcrf_pcm_image_name }\r
+      flavor: { get_param: pcrf_pcm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pcm_port_0}\r
+        - port: { get_resource: pcrf_pcm_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pcm_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_pcm_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  volume_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_pcm_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_pcm }\r
+\r
+outputs:\r
+  pcrf_server_pcm_id:\r
+    description: the pcm server id\r
+    value: { get_resource: pcrf_server_pcm }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..169522b
--- /dev/null
@@ -0,0 +1,333 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_name:\r
+    type: string\r
+    label: PCRF PD server name\r
+    description: PCRF PD server name\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ip:\r
+    type: string\r
+    label: Gx network ip\r
+    description: Gx network ip\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ip:\r
+    type: string\r
+    label: Sp network ip\r
+    description: Sp network ip\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ip:\r
+    type: string\r
+    label: Sy network ip\r
+    description: Sy network ip\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ip:\r
+    type: string\r
+    label: Rx network ip\r
+    description: Rx network ip\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ip:\r
+    type: string\r
+    label: Sd network ip\r
+    description: Sd network ip\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ip:\r
+    type: string\r
+    label: Sgi Sy network ip\r
+    description: Sgi Sy network ip\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth2\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth2\r
+                  $ip: { get_param: pcrf_gx_net_ip }\r
+                  $netmask: { get_param: pcrf_gx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth3\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth3\r
+                  $ip: { get_param: pcrf_sp_net_ip }\r
+                  $netmask: { get_param: pcrf_sp_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth4\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth4\r
+                  $ip: { get_param: pcrf_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sy_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth5\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth5\r
+                  $ip: { get_param: pcrf_rx_net_ip }\r
+                  $netmask: { get_param: pcrf_rx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth6\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth6\r
+                  $ip: { get_param: pcrf_sd_net_ip }\r
+                  $netmask: { get_param: pcrf_sd_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth7\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth7\r
+                  $ip: { get_param: pcrf_sgi_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sgi_sy_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+          - ifdown eth2 && ifup eth2\r
+          - ifdown eth3 && ifup eth3\r
+          - ifdown eth4 && ifup eth4\r
+          - ifdown eth5 && ifup eth5\r
+          - ifdown eth6 && ifup eth6\r
+          - ifdown eth7 && ifup eth7\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_ppd_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_ppd: \r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_ppd_server_name }\r
+      image: { get_param: pcrf_ppd_image_name }\r
+      flavor: { get_param: pcrf_ppd_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_ppd_port_0}\r
+        - port: { get_resource: pcrf_ppd_port_1}\r
+        - port: { get_resource: pcrf_ppd_port_2}\r
+        - port: { get_resource: pcrf_ppd_port_3}\r
+        - port: { get_resource: pcrf_ppd_port_4}\r
+        - port: { get_resource: pcrf_ppd_port_5}\r
+        - port: { get_resource: pcrf_ppd_port_6}\r
+        - port: { get_resource: pcrf_ppd_port_7}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_ppd_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_internal_vip }\r
+\r
+  pcrf_ppd_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_management_vip } \r
\r
+  pcrf_ppd_port_2:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_gx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_gx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_3:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sp_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sp_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_4:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_5:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_rx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_rx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+  \r
+  pcrf_ppd_port_6:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sd_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sd_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_7:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sgi_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sgi_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..8cb6e15
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_name:\r
+    type: string\r
+    label: PCRF PS server name\r
+    description: PCRF PS server name\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pps_server_name }\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pps:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pps_server_name }\r
+      image: { get_param: pcrf_pps_image_name }\r
+      flavor: { get_param: pcrf_pps_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pps_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pps_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/nested-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..64c7484
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_name:\r
+    type: string\r
+    label: PCRF SM server name\r
+    description: PCRF SM server name\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_psm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_psm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_psm_server_name }\r
+      image: { get_param: pcrf_psm_image_name }\r
+      flavor: { get_param: pcrf_psm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: psm01_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+      #scheduler_hints: {group: { get_resource: servergroup_nimbus }}\r
+  \r
+  psm01_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/vnf-module-artifact.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/artifacts/vnf-module-artifact.json
new file mode 100644 (file)
index 0000000..7f1051d
--- /dev/null
@@ -0,0 +1,17 @@
+[
+  {
+    "vfModuleModelName": "VF_RI2_G6_withArtifacts::module-1",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f132",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI2_G6_withArtifacts::module-1.group",
+    "isBase": true,
+    "artifacts": [
+      "Artifact-UUID1",
+      "EnvArtifact-UUID2",
+      "NestedArtifact-UUID3",
+      "ScriptArtifact-UUID1",
+      "VolumeArtifact-UUID1",
+      "VolumeEnvArtifact-UUID1"
+    ]
+  }
+]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/notif-structure.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V3/notif-structure.json
new file mode 100644 (file)
index 0000000..fc017ac
--- /dev/null
@@ -0,0 +1,116 @@
+{
+    "serviceName": "test-service",
+    "serviceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f133",
+    "serviceUUID": "1e34774e-715e-4fd5-bd09-7b654622f34g",
+    "serviceVersion": "3.0",
+    "serviceArtifacts": 
+    [
+    ],
+
+    "resources": 
+    [
+        {
+            "resourceInstanceName": "resource-1",
+            "resourceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+            "resourceName": "resourceName-1",
+            "resourceType": "VF",
+            "resourceUUID": "585822c7-4027-4f84-ba50-e9248606f136",
+            "resourceVersion": "2.0",
+            "artifacts": 
+            [
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Meta data for VFModule",
+                    "artifactName": "vnf-module-artifact.json",
+                    
+                    "artifactType": "VF_MODULES_METADATA",
+                    "artifactURL": "vnf-module-artifact.json",
+                    "artifactUUID": "VfArtifact-UUID2",
+                    "artifactVersion": "1.0"
+
+                },
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactTimeout": 100,
+                    "artifactType": "HEAT",
+                    "artifactURL": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactUUID": "Artifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID2",
+                    "relatedArtifact": 
+                    [
+                        "NestedArtifact-UUID3",
+                        "ScriptArtifact-UUID1"
+                    ]
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat ENV OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam_v1.0.env",
+                    "artifactUUID": "EnvArtifact-UUID2",
+                    "artifactVersion": "1.0"
+                  
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nested OAM",
+                    "artifactName": "nested-oam_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_NESTED",
+                    "artifactURL": "nested-oam_v1.0.yaml",
+                    "artifactUUID": "NestedArtifact-UUID3",
+                    "artifactVersion": "1.0"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Script for OAM",
+                    "artifactName": "mount_iso_script.sh",
+                    
+                    "artifactType": "HEAT_ARTIFACT",
+                    "artifactURL": "mount_iso_script.sh",
+                    "artifactUUID": "ScriptArtifact-UUID1",
+                    "artifactVersion": "1.0"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Heat Vol for OAM",
+                    "artifactName": "hot-nimbus-oam-volumes_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_VOL",
+                    "artifactURL": "hot-nimbus-oam-volumes_v1.0.yaml",
+                    "artifactUUID": "VolumeArtifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "VolumeEnvArtifact-UUID1"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Heat Env Vol for OAM",
+                    "artifactName": "hot-nimbus-oam-volumes_v1.0.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam-volumes_v1.0.env",
+                    "artifactUUID": "VolumeEnvArtifact-UUID1",
+                    "artifactVersion": "1.0"
+          
+                }
+            ]
+        }
+    ],
+
+    "serviceDescription": "test service for unit testing",
+    "distributionID": "35120a87-1f82-4276-9735-f6de5a244d65"
+}
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/cloud-nimbus.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/cloud-nimbus.sh
new file mode 100644 (file)
index 0000000..48485f3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash\r
+echo "Running first-boot script"\r
+FLAG="first-boot.sh"\r
+echo "First boot run" > ${FLAG}\r
+echo "$vm_name" >> ${FLAG}\r
+touch /var/lib/cloud/instance/payload/launch-params\r
+chmod 644 /var/lib/cloud/instance/payload/launch-params\r
+#for i in $(ls /sys/class/net); do\r
+#  echo "Restart $i" >> ${FLAG}\r
+#  ifdown ${i}\r
+#  ifup ${i}\r
+#done\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..b494d8c
--- /dev/null
@@ -0,0 +1,6 @@
+parameters:
+  pcrf_oam_vol_size: 500
+  pcrf_oam_volume_silver-1: Silver
+  pcrf_oam_volume_silver-2: Silver
+  pcrf_oam_vol_name_1: sde1-pcrfx01-oam001-vol-1
+  pcrf_oam_vol_name_2: sde1-pcrfx01-oam001-vol-2
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..9e12054
--- /dev/null
@@ -0,0 +1,45 @@
+heat_template_version:  2013-05-23
+
+parameters:
+    pcrf_oam_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+    pcrf_oam_vol_name_1:
+     type: string
+     label: OAM volume name 1
+     description: Assigning name to volume
+    pcrf_oam_vol_name_2:
+     type: string
+     label: OAM volume name 2
+     description: Assigning name to volume
+    pcrf_oam_volume_silver-1:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM1
+    pcrf_oam_volume_silver-2:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM2
+
+resources:
+  pcrf_oam_volume_1:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-1}
+      name: {get_param: pcrf_oam_vol_name_1}
+
+  pcrf_oam_volume_2:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-2}
+      name: {get_param: pcrf_oam_vol_name_2}
+outputs:
+  pcrf_oam_volume_id_1:
+    description: the oam 001 volume id
+    value: { get_resource: pcrf_oam_volume_1 }
+  pcrf_oam_volume_id_2:
+    description: the oam 002 volume id
+    value: { get_resource: pcrf_oam_volume_2 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam_v1.0.env
new file mode 100644 (file)
index 0000000..7e51e67
--- /dev/null
@@ -0,0 +1,18 @@
+parameters:\r
+  pcrf_oam_server_names: ZRDM1PCRF01OAM001,ZRDM1PCRF01OAM002\r
+  pcrf_oam_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_oam_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.111,172.26.16.112\r
+  pcrf_arbiter_vip: 172.26.16.115\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.117,107.239.64.118\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_oam_volume_id_1: a4aa05fb-fcdc-457b-8077-6845fdfc3257\r
+  pcrf_oam_volume_id_2: 93d8fc1f-f1c3-4933-86b2-039881ee910f\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..98c4e3b
--- /dev/null
@@ -0,0 +1,109 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates multiple PCRF OAM nodes stack\r
+\r
+parameters:\r
+  pcrf_oam_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF OAM server names\r
+    description: name of the PCRF OAM instance\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: PCRF OAM image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id_1:\r
+    type: string\r
+    label: CPS OAM 001 Cinder Volume\r
+    description: CPS OAM 001 Cinder Volumes\r
+  pcrf_oam_volume_id_2:\r
+    type: string\r
+    label: CPS OAM 002 Cinder Volume\r
+    description: CPS OAM 002 Cinder Volumes\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_oam_001:\r
+    type: nested-oam_v1.0.yaml\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 0] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_oam_002:\r
+    type: nested-oam_v1.0.yaml\r
+    depends_on: [server_pcrf_oam_001]\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 1] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_2 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..788365d
--- /dev/null
@@ -0,0 +1,4 @@
+parameters:
+  pcrf_pcm_vol_size: 50
+  pcrf_pcm_volume_silver: Silver
+  pcrf_pcm_vol_name_1: sde1-pcrfx01-pcm001-vol-1
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..bcc3e89
--- /dev/null
@@ -0,0 +1,28 @@
+heat_template_version:  2013-05-23
+
+parameters:
+   pcrf_pcm_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+   pcrf_pcm_vol_name_1:
+     type: string
+     label: PCM volume name
+     description: Assigning name to volume
+   pcrf_pcm_volume_silver:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for PCM
+
+resources: 
+  pcrf_pcm_volume_1:
+     type: OS::Cinder::Volume
+     properties:
+      size: { get_param: pcrf_pcm_vol_size }
+      volume_type: { get_param: pcrf_pcm_volume_silver }
+      name: { get_param: pcrf_pcm_vol_name_1 }
+
+outputs:
+  pcrf_pcm_volume_id_1:
+    description: the pcrf_pcm_volume_id
+    value: { get_resource: pcrf_pcm_volume_1 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm_v1.0.env
new file mode 100644 (file)
index 0000000..b23014d
--- /dev/null
@@ -0,0 +1,16 @@
+parameters:\r
+  pcrf_pcm_server_names: ZRDM1PCRF01PCM001\r
+  pcrf_pcm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pcm_flavor_name: lc.2xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.113\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.121\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_pcm_volume_id_1: 3438a3fe-1241-4390-80f2-d0b86238c40e\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..defb373
--- /dev/null
@@ -0,0 +1,80 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF CM server names\r
+    description: name of the PCRF CM instance\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: PCRF CM image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id_1:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pcm_001:\r
+    type: nested-pcm_v1.0.yaml\r
+    properties:\r
+      pcrf_pcm_server_name: { get_param: [pcrf_pcm_server_names, 0] }\r
+      pcrf_pcm_image_name: { get_param: pcrf_pcm_image_name }\r
+      pcrf_pcm_flavor_name: { get_param: pcrf_pcm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_pcm_volume_id: { get_param: pcrf_pcm_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..8631592
--- /dev/null
@@ -0,0 +1,286 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PD server names\r
+    description: name of the PCRF PD instance\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: PCRF PD image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Gx network ips\r
+    description: Gx network ips\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sp network ips\r
+    description: Sp network ips\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sy network ips\r
+    description: Sy network ips\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Rx network ips\r
+    description: Rx network ips\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sd network ips\r
+    description: Sd network ips\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sgi Sy network ips\r
+    description: Sgi Sy network ips\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_ppd_001:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 0] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 0] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 0] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 0] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 0] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 0] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 0] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_002:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 1] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 1] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 1] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 1] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 1] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 1] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 1] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_003:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 2] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 2] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 2] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 2] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 2] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 2] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 2] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 2] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_004:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 3] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 3] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 3] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 3] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 3] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 3] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 3] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 3] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-ppd_v1.1.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-ppd_v1.1.env
new file mode 100644 (file)
index 0000000..10697bc
--- /dev/null
@@ -0,0 +1,35 @@
+parameters:\r
+  pcrf_ppd_server_names: ZRDM1PCRF01PPD001,ZRDM1PCRF01PPD002,ZRDM1PCRF01PPD003,ZRDM1PCRF01PPD004\r
+  pcrf_ppd_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_ppd_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.3,172.26.16.4,172.26.16.5,172.26.16.6\r
+  pcrf_lb_internal_vip: 172.26.16.114\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.113,107.239.64.114,107.239.64.115,107.239.64.116\r
+  pcrf_lb_management_vip: 107.239.64.123\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_gx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_gx_net_0\r
+  pcrf_gx_net_ips: 107.239.24.67,107.239.24.68,107.239.24.69,107.239.24.70\r
+  pcrf_gx_net_mask: 255.255.255.248\r
+  pcrf_sp_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sp_net_0\r
+  pcrf_sp_net_ips: 107.239.24.75,107.239.24.76,107.239.24.77,107.239.24.78\r
+  pcrf_sp_net_mask: 255.255.255.248\r
+  pcrf_sy_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sy_net_0\r
+  pcrf_sy_net_ips: 107.239.24.83,107.239.24.84,107.239.24.85,107.239.24.86\r
+  pcrf_sy_net_mask: 255.255.255.248\r
+  pcrf_rx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_rx_net_0\r
+  pcrf_rx_net_ips: 107.239.24.91,107.239.24.92,107.239.24.93,107.239.24.94\r
+  pcrf_rx_net_mask: 255.255.255.248\r
+  pcrf_sd_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sd_net_0\r
+  pcrf_sd_net_ips: 107.239.24.99,107.239.24.100,107.239.24.101,107.239.24.102\r
+  pcrf_sd_net_mask: 255.255.255.248\r
+  pcrf_sgi_sy_net_name: Mobisupport-25193-I-INT1_sgi_pcrf_sy_net_0\r
+  pcrf_sgi_sy_net_ips: 107.239.26.131,107.239.26.132,107.239.26.133,107.239.26.134\r
+  pcrf_sgi_sy_net_mask: 255.255.255.248\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pps_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pps_v1.0.env
new file mode 100644 (file)
index 0000000..18c064c
--- /dev/null
@@ -0,0 +1,11 @@
+parameters:\r
+  pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006\r
+  pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pps_flavor_name: lc.3xlarge\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..0fadd00
--- /dev/null
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PS server names\r
+    description: PCRF PS server names\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pps_001:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_002:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_003:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_004:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_005:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_006:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-psm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-psm_v1.0.env
new file mode 100644 (file)
index 0000000..95e450e
--- /dev/null
@@ -0,0 +1,10 @@
+parameters:\r
+  pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012\r
+  pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_psm_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..217b0fe
--- /dev/null
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF SM server names\r
+    description: name of the PCRF SM instance\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: PCRF SM image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_psm_001:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_002:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_003:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_004:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_005:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_006:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_007:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_008:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_009:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_010:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_011:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_012:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-swift-container_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-swift-container_v1.0.env
new file mode 100644 (file)
index 0000000..5267ee4
--- /dev/null
@@ -0,0 +1,3 @@
+parameters:\r
+  pcrf_swift_container_name_1: PCRF_Config_Container_1\r
+  pcrf_swift_container_purge_on_delete_flag_1: false\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-swift-container_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/hot-nimbus-swift-container_v1.0.yaml
new file mode 100644 (file)
index 0000000..ab427bb
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+   pcrf_swift_container_name_1:\r
+     type: string\r
+     label: Swift Container name\r
+     description: Swift Container Name\r
+   pcrf_swift_container_purge_on_delete_flag_1:\r
+     type: boolean\r
+     label: Purge on Delete Flag\r
+     description: Purge on Delete Flag\r
+\r
+resources:\r
+  pcrf_swift_container_1:\r
+    type: OS::Swift::Container\r
+    properties:\r
+      name: { get_param: pcrf_swift_container_name_1 }\r
+      PurgeOnDelete: { get_param: pcrf_swift_container_purge_on_delete_flag_1 }\r
+      X-Container-Read: ".r:*"\r
+     \r
+outputs:\r
+  pcrf_swift_container_id_1:\r
+    description: the pcrf_swift_container_1 id\r
+    value: { get_resource: pcrf_swift_container_1 }\r
+  pcrf_swift_container_url_1:\r
+    description: the pcrf_swift_container_1 url\r
+    value: { get_attr: [ pcrf_swift_container_1, WebsiteURL ] }\r
+    
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/mount_iso_script.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/mount_iso_script.sh
new file mode 100644 (file)
index 0000000..91df598
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash\r
+\r
+#. .config \r
+#following would be in the .config file\r
+ device_name="/dev/vde"\r
+ install_script="install_nimbus.sh"\r
+ enable_logic_flag_file=".flag"\r
+#end of config file\r
+\r
+#get the semaphore, 0 - disbaled, 1- enabled\r
+flag=$(cat ${enable_logic_flag_file})\r
+\r
+#check if device is mounted already\r
+test=$(mount | grep ${device_name})\r
+if [ "$flag" == "1" ]; then\r
+       if [ -e ${device_name} ] && [ ! "${test}" ]; then\r
+               #mount the iso image\r
+               mount -t iso9660 -v -o loop /dev/vde/ /mnt/iso\r
+               #if availabe run the install script (it contains the install.sh steps)\r
+               if [ -e "${install_script}" ] && [ -f "${install_script}" ]; then\r
+                       ${install_script}\r
+               fi\r
+               #disable the script from attempting to \r
+               #  mount and run install again until needed;\r
+               echo "0" > ${enable_logic_flag_file}\r
+               #if nedeed add step to comment out the crontab line here;\r
+       fi\r
+else\r
+       echo "Auto mounting ISO & run install logic disabled!"\r
+fi\r
+\r
+#cron job\r
+# * * * * * /mount_iso_script.sh\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..fa3b04e
--- /dev/null
@@ -0,0 +1,156 @@
+heat_template_version: 2013-05-23\r
+\r
+description: nested heat template that creates a PCRF OAM node stack\r
+\r
+parameters:\r
+  pcrf_oam_server_name:\r
+    type: string\r
+    label: PCRF OAM server name\r
+    description: PCRF OAM server name\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id:\r
+    type: string\r
+    label: CPS OAM Cinder Volume\r
+    description: CPS OAM Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_oam_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_oam:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_oam_server_name }\r
+      image: { get_param: pcrf_oam_image_name }\r
+      flavor: { get_param: pcrf_oam_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_oam_port_0}\r
+        - port: { get_resource: pcrf_oam_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+  \r
+  pcrf_oam_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_arbiter_vip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_vol_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_oam_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_oam }\r
+\r
+outputs:\r
+  pcrf_oam_vol_attachment_id:\r
+    description: the pcrf_oam_vol_attachment_id id\r
+    value: { get_resource: pcrf_oam_vol_attachment }\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..a3129bb
--- /dev/null
@@ -0,0 +1,150 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_name:\r
+    type: string\r
+    label: PCRF CM server name\r
+    description: PCRF CM server name\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pcm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pcm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pcm_server_name }\r
+      image: { get_param: pcrf_pcm_image_name }\r
+      flavor: { get_param: pcrf_pcm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pcm_port_0}\r
+        - port: { get_resource: pcrf_pcm_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pcm_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_pcm_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  volume_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_pcm_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_pcm }\r
+\r
+outputs:\r
+  pcrf_server_pcm_id:\r
+    description: the pcm server id\r
+    value: { get_resource: pcrf_server_pcm }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..169522b
--- /dev/null
@@ -0,0 +1,333 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_name:\r
+    type: string\r
+    label: PCRF PD server name\r
+    description: PCRF PD server name\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ip:\r
+    type: string\r
+    label: Gx network ip\r
+    description: Gx network ip\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ip:\r
+    type: string\r
+    label: Sp network ip\r
+    description: Sp network ip\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ip:\r
+    type: string\r
+    label: Sy network ip\r
+    description: Sy network ip\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ip:\r
+    type: string\r
+    label: Rx network ip\r
+    description: Rx network ip\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ip:\r
+    type: string\r
+    label: Sd network ip\r
+    description: Sd network ip\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ip:\r
+    type: string\r
+    label: Sgi Sy network ip\r
+    description: Sgi Sy network ip\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth2\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth2\r
+                  $ip: { get_param: pcrf_gx_net_ip }\r
+                  $netmask: { get_param: pcrf_gx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth3\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth3\r
+                  $ip: { get_param: pcrf_sp_net_ip }\r
+                  $netmask: { get_param: pcrf_sp_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth4\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth4\r
+                  $ip: { get_param: pcrf_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sy_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth5\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth5\r
+                  $ip: { get_param: pcrf_rx_net_ip }\r
+                  $netmask: { get_param: pcrf_rx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth6\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth6\r
+                  $ip: { get_param: pcrf_sd_net_ip }\r
+                  $netmask: { get_param: pcrf_sd_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth7\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth7\r
+                  $ip: { get_param: pcrf_sgi_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sgi_sy_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+          - ifdown eth2 && ifup eth2\r
+          - ifdown eth3 && ifup eth3\r
+          - ifdown eth4 && ifup eth4\r
+          - ifdown eth5 && ifup eth5\r
+          - ifdown eth6 && ifup eth6\r
+          - ifdown eth7 && ifup eth7\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_ppd_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_ppd: \r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_ppd_server_name }\r
+      image: { get_param: pcrf_ppd_image_name }\r
+      flavor: { get_param: pcrf_ppd_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_ppd_port_0}\r
+        - port: { get_resource: pcrf_ppd_port_1}\r
+        - port: { get_resource: pcrf_ppd_port_2}\r
+        - port: { get_resource: pcrf_ppd_port_3}\r
+        - port: { get_resource: pcrf_ppd_port_4}\r
+        - port: { get_resource: pcrf_ppd_port_5}\r
+        - port: { get_resource: pcrf_ppd_port_6}\r
+        - port: { get_resource: pcrf_ppd_port_7}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_ppd_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_internal_vip }\r
+\r
+  pcrf_ppd_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_management_vip } \r
\r
+  pcrf_ppd_port_2:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_gx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_gx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_3:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sp_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sp_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_4:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_5:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_rx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_rx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+  \r
+  pcrf_ppd_port_6:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sd_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sd_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_7:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sgi_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sgi_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..8cb6e15
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_name:\r
+    type: string\r
+    label: PCRF PS server name\r
+    description: PCRF PS server name\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pps_server_name }\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pps:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pps_server_name }\r
+      image: { get_param: pcrf_pps_image_name }\r
+      flavor: { get_param: pcrf_pps_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pps_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pps_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/nested-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..64c7484
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_name:\r
+    type: string\r
+    label: PCRF SM server name\r
+    description: PCRF SM server name\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_psm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_psm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_psm_server_name }\r
+      image: { get_param: pcrf_psm_image_name }\r
+      flavor: { get_param: pcrf_psm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: psm01_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+      #scheduler_hints: {group: { get_resource: servergroup_nimbus }}\r
+  \r
+  psm01_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/vnf-module-artifact.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/artifacts/vnf-module-artifact.json
new file mode 100644 (file)
index 0000000..7f1051d
--- /dev/null
@@ -0,0 +1,17 @@
+[
+  {
+    "vfModuleModelName": "VF_RI2_G6_withArtifacts::module-1",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f132",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI2_G6_withArtifacts::module-1.group",
+    "isBase": true,
+    "artifacts": [
+      "Artifact-UUID1",
+      "EnvArtifact-UUID2",
+      "NestedArtifact-UUID3",
+      "ScriptArtifact-UUID1",
+      "VolumeArtifact-UUID1",
+      "VolumeEnvArtifact-UUID1"
+    ]
+  }
+]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/notif-structure.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V4/notif-structure.json
new file mode 100644 (file)
index 0000000..ccf80ce
--- /dev/null
@@ -0,0 +1,116 @@
+{
+    "serviceName": "test-service",
+    "serviceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+    "serviceUUID": "1e34774e-715e-4fd5-bd09-7b654622f35h",
+    "serviceVersion": "4.0",
+    "serviceArtifacts": 
+    [
+    ],
+
+    "resources": 
+    [
+        {
+            "resourceInstanceName": "resource-1",
+            "resourceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+            "resourceName": "resourceName-1",
+            "resourceType": "VF",
+            "resourceUUID": "585822c7-4027-4f84-ba50-e9248606f136",
+            "resourceVersion": "2.0",
+            "artifacts": 
+            [
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Meta data for VFModule",
+                    "artifactName": "vnf-module-artifact.json",
+                    
+                    "artifactType": "VF_MODULES_METADATA",
+                    "artifactURL": "vnf-module-artifact.json",
+                    "artifactUUID": "VfArtifact-UUID2",
+                    "artifactVersion": "1.0"
+
+                },
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactTimeout": 100,
+                    "artifactType": "HEAT",
+                    "artifactURL": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactUUID": "Artifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID2",
+                    "relatedArtifact": 
+                    [
+                        "NestedArtifact-UUID3",
+                        "ScriptArtifact-UUID1"
+                    ]
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat ENV OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam_v1.0.env",
+                    "artifactUUID": "EnvArtifact-UUID2",
+                    "artifactVersion": "1.0"
+                  
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nested OAM",
+                    "artifactName": "nested-oam_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_NESTED",
+                    "artifactURL": "nested-oam_v1.0.yaml",
+                    "artifactUUID": "NestedArtifact-UUID3",
+                    "artifactVersion": "1.0"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Script for OAM",
+                    "artifactName": "mount_iso_script.sh",
+                    
+                    "artifactType": "HEAT_ARTIFACT",
+                    "artifactURL": "mount_iso_script.sh",
+                    "artifactUUID": "ScriptArtifact-UUID1",
+                    "artifactVersion": "1.0"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Heat Vol for OAM",
+                    "artifactName": "hot-nimbus-oam-volumes_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_VOL",
+                    "artifactURL": "hot-nimbus-oam-volumes_v1.0.yaml",
+                    "artifactUUID": "VolumeArtifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "VolumeEnvArtifact-UUID1"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Heat Env Vol for OAM",
+                    "artifactName": "hot-nimbus-oam-volumes_v1.0.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam-volumes_v1.0.env",
+                    "artifactUUID": "VolumeEnvArtifact-UUID1",
+                    "artifactVersion": "1.0"
+          
+                }
+            ]
+        }
+    ],
+
+    "serviceDescription": "test service for unit testing",
+    "distributionID": "35120a87-1f82-4276-9735-f6de5a244d65"
+}
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/att_nimbus_vsaegw_ht_base_v13_0728v1.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/att_nimbus_vsaegw_ht_base_v13_0728v1.yaml
new file mode 100644 (file)
index 0000000..2aa58fb
--- /dev/null
@@ -0,0 +1,3374 @@
+
+heat_template_version: 2013-05-23
+
+
+description: SAEGW (version 20.1.0v) HEAT Template (2CFs and 10SFs) 
+
+parameters:
+#    description: instance name
+  vnf_name:
+    type: string
+    description: Unique name for this VF instance
+#   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+  vnf_id:
+    type: string
+    description: Unique ID for this VF instance
+#   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+  vf_module_id:
+    type: string
+    description: Unique ID for this VF Module instance
+#   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
+  admin_password:
+    type: string
+    description: cf instance admin password
+  cf_oam_protected_vip:
+    type: string
+    description: cf instance mgmt vip address
+  cf_vpc_vip_gateway:
+    type: string
+    description: cf instance mgmt gateway address
+  availability_zone_0:
+    type: string
+    description: Availability_zone where the VNF should be created
+  cf_image_name_0:
+    type: string
+    description: instance cf1 image
+  cf_image_name_1:
+    type: string
+    description: instance cf2 image
+  sf_image_name:
+    type: string
+    description: instance sf image
+  cf_flavor_name:
+    type: string
+    description: instance flavor for CFs
+  sf_flavor_name:
+    type: string
+    description: instance flavor for SFs
+  oam_protected_net_name:
+    type: string
+    description: instance oam network
+  oam_calea_net_name:
+    type: string
+    description: network name of service network 5
+  int_icsr_net_name:
+    type: string
+    description: network name of service network 6
+  cgwy_int_di2_net_name:
+    type: string
+    description: network name of DI Internal network
+  cf_oam_protected_ip_0:
+    type: string
+    description: Static IP for CF01 management Neutron port
+  cf_oam_protected_ip_1:
+    type: string
+    description: Static IP for CF02 management Neutron port
+  sf_gn_ips:
+    type: comma_delimited_list
+    description: Static IPs for Gn IPv4 Ports
+  sf_cor_ips:
+    type: comma_delimited_list
+    description: Static IPs for Cor IPv4 Ports
+  sf_sgi_prot_ips:
+    type: comma_delimited_list
+    description: Static IPs for SGi Ports
+  sf_sgi_ims_ips:
+    type: comma_delimited_list
+    description: Static IPs for Sgi IMS Ports
+  sf_oam_calea_ips:
+    type: comma_delimited_list
+    description: Static IPs for OAM Calea Ports
+  sf_int_icsr_ips:
+    type: comma_delimited_list
+    description: Static IPs for icsr Ports
+
+  sf_gn_v6_ips:
+    type: comma_delimited_list
+    description: Static IPs for Gn IPv6 Ports
+  sf_cor_v6_ips:
+    type: comma_delimited_list
+    description: Static IPs for Cor IPv6 Ports
+  sf_sgi_prot_v6_ips:
+    type: comma_delimited_list
+    description: Static IPs for SGi Ports
+  sf_sgi_ims_v6_ips:
+    type: comma_delimited_list
+    description: Static IPs for Sgi IMS Ports
+# Added per AIC team request
+#  srv_grp_sf:
+#    type: string
+#    description: Service Group Description
+
+  cgwy_names:
+    type: comma_delimited_list
+    description: VM hostname
+  cf_name:
+    type: string
+    description: CF GW Cluster Name
+  cf_volume_size_0:
+    type: string
+    description: volume for CF1
+  cf_volume_size_1:
+    type: string
+    description: volume for CF2
+  gn_net_fqdn:
+    type: string
+    description: GN network FQ name
+  sgi_net_fqdn:
+    type: string
+    description: SGI network FQ name
+  ims_net_fqdn:
+    type: string
+    description: IMS network FQ name
+  cor_net_fqdn:
+    type: string
+    description: COR network FQ name
+  vmi_allowed_address_pair_address_mode:  
+    type: string
+    description: allow address paire active-active mode
+  vmi_allowed_address_pair_prefix_lenth:
+    type: string
+    description: IPv4 VIP prefix length
+  sf_gn_rii_v6:
+    type: string
+    description: GN IPv6 VIP loopback
+  sf_cor_rii_v6:
+    type: string
+    description: COR IPv6 VIP loopback
+  sf_sgi_rii_v6:
+    type: string
+    description: SGI IPv6 VIP loopback
+  sf_ims_rii_v6:
+    type: string
+    description: IMS IPv4 VIP loopback
+  vmi_allowed_address_pair_prefix_lenth_v6:
+    type: string
+    description: IPv6 VIP prefix length
+  instance_ip_family_v6:
+    type: string
+    description: iip address family IPv6
+
+
+
+  bgpaas_name:
+    type: comma_delimited_list
+    description: name for the BgpAsAService
+  bgpaas_autonomous_system:
+    type: number
+    description: AS for the BgpAsAService
+    constraints:
+    - range: {min: 0, max: 999999}
+  bgpaas_ip_address:
+    type: comma_delimited_list
+    description: bgpaas peer address for the BgpAsAService
+  bgpaas_session_attributes_passive:
+    type: boolean
+    description: passive mode selection for the BgpAsAService
+  bgpaas_session_attributes_hold_time:
+    type: number
+    description: hold_time for the BgpAsAService
+    constraints:
+    - range: {min: 0, max: 999}
+  bgpaas_session_attributes_admin_down:
+    type: boolean
+    description: admin_down for the BgpAsAService
+  bgpaas_session_attributes_address_families_family_4:
+    type: string
+    description: family for the BgpAsAService
+  bgpaas_session_attributes_address_families_family_6:
+    type: string
+    description: family for the BgpAsAService
+  bgpaas_session_attributes_family_attributes_af_4:
+    type: string
+    description: address_family ipv4 unitcast for the BgpAsAService
+  bgpaas_session_attributes_family_attributes_loop_count_4:
+    type: number
+    description: loop_count ipv4 unitcast for the BgpAsAService
+    constraints:
+    - range: {min: 0, max: 999}
+  bgpaas_session_attributes_family_attributes_prefix_limit_maximum_4:
+    type: number
+    description: maximum prefix ipv4 unicast for the BgpAsAService
+    constraints:
+    - range: {min: 0, max: 9999}
+  bgpaas_session_attributes_family_attributes_af_6:
+    type: string
+    description: address_family v6_ips unicast for the BgpAsAService
+  bgpaas_session_attributes_family_attributes_loop_count_6:
+    type: number
+    description: loop_count v6_ips unicast for the BgpAsAService
+    constraints:
+    - range: {min: 0, max: 999}
+  bgpaas_session_attributes_family_attributes_prefix_limit_maximum_6:
+    type: number
+    description: maximum v6_ips unicast for the BgpAsAService
+    constraints:
+    - range: {min: 0, max: 9999}
+  sf_shc_enabled:
+    type: boolean
+    description: enabled for the ServiceHealthCheck
+  sf_shc_monitor_type:
+    type: string
+    description: monitor_type for the ServiceHealthCheck
+  sf_shc_delay:
+    type: number
+    description: delay for the ServiceHealthCheck
+    constraints:
+    - range: {min: 0, max: 999}
+  sf_shc_timeout:
+    type: number
+    description: timeout for the ServiceHealthCheck
+    constraints:
+    - range: {min: 0, max: 999}
+  sf_shc_max_retries:
+    type: number
+    description: max_retries for the ServiceHealthCheck
+    constraints:
+    - range: {min: 0, max: 999}
+  sf_shc_url_path:
+    type: string
+    description: url for the ServiceHealthCheck
+
+
+resources:
+  # Create anti-affinity Server Group
+  cf_vpc-servergroup:
+    type: OS::Nova::ServerGroup
+    properties:
+      policies:
+        - anti-affinity
+  # Create anti-affinity Server Group
+  sf_vpc-servergroup:
+    type: OS::Nova::ServerGroup
+    properties:
+      policies:
+        - anti-affinity
+
+
+  # Create CF1 and CF2 ports on DI Internal Network DI Management Network
+  cf_int_di2_0_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+
+  cf_mgmt_0_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_protected_net_name}
+      fixed_ips: [{"ip_address": {get_param: cf_oam_protected_ip_0}}]
+      allowed_address_pairs: [{"ip_address": {get_param: cf_oam_protected_vip}}]
+
+  cf_int_di2_1_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+
+  cf_mgmt_1_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_protected_net_name}
+      fixed_ips: [{"ip_address": {get_param: cf_oam_protected_ip_1}}]
+      allowed_address_pairs: [{"ip_address": {get_param: cf_oam_protected_vip}}]
+  
+  # Create hard drives for CF1 and CF2 to store CDR
+  cf_volume_name_0:
+    type: OS::Cinder::Volume
+    properties:
+      size: { get_param: cf_volume_size_0 }
+  #    volume_type: iscsi
+
+  cf_volume_name_1:
+    type: OS::Cinder::Volume
+    properties:
+      size: { get_param: cf_volume_size_1 }
+  #    volume_type: iscsi
+  
+  # Create CF1 instance
+  cf_server0:
+    type: OS::Nova::Server
+    properties:
+      metadata:
+         vnf_id: { get_param: vnf_id }
+         vnf_name: { get_param: vnf_name }
+         vf_module_id: { get_param: vf_module_id }
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DCF
+#            ${VM_NUM}: "001"
+      name: {get_param: [cgwy_names, 0]}
+      image: {get_param: cf_image_name_0}
+      flavor: {get_param: cf_flavor_name}
+      availability_zone: {get_param: availability_zone_0}
+      config_drive: True
+      networks:
+        - port: {get_resource: cf_int_di2_0_port}
+        - port: {get_resource: cf_mgmt_0_port}
+# Tempoarry comment out for testing 
+      scheduler_hints:
+        group: {get_resource: cf_vpc-servergroup}
+      personality:
+      # Associate VM to slot-1 and identify it is a CF
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=${CARD_NUMBER}
+              CARDTYPE=${CARD_TYPE}
+              CPUID=${CPUID}
+            params:
+              ${CARD_NUMBER}: 1
+              ${CARD_TYPE}: CFC
+              ${CPUID}: 0
+      # Day-0 config for CF1
+        "staros_config.txt":
+          str_replace:
+            template: |
+              config
+                  system hostname ${HOSTNAME}
+                  ssh key-gen wait-time 0
+                  context local
+                      administrator admin password ${ADMIN_PASSWD} ftp
+                          interface LOCAL1
+                              ip address ${CF_VIP_ADDR} 255.255.255.0
+                          #exit
+                      ip route 0.0.0.0 0.0.0.0 ${CF_VIP_GATEWAY} LOCAL1
+                      ssh generate key
+                      server sshd
+                          subsystem sftp
+                      #exit
+                  #exit
+                  port ethernet 1/1
+                      bind interface LOCAL1 local
+                      no shutdown
+                  #exit
+                  snmp community public read-only
+              end
+              chassis key value Cisco12345
+            params:
+#                  system hostname Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+
+#              ${CZ_ID}: {get_param: czid}
+#              ${VF_ID}: {get_param: vf_inst_number}
+#              ${VM_TYPE}: DCF
+              #${VM_NUM}: "01"
+              ${HOSTNAME}: {get_param: cf_name}
+              ${ADMIN_PASSWD}: {get_param: admin_password}
+              ${CF_VIP_ADDR}: {get_param: cf_oam_protected_vip}
+              ${CF_VIP_GATEWAY}: {get_param: cf_vpc_vip_gateway}
+  
+  # Attach hard drive (CDR) to CF1 instance
+  cf_volume_att_0:
+    type: OS::Cinder::VolumeAttachment
+    properties:
+      instance_uuid: { get_resource: cf_server0 }
+      volume_id: { get_resource: cf_volume_name_0 }
+
+  # Create CF2 instance
+  cf_server1:
+    type: OS::Nova::Server
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DCF
+#            ${VM_NUM}: "002"
+      name: {get_param: [cgwy_names, 1]}
+      image: {get_param: cf_image_name_1}
+      flavor: {get_param: cf_flavor_name}
+      availability_zone: {get_param: availability_zone_0}
+      config_drive: True
+      networks:
+        - port: {get_resource: cf_int_di2_1_port}
+        - port: {get_resource: cf_mgmt_1_port}
+# commented out for testing only
+      scheduler_hints:
+        group: {get_resource: cf_vpc-servergroup}
+      personality:
+      # Associate VM to slot-2 and identify it is a CF
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=${CARD_NUMBER}
+              CARDTYPE=${CARD_TYPE}
+              CPUID=${CPUID}
+            params:
+              ${CARD_NUMBER}: 2
+              ${CARD_TYPE}: CFC
+              ${CPUID}: 0
+      # Day-0 config for CF2
+        "staros_config.txt":
+          str_replace:
+            template: |
+              config
+                  system hostname ${HOSTNAME}
+                  ssh key-gen wait-time 0 
+                  context local
+                      administrator admin password ${ADMIN_PASSWD} ftp
+                          interface LOCAL1
+                              ip address ${CF_VIP_ADDR} 255.255.255.0
+                          #exit
+                      ip route 0.0.0.0 0.0.0.0 ${CF_VIP_GATEWAY} LOCAL1
+                      ssh generate key
+                      server sshd
+                          subsystem sftp
+                      #exit
+                  #exit
+                  port ethernet 1/1
+                      bind interface LOCAL1 local
+                      no shutdown
+                  #exit
+                  snmp community public read-only
+              end
+              chassis key value Cisco12345
+            params:
+#                  system hostname Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#              ${CZ_ID}: {get_param: czid}
+#              ${VF_ID}: {get_param: vf_inst_number}
+#              ${VM_TYPE}: DCF
+#              ${VM_NUM}: "01"
+              ${HOSTNAME}: {get_param: cf_name}
+              ${ADMIN_PASSWD}: {get_param: admin_password}
+              ${CF_VIP_ADDR}: {get_param: cf_oam_protected_vip}
+              ${CF_VIP_GATEWAY}: {get_param: cf_vpc_vip_gateway}
+
+  # Attach hard drive (CDR) to CF2 instance
+  cf_volume_att_1:
+    type: OS::Cinder::VolumeAttachment
+    properties:
+      instance_uuid: { get_resource: cf_server1 }
+      volume_id: { get_resource: cf_volume_name_1 }
+
+  #### SF03 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_2_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+# Create port for Transport Interface in SAEGW Context
+  SF3_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - {get_param: gn_net_fqdn}
+#      service_health_check_refs: 
+#        - { get_resource: SF3_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF3_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF3_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF3_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 0] }
+
+  SF3_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF3_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF3_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 0] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF3_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF3_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF3_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF3_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF3_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF3_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF3_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 0] }
+
+  SF3_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF3_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF3_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 0] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF3_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF3_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF3_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF3_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF3_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF3_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF3_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 0] }
+
+  SF3_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF3_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF3_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 0] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF3_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF3_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF3_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF3_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF3_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF3_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF3_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 0] }
+
+  SF3_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF3_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF3_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 0] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF3_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF3_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+
+
+
+ # Create port for Transport interface in LI Context 
+  SF3_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 0]}}]
+  # Create port for Transport interface in SRP Context 
+  SF3_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 0]}}]
+
+  # Create VPC SF 03 Instance
+  sf_server_2:
+    type: OS::Nova::Server
+    depends_on: [ SF3_GN_10_RII, SF3_GN_10_v6_RII, SF3_SGI_11_RII, SF3_SGI_11_v6_RII, SF3_IMS_12_RII, SF3_IMS_12_v6_RII, SF3_COR_13_RII, SF3_COR_13_v6_RII ]
+    properties:
+      metadata:
+        vnf_id: { get_param: vnf_id }
+        vnf_name: { get_param: vnf_name }
+        vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "003"
+      name: {get_param: [cgwy_names, 2]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_2_port}
+        - port: {get_resource: SF3_GN_10_RVMI}
+        - port: {get_resource: SF3_SGI_11_RVMI}
+        - port: {get_resource: SF3_IMS_12_RVMI}
+        - port: {get_resource: SF3_COR_13_RVMI}
+        - port: {get_resource: SF3_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF3_INT_ICSR_15_PORT}
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 3
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+        
+  #### SF04 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_3_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+# Create port for Transport Interface in SAEGW Context
+  SF4_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF4_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF4_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF4_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF4_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 1] }
+
+  SF4_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF4_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF4_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 1] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF4_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF4_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF4_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF4_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF4_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF4_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF4_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 1] }
+
+  SF4_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF4_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF4_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 1] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF4_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF4_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF4_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF4_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF4_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF4_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF4_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 1] }
+
+  SF4_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF4_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF4_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 1] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF4_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF4_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF4_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF4_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF4_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF4_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF4_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 1] }
+
+  SF4_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF4_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF4_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 1] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF4_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF4_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+
+  SF4_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 1]}}]
+  # Create port for Transport interface in SRP Context 
+  SF4_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 1]}}]
+
+  # Create VPC SF 04 Instance
+  sf_server_3:
+    type: OS::Nova::Server
+    depends_on: [ SF4_GN_10_RII, SF4_GN_10_v6_RII, SF4_SGI_11_RII, SF4_SGI_11_v6_RII, SF4_IMS_12_RII, SF4_IMS_12_v6_RII, SF4_COR_13_RII, SF4_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "004"
+      name: {get_param: [cgwy_names, 3]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_3_port}
+        - port: {get_resource: SF4_GN_10_RVMI}
+        - port: {get_resource: SF4_SGI_11_RVMI}
+        - port: {get_resource: SF4_IMS_12_RVMI}
+        - port: {get_resource: SF4_COR_13_RVMI}
+        - port: {get_resource: SF4_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF4_INT_ICSR_15_PORT}
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 4
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+
+
+  #### SF05 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_4_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+  # Create port for Transport Interface in SAEGW Context
+  SF5_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF5_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF5_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF5_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF5_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 2] }
+
+  SF5_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF5_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF5_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 2] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF5_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF5_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF5_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF5_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF5_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF5_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF5_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 2] }
+
+  SF5_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF5_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF5_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 2] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF5_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF5_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF5_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF5_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF5_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF5_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF5_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 2] }
+
+  SF5_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF5_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF5_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 2] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF5_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF5_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF5_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF5_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF5_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF5_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF5_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 2] }
+
+  SF5_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF5_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF5_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 2] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF5_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF5_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+
+  # Create port for Transport interface in LI Context 
+  SF5_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 2]}}]
+  # Create port for Transport interface in SRP Context 
+  SF5_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 2]}}]
+
+  # Create VPC SF 05 Instance
+  sf_server_4:
+    type: OS::Nova::Server
+    depends_on: [ SF5_GN_10_RII, SF5_GN_10_v6_RII, SF5_SGI_11_RII, SF5_SGI_11_v6_RII, SF5_IMS_12_RII, SF5_IMS_12_v6_RII, SF5_COR_13_RII, SF5_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "005"
+      name: {get_param: [cgwy_names, 4]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_4_port}
+        - port: {get_resource: SF5_GN_10_RVMI}
+        - port: {get_resource: SF5_SGI_11_RVMI}
+        - port: {get_resource: SF5_IMS_12_RVMI}
+        - port: {get_resource: SF5_COR_13_RVMI}
+        - port: {get_resource: SF5_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF5_INT_ICSR_15_PORT}
+
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 5
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+        
+
+  #### SF06 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_5_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+  # Create port for Transport Interface in SAEGW Context
+  SF6_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF6_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF6_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF6_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs: 
+        - get_resource: SF6_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 3] }
+
+  SF6_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF6_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  SF6_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF6_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF6_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 3] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF6_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF6_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF6_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF6_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF6_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 3] }
+
+  SF6_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF6_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF6_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 3] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF6_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF6_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF6_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF6_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF6_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF6_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF6_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 3] }
+
+  SF6_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF6_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF6_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 3] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF6_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF6_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF6_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF6_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF6_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF6_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF6_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 3] }
+
+  SF6_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF6_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF6_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 3] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF6_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF6_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+
+  # Create port for Transport interface in LI Context 
+  SF6_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 3]}}]
+  # Create port for Transport interface in SRP Context 
+  SF6_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 3]}}]
+
+  # Create VPC SF 06 Instance
+  sf_server_5:
+    type: OS::Nova::Server
+    depends_on: [ SF6_GN_10_RII, SF6_GN_10_v6_RII, SF6_SGI_11_RII, SF6_SGI_11_v6_RII, SF6_IMS_12_RII, SF6_IMS_12_v6_RII, SF6_COR_13_RII, SF6_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "006"
+      name: {get_param: [cgwy_names, 5]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_5_port}
+        - port: {get_resource: SF6_GN_10_RVMI}
+        - port: {get_resource: SF6_SGI_11_RVMI}
+        - port: {get_resource: SF6_IMS_12_RVMI}
+        - port: {get_resource: SF6_COR_13_RVMI}
+        - port: {get_resource: SF6_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF6_INT_ICSR_15_PORT}
+
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 6
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+  ### SF07 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_6_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+# Create port for Transport Interface in SAEGW Context
+  SF7_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF7_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF7_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF7_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF7_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 4] }
+
+  SF7_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF7_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF7_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 4] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF7_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF7_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF7_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF7_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF7_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF7_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF7_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 4] }
+
+  SF7_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF7_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF7_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 4] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF7_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF7_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF7_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF7_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF7_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF7_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF7_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 4] }
+
+  SF7_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF7_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF7_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 4] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF7_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF7_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF7_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF7_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF7_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF7_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF7_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 4] }
+
+  SF7_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF7_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF7_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 4] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF7_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF7_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface in LI Context
+  SF7_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 4]}}]
+  # Create port for Transport interface in SRP Context
+  SF7_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 4]}}]
+
+  # Create VPC SF 07 Instance
+  sf_server_6:
+    type: OS::Nova::Server
+    depends_on: [ SF7_GN_10_RII, SF7_GN_10_v6_RII, SF7_SGI_11_RII, SF7_SGI_11_v6_RII, SF7_IMS_12_RII, SF7_IMS_12_v6_RII, SF7_COR_13_RII, SF7_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "007"
+      name: {get_param: [cgwy_names, 6]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_6_port}
+        - port: {get_resource: SF7_GN_10_RVMI}
+        - port: {get_resource: SF7_SGI_11_RVMI}
+        - port: {get_resource: SF7_IMS_12_RVMI}
+        - port: {get_resource: SF7_COR_13_RVMI}
+        - port: {get_resource: SF7_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF7_INT_ICSR_15_PORT}
+
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 7
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+
+  ### SF08 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_7_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+# Create port for Transport Interface in SAEGW Context
+  SF8_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF8_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF8_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF8_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF8_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 5] }
+
+  SF8_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF8_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF8_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 5] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF8_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF8_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF8_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF8_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF8_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF8_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF8_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 5] }
+
+  SF8_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF8_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF8_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 5] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF8_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF8_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF8_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF8_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF8_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF8_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF8_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 5] }
+
+  SF8_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF8_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF8_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 5] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF8_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF8_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF8_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF8_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF8_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF8_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF8_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 5] }
+
+  SF8_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF8_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF8_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 5] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF8_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF8_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+
+  SF8_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 5]}}]
+  # Create port for Transport interface in SRP Context
+  SF8_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 5]}}]
+
+  # Create VPC SF 08 Instance
+  sf_server_7:
+    type: OS::Nova::Server
+    depends_on: [ SF8_GN_10_RII, SF8_GN_10_v6_RII, SF8_SGI_11_RII, SF8_SGI_11_v6_RII, SF8_IMS_12_RII, SF8_IMS_12_v6_RII, SF8_COR_13_RII, SF8_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "008"
+      name: {get_param: [cgwy_names, 7]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_7_port}
+        - port: {get_resource: SF8_GN_10_RVMI}
+        - port: {get_resource: SF8_SGI_11_RVMI}
+        - port: {get_resource: SF8_IMS_12_RVMI}
+        - port: {get_resource: SF8_COR_13_RVMI}
+        - port: {get_resource: SF8_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF8_INT_ICSR_15_PORT}
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 8
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+
+  ### SF09 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_8_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+# Create port for Transport Interface in SAEGW Context
+  SF9_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF9_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF9_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF9_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF9_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 6] }
+
+  SF9_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF9_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF9_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 6] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF9_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF9_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF9_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF9_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF9_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF9_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF9_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 6] }
+
+  SF9_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF9_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF9_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 6] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF9_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF9_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF9_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF9_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF9_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF9_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF9_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 6] }
+
+  SF9_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF9_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF9_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 6] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF9_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF9_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF9_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF9_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF9_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF9_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF9_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 6] }
+
+  SF9_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF9_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF9_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 6] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF9_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF9_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface in LI Context
+  SF9_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 6]}}]
+  # Create port for Transport interface in SRP Context
+  SF9_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 6]}}]
+
+  # Create VPC SF 09 Instance
+  sf_server_8:
+    type: OS::Nova::Server
+    depends_on: [ SF9_GN_10_RII, SF9_GN_10_v6_RII, SF9_SGI_11_RII, SF9_SGI_11_v6_RII, SF9_IMS_12_RII, SF9_IMS_12_v6_RII, SF9_COR_13_RII, SF9_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "009"
+      name: {get_param: [cgwy_names, 8]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_8_port}
+        - port: {get_resource: SF9_GN_10_RVMI}
+        - port: {get_resource: SF9_SGI_11_RVMI}
+        - port: {get_resource: SF9_IMS_12_RVMI}
+        - port: {get_resource: SF9_COR_13_RVMI}
+        - port: {get_resource: SF9_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF9_INT_ICSR_15_PORT}
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 9
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+
+  ### SF10 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_9_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+# Create port for Transport Interface in SAEGW Context
+  SF10_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF10_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF10_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF10_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF10_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 7] }
+
+  SF10_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF10_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF10_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 7] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF10_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF10_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF10_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF10_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF10_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF10_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF10_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 7] }
+
+  SF10_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF10_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF10_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 7] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF10_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF10_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF10_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF10_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF10_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF10_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF10_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 7] }
+
+  SF10_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF10_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF10_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 7] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF10_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF10_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF10_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF10_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF10_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF10_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF10_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 7] }
+
+  SF10_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF10_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF10_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 7] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF10_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF10_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface in LI Context
+  SF10_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 7]}}]
+  # Create port for Transport interface in SRP Context
+  SF10_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 7]}}]
+
+  # Create VPC SF 10 Instance
+  sf_server_9:
+    type: OS::Nova::Server
+    depends_on: [ SF10_GN_10_RII, SF10_GN_10_v6_RII, SF10_SGI_11_RII, SF10_SGI_11_v6_RII, SF10_IMS_12_RII, SF10_IMS_12_v6_RII, SF10_COR_13_RII, SF10_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "010"
+      name: {get_param: [cgwy_names, 9]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_9_port}
+        - port: {get_resource: SF10_GN_10_RVMI}
+        - port: {get_resource: SF10_SGI_11_RVMI}
+        - port: {get_resource: SF10_IMS_12_RVMI}
+        - port: {get_resource: SF10_COR_13_RVMI}
+        - port: {get_resource: SF10_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF10_INT_ICSR_15_PORT}
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 10
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+
+  ### SF11 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_10_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+# Create port for Transport Interface in SAEGW Context
+  SF11_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF11_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF11_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF11_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF11_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 8] }
+
+  SF11_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF11_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF11_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 8] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF11_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF11_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF11_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF11_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF11_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF11_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF11_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 8] }
+
+  SF11_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF11_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF11_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 8] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF11_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF11_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF11_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF11_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF11_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF11_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF11_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 8] }
+
+  SF11_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF11_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF11_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 8] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF11_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF11_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF11_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF11_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF11_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF11_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF11_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 8] }
+
+  SF11_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF11_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF11_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 8] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF11_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF11_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface in LI Context
+  SF11_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 8]}}]
+  # Create port for Transport interface in SRP Context
+  SF11_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 8]}}]
+
+  # Create VPC SF 11 Instance
+  sf_server_10:
+    type: OS::Nova::Server
+    depends_on: [ SF11_GN_10_RII, SF11_GN_10_v6_RII, SF11_SGI_11_RII, SF11_SGI_11_v6_RII, SF11_IMS_12_RII, SF11_IMS_12_v6_RII, SF11_COR_13_RII, SF11_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "011"
+      name: {get_param: [cgwy_names, 10]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_10_port}
+        - port: {get_resource: SF11_GN_10_RVMI}
+        - port: {get_resource: SF11_SGI_11_RVMI}
+        - port: {get_resource: SF11_IMS_12_RVMI}
+        - port: {get_resource: SF11_COR_13_RVMI}
+        - port: {get_resource: SF11_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF11_INT_ICSR_15_PORT}
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 11
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+
+
+  ### SF12 ######
+  # Create port for DI-Internal Network
+  sf_int_di2_11_port:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: cgwy_int_di2_net_name}
+# Create port for Transport Interface in SAEGW Context
+  SF12_GN_10_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF12_GN_10_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,0] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_gn_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF12_GN_10_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF12_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF12_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_ips, 9] }
+
+  SF12_GN_10_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF12_GN_10_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: gn_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF12_GN_10_RVMI
+      instance_ip_address: { get_param: [sf_gn_v6_ips, 9] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF12_GN_10_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF12_GN_10_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-data) in SGi Context
+  SF12_SGI_11_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF12_SGI_11_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,1] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_sgi_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF12_SGI_11_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF12_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF12_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_ips, 9] }
+
+  SF12_SGI_11_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF12_SGI_11_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: sgi_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF12_SGI_11_RVMI
+      instance_ip_address: { get_param: [sf_sgi_prot_v6_ips, 9] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF12_SGI_11_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF12_SGI_11_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface(SGi-ims) in SGi Context
+  SF12_IMS_12_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF12_IMS_12_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,2] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_ims_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF12_IMS_12_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF12_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF12_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_ips, 9] }
+
+  SF12_IMS_12_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF12_IMS_12_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: ims_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF12_IMS_12_RVMI
+      instance_ip_address: { get_param: [sf_sgi_ims_v6_ips, 9] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF12_IMS_12_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF12_IMS_12_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport Interface in SUPPORT Context
+  SF12_COR_13_RVMI:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+#      service_health_check_refs: 
+#        - { get_resource: SF12_COR_13_RSHC }
+      virtual_machine_interface_allowed_address_pairs:
+        virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: [bgpaas_ip_address,3] }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth }
+          - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: vmi_allowed_address_pair_address_mode }
+            virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: sf_cor_rii_v6 }
+              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: vmi_allowed_address_pair_prefix_lenth_v6 }
+
+  SF12_COR_13_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF12_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF12_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_ips, 9] }
+
+  SF12_COR_13_v6_RII:
+    type: OS::ContrailV2::InstanceIp
+    depends_on: [ SF12_COR_13_RVMI ]
+    properties:
+      virtual_network_refs:
+        - get_param: cor_net_fqdn
+      virtual_machine_interface_refs:
+        - get_resource: SF12_COR_13_RVMI
+      instance_ip_address: { get_param: [sf_cor_v6_ips, 9] }
+      instance_ip_family: { get_param: instance_ip_family_v6 }
+
+  SF12_COR_13_RSHC:
+    type: OS::ContrailV2::ServiceHealthCheck
+    properties:
+      name: SF12_COR_13_RSHC
+      service_health_check_properties:
+        service_health_check_properties_enabled: { get_param: sf_shc_enabled }
+        service_health_check_properties_monitor_type: { get_param: sf_shc_monitor_type }
+        service_health_check_properties_delay: { get_param: sf_shc_delay }
+        service_health_check_properties_timeout: { get_param: sf_shc_timeout }
+        service_health_check_properties_max_retries: { get_param: sf_shc_max_retries }
+        service_health_check_properties_url_path: { get_param: sf_shc_url_path }
+
+  # Create port for Transport interface in LI Context
+  SF12_OAM_CALEA_14_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: oam_calea_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_oam_calea_ips, 9]}}]
+  # Create port for Transport interface in SRP Context
+  SF12_INT_ICSR_15_PORT:
+    type: OS::Neutron::Port
+    properties:
+      network: {get_param: int_icsr_net_name}
+      fixed_ips: [{"ip_address": {get_param: [sf_int_icsr_ips, 9]}}]
+
+  # Create VPC SF 12 Instance
+  sf_server_11:
+    type: OS::Nova::Server
+    depends_on: [ SF12_GN_10_RII, SF12_GN_10_v6_RII, SF12_SGI_11_RII, SF12_SGI_11_v6_RII, SF12_IMS_12_RII, SF12_IMS_12_v6_RII, SF12_COR_13_RII, SF12_COR_13_v6_RII ]
+    properties:
+      metadata:
+          vnf_id: { get_param: vnf_id }
+          vnf_name: { get_param: vnf_name }
+          vf_module_id: { get_param: vf_module_id }
+
+#      name:
+#        str_replace:
+#          template: Z${CZ_ID}CGWY${VF_ID}${VM_TYPE}${VM_NUM}
+#          params:
+#            ${CZ_ID}: {get_param: czid}
+#            ${VF_ID}: {get_param: vf_inst_number}
+#            ${VM_TYPE}: DSF
+#            ${VM_NUM}: "012"
+      name: {get_param: [cgwy_names, 11]}
+      config_drive: True
+      image: {get_param: sf_image_name}
+      flavor: {get_param: sf_flavor_name}
+      networks:
+        - port: {get_resource: sf_int_di2_11_port}
+        - port: {get_resource: SF12_GN_10_RVMI}
+        - port: {get_resource: SF12_SGI_11_RVMI}
+        - port: {get_resource: SF12_IMS_12_RVMI}
+        - port: {get_resource: SF12_COR_13_RVMI}
+        - port: {get_resource: SF12_OAM_CALEA_14_PORT}
+        - port: {get_resource: SF12_INT_ICSR_15_PORT}
+
+      personality:
+        "staros_param.cfg":
+          str_replace:
+            template: |
+              CARDSLOT=$CARD_NUMBER
+              CARDTYPE=$CARD_TYPE
+              CPUID=$CPUID
+            params:
+              $CARD_NUMBER: 12
+              $CARD_TYPE: SFC
+              $CPUID: 0
+      availability_zone: {get_param: availability_zone_0}
+      scheduler_hints:
+        group: {get_resource: sf_vpc-servergroup}
+
+  BgpAsAService_GN:
+    type: OS::ContrailV2::BgpAsAService
+    depends_on:
+      - SF3_GN_10_RVMI
+      - SF4_GN_10_RVMI
+      - SF5_GN_10_RVMI
+      - SF6_GN_10_RVMI  
+      - SF7_GN_10_RVMI
+      - SF8_GN_10_RVMI
+      - SF9_GN_10_RVMI
+      - SF10_GN_10_RVMI
+      - SF11_GN_10_RVMI
+      - SF12_GN_10_RVMI
+
+    properties:
+      name: { get_param: [bgpaas_name, 0] }
+      autonomous_system: { get_param: bgpaas_autonomous_system }
+      virtual_machine_interface_refs:
+        - { get_resource: SF3_GN_10_RVMI }
+        - { get_resource: SF4_GN_10_RVMI }
+        - { get_resource: SF5_GN_10_RVMI }
+        - { get_resource: SF6_GN_10_RVMI }
+        - { get_resource: SF7_GN_10_RVMI }
+        - { get_resource: SF8_GN_10_RVMI }
+        - { get_resource: SF9_GN_10_RVMI }
+        - { get_resource: SF10_GN_10_RVMI }
+        - { get_resource: SF11_GN_10_RVMI }
+        - { get_resource: SF12_GN_10_RVMI }
+
+      bgpaas_ip_address: { get_param: [bgpaas_ip_address,0] }
+      bgpaas_session_attributes:
+        bgpaas_session_attributes_passive: { get_param: bgpaas_session_attributes_passive }
+        bgpaas_session_attributes_hold_time: { get_param: bgpaas_session_attributes_hold_time }
+        bgpaas_session_attributes_admin_down: { get_param: bgpaas_session_attributes_admin_down }
+        bgpaas_session_attributes_address_families:
+          bgpaas_session_attributes_address_families_family:
+            - { get_param: bgpaas_session_attributes_address_families_family_4 }
+            - { get_param: bgpaas_session_attributes_address_families_family_6 }
+        bgpaas_session_attributes_family_attributes:
+          - bgpaas_session_attributes_family_attributes_address_family: { get_param: bgpaas_session_attributes_family_attributes_af_4 }
+            bgpaas_session_attributes_family_attributes_loop_count: { get_param: bgpaas_session_attributes_family_attributes_loop_count_4 }
+            bgpaas_session_attributes_family_attributes_prefix_limit:
+              bgpaas_session_attributes_family_attributes_prefix_limit_maximum: { get_param: bgpaas_session_attributes_family_attributes_prefix_limit_maximum_4 }
+          - bgpaas_session_attributes_family_attributes_address_family: { get_param: bgpaas_session_attributes_family_attributes_af_6 }
+            bgpaas_session_attributes_family_attributes_loop_count: { get_param: bgpaas_session_attributes_family_attributes_loop_count_6 }
+            bgpaas_session_attributes_family_attributes_prefix_limit:
+              bgpaas_session_attributes_family_attributes_prefix_limit_maximum: { get_param: bgpaas_session_attributes_family_attributes_prefix_limit_maximum_6 }
+
+  BgpAsAService_SGI:
+    type: OS::ContrailV2::BgpAsAService
+    depends_on:
+      - SF3_SGI_11_RVMI
+      - SF4_SGI_11_RVMI
+      - SF5_SGI_11_RVMI
+      - SF6_SGI_11_RVMI 
+      - SF7_SGI_11_RVMI
+      - SF8_SGI_11_RVMI
+      - SF9_SGI_11_RVMI
+      - SF10_SGI_11_RVMI
+      - SF11_SGI_11_RVMI
+      - SF12_SGI_11_RVMI
+    properties:
+      name: { get_param: [bgpaas_name, 1] }
+      autonomous_system: { get_param: bgpaas_autonomous_system }
+      virtual_machine_interface_refs:
+        - { get_resource: SF3_SGI_11_RVMI }
+        - { get_resource: SF4_SGI_11_RVMI }
+        - { get_resource: SF5_SGI_11_RVMI }
+        - { get_resource: SF6_SGI_11_RVMI }
+        - { get_resource: SF7_SGI_11_RVMI }
+        - { get_resource: SF8_SGI_11_RVMI }
+        - { get_resource: SF9_SGI_11_RVMI }
+        - { get_resource: SF10_SGI_11_RVMI }
+        - { get_resource: SF11_SGI_11_RVMI }
+        - { get_resource: SF12_SGI_11_RVMI }
+
+      bgpaas_ip_address: { get_param: [bgpaas_ip_address,1] }
+      bgpaas_session_attributes:
+        bgpaas_session_attributes_passive: { get_param: bgpaas_session_attributes_passive }
+        bgpaas_session_attributes_hold_time: { get_param: bgpaas_session_attributes_hold_time }
+        bgpaas_session_attributes_admin_down: { get_param: bgpaas_session_attributes_admin_down }
+        bgpaas_session_attributes_address_families:
+          bgpaas_session_attributes_address_families_family:
+            - { get_param: bgpaas_session_attributes_address_families_family_4 }
+            - { get_param: bgpaas_session_attributes_address_families_family_6 }
+        bgpaas_session_attributes_family_attributes:
+          - bgpaas_session_attributes_family_attributes_address_family: { get_param: bgpaas_session_attributes_family_attributes_af_4 }
+            bgpaas_session_attributes_family_attributes_loop_count: { get_param: bgpaas_session_attributes_family_attributes_loop_count_4 }
+            bgpaas_session_attributes_family_attributes_prefix_limit:
+              bgpaas_session_attributes_family_attributes_prefix_limit_maximum: { get_param: bgpaas_session_attributes_family_attributes_prefix_limit_maximum_4 }
+          - bgpaas_session_attributes_family_attributes_address_family: { get_param: bgpaas_session_attributes_family_attributes_af_6 }
+            bgpaas_session_attributes_family_attributes_loop_count: { get_param: bgpaas_session_attributes_family_attributes_loop_count_6 }
+            bgpaas_session_attributes_family_attributes_prefix_limit:
+              bgpaas_session_attributes_family_attributes_prefix_limit_maximum: { get_param: bgpaas_session_attributes_family_attributes_prefix_limit_maximum_6 }
+
+  BgpAsAService_IMS:
+    type: OS::ContrailV2::BgpAsAService
+    depends_on:
+      - SF3_IMS_12_RVMI
+      - SF4_IMS_12_RVMI
+      - SF5_IMS_12_RVMI
+      - SF6_IMS_12_RVMI 
+      - SF7_IMS_12_RVMI
+      - SF8_IMS_12_RVMI
+      - SF9_IMS_12_RVMI
+      - SF10_IMS_12_RVMI
+      - SF11_IMS_12_RVMI
+      - SF12_IMS_12_RVMI
+    properties:
+      name: { get_param: [bgpaas_name, 2] }
+      autonomous_system: { get_param: bgpaas_autonomous_system }
+      virtual_machine_interface_refs:
+        - { get_resource: SF3_IMS_12_RVMI }
+        - { get_resource: SF4_IMS_12_RVMI }
+        - { get_resource: SF5_IMS_12_RVMI }
+        - { get_resource: SF6_IMS_12_RVMI }
+        - { get_resource: SF7_IMS_12_RVMI }
+        - { get_resource: SF8_IMS_12_RVMI }
+        - { get_resource: SF9_IMS_12_RVMI }
+        - { get_resource: SF10_IMS_12_RVMI }
+        - { get_resource: SF11_IMS_12_RVMI }
+        - { get_resource: SF12_IMS_12_RVMI }
+
+      bgpaas_ip_address: { get_param: [bgpaas_ip_address,2] }
+      bgpaas_session_attributes:
+        bgpaas_session_attributes_passive: { get_param: bgpaas_session_attributes_passive }
+        bgpaas_session_attributes_hold_time: { get_param: bgpaas_session_attributes_hold_time }
+        bgpaas_session_attributes_admin_down: { get_param: bgpaas_session_attributes_admin_down }
+        bgpaas_session_attributes_address_families:
+          bgpaas_session_attributes_address_families_family:
+            - { get_param: bgpaas_session_attributes_address_families_family_4 }
+            - { get_param: bgpaas_session_attributes_address_families_family_6 }
+        bgpaas_session_attributes_family_attributes:
+          - bgpaas_session_attributes_family_attributes_address_family: { get_param: bgpaas_session_attributes_family_attributes_af_4 }
+            bgpaas_session_attributes_family_attributes_loop_count: { get_param: bgpaas_session_attributes_family_attributes_loop_count_4 }
+            bgpaas_session_attributes_family_attributes_prefix_limit:
+              bgpaas_session_attributes_family_attributes_prefix_limit_maximum: { get_param: bgpaas_session_attributes_family_attributes_prefix_limit_maximum_4 }
+          - bgpaas_session_attributes_family_attributes_address_family: { get_param: bgpaas_session_attributes_family_attributes_af_6 }
+            bgpaas_session_attributes_family_attributes_loop_count: { get_param: bgpaas_session_attributes_family_attributes_loop_count_6 }
+            bgpaas_session_attributes_family_attributes_prefix_limit:
+              bgpaas_session_attributes_family_attributes_prefix_limit_maximum: { get_param: bgpaas_session_attributes_family_attributes_prefix_limit_maximum_6 }
+
+  BgpAsAService_COR:
+    type: OS::ContrailV2::BgpAsAService
+    depends_on:
+      - SF3_COR_13_RVMI
+      - SF4_COR_13_RVMI
+      - SF5_COR_13_RVMI
+      - SF6_COR_13_RVMI
+      - SF7_COR_13_RVMI
+      - SF8_COR_13_RVMI
+      - SF9_COR_13_RVMI
+      - SF10_COR_13_RVMI
+      - SF11_COR_13_RVMI
+      - SF12_COR_13_RVMI
+
+    properties:
+      name: { get_param: [bgpaas_name, 3] }
+      autonomous_system: { get_param: bgpaas_autonomous_system }
+      virtual_machine_interface_refs:
+        - { get_resource: SF3_COR_13_RVMI }
+        - { get_resource: SF4_COR_13_RVMI }
+        - { get_resource: SF5_COR_13_RVMI }
+        - { get_resource: SF6_COR_13_RVMI }
+        - { get_resource: SF7_COR_13_RVMI }
+        - { get_resource: SF8_COR_13_RVMI }
+        - { get_resource: SF9_COR_13_RVMI }
+        - { get_resource: SF10_COR_13_RVMI }
+        - { get_resource: SF11_COR_13_RVMI }
+        - { get_resource: SF12_COR_13_RVMI }
+
+      bgpaas_ip_address: { get_param: [bgpaas_ip_address,3] }
+      bgpaas_session_attributes:
+        bgpaas_session_attributes_passive: { get_param: bgpaas_session_attributes_passive }
+        bgpaas_session_attributes_hold_time: { get_param: bgpaas_session_attributes_hold_time }
+        bgpaas_session_attributes_admin_down: { get_param: bgpaas_session_attributes_admin_down }
+        bgpaas_session_attributes_address_families:
+          bgpaas_session_attributes_address_families_family:
+            - { get_param: bgpaas_session_attributes_address_families_family_4 }
+            - { get_param: bgpaas_session_attributes_address_families_family_6 }
+        bgpaas_session_attributes_family_attributes:
+          - bgpaas_session_attributes_family_attributes_address_family: { get_param: bgpaas_session_attributes_family_attributes_af_4 }
+            bgpaas_session_attributes_family_attributes_loop_count: { get_param: bgpaas_session_attributes_family_attributes_loop_count_4 }
+            bgpaas_session_attributes_family_attributes_prefix_limit:
+              bgpaas_session_attributes_family_attributes_prefix_limit_maximum: { get_param: bgpaas_session_attributes_family_attributes_prefix_limit_maximum_4 }
+          - bgpaas_session_attributes_family_attributes_address_family: { get_param: bgpaas_session_attributes_family_attributes_af_6 }
+            bgpaas_session_attributes_family_attributes_loop_count: { get_param: bgpaas_session_attributes_family_attributes_loop_count_6 }
+            bgpaas_session_attributes_family_attributes_prefix_limit:
+              bgpaas_session_attributes_family_attributes_prefix_limit_maximum: { get_param: bgpaas_session_attributes_family_attributes_prefix_limit_maximum_6 }
+
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/cloud-nimbus.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/cloud-nimbus.sh
new file mode 100644 (file)
index 0000000..48485f3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash\r
+echo "Running first-boot script"\r
+FLAG="first-boot.sh"\r
+echo "First boot run" > ${FLAG}\r
+echo "$vm_name" >> ${FLAG}\r
+touch /var/lib/cloud/instance/payload/launch-params\r
+chmod 644 /var/lib/cloud/instance/payload/launch-params\r
+#for i in $(ls /sys/class/net); do\r
+#  echo "Restart $i" >> ${FLAG}\r
+#  ifdown ${i}\r
+#  ifup ${i}\r
+#done\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..b494d8c
--- /dev/null
@@ -0,0 +1,6 @@
+parameters:
+  pcrf_oam_vol_size: 500
+  pcrf_oam_volume_silver-1: Silver
+  pcrf_oam_volume_silver-2: Silver
+  pcrf_oam_vol_name_1: sde1-pcrfx01-oam001-vol-1
+  pcrf_oam_vol_name_2: sde1-pcrfx01-oam001-vol-2
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..9e12054
--- /dev/null
@@ -0,0 +1,45 @@
+heat_template_version:  2013-05-23
+
+parameters:
+    pcrf_oam_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+    pcrf_oam_vol_name_1:
+     type: string
+     label: OAM volume name 1
+     description: Assigning name to volume
+    pcrf_oam_vol_name_2:
+     type: string
+     label: OAM volume name 2
+     description: Assigning name to volume
+    pcrf_oam_volume_silver-1:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM1
+    pcrf_oam_volume_silver-2:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for OAM2
+
+resources:
+  pcrf_oam_volume_1:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-1}
+      name: {get_param: pcrf_oam_vol_name_1}
+
+  pcrf_oam_volume_2:
+    type: OS::Cinder::Volume
+    properties:
+      size: {get_param: pcrf_oam_vol_size}
+      volume_type: {get_param: pcrf_oam_volume_silver-2}
+      name: {get_param: pcrf_oam_vol_name_2}
+outputs:
+  pcrf_oam_volume_id_1:
+    description: the oam 001 volume id
+    value: { get_resource: pcrf_oam_volume_1 }
+  pcrf_oam_volume_id_2:
+    description: the oam 002 volume id
+    value: { get_resource: pcrf_oam_volume_2 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam_v1.0.env
new file mode 100644 (file)
index 0000000..7e51e67
--- /dev/null
@@ -0,0 +1,18 @@
+parameters:\r
+  pcrf_oam_server_names: ZRDM1PCRF01OAM001,ZRDM1PCRF01OAM002\r
+  pcrf_oam_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_oam_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.111,172.26.16.112\r
+  pcrf_arbiter_vip: 172.26.16.115\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.117,107.239.64.118\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_oam_volume_id_1: a4aa05fb-fcdc-457b-8077-6845fdfc3257\r
+  pcrf_oam_volume_id_2: 93d8fc1f-f1c3-4933-86b2-039881ee910f\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..8f3aae9
--- /dev/null
@@ -0,0 +1,109 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates multiple PCRF OAM nodes stack\r
+\r
+parameters:\r
+  pcrf_oam_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF OAM server names\r
+    description: name of the PCRF OAM instance\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: PCRF OAM image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id_1:\r
+    type: string\r
+    label: CPS OAM 001 Cinder Volume\r
+    description: CPS OAM 001 Cinder Volumes\r
+  pcrf_oam_volume_id_2:\r
+    type: string\r
+    label: CPS OAM 002 Cinder Volume\r
+    description: CPS OAM 002 Cinder Volumes\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_oam_001:\r
+    type: file:///nested-oam_v1.0.yaml\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 0] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_oam_002:\r
+    type: file:///nested-oam_v1.0.yaml\r
+    depends_on: [server_pcrf_oam_001]\r
+    properties:\r
+      pcrf_oam_server_name: { get_param: [pcrf_oam_server_names, 1] }\r
+      pcrf_oam_image_name: { get_param: pcrf_oam_image_name }\r
+      pcrf_oam_flavor_name: { get_param: pcrf_oam_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_oam_volume_id: { get_param: pcrf_oam_volume_id_2 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_arbiter_vip: { get_param: pcrf_arbiter_vip }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm-volumes_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm-volumes_v1.0.env
new file mode 100644 (file)
index 0000000..788365d
--- /dev/null
@@ -0,0 +1,4 @@
+parameters:
+  pcrf_pcm_vol_size: 50
+  pcrf_pcm_volume_silver: Silver
+  pcrf_pcm_vol_name_1: sde1-pcrfx01-pcm001-vol-1
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm-volumes_v1.0.yaml
new file mode 100644 (file)
index 0000000..bcc3e89
--- /dev/null
@@ -0,0 +1,28 @@
+heat_template_version:  2013-05-23
+
+parameters:
+   pcrf_pcm_vol_size:
+     type: number
+     label: Cinder volume size
+     description: the size of the Cinder volume
+   pcrf_pcm_vol_name_1:
+     type: string
+     label: PCM volume name
+     description: Assigning name to volume
+   pcrf_pcm_volume_silver:
+     type: string
+     label: vm volume type
+     description: the name of the target volume backend for PCM
+
+resources: 
+  pcrf_pcm_volume_1:
+     type: OS::Cinder::Volume
+     properties:
+      size: { get_param: pcrf_pcm_vol_size }
+      volume_type: { get_param: pcrf_pcm_volume_silver }
+      name: { get_param: pcrf_pcm_vol_name_1 }
+
+outputs:
+  pcrf_pcm_volume_id_1:
+    description: the pcrf_pcm_volume_id
+    value: { get_resource: pcrf_pcm_volume_1 }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm_v1.0.env
new file mode 100644 (file)
index 0000000..b23014d
--- /dev/null
@@ -0,0 +1,16 @@
+parameters:\r
+  pcrf_pcm_server_names: ZRDM1PCRF01PCM001\r
+  pcrf_pcm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pcm_flavor_name: lc.2xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.113\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.121\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_pcm_volume_id_1: 3438a3fe-1241-4390-80f2-d0b86238c40e\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..defb373
--- /dev/null
@@ -0,0 +1,80 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF CM server names\r
+    description: name of the PCRF CM instance\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: PCRF CM image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id_1:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pcm_001:\r
+    type: nested-pcm_v1.0.yaml\r
+    properties:\r
+      pcrf_pcm_server_name: { get_param: [pcrf_pcm_server_names, 0] }\r
+      pcrf_pcm_image_name: { get_param: pcrf_pcm_image_name }\r
+      pcrf_pcm_flavor_name: { get_param: pcrf_pcm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_pcm_volume_id: { get_param: pcrf_pcm_volume_id_1 }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..8631592
--- /dev/null
@@ -0,0 +1,286 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PD server names\r
+    description: name of the PCRF PD instance\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: PCRF PD image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ips:\r
+    type: comma_delimited_list\r
+    label: OAM network ips\r
+    description: OAM network ips\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Gx network ips\r
+    description: Gx network ips\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sp network ips\r
+    description: Sp network ips\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sy network ips\r
+    description: Sy network ips\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ips:\r
+    type: comma_delimited_list\r
+    label: Rx network ips\r
+    description: Rx network ips\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sd network ips\r
+    description: Sd network ips\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ips:\r
+    type: comma_delimited_list\r
+    label: Sgi Sy network ips\r
+    description: Sgi Sy network ips\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_ppd_001:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 0] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 0] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 0] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 0] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 0] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 0] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 0] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 0] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_002:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 1] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 1] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 1] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 1] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 1] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 1] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 1] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 1] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_003:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 2] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 2] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 2] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 2] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 2] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 2] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 2] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 2] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_ppd_004:\r
+    type: nested-ppd_v1.0.yaml\r
+    properties:\r
+      pcrf_ppd_server_name: { get_param: [pcrf_ppd_server_names, 3] }\r
+      pcrf_ppd_image_name: { get_param: pcrf_ppd_image_name }\r
+      pcrf_ppd_flavor_name: { get_param: pcrf_ppd_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_lb_internal_vip: { get_param: pcrf_lb_internal_vip }\r
+      pcrf_oam_net_name: { get_param: pcrf_oam_net_name }\r
+      pcrf_oam_net_ip: { get_param: [pcrf_oam_net_ips, 3] }\r
+      pcrf_oam_net_mask: { get_param: pcrf_oam_net_mask }\r
+      pcrf_oam_net_gw: { get_param: pcrf_oam_net_gw }\r
+      pcrf_lb_management_vip: { get_param: pcrf_lb_management_vip }\r
+      pcrf_gx_net_name: { get_param: pcrf_gx_net_name }\r
+      pcrf_gx_net_ip: { get_param: [pcrf_gx_net_ips, 3] }\r
+      pcrf_gx_net_mask: { get_param: pcrf_gx_net_mask }\r
+      pcrf_sp_net_name: { get_param: pcrf_sp_net_name }\r
+      pcrf_sp_net_ip: { get_param: [pcrf_sp_net_ips, 3] }\r
+      pcrf_sp_net_mask: { get_param: pcrf_sp_net_mask }\r
+      pcrf_sy_net_name: { get_param: pcrf_sy_net_name }\r
+      pcrf_sy_net_ip: { get_param: [pcrf_sy_net_ips, 3] }\r
+      pcrf_sy_net_mask: { get_param: pcrf_sy_net_mask }\r
+      pcrf_rx_net_name: { get_param: pcrf_rx_net_name }\r
+      pcrf_rx_net_ip: { get_param: [pcrf_rx_net_ips, 3] }\r
+      pcrf_rx_net_mask: { get_param: pcrf_rx_net_mask }\r
+      pcrf_sd_net_name: { get_param: pcrf_sd_net_name }\r
+      pcrf_sd_net_ip: { get_param: [pcrf_sd_net_ips, 3] }\r
+      pcrf_sd_net_mask: { get_param: pcrf_sd_net_mask }\r
+      pcrf_sgi_sy_net_name: { get_param: pcrf_sgi_sy_net_name }\r
+      pcrf_sgi_sy_net_ip: { get_param: [pcrf_sgi_sy_net_ips, 3] }\r
+      pcrf_sgi_sy_net_mask: { get_param: pcrf_sgi_sy_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-ppd_v1.1.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-ppd_v1.1.env
new file mode 100644 (file)
index 0000000..10697bc
--- /dev/null
@@ -0,0 +1,35 @@
+parameters:\r
+  pcrf_ppd_server_names: ZRDM1PCRF01PPD001,ZRDM1PCRF01PPD002,ZRDM1PCRF01PPD003,ZRDM1PCRF01PPD004\r
+  pcrf_ppd_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_ppd_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.3,172.26.16.4,172.26.16.5,172.26.16.6\r
+  pcrf_lb_internal_vip: 172.26.16.114\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_oam_net_name: MNS-25180-L-01_oam_protected_net_0\r
+  pcrf_oam_net_ips: 107.239.64.113,107.239.64.114,107.239.64.115,107.239.64.116\r
+  pcrf_lb_management_vip: 107.239.64.123\r
+  pcrf_oam_net_gw: 107.239.64.1\r
+  pcrf_oam_net_mask: 255.255.248.0\r
+  pcrf_gx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_gx_net_0\r
+  pcrf_gx_net_ips: 107.239.24.67,107.239.24.68,107.239.24.69,107.239.24.70\r
+  pcrf_gx_net_mask: 255.255.255.248\r
+  pcrf_sp_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sp_net_0\r
+  pcrf_sp_net_ips: 107.239.24.75,107.239.24.76,107.239.24.77,107.239.24.78\r
+  pcrf_sp_net_mask: 255.255.255.248\r
+  pcrf_sy_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sy_net_0\r
+  pcrf_sy_net_ips: 107.239.24.83,107.239.24.84,107.239.24.85,107.239.24.86\r
+  pcrf_sy_net_mask: 255.255.255.248\r
+  pcrf_rx_net_name: Mobisupport-25193-I-INT1_cor_pcrf_rx_net_0\r
+  pcrf_rx_net_ips: 107.239.24.91,107.239.24.92,107.239.24.93,107.239.24.94\r
+  pcrf_rx_net_mask: 255.255.255.248\r
+  pcrf_sd_net_name: Mobisupport-25193-I-INT1_cor_pcrf_sd_net_0\r
+  pcrf_sd_net_ips: 107.239.24.99,107.239.24.100,107.239.24.101,107.239.24.102\r
+  pcrf_sd_net_mask: 255.255.255.248\r
+  pcrf_sgi_sy_net_name: Mobisupport-25193-I-INT1_sgi_pcrf_sy_net_0\r
+  pcrf_sgi_sy_net_ips: 107.239.26.131,107.239.26.132,107.239.26.133,107.239.26.134\r
+  pcrf_sgi_sy_net_mask: 255.255.255.248\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pps_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pps_v1.0.env
new file mode 100644 (file)
index 0000000..18c064c
--- /dev/null
@@ -0,0 +1,11 @@
+parameters:\r
+  pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006\r
+  pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_pps_flavor_name: lc.3xlarge\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..0fadd00
--- /dev/null
@@ -0,0 +1,121 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF PS server names\r
+    description: PCRF PS server names\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_pps_001:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_002:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 1] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_003:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 2] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_004:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 3] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_005:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 4] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_pps_006:\r
+    type: nested-pps_v1.0.yaml\r
+    properties:\r
+      pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 5] }\r
+      pcrf_pps_image_name: { get_param: pcrf_pps_image_name }\r
+      pcrf_pps_flavor_name: { get_param: pcrf_pps_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-psm_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-psm_v1.0.env
new file mode 100644 (file)
index 0000000..95e450e
--- /dev/null
@@ -0,0 +1,10 @@
+parameters:\r
+  pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012\r
+  pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2\r
+  pcrf_psm_flavor_name: lc.4xlarge4\r
+  availabilityzone_name: nova\r
+  pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0\r
+  pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74\r
+  pcrf_cps_net_mask: 255.255.255.0\r
+  pcrf_security_group_name: nimbus_security_group\r
+  pcrf_vnf_id: 730797234b4a40aa99335157b02871cd\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..217b0fe
--- /dev/null
@@ -0,0 +1,199 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_names:\r
+    type: comma_delimited_list\r
+    label: PCRF SM server names\r
+    description: name of the PCRF SM instance\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: PCRF SM image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ips:\r
+    type: comma_delimited_list\r
+    label: CPS network ips\r
+    description: CPS network ips\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  server_pcrf_psm_001:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 0] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_002:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 1] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 1] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_003:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 2] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 2] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_004:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 3] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 3] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_005:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 4] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 4] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_006:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 5] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 5] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_007:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 6] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 6] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_008:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 7] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 7] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_009:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 8] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 8] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_010:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 9] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 9] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_011:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 10] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 10] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  server_pcrf_psm_012:\r
+    type: nested-psm_v1.0.yaml\r
+    properties:\r
+      pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 11] }\r
+      pcrf_psm_image_name: { get_param: pcrf_psm_image_name }\r
+      pcrf_psm_flavor_name: { get_param: pcrf_psm_flavor_name }\r
+      availabilityzone_name: { get_param: availabilityzone_name }\r
+      pcrf_security_group_name: { get_param: pcrf_security_group_name }\r
+      pcrf_cps_net_name: { get_param: pcrf_cps_net_name }\r
+      pcrf_cps_net_ip: { get_param: [pcrf_cps_net_ips, 11] }\r
+      pcrf_cps_net_mask: { get_param: pcrf_cps_net_mask }\r
+      pcrf_vnf_id: {get_param: pcrf_vnf_id}\r
\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-swift-container_v1.0.env b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-swift-container_v1.0.env
new file mode 100644 (file)
index 0000000..5267ee4
--- /dev/null
@@ -0,0 +1,3 @@
+parameters:\r
+  pcrf_swift_container_name_1: PCRF_Config_Container_1\r
+  pcrf_swift_container_purge_on_delete_flag_1: false\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-swift-container_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/hot-nimbus-swift-container_v1.0.yaml
new file mode 100644 (file)
index 0000000..ab427bb
--- /dev/null
@@ -0,0 +1,30 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+   pcrf_swift_container_name_1:\r
+     type: string\r
+     label: Swift Container name\r
+     description: Swift Container Name\r
+   pcrf_swift_container_purge_on_delete_flag_1:\r
+     type: boolean\r
+     label: Purge on Delete Flag\r
+     description: Purge on Delete Flag\r
+\r
+resources:\r
+  pcrf_swift_container_1:\r
+    type: OS::Swift::Container\r
+    properties:\r
+      name: { get_param: pcrf_swift_container_name_1 }\r
+      PurgeOnDelete: { get_param: pcrf_swift_container_purge_on_delete_flag_1 }\r
+      X-Container-Read: ".r:*"\r
+     \r
+outputs:\r
+  pcrf_swift_container_id_1:\r
+    description: the pcrf_swift_container_1 id\r
+    value: { get_resource: pcrf_swift_container_1 }\r
+  pcrf_swift_container_url_1:\r
+    description: the pcrf_swift_container_1 url\r
+    value: { get_attr: [ pcrf_swift_container_1, WebsiteURL ] }\r
+    
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/mount_iso_script.sh b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/mount_iso_script.sh
new file mode 100644 (file)
index 0000000..91df598
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash\r
+\r
+#. .config \r
+#following would be in the .config file\r
+ device_name="/dev/vde"\r
+ install_script="install_nimbus.sh"\r
+ enable_logic_flag_file=".flag"\r
+#end of config file\r
+\r
+#get the semaphore, 0 - disbaled, 1- enabled\r
+flag=$(cat ${enable_logic_flag_file})\r
+\r
+#check if device is mounted already\r
+test=$(mount | grep ${device_name})\r
+if [ "$flag" == "1" ]; then\r
+       if [ -e ${device_name} ] && [ ! "${test}" ]; then\r
+               #mount the iso image\r
+               mount -t iso9660 -v -o loop /dev/vde/ /mnt/iso\r
+               #if availabe run the install script (it contains the install.sh steps)\r
+               if [ -e "${install_script}" ] && [ -f "${install_script}" ]; then\r
+                       ${install_script}\r
+               fi\r
+               #disable the script from attempting to \r
+               #  mount and run install again until needed;\r
+               echo "0" > ${enable_logic_flag_file}\r
+               #if nedeed add step to comment out the crontab line here;\r
+       fi\r
+else\r
+       echo "Auto mounting ISO & run install logic disabled!"\r
+fi\r
+\r
+#cron job\r
+# * * * * * /mount_iso_script.sh\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-oam_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-oam_v1.0.yaml
new file mode 100644 (file)
index 0000000..fa3b04e
--- /dev/null
@@ -0,0 +1,156 @@
+heat_template_version: 2013-05-23\r
+\r
+description: nested heat template that creates a PCRF OAM node stack\r
+\r
+parameters:\r
+  pcrf_oam_server_name:\r
+    type: string\r
+    label: PCRF OAM server name\r
+    description: PCRF OAM server name\r
+  pcrf_oam_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF OAM image name\r
+  pcrf_oam_flavor_name:\r
+    type: string\r
+    label: PCRF OAM flavor name\r
+    description: flavor name of PCRF OAM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_arbiter_vip:\r
+    type: string\r
+    label: OAM Arbiter LB VIP\r
+    description: OAM Arbiter LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_volume_id:\r
+    type: string\r
+    label: CPS OAM Cinder Volume\r
+    description: CPS OAM Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_oam_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_oam:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_oam_server_name }\r
+      image: { get_param: pcrf_oam_image_name }\r
+      flavor: { get_param: pcrf_oam_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_oam_port_0}\r
+        - port: { get_resource: pcrf_oam_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+  \r
+  pcrf_oam_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_arbiter_vip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_oam_vol_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_oam_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_oam }\r
+\r
+outputs:\r
+  pcrf_oam_vol_attachment_id:\r
+    description: the pcrf_oam_vol_attachment_id id\r
+    value: { get_resource: pcrf_oam_vol_attachment }\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-pcm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-pcm_v1.0.yaml
new file mode 100644 (file)
index 0000000..a3129bb
--- /dev/null
@@ -0,0 +1,150 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Cluman stack\r
+\r
+parameters:\r
+  pcrf_pcm_server_name:\r
+    type: string\r
+    label: PCRF CM server name\r
+    description: PCRF CM server name\r
+  pcrf_pcm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF CM image name\r
+  pcrf_pcm_flavor_name:\r
+    type: string\r
+    label: PCRF CM flavor name\r
+    description: flavor name of PCRF CM instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_pcm_volume_id:\r
+    type: string\r
+    label: CPS Cluman Cinder Volume\r
+    description: CPS Cluman Cinder Volume\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pcm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pcm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pcm_server_name }\r
+      image: { get_param: pcrf_pcm_image_name }\r
+      flavor: { get_param: pcrf_pcm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pcm_port_0}\r
+        - port: { get_resource: pcrf_pcm_port_1}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pcm_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_pcm_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  volume_attachment:\r
+    type: OS::Cinder::VolumeAttachment\r
+    properties:\r
+      volume_id: { get_param: pcrf_pcm_volume_id }\r
+      mountpoint: /dev/vdd\r
+      instance_uuid: { get_resource: pcrf_server_pcm }\r
+\r
+outputs:\r
+  pcrf_server_pcm_id:\r
+    description: the pcm server id\r
+    value: { get_resource: pcrf_server_pcm }
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-ppd_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-ppd_v1.0.yaml
new file mode 100644 (file)
index 0000000..169522b
--- /dev/null
@@ -0,0 +1,333 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Director stack\r
+\r
+parameters:\r
+  pcrf_ppd_server_name:\r
+    type: string\r
+    label: PCRF PD server name\r
+    description: PCRF PD server name\r
+  pcrf_ppd_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF PD image name\r
+  pcrf_ppd_flavor_name:\r
+    type: string\r
+    label: PCRF PD flavor name\r
+    description: flavor name of PCRF PD instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_internal_vip:\r
+    type: string\r
+    label: CPS Internal LB VIP\r
+    description: CPS Internal LB VIP\r
+  pcrf_oam_net_name:\r
+    type: string\r
+    label: OAM network name\r
+    description: OAM network name\r
+  pcrf_oam_net_ip:\r
+    type: string\r
+    label: OAM network ip\r
+    description: OAM network ip\r
+  pcrf_oam_net_gw:\r
+    type: string\r
+    label: CPS network gateway\r
+    description: CPS network gateway\r
+  pcrf_oam_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_lb_management_vip:\r
+    type: string\r
+    label: CPS OAM LB VIP\r
+    description: CPS OAM LB VIP\r
+  pcrf_gx_net_name:\r
+    type: string\r
+    label: Gx network name\r
+    description: Gx network name\r
+  pcrf_gx_net_ip:\r
+    type: string\r
+    label: Gx network ip\r
+    description: Gx network ip\r
+  pcrf_gx_net_mask:\r
+    type: string\r
+    label: Gx network mask\r
+    description: Gx network mask\r
+  pcrf_sp_net_name:\r
+    type: string\r
+    label: Sp network name\r
+    description: Sp network name\r
+  pcrf_sp_net_ip:\r
+    type: string\r
+    label: Sp network ip\r
+    description: Sp network ip\r
+  pcrf_sp_net_mask:\r
+    type: string\r
+    label: Sp network mask\r
+    description: Sp network mask\r
+  pcrf_sy_net_name:\r
+    type: string\r
+    label: Sy network name\r
+    description: Sy network name\r
+  pcrf_sy_net_ip:\r
+    type: string\r
+    label: Sy network ip\r
+    description: Sy network ip\r
+  pcrf_sy_net_mask:\r
+    type: string\r
+    label: Sy network mask\r
+    description: Sy network mask\r
+  pcrf_rx_net_name:\r
+    type: string\r
+    label: Rx network name\r
+    description: Rx network name\r
+  pcrf_rx_net_ip:\r
+    type: string\r
+    label: Rx network ip\r
+    description: Rx network ip\r
+  pcrf_rx_net_mask:\r
+    type: string\r
+    label: Rx network mask\r
+    description: Rx network mask\r
+  pcrf_sd_net_name:\r
+    type: string\r
+    label: Sd network name\r
+    description: Sd network name\r
+  pcrf_sd_net_ip:\r
+    type: string\r
+    label: Sd network ip\r
+    description: Sd network ip\r
+  pcrf_sd_net_mask:\r
+    type: string\r
+    label: Sd network mask\r
+    description: Sd network mask\r
+  pcrf_sgi_sy_net_name:\r
+    type: string\r
+    label: Sgi Sy network name\r
+    description: Sgi Sy network name\r
+  pcrf_sgi_sy_net_ip:\r
+    type: string\r
+    label: Sgi Sy network ip\r
+    description: Sgi Sy network ip\r
+  pcrf_sgi_sy_net_mask:\r
+    type: string\r
+    label: Sgi Sy network mask\r
+    description: Sgi Sy network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet-gw }\r
+                params:\r
+                  $dev: eth1\r
+                  $ip: { get_param: pcrf_oam_net_ip }\r
+                  $netmask: { get_param: pcrf_oam_net_mask }\r
+                  $gateway: { get_param: pcrf_oam_net_gw }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth2\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth2\r
+                  $ip: { get_param: pcrf_gx_net_ip }\r
+                  $netmask: { get_param: pcrf_gx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth3\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth3\r
+                  $ip: { get_param: pcrf_sp_net_ip }\r
+                  $netmask: { get_param: pcrf_sp_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth4\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth4\r
+                  $ip: { get_param: pcrf_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sy_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth5\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth5\r
+                  $ip: { get_param: pcrf_rx_net_ip }\r
+                  $netmask: { get_param: pcrf_rx_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth6\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth6\r
+                  $ip: { get_param: pcrf_sd_net_ip }\r
+                  $netmask: { get_param: pcrf_sd_net_mask }\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth7\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth7\r
+                  $ip: { get_param: pcrf_sgi_sy_net_ip }\r
+                  $netmask: { get_param: pcrf_sgi_sy_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+          - ifdown eth1 && ifup eth1\r
+          - ifdown eth2 && ifup eth2\r
+          - ifdown eth3 && ifup eth3\r
+          - ifdown eth4 && ifup eth4\r
+          - ifdown eth5 && ifup eth5\r
+          - ifdown eth6 && ifup eth6\r
+          - ifdown eth7 && ifup eth7\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_ppd_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_ppd: \r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_ppd_server_name }\r
+      image: { get_param: pcrf_ppd_image_name }\r
+      flavor: { get_param: pcrf_ppd_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_ppd_port_0}\r
+        - port: { get_resource: pcrf_ppd_port_1}\r
+        - port: { get_resource: pcrf_ppd_port_2}\r
+        - port: { get_resource: pcrf_ppd_port_3}\r
+        - port: { get_resource: pcrf_ppd_port_4}\r
+        - port: { get_resource: pcrf_ppd_port_5}\r
+        - port: { get_resource: pcrf_ppd_port_6}\r
+        - port: { get_resource: pcrf_ppd_port_7}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_ppd_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_internal_vip }\r
+\r
+  pcrf_ppd_port_1:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_oam_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_oam_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+      allowed_address_pairs:\r
+        - ip_address: { get_param: pcrf_lb_management_vip } \r
\r
+  pcrf_ppd_port_2:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_gx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_gx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_3:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sp_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sp_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_4:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_5:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_rx_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_rx_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+  \r
+  pcrf_ppd_port_6:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sd_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sd_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
+  pcrf_ppd_port_7:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_sgi_sy_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_sgi_sy_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
+\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-pps_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..8cb6e15
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Policy Server stack\r
+\r
+parameters:\r
+  pcrf_pps_server_name:\r
+    type: string\r
+    label: PCRF PS server name\r
+    description: PCRF PS server name\r
+  pcrf_pps_image_name:\r
+    type: string\r
+    label: PCRF PS image name\r
+    description: PCRF PS image name\r
+  pcrf_pps_flavor_name:\r
+    type: string\r
+    label: PCRF PS flavor name\r
+    description: flavor name of PCRF PS instance\r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_pps_server_name }\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_pps:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_pps_server_name }\r
+      image: { get_param: pcrf_pps_image_name }\r
+      flavor: { get_param: pcrf_pps_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: pcrf_pps_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+\r
+  pcrf_pps_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]\r
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-psm_v1.0.yaml b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/nested-psm_v1.0.yaml
new file mode 100644 (file)
index 0000000..64c7484
--- /dev/null
@@ -0,0 +1,99 @@
+heat_template_version: 2013-05-23\r
+\r
+description: heat template that creates PCRF Session Manager stack\r
+\r
+parameters:\r
+  pcrf_psm_server_name:\r
+    type: string\r
+    label: PCRF SM server name\r
+    description: PCRF SM server name\r
+  pcrf_psm_image_name:\r
+    type: string\r
+    label: image name\r
+    description: PCRF SM image name\r
+  pcrf_psm_flavor_name:\r
+    type: string\r
+    label: PCRF SM flavor name\r
+    description: flavor name of PCRF SM instance \r
+  availabilityzone_name:\r
+    type: string\r
+    label: availabilityzone name\r
+    description: availabilityzone name\r
+  pcrf_cps_net_name:\r
+    type: string\r
+    label: CPS network name\r
+    description: CPS network name\r
+  pcrf_cps_net_ip:\r
+    type: string\r
+    label: CPS network ip\r
+    description: CPS network ip\r
+  pcrf_cps_net_mask:\r
+    type: string\r
+    label: CPS network mask\r
+    description: CPS network mask\r
+  pcrf_security_group_name:\r
+    type: string\r
+    label: security group name\r
+    description: the name of security group\r
+  pcrf_vnf_id:\r
+    type: string\r
+    label: PCRF VNF Id\r
+    description: PCRF VNF Id\r
+\r
+resources:\r
+  network:\r
+    type: OS::Heat::CloudConfig\r
+    properties:\r
+      cloud_config:\r
+        write_files:\r
+          - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
+            permissions: "0644"\r
+            content:\r
+              str_replace:\r
+                template: { get_file: nimbus-ethernet }\r
+                params:\r
+                  $dev: eth0\r
+                  $ip: { get_param: pcrf_cps_net_ip }\r
+                  $netmask: { get_param: pcrf_cps_net_mask }\r
+        runcmd:\r
+          - ifdown eth0 && ifup eth0\r
+  script_init:\r
+    type: OS::Heat::SoftwareConfig\r
+    properties:\r
+      group: ungrouped\r
+      config:\r
+        str_replace:\r
+          template: { get_file: cloud-nimbus.sh }\r
+          params:\r
+            $vm_name: { get_param: pcrf_psm_server_name }\r
+  pcrf_server_init:\r
+    type: OS::Heat::MultipartMime\r
+    properties:\r
+      parts:\r
+      - config: { get_resource: network}\r
+      - config: { get_resource: script_init}\r
+\r
+  pcrf_server_psm:\r
+    type: OS::Nova::Server\r
+    properties:\r
+      config_drive: "True"\r
+      name: { get_param: pcrf_psm_server_name }\r
+      image: { get_param: pcrf_psm_image_name }\r
+      flavor: { get_param: pcrf_psm_flavor_name }\r
+      availability_zone: { get_param: availabilityzone_name }\r
+      networks:\r
+        - port: { get_resource: psm01_port_0}\r
+      user_data_format: RAW\r
+      user_data:\r
+        get_resource: pcrf_server_init\r
+      metadata:\r
+        vnf_id: {get_param: pcrf_vnf_id}\r
+      #scheduler_hints: {group: { get_resource: servergroup_nimbus }}\r
+  \r
+  psm01_port_0:\r
+    type: OS::Neutron::Port\r
+    properties:\r
+      network: { get_param: pcrf_cps_net_name }\r
+      fixed_ips:\r
+        - ip_address: { get_param: pcrf_cps_net_ip }\r
+      security_groups: [{ get_param: pcrf_security_group_name }]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/vnf-module-artifact.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/artifacts/vnf-module-artifact.json
new file mode 100644 (file)
index 0000000..111bf04
--- /dev/null
@@ -0,0 +1,29 @@
+[
+  {
+    "vfModuleModelName": "VF_RI2_G6_withArtifacts::module-1",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f132",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI2_G6_withArtifacts::module-1.group",
+    "isBase": true,
+    "artifacts": [
+      "Artifact-UUID1",
+      "EnvArtifact-UUID2",
+      "NestedArtifact-UUID3",
+      "NestedArtifact-UUID4",
+      "ScriptArtifact-UUID1",
+      "VolumeArtifact-UUID1",
+      "VolumeEnvArtifact-UUID1"
+    ]
+  },
+  {
+    "vfModuleModelName": "VF_RI2_G91_withArtifacts::module-1",
+    "vfModuleModelInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f169",
+    "vfModuleModelVersion": "1.0",
+    "vfModuleModelUUID": "1e34774e-715e-4fd5-bd08-7b654622f63g.VF_RI2_G9_withArtifacts::module-1.group",
+    "isBase": true,
+    "artifacts": [
+      "HeatArtifactE2E-UUIDTest"
+   
+    ]
+  }
+]
\ No newline at end of file
diff --git a/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/notif-structure.json b/packages/arquillian-unit-tests/src/test/resources/resource-examples/asdc/simpleNotif-V5/notif-structure.json
new file mode 100644 (file)
index 0000000..7ae9ff5
--- /dev/null
@@ -0,0 +1,155 @@
+{
+    "serviceName": "test-service",
+    "serviceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+    "serviceUUID": "1e34774e-715e-4fd5-bd09-7b654622f35i",
+    "serviceVersion": "5.0",
+    "serviceArtifacts": 
+    [
+    ],
+
+    "resources": 
+    [
+        {
+            "resourceInstanceName": "resource-1",
+            "resourceInvariantUUID": "585822c7-4027-4f84-ba50-e9248606f134",
+            "resourceName": "resourceName-1",
+            "resourceType": "VF",
+            "resourceUUID": "585822c7-4027-4f84-ba50-e9248606f136",
+            "resourceVersion": "3.0",
+            "artifacts": 
+            [
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Meta data for VFModule",
+                    "artifactName": "vnf-module-artifact.json",
+                    
+                    "artifactType": "VF_MODULES_METADATA",
+                    "artifactURL": "vnf-module-artifact.json",
+                    "artifactUUID": "VfArtifact-UUID2",
+                    "artifactVersion": "1.0"
+
+                },
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactTimeout": 100,
+                    "artifactType": "HEAT",
+                    "artifactURL": "hot-nimbus-oam_v1.0.yaml",
+                    "artifactUUID": "Artifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "EnvArtifact-UUID2",
+                    "relatedArtifact": 
+                    [
+                        "NestedArtifact-UUID3",
+                        "ScriptArtifact-UUID1"
+                    ]
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nimbus Heat ENV OAM",
+                    "artifactName": "hot-nimbus-oam_v1.0.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam_v1.0.env",
+                    "artifactUUID": "EnvArtifact-UUID2",
+                    "artifactVersion": "1.0"
+                  
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nested OAM",
+                    "artifactName": "nested-oam_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_NESTED",
+                    "artifactURL": "nested-oam_v1.0.yaml",
+                    "artifactUUID": "NestedArtifact-UUID3",
+                    "artifactVersion": "1.0"
+          
+                },
+                
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Nested PSM",
+                    "artifactName": "nested-psm_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_NESTED",
+                    "artifactURL": "nested-psm_v1.0.yaml",
+                    "artifactUUID": "NestedArtifact-UUID4",
+                    "artifactVersion": "1.0"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Script for Nimbus",
+                    "artifactName": "cloud-nimbus.sh",
+                    
+                    "artifactType": "HEAT_ARTIFACT",
+                    "artifactURL": "cloud-nimbus.sh",
+                    "artifactUUID": "ScriptNimbusArtifact-UUID1",
+                    "artifactVersion": "1.0"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Script for OAM",
+                    "artifactName": "mount_iso_script.sh",
+                    
+                    "artifactType": "HEAT_ARTIFACT",
+                    "artifactURL": "mount_iso_script.sh",
+                    "artifactUUID": "ScriptArtifact-UUID1",
+                    "artifactVersion": "1.0"
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Heat Vol for OAM",
+                    "artifactName": "hot-nimbus-oam-volumes_v1.0.yaml",
+                    "artifactTimeout": 10,
+                    "artifactType": "HEAT_VOL",
+                    "artifactURL": "hot-nimbus-oam-volumes_v1.0.yaml",
+                    "artifactUUID": "VolumeArtifact-UUID1",
+                    "artifactVersion": "1.0",
+                    "generatedArtifact": "VolumeEnvArtifact-UUID1",
+                    "relatedArtifact": 
+                    [
+                        "NestedArtifact-UUID4"
+                    ]
+          
+                },
+
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Heat Env Vol for OAM",
+                    "artifactName": "hot-nimbus-oam-volumes_v1.0.env",
+                    
+                    "artifactType": "HEAT_ENV",
+                    "artifactURL": "hot-nimbus-oam-volumes_v1.0.env",
+                    "artifactUUID": "VolumeEnvArtifact-UUID1",
+                    "artifactVersion": "1.0"
+          
+                },
+                {
+                    "artifactChecksum": "CheckSum",
+                    "artifactDescription": "Meta data for VFModule",
+                    "artifactName": "att_nimbus_vsaegw_ht_base_v13_0728v1.yaml",
+                    "artifactTimeout": 100,
+                    "artifactType": "HEAT",
+                    "artifactURL": "att_nimbus_vsaegw_ht_base_v13_0728v1.yaml",
+                    "artifactUUID": "HeatArtifactE2E-UUIDTest",
+                    "artifactVersion": "1.0"
+
+                }
+            ]
+        }
+    ],
+
+    "serviceDescription": "test service for unit testing",
+    "distributionID": "35120a87-1f82-4276-9735-f6de5a244d66"
+}
\ No newline at end of file
diff --git a/packages/deliveries/pom.xml b/packages/deliveries/pom.xml
new file mode 100644 (file)
index 0000000..5f20b18
--- /dev/null
@@ -0,0 +1,78 @@
+<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.openecomp.mso</groupId>
+               <artifactId>packages</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.openecomp.mso.packages</groupId>
+       <artifactId>mso-deliveries</artifactId>
+       <packaging>pom</packaging>
+
+       <name>MsoDeliveries</name>
+
+       <description>This project is responsible of the final packages</description>
+       <organization>
+               <name>OPENECOMP - MSO</name>
+               <url>http://www.openecomp.org/</url>
+       </organization>
+
+
+       <build>
+
+               <plugins>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-assembly-plugin</artifactId>
+                               <version>2.6</version>
+                               <executions>
+                               
+                                       <!-- MSO DB PACKS -->
+                    <execution>
+                        <configuration>
+
+                            <descriptors>
+                                <descriptor>src/main/assembly/mso-config/mso-db.xml</descriptor>
+                            </descriptors>
+                            <finalName>mso-config/mso-db-${project.version}</finalName>
+                            <appendAssemblyId>false</appendAssemblyId>
+                            <attach>false</attach>
+                        </configuration>
+
+                        <id>db-packs-mso</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+
+                    </execution>
+                                       <!-- DEVELOPER PACKS -->
+                                       <execution>
+                                               <configuration>
+
+                                                       <descriptors>
+                                                               <descriptor>src/main/assembly/war-pack/mso-wars.xml</descriptor>
+                                                       </descriptors>
+                                                       <finalName>war-pack/mso-${project.version}</finalName>
+                                                       <appendAssemblyId>false</appendAssemblyId>
+                                                       <attach>false</attach>
+                                               </configuration>
+
+                                               <id>war-pack-mso</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>single</goal>
+                                               </goals>
+                                       </execution>
+                                       
+
+                               </executions>
+                       </plugin>
+
+               </plugins>
+       </build>
+
+</project>
\ No newline at end of file
diff --git a/packages/deliveries/src/main/assembly/mso-config/mso-db.xml b/packages/deliveries/src/main/assembly/mso-config/mso-db.xml
new file mode 100644 (file)
index 0000000..6e7bcf7
--- /dev/null
@@ -0,0 +1,44 @@
+<!--
+  ============LICENSE_START=======================================================
+  OpenECOMP 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=========================================================
+  -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+       <id>mso-db</id>
+
+       <formats>
+               <format>zip</format>
+       </formats>
+       <includeBaseDirectory>false</includeBaseDirectory>
+
+       <fileSets>
+
+              <!-- include MSO Extra files (scripts, db scripts) -->
+        <fileSet>
+            <includes>
+                <include>**/</include>
+            </includes>
+            <directory>../../packages/root-pack-extras/config-resources/mariadb/db-sql-scripts</directory>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+
+       </fileSets>
+</assembly>
diff --git a/packages/deliveries/src/main/assembly/war-pack/mso-wars.xml b/packages/deliveries/src/main/assembly/war-pack/mso-wars.xml
new file mode 100644 (file)
index 0000000..d412713
--- /dev/null
@@ -0,0 +1,114 @@
+<!--
+  ============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=========================================================
+  -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+       <id>mso-dev</id>
+
+       <formats>
+               <format>tar.gz</format>
+       </formats>
+       <includeBaseDirectory>false</includeBaseDirectory>
+
+       
+       <fileSets>
+
+               <!-- include config files -->
+
+               <fileSet>
+                       <includes>
+                               <include>mso-network-adapter*.war</include>
+                       </includes>
+                       <directory>../../adapters/mso-network-adapter/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+               <fileSet>
+                       <includes>
+                               <include>mso-sdnc-adapter*.war</include>
+                       </includes>
+                       <directory>../../adapters/mso-sdnc-adapter/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+               <fileSet>
+                       <includes>
+                               <include>mso-tenant-adapter*.war</include>
+                       </includes>
+                       <directory>../../adapters/mso-tenant-adapter/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+               <fileSet>
+                       <includes>
+                               <include>mso-vnf-adapter*.war</include>
+                       </includes>
+                       <directory>../../adapters/mso-vnf-adapter/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+
+               <fileSet>
+                       <includes>
+                               <include>mso-api-handler*.war</include>
+                       </includes>
+                       <directory>../../mso-api-handlers/mso-api-handler-infra/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+               <fileSet>
+                       <includes>
+                               <include>mso-appc-adapter-*.war</include>
+                       </includes>
+                       <directory>../../adapters/mso-appc-adapter/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+
+               <fileSet>
+                       <includes>
+                               <include>mso-requests-db-adapter*.war</include>
+                       </includes>
+                       <directory>../../adapters/mso-requests-db-adapter/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+               
+               <fileSet>
+                       <includes>
+                               <include>asdc-controller*.war</include>
+                       </includes>
+                       <directory>../../asdc-controller/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+               
+               <fileSet>
+                       <includes>
+                               <include>MSOGammaBPMN*.war</include>
+                       </includes>
+                       <directory>../../bpmn/MSOGammaBPMN/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+               <fileSet>
+                       <includes>
+                               <include>MSOCockpit*.war</include>
+                       </includes>
+                       <directory>../../bpmn/MSOCockpit/target/</directory>
+                       <outputDirectory>artifacts</outputDirectory>
+               </fileSet>
+       
+       </fileSets>
+       
+</assembly>
diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml
new file mode 100644 (file)
index 0000000..5dfada9
--- /dev/null
@@ -0,0 +1,148 @@
+<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.openecomp.mso</groupId>
+               <artifactId>packages</artifactId>
+               <version>0.0.4-SNAPSHOT</version>
+       </parent>
+
+       <packaging>pom</packaging>
+       <groupId>org.att.ecomp</groupId>
+       <artifactId>docker</artifactId>
+
+       <name>MSO Docker Deliveries</name>
+       <description>ECOMP MSO Docker Deliveries</description>
+
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+       </properties>
+
+       <build>
+               <finalName>${project.artifactId}-${project.version}</finalName>
+               <plugins>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>0.16.5</version>
+
+                               <configuration>
+                                       <verbose>true</verbose>
+                                       <apiVersion>1.23</apiVersion>
+                                       
+                                       <images>
+                                               <image>
+                                                       <name>ecomp/jacoco:1.0</name>
+                                                       <alias>jacoco</alias>
+                                                       <build>
+                                                               <cleanup>try</cleanup>
+                                                               <dockerFileDir>docker-files</dockerFileDir>
+                                                               <dockerFile>docker-files/Dockerfile.jacoco</dockerFile>
+                                                       
+                                                       </build>
+                                               </image>
+                                               <image>
+                                                       <name>ecomp/ubuntu-update:1.0</name>
+                                                       <alias>ubuntu-update</alias>
+                                                       <build>
+
+                                                               <cleanup>try</cleanup>
+                                                               <dockerFileDir>docker-files</dockerFileDir>
+                                                               <dockerFile>docker-files/Dockerfile.ubuntu-16.04-update</dockerFile>
+                                                       
+                                                       </build>
+                                               </image>
+                                               <image>
+                                                       <name>ecomp/wildfly:1.0</name>
+                                                       <alias>wildfly</alias>
+                                                       <build>
+
+                                                               <cleanup>try</cleanup>
+                                                               <dockerFileDir>docker-files</dockerFileDir>
+                                                               <dockerFile>docker-files/Dockerfile.wildfly-10</dockerFile>
+                                                       
+                                                       </build>
+                                               </image>
+                                               <image>
+                                                       <name>ecomp/mso-arquillian:%l</name>
+                                                       <alias>mso-arquillian</alias>
+                                                       <build>
+
+                                                               <cleanup>try</cleanup>
+                                                               <dockerFileDir>docker-files</dockerFileDir>
+                                                               <dockerFile>docker-files/Dockerfile.mso-arquillian</dockerFile>
+                                                       
+                                                       </build>
+                                               </image>
+                                               <image>
+                                                       <name>ecomp/mso:%l</name>
+                                                       <alias>mso</alias>
+                                                       <build>
+
+                                                               <cleanup>try</cleanup>
+                                                               <dockerFileDir>docker-files</dockerFileDir>
+                                                               <dockerFile>docker-files/Dockerfile.mso-chef-final</dockerFile>
+                                                               <assembly>
+                                                                       <basedir>/</basedir>
+
+                                                                       <user>jboss:jboss:jboss</user>
+                                                                       <basedir>/opt/jboss/wildfly/standalone/deployments</basedir>
+                                                                       <descriptor>../../../../deliveries/src/main/assembly/war-pack/mso-wars.xml</descriptor>
+                                                               </assembly>
+                                                       </build>
+                                               </image>
+
+
+                                       </images>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <id>clean-images</id>
+                                               <phase>pre-clean</phase>
+                                               <goals>
+                                                       <goal>remove</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <removeAll>true</removeAll>
+                                                       <image>ecomp/mso-arquillian:%l,ecomp/mso:%l</image>
+                                               </configuration>
+                                       </execution>
+                               
+                                       <execution>
+                                               <id>generate-images</id>
+                                               <phase>generate-sources</phase>
+                                               <goals>
+                                                       <goal>build</goal>
+                                               </goals>
+                                       </execution>
+
+                                       <execution>
+                                               <id>push-images</id>
+                                               <phase>deploy</phase>
+                                               <goals>
+                                                       <goal>build</goal>
+                                                       <goal>push</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <image>ecomp/mso-arquillian:%l,ecomp/mso:%l,ecomp/jacoco:1.0</image>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-deploy-plugin</artifactId>
+                               <version>2.8</version>
+                               <configuration>
+                                       <skip>true</skip>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+
+      </project>
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.jacoco b/packages/docker/src/main/docker/docker-files/Dockerfile.jacoco
new file mode 100644 (file)
index 0000000..e3c243d
--- /dev/null
@@ -0,0 +1,33 @@
+### Set the base image to Fedora
+FROM ubuntu:14.04
+
+### File Author / Maintainer
+MAINTAINER "Ecomp Opensource Team"
+LABEL Description="This image is used to get jacoco result from a jboss image" Version="1.0"
+
+ARG http_proxy
+ARG https_proxy
+ARG chef_repo_branch_name
+ARG chef_repo_address
+ARG chef_repo_git_name
+ARG chef_repo_git_username
+ENV HTTP_PROXY=$http_proxy
+ENV HTTPS_PROXY=$https_proxy
+ENV http_proxy=$HTTP_PROXY
+ENV https_proxy=$HTTPS_PROXY
+RUN echo "Acquire::http::Proxy \"$http_proxy\";" >> /etc/apt/apt.conf
+
+RUN apt-get update && apt-get install -y openssh-server
+RUN mkdir /var/run/sshd
+RUN echo 'root:screencast' | chpasswd
+RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
+
+# SSH login fix. Otherwise user is kicked off after login
+RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
+
+ENV NOTVISIBLE "in users profile"
+RUN echo "export VISIBLE=now" >> /etc/profile
+
+VOLUME /shared
+
+CMD ["/usr/sbin/sshd", "-D"]
\ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.mso-arquillian b/packages/docker/src/main/docker/docker-files/Dockerfile.mso-arquillian
new file mode 100644 (file)
index 0000000..11b7cf7
--- /dev/null
@@ -0,0 +1,99 @@
+FROM ecomp/wildfly:1.0
+
+
+### File Author / Maintainer
+MAINTAINER "Ecomp Opensource Team"
+LABEL Description="This image contains Ecomp Opensource MSO base for arquillian" Version="1.0"
+
+ARG chef_repo_branch_name
+ARG chef_repo_address
+ARG chef_repo_git_name
+ARG chef_repo_git_username
+ENV BRANCH_NAME=$chef_repo_branch_name
+ENV REPO_USERNAME=$chef_repo_git_username
+ENV REPO_ADDRESS=$chef_repo_address
+ENV CHEF_REPO_NAME=$chef_repo_git_name
+
+### Downloading dependencies
+
+USER root
+RUN apt-get install -y curl && curl -LO  https://packages.chef.io/stable/ubuntu/12.04/chefdk_0.17.17-1_amd64.deb && curl -LO http://central.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/1.5.4/mariadb-java-client-1.5.4.jar && curl -LO http://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.7.7.201606060606/jacoco-0.7.7.201606060606.zip && apt-get remove --purge -y curl && apt-get autoremove -y
+RUN apt-get install -y unzip && unzip jacoco-0.7.7.201606060606.zip -d /tmp/jacoco && apt-get remove --purge -y unzip && apt-get autoremove -y
+RUN chown -R jboss:jboss /tmp/jacoco
+### Install Chef
+RUN dpkg -i chefdk_0.17.17-1_amd64.deb 
+
+COPY scripts/init-chef.sh /opt/mso/scripts/init-chef.sh
+COPY scripts/start-jboss-server.sh /opt/mso/scripts/start-jboss-server.sh
+
+RUN chown jboss:jboss /opt/mso/scripts/*
+RUN chmod u+rx /opt/mso/scripts/*
+
+RUN mkdir /etc/chef
+RUN chown jboss:jboss /etc/chef
+RUN chmod u+xrw /etc/chef
+
+RUN mkdir -p /etc/mso
+RUN chown -R jboss:jboss /etc/mso
+RUN chmod u+xrw /etc/mso
+
+# Setup shared folder
+RUN mkdir /shared
+RUN chown jboss:jboss /shared
+
+# Setup chef folders
+RUN mkdir /var/berks-cookbooks
+RUN chown jboss:jboss /var/berks-cookbooks
+COPY chef-configs/solo.rb /tmp/git/solo.rb
+RUN chown -R jboss:jboss /tmp/git/
+
+COPY id_rsa /home/jboss/user
+RUN chmod 600 /home/jboss/user
+RUN chown -R jboss:jboss /home/jboss
+
+# Start Chef config
+RUN mkdir -p /var/nodes
+RUN chown jboss:jboss /var/nodes
+
+RUN mkdir -p /home/jboss/.chef/nodes
+RUN mkdir /home/jboss/.ssh
+
+
+RUN apt-get install -y git && sed -i "s@jboss:/bin/false@jboss:/bin/bash@g" /etc/passwd && su jboss -c "/opt/mso/scripts/init-chef.sh" && sed -i "s@jboss:/bin/bash@jboss:/bin/false@g" /etc/passwd && apt-get remove --purge -y git  && apt-get autoremove -y
+RUN rm -rf /home/jboss/.ssh
+RUN rm /home/jboss/user
+RUN echo "" > /shared/mso-docker.json
+RUN echo "" > /shared/jacoco-it.exec
+RUN ls -latr /
+RUN ls -latr /shared
+RUN chown jboss:jboss /shared/jacoco-it.exec
+RUN mv /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker.json /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker-init.json
+RUN ln -s /shared/mso-docker.json /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker.json
+RUN rm -rf /tmp/git
+
+## Create the log folder for MSO
+RUN mkdir -p /var/log/ecomp/MSO/
+RUN chown jboss:jboss /var/log/ecomp/MSO
+
+### Configure Jboss WildFly
+RUN mkdir -p $JBOSS_HOME/modules/mariadb/main
+RUN cp mariadb-java-client-1.5.4.jar $JBOSS_HOME/modules/mariadb/main
+COPY jboss-configs/modules/mariadb/main/module.xml $JBOSS_HOME/modules/mariadb/main
+COPY jboss-configs/configuration/standalone-full-ha.xml $JBOSS_HOME/standalone/configuration/standalone-full-ha-mso.xml
+COPY jboss-configs/configuration/mgmt-users.properties $JBOSS_HOME/standalone/configuration/mgmt-users.properties
+COPY jboss-configs/configuration/mgmt-groups.properties $JBOSS_HOME/standalone/configuration/mgmt-groups.properties
+COPY jboss-configs/configuration/application-users.properties $JBOSS_HOME/standalone/configuration/application-users.properties
+COPY jboss-configs/configuration/application-roles.properties $JBOSS_HOME/standalone/configuration/application-roles.properties
+
+RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -Xms64m -Xmx4g -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=1g -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0 -Dmso.db=MARIADB -Dmso.config.path=/etc/mso/config.d/ -javaagent:/tmp/jacoco/lib/jacocoagent.jar=destfile=/shared/jacoco-it.exec,dumponexit=true,append=false,includes=com.att.*:org.openecomp.*\"" >> $JBOSS_HOME/bin/standalone.conf
+RUN echo "LAUNCH_JBOSS_IN_BACKGROUND=true" >> $JBOSS_HOME/bin/standalone.conf
+
+### Open Ports
+EXPOSE 8080 9990
+
+VOLUME /shared
+
+### Start EAP
+USER root
+CMD ["/opt/mso/scripts/start-jboss-server.sh"]
+
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.mso-build b/packages/docker/src/main/docker/docker-files/Dockerfile.mso-build
new file mode 100644 (file)
index 0000000..3a26a7f
--- /dev/null
@@ -0,0 +1,63 @@
+FROM ubuntu:16.04
+
+### File Author / Maintainer
+MAINTAINER "Ecomp Opensource Team"
+LABEL Description="This image builds Ecomp Opensource MSO " Version="1.0"
+
+
+ARG http_proxy
+ARG https_proxy
+
+ARG mso_git_repository
+ARG mso_git_branch
+
+ARG mvn_central_user
+ARG mvn_central_pwd
+
+ENV HTTP_PROXY=$http_proxy
+ENV HTTPS_PROXY=$https_proxy
+ENV http_proxy=$HTTP_PROXY
+ENV https_proxy=$HTTPS_PROXY
+
+
+ENV mso_git_repository=$mso_git_repository
+ENV mso_git_branch=$mso_git_branch
+
+
+ENV mvn_central_user=$mvn_central_user
+ENV mvn_central_pwd=$mvn_central_pwd
+
+ENV JBOSS_HOME=/opt/jboss
+
+USER root
+
+COPY scripts/init-chef.sh /opt/mso/scripts/init-chef.sh
+RUN chmod 755 /opt/mso/scripts/init-chef.sh
+
+COPY scripts/build-and-start.sh /opt/mso/scripts/build-and-start.sh
+RUN chmod 755 /opt/mso/scripts/build-and-start.sh
+
+# should be copied at final destination once jboss user is created
+COPY id_rsa /tmp/id_rsa
+COPY settings.xml /tmp/settings.xml
+
+# should be copied at final destination once jboss is installed
+COPY jboss-configs/module.xml /tmp/jboss-configs/module.xml
+COPY jboss-configs/standalone-full-ha.xml /tmp/jboss-configs/standalone-full-ha.xml
+COPY jboss-configs/modules/mariadb/main/module.xml /tmp/jboss-configs/modules/mariadb/main
+COPY jboss-configs/configuration/standalone-full-ha.xml /tmp/jboss-configs/standalone/configuration/standalone-full-ha-mso.xml
+COPY jboss-configs/configuration/mgmt-users.properties /tmp/jboss-configs/standalone/configuration/mgmt-users.properties
+COPY jboss-configs/configuration/mgmt-groups.properties /tmp/jboss-configs/standalone/configuration/mgmt-groups.properties
+COPY jboss-configs/configuration/application-users.properties /tmp/jboss-configs/standalone/configuration/application-users.properties
+COPY jboss-configs/configuration/application-roles.properties /tmp/jboss-configs/standalone/configuration/application-roles.properties
+
+
+### Open Ports
+EXPOSE 8080
+
+### Start EAP
+VOLUME /shared
+
+
+CMD ["/opt/mso/scripts/build-and-start.sh"]
+
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.mso-chef-final b/packages/docker/src/main/docker/docker-files/Dockerfile.mso-chef-final
new file mode 100644 (file)
index 0000000..b5afdcd
--- /dev/null
@@ -0,0 +1,102 @@
+FROM ecomp/wildfly:1.0
+
+
+### File Author / Maintainer
+MAINTAINER "Ecomp Opensource Team"
+LABEL Description="This image contains Ecomp Opensource MSO " Version="1.0"
+
+ARG http_proxy
+ARG https_proxy
+ARG chef_repo_branch_name
+ARG chef_repo_address
+ARG chef_repo_git_name
+ARG chef_repo_git_username
+ENV BRANCH_NAME=$chef_repo_branch_name
+ENV REPO_USERNAME=$chef_repo_git_username
+ENV REPO_ADDRESS=$chef_repo_address
+ENV CHEF_REPO_NAME=$chef_repo_git_name
+ENV HTTP_PROXY=$http_proxy
+ENV HTTPS_PROXY=$https_proxy
+ENV http_proxy=$HTTP_PROXY
+ENV https_proxy=$HTTPS_PROXY
+
+### Downloading dependencies
+
+USER root
+RUN apt-get install -y curl && curl -LO  https://packages.chef.io/stable/ubuntu/12.04/chefdk_0.17.17-1_amd64.deb && curl -LO http://central.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/1.5.4/mariadb-java-client-1.5.4.jar && apt-get remove --purge -y curl && apt-get autoremove -y
+
+### Install Chef
+RUN dpkg -i chefdk_0.17.17-1_amd64.deb 
+
+COPY scripts/init-chef.sh /opt/mso/scripts/init-chef.sh
+COPY scripts/start-jboss-server.sh /opt/mso/scripts/start-jboss-server.sh
+
+RUN chown jboss:jboss /opt/mso/scripts/*
+RUN chmod u+rx /opt/mso/scripts/*
+
+RUN mkdir /etc/chef
+RUN chown jboss:jboss /etc/chef
+RUN chmod u+xrw /etc/chef
+
+RUN mkdir -p /etc/mso
+RUN chown -R jboss:jboss /etc/mso
+RUN chmod u+xrw /etc/mso
+
+# Setup shared folder
+RUN mkdir /shared
+RUN chown jboss:jboss /shared
+
+# Setup chef folders
+RUN mkdir /var/berks-cookbooks
+RUN chown jboss:jboss /var/berks-cookbooks
+COPY chef-configs/solo.rb /tmp/git/solo.rb
+RUN chown -R jboss:jboss /tmp/git/
+
+COPY id_rsa /home/jboss/user
+RUN chmod 600 /home/jboss/user
+RUN chown -R jboss:jboss /home/jboss
+
+# Start Chef config
+RUN mkdir -p /var/nodes
+RUN chown jboss:jboss /var/nodes
+
+RUN mkdir -p /home/jboss/.chef/nodes
+RUN mkdir /home/jboss/.ssh
+
+
+RUN apt-get install -y git && sed -i "s@jboss:/bin/false@jboss:/bin/bash@g" /etc/passwd && su jboss -c "/opt/mso/scripts/init-chef.sh" && sed -i "s@jboss:/bin/bash@jboss:/bin/false@g" /etc/passwd && apt-get remove --purge -y git  && apt-get autoremove -y
+RUN rm -rf /home/jboss/.ssh
+RUN rm /home/jboss/user
+RUN echo "" > /shared/mso-docker.json
+RUN mv /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker.json /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker-init.json
+RUN ln -s /shared/mso-docker.json /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker.json
+RUN rm -rf /tmp/git
+
+## Create the log folder for MSO
+RUN mkdir -p /var/log/ecomp/MSO/
+RUN chown jboss:jboss /var/log/ecomp/MSO
+
+### Configure Jboss WildFly
+RUN mkdir -p $JBOSS_HOME/modules/mariadb/main
+RUN cp mariadb-java-client-1.5.4.jar $JBOSS_HOME/modules/mariadb/main
+COPY jboss-configs/modules/mariadb/main/module.xml $JBOSS_HOME/modules/mariadb/main
+COPY jboss-configs/configuration/standalone-full-ha.xml $JBOSS_HOME/standalone/configuration/standalone-full-ha-mso.xml
+COPY jboss-configs/configuration/mgmt-users.properties $JBOSS_HOME/standalone/configuration/mgmt-users.properties
+COPY jboss-configs/configuration/mgmt-groups.properties $JBOSS_HOME/standalone/configuration/mgmt-groups.properties
+COPY jboss-configs/configuration/application-users.properties $JBOSS_HOME/standalone/configuration/application-users.properties
+COPY jboss-configs/configuration/application-roles.properties $JBOSS_HOME/standalone/configuration/application-roles.properties
+
+RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -Xms64m -Xmx4g -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=1g -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0 -Dmso.db=MARIADB -Dmso.config.path=/etc/mso/config.d/\"" >> $JBOSS_HOME/bin/standalone.conf
+RUN echo "LAUNCH_JBOSS_IN_BACKGROUND=true" >> $JBOSS_HOME/bin/standalone.conf
+
+COPY ./maven/artifacts/* $JBOSS_HOME/standalone/deployments/
+
+### Open Ports
+EXPOSE 8080
+
+VOLUME /shared
+
+### Start EAP
+USER root
+CMD ["/opt/mso/scripts/start-jboss-server.sh"]
+
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.ubuntu-16.04-update b/packages/docker/src/main/docker/docker-files/Dockerfile.ubuntu-16.04-update
new file mode 100644 (file)
index 0000000..08987b4
--- /dev/null
@@ -0,0 +1,22 @@
+FROM ubuntu:16.04
+
+### File Author / Maintainer
+MAINTAINER "Ecomp Opensource Team"
+LABEL Description="This image contains an updated version of ubuntu 16.04" Version="1.0"
+
+ARG http_proxy
+ARG https_proxy
+ARG chef_repo_branch_name
+ARG chef_repo_address
+ARG chef_repo_git_name
+ARG chef_repo_git_username
+ENV HTTP_PROXY=$http_proxy
+ENV HTTPS_PROXY=$https_proxy
+ENV http_proxy=$HTTP_PROXY
+ENV https_proxy=$HTTPS_PROXY
+
+### update first the image to fix potential security issues 
+RUN apt-get update
+RUN apt-get -y dist-upgrade
+
+
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.wildfly-10 b/packages/docker/src/main/docker/docker-files/Dockerfile.wildfly-10
new file mode 100644 (file)
index 0000000..729bf5e
--- /dev/null
@@ -0,0 +1,33 @@
+FROM ecomp/ubuntu-update:1.0
+
+### File Author / Maintainer
+MAINTAINER "Ecomp Opensource Team"
+LABEL Description="This image contains Ecomp Opensource MSO " Version="1.0"
+
+ARG http_proxy
+ARG https_proxy
+ARG chef_repo_branch_name
+ARG chef_repo_address
+ARG chef_repo_git_name
+ARG chef_repo_git_username
+ENV HTTP_PROXY=$http_proxy
+ENV HTTPS_PROXY=$https_proxy
+ENV http_proxy=$HTTP_PROXY
+ENV https_proxy=$HTTPS_PROXY
+
+### Install OpenJDK
+RUN apt-get -y install openjdk-8-jre-headless
+
+
+
+### Install Wildfly
+ENV JBOSS_HOME=/opt/jboss
+
+RUN WILDFLY=wildfly-10.1.0.Final.tar.gz; apt-get -y install curl; curl -LO http://download.jboss.org/wildfly/10.1.0.Final/$WILDFLY ; tar xvfz $WILDFLY -C /opt/; mv /opt/${WILDFLY%.tar.gz} $JBOSS_HOME; rm $WILDFLY; apt-get remove -y --purge curl; apt-get autoremove -y
+RUN adduser --system --group jboss
+RUN chown -R jboss $JBOSS_HOME
+RUN $JBOSS_HOME/bin/add-user.sh admin Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U --silent
+
+USER jboss
+CMD ["/opt/jboss/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
+
diff --git a/packages/docker/src/main/docker/docker-files/chef-configs/solo.rb b/packages/docker/src/main/docker/docker-files/chef-configs/solo.rb
new file mode 100644 (file)
index 0000000..5e82475
--- /dev/null
@@ -0,0 +1,9 @@
+current_dir = File.dirname(__FILE__)
+log_level :info
+log_location STDOUT
+node_name "mso"
+syntax_check_cache_path "#{current_dir}/syntaxcache"
+cookbook_path ["/var/berks-cookbooks"]
+environment_path "/var/berks-cookbooks/CHEF_REPO_NAME_TO_REPLACE/environments"
+environment "mso-docker"
+
diff --git a/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/application-roles.properties b/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/application-roles.properties
new file mode 100644 (file)
index 0000000..de9b0aa
--- /dev/null
@@ -0,0 +1,32 @@
+#
+# Properties declaration of users roles for the realm 'ApplicationRealm' which is the default realm
+# for application services on a new installation.
+#
+# This includes the following protocols: remote ejb, remote jndi, web, remote jms
+#
+# Users can be added to this properties file at any time, updates after the server has started
+# will be automatically detected.
+#
+# The format of this file is as follows: -
+# username=role1,role2,role3
+#
+# A utility script is provided which can be executed from the bin folder to add the users: -
+# - Linux
+#  bin/add-user.sh
+#
+# - Windows
+#  bin\add-user.bat
+#
+# The following illustrates how an admin user could be defined.
+#
+#admin=PowerUser,BillingAdmin,
+#guest=guest
+CSIClient=CSI-Client
+CCDClient=CCD-Client
+GUIClient=GUI-Client
+BPMNClient=BPMN-Client
+InfraPortalClient=InfraPortal-Client
+MSOClient=MSO-Client
+sitecontrol=SiteControl-Client
+MSO=AAIEmul-Client
+BPELClient=BPEL-Client
\ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/application-users.properties b/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/application-users.properties
new file mode 100644 (file)
index 0000000..a04d222
--- /dev/null
@@ -0,0 +1,34 @@
+#
+# Properties declaration of users for the realm 'ApplicationRealm' which is the default realm
+# for application services on a new installation.
+#
+# This includes the following protocols: remote ejb, remote jndi, web, remote jms
+#
+# Users can be added to this properties file at any time, updates after the server has started
+# will be automatically detected.
+#
+# The format of this realm is as follows: -
+# username=HEX( MD5( username ':' realm ':' password))
+#
+# A utility script is provided which can be executed from the bin folder to add the users: -
+# - Linux
+#  bin/add-user.sh
+#
+# - Windows
+#  bin\add-user.bat
+#
+#$REALM_NAME=ApplicationRealm$ This line is used by the add-user utility to identify the realm name already used in this file.
+#
+# The following illustrates how an admin user could be defined, this
+# is for illustration only and does not correspond to a usable password.
+#
+#admin=2a0923285184943425d1f53ddd58ec7a
+CSIClient=0024f53a4ec012c22d9575a3710ed362
+CCDClient=c5e97286d4251605d8ef72f727ac1da6
+GUIClient=583075cf28c7c69c3a8b08356830b856
+BPMNClient=42b98ca2e0cc976d91a26c1495ecd529
+InfraPortalClient=e5077b432685a94babe332893337f6fc
+MSOClient=72bc85031ae67afe67014c7663ae1033
+sitecontrol=9a3a360d86758f69ec9508725c017335
+MSO=a05cb60a04f41f750ce1fc60a2633534
+BPELClient=f2b4ce8ae1964050c0ad7e69bd88fd62
\ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/mgmt-groups.properties b/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/mgmt-groups.properties
new file mode 100644 (file)
index 0000000..44742a8
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# Properties declaration of users groups for the realm 'ManagementRealm'.
+#
+# This is used for domain management, users groups membership information is used to assign the user
+# specific management roles.
+#
+# Users can be added to this properties file at any time, updates after the server has started
+# will be automatically detected.
+#
+# The format of this file is as follows: -
+# username=role1,role2,role3
+#
+# A utility script is provided which can be executed from the bin folder to add the users: -
+# - Linux
+#  bin/add-user.sh
+#
+# - Windows
+#  bin\add-user.bat
+#
+# The following illustrates how an admin user could be defined.
+#
+#admin=PowerUser,BillingAdmin,
\ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/mgmt-users.properties b/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/mgmt-users.properties
new file mode 100644 (file)
index 0000000..1576e76
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# Properties declaration of users for the realm 'ManagementRealm' which is the default realm
+# for new installations. Further authentication mechanism can be configured
+# as part of the <management /> in standalone.xml.
+#
+# Users can be added to this properties file at any time, updates after the server has started
+# will be automatically detected.
+#
+# By default the properties realm expects the entries to be in the format: -
+# username=HEX( MD5( username ':' realm ':' password))
+#
+# A utility script is provided which can be executed from the bin folder to add the users: -
+# - Linux
+#  bin/add-user.sh
+#
+# - Windows
+#  bin\add-user.bat
+# On start-up the server will also automatically add a user $local - this user is specifically
+# for local tools running against this AS installation.
+#
+# The following illustrates how an admin user could be defined, this
+# is for illustration only and does not correspond to a usable password.
+#
+admin=281905e1b4420050a7f07eecba66ee68
+#
+#$REALM_NAME=ManagementRealm$ This line is used by the add-user utility to identify the realm name already used in this file.
+#
diff --git a/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/standalone-full-ha.xml b/packages/docker/src/main/docker/docker-files/jboss-configs/configuration/standalone-full-ha.xml
new file mode 100644 (file)
index 0000000..cface7f
--- /dev/null
@@ -0,0 +1,609 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<server xmlns="urn:jboss:domain:4.2">
+
+    <extensions>
+        <extension module="org.jboss.as.clustering.infinispan"/>
+        <extension module="org.jboss.as.clustering.jgroups"/>
+        <extension module="org.jboss.as.connector"/>
+        <extension module="org.jboss.as.deployment-scanner"/>
+        <extension module="org.jboss.as.ee"/>
+        <extension module="org.jboss.as.ejb3"/>
+        <extension module="org.jboss.as.jaxrs"/>
+        <extension module="org.jboss.as.jdr"/>
+        <extension module="org.jboss.as.jmx"/>
+        <extension module="org.jboss.as.jpa"/>
+        <extension module="org.jboss.as.jsf"/>
+        <extension module="org.jboss.as.jsr77"/>
+        <extension module="org.jboss.as.logging"/>
+        <extension module="org.jboss.as.mail"/>
+        <extension module="org.jboss.as.modcluster"/>
+        <extension module="org.jboss.as.naming"/>
+        <extension module="org.jboss.as.pojo"/>
+        <extension module="org.jboss.as.remoting"/>
+        <extension module="org.jboss.as.sar"/>
+        <extension module="org.jboss.as.security"/>
+        <extension module="org.jboss.as.transactions"/>
+        <extension module="org.jboss.as.webservices"/>
+        <extension module="org.jboss.as.weld"/>
+        <extension module="org.wildfly.extension.batch.jberet"/>
+        <extension module="org.wildfly.extension.bean-validation"/>
+        <extension module="org.wildfly.extension.clustering.singleton"/>
+        <extension module="org.wildfly.extension.io"/>
+        <extension module="org.wildfly.extension.messaging-activemq"/>
+        <extension module="org.wildfly.extension.request-controller"/>
+        <extension module="org.wildfly.extension.security.manager"/>
+        <extension module="org.wildfly.extension.undertow"/>
+        <extension module="org.wildfly.iiop-openjdk"/>
+    </extensions>
+
+
+    <management>
+        <security-realms>
+            <security-realm name="ManagementRealm">
+                <authentication>
+                    <local default-user="$local" skip-group-loading="true"/>
+                    <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
+                </authentication>
+                <authorization map-groups-to-roles="false">
+                    <properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
+                </authorization>
+            </security-realm>
+            <security-realm name="ApplicationRealm">
+                <server-identities>
+                    <ssl>
+                        <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
+                    </ssl>
+                </server-identities>
+                <authentication>
+                    <local default-user="$local" allowed-users="*" skip-group-loading="true"/>
+                    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
+                </authentication>
+                <authorization>
+                    <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
+                </authorization>
+            </security-realm>
+        </security-realms>
+        <audit-log>
+            <formatters>
+                <json-formatter name="json-formatter"/>
+            </formatters>
+            <handlers>
+                <file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
+            </handlers>
+            <logger log-boot="true" log-read-only="false" enabled="false">
+                <handlers>
+                    <handler name="file"/>
+                </handlers>
+            </logger>
+        </audit-log>
+        <management-interfaces>
+            <http-interface security-realm="ManagementRealm" http-upgrade-enabled="true">
+                <socket-binding http="management-http"/>
+            </http-interface>
+        </management-interfaces>
+        <access-control provider="simple">
+            <role-mapping>
+                <role name="SuperUser">
+                    <include>
+                        <user name="$local"/>
+                    </include>
+                </role>
+            </role-mapping>
+        </access-control>
+    </management>
+
+    <profile>
+        <subsystem xmlns="urn:jboss:domain:logging:3.0">
+            <console-handler name="CONSOLE">
+                <level name="INFO"/>
+                <formatter>
+                    <named-formatter name="COLOR-PATTERN"/>
+                </formatter>
+            </console-handler>
+            <periodic-rotating-file-handler name="FILE" autoflush="true">
+                <formatter>
+                    <named-formatter name="PATTERN"/>
+                </formatter>
+                <file relative-to="jboss.server.log.dir" path="server.log"/>
+                <suffix value=".yyyy-MM-dd"/>
+                <append value="true"/>
+            </periodic-rotating-file-handler>
+            <logger category="com.arjuna">
+                <level name="WARN"/>
+            </logger>
+            <logger category="org.jboss.as.config">
+                <level name="DEBUG"/>
+            </logger>
+            <logger category="sun.rmi">
+                <level name="WARN"/>
+            </logger>
+            <root-logger>
+                <level name="INFO"/>
+                <handlers>
+                    <handler name="CONSOLE"/>
+                    <handler name="FILE"/>
+                </handlers>
+            </root-logger>
+            <formatter name="PATTERN">
+                <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
+            </formatter>
+            <formatter name="COLOR-PATTERN">
+                <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
+            </formatter>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:batch-jberet:1.0">
+            <default-job-repository name="in-memory"/>
+            <default-thread-pool name="batch"/>
+            <job-repository name="in-memory">
+                <in-memory/>
+            </job-repository>
+            <thread-pool name="batch">
+                <max-threads count="10"/>
+                <keepalive-time time="30" unit="seconds"/>
+            </thread-pool>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:datasources:4.0">
+            <datasources>
+                <datasource jndi-name="java:jboss/datasources/mso-requests" pool-name="mso-requests" enabled="true" use-ccm="true">
+                    <connection-url>jdbc:mariadb://mariadb:3306/mso_requests?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
+                    <driver>mariadb</driver>
+                    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
+                    <pool>
+                        <min-pool-size>10</min-pool-size>
+                        <max-pool-size>100</max-pool-size>
+                        <prefill>true</prefill>
+                        <use-strict-min>false</use-strict-min>
+                        <flush-strategy>FailingConnectionOnly</flush-strategy>
+                    </pool>
+                    <security>
+                        <user-name>mso</user-name>
+                        <password>mso123</password>
+                    </security>
+                    <validation>
+                        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
+                        <validate-on-match>false</validate-on-match>
+                        <background-validation>true</background-validation>
+                        <background-validation-millis>20000</background-validation-millis>
+                        <use-fast-fail>true</use-fast-fail>
+                        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
+                    </validation>
+                    <timeout>
+                        <idle-timeout-minutes>15</idle-timeout-minutes>
+                        <query-timeout>30</query-timeout>
+                        <allocation-retry>1</allocation-retry>
+                        <allocation-retry-wait-millis>3000</allocation-retry-wait-millis>
+                    </timeout>
+                </datasource>
+                <datasource jndi-name="java:jboss/datasources/mso-catalog" pool-name="mso-catalog" enabled="true" use-ccm="true">
+                    <connection-url>jdbc:mariadb://mariadb:3306/mso_catalog?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
+                    <driver>mariadb</driver>
+                    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
+                    <pool>
+                        <min-pool-size>10</min-pool-size>
+                        <max-pool-size>100</max-pool-size>
+                        <prefill>true</prefill>
+                        <use-strict-min>false</use-strict-min>
+                        <flush-strategy>FailingConnectionOnly</flush-strategy>
+                    </pool>
+                    <security>
+                        <user-name>catalog</user-name>
+                        <password>catalog123</password>
+                    </security>
+                    <validation>
+                        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
+                        <validate-on-match>false</validate-on-match>
+                        <background-validation>true</background-validation>
+                        <background-validation-millis>20000</background-validation-millis>
+                        <use-fast-fail>true</use-fast-fail>
+                        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
+                    </validation>
+                    <timeout>
+                        <idle-timeout-minutes>15</idle-timeout-minutes>
+                        <query-timeout>30</query-timeout>
+                        <allocation-retry>1</allocation-retry>
+                        <allocation-retry-wait-millis>3000</allocation-retry-wait-millis>
+                    </timeout>
+                </datasource>
+                <datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
+                    <connection-url>jdbc:mariadb://mariadb:3306/camundabpmn?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
+                    <driver>mariadb</driver>
+                    <new-connection-sql>set autocommit=1</new-connection-sql>
+                    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
+                    <pool>
+                        <min-pool-size>10</min-pool-size>
+                        <max-pool-size>100</max-pool-size>
+                        <prefill>true</prefill>
+                        <use-strict-min>false</use-strict-min>
+                        <flush-strategy>FailingConnectionOnly</flush-strategy>
+                    </pool>
+                    <security>
+                        <user-name>camunda</user-name>
+                        <password>camunda123</password>
+                    </security>
+                    <validation>
+                        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
+                        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
+                    </validation>
+                    <statement>
+                        <prepared-statement-cache-size>32</prepared-statement-cache-size>
+                        <share-prepared-statements>true</share-prepared-statements>
+                    </statement>
+                </datasource>
+                <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
+                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
+                    <driver>h2</driver>
+                    <security>
+                        <user-name>sa</user-name>
+                        <password>sa</password>
+                    </security>
+                </datasource>
+                <drivers>
+                    <driver name="h2" module="com.h2database.h2">
+                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+                    </driver>
+                    <driver name="mariadb" module="mariadb">
+                        <xa-datasource-class>org.mariadb.jdbc.MySQLDataSource</xa-datasource-class>
+                    </driver>
+                </drivers>
+            </datasources>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
+            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:ee:4.0">
+            <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
+            <concurrent>
+                <context-services>
+                    <context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/>
+                </context-services>
+                <managed-thread-factories>
+                    <managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
+                </managed-thread-factories>
+                <managed-executor-services>
+                    <managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" keepalive-time="5000"/>
+                </managed-executor-services>
+                <managed-scheduled-executor-services>
+                    <managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" keepalive-time="3000"/>
+                </managed-scheduled-executor-services>
+            </concurrent>
+            <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:jboss/DefaultJMSConnectionFactory" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:ejb3:4.0">
+            <session-bean>
+                <stateless>
+                    <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
+                </stateless>
+                <stateful default-access-timeout="5000" cache-ref="distributable" passivation-disabled-cache-ref="simple"/>
+                <singleton default-access-timeout="5000"/>
+            </session-bean>
+            <mdb>
+                <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/>
+                <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
+            </mdb>
+            <pools>
+                <bean-instance-pools>
+                    <strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+                    <strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+                </bean-instance-pools>
+            </pools>
+            <caches>
+                <cache name="simple"/>
+                <cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/>
+            </caches>
+            <passivation-stores>
+                <passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>
+            </passivation-stores>
+            <async thread-pool-name="default"/>
+            <timer-service thread-pool-name="default" default-data-store="default-file-store">
+                <data-stores>
+                    <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
+                </data-stores>
+            </timer-service>
+            <remote connector-ref="http-remoting-connector" thread-pool-name="default"/>
+            <thread-pools>
+                <thread-pool name="default">
+                    <max-threads count="10"/>
+                    <keepalive-time time="100" unit="milliseconds"/>
+                </thread-pool>
+            </thread-pools>
+            <iiop enable-by-default="false" use-qualified-name="false"/>
+            <default-security-domain value="other"/>
+            <default-missing-method-permissions-deny-access value="true"/>
+            <log-system-exceptions value="true"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:io:1.1">
+            <worker name="default"/>
+            <buffer-pool name="default"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:infinispan:4.0">
+            <cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server">
+                <transport lock-timeout="60000"/>
+                <replicated-cache name="default" mode="SYNC">
+                    <transaction mode="BATCH"/>
+                </replicated-cache>
+            </cache-container>
+            <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">
+                <transport lock-timeout="60000"/>
+                <distributed-cache name="dist" mode="ASYNC" l1-lifespan="0" owners="2">
+                    <locking isolation="REPEATABLE_READ"/>
+                    <transaction mode="BATCH"/>
+                    <file-store/>
+                </distributed-cache>
+                <distributed-cache name="concurrent" mode="SYNC" l1-lifespan="0" owners="2">
+                    <file-store/>
+                </distributed-cache>
+            </cache-container>
+            <cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan">
+                <transport lock-timeout="60000"/>
+                <distributed-cache name="dist" mode="ASYNC" l1-lifespan="0" owners="2">
+                    <locking isolation="REPEATABLE_READ"/>
+                    <transaction mode="BATCH"/>
+                    <file-store/>
+                </distributed-cache>
+            </cache-container>
+            <cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan">
+                <transport lock-timeout="60000"/>
+                <local-cache name="local-query">
+                    <eviction strategy="LRU" max-entries="10000"/>
+                    <expiration max-idle="100000"/>
+                </local-cache>
+                <invalidation-cache name="entity" mode="SYNC">
+                    <transaction mode="NON_XA"/>
+                    <eviction strategy="LRU" max-entries="10000"/>
+                    <expiration max-idle="100000"/>
+                </invalidation-cache>
+                <replicated-cache name="timestamps" mode="ASYNC"/>
+            </cache-container>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:iiop-openjdk:1.0">
+            <orb socket-binding="iiop" ssl-socket-binding="iiop-ssl"/>
+            <initializers security="identity" transactions="spec"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:jca:4.0">
+            <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
+            <bean-validation enabled="true"/>
+            <default-workmanager>
+                <short-running-threads>
+                    <core-threads count="50"/>
+                    <queue-length count="50"/>
+                    <max-threads count="50"/>
+                    <keepalive-time time="10" unit="seconds"/>
+                </short-running-threads>
+                <long-running-threads>
+                    <core-threads count="50"/>
+                    <queue-length count="50"/>
+                    <max-threads count="50"/>
+                    <keepalive-time time="10" unit="seconds"/>
+                </long-running-threads>
+            </default-workmanager>
+            <cached-connection-manager/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:jgroups:4.0">
+            <channels default="ee">
+                <channel name="ee" stack="udp"/>
+            </channels>
+            <stacks>
+                <stack name="udp">
+                    <transport type="UDP" socket-binding="jgroups-udp"/>
+                    <protocol type="PING"/>
+                    <protocol type="MERGE3"/>
+                    <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
+                    <protocol type="FD_ALL"/>
+                    <protocol type="VERIFY_SUSPECT"/>
+                    <protocol type="pbcast.NAKACK2"/>
+                    <protocol type="UNICAST3"/>
+                    <protocol type="pbcast.STABLE"/>
+                    <protocol type="pbcast.GMS"/>
+                    <protocol type="UFC"/>
+                    <protocol type="MFC"/>
+                    <protocol type="FRAG2"/>
+                </stack>
+                <stack name="tcp">
+                    <transport type="TCP" socket-binding="jgroups-tcp"/>
+                    <protocol type="MPING" socket-binding="jgroups-mping"/>
+                    <protocol type="MERGE3"/>
+                    <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
+                    <protocol type="FD"/>
+                    <protocol type="VERIFY_SUSPECT"/>
+                    <protocol type="pbcast.NAKACK2"/>
+                    <protocol type="UNICAST3"/>
+                    <protocol type="pbcast.STABLE"/>
+                    <protocol type="pbcast.GMS"/>
+                    <protocol type="MFC"/>
+                    <protocol type="FRAG2"/>
+                </stack>
+            </stacks>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jmx:1.3">
+            <expose-resolved-model/>
+            <expose-expression-model/>
+            <remoting-connector/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jpa:1.1">
+            <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jsf:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:mail:2.0">
+            <mail-session name="default" jndi-name="java:jboss/mail/Default">
+                <smtp-server outbound-socket-binding-ref="mail-smtp"/>
+            </mail-session>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
+            <server name="default">
+                <cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/>
+                <security-setting name="#">
+                    <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
+                </security-setting>
+                <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10" redistribution-delay="1000"/>
+                <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
+                <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
+                    <param name="batch-delay" value="50"/>
+                </http-connector>
+                <in-vm-connector name="in-vm" server-id="0"/>
+                <http-acceptor name="http-acceptor" http-listener="default"/>
+                <http-acceptor name="http-acceptor-throughput" http-listener="default">
+                    <param name="batch-delay" value="50"/>
+                    <param name="direct-deliver" value="false"/>
+                </http-acceptor>
+                <in-vm-acceptor name="in-vm" server-id="0"/>
+                <broadcast-group name="bg-group1" jgroups-channel="activemq-cluster" connectors="http-connector"/>
+                <discovery-group name="dg-group1" jgroups-channel="activemq-cluster"/>
+                <cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/>
+                <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
+                <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
+                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
+                <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
+                <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
+            </server>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:modcluster:2.0">
+            <mod-cluster-config advertise-socket="modcluster" connector="ajp">
+                <dynamic-load-provider>
+                    <load-metric type="cpu"/>
+                </dynamic-load-provider>
+            </mod-cluster-config>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:naming:2.0">
+            <remote-naming/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:remoting:3.0">
+            <endpoint/>
+            <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:resource-adapters:4.0"/>
+        <subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:security-manager:1.0">
+            <deployment-permissions>
+                <maximum-set>
+                    <permission class="java.security.AllPermission"/>
+                </maximum-set>
+            </deployment-permissions>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:security:1.2">
+            <security-domains>
+                <security-domain name="other" cache-type="default">
+                    <authentication>
+                        <login-module code="Remoting" flag="optional">
+                            <module-option name="password-stacking" value="useFirstPass"/>
+                        </login-module>
+                        <login-module code="RealmDirect" flag="required">
+                            <module-option name="password-stacking" value="useFirstPass"/>
+                        </login-module>
+                    </authentication>
+                </security-domain>
+                <security-domain name="jboss-web-policy" cache-type="default">
+                    <authorization>
+                        <policy-module code="Delegating" flag="required"/>
+                    </authorization>
+                </security-domain>
+                <security-domain name="jboss-ejb-policy" cache-type="default">
+                    <authorization>
+                        <policy-module code="Delegating" flag="required"/>
+                    </authorization>
+                </security-domain>
+                <security-domain name="jaspitest" cache-type="default">
+                    <authentication-jaspi>
+                        <login-module-stack name="dummy">
+                            <login-module code="Dummy" flag="optional"/>
+                        </login-module-stack>
+                        <auth-module code="Dummy"/>
+                    </authentication-jaspi>
+                </security-domain>
+            </security-domains>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:singleton:1.0">
+            <singleton-policies default="default">
+                <singleton-policy name="default" cache-container="server">
+                    <simple-election-policy/>
+                </singleton-policy>
+            </singleton-policies>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:transactions:3.0">
+            <core-environment>
+                <process-id>
+                    <uuid/>
+                </process-id>
+            </core-environment>
+            <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:undertow:3.1">
+            <buffer-cache name="default"/>
+            <server name="default-server">
+                <ajp-listener name="ajp" socket-binding="ajp"/>
+                <http-listener name="default" socket-binding="http" enable-http2="true"/>
+                <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
+                <host name="default-host" alias="localhost">
+                    <location name="/" handler="welcome-content"/>
+                    <filter-ref name="server-header"/>
+                    <filter-ref name="x-powered-by-header"/>
+                </host>
+            </server>
+            <servlet-container name="default">
+                <jsp-config/>
+                <websockets/>
+            </servlet-container>
+            <handlers>
+                <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
+            </handlers>
+            <filters>
+                <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
+                <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
+            </filters>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:webservices:2.0">
+            <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
+            <endpoint-config name="Standard-Endpoint-Config"/>
+            <endpoint-config name="Recording-Endpoint-Config">
+                <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+                    <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+                </pre-handler-chain>
+            </endpoint-config>
+            <client-config name="Standard-Client-Config"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:weld:3.0"/>
+    </profile>
+
+    <interfaces>
+        <interface name="management">
+            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
+        </interface>
+        <interface name="public">
+            <inet-address value="${jboss.bind.address:127.0.0.1}"/>
+        </interface>
+        <interface name="private">
+            <inet-address value="${jboss.bind.address.private:127.0.0.1}"/>
+        </interface>
+        <interface name="unsecure">
+            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
+        </interface>
+    </interfaces>
+
+    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
+        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
+        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
+        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
+        <socket-binding name="http" port="${jboss.http.port:8080}"/>
+        <socket-binding name="https" port="${jboss.https.port:8443}"/>
+        <socket-binding name="iiop" interface="unsecure" port="3528"/>
+        <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
+        <socket-binding name="jgroups-mping" interface="private" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
+        <socket-binding name="jgroups-tcp" interface="private" port="7600"/>
+        <socket-binding name="jgroups-tcp-fd" interface="private" port="57600"/>
+        <socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
+        <socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>
+        <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
+        <socket-binding name="txn-recovery-environment" port="4712"/>
+        <socket-binding name="txn-status-manager" port="4713"/>
+        <outbound-socket-binding name="mail-smtp">
+            <remote-destination host="localhost" port="25"/>
+        </outbound-socket-binding>
+    </socket-binding-group>
+
+</server>
\ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/jboss-configs/modules/mariadb/main/module.xml b/packages/docker/src/main/docker/docker-files/jboss-configs/modules/mariadb/main/module.xml
new file mode 100644 (file)
index 0000000..1b12735
--- /dev/null
@@ -0,0 +1,11 @@
+<?xmlversion="1.0"encoding="UTF-8"?>
+
+<module xmlns="urn:jboss:module:1.0" name="mariadb">
+  <resources>
+     <resource-root path="mariadb-java-client-1.5.4.jar"/>              
+  </resources>
+  <dependencies>
+     <module name="javax.api"/>
+     <module name="javax.transaction.api"/>
+  </dependencies>
+</module>
\ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/scripts/build-and-start.sh b/packages/docker/src/main/docker/docker-files/scripts/build-and-start.sh
new file mode 100644 (file)
index 0000000..3694981
--- /dev/null
@@ -0,0 +1,230 @@
+#!/bin/bash -x
+
+GIT_REPO=$mso_git_repository
+GIT_BRANCH=$mso_git_branch
+! [[ $GIT_SSH_KEY ]] && GIT_SSH_KEY=/home/jboss/user
+MVN_CENTRAL_USER=$mvn_central_user
+MVN_CENTRAL_PWD=$mvn_central_pwd
+WILDFLY_TAR=wildfly-10.1.0.Final.tar.gz;
+CHEF_DEB=chefdk_0.17.17-1_amd64.deb
+
+echo "Jboss Home:"
+echo ${JBOSS_HOME}
+echo "Repository :"
+echo ${GIT_REPO}
+echo "Branch :"
+echo ${GIT_BRANCH}
+echo "Ssh key file :"
+echo ${GIT_SSH_KEY}
+echo "Maven central user :"
+echo ${MVN_CENTRAL_USER}
+
+[[ ${MVN_CENTRAL_PWD} ]] && echo "with password" || echo "without password"
+
+function update_terminal() {
+    echo "--------------------------------------------------------------------------"
+    echo $*
+    echo "--------------------------------------------------------------------------"
+}
+
+function update_ubuntu() {
+    update_terminal "Updating ubuntu"
+    apt-get update
+    apt-get -y dist-upgrade
+}
+
+
+function set_ssh_key() {
+    [[ -f /home/jboss/user ]] && return || update_terminal "Setting ssh key"
+    mkdir -p /home/jboss/.ssh/
+    mv /tmp/id_rsa /home/jboss/user
+    chown jboss:jboss -R /home/jboss/user
+    chmod 600 /home/jboss/user
+    chown jboss:jboss /home/jboss/.ssh
+    chmod 700 /home/jboss/.ssh
+
+}
+
+function set_maven_settings() {
+    [[ -f /home/jboss/.m2/settings.xml ]] && return || update_terminal "Updating maven settings"
+    mkdir -p /home/jboss/.m2/
+    mv /tmp/settings.xml /home/jboss/.m2/settings.xml
+    chown -R jboss:jboss /home/jboss/.m2/
+
+    # set login and password for maven central
+    sed -i "s/#PASSWORD#/$MVN_CENTRAL_PWD/g" /home/jboss/.m2/settings.xml \
+       && sed -i "s/#USERNAME#/$MVN_CENTRAL_USER/g" /home/jboss/.m2/settings.xml
+}
+
+function install_jboss() {
+    [[ -f $JBOSS_HOME/bin/standalone.conf ]] && [[ $(grep "LAUNCH_JBOSS_IN_BACKGROUND=true" $JBOSS_HOME/bin/standalone.conf) ]] && return || update_terminal "Installing jboss";
+
+
+    adduser --system --group jboss
+
+    curl -C - -LO http://download.jboss.org/wildfly/10.1.0.Final/$WILDFLY_TAR ;
+    tar xvfz $WILDFLY_TAR -C /opt/;
+    mv /opt/${WILDFLY_TAR%.tar.gz} $JBOSS_HOME;
+
+    chown -R jboss:jboss $JBOSS_HOME
+    echo "JAVA_OPTS=\"\$JAVA_OPTS -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0 -Dmso.db=MARIADB -Dmso.config.path=/etc/mso/config.d/ -Dmso.aaf.enable=false \"" >> $JBOSS_HOME/bin/standalone.conf
+    echo "LAUNCH_JBOSS_IN_BACKGROUND=true" >> $JBOSS_HOME/bin/standalone.conf
+
+}
+
+function create_log_folders() {
+    [[ -d /var/log/ecomp ]] && [[ /var/log/ecomp/MSO/ ]] && return || update_terminal "Creating log folders"
+    mkdir -p /var/log/ecomp/MSO/
+    chown -R jboss:jboss /var/log/ecomp
+}
+
+function install_mariadb_connector() {
+    [[ -f $JBOSS_HOME/standalone/configuration/standalone-full-ha-mso.xml ]] && return || update_terminal "Installing mariadb connector"
+    MARIADB_DIR=$JBOSS_HOME/modules/mariadb
+    curl -C - -O -L http://central.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/1.5.4/mariadb-java-client-1.5.4.jar
+    mkdir -p $MARIADB_DIR/main
+    mv mariadb-java-client-1.5.4.jar $MARIADB_DIR/main
+    cp /tmp/jboss-configs//modules/mariadb/main/module.xml $MARIADB_DIR/main
+    cp /tmp/jboss-configs/standalone-full-ha.xml $JBOSS_HOME/standalone/configuration/standalone-full-ha-mso.xml
+    cp /tmp/jboss-configs/configuration/application-roles.properties $JBOSS_HOME/standalone/configuration/application-roles.properties
+    cp /tmp/jboss-configs/configuration/application-users.properties $JBOSS_HOME/standalone/configuration/application-users.properties
+    cp /tmp/jboss-configs/configuration/mgmt-groups.properties $JBOSS_HOME/standalone/configuration/mgmt-groups.properties
+    cp /tmp/jboss-configs/configuration/mgmt-users.properties $JBOSS_HOME/standalone/configuration/mgmt-users.properties
+    
+    chown -R jboss:jboss $MARIADB_DIR
+}
+
+function dep_install() {
+    update_terminal "Installing dependencies"
+    # install requirements
+    apt-get -y install openjdk-8-jre-headless curl git maven
+    STATUS=$?
+    if [[ $STATUS != 0 ]];
+    then
+       exit 1
+    fi
+}
+
+function clone_mso() {
+    [[ $("ls /tmp/mso-core") ]] && return || update_terminal "Cloning mso repository"
+    # build git command
+    GIT_CMD="git clone --single-branch -b ${GIT_BRANCH-master} ${GIT_REPO} -v"
+
+    # build ssh command
+    export GIT_SSH_COMMAND="ssh -i ${GIT_SSH_KEY} -o StrictHostKeyChecking=false"
+
+    # cloning
+    su - jboss -s /bin/bash -c "export GIT_SSH_COMMAND=\"ssh -i ${GIT_SSH_KEY} -o StrictHostKeyChecking=false\"; cd /tmp/; ${GIT_CMD} mso-core"
+    STATUS=$?
+    if [[ $STATUS != 0 ]];
+    then
+       exit 2
+    fi
+}
+#export MAVEN_OPTS="$MAVEN_OPTS -Dhttp.proxyHost=one.proxy.att.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=one.proxy.att.com -Dhttps.proxyPort=8080"
+
+function mso_build() {
+    update_terminal "Building Mso core"
+    # building
+    cd /tmp/mso-core
+    su jboss -s /bin/bash -c "mvn clean install"
+    STATUS=$?
+    if [[ $STATUS != 0 ]];
+    then
+       exit 4
+    fi
+}
+
+function war_to_temp() {
+    [[ $("ls /tmp/wars/") ]] && return || update_terminal "Copying wars to tmp directory"
+    function copy_wars() {
+       for war in `find . -iname "*.war" `;
+       do
+           cp $war /tmp/wars/
+       done
+    }
+    export -f copy_wars
+    su - jboss -s /bin/bash -c copy_wars
+    #tar xzf ./packages/deliveries/target/assembly/war-packs/*.tar.gz -C /tmp/wars/
+}
+
+function install_chef() {
+    [[ -d /home/jboss/.chef/nodes ]] && return || update_terminal "Installing chef"
+    curl -C - -LO  https://packages.chef.io/stable/ubuntu/12.04/$CHEF_DEB
+    dpkg -i $CHEF_DEB
+    for dir in "/etc/chef /etc/mso /var/berks-cookbooks /tmp/git /var/nodes /home/jboss/.chef/nodes";
+    do
+       mkdir -p $dir
+       chown jboss:jboss $dir
+       chmod 700 $dir
+    done
+}
+
+function chef_init() {
+    update_terminal "Initializing chef"
+    mkdir -p /tmp/git
+    cp /shared/solo.rb /tmp/git/
+    chown -R jboss:jboss /tmp/git
+    su - jboss -s /bin/bash -c /opt/mso/scripts/init-chef.sh
+    mv /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker.json /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker-init.json
+    ln -s /shared/mso-docker.json /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker.json
+}
+
+function cleanup() {
+    # cleaning & space freeup
+    echo "Cleaning up"
+
+    rm -rf /tmp/git/mso-core
+    rm -f /$WILDFLY_TAR;
+    rm -f /$CHEF_DEB
+    
+    rm -rf /home/jboss/.m2
+    apt-get remove -y maven git curl
+
+}
+
+function build() {
+    update_ubuntu
+    dep_install
+
+    install_jboss
+    create_log_folders
+    install_mariadb_connector
+
+    set_ssh_key
+
+    install_chef
+    chef_init
+
+
+    clone_mso
+
+    set_maven_settings
+    mso_build
+    war_to_temp
+    cleanup
+}
+
+function init_certif() {
+       # Copy the certificates
+       cp /shared/*.crt /usr/local/share/ca-certificates
+       update-ca-certificates
+}
+
+function start() {
+    su - jboss -s /bin/bash -c /opt/mso/scripts/start-jboss-server.sh
+}
+
+rm -f "$JBOSS_HOME/standalone/deployments/README.txt"
+if ! [[ "$(ls -A $JBOSS_HOME/standalone/deployments/)" ]];
+then
+    mkdir -p /tmp/wars/
+    build
+    cp /tmp/wars/* $JBOSS_HOME/standalone/deployments/
+    rm -rf /tmp/wars/
+    init_certif
+fi
+
+cd /opt/jboss
+
+start
diff --git a/packages/docker/src/main/docker/docker-files/scripts/init-chef.sh b/packages/docker/src/main/docker/docker-files/scripts/init-chef.sh
new file mode 100644 (file)
index 0000000..0a562e7
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Copyright 2015 AT&T Intellectual Properties
+##############################################################################
+#       Script to initialize the chef-repo branch and.chef
+#
+##############################################################################
+
+set -x
+cd /tmp/git/
+export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=false -i ~/user"
+git clone -b ${BRANCH_NAME:-master} --single-branch ssh://${REPO_USERNAME}@${REPO_ADDRESS}/${CHEF_REPO_NAME}.git
+
+
+# Will have to be removed later
+#mkdir -p /var/chef/nodes
+sed "s/CHEF_REPO_NAME_TO_REPLACE/${CHEF_REPO_NAME}/g" -i /tmp/git/solo.rb
+mv /tmp/git/solo.rb /tmp/git/${CHEF_REPO_NAME}/
+cd /tmp/git/${CHEF_REPO_NAME}
+
+echo "Vendor cookbooks with Berkshelf"
+berks vendor /var/berks-cookbooks -b Berksfile.mso-docker
+
+# Execute the ChefClient to configure the mso-config
+echo "Update config with chef solo"
+chef-solo -c /var/berks-cookbooks/${CHEF_REPO_NAME}/solo.rb -o recipe[mso-config::apih],recipe[mso-config::bpmn],recipe[mso-config::jra]
\ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/scripts/start-jboss-server.sh b/packages/docker/src/main/docker/docker-files/scripts/start-jboss-server.sh
new file mode 100644 (file)
index 0000000..2e9b9da
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh
+# Copyright 2015 AT&T Intellectual Properties
+##############################################################################
+#       Script to initialize the chef-repo branch and.chef
+#
+##############################################################################
+# Copy the certificates
+echo 'Copying the *.crt provided in /shared folder'
+cp --verbose /shared/*.crt /usr/local/share/ca-certificates
+update-ca-certificates
+
+echo 'Running in JBOSS'
+su - jboss
+
+#Start the chef-solo
+chef-solo -c /var/berks-cookbooks/${CHEF_REPO_NAME}/solo.rb -o recipe[mso-config::apih],recipe[mso-config::bpmn],recipe[mso-config::jra]
+
+
+JBOSS_PIDFILE=/tmp/jboss-standalone.pid
+$JBOSS_HOME/bin/standalone.sh -c standalone-full-ha-mso.xml &
+JBOSS_PID=$!
+# Trap common signals and relay them to the jboss process
+trap "kill -HUP  $JBOSS_PID" HUP
+trap "kill -TERM $JBOSS_PID" INT
+trap "kill -QUIT $JBOSS_PID" QUIT
+trap "kill -PIPE $JBOSS_PID" PIPE
+trap "kill -TERM $JBOSS_PID" TERM
+if [ "x$JBOSS_PIDFILE" != "x" ]; then
+  echo $JBOSS_PID > $JBOSS_PIDFILE
+fi
+# Wait until the background process exits
+WAIT_STATUS=128
+while [ "$WAIT_STATUS" -ge 128 ]; do
+   wait $JBOSS_PID 2>/dev/null
+   WAIT_STATUS=$?
+   if [ "$WAIT_STATUS" -gt 128 ]; then
+      SIGNAL=`expr $WAIT_STATUS - 128`
+      SIGNAL_NAME=`kill -l $SIGNAL`
+      echo "*** JBossAS process ($JBOSS_PID) received $SIGNAL_NAME signal ***" >&2
+   fi
+done
+if [ "$WAIT_STATUS" -lt 127 ]; then
+   JBOSS_STATUS=$WAIT_STATUS
+else
+   JBOSS_STATUS=0
+fi
+if [ "$JBOSS_STATUS" -ne 10 ]; then
+      # Wait for a complete shudown
+      wait $JBOSS_PID 2>/dev/null
+fi
+if [ "x$JBOSS_PIDFILE" != "x" ]; then
+      grep "$JBOSS_PID" $JBOSS_PIDFILE && rm $JBOSS_PIDFILE
+fi
diff --git a/packages/docker/src/main/docker/docker-files/settings.xml b/packages/docker/src/main/docker/docker-files/settings.xml
new file mode 100644 (file)
index 0000000..ff9343b
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+     <proxies>
+       <proxy>
+        <id>optional</id>
+        <active>true</active>
+        <protocol>http</protocol>
+        <host>one.proxy.att.com</host>
+        <port>8080</port>
+        <nonProxyHosts>localhost,127.0.0.1,*.att.com</nonProxyHosts>
+       </proxy>
+     </proxies>
+
+     <servers>
+       <server>
+        <id>mso-releases</id>
+        <username>#USERNAME#</username>
+        <password>#PASSWORD#</password>
+       </server>
+       <server>
+        <id>mso-snapshots</id>
+        <username>#USERNAME#</username>
+        <password>#PASSWORD#</password>
+       </server>
+       <server>
+        <id>mso-3rd-party</id>
+        <username>#USERNAME#</username>
+        <password>#PASSWORD#</password>
+       </server>       
+     </servers>
+</settings>
diff --git a/packages/pom.xml b/packages/pom.xml
new file mode 100644 (file)
index 0000000..beb7251
--- /dev/null
@@ -0,0 +1,47 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+       <modelVersion>4.0.0</modelVersion>\r
+       <parent>\r
+               <artifactId>mso</artifactId>\r
+               <groupId>org.openecomp</groupId>\r
+               <version>0.0.4-SNAPSHOT</version>\r
+       </parent>\r
+\r
+       <groupId>org.openecomp.mso</groupId>\r
+       <artifactId>packages</artifactId>\r
+       <packaging>pom</packaging>\r
+       <name>MSO Packages</name>\r
+\r
+       \r
+       <profiles>\r
+               <!-- DO NOT CHANGE THE *ORDER* IN WHICH THESE PROFILES ARE DEFINED! -->\r
+\r
+               <profile>\r
+                       <id>default</id>\r
+                       <activation>\r
+                               <activeByDefault>true</activeByDefault>\r
+                       </activation>\r
+                       <modules>\r
+                               <module>deliveries</module>\r
+                       </modules>\r
+               </profile>\r
+\r
+               <profile>\r
+                       <id>docker</id>\r
+                       <modules>\r
+                               <module>deliveries</module>\r
+                               <module>docker</module>\r
+                       </modules>\r
+               </profile>\r
+\r
+               <profile>\r
+                       <id>with-integration-tests</id>\r
+                       <modules>\r
+                               <module>deliveries</module>\r
+                               <module>docker</module>\r
+                               <module>arquillian-unit-tests</module>\r
+                       </modules>\r
+               </profile>\r
+               \r
+       </profiles>\r
+</project>\r
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/automated-tests/create_mso_db-tests.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/automated-tests/create_mso_db-tests.sql
new file mode 100644 (file)
index 0000000..d7ceb3d
--- /dev/null
@@ -0,0 +1,37 @@
+SOURCE ../default/create_mso_db-default.sql
+
+USE `mso_requests`;
+DROP USER 'mso';
+CREATE USER 'mso';
+GRANT ALL on mso_requests.* to 'mso' identified by 'mso123' with GRANT OPTION;
+FLUSH PRIVILEGES;
+
+USE `mso_catalog`;
+DROP USER 'catalog';
+CREATE USER 'catalog';
+GRANT ALL on mso_catalog.* to 'catalog' identified by 'catalog123' with GRANT OPTION;
+FLUSH PRIVILEGES;
+
+LOCK TABLES `NETWORK_RESOURCE` WRITE;
+/*!40000 ALTER TABLE `NETWORK_RESOURCE` DISABLE KEYS */;
+/*!40000 ALTER TABLE `NETWORK_RESOURCE` ENABLE KEYS */;
+insert into NETWORK_RESOURCE (id, NETWORK_TYPE, VERSION_STR, ORCHESTRATION_MODE ,DESCRIPTION, TEMPLATE_ID, NEUTRON_NETWORK_TYPE) values 
+(1, "vlan",'1',"NEUTRON","Cool network",1,"BASIC");
+UNLOCK TABLES;
+
+LOCK TABLES `NETWORK_RECIPE` WRITE;
+/*!40000 ALTER TABLE `NETWORK_RECIPE` DISABLE KEYS */;
+INSERT INTO `NETWORK_RECIPE`(`NETWORK_TYPE`, `ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `NETWORK_PARAM_XSD`, `RECIPE_TIMEOUT`, `SERVICE_TYPE`) VALUES 
+('vlan','CREATE','1',NULL,'/active-bpel/services/REST/CreateNetwork',NULL,180,NULL),
+('vlan','DELETE','1',NULL,'/active-bpel/services/REST/DeleteNetwork',NULL,180,NULL);
+/*!40000 ALTER TABLE `NETWORK_RECIPE` ENABLE KEYS */;
+UNLOCK TABLES;
+
+INSERT INTO `VNF_RECIPE`(`ID`, `VNF_TYPE`, `ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `VNF_PARAM_XSD`, `RECIPE_TIMEOUT`, `SERVICE_TYPE`) VALUES
+(100,'VPE','CREATE','1','','/active-bpel/services/REST/CreateGenericVNF','',180,'SDN-ETHERNET-INTERNET'),
+(101,'VPE','DELETE','1','','/active-bpel/services/REST/DeleteGenericVNF','',180,'SDN-ETHERNET-INTERNET');
+
+DELETE FROM VNF_RESOURCE;
+DELETE FROM HEAT_TEMPLATE_PARAMS;
+DELETE FROM HEAT_TEMPLATE;
+DELETE FROM HEAT_ENVIRONMENT;
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/default/create_mso_db-default.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/default/create_mso_db-default.sql
new file mode 100644 (file)
index 0000000..403676a
--- /dev/null
@@ -0,0 +1,99 @@
+SOURCE ../../camunda/mysql_engine_7.3.0.sql
+SOURCE ../../camunda/mysql_identity_7.3.0.sql
+SOURCE ../../camunda/mysql_updates_7.3.0.sql
+
+--
+-- Create an admin user automatically for the cockpit
+--
+SOURCE ../../camunda/mysql_create_camunda_admin.sql
+
+--
+-- Current Database: `mso_requests`
+--
+
+DROP DATABASE IF EXISTS `mso_requests`;
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mso_requests` /*!40100 DEFAULT CHARACTER SET latin1 */;
+
+USE `mso_requests`;
+
+SOURCE ../../main-schemas/MySQL-Requests-schema.sql
+SOURCE ../../sub-sql-files/site_status_updated_timestamp.sql
+
+
+--
+-- Current Database: `mso_catalog`
+--
+
+DROP DATABASE IF EXISTS `mso_catalog`;
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mso_catalog` /*!40100 DEFAULT CHARACTER SET latin1 */;
+
+USE `mso_catalog`;
+
+SOURCE ../../main-schemas/MySQL-Catalog-schema.sql
+SOURCE ../../sub-sql-files/catalog_timestamp_mso_db.sql
+
+LOCK TABLES `NETWORK_RECIPE` WRITE;
+/*!40000 ALTER TABLE `NETWORK_RECIPE` DISABLE KEYS */;
+INSERT INTO `NETWORK_RECIPE`(`ID`, `NETWORK_TYPE`, `ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `NETWORK_PARAM_XSD`, `RECIPE_TIMEOUT`, `SERVICE_TYPE`) VALUES
+(1,'CONTRAIL_BASIC','CREATE','1',NULL,'/mso/async/services/CreateNetworkV2',NULL,180,NULL),
+(2,'CONTRAIL_BASIC','DELETE','1',NULL,'/mso/async/services/DeleteNetworkV2',NULL,180,NULL),
+(3,'CONTRAIL_BASIC','UPDATE','1',NULL,'/mso/async/services/UpdateNetworkV2',NULL,180,NULL),
+(4,'CONTRAIL_SHARED','CREATE','1',NULL,'/mso/async/services/CreateNetworkV2',NULL,180,NULL),
+(5,'CONTRAIL_SHARED','UPDATE','1',NULL,'/mso/async/services/UpdateNetworkV2',NULL,180,NULL),
+(6,'CONTRAIL_SHARED','DELETE','1',NULL,'/mso/async/services/DeleteNetworkV2',NULL,180,NULL),
+(7,'CONTRAIL_EXTERNAL','CREATE','1',NULL,'/mso/async/services/CreateNetworkV2',NULL,180,NULL),
+(8,'CONTRAIL_EXTERNAL','UPDATE','1',NULL,'/mso/async/services/UpdateNetworkV2',NULL,180,NULL),
+(9,'CONTRAIL_EXTERNAL','DELETE','1',NULL,'/mso/async/services/DeleteNetworkV2',NULL,180,NULL);
+
+/*!40000 ALTER TABLE `NETWORK_RECIPE` ENABLE KEYS */;
+UNLOCK TABLES;
+INSERT INTO `NETWORK_RECIPE`(`NETWORK_TYPE`, `ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `NETWORK_PARAM_XSD`, `RECIPE_TIMEOUT`, `SERVICE_TYPE`) VALUES
+('CONTRAIL30_BASIC','CREATE','1',NULL,'/mso/async/services/CreateNetworkV2',NULL,180,NULL),
+('CONTRAIL30_BASIC','UPDATE','1',NULL,'/mso/async/services/UpdateNetworkV2',NULL,180,NULL),
+('CONTRAIL30_BASIC','DELETE','1',NULL,'/mso/async/services/DeleteNetworkV2',NULL,180,NULL),
+('CONTRAIL30_MPSCE','CREATE','1',NULL,'/mso/async/services/CreateNetworkV2',NULL,180,NULL),
+('CONTRAIL30_MPSCE','UPDATE','1',NULL,'/mso/async/services/UpdateNetworkV2',NULL,180,NULL),
+('CONTRAIL30_MPSCE','DELETE','1',NULL,'/mso/async/services/DeleteNetworkV2',NULL,180,NULL);
+
+
+LOCK TABLES `VNF_RECIPE` WRITE;
+/*!40000 ALTER TABLE `VNF_RECIPE` DISABLE KEYS */;
+INSERT INTO `VNF_RECIPE`(`ID`, `VNF_TYPE`, `VF_MODULE_ID`, `ACTION`, `VERSION_STR`, `DESCRIPTION`, `ORCHESTRATION_URI`, `VNF_PARAM_XSD`, `RECIPE_TIMEOUT`, `SERVICE_TYPE`) VALUES
+(1,'*',NULL,'CREATE','1','Recipe Match All for VNFs if no custom flow exists','/mso/workflow/services/CreateGenericVNFV1',NULL,180,NULL),
+(2,'*',NULL,'DELETE','1','Recipe Match All for VNFs if no custom flow exists','/mso/async/services//deleteGenericVNFV1',NULL,180,NULL),
+(3,'*',NULL,'UPDATE','1','Recipe Match All for VNFs if no custom flow exists','/mso/workflow/services/updateGenericVNFV1',NULL,180,NULL),
+(4,NULL,'*','CREATE_VF_MODULE','1','Recipe Match All for VNFs if no custom flow exists','/mso/async/services/CreateVfModule',NULL,180,NULL),
+(5,NULL,'*','DELETE_VF_MODULE','1','Recipe Match All for VNFs if no custom flow exists','/mso/async/services/DeleteVfModule',NULL,180,NULL),
+(6,NULL,'*','UPDATE_VF_MODULE','1','Recipe Match All for VNFs if no custom flow exists','/mso/async/services/UpdateVfModule',NULL,180,NULL);
+/*!40000 ALTER TABLE `VNF_RECIPE` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `VNF_COMPONENTS_RECIPE` WRITE;
+/*!40000 ALTER TABLE `VNF_COMPONENTS_RECIPE` DISABLE KEYS */;
+INSERT INTO `VNF_COMPONENTS_RECIPE`
+(`ID`, `VNF_TYPE`, `VF_MODULE_ID`, `ACTION`, `VERSION`, `DESCRIPTION`, `ORCHESTRATION_URI`,`VNF_COMPONENT_TYPE`, `VNF_COMPONENT_PARAM_XSD`, `RECIPE_TIMEOUT`, `SERVICE_TYPE`) VALUES
+(1,'*',NULL,'CREATE','1','Recipe Match All for VF Modules if no custom flow exists','/mso/async/services/createCinderVolumeV1','VOLUME_GROUP',NULL,180,NULL),
+(2,'*',NULL,'DELETE','1','Recipe Match All for VF Modules if no custom flow exists','/mso/async/services/deleteCinderVolumeV1','VOLUME_GROUP',NULL,180,NULL),
+(3,'*',NULL,'UPDATE','1','Recipe Match All for VF Modules if no custom flow exists','/mso/async/services/updateCinderVolumeV1','VOLUME_GROUP',NULL,180,NULL),
+(4,NULL,'*','CREATE_VF_MODULE_VOL','1','Recipe Match All for VF Modules if no custom flow exists','/mso/async/services/CreateVfModuleVolume','VOLUME_GROUP',NULL,180,NULL),
+(5,NULL,'*','DELETE_VF_MODULE_VOL','1','Recipe Match All for VF Modules if no custom flow exists','/mso/async/services/DeleteVfModuleVolume','VOLUME_GROUP',NULL,180,NULL),
+(6,NULL,'*','UPDATE_VF_MODULE_VOL','1','Recipe Match All for VF Modules if no custom flow exists','/mso/async/services/UpdateVfModuleVolume','VOLUME_GROUP',NULL,180,NULL);
+/*!40000 ALTER TABLE `VNF_COMPONENTS_RECIPE` ENABLE KEYS */;
+UNLOCK TABLES;
+
+INSERT INTO service (id, SERVICE_NAME, VERSION_STR, DESCRIPTION) VALUES ('4', 'VID_DEFAULT', '1.0', 'Default service for VID to use for infra APIH orchestration');
+INSERT INTO service_recipe (SERVICE_ID, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT) VALUES ('4', 'createInstance', '1', 'VID_DEFAULT recipe to create service-instance if no custom BPMN flow is found', '/mso/async/services/CreateServiceInstanceInfra', '180');
+INSERT INTO service_recipe (SERVICE_ID, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT) VALUES ('4', 'deleteInstance', '1', 'VID_DEFAULT recipe to delete service-instance if no custom BPMN flow is found', '/mso/async/services/DeleteServiceInstanceInfra', '180');
+INSERT INTO vnf_recipe (VNF_TYPE, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT) VALUES ('VID_DEFAULT', 'createInstance', '1', 'VID_DEFAULT recipe to create VNF if no custom BPMN flow is found', '/mso/async/services/CreateVnfInfra', '180');
+INSERT INTO vnf_recipe (VNF_TYPE, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT) VALUES ('VID_DEFAULT', 'deleteInstance', '1', 'VID_DEFAULT recipe to delete VNF if no custom BPMN flow is found', '/mso/async/services/DeleteVnfInfra', '180');
+INSERT INTO vnf_components_recipe (VNF_TYPE, VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_ID) VALUES (NULL, 'volumeGroup', 'createInstance', '1', 'VID_DEFAULT recipe to create volume-group if no custom BPMN flow is found', '/mso/async/service/CreateVfModuleVolumeInfraV1', '180', 'VID_DEFAULT');
+INSERT INTO vnf_components_recipe (VNF_TYPE, VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_ID) VALUES (NULL, 'volumeGroup', 'deleteInstance', '1', 'VID_DEFAULT recipe to delete volume-group if no custom BPMN flow is found', '/mso/async/service/DeleteVfModuleVolumeInfraV1', '180', 'VID_DEFAULT');
+INSERT INTO vnf_components_recipe (VNF_TYPE, VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_ID) VALUES (NULL, 'volumeGroup', 'updateInstance', '1', 'VID_DEFAULT recipe to update volume-group if no custom BPMN flow is found', '/mso/async/service/UpdateVfModuleVolumeInfraV1', '180', 'VID_DEFAULT');
+INSERT INTO vnf_components_recipe (VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_ID) VALUES ('vfModule', 'createInstance', '1', 'VID_DEFAULT recipe to create vf-module if no custom BPMN flow is found', '/mso/async/services/CreateVfModuleInfra', '180', 'VID_DEFAULT');
+INSERT INTO vnf_components_recipe (VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_ID) VALUES ('vfModule', 'deleteInstance', '1', 'VID_DEFAULT recipe to delete vf-module if no custom BPMN flow is found', '/mso/async/services/DeleteVfModuleInfra', '180', 'VID_DEFAULT');
+INSERT INTO vnf_components_recipe (VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_ID) VALUES ('vfModule', 'updateInstance', '1', 'VID_DEFAULT recipe to update vf-module if no custom BPMN flow is found', '/mso/async/services/UpdateVfModuleInfra', '180', 'VID_DEFAULT');
+INSERT INTO network_recipe (NETWORK_TYPE, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT) VALUES ('VID_DEFAULT', 'createInstance', '1.0', 'VID_DEFAULT recipe to create network if no custom BPMN flow is found', '/mso/async/services/CreateNetworkInstanceInfra', '180');
+INSERT INTO network_recipe (NETWORK_TYPE, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT) VALUES ('VID_DEFAULT', 'updateInstance', '1.0', 'VID_DEFAULT recipe to update network if no custom BPMN flow is found', '/mso/async/services/UpdateNetworkInstanceInfra', '180');
+INSERT INTO network_recipe (NETWORK_TYPE, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT) VALUES ('VID_DEFAULT', 'deleteInstance', '1.0', 'VID_DEFAULT recipe to delete network if no custom BPMN flow is found', '/mso/async/services/DeleteNetworkInstanceInfra', '180');
\ No newline at end of file
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/demo-dns/create_mso_db-demo-dns.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/demo-dns/create_mso_db-demo-dns.sql
new file mode 100644 (file)
index 0000000..9ddc9ff
--- /dev/null
@@ -0,0 +1,85 @@
+SOURCE ../default/create_mso_db-default.sql
+
+USE `mso_requests`;
+DROP USER 'mso';
+CREATE USER 'mso';
+GRANT ALL on mso_requests.* to 'mso' identified by 'mso123' with GRANT OPTION;
+FLUSH PRIVILEGES;
+
+USE `mso_catalog`;
+DROP USER 'catalog';
+CREATE USER 'catalog';
+GRANT ALL on mso_catalog.* to 'catalog' identified by 'catalog123' with GRANT OPTION;
+FLUSH PRIVILEGES;
+
+LOCK TABLES `heat_environment` WRITE;
+/*!40000 ALTER TABLE `heat_environment` DISABLE KEYS */;
+INSERT INTO `heat_environment` VALUES (3,'base_vlb.env','1.0','dns-service/DNSResource-1','BASE VLB ENV file','parameters:\n  vlb_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)\n  vlb_flavor_name: 4 GB General Purpose v1\n  public_net_id: 00000000-0000-0000-0000-000000000000\n  vlb_private_net_id: zdfw1lb01_private\n  ecomp_private_net_id: oam_ecomp\n  vlb_private_net_cidr: 192.168.10.0/24\n  ecomp_private_net_cidr: 192.168.9.0/24\n  vlb_private_ip_0: 192.168.10.111\n  vlb_private_ip_1: 192.168.9.111\n  vdns_private_ip_0: 192.168.10.211\n  vdns_private_ip_1: 192.168.9.211\n  vlb_name_0: zdfw1lb01lb01\n  vdns_name_0: zdfw1lb01dns01\n  vnf_id: vLoadBalancer_demo_app\n  vf_module_id: vLoadBalancer\n  webserver_ip: 162.242.237.182\n  dcae_collector_ip: 192.168.9.1\n  key_name: vlb_key\n  pub_key: INSERT YOUR PUBLIC KEY HERE','2016-11-14 13:04:07','EnvArtifact-UUID1','Label');
+INSERT INTO `heat_environment` VALUES (4,'dnsscaling.env','1.0','dns-service/DNSResource-1','DNS Scaling ENV file','parameters:\n  vlb_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)\n  vlb_flavor_name: 4 GB General Purpose v1\n  public_net_id: 00000000-0000-0000-0000-000000000000\n  vlb_private_net_id: zdfw1lb01_private\n  ecomp_private_net_id: oam_ecomp\n  vlb_private_ip_0: 192.168.10.111\n  vlb_private_ip_1: 192.168.9.111\n  vdns_private_ip_0: 192.168.10.222\n  vdns_private_ip_1: 192.168.9.222\n  vdns_name_0: zdfw1lb01dns02\n  vnf_id: vLoadBalancer_demo_app\n  vf_module_id: vLoadBalancer\n  webserver_ip: 162.242.237.182\n  dcae_collector_ip: 192.168.9.1\n  key_name: vlb_key\n  pub_key: INSERT YOUR PUBLIC KEY HERE','2016-11-14 13:04:07','EnvArtifact-UUID2','Label');
+/*!40000 ALTER TABLE `heat_environment` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `heat_template` WRITE;
+/*!40000 ALTER TABLE `heat_template` DISABLE KEYS */;
+INSERT INTO `heat_template` VALUES (6,'base_vlb.yaml','1.0','DNSResource','base_vlb.yaml','heat_template_version: 2013-05-23\n\ndescription: Heat template to deploy vLoadBalancer/vDNS demo app for OpenECOMP\n\nparameters:\n  vlb_image_name:\n    type: string\n    label: Image name or ID\n    description: Image to be used for compute instance\n  vlb_flavor_name:\n    type: string\n    label: Flavor\n    description: Type of instance (flavor) to be used\n  public_net_id:\n    type: string\n    label: Public network name or ID\n    description: Public network that enables remote connection to VNF\n  vlb_private_net_id:\n    type: string\n    label: vLoadBalancer private network name or ID\n    description: Private network that connects vLoadBalancer with vDNSs\n  ecomp_private_net_id:\n    type: string\n    label: ECOMP management network name or ID\n    description: Private network that connects ECOMP component and the VNF\n  vlb_private_net_cidr:\n    type: string\n    label: vLoadBalancer private network CIDR\n    description: The CIDR of the vLoadBalancer private network\n  ecomp_private_net_cidr:\n    type: string\n    label: ECOMP private network CIDR\n    description: The CIDR of the protected private network\n  vlb_private_ip_0:\n    type: string\n    label: vLoadBalancer private IP address towards the private network\n    description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs\n  vlb_private_ip_1:\n    type: string\n    label: vLoadBalancer private IP address towards the ECOMP management network\n    description: Private IP address that is assigned to the vLoadBalancer to communicate with ECOMP components\n  vdns_private_ip_0:\n    type: string\n    label: vDNS private IP address towards the private network\n    description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer\n  vdns_private_ip_1:\n    type: string\n    label: vDNS private IP address towards the ECOMP management network\n    description: Private IP address that is assigned to the vDNS to communicate with ECOMP components\n  vlb_name_0:\n    type: string\n    label: vLoadBalancer name\n    description: Name of the vLoadBalancer\n  vdns_name_0:\n    type: string\n    label: vDNS name\n    description: Name of the vDNS\n  vnf_id:\n    type: string\n    label: VNF ID\n    description: The VNF ID is provided by ECOMP\n  vf_module_id:\n    type: string\n    label: vFirewall module ID\n    description: The vLoadBalancer Module ID is provided by ECOMP\n  webserver_ip:\n    type: string\n    label: Webserver IP address\n    description: IP address of the webserver that hosts the source code and binaries\n  dcae_collector_ip:\n    type: string\n    label: DCAE collector IP address\n    description: IP address of the DCAE collector\n  key_name:\n    type: string\n    label: Key pair name\n    description: Public/Private key pair name\n  pub_key:\n    type: string\n    label: Public key\n    description: Public key to be installed on the compute instance\n\nresources:\n  my_keypair:\n    type: OS::Nova::KeyPair\n    properties:\n      name: { get_param: key_name }\n      public_key: { get_param: pub_key }\n      save_private_key: false\n\n  vlb_private_network:\n    type: OS::Neutron::Net\n    properties:\n      name: { get_param: vlb_private_net_id }\n\n  vlb_private_subnet:\n    type: OS::Neutron::Subnet\n    properties:\n      name: { get_param: vlb_private_net_id }\n      network_id: { get_resource: vlb_private_network }\n      cidr: { get_param: vlb_private_net_cidr }\n\n  vlb_0:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: vlb_image_name }\n      flavor: { get_param: vlb_flavor_name }\n      name: { get_param: vlb_name_0 }\n      key_name: { get_resource: my_keypair }\n      networks:\n        - network: { get_param: public_net_id }\n        - port: { get_resource: vlb_private_0_port }\n        - port: { get_resource: vlb_private_1_port }\n      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n      user_data_format: RAW\n      user_data:\n        str_replace:\n          params:\n            __webserver__: { get_param: webserver_ip }\n            __dcae_collector_ip__: { get_param: dcae_collector_ip }\n            __local_private_ipaddr__: { get_param: vlb_private_ip_0 }\n          template: |\n            #!/bin/bash\n\n            WEBSERVER_IP=__webserver__\n            DCAE_COLLECTOR_IP=__dcae_collector_ip__\n            LOCAL_PRIVATE_IPADDR=__local_private_ipaddr__\n\n            mkdir /opt/config\n            cd /opt\n            wget http://$WEBSERVER_IP/demo_repo/v_lb_init.sh\n            wget http://$WEBSERVER_IP/demo_repo/vlb.sh\n            chmod +x v_lb_init.sh\n            chmod +x vlb.sh\n            echo $WEBSERVER_IP > config/webserver_ip.txt\n            echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt\n            echo $LOCAL_PRIVATE_IPADDR > config/local_private_ipaddr.txt\n            echo "no" > config/install.txt\n            LOCAL_PUBLIC_IPADDR=$(ifconfig eth0 | grep "inet addr" | tr -s \' \' | cut -d\' \' -f3 | cut -d\':\' -f2)\n            echo $LOCAL_PUBLIC_IPADDR > config/local_public_ipaddr.txt\n            mv vlb.sh /etc/init.d\n            update-rc.d vlb.sh defaults\n            ./v_lb_init.sh\n\n  vlb_private_0_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_resource: vlb_private_network }\n      fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}]\n\n  vlb_private_1_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_param: ecomp_private_net_id }\n      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vlb_private_ip_1 }}]\n\n  vdns_0:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: vlb_image_name }\n      flavor: { get_param: vlb_flavor_name }\n      name: { get_param: vdns_name_0 }\n      key_name: { get_resource: my_keypair }\n      networks:\n        - network: { get_param: public_net_id }\n        - port: { get_resource: vdns_private_0_port }\n        - port: { get_resource: vdns_private_1_port }\n      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n      user_data_format: RAW\n      user_data:\n        str_replace:\n          params:\n            __webserver__: { get_param: webserver_ip }\n            __lb_oam_int__ : { get_param: vlb_private_ip_1 }\n            __lb_private_ipaddr__: { get_param: vlb_private_ip_0 }\n            __local_private_ipaddr__: { get_param: vdns_private_ip_0 }\n          template: |\n            #!/bin/bash\n\n            WEBSERVER_IP=__webserver__\n            LB_OAM_INT=__lb_oam_int__\n            LB_PRIVATE_IPADDR=__lb_private_ipaddr__\n            LOCAL_PRIVATE_IPADDR=__local_private_ipaddr__\n\n            mkdir /opt/config\n            cd /opt\n            wget http://$WEBSERVER_IP/demo_repo/v_dns_init.sh\n            wget http://$WEBSERVER_IP/demo_repo/vdns.sh\n            chmod +x v_dns_init.sh\n            chmod +x vdns.sh\n            echo $WEBSERVER_IP > config/webserver_ip.txt\n            echo $LB_OAM_INT > config/lb_oam_int.txt\n            echo $LB_PRIVATE_IPADDR > config/lb_private_ipaddr.txt\n            echo $LOCAL_PRIVATE_IPADDR > config/local_private_ipaddr.txt\n            echo "no" > config/install.txt\n            mv vdns.sh /etc/init.d\n            update-rc.d vdns.sh defaults\n            ./v_dns_init.sh\n\n  vdns_private_0_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_resource: vlb_private_network }\n      fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}]\n\n  vdns_private_1_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_param: ecomp_private_net_id }\n      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vdns_private_ip_1 }}]\n',300,'Artifact-UUID1','Base VLB Heat','label','2016-11-14 13:04:07',NULL);
+INSERT INTO `heat_template` VALUES (7,'dnsscaling.yaml','1.0','DNSResource','dnsscaling.yaml','heat_template_version: 2013-05-23\n\ndescription: Heat template to deploy a vDNS for OpenECOMP (scaling-up scenario)\n\nparameters:\n  vlb_image_name:\n    type: string\n    label: Image name or ID\n    description: Image to be used for compute instance\n  vlb_flavor_name:\n    type: string\n    label: Flavor\n    description: Type of instance (flavor) to be used\n  public_net_id:\n    type: string\n    label: Public network name or ID\n    description: Public network that enables remote connection to VNF\n  vlb_private_net_id:\n    type: string\n    label: vLoadBalancer private network name or ID\n    description: Private network that connects vLoadBalancer with vDNSs\n  ecomp_private_net_id:\n    type: string\n    label: ECOMP management network name or ID\n    description: Private network that connects ECOMP component and the VNF\n  vlb_private_ip_0:\n    type: string\n    label: vLoadBalancer private IP address towards the private network\n    description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs\n  vlb_private_ip_1:\n    type: string\n    label: vLoadBalancer private IP address towards the ECOMP management network\n    description: Private IP address that is assigned to the vLoadBalancer to communicate with ECOMP components\n  vdns_private_ip_0:\n    type: string\n    label: vDNS private IP address towards the private network\n    description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer\n  vdns_private_ip_1:\n    type: string\n    label: vDNS private IP address towards the ECOMP management network\n    description: Private IP address that is assigned to the vDNS to communicate with ECOMP components\n  vdns_name_0:\n    type: string\n    label: vDNS name\n    description: Name of the vDNS\n  vnf_id:\n    type: string\n    label: VNF ID\n    description: The VNF ID is provided by ECOMP\n  vf_module_id:\n    type: string\n    label: vFirewall module ID\n    description: The vLoadBalancer Module ID is provided by ECOMP\n  webserver_ip:\n    type: string\n    label: Webserver IP address\n    description: IP address of the webserver that hosts the source code and binaries\n  dcae_collector_ip:\n    type: string\n    label: DCAE collector IP address\n    description: IP address of the DCAE collector\n  key_name:\n    type: string\n    label: Key pair name\n    description: Public/Private key pair name\n  pub_key:\n    type: string\n    label: Public key\n    description: Public key to be installed on the compute instance\n\nresources:\n  vdns_0:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: vlb_image_name }\n      flavor: { get_param: vlb_flavor_name }\n      name: { get_param: vdns_name_0 }\n      key_name: { get_param: key_name }\n      networks:\n        - network: { get_param: public_net_id }\n        - port: { get_resource: vdns_private_0_port }\n        - port: { get_resource: vdns_private_1_port }\n      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n      user_data_format: RAW\n      user_data:\n        str_replace:\n          params:\n            __webserver__: { get_param: webserver_ip }\n            __lb_oam_int__ : { get_param: vlb_private_ip_1 }\n            __lb_private_ipaddr__: { get_param: vlb_private_ip_0 }\n            __local_private_ipaddr__: { get_param: vdns_private_ip_0 }\n          template: |\n            #!/bin/bash\n\n            WEBSERVER_IP=__webserver__\n            LB_OAM_INT=__lb_oam_int__\n            LB_PRIVATE_IPADDR=__lb_private_ipaddr__\n            LOCAL_PRIVATE_IPADDR=__local_private_ipaddr__\n\n            mkdir /opt/config\n            cd /opt\n            wget http://$WEBSERVER_IP/demo_repo/v_dns_init.sh\n            wget http://$WEBSERVER_IP/demo_repo/vdns.sh\n            chmod +x v_dns_init.sh\n            chmod +x vdns.sh\n            echo $WEBSERVER_IP > config/webserver_ip.txt\n            echo $LB_OAM_INT > config/lb_oam_int.txt\n            echo $LB_PRIVATE_IPADDR > config/lb_private_ipaddr.txt\n            echo $LOCAL_PRIVATE_IPADDR > config/local_private_ipaddr.txt\n            echo "no" > config/install.txt\n            mv vdns.sh /etc/init.d\n            update-rc.d vdns.sh defaults\n            ./v_dns_init.sh\n\n  vdns_private_0_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_param: vlb_private_net_id }\n      fixed_ips: [{"subnet": { get_param: vlb_private_net_id }, "ip_address": { get_param: vdns_private_ip_0 }}]\n\n  vdns_private_1_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_param: ecomp_private_net_id }\n      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vdns_private_ip_1 }}]\n',300,'Artifact-UUID2','DNS Scaling Heat','label','2016-11-14 13:04:07',NULL);
+/*!40000 ALTER TABLE `heat_template` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `heat_template_params` WRITE;
+/*!40000 ALTER TABLE `heat_template_params` DISABLE KEYS */;
+INSERT INTO `heat_template_params` VALUES (110,6,'vlb_flavor_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (111,6,'vlb_private_ip_1','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (112,6,'dcae_collector_ip','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (113,6,'vlb_private_net_cidr','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (114,6,'ecomp_private_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (115,6,'vnf_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (116,6,'key_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (117,6,'pub_key','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (118,6,'vlb_private_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (119,6,'webserver_ip','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (120,6,'vdns_private_ip_1','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (121,6,'public_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (122,6,'vlb_private_ip_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (123,6,'vlb_name_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (124,6,'vdns_private_ip_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (125,6,'vdsn_name_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (126,6,'ecomp_private_net_cidr','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (127,6,'vf_module_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (128,6,'vlb_image_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (129,7,'vnf_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (130,7,'vf_module_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (131,7,'vlb_flavor_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (132,7,'vlb_image_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (133,7,'vdns_private_ip_1','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (134,7,'dcae_collector_ip','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (135,7,'webserver_ip','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (136,7,'vlb_private_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (137,7,'vdns_private_ip_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (138,7,'vdsn_name_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (139,7,'vlb_private_ip_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (140,7,'pub_key','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (141,7,'public_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (142,7,'key_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (143,7,'ecomp_private_net_id','\1','string',NULL);
+/*!40000 ALTER TABLE `heat_template_params` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `service` WRITE;
+/*!40000 ALTER TABLE `service` DISABLE KEYS */;
+INSERT INTO `service` VALUES (10,'dns-service','1.0','dns service for unit test','1e34774e-715e-4fd6-bd09-7b654622f35i',NULL,NULL,'2016-11-14 13:04:07','585822c8-4027-4f84-ba50-e9248606f111');
+/*!40000 ALTER TABLE `service` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `vf_module` WRITE;
+/*!40000 ALTER TABLE `vf_module` DISABLE KEYS */;
+INSERT INTO `vf_module` VALUES (7,'dns-service/DNSResource-1::VF_RI1_DNS::module-1','1.0','VF_RI1_DNS::module-1','1.0','1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI1_DNS::module-1::module-1.group',NULL,6,1,'2016-11-14 13:04:07',NULL,NULL,6,3,'585822c7-4027-4f84-ba50-e9248606f132');
+INSERT INTO `vf_module` VALUES (8,'dns-service/DNSResource-1::VF_RI1_DNS::module-2','1.0','VF_RI1_DNS::module-2','1.0','1e34774e-715e-4fd5-bd08-7b654622f33e.VF_RI1_DNS::module-2::module-1.group',NULL,7,0,'2016-11-14 13:04:07',NULL,NULL,6,4,'585822c7-4027-4f84-ba50-e9248606f133');
+/*!40000 ALTER TABLE `vf_module` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `vnf_resource` WRITE;
+/*!40000 ALTER TABLE `vnf_resource` DISABLE KEYS */;
+INSERT INTO `vnf_resource` VALUES (6,'dns-service/DNSResource-1','1.0','HEAT','dns service for unit test',NULL,NULL,'2016-11-14 13:04:07','585822c7-4027-4f84-ba50-e9248606f131',NULL,NULL,'585822c7-4027-4f84-ba50-e9248606f112','1.0','DNSResource-1','DNSResource','585822c8-4027-4f84-ba50-e9248606f111');
+/*!40000 ALTER TABLE `vnf_resource` ENABLE KEYS */;
+UNLOCK TABLES;
\ No newline at end of file
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/demo-vfw/create_mso_db-demo-vfw.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/bulkload-files/demo-vfw/create_mso_db-demo-vfw.sql
new file mode 100644 (file)
index 0000000..e61abae
--- /dev/null
@@ -0,0 +1,73 @@
+SOURCE ../default/create_mso_db-default.sql
+
+USE `mso_requests`;
+DROP USER 'mso';
+CREATE USER 'mso';
+GRANT ALL on mso_requests.* to 'mso' identified by 'mso123' with GRANT OPTION;
+FLUSH PRIVILEGES;
+
+USE `mso_catalog`;
+DROP USER 'catalog';
+CREATE USER 'catalog';
+GRANT ALL on mso_catalog.* to 'catalog' identified by 'catalog123' with GRANT OPTION;
+FLUSH PRIVILEGES;
+
+LOCK TABLES `heat_environment` WRITE;
+/*!40000 ALTER TABLE `heat_environment` DISABLE KEYS */;
+INSERT INTO `heat_environment` VALUES (5,'base_vfw.env','1.0','vfw-service/VFWResource-1','base_vfw ENV file','parameters:\n  vfw_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)\n  vfw_flavor_name: 4 GB General Purpose v1\n  public_net_id: 00000000-0000-0000-0000-000000000000\n  unprotected_private_net_id: zdfw1fwl01_unprotected\n  protected_private_net_id: zdfw1fwl01_protected\n  ecomp_private_net_id: oam_ecomp\n  unprotected_private_net_cidr: 192.168.10.0/24\n  protected_private_net_cidr: 192.168.20.0/24\n  ecomp_private_net_cidr: 192.168.9.0/24\n  vfw_private_ip_0: 192.168.10.100\n  vfw_private_ip_1: 192.168.20.100\n  vfw_private_ip_2: 192.168.9.100\n  vpg_private_ip_0: 192.168.10.200\n  vpg_private_ip_1: 192.168.9.200\n  vsn_private_ip_0: 192.168.20.250\n  vsn_private_ip_1: 192.168.9.250\n  vfw_name_0: zdfw1fwl01fwl01\n  vpg_name_0: zdfw1fwl01pgn01\n  vsn_name_0: zdfw1fwl01snk01\n  vnf_id: vFirewall_demo_app\n  vf_module_id: vFirewall\n  webserver_ip: 162.242.237.182\n  dcae_collector_ip: 192.168.9.1\n  key_name: vfw_key\n  pub_key: INSERT YOUR PUBLIC KEY HERE','2016-11-14 13:04:07','EnvArtifact-UUID3','Label');
+/*!40000 ALTER TABLE `heat_environment` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `heat_template` WRITE;
+/*!40000 ALTER TABLE `heat_template` DISABLE KEYS */;
+INSERT INTO `heat_template` VALUES (8,'base_vfw.yaml','1.0','VFWResource','base_vfw.yaml','heat_template_version: 2013-05-23\n\ndescription: Heat template to deploy vFirewall demo app for OpenECOMP\n\nparameters:\n  vfw_image_name:\n    type: string\n    label: Image name or ID\n    description: Image to be used for compute instance\n  vfw_flavor_name:\n    type: string\n    label: Flavor\n    description: Type of instance (flavor) to be used\n  public_net_id:\n    type: string\n    label: Public network name or ID\n    description: Public network that enables remote connection to VNF\n  unprotected_private_net_id:\n    type: string\n    label: Unprotected private network name or ID\n    description: Private network that connects vPacketGenerator with vFirewall\n  protected_private_net_id:\n    type: string\n    label: Protected private network name or ID\n    description: Private network that connects vFirewall with vSink\n  ecomp_private_net_id:\n    type: string\n    label: ECOMP management network name or ID\n    description: Private network that connects ECOMP component and the VNF\n  unprotected_private_net_cidr:\n    type: string\n    label: Unprotected private network CIDR\n    description: The CIDR of the unprotected private network\n  protected_private_net_cidr:\n    type: string\n    label: Protected private network CIDR\n    description: The CIDR of the protected private network\n  ecomp_private_net_cidr:\n    type: string\n    label: ECOMP private network CIDR\n    description: The CIDR of the protected private network\n  vfw_private_ip_0:\n    type: string\n    label: vFirewall private IP address towards the unprotected network\n    description: Private IP address that is assigned to the vFirewall to communicate with the vPacketGenerator\n  vfw_private_ip_1:\n    type: string\n    label: vFirewall private IP address towards the protected network\n    description: Private IP address that is assigned to the vFirewall to communicate with the vSink\n  vfw_private_ip_2:\n    type: string\n    label: vFirewall private IP address towards the ECOMP management network\n    description: Private IP address that is assigned to the vFirewall to communicate with ECOMP components\n  vpg_private_ip_0:\n    type: string\n    label: vPacketGenerator private IP address towards the unprotected network\n    description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall\n  vpg_private_ip_1:\n    type: string\n    label: vPacketGenerator private IP address towards the ECOMP management network\n    description: Private IP address that is assigned to the vPacketGenerator to communicate with ECOMP components\n  vsn_private_ip_0:\n    type: string\n    label: vSink private IP address towards the protected network\n    description: Private IP address that is assigned to the vSink to communicate with the vFirewall\n  vsn_private_ip_1:\n    type: string\n    label: vSink private IP address towards the ECOMP management network\n    description: Private IP address that is assigned to the vSink to communicate with ECOMP components\n  vfw_name_0:\n    type: string\n    label: vFirewall name\n    description: Name of the vFirewall\n  vpg_name_0:\n    type: string\n    label: vPacketGenerator name\n    description: Name of the vPacketGenerator\n  vsn_name_0:\n    type: string\n    label: vSink name\n    description: Name of the vSink\n  vnf_id:\n    type: string\n    label: VNF ID\n    description: The VNF ID is provided by ECOMP\n  vf_module_id:\n    type: string\n    label: vFirewall module ID\n    description: The vFirewall Module ID is provided by ECOMP\n  webserver_ip:\n    type: string\n    label: Webserver IP address\n    description: IP address of the webserver that hosts the source code and binaries\n  dcae_collector_ip:\n    type: string\n    label: DCAE collector IP address\n    description: IP address of the DCAE collector\n  key_name:\n    type: string\n    label: Key pair name\n    description: Public/Private key pair name\n  pub_key:\n    type: string\n    label: Public key\n    description: Public key to be installed on the compute instance\n\nresources:\n  my_keypair:\n    type: OS::Nova::KeyPair\n    properties:\n      name: { get_param: key_name }\n      public_key: { get_param: pub_key }\n      save_private_key: false\n\n  unprotected_private_network:\n    type: OS::Neutron::Net\n    properties:\n      name: { get_param: unprotected_private_net_id }\n\n  protected_private_network:\n    type: OS::Neutron::Net\n    properties:\n      name: { get_param: protected_private_net_id }\n\n  unprotected_private_subnet:\n    type: OS::Neutron::Subnet\n    properties:\n      network_id: { get_resource: unprotected_private_network }\n      cidr: { get_param: unprotected_private_net_cidr }\n\n  protected_private_subnet:\n    type: OS::Neutron::Subnet\n    properties:\n      network_id: { get_resource: protected_private_network }\n      cidr: { get_param: protected_private_net_cidr }\n\n  vfw_0:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: vfw_image_name }\n      flavor: { get_param: vfw_flavor_name }\n      name: { get_param: vfw_name_0 }\n      key_name: { get_resource: my_keypair }\n      networks:\n        - network: { get_param: public_net_id }\n        - port: { get_resource: vfw_private_0_port }\n        - port: { get_resource: vfw_private_1_port }\n        - port: { get_resource: vfw_private_2_port }\n      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n      user_data_format: RAW\n      user_data:\n        str_replace:\n          params:\n            __webserver__: { get_param: webserver_ip }\n            __dcae_collector_ip__ : { get_param: dcae_collector_ip }\n          template: |\n            #!/bin/bash\n\n            WEBSERVER_IP=__webserver__\n            DCAE_COLLECTOR_IP=__dcae_collector_ip__\n\n            mkdir /opt/config\n            cd /opt\n            wget http://$WEBSERVER_IP/demo_repo/v_firewall_init.sh\n            wget http://$WEBSERVER_IP/demo_repo/vfirewall.sh\n            chmod +x v_firewall_init.sh\n            chmod +x vfirewall.sh\n            echo $WEBSERVER_IP > config/webserver_ip.txt\n            echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt\n            echo "no" > config/install.txt\n            mv vfirewall.sh /etc/init.d\n            sudo update-rc.d vfirewall.sh defaults\n            ./v_firewall_init.sh\n\n  vfw_private_0_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_resource: unprotected_private_network }\n      fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}]\n\n  vfw_private_1_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_resource: protected_private_network }\n      fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}]\n\n  vfw_private_2_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_param: ecomp_private_net_id }\n      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vfw_private_ip_2 }}]\n\n  vpg_0:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: vfw_image_name }\n      flavor: { get_param: vfw_flavor_name }\n      name: { get_param: vpg_name_0 }\n      key_name: { get_resource: my_keypair }\n      networks:\n        - network: { get_param: public_net_id }\n        - port: { get_resource: vpg_private_0_port }\n        - port: { get_resource: vpg_private_1_port }\n      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n      user_data_format: RAW\n      user_data:\n        str_replace:\n          params:\n            __webserver__: { get_param: webserver_ip }\n            __fw_ipaddr__: { get_param: vfw_private_ip_0 }\n            __protected_net_cidr__: { get_param: protected_private_net_cidr }\n            __sink_ipaddr__: { get_param: vsn_private_ip_0 }\n          template: |\n            #!/bin/bash\n\n            WEBSERVER_IP=__webserver__\n            FW_IPADDR=__fw_ipaddr__\n            PROTECTED_NET_CIDR=__protected_net_cidr__\n            SINK_IPADDR=__sink_ipaddr__\n\n            mkdir /opt/config\n            cd /opt\n            wget http://$WEBSERVER_IP/demo_repo/v_packetgen_init.sh\n            wget http://$WEBSERVER_IP/demo_repo/vpacketgen.sh\n            chmod +x v_packetgen_init.sh\n            chmod +x vpacketgen.sh\n            echo $WEBSERVER_IP > config/webserver_ip.txt\n            echo $FW_IPADDR > config/fw_ipaddr.txt\n            echo $PROTECTED_NET_CIDR > config/protected_net_cidr.txt\n            echo $SINK_IPADDR > config/sink_ipaddr.txt\n            echo "no" > config/install.txt\n            mv vpacketgen.sh /etc/init.d\n            sudo update-rc.d vpacketgen.sh defaults\n            ./v_packetgen_init.sh\n\n  vpg_private_0_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_resource: unprotected_private_network }\n      fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]\n\n  vpg_private_1_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_param: ecomp_private_net_id }\n      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vpg_private_ip_1 }}]\n\n  vsn_0:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: vfw_image_name }\n      flavor: { get_param: vfw_flavor_name }\n      name: { get_param: vsn_name_0 }\n      key_name: { get_resource: my_keypair }\n      networks:\n        - network: { get_param: public_net_id }\n        - port: { get_resource: vsn_private_0_port }\n        - port: { get_resource: vsn_private_1_port }\n      metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}\n      user_data_format: RAW\n      user_data:\n        str_replace:\n          params:\n            __webserver__: { get_param: webserver_ip }\n            __protected_net_gw__: { get_param: vfw_private_ip_1 }\n            __unprotected_net__: { get_param: unprotected_private_net_cidr }\n          template: |\n            #!/bin/bash\n\n            WEBSERVER_IP=__webserver__\n            PROTECTED_NET_GW=__protected_net_gw__\n            UNPROTECTED_NET=__unprotected_net__\n            UNPROTECTED_NET=$(echo $UNPROTECTED_NET | cut -d\'/\' -f1)\n\n            mkdir /opt/config\n            cd /opt\n            wget http://$WEBSERVER_IP/demo_repo/v_sink_init.sh\n            wget http://$WEBSERVER_IP/demo_repo/vsink.sh\n            chmod +x v_sink_init.sh\n            chmod +x vsink.sh\n            echo $PROTECTED_NET_GW > config/protected_net_gw.txt\n            echo $UNPROTECTED_NET > config/unprotected_net.txt\n            echo "no" > config/install.txt\n            mv vsink.sh /etc/init.d\n            sudo update-rc.d vsink.sh defaults\n            ./v_sink_init.sh\n\n  vsn_private_0_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_resource: protected_private_network }\n      fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}]\n\n  vsn_private_1_port:\n    type: OS::Neutron::Port\n    properties:\n      network: { get_param: ecomp_private_net_id }\n      fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vsn_private_ip_1 }}]\n \n',300,'Artifact-UUID3','Base VFW Heat','label','2016-11-14 13:04:07',NULL);
+/*!40000 ALTER TABLE `heat_template` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `heat_template_params` WRITE;
+/*!40000 ALTER TABLE `heat_template_params` DISABLE KEYS */;
+INSERT INTO `heat_template_params` VALUES (144,8,'vsn_private_ip_1','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (145,8,'ecomp_private_net_cidr','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (146,8,'public_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (147,8,'unprotected_private_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (148,8,'webserver_ip','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (149,8,'vfw_image_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (150,8,'vnf_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (151,8,'dcae_collector_ip','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (152,8,'protected_private_net_cidr','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (153,8,'vsn_private_ip_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (154,8,'vfw_private_ip_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (155,8,'vfw_private_ip_1','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (156,8,'vfw_private_ip_2','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (157,8,'unprotected_private_net_cidr','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (158,8,'vsn_name_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (159,8,'ecomp_private_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (160,8,'vpg_private_ip_1','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (161,8,'vpg_name_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (162,8,'vf_module_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (163,8,'pub_key','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (164,8,'protected_private_net_id','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (165,8,'key_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (166,8,'vfw_flavor_name','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (167,8,'vpg_private_ip_0','\1','string',NULL);
+INSERT INTO `heat_template_params` VALUES (168,8,'vfw_name_0','\1','string',NULL);
+/*!40000 ALTER TABLE `heat_template_params` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `service` WRITE;
+/*!40000 ALTER TABLE `service` DISABLE KEYS */;
+INSERT INTO `service` VALUES (11,'vfw-service','1.0','VFW service','2e34774e-715e-4fd5-bd09-7b654622f35i',NULL,NULL,'2016-11-14 13:04:07','585822c7-4027-4f84-ba50-e9248606f112');
+/*!40000 ALTER TABLE `service` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `vf_module` WRITE;
+/*!40000 ALTER TABLE `vf_module` DISABLE KEYS */;
+INSERT INTO `vf_module` VALUES (9,'vfw-service/VFWResource-1::VF_RI1_VFW::module-1','1.0','VF_RI1_VFW::module-1','1.0','1e34774e-715e-4fd5-bd08-7b654622f33f.VF_RI1_VFW::module-1::module-1.group',NULL,8,1,'2016-11-14 13:04:07',NULL,NULL,7,5,'585822c7-4027-4f84-ba50-e9248606f134');
+/*!40000 ALTER TABLE `vf_module` ENABLE KEYS */;
+UNLOCK TABLES;
+
+LOCK TABLES `vnf_resource` WRITE;
+/*!40000 ALTER TABLE `vnf_resource` DISABLE KEYS */;
+INSERT INTO `vnf_resource` VALUES (7,'vfw-service/VFWResource-1','1.0','HEAT','VFW service',NULL,NULL,'2016-11-14 13:04:07','685822c7-4027-4f84-ba50-e9248606f132',NULL,NULL,'585822c7-4027-4f84-ba50-e9248606f113','1.0','VFWResource-1','VFWResource','585822c7-4027-4f84-ba50-e9248606f112');
+/*!40000 ALTER TABLE `vnf_resource` ENABLE KEYS */;
+UNLOCK TABLES;
\ No newline at end of file
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_create_camunda_admin.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_create_camunda_admin.sql
new file mode 100644 (file)
index 0000000..3beeaf1
--- /dev/null
@@ -0,0 +1,9 @@
+USE camundabpmn;\r
+\r
+INSERT INTO `act_id_user` VALUES ('admin',1,'admin','user','camundaadmin@openecomp.org','{SHA}Y7MVubSDgzJeaulJRLN2dFyNCyc=',NULL);\r
+\r
+INSERT INTO `act_id_group` VALUES ('camunda-admin',1,'camunda BPM Administrators','SYSTEM');\r
+\r
+INSERT INTO `act_id_membership` VALUES ('admin','camunda-admin');\r
+\r
+INSERT INTO `act_ru_authorization` VALUES ('4ca68335-b7c5-11e6-b411-0242ac110003',1,1,NULL,'admin',1,'admin',2147483647),('4ca91b46-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,2,'camunda-admin',2),('4cab3e27-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,0,'*',2147483647),('4cadd638-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,1,'*',2147483647),('4caf0eb9-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,2,'*',2147483647),('4caff91a-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,3,'*',2147483647),('4cb10a8b-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,4,'*',2147483647),('4cb2430c-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,5,'*',2147483647),('4cb32d6d-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,6,'*',2147483647),('4cb43ede-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,7,'*',2147483647),('4cb5293f-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,8,'*',2147483647),('4cb5ec90-b7c5-11e6-b411-0242ac110003',1,1,'camunda-admin',NULL,9,'*',2147483647);\r
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_engine_7.3.0.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_engine_7.3.0.sql
new file mode 100644 (file)
index 0000000..c25acf1
--- /dev/null
@@ -0,0 +1,748 @@
+# Start of Statements added for MSO
+DROP DATABASE IF EXISTS `camundabpmn`;
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `camundabpmn` /*!40100 DEFAULT CHARACTER SET latin1 */;
+
+USE `camundabpmn`;
+
+# DROP USER IF EXISTS 'camunda';
+delete from mysql.user where User='camunda';
+CREATE USER 'camunda';
+GRANT ALL on camundabpmn.* to 'camunda' identified by 'camunda123' with GRANT OPTION;
+FLUSH PRIVILEGES;
+# End of Statements added for MSO
+
+create table ACT_GE_PROPERTY (
+    NAME_ varchar(64),
+    VALUE_ varchar(300),
+    REV_ integer,
+    primary key (NAME_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+insert into ACT_GE_PROPERTY
+values ('schema.version', 'fox', 1);
+
+insert into ACT_GE_PROPERTY
+values ('schema.history', 'create(fox)', 1);
+
+insert into ACT_GE_PROPERTY
+values ('next.dbid', '1', 1);
+
+insert into ACT_GE_PROPERTY
+values ('deployment.lock', '0', 1);
+
+create table ACT_GE_BYTEARRAY (
+    ID_ varchar(64),
+    REV_ integer,
+    NAME_ varchar(255),
+    DEPLOYMENT_ID_ varchar(64),
+    BYTES_ LONGBLOB,
+    GENERATED_ TINYINT,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RE_DEPLOYMENT (
+    ID_ varchar(64),
+    NAME_ varchar(255),
+    DEPLOY_TIME_ timestamp,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_EXECUTION (
+    ID_ varchar(64),
+    REV_ integer,
+    PROC_INST_ID_ varchar(64),
+    BUSINESS_KEY_ varchar(255),
+    PARENT_ID_ varchar(64),
+    PROC_DEF_ID_ varchar(64),
+    SUPER_EXEC_ varchar(64),
+    SUPER_CASE_EXEC_ varchar(64),
+    CASE_INST_ID_ varchar(64),
+    ACT_ID_ varchar(255),
+    ACT_INST_ID_ varchar(64),
+    IS_ACTIVE_ TINYINT,
+    IS_CONCURRENT_ TINYINT,
+    IS_SCOPE_ TINYINT,
+    IS_EVENT_SCOPE_ TINYINT,
+    SUSPENSION_STATE_ integer,
+    CACHED_ENT_STATE_ integer,
+    SEQUENCE_COUNTER_ bigint,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_JOB (
+    ID_ varchar(64) NOT NULL,
+       REV_ integer,
+    TYPE_ varchar(255) NOT NULL,
+    LOCK_EXP_TIME_ timestamp NULL,
+    LOCK_OWNER_ varchar(255),
+    EXCLUSIVE_ boolean,
+    EXECUTION_ID_ varchar(64),
+    PROCESS_INSTANCE_ID_ varchar(64),
+    PROCESS_DEF_ID_ varchar(64),
+    PROCESS_DEF_KEY_ varchar(64),
+    RETRIES_ integer,
+    EXCEPTION_STACK_ID_ varchar(64),
+    EXCEPTION_MSG_ varchar(4000),
+    DUEDATE_ timestamp NULL,
+    REPEAT_ varchar(255),
+    HANDLER_TYPE_ varchar(255),
+    HANDLER_CFG_ varchar(4000),
+    DEPLOYMENT_ID_ varchar(64),
+    SUSPENSION_STATE_ integer,
+    JOB_DEF_ID_ varchar(64),
+    SEQUENCE_COUNTER_ bigint,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_JOBDEF (
+    ID_ varchar(64) NOT NULL,
+    REV_ integer,
+    PROC_DEF_ID_ varchar(64) NOT NULL,
+    PROC_DEF_KEY_ varchar(255) NOT NULL,
+    ACT_ID_ varchar(255) NOT NULL,
+    JOB_TYPE_ varchar(255) NOT NULL,
+    JOB_CONFIGURATION_ varchar(255),
+    SUSPENSION_STATE_ integer,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RE_PROCDEF (
+    ID_ varchar(64) not null,
+    REV_ integer,
+    CATEGORY_ varchar(255),
+    NAME_ varchar(255),
+    KEY_ varchar(255) not null,
+    VERSION_ integer not null,
+    DEPLOYMENT_ID_ varchar(64),
+    RESOURCE_NAME_ varchar(4000),
+    DGRM_RESOURCE_NAME_ varchar(4000),
+    HAS_START_FORM_KEY_ TINYINT,
+    SUSPENSION_STATE_ integer,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_TASK (
+    ID_ varchar(64),
+    REV_ integer,
+    EXECUTION_ID_ varchar(64),
+    PROC_INST_ID_ varchar(64),
+    PROC_DEF_ID_ varchar(64),
+    CASE_EXECUTION_ID_ varchar(64),
+    CASE_INST_ID_ varchar(64),
+    CASE_DEF_ID_ varchar(64),
+    NAME_ varchar(255),
+    PARENT_TASK_ID_ varchar(64),
+    DESCRIPTION_ varchar(4000),
+    TASK_DEF_KEY_ varchar(255),
+    OWNER_ varchar(255),
+    ASSIGNEE_ varchar(255),
+    DELEGATION_ varchar(64),
+    PRIORITY_ integer,
+    CREATE_TIME_ timestamp,
+    DUE_DATE_ datetime,
+    FOLLOW_UP_DATE_ datetime,
+    SUSPENSION_STATE_ integer,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_IDENTITYLINK (
+    ID_ varchar(64),
+    REV_ integer,
+    GROUP_ID_ varchar(255),
+    TYPE_ varchar(255),
+    USER_ID_ varchar(255),
+    TASK_ID_ varchar(64),
+    PROC_DEF_ID_ varchar(64),
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_VARIABLE (
+    ID_ varchar(64) not null,
+    REV_ integer,
+    TYPE_ varchar(255) not null,
+    NAME_ varchar(255) not null,
+    EXECUTION_ID_ varchar(64),
+    PROC_INST_ID_ varchar(64),
+    CASE_EXECUTION_ID_ varchar(64),
+    CASE_INST_ID_ varchar(64),
+    TASK_ID_ varchar(64),
+    BYTEARRAY_ID_ varchar(64),
+    DOUBLE_ double,
+    LONG_ bigint,
+    TEXT_ varchar(4000),
+    TEXT2_ varchar(4000),
+    VAR_SCOPE_ varchar(64) not null,
+    SEQUENCE_COUNTER_ bigint,
+    IS_CONCURRENT_LOCAL_ TINYINT,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_EVENT_SUBSCR (
+    ID_ varchar(64) not null,
+    REV_ integer,
+    EVENT_TYPE_ varchar(255) not null,
+    EVENT_NAME_ varchar(255),
+    EXECUTION_ID_ varchar(64),
+    PROC_INST_ID_ varchar(64),
+    ACTIVITY_ID_ varchar(64),
+    CONFIGURATION_ varchar(255),
+    CREATED_ timestamp not null,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_INCIDENT (
+  ID_ varchar(64) not null,
+  REV_ integer not null,
+  INCIDENT_TIMESTAMP_ timestamp not null,
+  INCIDENT_MSG_ varchar(4000),
+  INCIDENT_TYPE_ varchar(255) not null,
+  EXECUTION_ID_ varchar(64),
+  ACTIVITY_ID_ varchar(255),
+  PROC_INST_ID_ varchar(64),
+  PROC_DEF_ID_ varchar(64),
+  CAUSE_INCIDENT_ID_ varchar(64),
+  ROOT_CAUSE_INCIDENT_ID_ varchar(64),
+  CONFIGURATION_ varchar(255),
+  primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_AUTHORIZATION (
+  ID_ varchar(64) not null,
+  REV_ integer not null,
+  TYPE_ integer not null,
+  GROUP_ID_ varchar(255),
+  USER_ID_ varchar(255),
+  RESOURCE_TYPE_ integer not null,
+  RESOURCE_ID_ varchar(64),
+  PERMS_ integer,
+  primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_FILTER (
+  ID_ varchar(64) not null,
+  REV_ integer not null,
+  RESOURCE_TYPE_ varchar(255) not null,
+  NAME_ varchar(255) not null,
+  OWNER_ varchar(255),
+  QUERY_ LONGTEXT not null,
+  PROPERTIES_ LONGTEXT,
+  primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_METER_LOG (
+  ID_ varchar(64) not null,
+  NAME_ varchar(64) not null,
+  VALUE_ bigint,
+  TIMESTAMP_ timestamp not null,
+  primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_);
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+create index ACT_IDX_TASK_ASSIGNEE on ACT_RU_TASK(ASSIGNEE_);
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
+create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
+create index ACT_IDX_INC_CONFIGURATION on ACT_RU_INCIDENT(CONFIGURATION_);
+create index ACT_IDX_JOB_PROCINST on ACT_RU_JOB(PROCESS_INSTANCE_ID_);
+create index ACT_IDX_METER_LOG on ACT_RU_METER_LOG(NAME_,TIMESTAMP_);
+
+alter table ACT_GE_BYTEARRAY
+    add constraint ACT_FK_BYTEARR_DEPL
+    foreign key (DEPLOYMENT_ID_)
+    references ACT_RE_DEPLOYMENT (ID_);
+
+alter table ACT_RE_PROCDEF
+    add constraint ACT_UNIQ_PROCDEF
+    unique (KEY_,VERSION_);
+
+alter table ACT_RU_EXECUTION
+    add constraint ACT_FK_EXE_PROCINST
+    foreign key (PROC_INST_ID_)
+    references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade;
+
+alter table ACT_RU_EXECUTION
+    add constraint ACT_FK_EXE_PARENT
+    foreign key (PARENT_ID_)
+    references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_EXECUTION
+    add constraint ACT_FK_EXE_SUPER
+    foreign key (SUPER_EXEC_)
+    references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_EXECUTION
+    add constraint ACT_FK_EXE_PROCDEF
+    foreign key (PROC_DEF_ID_)
+    references ACT_RE_PROCDEF (ID_);
+
+alter table ACT_RU_IDENTITYLINK
+    add constraint ACT_FK_TSKASS_TASK
+    foreign key (TASK_ID_)
+    references ACT_RU_TASK (ID_);
+
+alter table ACT_RU_IDENTITYLINK
+    add constraint ACT_FK_ATHRZ_PROCEDEF
+    foreign key (PROC_DEF_ID_)
+    references ACT_RE_PROCDEF(ID_);
+
+alter table ACT_RU_TASK
+    add constraint ACT_FK_TASK_EXE
+    foreign key (EXECUTION_ID_)
+    references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_TASK
+    add constraint ACT_FK_TASK_PROCINST
+    foreign key (PROC_INST_ID_)
+    references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_TASK
+  add constraint ACT_FK_TASK_PROCDEF
+  foreign key (PROC_DEF_ID_)
+  references ACT_RE_PROCDEF (ID_);
+
+alter table ACT_RU_VARIABLE
+    add constraint ACT_FK_VAR_EXE
+    foreign key (EXECUTION_ID_)
+    references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_VARIABLE
+    add constraint ACT_FK_VAR_PROCINST
+    foreign key (PROC_INST_ID_)
+    references ACT_RU_EXECUTION(ID_);
+
+alter table ACT_RU_VARIABLE
+    add constraint ACT_FK_VAR_BYTEARRAY
+    foreign key (BYTEARRAY_ID_)
+    references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+    add constraint ACT_FK_JOB_EXCEPTION
+    foreign key (EXCEPTION_STACK_ID_)
+    references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EVENT_SUBSCR
+    add constraint ACT_FK_EVENT_EXEC
+    foreign key (EXECUTION_ID_)
+    references ACT_RU_EXECUTION(ID_);
+
+alter table ACT_RU_INCIDENT
+    add constraint ACT_FK_INC_EXE
+    foreign key (EXECUTION_ID_)
+    references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_INCIDENT
+    add constraint ACT_FK_INC_PROCINST
+    foreign key (PROC_INST_ID_)
+    references ACT_RU_EXECUTION (ID_);
+
+alter table ACT_RU_INCIDENT
+    add constraint ACT_FK_INC_PROCDEF
+    foreign key (PROC_DEF_ID_)
+    references ACT_RE_PROCDEF (ID_);
+
+alter table ACT_RU_INCIDENT
+    add constraint ACT_FK_INC_CAUSE
+    foreign key (CAUSE_INCIDENT_ID_)
+    references ACT_RU_INCIDENT (ID_) on delete cascade on update cascade;
+
+alter table ACT_RU_INCIDENT
+    add constraint ACT_FK_INC_RCAUSE
+    foreign key (ROOT_CAUSE_INCIDENT_ID_)
+    references ACT_RU_INCIDENT (ID_) on delete cascade on update cascade;
+
+alter table ACT_RU_AUTHORIZATION
+    add constraint ACT_UNIQ_AUTH_USER
+    unique (USER_ID_,TYPE_,RESOURCE_TYPE_,RESOURCE_ID_);
+
+alter table ACT_RU_AUTHORIZATION
+    add constraint ACT_UNIQ_AUTH_GROUP
+    unique (GROUP_ID_,TYPE_,RESOURCE_TYPE_,RESOURCE_ID_);
+
+alter table ACT_RU_VARIABLE
+    add constraint ACT_UNIQ_VARIABLE
+    unique (VAR_SCOPE_, NAME_);
+
+-- indexes for deadlock problems - https://app.camunda.com/jira/browse/CAM-2567 --
+create index ACT_IDX_INC_CAUSEINCID on ACT_RU_INCIDENT(CAUSE_INCIDENT_ID_);
+create index ACT_IDX_INC_EXID on ACT_RU_INCIDENT(EXECUTION_ID_);
+create index ACT_IDX_INC_PROCDEFID on ACT_RU_INCIDENT(PROC_DEF_ID_);
+create index ACT_IDX_INC_PROCINSTID on ACT_RU_INCIDENT(PROC_INST_ID_);
+create index ACT_IDX_INC_ROOTCAUSEINCID on ACT_RU_INCIDENT(ROOT_CAUSE_INCIDENT_ID_);
+-- create case definition table --
+create table ACT_RE_CASE_DEF (
+    ID_ varchar(64) not null,
+    REV_ integer,
+    CATEGORY_ varchar(255),
+    NAME_ varchar(255),
+    KEY_ varchar(255) not null,
+    VERSION_ integer not null,
+    DEPLOYMENT_ID_ varchar(64),
+    RESOURCE_NAME_ varchar(4000),
+    DGRM_RESOURCE_NAME_ varchar(4000),
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create case execution table --
+create table ACT_RU_CASE_EXECUTION (
+    ID_ varchar(64) NOT NULL,
+    REV_ integer,
+    CASE_INST_ID_ varchar(64),
+    SUPER_CASE_EXEC_ varchar(64),
+    SUPER_EXEC_ varchar(64),
+    BUSINESS_KEY_ varchar(255),
+    PARENT_ID_ varchar(64),
+    CASE_DEF_ID_ varchar(64),
+    ACT_ID_ varchar(255),
+    PREV_STATE_ integer,
+    CURRENT_STATE_ integer,
+    REQUIRED_ boolean,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create case sentry part table --
+
+create table ACT_RU_CASE_SENTRY_PART (
+    ID_ varchar(64) NOT NULL,
+    REV_ integer,
+    CASE_INST_ID_ varchar(64),
+    CASE_EXEC_ID_ varchar(64),
+    SENTRY_ID_ varchar(255),
+    TYPE_ varchar(255),
+    SOURCE_CASE_EXEC_ID_ varchar(64),
+    STANDARD_EVENT_ varchar(255),
+    SATISFIED_ boolean,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+-- create unique constraint on ACT_RE_CASE_DEF --
+alter table ACT_RE_CASE_DEF
+    add constraint ACT_UNIQ_CASE_DEF
+    unique (KEY_,VERSION_);
+
+-- create index on business key --
+create index ACT_IDX_CASE_EXEC_BUSKEY on ACT_RU_CASE_EXECUTION(BUSINESS_KEY_);
+
+-- create foreign key constraints on ACT_RU_CASE_EXECUTION --
+alter table ACT_RU_CASE_EXECUTION
+    add constraint ACT_FK_CASE_EXE_CASE_INST
+    foreign key (CASE_INST_ID_)
+    references ACT_RU_CASE_EXECUTION(ID_) on delete cascade on update cascade;
+
+alter table ACT_RU_CASE_EXECUTION
+    add constraint ACT_FK_CASE_EXE_PARENT
+    foreign key (PARENT_ID_)
+    references ACT_RU_CASE_EXECUTION(ID_);
+
+alter table ACT_RU_CASE_EXECUTION
+    add constraint ACT_FK_CASE_EXE_CASE_DEF
+    foreign key (CASE_DEF_ID_)
+    references ACT_RE_CASE_DEF(ID_);
+
+-- create foreign key constraints on ACT_RU_VARIABLE --
+alter table ACT_RU_VARIABLE
+    add constraint ACT_FK_VAR_CASE_EXE
+    foreign key (CASE_EXECUTION_ID_)
+    references ACT_RU_CASE_EXECUTION(ID_);
+
+alter table ACT_RU_VARIABLE
+    add constraint ACT_FK_VAR_CASE_INST
+    foreign key (CASE_INST_ID_)
+    references ACT_RU_CASE_EXECUTION(ID_);
+
+-- create foreign key constraints on ACT_RU_TASK --
+alter table ACT_RU_TASK
+    add constraint ACT_FK_TASK_CASE_EXE
+    foreign key (CASE_EXECUTION_ID_)
+    references ACT_RU_CASE_EXECUTION(ID_);
+
+alter table ACT_RU_TASK
+  add constraint ACT_FK_TASK_CASE_DEF
+  foreign key (CASE_DEF_ID_)
+  references ACT_RE_CASE_DEF(ID_);
+
+-- create foreign key constraints on ACT_RU_CASE_SENTRY_PART --
+alter table ACT_RU_CASE_SENTRY_PART
+    add constraint ACT_FK_CASE_SENTRY_CASE_INST
+    foreign key (CASE_INST_ID_)
+    references ACT_RU_CASE_EXECUTION(ID_);
+
+alter table ACT_RU_CASE_SENTRY_PART
+    add constraint ACT_FK_CASE_SENTRY_CASE_EXEC
+    foreign key (CASE_EXEC_ID_)
+    references ACT_RU_CASE_EXECUTION(ID_);
+create table ACT_HI_PROCINST (
+    ID_ varchar(64) not null,
+    PROC_INST_ID_ varchar(64) not null,
+    BUSINESS_KEY_ varchar(255),
+    PROC_DEF_KEY_ varchar(255),
+    PROC_DEF_ID_ varchar(64) not null,
+    START_TIME_ datetime not null,
+    END_TIME_ datetime,
+    DURATION_ bigint,
+    START_USER_ID_ varchar(255),
+    START_ACT_ID_ varchar(255),
+    END_ACT_ID_ varchar(255),
+    SUPER_PROCESS_INSTANCE_ID_ varchar(64),
+    SUPER_CASE_INSTANCE_ID_ varchar(64),
+    CASE_INST_ID_ varchar(64),
+    DELETE_REASON_ varchar(4000),
+    primary key (ID_),
+    unique (PROC_INST_ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_ACTINST (
+    ID_ varchar(64) not null,
+    PARENT_ACT_INST_ID_ varchar(64),
+    PROC_DEF_KEY_ varchar(255),
+    PROC_DEF_ID_ varchar(64) not null,
+    PROC_INST_ID_ varchar(64) not null,
+    EXECUTION_ID_ varchar(64) not null,
+    ACT_ID_ varchar(255) not null,
+    TASK_ID_ varchar(64),
+    CALL_PROC_INST_ID_ varchar(64),
+    CALL_CASE_INST_ID_ varchar(64),
+    ACT_NAME_ varchar(255),
+    ACT_TYPE_ varchar(255) not null,
+    ASSIGNEE_ varchar(64),
+    START_TIME_ datetime not null,
+    END_TIME_ datetime,
+    DURATION_ bigint,
+    ACT_INST_STATE_ integer,
+    SEQUENCE_COUNTER_ bigint,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_TASKINST (
+    ID_ varchar(64) not null,
+    TASK_DEF_KEY_ varchar(255),
+    PROC_DEF_KEY_ varchar(255),
+    PROC_DEF_ID_ varchar(64),
+    PROC_INST_ID_ varchar(64),
+    EXECUTION_ID_ varchar(64),
+    CASE_DEF_KEY_ varchar(255),
+    CASE_DEF_ID_ varchar(64),
+    CASE_INST_ID_ varchar(64),
+    CASE_EXECUTION_ID_ varchar(64),
+    ACT_INST_ID_ varchar(64),
+    NAME_ varchar(255),
+    PARENT_TASK_ID_ varchar(64),
+    DESCRIPTION_ varchar(4000),
+    OWNER_ varchar(255),
+    ASSIGNEE_ varchar(255),
+    START_TIME_ datetime not null,
+    END_TIME_ datetime,
+    DURATION_ bigint,
+    DELETE_REASON_ varchar(4000),
+    PRIORITY_ integer,
+    DUE_DATE_ datetime,
+    FOLLOW_UP_DATE_ datetime,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_VARINST (
+    ID_ varchar(64) not null,
+    PROC_DEF_KEY_ varchar(255),
+    PROC_DEF_ID_ varchar(64),
+    PROC_INST_ID_ varchar(64),
+    EXECUTION_ID_ varchar(64),
+    ACT_INST_ID_ varchar(64),
+    CASE_DEF_KEY_ varchar(255),
+    CASE_DEF_ID_ varchar(64),
+    CASE_INST_ID_ varchar(64),
+    CASE_EXECUTION_ID_ varchar(64),
+    TASK_ID_ varchar(64),
+    NAME_ varchar(255) not null,
+    VAR_TYPE_ varchar(100),
+    REV_ integer,
+    BYTEARRAY_ID_ varchar(64),
+    DOUBLE_ double,
+    LONG_ bigint,
+    TEXT_ varchar(4000),
+    TEXT2_ varchar(4000),
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_DETAIL (
+    ID_ varchar(64) not null,
+    TYPE_ varchar(255) not null,
+    PROC_DEF_KEY_ varchar(255),
+    PROC_DEF_ID_ varchar(64),
+    PROC_INST_ID_ varchar(64),
+    EXECUTION_ID_ varchar(64),
+    CASE_DEF_KEY_ varchar(255),
+    CASE_DEF_ID_ varchar(64),
+    CASE_INST_ID_ varchar(64),
+    CASE_EXECUTION_ID_ varchar(64),
+    TASK_ID_ varchar(64),
+    ACT_INST_ID_ varchar(64),
+    VAR_INST_ID_ varchar(64),
+    NAME_ varchar(255) not null,
+    VAR_TYPE_ varchar(255),
+    REV_ integer,
+    TIME_ datetime not null,
+    BYTEARRAY_ID_ varchar(64),
+    DOUBLE_ double,
+    LONG_ bigint,
+    TEXT_ varchar(4000),
+    TEXT2_ varchar(4000),
+    SEQUENCE_COUNTER_ bigint,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_COMMENT (
+    ID_ varchar(64) not null,
+    TYPE_ varchar(255),
+    TIME_ datetime not null,
+    USER_ID_ varchar(255),
+    TASK_ID_ varchar(64),
+    PROC_INST_ID_ varchar(64),
+    ACTION_ varchar(255),
+    MESSAGE_ varchar(4000),
+    FULL_MSG_ LONGBLOB,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_ATTACHMENT (
+    ID_ varchar(64) not null,
+    REV_ integer,
+    USER_ID_ varchar(255),
+    NAME_ varchar(255),
+    DESCRIPTION_ varchar(4000),
+    TYPE_ varchar(255),
+    TASK_ID_ varchar(64),
+    PROC_INST_ID_ varchar(64),
+    URL_ varchar(4000),
+    CONTENT_ID_ varchar(64),
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_OP_LOG (
+    ID_ varchar(64) not null,
+    PROC_DEF_ID_ varchar(64),
+    PROC_DEF_KEY_ varchar(255),
+    PROC_INST_ID_ varchar(64),
+    EXECUTION_ID_ varchar(64),
+    CASE_DEF_ID_ varchar(64),
+    CASE_INST_ID_ varchar(64),
+    CASE_EXECUTION_ID_ varchar(64),
+    TASK_ID_ varchar(64),
+    JOB_ID_ varchar(64),
+    JOB_DEF_ID_ varchar(64),
+    USER_ID_ varchar(255),
+    TIMESTAMP_ timestamp not null,
+    OPERATION_TYPE_ varchar(64),
+    OPERATION_ID_ varchar(64),
+    ENTITY_TYPE_ varchar(30),
+    PROPERTY_ varchar(64),
+    ORG_VALUE_ varchar(4000),
+    NEW_VALUE_ varchar(4000),
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_INCIDENT (
+  ID_ varchar(64) not null,
+  PROC_DEF_KEY_ varchar(255),
+  PROC_DEF_ID_ varchar(64),
+  PROC_INST_ID_ varchar(64),
+  EXECUTION_ID_ varchar(64),
+  CREATE_TIME_ timestamp not null,
+  END_TIME_ timestamp null,
+  INCIDENT_MSG_ varchar(4000),
+  INCIDENT_TYPE_ varchar(255) not null,
+  ACTIVITY_ID_ varchar(255),
+  CAUSE_INCIDENT_ID_ varchar(64),
+  ROOT_CAUSE_INCIDENT_ID_ varchar(64),
+  CONFIGURATION_ varchar(255),
+  INCIDENT_STATE_ integer,
+  primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_JOB_LOG (
+    ID_ varchar(64) not null,
+    TIMESTAMP_ timestamp not null,
+    JOB_ID_ varchar(64) not null,
+    JOB_DUEDATE_ timestamp NULL,
+    JOB_RETRIES_ integer,
+    JOB_EXCEPTION_MSG_ varchar(4000),
+    JOB_EXCEPTION_STACK_ID_ varchar(64),
+    JOB_STATE_ integer,
+    JOB_DEF_ID_ varchar(64),
+    JOB_DEF_TYPE_ varchar(255),
+    JOB_DEF_CONFIGURATION_ varchar(255),
+    ACT_ID_ varchar(255),
+    EXECUTION_ID_ varchar(64),
+    PROCESS_INSTANCE_ID_ varchar(64),
+    PROCESS_DEF_ID_ varchar(64),
+    PROCESS_DEF_KEY_ varchar(255),
+    DEPLOYMENT_ID_ varchar(64),
+    SEQUENCE_COUNTER_ bigint,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_);
+create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_);
+
+create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_);
+create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_);
+create index ACT_IDX_HI_ACT_INST_COMP on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_, END_TIME_, ID_);
+create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_);
+
+create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_);
+create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_);
+create index ACT_IDX_HI_DETAIL_CASE_INST on ACT_HI_DETAIL(CASE_INST_ID_);
+create index ACT_IDX_HI_DETAIL_CASE_EXEC on ACT_HI_DETAIL(CASE_EXECUTION_ID_);
+create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_);
+create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_);
+create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_);
+
+create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_);
+create index ACT_IDX_HI_CASEVAR_CASE_INST on ACT_HI_VARINST(CASE_INST_ID_);
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+
+create index ACT_IDX_HI_JOB_LOG_PROCINST on ACT_HI_JOB_LOG(PROCESS_INSTANCE_ID_);
+create index ACT_IDX_HI_JOB_LOG_PROCDEF on ACT_HI_JOB_LOG(PROCESS_DEF_ID_);
+create table ACT_HI_CASEINST (
+    ID_ varchar(64) not null,
+    CASE_INST_ID_ varchar(64) not null,
+    BUSINESS_KEY_ varchar(255),
+    CASE_DEF_ID_ varchar(64) not null,
+    CREATE_TIME_ datetime not null,
+    CLOSE_TIME_ datetime,
+    DURATION_ bigint,
+    STATE_ integer,
+    CREATE_USER_ID_ varchar(255),
+    SUPER_CASE_INSTANCE_ID_ varchar(64),
+    SUPER_PROCESS_INSTANCE_ID_ varchar(64),
+    primary key (ID_),
+    unique (CASE_INST_ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_CASEACTINST (
+    ID_ varchar(64) not null,
+    PARENT_ACT_INST_ID_ varchar(64),
+    CASE_DEF_ID_ varchar(64) not null,
+    CASE_INST_ID_ varchar(64) not null,
+    CASE_ACT_ID_ varchar(255) not null,
+    TASK_ID_ varchar(64),
+    CALL_PROC_INST_ID_ varchar(64),
+    CALL_CASE_INST_ID_ varchar(64),
+    CASE_ACT_NAME_ varchar(255),
+    CASE_ACT_TYPE_ varchar(255),
+    CREATE_TIME_ datetime not null,
+    END_TIME_ datetime,
+    DURATION_ bigint,
+    STATE_ integer,
+    REQUIRED_ boolean,
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_HI_CAS_I_CLOSE on ACT_HI_CASEINST(CLOSE_TIME_);
+create index ACT_IDX_HI_CAS_I_BUSKEY on ACT_HI_CASEINST(BUSINESS_KEY_);
+create index ACT_IDX_HI_CAS_A_I_CREATE on ACT_HI_CASEACTINST(CREATE_TIME_);
+create index ACT_IDX_HI_CAS_A_I_END on ACT_HI_CASEACTINST(END_TIME_);
+create index ACT_IDX_HI_CAS_A_I_COMP on ACT_HI_CASEACTINST(CASE_ACT_ID_, END_TIME_, ID_);
+create index ACT_IDX_HI_CAS_A_I_CASEINST on ACT_HI_CASEACTINST(CASE_INST_ID_, CASE_ACT_ID_);
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_identity_7.3.0.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_identity_7.3.0.sql
new file mode 100644 (file)
index 0000000..dc72917
--- /dev/null
@@ -0,0 +1,50 @@
+# Start of statements added for MSO
+USE `camundabpmn`;
+# End of statements added for MSO
+
+create table ACT_ID_GROUP (
+    ID_ varchar(64),
+    REV_ integer,
+    NAME_ varchar(255),
+    TYPE_ varchar(255),
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_MEMBERSHIP (
+    USER_ID_ varchar(64),
+    GROUP_ID_ varchar(64),
+    primary key (USER_ID_, GROUP_ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_USER (
+    ID_ varchar(64),
+    REV_ integer,
+    FIRST_ varchar(255),
+    LAST_ varchar(255),
+    EMAIL_ varchar(255),
+    PWD_ varchar(255),
+    PICTURE_ID_ varchar(64),
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_ID_INFO (
+    ID_ varchar(64),
+    REV_ integer,
+    USER_ID_ varchar(64),
+    TYPE_ varchar(64),
+    KEY_ varchar(255),
+    VALUE_ varchar(255),
+    PASSWORD_ LONGBLOB,
+    PARENT_ID_ varchar(255),
+    primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+alter table ACT_ID_MEMBERSHIP 
+    add constraint ACT_FK_MEMB_GROUP 
+    foreign key (GROUP_ID_) 
+    references ACT_ID_GROUP (ID_);
+
+alter table ACT_ID_MEMBERSHIP 
+    add constraint ACT_FK_MEMB_USER 
+    foreign key (USER_ID_) 
+    references ACT_ID_USER (ID_);
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_updates_7.3.0.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_updates_7.3.0.sql
new file mode 100644 (file)
index 0000000..09c53ea
--- /dev/null
@@ -0,0 +1,11 @@
+# MSO updates to the default camunda schema.
+USE `camundabpmn`;
+ALTER TABLE ACT_HI_VARINST MODIFY TEXT_ LONGTEXT;
+
+ALTER TABLE ACT_HI_DETAIL MODIFY TEXT_ LONGTEXT;
+
+ALTER TABLE ACT_RU_VARIABLE MODIFY TEXT_ LONGTEXT;
+
+INSERT INTO ACT_GE_PROPERTY VALUES ('historyLevel','3',1) ON DUPLICATE KEY UPDATE VALUE_='3';
+
+CREATE TABLE IF NOT EXISTS ATT_URN_MAPPING AS SELECT * FROM ACT_GE_PROPERTY WHERE NAME_='-';
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/catalog_timestamp_mso_db.sql
new file mode 100644 (file)
index 0000000..12d5d8c
--- /dev/null
@@ -0,0 +1,14 @@
+USE `mso_catalog`;
+
+ALTER TABLE HEAT_ENVIRONMENT MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE NETWORK_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE NETWORK_RESOURCE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE SERVICE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE VNF_COMPONENTS MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE VNF_COMPONENTS_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE VNF_RECIPE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE VNF_RESOURCE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE HEAT_FILES MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE HEAT_TEMPLATE MODIFY COLUMN CREATION_TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE VF_MODULE MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL;
+ALTER TABLE SERVICE_RECIPE MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP NOT NULL;
diff --git a/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql b/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/sub-sql-files/site_status_updated_timestamp.sql
new file mode 100644 (file)
index 0000000..3b2de4c
--- /dev/null
@@ -0,0 +1 @@
+ALTER TABLE SITE_STATUS MODIFY COLUMN CREATION_TIMESTAMP datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
diff --git a/packages/root-pack-extras/config-resources/mariadb/load-sql-files-tests-automation.sh b/packages/root-pack-extras/config-resources/mariadb/load-sql-files-tests-automation.sh
new file mode 100644 (file)
index 0000000..d974c1d
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# 
+# ============LICENSE_START==========================================
+# ===================================================================
+# Copyright © 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============================================
+#
+# ECOMP and OpenECOMP are trademarks
+# and service marks of AT&T Intellectual Property.
+#
+cd /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests
+mysql -uroot -p$MYSQL_ROOT_PASSWORD -f < create_mso_db-tests.sql
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644 (file)
index 0000000..ffa637a
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,473 @@
+<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>
+       <groupId>org.openecomp</groupId>
+       <artifactId>mso</artifactId>
+       <packaging>pom</packaging>
+       <version>0.0.4-SNAPSHOT</version>
+       <name>MSO main project</name>
+       
+       <description>This Maven project is responsible to build and package all child projects - contributions in the MSO project.
+       This build can be configured to run Functional tests and to start/stop a jboss server + Mysql DB.
+       "mvn clean install -P with-integration-tests -Dintegration-tests-user=root -Dintegration-tests-group=root -Dintegration-tests-db-type=MYSQL"
+       </description>
+       
+       <organization>
+               <name>OPENECOMP - MSO</name>
+               <url>http://www.openecomp.org/</url>
+       </organization>
+       <modules>
+               <module>common</module>
+               <module>mso-api-handlers</module>
+               <module>mso-catalog-db</module>
+               <module>adapters</module>
+               <module>asdc-controller</module>
+               <module>status-control</module>
+               <module>bpmn</module>
+               <module>packages</module>
+       </modules>
+
+       <properties>
+               <project.mso.base.folder>.</project.mso.base.folder>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+               <sonar.language>java</sonar.language>
+               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+               <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
+               <sonar.jacoco.itReportPath>${project.mso.base.folder}/packages/arquillian-unit-tests/target/mso-automated-tests/jacoco-it.exec</sonar.jacoco.itReportPath>
+               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
+               <sonar.projectVersion>${project.version}</sonar.projectVersion>
+               <org.apache.maven.user-settings></org.apache.maven.user-settings>
+               <!-- this is used for Chef mso-code cookbook -->
+               <swm.version>2.19.3-1</swm.version>
+        <evosuiteVersion>1.0.4-alpha2</evosuiteVersion>
+       </properties>
+
+       <distributionManagement>
+               <repository>
+                       <id>mso-releases</id>
+                       <name>MSO Release Repository</name>
+                       <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+               </repository>
+               <snapshotRepository>
+                       <id>mso-snapshots</id>
+                       <name>MSO Snapshot Repository</name>
+                       <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+               </snapshotRepository>
+               <site>
+                 <id>mso-javadoc</id>
+                 <url>dav:https://ecomp-nexus:8443/repository/mso-javadoc/${project.version}</url>
+               </site>
+       </distributionManagement>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.10.4</version>
+                <configuration>
+                    <failOnError>false</failOnError>
+                    <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
+                    <docletArtifact>
+                        <groupId>org.umlgraph</groupId>
+                        <artifactId>umlgraph</artifactId>
+                        <version>5.6</version>
+                    </docletArtifact>
+                    <additionalparam>-views</additionalparam>
+                    <useStandardDocletOptions>true</useStandardDocletOptions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </reporting>
+
+    <!-- configure build -->
+
+       <!-- *********************************************************************************************************** -->
+       <!-- Plugins and repositories -->
+       <pluginRepositories>
+               <pluginRepository>
+                       <id>central</id>
+                       <url>http://repo1.maven.org/maven2</url>
+               </pluginRepository>
+
+        <pluginRepository>
+            <id>EvoSuite</id>
+            <name>EvoSuite Repository</name>
+            <url>http://www.evosuite.org/m2</url>
+        </pluginRepository>
+       </pluginRepositories>
+       
+       <repositories>
+               <repository>
+                       <id>central</id>
+                       <name>Maven 2 repository 2</name>
+                       <url>http://repo2.maven.org/maven2/</url>
+               </repository>
+               <repository>
+                       <id>JBOSS</id>
+                       <name>JBoss Repository</name>
+                       <url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
+               </repository>   
+               <repository>
+                       <id>jboss-deprecated-repository</id>
+                       <name>JBoss Deprecated Maven Repository</name>
+                       <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
+               </repository>
+               <repository>
+                       <id>mso-releases</id>
+                       <name>MSO Release Repository</name>
+                       <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+               </repository>
+               
+               <!-- Camunda Web Repository -->
+               <repository>
+                       <id>CamundaWebRepo</id>
+                       <url>https://app.camunda.com/nexus/content/repositories/camunda-bpm/</url>
+                       <name>Camunda Web Repository</name>
+               </repository>
+               <repository>
+                       <id>CamundaPublicRepo</id>
+                       <url>https://app.camunda.com/nexus/content/groups/public</url>
+                       <name>Camunda Public repository</name>
+               </repository>
+               
+               <!-- For Cambria Client -->
+               <repository>
+                       <id>ecomp-nexus-public</id>
+                       <name>ECOMP Nexus Public Repository</name>
+                       <url>https://ecomp-nexus:8443/repository/maven-public</url>
+               </repository>
+               
+           <repository>
+                       <id>soapUI</id>
+                       <url>http://www.soapui.org/repository/maven2/</url>
+                       <name>SoapUI plugin</name>
+               </repository>
+               
+       </repositories>
+       <!-- *********************************************************************************************************** -->
+       <!-- Build -->
+       <build>
+               <resources>
+                       <resource>
+                               <directory>src/main/resources</directory>
+                               <filtering>true</filtering>
+                       </resource>
+                       <resource>
+                               <directory>target/generated-sources/license</directory>
+                               <includes>
+                                       <include>third-party-licenses.txt</include>
+                               </includes>
+                       </resource>
+                       <resource>
+                               <directory>target/generated-resources/licenses</directory>
+                               <includes>
+                                       <include>*.*</include>
+                               </includes>
+                               <targetPath>third-party-licenses</targetPath>
+                       </resource>
+               </resources>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-deploy-plugin</artifactId>
+                               <version>2.8</version> <!-- This version supports the "deployAtEnd" parameter -->
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                               <version>2.17</version>
+                               <configuration>
+                       <!--            <forkCount>2C</forkCount>
+                                       <reuseForks>true</reuseForks> -->
+                                       <properties>
+                        <property>
+                            <name>listener</name>
+                            <value>org.evosuite.runtime.InitializingListener</value>
+                        </property>
+                    </properties>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>2.3.2</version>
+                               <configuration>
+                                       <debug>true</debug>
+                                       <compilerArgument>-Xlint</compilerArgument>
+                                       <verbose>true</verbose>
+                                       <showDeprecation>true</showDeprecation>
+                                       <showWarnings>true</showWarnings>
+                                       <source>1.8</source>
+                                       <target>1.8</target>
+                               </configuration>
+                       </plugin>
+<!--                   <plugin> -->
+<!--                           <groupId>org.codehaus.mojo</groupId> -->
+<!--                           <artifactId>sonar-maven-plugin</artifactId> -->
+<!--                           <version>2.1</version> -->
+<!--                   </plugin> -->
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-ejb-plugin</artifactId>
+                               <version>2.2.1</version>
+                               <configuration>
+                                       <ejbVersion>3.0</ejbVersion>
+                                       <archive>
+                                               <manifest>
+                                                       <addClasspath>true</addClasspath>
+                                               </manifest>
+                                       </archive>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-checkstyle-plugin</artifactId>
+                               <version>2.17</version>
+                               <configuration>
+                                       <includes>**/org/openecomp/**/*.java</includes>
+                                       <configLocation>/google_checks.xml</configLocation>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>findbugs-maven-plugin</artifactId>
+                               <version>2.5.2</version>
+                               <configuration>
+                                       <includeFilterFile>project-configs/code-tools/findbugs_include_filter.xml</includeFilterFile>
+                                       <nested>true</nested>
+                                       <findbugsXmlOutput>true</findbugsXmlOutput>
+                                       <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
+                                       <xmlOutput>true</xmlOutput>
+                               </configuration>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>sonar-maven-plugin</artifactId>
+                               <version>3.2</version>
+                       </plugin>
+
+                       <plugin>
+                               <artifactId>maven-scm-plugin</artifactId>
+                               <version>1.8.1</version>
+                               <configuration>
+                                       <tag>${project.artifactId}-${project.version}</tag>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-javadoc-plugin</artifactId>
+                               <version>2.9</version>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-site-plugin</artifactId>
+                               <version>3.6</version>
+                               <dependencies>
+                                 <dependency>
+                                   <groupId>org.apache.maven.wagon</groupId>
+                                   <artifactId>wagon-webdav-jackrabbit</artifactId>
+                                   <version>2.10</version>
+                                 </dependency>
+                               </dependencies>                             
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>cobertura-maven-plugin</artifactId>
+                               <version>2.5.2</version>
+                               <configuration>
+                                       <formats>
+                                               <format>xml</format>
+                                       </formats>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>versions-maven-plugin</artifactId>
+                               <version>1.3.1</version>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>jboss-packaging-maven-plugin</artifactId>
+                               <version>2.2</version>
+                               <!-- <configuration> <archive> <manifest> <addClasspath>true</addClasspath> 
+                                       </manifest> </archive> </configuration> Enable 'jboss-sar', etc., as a recoginized 
+                                       maven packaging type -->
+                               <extensions>true</extensions>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <version>0.7.7.201606060606</version>
+                               <configuration>
+                                       <dumpOnExit>true</dumpOnExit>
+                                       <includes>
+                                               <include>org.openecomp.*</include>
+                                       </includes>
+
+
+                               </configuration>
+
+                               <executions>
+                                       <execution>
+                                               <id>jacoco-initialize-unit-tests</id>
+                                               <goals>
+                                                       <goal>prepare-agent</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
+                                                       <!-- <append>true</append> -->
+
+
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                <groupId>com.fortify.ps.maven.plugin</groupId>
+                <artifactId>sca-maven-plugin</artifactId>
+                <version>4.20</version>
+                <configuration>
+                       <buildId>mso-${project.version}</buildId>
+                       <source>1.7</source>
+                </configuration>
+            </plugin>
+
+            <!-- license plugin -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>license-maven-plugin</artifactId>
+                <version>1.10</version>
+                <configuration>
+                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
+                    <processStartTag>============LICENSE_START=======================================================</processStartTag>
+                    <processEndTag>============LICENSE_END=========================================================</processEndTag>
+                    <sectionDelimiter>================================================================================</sectionDelimiter>
+                    <licenseName>apache_v2</licenseName>
+                    <inceptionYear>2017</inceptionYear>
+                    <organizationName>AT&amp;T Intellectual Property. All rights reserved.</organizationName>
+                    <projectName>ECOMP MSO</projectName>
+                    <canUpdateCopyright>true</canUpdateCopyright>
+                    <canUpdateDescription>true</canUpdateDescription>
+                    <canUpdateLicense>true</canUpdateLicense>
+                    <emptyLineAfterHeader>true</emptyLineAfterHeader>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>first</id>
+                            <goals>
+                                <goal>update-file-header</goal>
+                            </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <licenseName>apache_v2</licenseName>
+                            <includes>
+                                <include>*.java</include>
+                                <include>*.groovy</include>
+                            </includes>
+                            <excludes>
+                                <exclude>*.json</exclude>
+                            </excludes>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            
+               </plugins>
+               <pluginManagement>
+                       <plugins>
+                       
+                <plugin>
+                    <groupId>org.evosuite.plugins</groupId>
+                    <artifactId>evosuite-maven-plugin</artifactId>
+                    <version>${evosuiteVersion}</version>
+                    <executions>
+                        <execution>
+                            <goals>
+                                <goal>prepare</goal>
+                            </goals>
+                            <phase>process-test-classes</phase>
+                        </execution>
+                    </executions>
+                </plugin>
+                       </plugins>
+               </pluginManagement>
+       </build>
+
+       <!-- *********************************************************************************************************** -->
+       <!-- Dependencies -->
+       <dependencies>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.11</version>
+                       <scope>test</scope>
+               </dependency>
+        <dependency>
+            <groupId>org.evosuite</groupId>
+            <artifactId>evosuite-standalone-runtime</artifactId>
+            <version>${evosuiteVersion}</version>
+            <scope>test</scope>
+        </dependency>
+       </dependencies>
+       <dependencyManagement>
+               <dependencies>
+
+
+                       <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
+                       <!-- force use of version 4.5 everywhere in transient deps, aligned on WildFly 10 version -->
+                       <dependency>
+                           <groupId>org.apache.httpcomponents</groupId>
+                           <artifactId>httpclient</artifactId>
+                           <version>4.5</version>
+                               <scope>compile</scope>
+                       </dependency>
+                       <dependency>
+                           <groupId>org.apache.httpcomponents</groupId>
+                           <artifactId>httpcore</artifactId>
+                           <version>4.4.1</version>
+                               <scope>compile</scope>
+                       </dependency>
+                       <dependency>
+                           <groupId>commons-codec</groupId>
+                           <artifactId>commons-codec</artifactId>
+                           <version>1.10</version>
+                               <scope>compile</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>commons-io</groupId>
+                               <artifactId>commons-io</artifactId>
+                               <version>2.5</version>
+                               <scope>compile</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.hamcrest</groupId>
+                               <artifactId>hamcrest-core</artifactId>
+                               <version>1.3</version>
+                               <scope>test</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>log4j</groupId>
+                               <artifactId>log4j</artifactId>
+                               <version>1.2.17</version>
+                               <scope>compile</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.slf4j</groupId>
+                               <artifactId>slf4j-api</artifactId>
+                               <version>1.7.10</version>
+                               <scope>compile</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>com.sun.xml.fastinfoset</groupId>
+                               <artifactId>FastInfoset</artifactId>
+                               <version>1.2.13</version>
+                               <scope>compile</scope>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
+</project>
\ No newline at end of file
diff --git a/project-configs/code-tools/findbugs_include_filter.xml b/project-configs/code-tools/findbugs_include_filter.xml
new file mode 100644 (file)
index 0000000..b1b2fe2
--- /dev/null
@@ -0,0 +1,5 @@
+<FindBugsFilter>
+     <Match>
+       <Package name="~org\.openecomp\.mso.*" />
+     </Match>
+</FindBugsFilter>
\ No newline at end of file
diff --git a/project-configs/code-tools/oap_checkstyle_1.0.xml b/project-configs/code-tools/oap_checkstyle_1.0.xml
new file mode 100644 (file)
index 0000000..a3da8e8
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<!--
+    This configuration file was written by the eclipse-cs plugin configuration editor
+-->
+<!--
+    Checkstyle-Configuration: OpenECOMP MSO Checkstyle 1.0
+    Description: none
+-->
+<module name="Checker">
+  <property name="severity" value="warning"/>
+  <module name="TreeWalker">
+    <property name="fileExtensions" value="java,js"/>
+    <module name="FileContentsHolder"/>
+    <module name="JavadocMethod">
+      <property name="suppressLoadErrors" value="true"/>
+    </module>
+    <module name="JavadocType"/>
+    <module name="JavadocVariable"/>
+    <module name="JavadocStyle"/>
+    <module name="ConstantName"/>
+    <module name="LocalFinalVariableName"/>
+    <module name="LocalVariableName"/>
+    <module name="MemberName"/>
+    <module name="MethodName"/>
+    <module name="PackageName"/>
+    <module name="ParameterName"/>
+    <module name="StaticVariableName"/>
+    <module name="TypeName"/>
+    <module name="AvoidStarImport"/>
+    <module name="IllegalImport"/>
+    <module name="RedundantImport"/>
+    <module name="UnusedImports"/>
+    <module name="MethodLength">
+      <property name="max" value="250"/>
+    </module>
+    <module name="ParameterNumber">
+      <property name="max" value="8"/>
+    </module>
+    <module name="EmptyForIteratorPad"/>
+    <module name="MethodParamPad">
+      <property name="option" value="space"/>
+    </module>
+    <module name="NoWhitespaceAfter"/>
+    <module name="NoWhitespaceBefore"/>
+    <module name="OperatorWrap"/>
+    <module name="ParenPad"/>
+    <module name="TypecastParenPad"/>
+    <module name="WhitespaceAfter"/>
+    <module name="WhitespaceAround"/>
+    <module name="ModifierOrder"/>
+    <module name="RedundantModifier"/>
+    <module name="AvoidNestedBlocks"/>
+    <module name="EmptyBlock"/>
+    <module name="LeftCurly"/>
+    <module name="NeedBraces"/>
+    <module name="RightCurly"/>
+    <!-- <module name="DoubleCheckedLocking"/> -->
+    <module name="EmptyStatement"/>
+    <module name="EqualsHashCode"/>
+    <module name="HiddenField"/>
+    <module name="IllegalInstantiation"/>
+    <module name="InnerAssignment"/>
+    <module name="MissingSwitchDefault"/>
+    <module name="RedundantThrows">
+      <property name="suppressLoadErrors" value="true"/>
+    </module>
+    <module name="SimplifyBooleanExpression"/>
+    <module name="SimplifyBooleanReturn"/>
+    <module name="DesignForExtension"/>
+    <module name="FinalClass"/>
+    <module name="HideUtilityClassConstructor"/>
+    <module name="InterfaceIsType"/>
+    <module name="VisibilityModifier"/>
+    <module name="ArrayTypeStyle"/>
+    <module name="FinalParameters"/>
+    <module name="UpperEll"/>
+    <module name="TodoComment"/>
+  </module>
+  <module name="JavadocPackage"/>
+  <module name="NewlineAtEndOfFile">
+    <property name="fileExtensions" value="java,js"/>
+  </module>
+  <module name="Translation"/>
+  <module name="FileLength">
+    <property name="max" value="5000"/>
+  </module>
+  <module name="FileTabCharacter"/>
+  <module name="RegexpSingleline">
+    <property name="format" value="\s+$"/>
+    <property name="message" value="Line has trailing spaces."/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE_LEGACY_CODE_OFF"/>
+    <property name="onCommentFormat" value="CHECKSTYLE_LEGACY_CODE_ON"/>
+  </module>
+</module>
diff --git a/project-configs/code-tools/oap_codetemplates_1.0.xml b/project-configs/code-tools/oap_codetemplates_1.0.xml
new file mode 100644 (file)
index 0000000..89146a8
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment">/**\r
+ * @return the ${bare_field_name}\r
+ */</template><template autoinsert="true" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment">/**\r
+ * @param ${param} the ${bare_field_name} to set\r
+ */</template><template autoinsert="true" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment">/**\r
+ * ${tags}\r
+ */</template><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/**\r
+ * @author ${user}\r
+ */</template><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">/**\r
+ * @author ${user}\r
+ *\r
+ * ${tags}\r
+ */\r
+</template><template autoinsert="true" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment">/**\r
+ * \r
+ */</template><template autoinsert="true" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment">/**\r
+ * ${tags}\r
+ */</template><template autoinsert="true" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment">/* (non-Javadoc)\r
+ * ${see_to_overridden}\r
+ */</template><template autoinsert="true" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment">/**\r
+ * ${tags}\r
+ * ${see_to_target}\r
+ */</template><template autoinsert="false" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">${package_declaration}\r
+\r
+ /*-\r
+ * ============LICENSE_START=======================================================\r
+ * OPENECOMP - MSO\r
+ * ================================================================================\r
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+\r
+${typecomment}\r
+${type_declaration}</template><template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">\r
+</template><template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">\r
+</template><template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">\r
+</template><template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">\r
+</template><template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block\r
+${exception_var}.printStackTrace();</template><template autoinsert="true" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">// ${todo} Auto-generated method stub\r
+${body_statement}</template><template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement}\r
+// ${todo} Auto-generated constructor stub</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates>
\ No newline at end of file
diff --git a/project-configs/code-tools/oap_formatter_1.0.xml b/project-configs/code-tools/oap_formatter_1.0.xml
new file mode 100644 (file)
index 0000000..e41ea9e
--- /dev/null
@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="12">
+<profile kind="CodeFormatterProfile" name="OpenECOMP MSO 1.0 Formatter" version="12">
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="1"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="50"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="82"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="50"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="82"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+</profile>
+</profiles>
diff --git a/project-configs/maven/conf/settings.xml b/project-configs/maven/conf/settings.xml
new file mode 100644 (file)
index 0000000..bab1f18
--- /dev/null
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+
+<!--  Special settings file for the maven installation on AT&T central Jenkins -->
+
+
+<!--
+ | This is the configuration file for Maven. It can be specified at two levels:
+ |
+ |  1. User Level. This settings.xml file provides configuration for a single user, 
+ |                 and is normally provided in ${user.home}/.m2/settings.xml.
+ |
+ |                 NOTE: This location can be overridden with the CLI option:
+ |
+ |                 -s /path/to/user/settings.xml
+ |
+ |  2. Global Level. This settings.xml file provides configuration for all Maven
+ |                 users on a machine (assuming they're all using the same Maven
+ |                 installation). It's normally provided in 
+ |                 ${maven.home}/conf/settings.xml.
+ |
+ |                 NOTE: This location can be overridden with the CLI option:
+ |
+ |                 -gs /path/to/global/settings.xml
+ |
+ | The sections in this sample file are intended to give you a running start at
+ | getting the most out of your Maven installation. Where appropriate, the default
+ | values (values used when the setting is not specified) are provided.
+ |
+ |-->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+  <!-- localRepository
+   | The path to the local repository maven will use to store artifacts.
+   |
+   | Default: ${user.home}/.m2/repository
+  <localRepository>/path/to/local/repo</localRepository>
+  -->
+<localRepository>${user.home}/.m2/repository</localRepository>
+  <!-- interactiveMode
+   | This will determine whether maven prompts you when it needs input. If set to false,
+   | maven will use a sensible default value, perhaps based on some other setting, for
+   | the parameter in question.
+   |
+   | Default: true
+  <interactiveMode>true</interactiveMode>
+  -->
+
+  <!-- offline
+   | Determines whether maven should attempt to connect to the network when executing a build.
+   | This will have an effect on artifact downloads, artifact deployment, and others.
+   |
+   | Default: false
+  <offline>false</offline>
+  -->
+
+  <!-- pluginGroups
+   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
+   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
+   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
+   |-->
+  <pluginGroups>
+    <!-- pluginGroup
+     | Specifies a further group identifier to use for plugin lookup.
+    <pluginGroup>com.your.plugins</pluginGroup>
+    -->
+  </pluginGroups>
+
+  <!-- proxies
+   | This is a list of proxies which can be used on this machine to connect to the network.
+   | Unless otherwise specified (by system property or command-line switch), the first proxy
+   | specification in this list marked as active will be used.
+   |-->
+  <proxies>
+    <!-- proxy
+     | Specification for one proxy, to be used in connecting to the network.
+     |
+    <proxy>
+      <id>optional</id>
+      <active>true</active>
+      <protocol>http</protocol>
+      <username>proxyuser</username>
+      <password>proxypass</password>
+      <host>proxy.host.net</host>
+      <port>80</port>
+      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
+    </proxy>
+    -->
+  </proxies>
+
+  <!-- servers
+   | This is a list of authentication profiles, keyed by the server-id used within the system.
+   | Authentication profiles can be used whenever maven must make a connection to a remote server.
+   |-->
+  <servers>
+    <!-- server
+     | Specifies the authentication information to use when connecting to a particular server, identified by
+     | a unique name within the system (referred to by the 'id' attribute below).
+     | 
+     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are 
+     |       used together.
+     |
+    <server>
+      <id>deploymentRepo</id>
+      <username>repouser</username>
+      <password>repopwd</password>
+    </server>
+    -->
+    
+    <!-- Another sample, using keys to authenticate.
+    <server>
+      <id>siteServer</id>
+      <privateKey>/path/to/private/key</privateKey>
+      <passphrase>optional; leave empty if not used.</passphrase>
+    </server>
+    -->
+  </servers>
+
+  <!-- mirrors
+   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
+   | 
+   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
+   | However, this repository may have problems with heavy traffic at times, so people have mirrored
+   | it to several places.
+   |
+   | That repository definition will have a unique id, so we can create a mirror reference for that
+   | repository, to be used as an alternate download site. The mirror site will be the preferred 
+   | server for that repository.
+   |-->
+  <mirrors>
+    <!-- mirror
+     | Specifies a repository mirror site to use instead of a given repository. The repository that
+     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
+     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
+     |
+     -->
+<!--     <mirror> -->
+<!--       <id>att-central</id> -->
+<!--       <mirrorOf>central,jboss,JBOSS,jboss-deprecated-repository</mirrorOf> -->
+<!--       <name>AT&amp;T maven central mirror</name> -->
+<!--       <url>http://mavencentral.it.att.com:8084/nexus/content/groups/public/</url> -->
+<!--     </mirror> -->
+    
+
+  </mirrors>
+  
+  <!-- profiles
+   | This is a list of profiles which can be activated in a variety of ways, and which can modify
+   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
+   | specific paths and repository locations which allow the build to work in the local environment.
+   |
+   | For example, if you have an integration testing plugin - like cactus - that needs to know where
+   | your Tomcat instance is installed, you can provide a variable here such that the variable is 
+   | dereferenced during the build process to configure the cactus plugin.
+   |
+   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
+   | section of this document (settings.xml) - will be discussed later. Another way essentially
+   | relies on the detection of a system property, either matching a particular value for the property,
+   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a 
+   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
+   | Finally, the list of active profiles can be specified directly from the command line.
+   |
+   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
+   |       repositories, plugin repositories, and free-form properties to be used as configuration
+   |       variables for plugins in the POM.
+   |
+   |-->
+  <profiles>
+    <!-- profile
+     | Specifies a set of introductions to the build process, to be activated using one or more of the
+     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
+     | or the command line, profiles have to have an ID that is unique.
+     |
+     | An encouraged best practice for profile identification is to use a consistent naming convention
+     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
+     | This will make it more intuitive to understand what the set of introduced profiles is attempting
+     | to accomplish, particularly when you only have a list of profile id's for debug.
+     |
+     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
+    <profile>
+      <id>jdk-1.4</id>
+
+      <activation>
+        <jdk>1.4</jdk>
+      </activation>
+
+      <repositories>
+        <repository>
+          <id>jdk14</id>
+          <name>Repository for JDK 1.4 builds</name>
+          <url>http://www.myhost.com/maven/jdk14</url>
+          <layout>default</layout>
+          <snapshotPolicy>always</snapshotPolicy>
+        </repository>
+      </repositories>
+    </profile>
+    -->
+
+    <!--
+     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
+     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
+     | might hypothetically look like:
+     |
+     | ...
+     | <plugin>
+     |   <groupId>org.myco.myplugins</groupId>
+     |   <artifactId>myplugin</artifactId>
+     |   
+     |   <configuration>
+     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
+     |   </configuration>
+     | </plugin>
+     | ...
+     |
+     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
+     |       anything, you could just leave off the <value/> inside the activation-property.
+     |
+    <profile>
+      <id>env-dev</id>
+
+      <activation>
+        <property>
+          <name>target-env</name>
+          <value>dev</value>
+        </property>
+      </activation>
+
+      <properties>
+        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
+      </properties>
+    </profile>
+    -->
+  </profiles>
+
+  <!-- activeProfiles
+   | List of profiles that are active for all builds.
+   |
+  <activeProfiles>
+    <activeProfile>alwaysActiveProfile</activeProfile>
+    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
+  </activeProfiles>
+  -->
+</settings>
diff --git a/readme.md b/readme.md
new file mode 100644 (file)
index 0000000..7e6935f
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,238 @@
+# OpenECOMP MSO
+
+---
+---
+
+# Introduction
+
+OpenECOMP MSO is delivered with **2 Docker containers**, 1 hosting the **database** (MariaDB) and 1 hosting the **JBoss** application server running all OpenECOMP MSO code.
+
+Both containers runs on the same machine and can be started with a **`docker-compose`**.
+
+# Compiling MSO
+
+MSO can be compiled easily with a `mvn clean install`. Integration tests are started with the following profile 
+`-P with-integration-tests`
+
+**to be edited for rrelease** 
+Docker containers are build with the following profile 
+`-P docker -Ddocker.buildArg.chef_repo_branch_name=bugfix/external_adress -Ddocker.buildArg.chef_repo_git_username=git -Ddocker.buildArg.chef_repo_address=23.253.149.175/mso -Ddocker.buildArg.chef_repo_git_name=chef-repo`
+
+# Getting the containers
+
+***to be changed for rrelease*** OpenECOMP MSO containers are stored on the Rackspace Nexus Docker Registry
+
+The following Docker images are the actual deployment images used for running MSO
+
+| Name            | Tag     | Description                                                                                                                   |
+|-----------------|---------|-------------------------------------------------------------------------------------------------------------------------------|
+| ecomp/mso       | 1.0.0   | Contains **JBoss** + **OpenJDK** + **MSO** components (BPMN engine and MSO API handlers and adapters)                         |
+| library/mariadb | 10.1.11 | **MariaDB** image from Docker.io, this image hosts the database and is preloaded with MSO schema and configuration at startup |
+
+# Starting MSO
+
+There are several ways to start OpenECOMP MSO :
+
+### Trough the sample Jenkins Job on the Deployment Jenkins host ***to be changed for rrelease***
+
+A Jenkins instance is available at [Deployment-Jenkins](http://162.242.237.52:8080/login?from=%2F). It provides **job that can run** the containers on a sample host. ***add job link for rrelease**
+
+*** for rrelease all this should go in the job description***
+```
+The VM is running a Docker Engine (1.12) and has the Nexus repository certificate imported, Jenkins will use this host to deploy and run the containers.
+
+It will first **clone** the configuration repository to its local workspace, **transfer needed configuration files**, mount a specific **docker volume** with these files and start up the containers (attached to this volume) so that they can run the startup scripts that is embedded and run openecomp MSO and its database container.
+
+It is important to understand that the Docker containers are using a configuration file (JSON) in order to provision MSO basic configuration, in the above Jenkins Job, Jenkins pulls that JSON file from the MSO repository, any other mean to provide that JSON file (for specific environments) would also work. ***add link on rrelease***more information about configuring MSO.
+Note : the above is just an automation of the container deployment on a sample host, it is perfectly possible to do exactly the same on any host (be it your laptop or any other host that can run Docker 1.12 and reach the Nexus repository, and optionally the MSO gitlab repo to download other configurations)
+```
+
+The database is preloaded with all the basic configuration, it is possible to change the configuration without deploying the containers again (or rebuilding them)
+
+***provide a link on rrelease***
+To get a feel of how the deployment is actually performed, it is best to review the Docker Strategy of MSO and look at the actual Jenkins Job
+
+### Trough the use of `docker-compose` ***to be changed for rrelease***
+
+`docker-compose` can be used to start MSO. The files can be downloaded from the Nexus repository <add-link-to-Docker-Compose>
+
+***to be changed for rrelease**
+
+This job ***add link*** has been created to run the compose file. 
+
+***this info will go in the job description ?***
+```
+It job uses the Sample Docker Host described above as a Jenkins Slave (so when the build is triggered on Jenkins, it runs locally on the remote Docker Host). It pulls the needed information from MSO Git lab repository (deploy.sh and `docker-compose` file)
+```
+
+### Heat template
+
+a Heat template that can be used on RackSpace to spin up the MSO Host VM and run docker-compose is currently being built by the Demo Team.
+
+# Accessing MSO
+
+MSO UIs are not really used for operating MSO, but they provide information on what is currently happening and get an insight on the components.
+
+### MSO JBoss console
+
+JBoss Wildly provides administrative functions through the application [server console](https://docs.jboss.org/author/display/WFLY10/Admin+Guide#AdminGuide-Accessingthewebconsole].
+
+Said console can be used to have a look at the status of MSO. It is providing details on deployed artifacts and gives a remote access to the main server log file
+
+***to be changed for the rrelease*** The UI can be accessed trough http://containerHostName:9990/ or on the sample host below : http://104.130.172.123:52090 (the sample host has port 9990 remapped to 52090 on the Rackspace VM)
+
+The configuration preloads a default user (admin) with the standard OpenECOMP UI password ***provide link on rrelease***.
+
+The configuration of JBoss should not be touched. But it is possible to look at the two following sections for insights on the MSO health :
+
+![deployments or runtime](http://img11.hostingpics.net/pics/332403image2016112412225.png)
+
+Deployments shows what is deployed and running on the application server, you should see the following once MSO is up and running (Actual names of the War files may differ but their numbers and general format should be the same)
+
+***to be upload when rrelease***
+
+Runtime can be used to have a look a the main server log files, see JVM status and parameters, environment settings etc,...
+
+![runtime monitor](http://img11.hostingpics.net/pics/244948image20161124123216.png)
+
+See the logging section below for more details about other logfiles (EELF framework)
+
+### MSO Camunda Cockpit console
+
+MSO orchestration processes can be monitored with the [Camunda Engine cockpit UI](https://camunda.org/features/cockpit/). It gives an insight about the available processes, allows to trigger them manually and provides monitoring of the currently running processes
+
+**IMPORTANT NOTE** : since OpenECOMP MSO only uses Camunda Community version it is not possible to see history of running process as this is an Enterprise feature only.
+
+#### Accessing the Cockpit 
+
+***to be changed for the rrelease*** The cockpit is available at the following address : http://containerHostname:8080/cockpit or on the Sample host below http://104.130.172.123:52080/cockpit (the sample host has port 8080 remapped to 52080 on the Rackspace VM)
+
+When the container is started, as it starts up from a fresh instance, it will create a default admin user (admin) with the default OpenECOMP password for UI***provide link on rrelease***
+
+The cockpit gives an overview of the available BPMN (orchestration) processes (with a visual representation), it is also possible to trigger them from the UI if you know the parameters that are needed. 
+
+***screenshots to be uploaded when rrelease***
+
+### MSO APIs
+
+Most of the MSO features within OpenECOMP are triggered by using **RESTful interfaces**. MSO supports both **HTTP** and **HTTPS**, but is configured on this release with HTTP only using Basic Authentification.
+
+The MSO APIs are configured to accept requests having a **basic auth. header** set with various **username and password** depending on which API is being triggered.
+
+All API endpoints are exposed on port **8080**, it is possible to reach all MSO subsystems directly with the proper query (see more information below on how to test MSO functions)
+
+##### Main API endpoints in the first open source release 
+
+- ***to be completed*** APIHandler health checks
+- ***to be completed*** VID API
+
+VID endpoint : http://vm1.mso.simpledemo.openecomp.org:8080/ecomp/mso/infra/serviceInstances/v2
+
+The typical easy way to trigger these endpoints is to use a RESTful client or automation framework. 
+
+# Configuration of MSO
+
+It is important to understand that the Docker containers are using a configuration file (JSON) in order to provision MSO basic configuration, in the above Jenkins Job, Jenkins pulls that JSON file from the MSO repository, any other mean to provide that JSON file (for specific environments) would also work.
+
+Once the deployment of the docker images is done, you will need to configure your installation to be able to interact with all the components that MSO needs.
+
+Change the environment file located here : **/shared/mso-docker.json** then run the following command `chef-solo -c /var/berks-cookbooks/chef-repo/solo.rb -o recipe[mso-config::apih],recipe[mso-config::bpmn],recipe[mso-config::jra]`
+
+**Important note:** The host mso is mapped automatically to c1.vm1.mso.simpledemo.openecomp.org in /etc/host of the docker image so you can keep mso:8080 when you want to mention the APIH, JRA or Camunda host.
+
+Here are the main parameters you could change: 
+
+- mso_config_path: define the path where the configuration files for APIH, JRA and Camunda will be deployed. This parameter should not be changed.
+- In the section mso-bpmn-urn-config, adaptersDbEndpoint: This configuration must point to the APIH hostname. It should have this form: http://mso:8080/dbadapters/RequestsDbAdapter Do not change it if you are not sure.
+- In the section mso-bpmn-urn-config, aaiEndpoint: This parameter should point to the A&AI component. It should be something like: https://c1.vm1.aai.simpledemo.openecomp.org:8443
+- In the section mso-bpmn-urn-config, aaiAuth: This parameter is the encrypted value of login:password to access the A&AI server. The key used to encrypt is defined in the parameter msoKey.
+- In the section asdc-connection, asdcAddresss: Change the values with the value provided by the ASDC team. Possible value: https://c2.vm1.asdc.simpledemo.openecomp.org:8443 The password field may be changed as well.
+- In the section mso-sdnc-adapter-config, sdncurls: Change all the values with the value provided by the SDNC team. Possible value: https://c1.vm1.sdnc.simpledemo.openecomp.org:8443/... ? The sdncauth field may be changed as well.
+- In the section mso-appc-adapter-config, appc_url: Change the value with the value provided by the APPC team. Possible value: http://c1.vm1.appc.simpledemo.openecomp.org:8080 ? The appc_auth field may be changed as well.
+- In the section mso-po-adapter-config, identity_url: Change the values with the value provided by the PO team. Possible value: https://identity.api.rackspacecloud.com/v2.0 ?
+
+The credentials are defined in 2 places:
+
+- JBoss users credentials are defined in /opt/jboss/standalone/configuration/application-users.properties and are associated to the corresponding role in application-roles.properties (you should not change this file except if you add a new user)
+- In the environment. Replace the authorisation key in the file /shared/mso-docker.json and run the command to apply the configuration as explained above.
+
+You can encrypt the JBoss user with the following command `echo -n 'LOGIN:ApplicationRealm:PASSWORD' |openssl dgst -md5` and replace the line corresponding to this user in /opt/jboss/standalone/configuration/application-users.properties
+
+You can replace the authentication in the environment by the value returned by the following API `GET on http://c1.vm1.mso.simpledemo.openecomp.org:8080/asdc/properties/encrypt/{value}/{cryptKey}` where {value} is the string login:password and cryptKey (also defined in the environment) is the key to use to encrypt the credentials
+
+Exemple of credentials you could change:
+- BPELClient: if you change this credentials, you have to change it in JBoss users AND environment file (+ apply the new config) and be careful to set the same password. In the environment it is the parameter "adaptersPoAuth" under the section "mso-bpmn-urn-config". The cryptKey to use is 07a7159d3bf51a0e53be7a8f89699be7
+- BPMNClient: if you change this credentials, you have to change it in JBoss users AND environment file (+ apply the new config) and be careful to set the same password. In the environment it is the parameter "camundaAuth" under the sections "mso-api-handler-config" AND "mso-api-handler-infra-config". The cryptKey to use is
+aa3871669d893c7fb8abbcda31b88b4f
+
+# Logging
+
+### JBoss
+
+MSO log files are located the [JBoss log](https://docs.jboss.org/author/display/WFLY8/Logging+Configuration) folder in the container.
+
+### EELF
+
+EELF framework is used for **specific logs** (audit, metric and error logs). They are tracking inter component logs (request and response) and allow to follow a complete flow through the MSO subsystem
+EELF logs are located at the following location on the MSO JBoss container :
+
+- /var/log/ecomp/MSO (each module has its own folder)
+
+The DEBUG mode is enabled by module and has to be re-enabled if the application restart.
+
+It can be enabled with a GET on the following APIs:
+- Camunda (no authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/mso/logging/debug
+- APIH Infra (use any jboss user with role InfraPortal-Client for authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/ecomp/mso/infra/logging/debug
+- ASDC (no authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/asdc/logging/debug
+- DBAdapter (no authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/dbadapters/logging/debug
+- Network adapter (no authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/networks/rest/logging/debug
+- SDNC adapter (use any jboss user with role MSO-Client for authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/adapters/rest/logging/debug
+- VNF adapter (no authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/vnfs/rest/logging/debug
+- Tenant adapter (no authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/tenants/rest/logging/debug
+- APPC adapter (no authentication): http://c1.vm1.mso.simpledemo.openecomp.org:8080/appc/rest/logging/debug
+
+Default JBoss users:
+- with role CSI-Client: CSIClient/password1$
+- with role CSI-Client: InfraPortalClient/password1$
+- with role CSI-Client: MSOClient/password1$
+
+Note that these default users should be changed.
+
+# Testing MSO Functionalities
+
+For this first release of MSO, the queries to start the various VNFs should come first through API Handler.
+
+To help with the testing we are providing here a sample [SoapUI](https://www.soapui.org/) project [file](add link when rrealease) with the main queries that VID should send to MSO
+
+### To simulate Loading of Artifacts & models (bypass ASDC)i
+
+The MariaDB container can load up special SQL scripts that simulates the loading of ASDC components (as if they were received through the ASDC client)
+
+Simply use the load ability embedded to run the 'preload SQL' script for vFirewall or vDNS
+### Once the HEAT artifacts are loaded into MSO
+
+It is also possible to simulate queries to the PO (platform orchestrator) adapter of MSO (thus bypassing BPMN flows and API handler) to verify MSO interaction with Rackspace and verify the behavior of the Adapter (so that it loads HEAT and connect to Rackspace and instantiate elements)
+
+Below is a query used from FireFox RESTClient plugin to trigger MSO adapter directly (replace values accordingly)
+
+```
+ POST http://<containername>:8080/vnfs/rest/v1/vnfs/5259ba4a-cf0d-4791-9c60-9117faa5cdea/vf-modules
+Header: content-type: application/json
++Authorization
+login/password BPELClient/password1$F
+
+ {"createVfModuleRequest":{"messageId":"ec9537bb-c837-477f-86a5-21c717be96f1-1479156376597","skipAAI":true,"notificationUrl":"http://msobpel-app-st.ecomp.cci.att.com:8080/mso/vnfAdapterRestNotify","cloudSiteId":"RACKSPACE","tenantId":"1015548","vnfId":"5259ba4a-cf0d-4791-9c60-9117faa5cdea","vnfType":"vfw-service/VFWResource-1","vnfVersion":"1.0","vfModuleId":"7d8412bb-b288-44ff-92ef-723018f940fc","vfModuleName":"MSO_VFW_TEST","vfModuleType":"VF_RI1_VFW::module-1","volumeGroupId":"","volumeGroupStackId":"","baseVfModuleId":"","baseVfModuleStackId":"","requestType":"","failIfExists":true,"backout":true,"vfModuleParams":{"vf_module_name":"MSO_VFW_TEST","vnf_name":"vfw-service/VFWResource-1","vnf_id":"5259ba4a-cf0d-4791-9c60-9117faa5cdea","vf_module_id":"7d8412bb-b288-44ff-92ef-723018f940fc"},"msoRequest":{"requestId":"ec9537bb-c837-477f-86a5-21c717be96f1","serviceInstanceId":"369cdf85-1b61-41ff-b637-c6b7dd020326"},"synchronous":false}}
+```
+
+# Getting Help
+
+*** to be completed on rrelease ***
+
+mso@lists.openecomp.org
+
+MSO Javadoc and Maven site
+*** to be completed on rrelease ***
+
diff --git a/status-control/pom.xml b/status-control/pom.xml
new file mode 100644 (file)
index 0000000..169c2ba
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.openecomp</groupId>
+        <artifactId>mso</artifactId>
+        <version>0.0.4-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.openecomp.mso</groupId>
+    <artifactId>status-control</artifactId>
+    <name>MSO Status Control module</name>
+    <description>Contains classes to update and query the MSO status per site</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.openecomp.mso</groupId>
+            <artifactId>common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.mso</groupId>
+            <artifactId>mso-catalog-db</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.mso</groupId>
+            <artifactId>mso-requests-db</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>3.1.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+            <version>3.0.19.Final</version>
+            <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpclient</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.10.19</version>
+            <scope>test</scope>
+        </dependency>
+        
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpcore</artifactId>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpclient</artifactId>
+               </dependency>
+               
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/status-control/src/main/java/org/openecomp/mso/HealthCheckUtils.java b/status-control/src/main/java/org/openecomp/mso/HealthCheckUtils.java
new file mode 100644 (file)
index 0000000..03e807a
--- /dev/null
@@ -0,0 +1,288 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso;
+
+
+import org.openecomp.mso.db.catalog.CatalogDatabase;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoJsonProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.openecomp.mso.utils.UUIDChecker;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+
+import javax.ws.rs.core.Response;
+
+public class HealthCheckUtils {
+
+    private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+    private final static String MSO_PROP_TOPOLOGY = "MSO_PROP_TOPOLOGY";
+    private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+    private static final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
+    private static final String NOT_FOUND = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not started. Properties file missing or invalid or database Connection failed</body></html>";
+    private static final String NOT_HEALTHY = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Application Not Started</title></head><body>Application not available or at least one of the sub-modules is not available.</body></html>";
+    public static final Response HEALTH_CHECK_RESPONSE = Response.status (HttpStatus.SC_OK)
+            .entity (CHECK_HTML)
+            .build ();
+    public static final Response HEALTH_CHECK_NOK_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+            .entity (NOT_HEALTHY)
+            .  build ();
+    public static final Response NOT_STARTED_RESPONSE = Response.status (HttpStatus.SC_SERVICE_UNAVAILABLE)
+            .entity (NOT_FOUND)
+            .build ();
+
+    public enum NodeType {APIH, RA};
+
+    public boolean catalogDBCheck (MsoLogger subMsoLogger, long startTime) {
+        try (CatalogDatabase catalogDB = new CatalogDatabase ()) {
+            catalogDB.healthCheck ();
+        } catch (Exception e) {
+            subMsoLogger.error(MessageEnum.GENERAL_EXCEPTION, "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Failed to check catalog database", e);
+            subMsoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception during healthcheck");
+            return false;
+        }
+        return true;
+    }
+
+    public boolean requestDBCheck (MsoLogger subMsoLogger, long startTime) {
+        try {
+            RequestsDatabase.healthCheck ();
+        } catch (Exception e) {
+            subMsoLogger.error(MessageEnum.GENERAL_EXCEPTION, "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Failed to check request database", e);
+            subMsoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Exception during local healthcheck");
+            return false;
+        }
+        return true;
+    }
+
+    public boolean siteStatusCheck (MsoLogger subMsoLogger, long startTime) {
+        // Check the Site Status value in DB first, if set to false, return NOK
+        String site = getProperty("site-name");
+
+        MsoStatusUtil statusUtil = new MsoStatusUtil ();
+        if (!statusUtil.getSiteStatus (site)) {
+            subMsoLogger.debug("This site is currently disabled for maintenance.");
+            return false;
+        }
+        return true;
+    }
+
+    public boolean configFileCheck (MsoLogger subMsoLogger, long startTime, String propertiesFile) {
+        if (null != propertiesFile) {
+            MsoJavaProperties props = loadMsoProperties (propertiesFile);
+            if (props == null) {
+                subMsoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.ServiceNotAvailable, "Configuration file can not be loaded");
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    private MsoJavaProperties loadMsoProperties (String fileName) {
+        MsoJavaProperties msoProperties;
+        try {
+            msoProperties = msoPropertiesFactory.getMsoJavaProperties(fileName);
+        } catch (Exception e) {
+            msoLogger.error (MessageEnum.LOAD_PROPERTIES_FAIL, fileName, "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Failed to load topology properties", e);
+            return null;
+        }
+        if (msoProperties !=null && msoProperties.size() > 0) {
+            return msoProperties;
+        } else {
+            msoLogger.error (MessageEnum.NO_PROPERTIES, fileName, "", "HealthCheck", MsoLogger.ErrorCode.DataError, "No topology properties");
+            return  null;
+        }
+    }
+
+    protected boolean verifyLocalHealth(String ip, String apiPort, String url, String sslEnabled, String requestId) {
+        String finalUrl = getFinalUrl(ip, apiPort, url, sslEnabled);
+        long startTime = System.currentTimeMillis ();
+        if (null != requestId) {
+            finalUrl = finalUrl + "?requestId=" + requestId;
+        }
+        try (CloseableHttpClient client = getHttpClient()) {
+            HttpResponse response;
+            HttpGet get = new HttpGet(finalUrl);
+            msoLogger.debug("Get url is: " + finalUrl);
+            response = client.execute(get);
+            msoLogger.debug("Get response is: " + response);
+            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+                msoLogger.debug("verifyLocalHealth - Successfully communicate with APIH/BPMN/RA");
+                return true;
+            }
+            msoLogger.debug("verifyLocalHealth - Service not available");
+        } catch (Exception e) {
+            msoLogger.error(MessageEnum.GENERAL_EXCEPTION, "", "HealthCheck", MsoLogger.ErrorCode.UnknownError, "Error in local HealthCheck", e);
+            msoLogger.recordMetricEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with APIH/BPMN/RA", url, "HealthCheck", null);
+            msoLogger.debug("Exception while triggering local health check api:" + finalUrl);
+        }
+        return false;
+    }
+
+    protected CloseableHttpClient getHttpClient () {
+        // set the connection timeout value to 30 seconds (30000 milliseconds)
+        RequestConfig.Builder requestBuilder = RequestConfig.custom();
+        requestBuilder = requestBuilder.setConnectTimeout(30000);
+        requestBuilder = requestBuilder.setConnectionRequestTimeout(30000);
+        HttpClientBuilder builder = HttpClientBuilder.create ();
+        builder.setDefaultRequestConfig (requestBuilder.build ());
+
+        return builder.build ();
+    }
+
+    public MsoJavaProperties loadTopologyProperties() {
+        MsoJavaProperties msoProperties;
+        try {
+            msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_TOPOLOGY);
+        } catch (Exception e) {
+            msoLogger.error(MessageEnum.LOAD_PROPERTIES_FAIL, MSO_PROP_TOPOLOGY, "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Not able to load topology properties", e);
+            return null;
+        }
+
+        if (msoProperties != null && msoProperties.size() > 0) {
+            return msoProperties;
+        } else {
+            msoLogger.error(MessageEnum.LOAD_PROPERTIES_FAIL, MSO_PROP_TOPOLOGY, "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Not able to load topology properties");
+            return null;
+        }
+    }
+
+    public boolean verifyNodeHealthCheck (HealthCheckUtils.NodeType type, String requestId) {
+        // Get info from topology properties file
+        MsoJavaProperties topologyProp = this.loadTopologyProperties();
+        if (null == topologyProp) {
+            return false;
+        }
+        String port = topologyProp.getProperty("server-port", null);
+        String ip = System.getProperty("jboss.qualified.host.name");
+        String sslEnabled = topologyProp.getProperty("ssl-enable", null);
+
+        if (null == port || null == ip || ip.isEmpty() || port.isEmpty()) {
+            msoLogger.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Not able to get the IP or the Port value. IP:" + ip + "; Port:" + port, "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Not able to get the IP or the Port value. IP:" + ip + "; Port:" + port);
+            return false;
+        }
+
+        String[] apis;
+        if (NodeType.APIH.equals (type)) {
+            String apiList = topologyProp.getProperty("apih-healthcheck-urn", null);
+            if (null == apiList) {
+                msoLogger.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Not able to get apih-healthcheck-urn parameter", "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Not able to get apih-healthcheck-urn parameter");
+                return false;
+            }
+            apis = apiList.split(",");
+        } else if (NodeType.RA.equals (type)){
+            String apiList = topologyProp.getProperty("jra-healthcheck-urn", null);
+            if (null == apiList) {
+                msoLogger.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Not able to get jra-healthcheck-urn parameter", "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Not able to get jra-healthcheck-urn parameter");
+                return false;
+            }
+            apis = apiList.split(",");
+        } else {
+            msoLogger.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Unknown NodeType:" + type, "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Unknown NodeType:" + type);
+            return false;
+        }
+
+        // Verify health check on APIH servers
+        for (String url : apis) {
+            // if any of the parameters is null or empty, no need to establish the health check request, just go to the next iteration
+            if ((url == null)  || url.isEmpty()) {
+                continue;
+            }
+            // Exit the loop if local health check returns false from any of the sub component
+            if (!this.verifyLocalHealth(ip, port, url, sslEnabled, requestId)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public boolean verifyGlobalHealthCheck(boolean verifyBpmn, String requestId) {
+        // Get info from topology properties file
+        MsoJavaProperties topologyProp = this.loadTopologyProperties();
+        if (null == topologyProp) {
+            msoLogger.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Not able to find the topology file", "", "HealthCheck", MsoLogger.ErrorCode.PermissionError, "Not able to find the topology file");
+            return false;
+        }
+
+        String apihLB = topologyProp.getProperty("apih-load-balancer", null);
+        String apihApi = topologyProp.getProperty("apih-nodehealthcheck-urn", null);
+        String bpmnLB= topologyProp.getProperty("camunda-load-balancer", null);
+        String bpmnApi = topologyProp.getProperty("camunda-healthcheck-urn", null);
+        String jraLB = topologyProp.getProperty("jra-load-balancer", null);
+        String jraApi = topologyProp.getProperty("jra-nodehealthcheck-urn", null);
+
+        if (null == apihLB || null == apihApi || null == bpmnLB || null == bpmnApi || null == jraLB || null == jraApi
+                || apihLB.isEmpty () || apihApi.isEmpty () || bpmnLB.isEmpty () || bpmnApi.isEmpty () || jraLB.isEmpty () || jraApi.isEmpty () ) {
+            msoLogger.error (MessageEnum.GENERAL_EXCEPTION_ARG, "Key parameters are missing from the topology file", "", "HealthCheck", MsoLogger.ErrorCode.DataError, "Key parameters are missing from the topology file");
+            return false;
+        }
+
+        // Verify health check on APIH servers
+        if (!this.verifyLocalHealth (apihLB, null, apihApi, null, requestId)) {
+            return false;
+        }
+
+        // Verify health check on Camunda servers
+        if (verifyBpmn) {
+            if (!this.verifyLocalHealth (bpmnLB, null, bpmnApi, null, requestId)) {
+                return false;
+            }
+        }
+
+        // Verify health check on RA servers
+        if (!verifyLocalHealth (jraLB, null, jraApi, null, requestId)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    public String getProperty (String name) {
+        MsoJavaProperties prop = this.loadTopologyProperties();
+
+        return prop.getProperty(name, null);
+    }
+
+    protected String getFinalUrl (String ip, String port, String url, String sslEnabled) {
+        if (null == port && null == sslEnabled) {
+            int length = ip.length();
+            if (ip.substring(length - 1).equals ("/")) {
+                ip = ip.substring (0, length - 1);
+            }
+            return ip + url;
+        } else if (null != sslEnabled && "true".equals (sslEnabled.toLowerCase ())) {
+            return "https://" + ip + ":" + port + url;
+        } else {
+            return "http://" + ip + ":" + port + url;
+        }
+    }
+}
diff --git a/status-control/src/main/java/org/openecomp/mso/MsoStatusHandler.java b/status-control/src/main/java/org/openecomp/mso/MsoStatusHandler.java
new file mode 100644 (file)
index 0000000..f125cbb
--- /dev/null
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso;
+
+
+import org.openecomp.mso.utils.UUIDChecker;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.Response;
+
+@Path("/")
+public class MsoStatusHandler {
+    private MsoLogger logger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
+
+    @POST
+    @Path("/setStatus/{siteName}")
+    @Produces("text/plain")
+    public Response setSiteStatus (@DefaultValue("true") @QueryParam("enable") Boolean enable,
+                                   @PathParam("siteName") String siteName) {
+        long startTime = System.currentTimeMillis();
+        // Set logger parameters
+        UUIDChecker.generateUUID (logger);
+        MsoLogger.setServiceName ("SetSiteStatus");
+
+
+        if (null == siteName) {
+            logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, "Not able to find the site name attribute in the config file");
+            return Response.status (Response.Status.INTERNAL_SERVER_ERROR).entity ("Exception: not able to find the site name attribute in the config file").build ();
+        }
+
+        // Query DB for the value
+        try {
+               RequestsDatabase.updateSiteStatus(siteName, enable);
+
+        } catch (Exception e) {
+            logger.error (MessageEnum.GENERAL_EXCEPTION, "", "setSiteStatus", MsoLogger.ErrorCode.DataError, "Failed to set site status", e);
+            logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, "Exception while updating site status");
+            return Response.status (Response.Status.INTERNAL_SERVER_ERROR).entity ("Exception while updating site status").build ();
+        }
+        logger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful");
+        return Response.status (Response.Status.OK).entity ("Site status successfully updated to " + enable).build ();
+    }
+}
diff --git a/status-control/src/main/java/org/openecomp/mso/MsoStatusUtil.java b/status-control/src/main/java/org/openecomp/mso/MsoStatusUtil.java
new file mode 100644 (file)
index 0000000..2a86a4a
--- /dev/null
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso;
+
+
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.requestsdb.SiteStatus;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+
+public class MsoStatusUtil {
+
+    private MsoLogger logger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
+
+    public boolean getSiteStatus (String siteName) {
+        // Query DB for the value
+       
+        try {
+            SiteStatus siteStatus = RequestsDatabase.getSiteStatus(siteName);
+            if (null != siteStatus) {
+                return siteStatus.getStatus();
+            } else {
+                // If status not present in the DB, by default the site is on, thus return true
+                return true;
+            }
+        } catch (Exception e) {
+            logger.error (MessageEnum.GENERAL_EXCEPTION, "", "getSiteStatus", MsoLogger.ErrorCode.DataError, "Exception in getting the site status", e);
+        }
+
+        return false;
+    }
+}
diff --git a/status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsESTest.java b/status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsESTest.java
new file mode 100644 (file)
index 0000000..3fa901c
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:26:24 GMT 2016
+ */
+
+package org.openecomp.mso;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class HealthCheckUtilsESTest extends HealthCheckUtilsESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      HealthCheckUtils healthCheckUtils0 = new HealthCheckUtils();
+      MsoJavaProperties msoJavaProperties0 = healthCheckUtils0.loadTopologyProperties();
+      assertNull(msoJavaProperties0);
+  }
+
+  @Test(timeout = 4000)
+  public void test1()  throws Throwable  {
+      HealthCheckUtils healthCheckUtils0 = new HealthCheckUtils();
+      MsoLogger.Catalog msoLogger_Catalog0 = MsoLogger.Catalog.BPEL;
+      MsoLogger msoLogger0 = MsoLogger.getMsoLogger(msoLogger_Catalog0);
+      boolean boolean0 = healthCheckUtils0.configFileCheck(msoLogger0, 0L, "58zhaz/qbA");
+      assertFalse(boolean0);
+  }
+
+  @Test(timeout = 4000)
+  public void test2()  throws Throwable  {
+      HealthCheckUtils healthCheckUtils0 = new HealthCheckUtils();
+      MsoLogger.Catalog msoLogger_Catalog0 = MsoLogger.Catalog.BPEL;
+      MsoLogger msoLogger0 = MsoLogger.getMsoLogger(msoLogger_Catalog0);
+      boolean boolean0 = healthCheckUtils0.requestDBCheck(msoLogger0, 0L);
+      assertFalse(boolean0);
+  }
+}
diff --git a/status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsESTestscaffolding.java b/status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsESTestscaffolding.java
new file mode 100644 (file)
index 0000000..fdb925a
--- /dev/null
@@ -0,0 +1,155 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:26:24 GMT 2016
+ */
+
+package org.openecomp.mso;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class HealthCheckUtilsESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.HealthCheckUtils"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HealthCheckUtilsESTestscaffolding.class.getClassLoader() ,
+      "org.openecomp.mso.properties.AbstractMsoProperties",
+      "org.openecomp.mso.properties.MsoPropertiesParameters",
+      "org.apache.http.client.config.RequestConfig",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.jboss.resteasy.specimpl.MultivaluedTreeMap",
+      "org.hibernate.criterion.Order",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.apache.http.HttpMessage",
+      "org.hibernate.Query",
+      "org.openecomp.mso.properties.MsoPropertiesException",
+      "org.openecomp.mso.requestsdb.InfraActiveRequests",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.HealthCheckUtils",
+      "org.hibernate.SessionFactory",
+      "org.apache.http.HttpRequest",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.openecomp.mso.properties.MsoPropertiesFactory",
+      "org.openecomp.mso.requestsdb.RequestsDatabase",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.requestsdb.MockRequestsDatabase",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.apache.http.client.config.RequestConfig$Builder",
+      "org.openecomp.mso.requestsdb.InfraRequests",
+      "org.openecomp.mso.requestsdb.SiteStatus",
+      "org.openecomp.mso.properties.MsoPropertiesParameters$MsoPropertiesType",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.apache.http.client.methods.HttpUriRequest",
+      "org.openecomp.mso.HealthCheckUtils$NodeType",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.hibernate.engine.spi.Mapping",
+      "org.openecomp.mso.properties.MsoJavaProperties",
+      "org.apache.http.client.HttpClient",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.jboss.resteasy.util.CaseInsensitiveMap$CaseInsensitiveComparator",
+      "org.hibernate.criterion.Criterion",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.apache.http.impl.client.CloseableHttpClient",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.openecomp.mso.properties.MsoJsonProperties",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.configuration.EELFManager",
+      "org.jboss.resteasy.util.CaseInsensitiveMap$1",
+      "org.jboss.resteasy.core.Headers",
+      "org.hibernate.BasicQueryContract",
+      "org.jboss.resteasy.util.CaseInsensitiveMap",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.apache.http.HttpResponse",
+      "org.openecomp.mso.requestsdb.HibernateUtil",
+      "org.apache.http.HttpHost"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HealthCheckUtilsESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "org.openecomp.mso.HealthCheckUtils$NodeType",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.properties.MsoPropertiesFactory",
+      "org.openecomp.mso.HealthCheckUtils",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.openecomp.mso.requestsdb.HibernateUtil",
+      "org.apache.http.client.config.RequestConfig",
+      "org.jboss.resteasy.specimpl.MultivaluedTreeMap",
+      "org.jboss.resteasy.util.CaseInsensitiveMap$CaseInsensitiveComparator",
+      "org.jboss.resteasy.util.CaseInsensitiveMap",
+      "org.jboss.resteasy.core.Headers",
+      "org.openecomp.mso.requestsdb.RequestsDatabase",
+      "org.openecomp.mso.properties.MsoPropertiesParameters$MsoPropertiesType",
+      "org.openecomp.mso.properties.MsoPropertiesException"
+    );
+  }
+}
diff --git a/status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsTest.java b/status-control/src/test/java/org/openecomp/mso/HealthCheckUtilsTest.java
new file mode 100644 (file)
index 0000000..712cdb2
--- /dev/null
@@ -0,0 +1,300 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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=========================================================
+ */
+
+package org.openecomp.mso;
+
+
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.requestsdb.RequestsDatabase;
+import org.apache.http.HttpStatus;
+import org.apache.http.HttpVersion;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.message.BasicStatusLine;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+
+/**
+ */
+public class HealthCheckUtilsTest {
+
+    private static HealthCheckUtils utils;
+    private static String port = "8080";
+    private static String ip1 = "localhost";
+    private static String ip2 = "192.3.2.1";
+    private static String iptest = "test/";
+    private static String apihUrl1 = "/api/healthcheck";
+    private static String apihUrl2 = "/api/healthcheck2";
+    private static String bpmnUrl1 = "/bpmn/healthcheck";
+    private static String raUrl1 = "/tenants/healthcheck";
+    private static String raUrl2 = "/vnf/healthcheck";
+    private static String raUrl3 = "/sdnc/healthcheck";
+    private static MsoJavaProperties properties;
+    private static String sslEnable = "false";
+    private static CloseableHttpClient client;
+    private static CloseableHttpResponse nokRes, okRes;
+
+    @BeforeClass
+    public static final void prepareMockvalues() {
+        utils = Mockito.mock(HealthCheckUtils.class);
+        client = Mockito.mock(CloseableHttpClient.class);
+        nokRes = Mockito.mock(CloseableHttpResponse.class);
+        okRes = Mockito.mock(CloseableHttpResponse.class);
+        Mockito.when(nokRes.getStatusLine()).thenReturn(new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_SERVICE_UNAVAILABLE, "FINE!"));;
+        Mockito.when(okRes.getStatusLine()).thenReturn(new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "FINE!"));
+
+        properties = new MsoJavaProperties();
+        properties.setProperty("server-port", port);
+        properties.setProperty("ssl-enable", sslEnable);
+        properties.setProperty("apih-load-balancer", ip1);
+        properties.setProperty("apih-healthcheck-urn",apihUrl1 + "," + apihUrl2);
+        properties.setProperty("camunda-load-balancer",ip1);
+        properties.setProperty("camunda-healthcheck-urn",bpmnUrl1);
+        properties.setProperty("jra-load-balancer",ip1);
+        properties.setProperty("jra-healthcheck-urn",raUrl1 + "," + raUrl2 + "," + raUrl3);
+        properties.setProperty("apih-nodehealthcheck-urn", apihUrl1);
+        properties.setProperty("camunda-nodehealthcheck-urn", bpmnUrl1);
+        properties.setProperty("jra-nodehealthcheck-urn", raUrl1);
+
+        Mockito.when(utils.loadTopologyProperties()).thenReturn(properties);
+        Mockito.when(utils.verifyNodeHealthCheck(HealthCheckUtils.NodeType.APIH, null)).thenCallRealMethod();
+        Mockito.when(utils.verifyNodeHealthCheck(HealthCheckUtils.NodeType.RA, null)).thenCallRealMethod();
+        Mockito.when(utils.verifyGlobalHealthCheck(true, null)).thenCallRealMethod();
+        Mockito.when(utils.verifyGlobalHealthCheck(false, null)).thenCallRealMethod();
+
+        Mockito.when(utils.getFinalUrl (ip1, port, raUrl1, sslEnable)).thenCallRealMethod();
+        Mockito.when(utils.getFinalUrl (ip1, port, raUrl1, null)).thenCallRealMethod();
+        Mockito.when(utils.getFinalUrl (ip1, port, raUrl1, "true")).thenCallRealMethod();
+        Mockito.when(utils.getFinalUrl (ip1, port, raUrl1, "otherValue")).thenCallRealMethod();
+        Mockito.when(utils.getFinalUrl (ip1, port, raUrl1, "True")).thenCallRealMethod();
+        Mockito.when(utils.getFinalUrl (ip1, port, raUrl1, "TRUE")).thenCallRealMethod();
+        Mockito.when(utils.getFinalUrl (ip1, null, raUrl1, null)).thenCallRealMethod();
+        Mockito.when(utils.getFinalUrl (iptest, null, raUrl1, null)).thenCallRealMethod();
+
+        System.setProperty("jboss.qualified.host.name", ip1);
+    }
+
+    @Test
+    public final void testVerifyNodeHealthCheck () {
+        Mockito.when (utils.verifyLocalHealth(ip1, port, apihUrl1, sslEnable, null)).thenReturn(true);
+        Mockito.when (utils.verifyLocalHealth(ip1, port, apihUrl2, sslEnable, null)).thenReturn(true);
+        Mockito.when (utils.verifyLocalHealth(ip2, port, apihUrl2, sslEnable, null)).thenReturn(true);
+        Mockito.when (utils.verifyLocalHealth(ip2, port, apihUrl1, sslEnable, null)).thenReturn(false);
+        Mockito.when (utils.verifyLocalHealth(ip1, port, raUrl1, sslEnable, null)).thenReturn(true);
+        Mockito.when (utils.verifyLocalHealth(ip1, port, raUrl2, sslEnable, null)).thenReturn(false);
+        Mockito.when (utils.verifyLocalHealth(ip1, port, raUrl3, sslEnable, null)).thenReturn(true);
+
+        assertTrue (utils.verifyNodeHealthCheck (HealthCheckUtils.NodeType.APIH, null));
+        assertFalse (utils.verifyNodeHealthCheck (HealthCheckUtils.NodeType.RA, null));
+
+        Mockito.when (utils.verifyLocalHealth(ip1, port, apihUrl1, sslEnable, null)).thenReturn(false);
+        Mockito.when (utils.verifyLocalHealth(ip1, port, raUrl2, sslEnable, null)).thenReturn(true);
+        assertFalse (utils.verifyNodeHealthCheck (HealthCheckUtils.NodeType.APIH, null));
+        assertTrue (utils.verifyNodeHealthCheck (HealthCheckUtils.NodeType.RA, null));
+
+        Mockito.when (utils.verifyLocalHealth(ip2, port, apihUrl1, sslEnable, null)).thenReturn(true);
+        assertFalse (utils.verifyNodeHealthCheck (HealthCheckUtils.NodeType.APIH, null));
+        assertTrue (utils.verifyNodeHealthCheck (HealthCheckUtils.NodeType.RA, null));
+
+    }
+
+    @Test
+    public final void testVerifyGlobalHealthCheckBPMN () {
+
+        // healthcheck of bpmn returns false
+        Mockito.when(utils.verifyLocalHealth(ip1, null, bpmnUrl1, null, null)).thenReturn(false);
+        Mockito.when(utils.verifyLocalHealth(ip1, null, apihUrl1, null, null)).thenReturn(true);
+        Mockito.when(utils.verifyLocalHealth(ip1, null, raUrl1, null, null)).thenReturn(true);
+
+        // verify BPMN healthcheck
+        assertFalse(utils.verifyGlobalHealthCheck (true, null));
+
+        // do not verify BPMN healthcheck
+        assertTrue(utils.verifyGlobalHealthCheck (false, null));
+
+        Mockito.when(utils.verifyLocalHealth(ip1, null, bpmnUrl1, null, null)).thenReturn(true);
+        assertTrue(utils.verifyGlobalHealthCheck (true, null));
+    }
+
+    @Test
+    public final void testVerifyGlobalHealthCheckAPIH () {
+
+        Mockito.when(utils.verifyLocalHealth(ip1, null, apihUrl1, null, null)).thenReturn(true);
+        Mockito.when(utils.verifyLocalHealth(ip1, null, raUrl1, null, null)).thenReturn(true);
+        Mockito.when(utils.verifyLocalHealth(ip1, null, bpmnUrl1, null, null)).thenReturn(true);
+        assertTrue(utils.verifyGlobalHealthCheck (true, null));
+
+        Mockito.when(utils.verifyLocalHealth(ip1, null, apihUrl1, null, null)).thenReturn(false);
+        assertFalse(utils.verifyGlobalHealthCheck (true, null));
+    }
+
+    @Test
+    public final void testVerifyGlobalHealthCheckRA () {
+        // all health check apis returns true
+        Mockito.when(utils.verifyLocalHealth(ip1, null, apihUrl1, null, null)).thenReturn(true);
+        Mockito.when(utils.verifyLocalHealth(ip1, null, raUrl1, null, null)).thenReturn(true);
+        Mockito.when(utils.verifyLocalHealth(ip1, null, bpmnUrl1, null, null)).thenReturn(true);
+        assertTrue(utils.verifyGlobalHealthCheck (true, null));
+
+
+        // 3rd ra api return false; others return true
+        Mockito.when(utils.verifyLocalHealth(ip1, null, raUrl1, null, null)).thenReturn(false);
+        assertFalse(utils.verifyGlobalHealthCheck (true, null));
+    }
+
+    @Test
+    public final void testGetFinalUrl () {
+        String finalUrl1 = utils.getFinalUrl (ip1, port, raUrl1, sslEnable);
+        assertTrue (finalUrl1.equals ("http://" + ip1 + ":" + port + raUrl1));
+
+        String finalUrl2 = utils.getFinalUrl (ip1, port, raUrl1, "true");
+        assertTrue (finalUrl2.equals ("https://" + ip1 + ":" + port + raUrl1));
+
+        String finalUrl3 = utils.getFinalUrl (ip1, port, raUrl1, null);
+        assertTrue (finalUrl3.equals ("http://" + ip1 + ":" + port + raUrl1));
+
+        String finalUrl4 = utils.getFinalUrl (ip1, port, raUrl1, "otherValue");
+        assertTrue (finalUrl4.equals ("http://" + ip1 + ":" + port + raUrl1));
+
+        String finalUrl5 = utils.getFinalUrl (ip1, port, raUrl1, "True");
+        assertTrue (finalUrl5.equals ("https://" + ip1 + ":" + port + raUrl1));
+
+        String finalUrl6 = utils.getFinalUrl (ip1, port, raUrl1, "TRUE");
+        assertTrue (finalUrl6.equals ("https://" + ip1 + ":" + port + raUrl1));
+
+        String finalUrl7 = utils.getFinalUrl (ip1, null, raUrl1, null);
+        assertTrue (finalUrl7.equals (ip1 + raUrl1));
+
+        String finalUrl8 = utils.getFinalUrl (iptest, null, raUrl1, null);
+        assertTrue (finalUrl8.equals ("test" + raUrl1));
+    }
+
+    @Test
+    public final void testVerifyLocalHealth() {
+        HealthCheckUtils tempUtil = Mockito.mock(HealthCheckUtils.class);
+
+        Mockito.when(tempUtil.verifyLocalHealth(ip1, port, apihUrl1, sslEnable, null)).thenCallRealMethod ();
+        Mockito.when(tempUtil.getFinalUrl (ip1, port, apihUrl1, sslEnable)).thenCallRealMethod ();
+        Mockito.when(tempUtil.getHttpClient()).thenReturn (client);
+
+        try {
+            Mockito.when (client.execute (any(HttpUriRequest.class))).thenReturn (okRes);
+            Boolean res1 = (Boolean)invokeProtectedMethod(tempUtil, "verifyLocalHealth", ip1, port, apihUrl1, sslEnable, null);
+            assertTrue(res1);
+
+            Mockito.when (client.execute (any(HttpUriRequest.class))).thenReturn (nokRes);
+            Boolean res2 = (Boolean)invokeProtectedMethod(tempUtil, "verifyLocalHealth", ip1, port, apihUrl1, sslEnable, null);
+            assertFalse(res2);
+
+        } catch (Exception e) {
+            e.printStackTrace ();
+        }
+
+    }
+
+
+    @Test
+    public final void NullityCheck () {
+        Mockito.when(utils.verifyLocalHealth(ip1, null, bpmnUrl1, null, null)).thenReturn(true);
+        Mockito.when(utils.verifyLocalHealth(ip1, null, apihUrl1, null, null)).thenReturn(true);
+        Mockito.when(utils.verifyLocalHealth(ip1, null, raUrl1, null, null)).thenReturn(true);
+
+        assertTrue (utils.verifyGlobalHealthCheck (true, null));
+
+        // mising server-port parameter
+        MsoJavaProperties newProperties1 = new MsoJavaProperties();
+        Mockito.when(utils.loadTopologyProperties()).thenReturn(newProperties1);
+
+        newProperties1.setProperty("apih-load-balancer", ip1);
+        newProperties1.setProperty("apih-nodehealthcheck-urn",apihUrl1);
+        newProperties1.setProperty("camunda-load-balancer",ip1);
+        newProperties1.setProperty("camunda-nodehealthcheck-urn",bpmnUrl1);
+        newProperties1.setProperty("jra-load-balancer",ip1);
+        newProperties1.setProperty("jra-nodehealthcheck-urn",raUrl1);
+
+        assertFalse (utils.verifyGlobalHealthCheck (true, null));
+
+        // mising apih-server-list parameter
+        MsoJavaProperties newProperties2 = new MsoJavaProperties();
+        Mockito.when(utils.loadTopologyProperties()).thenReturn(newProperties2);
+
+        newProperties2.setProperty("server-port", port);
+        newProperties1.setProperty("apih-nodehealthcheck-urn",apihUrl1);
+        newProperties1.setProperty("camunda-load-balancer",ip1);
+        newProperties1.setProperty("camunda-nodehealthcheck-urn",bpmnUrl1);
+        newProperties1.setProperty("jra-load-balancer",ip1);
+        newProperties1.setProperty("jra-nodehealthcheck-urn",raUrl1);
+
+        assertFalse (utils.verifyGlobalHealthCheck (true, null));
+
+        // mising jra-healthcheck-urn parameter
+        MsoJavaProperties newProperties3 = new MsoJavaProperties();
+        Mockito.when(utils.loadTopologyProperties()).thenReturn(newProperties3);
+
+        newProperties3.setProperty("server-port", port);
+        newProperties1.setProperty("apih-load-balancer", ip1);
+        newProperties1.setProperty("apih-nodehealthcheck-urn",apihUrl1);
+        newProperties1.setProperty("camunda-load-balancer",ip1);
+        newProperties1.setProperty("camunda-nodehealthcheck-urn",bpmnUrl1);
+        newProperties1.setProperty("jra-load-balancer",ip1);
+        newProperties3.setProperty("jra-server-list",ip1);
+
+        assertFalse (utils.verifyGlobalHealthCheck (true, null));
+
+        Mockito.when(utils.loadTopologyProperties()).thenReturn(properties);
+    }
+
+    // User reflection to invoke to avoid change the publicity of the method
+    private static Object invokeProtectedMethod (HealthCheckUtils tempUtil, String methodName, String arg1, String arg2, String arg3, String arg4, String arg5) {
+        Method method;
+        try {
+            method = HealthCheckUtils.class.getDeclaredMethod(methodName, String.class, String.class, String.class, String.class, String.class);
+            method.setAccessible(true);
+            return  method.invoke(tempUtil, arg1, arg2, arg3, arg4, arg5);
+        } 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/status-control/src/test/java/org/openecomp/mso/MsoStatusUtilESTest.java b/status-control/src/test/java/org/openecomp/mso/MsoStatusUtilESTest.java
new file mode 100644 (file)
index 0000000..3a05a77
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * This file was automatically generated by EvoSuite
+ * Mon Nov 14 08:26:39 GMT 2016
+ */
+
+package org.openecomp.mso;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+import org.evosuite.runtime.EvoRunner;
+import org.evosuite.runtime.EvoRunnerParameters;
+import org.junit.runner.RunWith;
+
+@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
+public class MsoStatusUtilESTest extends MsoStatusUtilESTestscaffolding {
+
+  @Test(timeout = 4000)
+  public void test0()  throws Throwable  {
+      MsoStatusUtil msoStatusUtil0 = new MsoStatusUtil();
+      boolean boolean0 = msoStatusUtil0.getSiteStatus("getSiteStatus");
+      assertFalse(boolean0);
+  }
+}
diff --git a/status-control/src/test/java/org/openecomp/mso/MsoStatusUtilESTestscaffolding.java b/status-control/src/test/java/org/openecomp/mso/MsoStatusUtilESTestscaffolding.java
new file mode 100644 (file)
index 0000000..bd9141a
--- /dev/null
@@ -0,0 +1,121 @@
+/**
+ * Scaffolding file used to store all the setups needed to run 
+ * tests automatically generated by EvoSuite
+ * Mon Nov 14 08:26:39 GMT 2016
+ */
+
+package org.openecomp.mso;
+
+import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
+import org.junit.BeforeClass;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.evosuite.runtime.sandbox.Sandbox;
+
+@EvoSuiteClassExclude
+public class MsoStatusUtilESTestscaffolding {
+
+  @org.junit.Rule 
+  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
+
+  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
+
+  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
+
+  @BeforeClass 
+  public static void initEvoSuiteFramework() { 
+    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.MsoStatusUtil"; 
+    org.evosuite.runtime.GuiSupport.initialize(); 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
+    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
+    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
+    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
+    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
+    initializeClasses();
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+  } 
+
+  @AfterClass 
+  public static void clearEvoSuiteFramework(){ 
+    Sandbox.resetDefaultSecurityManager(); 
+    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
+  } 
+
+  @Before 
+  public void initTestCase(){ 
+    threadStopper.storeCurrentThreads();
+    threadStopper.startRecordingTime();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
+    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
+     
+    org.evosuite.runtime.GuiSupport.setHeadless(); 
+    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
+  } 
+
+  @After 
+  public void doneWithTestCase(){ 
+    threadStopper.killAndJoinClientThreads();
+    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
+    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
+    resetClasses(); 
+    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
+    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
+    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
+  } 
+
+
+  private static void initializeClasses() {
+    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoStatusUtilESTestscaffolding.class.getClassLoader() ,
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "com.att.eelf.configuration.EELFLogger",
+      "org.hibernate.engine.spi.Mapping",
+      "org.hibernate.criterion.Order",
+      "com.att.eelf.configuration.SLF4jWrapper",
+      "org.hibernate.Query",
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.requestsdb.InfraActiveRequests",
+      "org.hibernate.criterion.Criterion",
+      "org.openecomp.mso.logger.MsoLogger",
+      "org.openecomp.mso.logger.MessageEnum",
+      "com.att.eelf.i18n.EELFResolvableErrorEnum",
+      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
+      "org.openecomp.mso.entity.MsoRequest",
+      "org.hibernate.SessionFactory",
+      "org.openecomp.mso.logger.MsoLogger$StatusCode",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.MsoStatusUtil",
+      "com.att.eelf.i18n.EELFMsgs",
+      "org.openecomp.mso.requestsdb.RequestsDatabase",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "org.openecomp.mso.requestsdb.MockRequestsDatabase",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.hibernate.BasicQueryContract",
+      "com.att.eelf.i18n.EELFResourceManager$1",
+      "org.openecomp.mso.requestsdb.HibernateUtil",
+      "org.openecomp.mso.requestsdb.InfraRequests",
+      "org.openecomp.mso.requestsdb.SiteStatus"
+    );
+  } 
+
+  private static void resetClasses() {
+    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoStatusUtilESTestscaffolding.class.getClassLoader());
+
+    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
+      "com.att.eelf.i18n.EELFResourceManager",
+      "org.openecomp.mso.logger.MessageEnum",
+      "org.openecomp.mso.logger.MsoLogger$Catalog",
+      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
+      "org.openecomp.mso.logger.MsoLogger",
+      "com.att.eelf.i18n.EELFMsgs",
+      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
+      "com.att.eelf.configuration.EELFLogger$Level",
+      "com.att.eelf.configuration.EELFManager",
+      "org.openecomp.mso.requestsdb.HibernateUtil",
+      "org.openecomp.mso.requestsdb.RequestsDatabase"
+    );
+  }
+}
diff --git a/version.properties b/version.properties
new file mode 100644 (file)
index 0000000..cdcd1e9
--- /dev/null
@@ -0,0 +1,13 @@
+# Versioning variables\r
+# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )\r
+# because they are used in Jenkins, whose plug-in doesn't support\r
+\r
+major=1\r
+minor=0\r
+patch=0\r
+\r
+base_version=${major}.${minor}.${patch}\r
+\r
+# Release must be completed with git revision # in Jenkins\r
+release_version=${base_version}\r
+snapshot_version=${base_version}-SNAPSHOT\r